Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions proto/agynio/api/agents/v1/agents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ message Agent {
// definition instead of each carrying its own copy.
string image = 7 [deprecated = true];
ComputeResources resources = 8 [deprecated = true];
string init_image = 9;
// Superseded by the environment's agent_runtime_image_id. Nothing reads this:
// the orchestrator refuses a workload whose environment names no runtime
// rather than substituting an agent-supplied image.
string init_image = 9 [deprecated = true];
string organization_id = 10;
string nickname = 11;
optional string idle_timeout = 12; // Go duration string (e.g., "30s", "5m", "1h").
Expand Down Expand Up @@ -281,7 +284,7 @@ message CreateAgentRequest {
string image = 6 [deprecated = true];
ComputeResources resources = 7 [deprecated = true];
string organization_id = 8;
string init_image = 9;
string init_image = 9 [deprecated = true];
string nickname = 10;
optional string idle_timeout = 11; // Go duration string (e.g., "30s", "5m", "1h").
// Capabilities supported by this agent. Free-form strings (e.g., "privileged", "dind").
Expand Down Expand Up @@ -329,7 +332,7 @@ message UpdateAgentRequest {
optional string configuration = 6;
optional string image = 7 [deprecated = true];
optional ComputeResources resources = 8 [deprecated = true];
optional string init_image = 9;
optional string init_image = 9 [deprecated = true];
optional string nickname = 10;
optional string idle_timeout = 11; // Go duration string (e.g., "30s", "5m", "1h").
// Capabilities replace the existing list; an empty list clears all capabilities.
Expand Down
43 changes: 35 additions & 8 deletions proto/agynio/api/expose/v1/expose.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ import "google/protobuf/timestamp.proto";
option go_package = "github.com/agynio/api/gen/agynio/api/expose/v1;exposev1";

// ExposeService manages the lifecycle of port exposures — making ports inside
// agent containers accessible over the OpenZiti network.
// a workload accessible over the OpenZiti network.
service ExposeService {
// Expose a port on an agent workload. Creates OpenZiti resources and returns
// the exposure record (including the access URL).
// Expose a port on a workload. Creates OpenZiti resources and returns the
// exposure record (including the access URL). Idempotent per
// (workload_id, port): a port already exposed returns its existing record.
rpc AddExposure(AddExposureRequest) returns (AddExposureResponse);

// Un-expose a port on an agent workload. Deletes the OpenZiti resources and
// the exposure record.
// Un-expose a port on a workload. Deletes the OpenZiti resources and the
// exposure record.
rpc RemoveExposure(RemoveExposureRequest) returns (RemoveExposureResponse);

// List active exposures for an agent workload.
// List active exposures for a workload.
rpc ListExposures(ListExposuresRequest) returns (ListExposuresResponse);
}

Expand All @@ -33,6 +34,15 @@ enum ExposureStatus {
EXPOSURE_STATUS_REMOVING = 4;
}

// What kind of entity the exposing workload runs for. Mirrors
// agynio.api.runners.v1.RuntimeOwnerKind by value; domain packages do not
// import one another.
enum ExposureOwnerKind {
EXPOSURE_OWNER_KIND_UNSPECIFIED = 0;
EXPOSURE_OWNER_KIND_AGENT_INSTANCE = 1;
EXPOSURE_OWNER_KIND_SANDBOX = 2;
}

// ===========================================================================
// Common
// ===========================================================================
Expand All @@ -50,23 +60,40 @@ message EntityMeta {
message Exposure {
EntityMeta meta = 1;
string workload_id = 2;
string agent_id = 3;
// Deprecated: read owner_kind and owner_id instead. Still populated for
// agent-instance-owned exposures; always empty for sandbox-owned ones.
string agent_id = 3 [deprecated = true];
int32 port = 4;
string openziti_service_id = 5;
string openziti_bind_policy_id = 6;
string openziti_dial_policy_id = 7;
// Access URL: http://<hostname>:<port>.
string url = 8;
ExposureStatus status = 9;
ExposureOwnerKind owner_kind = 10;
// Agent instance or sandbox the exposing workload runs for. Names the
// exposure — see the hostname field.
string owner_id = 11;
string organization_id = 12;
// Resolved intercept address, e.g. super-sandbox.acme.agyn. Derived from the
// owner and its organization at creation, re-derived by reconciliation, and
// written into the service's intercept.v1 config. Falls back to
// exposed-<id>.agyn when no readable form can be derived.
string hostname = 13;
}

// ===========================================================================
// AddExposure
// ===========================================================================

message AddExposureRequest {
// Cluster admins only. Omitted on the standard path, where the workload is
// read from the x-workload-id header the Gateway injects.
string workload_id = 1;
int32 port = 2;
string agent_id = 3;
// Deprecated: the owner is resolved from the workload record. Accepted and
// ignored.
string agent_id = 3 [deprecated = true];
}

message AddExposureResponse {
Expand Down
Loading