n5i-plugin-proto 0.12.0-dev.2

Protobuf definitions for n5i plugins
Documentation
// SPDX-FileCopyrightText: 2024-2026 The n5i Project
//
// SPDX-License-Identifier: AGPL-3.0-or-later

syntax = "proto3";

package n5i_plugin;
import "common.proto";

message ParseAppRequest {
  string app_id = 1;
  // The directory of the app as a compressed tar archive (compressed using gzip)
  bytes app_directory = 2;
  UserState user_state = 3;
  optional string initial_domain = 4;
  string app_seed_base = 5;
}

message ParseAppResponse {
  // The JSON-encoded parsed app in Nirvati's internal app format
  string parsed_app = 1;
}

message InstallAppRequest {
  string app_id = 1;
  // The directory of the app as a compressed tar archive (compressed using gzip)
  bytes app_directory = 2;
  UserState user_state = 3;
  optional string initial_domain = 4;
  string app_seed_base = 5;
}

message InstallAppResponse {}

message UninstallAppRequest {
  string app_id = 1;
  // The directory of the app as a compressed tar archive (compressed using gzip)
  bytes app_directory = 2;
  UserState user_state = 3;
  string app_seed_base = 4;
}

message UninstallAppResponse {}

message PauseAppRequest {
  string app_id = 1;
  // The directory of the app as a compressed tar archive (compressed using gzip)
  bytes app_directory = 2;
  UserState user_state = 3;
  optional string initial_domain = 4;
  string app_seed_base = 5;
}

message PauseAppResponse {}

message ResumeAppRequest {
  string app_id = 1;
  // The directory of the app as a compressed tar archive (compressed using gzip)
  bytes app_directory = 2;
  UserState user_state = 3;
  optional string initial_domain = 4;
  string app_seed_base = 5;
}

message ResumeAppResponse {}

message IsSupportedAppRequest {
  string app_id = 1;
  bytes app_directory = 2;
  UserState user_state = 3;
}

message IsSupportedAppResponse {
  bool supported = 1;
}

// A parser/runtime plugin adds a custom parser for app files
// It may also contain a custom runtime for the app and just proxy to it
service RuntimePlugin {
  rpc IsSupportedApp(IsSupportedAppRequest) returns (IsSupportedAppResponse) {}
  rpc ParseApp(ParseAppRequest) returns (ParseAppResponse) {}
  // Installs are also partially handled by Nirvati, but this lets the plugin know about it
  // so it can also do something on its part if needed for the particular format
  rpc InstallApp(InstallAppRequest) returns (InstallAppResponse) {}
  rpc UninstallApp(UninstallAppRequest) returns (UninstallAppResponse) {}
  rpc PauseApp(PauseAppRequest) returns (PauseAppResponse) {}
  rpc ResumeApp(ResumeAppRequest) returns (ResumeAppResponse) {}
}