Ctrl K
ComunidadGuías…

api/webide.proto

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
syntax = "proto3";
package liaison.webide;
option go_package = "github.com/liaisonio/liaison/api/webide;webide";

// Versioned handwritten JSON transport, consistent with edge_agent.proto.
// Edge RPC webide_v1 is accepted only over the authenticated connector channel.
// Owner/access identifiers are supplied by Manager, never trusted browser input.
// This contract is independent of Agent RPC and does not grant Agent access.
message WebIDERequest {
  uint32 version = 1;
  string action = 2;
  string owner_id = 3;
  string access_id = 4;
  string project = 5; // Optional on start: empty opens the IDE without a folder.
  string installation_id = 6;
  string instance_id = 7;
  string directory = 8;
  string application_id = 9; // Manager-owned attribution; optional for legacy peers.
  string request_id = 10; // Validated diagnostic correlation, never a credential.
}
message WebIDEInstallation {
  string id = 1;
  string version = 2;
  string source = 3;
  string path = 4;
}
message WebIDEInstance {
  string id = 1;
  string access_id = 2;
  string installation_id = 3;
  string project = 4;
  string status = 5;
  string started_at = 6;
  string application_id = 7;
}
message WebIDEDirectory { string name = 1; string path = 2; }
// Optional field on the existing connector stream destination envelope.
// When present, addr must be empty; Edge resolves only its owned registry.
message WebIDEStream {
  string owner_id = 1;
  string access_id = 2;
  string instance_id = 3;
}
message WebIDEResult {
  uint32 version = 1;
  string status = 2;
  repeated WebIDEInstallation installations = 3;
  repeated WebIDEInstance instances = 4;
  repeated WebIDEDirectory directories = 5;
  string directory = 6;
  bool truncated = 7;
  string platform = 8;
  bool can_launch = 9;
}

// Manager JSON API: /api/v1/webide/applications and /accesses (GET/POST),
// /{id} (PUT/DELETE), /connectors (GET), /connectors/{id} (POST discovery,
// install, instances, directories), /accesses/{id}/runtime (POST start/stop).
// Installation fields are immutable after registration. ID is an idempotency
// key generated by the client on creation; owner comes only from auth context.
message WebIDEApplicationInput {
  string id = 1;
  string name = 2;
  uint64 edge_id = 3;
  string installation_id = 4;
  string mode = 5; // managed or external
  uint32 port = 6; // external loopback HTTP service; never an arbitrary URL
}
message WebIDEAccessInput {
  string id = 1;
  string name = 2;
  string application_id = 3;
  bool enabled = 4;
  string project = 5;
}

// Owner-scoped managed instances: GET /applications/{id}/instances.
// POST /applications/{id}/instances/{instance_id} with action stop or recover.
// Recover recreates the original access identity without restarting the process.
message WebIDEInstanceAction { string action = 1; }

// GET /accesses accepts an optional literal name substring, before pagination.
message ListWebIDEAccessesRequest {
  uint32 page = 1;
  uint32 page_size = 2;
  string name = 3;
}
// Each access list row adds a safe summary; no installation paths/configuration.
message WebIDEAccessSummary {
  string application_name = 1;
  string connector_name = 2;
  bool connector_online = 3;
  bool connector_available = 4;
  string application_mode = 5;
}
// Manager generates X-Request-ID on every IDE API response and forwards it in
// connector RPC. Failed responses also include request_id alongside code/message.

// POST /accesses/{id}/launch. Theme is an optional default, not a user setting.
message WebIDELaunchInput {
  string instance_id = 1;
  string project = 2;
  string theme = 3; // empty (upstream default), dark, or light
}