@cofy-x/axern-sdk 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +26 -65
  2. package/dist/client/index.d.ts +10 -11
  3. package/dist/client/index.js +64 -68
  4. package/dist/config/index.d.ts +0 -1
  5. package/dist/config/index.js +2 -4
  6. package/dist/generated/proto.js +0 -1
  7. package/dist/index.d.ts +4 -5
  8. package/dist/index.js +1 -2
  9. package/dist/node/attached_process.d.ts +1 -2
  10. package/dist/node/attached_process.js +12 -26
  11. package/dist/node/client.d.ts +4 -6
  12. package/dist/node/client.js +2 -9
  13. package/dist/node/exec.d.ts +1 -3
  14. package/dist/node/exec.js +0 -43
  15. package/dist/proto/axern/control/admin/v1/access.proto +12 -5
  16. package/dist/proto/axern/control/admin/v1/audit.proto +14 -16
  17. package/dist/proto/axern/control/admin/v1/node.proto +23 -67
  18. package/dist/proto/axern/control/admin/v1/reliability.proto +11 -78
  19. package/dist/proto/axern/control/capability/v1/capability.proto +34 -94
  20. package/dist/proto/axern/control/common/v1/common.proto +29 -102
  21. package/dist/proto/axern/control/environment/v1/environment.proto +42 -26
  22. package/dist/proto/axern/control/gateway/v1/gateway.proto +18 -59
  23. package/dist/proto/axern/control/identity/v1/identity.proto +1 -1
  24. package/dist/proto/axern/control/namespace/v1/namespace.proto +2 -3
  25. package/dist/proto/axern/control/quota/v1/quota.proto +22 -32
  26. package/dist/proto/axern/control/run/v1/run.proto +26 -22
  27. package/dist/proto/axern/control/secret/v1/secret.proto +1 -3
  28. package/dist/proto/axern/control/tunnel/v1/tunnel.proto +18 -25
  29. package/dist/proto/axern/node/sandbox/v1/node.proto +59 -375
  30. package/dist/sandbox/index.d.ts +3 -9
  31. package/dist/sandbox/index.js +13 -22
  32. package/dist/sandbox/lifecycle.d.ts +1 -1
  33. package/dist/sandbox/lifecycle.js +55 -17
  34. package/dist/tunnel/connector.js +1 -1
  35. package/dist/tunnel/control.d.ts +0 -1
  36. package/dist/tunnel/control.js +0 -1
  37. package/dist/tunnel/runtime.d.ts +0 -1
  38. package/dist/tunnel/runtime.js +0 -1
  39. package/dist/tunnel/types.d.ts +0 -1
  40. package/dist/types.d.ts +4 -21
  41. package/dist/types.js +1 -3
  42. package/dist/version.d.ts +1 -1
  43. package/dist/version.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/proto/axern/control/admin/v1/allocation_lifecycle.proto +0 -91
  46. package/dist/proto/axern/control/admin/v1/service.proto +0 -18
  47. package/dist/proto/axern/control/admin/v1/storage.proto +0 -81
  48. package/dist/proto/axern/control/agentprofile/v1/agent_profile.proto +0 -169
  49. package/dist/proto/axern/control/catalog/v1/catalog.proto +0 -127
  50. package/dist/proto/axern/control/function/v1/function.proto +0 -130
  51. package/dist/proto/axern/control/function/v1/function_types.proto +0 -233
  52. package/dist/proto/axern/control/node/v1/node_control.proto +0 -443
  53. package/dist/proto/axern/control/rollout/v1/rollout.proto +0 -344
  54. package/dist/proto/axern/control/service/v1/service.proto +0 -96
  55. package/dist/proto/axern/control/service/v1/service_event.proto +0 -47
  56. package/dist/proto/axern/control/service/v1/service_replica.proto +0 -78
  57. package/dist/proto/axern/control/service/v1/service_types.proto +0 -155
  58. package/dist/proto/axern/control/storage/v1/storage.proto +0 -107
  59. package/dist/proto/axern/control/storage/v1/storage_types.proto +0 -125
  60. package/dist/proto/axern/data/artifact/v1/artifact.proto +0 -19
@@ -7,11 +7,10 @@ import { uploadArchive, downloadArchive } from "./archive.js";
7
7
  import { capabilityStatus } from "./capabilities.js";
8
8
  import * as computerUse from "./computer_use.js";
9
9
  import { process as startProcess } from "./attached_process.js";
10
- import { processImage as startImageProcess } from "./attached_process.js";
11
10
  import { NodeClientContext } from "./context.js";
12
- import { exec, execImage } from "./exec.js";
11
+ import { exec } from "./exec.js";
13
12
  import * as files from "./files.js";
14
- export class NodeSandboxClient {
13
+ export class AllocationClient {
15
14
  allocationId;
16
15
  ctx;
17
16
  constructor(options) {
@@ -24,12 +23,6 @@ export class NodeSandboxClient {
24
23
  async process(command, options = {}) {
25
24
  return startProcess(this.ctx, command, options);
26
25
  }
27
- async execImage(image, command, options = {}) {
28
- return execImage(this.ctx, image, command, options);
29
- }
30
- async processImage(image, command, options = {}) {
31
- return startImageProcess(this.ctx, image, command, options);
32
- }
33
26
  async capabilityStatus(options = {}) {
34
27
  return capabilityStatus(this.ctx, options);
35
28
  }
@@ -3,10 +3,8 @@
3
3
  * Copyright 2026 cofy-x
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Command, ExecOptions, ExecResult, ImageExecOptions, ImageProcessOptions, ProcessOptions } from "../types.js";
6
+ import type { Command, ExecOptions, ExecResult, ProcessOptions } from "../types.js";
7
7
  import type { NodeClientContext } from "./context.js";
8
8
  export declare function exec(ctx: NodeClientContext, command: Command, options?: ExecOptions): Promise<ExecResult>;
9
- export declare function execImage(ctx: NodeClientContext, image: string, command: Command, options?: ImageExecOptions): Promise<ExecResult>;
10
9
  export declare function execSpec(argv: string[], options: ExecOptions | ProcessOptions): Record<string, unknown>;
11
- export declare function imageProcessSpec(image: string, argv: string[], options: ImageExecOptions | ImageProcessOptions): Record<string, unknown>;
12
10
  export declare function execResult(response: Record<string, unknown>): ExecResult;
package/dist/node/exec.js CHANGED
@@ -25,28 +25,6 @@ export async function exec(ctx, command, options = {}) {
25
25
  throw mapRpcError(error, "sandbox exec", ctx.allocationId);
26
26
  }
27
27
  }
28
- export async function execImage(ctx, image, command, options = {}) {
29
- if (image.trim() === "") {
30
- throw new Error("image is required");
31
- }
32
- const argv = normalizeCommand(command);
33
- try {
34
- const response = await ctx.withAuthRetry(options.leaseTtlSeconds ?? 300, async (client) => unary(client, "ExecImage", ctx.authRequest({
35
- spec: imageProcessSpec(image, argv, options),
36
- }), options.rpcTimeoutMs));
37
- const result = execResult(response);
38
- if (options.check === true && result.exitCode !== 0) {
39
- throw new SandboxExecError(argv, result);
40
- }
41
- return result;
42
- }
43
- catch (error) {
44
- if (error instanceof SandboxExecError) {
45
- throw error;
46
- }
47
- throw mapRpcError(error, "sandbox exec image", ctx.allocationId);
48
- }
49
- }
50
28
  export function execSpec(argv, options) {
51
29
  return {
52
30
  argv,
@@ -57,27 +35,6 @@ export function execSpec(argv, options) {
57
35
  user: options.user ?? "",
58
36
  };
59
37
  }
60
- export function imageProcessSpec(image, argv, options) {
61
- return {
62
- image,
63
- argv,
64
- env: options.env ?? {},
65
- cwd: options.cwd ?? "",
66
- timeout_seconds: options.timeoutSeconds ?? 0,
67
- tty: options.tty ?? false,
68
- user: options.user ?? "",
69
- mounts: imageProcessMounts(options.mounts),
70
- };
71
- }
72
- function imageProcessMounts(mounts) {
73
- const effective = mounts ?? [{ sandboxPath: "/workspace", targetPath: "/workspace" }];
74
- return effective.map((mount) => ({
75
- sandbox_path: mount.sandboxPath,
76
- target_path: mount.targetPath,
77
- readonly: mount.readonly ?? false,
78
- options: [...(mount.options ?? [])],
79
- }));
80
- }
81
38
  export function execResult(response) {
82
39
  const stdout = Buffer.from(response.stdout ?? []);
83
40
  const stderr = Buffer.from(response.stderr ?? []);
@@ -30,7 +30,12 @@ enum AccessRole {
30
30
  ACCESS_ROLE_NAMESPACE_ADMIN = 2;
31
31
  ACCESS_ROLE_NAMESPACE_EDITOR = 3;
32
32
  ACCESS_ROLE_NAMESPACE_VIEWER = 4;
33
- ACCESS_ROLE_ROLLOUT_EXECUTOR = 5;
33
+ }
34
+
35
+ enum CredentialKind {
36
+ CREDENTIAL_KIND_UNSPECIFIED = 0;
37
+ CREDENTIAL_KIND_X509 = 1;
38
+ CREDENTIAL_KIND_SSH = 2;
34
39
  }
35
40
 
36
41
  message Principal {
@@ -39,19 +44,19 @@ message Principal {
39
44
  string display_name = 3;
40
45
  PrincipalKind kind = 4;
41
46
  PrincipalStatus status = 5;
42
- int64 version = 6;
43
- google.protobuf.Timestamp created_at = 7;
44
- google.protobuf.Timestamp updated_at = 8;
47
+ google.protobuf.Timestamp created_at = 6;
48
+ google.protobuf.Timestamp updated_at = 7;
45
49
  }
46
50
 
47
51
  message PrincipalCredential {
48
52
  string credential_id = 1;
49
53
  string principal_id = 2;
50
54
  string fingerprint = 3;
51
- google.protobuf.Timestamp certificate_not_after = 4;
55
+ google.protobuf.Timestamp expires_at = 4;
52
56
  string label = 5;
53
57
  google.protobuf.Timestamp created_at = 6;
54
58
  google.protobuf.Timestamp revoked_at = 7;
59
+ CredentialKind kind = 8;
55
60
  }
56
61
 
57
62
  message RoleBinding {
@@ -83,6 +88,8 @@ message AddPrincipalCredentialRequest {
83
88
  string principal_id = 1;
84
89
  bytes certificate_der = 2;
85
90
  string label = 3;
91
+ string ssh_public_key = 4;
92
+ google.protobuf.Timestamp expires_at = 5;
86
93
  }
87
94
  message AddPrincipalCredentialResponse { PrincipalCredential credential = 1; }
88
95
 
@@ -11,27 +11,25 @@ enum AdminAuditOperation {
11
11
  ADMIN_AUDIT_OPERATION_FORCE_ALLOCATION_LIFECYCLE_RETRY = 1;
12
12
  ADMIN_AUDIT_OPERATION_FAIL_ALLOCATION_LIFECYCLE_RETRY = 2;
13
13
  ADMIN_AUDIT_OPERATION_CLEAR_ALLOCATION_LIFECYCLE_RETRY = 3;
14
- ADMIN_AUDIT_OPERATION_RETRY_STORAGE_BINDING = 4;
15
- ADMIN_AUDIT_OPERATION_PURGE_SERVICE = 5;
16
- ADMIN_AUDIT_OPERATION_RETIRE_NODE = 6;
17
- ADMIN_AUDIT_OPERATION_CREATE_PRINCIPAL = 7;
18
- ADMIN_AUDIT_OPERATION_DISABLE_PRINCIPAL = 8;
19
- ADMIN_AUDIT_OPERATION_ADD_CREDENTIAL = 9;
20
- ADMIN_AUDIT_OPERATION_REVOKE_CREDENTIAL = 10;
21
- ADMIN_AUDIT_OPERATION_GRANT_ROLE_BINDING = 11;
22
- ADMIN_AUDIT_OPERATION_REVOKE_ROLE_BINDING = 12;
23
- ADMIN_AUDIT_OPERATION_BOOTSTRAP_ACCESS = 13;
14
+ ADMIN_AUDIT_OPERATION_RETIRE_NODE = 4;
15
+ ADMIN_AUDIT_OPERATION_CREATE_PRINCIPAL = 5;
16
+ ADMIN_AUDIT_OPERATION_DISABLE_PRINCIPAL = 6;
17
+ ADMIN_AUDIT_OPERATION_ADD_CREDENTIAL = 7;
18
+ ADMIN_AUDIT_OPERATION_REVOKE_CREDENTIAL = 8;
19
+ ADMIN_AUDIT_OPERATION_GRANT_ROLE_BINDING = 9;
20
+ ADMIN_AUDIT_OPERATION_REVOKE_ROLE_BINDING = 10;
21
+ ADMIN_AUDIT_OPERATION_BOOTSTRAP_ACCESS = 11;
22
+ ADMIN_AUDIT_OPERATION_ADMIT_NODE = 12;
23
+ ADMIN_AUDIT_OPERATION_REVOKE_NODE = 13;
24
24
  }
25
25
 
26
26
  enum AdminAuditTargetType {
27
27
  ADMIN_AUDIT_TARGET_TYPE_UNSPECIFIED = 0;
28
28
  ADMIN_AUDIT_TARGET_TYPE_ALLOCATION = 1;
29
- ADMIN_AUDIT_TARGET_TYPE_STORAGE_BINDING = 2;
30
- ADMIN_AUDIT_TARGET_TYPE_SERVICE = 3;
31
- ADMIN_AUDIT_TARGET_TYPE_NODE = 4;
32
- ADMIN_AUDIT_TARGET_TYPE_PRINCIPAL = 5;
33
- ADMIN_AUDIT_TARGET_TYPE_CREDENTIAL = 6;
34
- ADMIN_AUDIT_TARGET_TYPE_ROLE_BINDING = 7;
29
+ ADMIN_AUDIT_TARGET_TYPE_NODE = 2;
30
+ ADMIN_AUDIT_TARGET_TYPE_PRINCIPAL = 3;
31
+ ADMIN_AUDIT_TARGET_TYPE_CREDENTIAL = 4;
32
+ ADMIN_AUDIT_TARGET_TYPE_ROLE_BINDING = 5;
35
33
  }
36
34
 
37
35
  message AdminAuditEvent {
@@ -6,12 +6,12 @@ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/admin/v1;a
6
6
 
7
7
  import "google/protobuf/timestamp.proto";
8
8
  import "axern/control/capability/v1/capability.proto";
9
- import "axern/control/node/v1/node_control.proto";
10
9
 
11
10
  enum AdminNodeLifecycleStatus {
12
11
  ADMIN_NODE_LIFECYCLE_STATUS_UNSPECIFIED = 0;
13
12
  ADMIN_NODE_LIFECYCLE_STATUS_ACTIVE = 1;
14
- ADMIN_NODE_LIFECYCLE_STATUS_RETIRED = 2;
13
+ ADMIN_NODE_LIFECYCLE_STATUS_REVOKED = 2;
14
+ ADMIN_NODE_LIFECYCLE_STATUS_RETIRED = 3;
15
15
  }
16
16
 
17
17
  message AdminNode {
@@ -22,8 +22,8 @@ message AdminNode {
22
22
  bool axnoded_ready = 5;
23
23
  int64 heartbeat_age_seconds = 6;
24
24
  int64 summary_age_seconds = 7;
25
- google.protobuf.Timestamp registered_at = 8;
26
- google.protobuf.Timestamp updated_at = 9;
25
+ google.protobuf.Timestamp admitted_at = 8;
26
+ google.protobuf.Timestamp last_heartbeat_at = 9;
27
27
  google.protobuf.Timestamp retired_at = 10;
28
28
  string retired_reason = 11;
29
29
  }
@@ -36,67 +36,40 @@ message ListAdminNodesResponse {
36
36
  repeated AdminNode nodes = 1;
37
37
  }
38
38
 
39
- message RetireAdminNodeRequest {
39
+ message AdmitAdminNodeRequest {
40
40
  string node_id = 1;
41
- string operator_reason = 2;
41
+ string enrollment_token = 2;
42
+ string operator_reason = 3;
42
43
  }
43
44
 
44
- message RetireAdminNodeResponse {
45
+ message AdmitAdminNodeResponse {
45
46
  AdminNode node = 1;
46
47
  }
47
48
 
48
- message GetNodeCapabilitySnapshotRequest {
49
+ message RevokeAdminNodeRequest {
49
50
  string node_id = 1;
51
+ string operator_reason = 2;
50
52
  }
51
53
 
52
- message GetNodeCapabilitySnapshotResponse {
53
- axern.control.capability.v1.CapabilitySnapshot snapshot = 1;
54
- }
55
-
56
- message AdminCapabilityTransition {
57
- string transition_id = 1;
58
- string node_id = 2;
59
- string snapshot_id = 3;
60
- int64 snapshot_sequence = 4;
61
- axern.control.capability.v1.CapabilityKey key = 5;
62
- axern.control.capability.v1.CapabilityState old_state = 6;
63
- axern.control.capability.v1.CapabilityState new_state = 7;
64
- axern.control.capability.v1.CapabilityEvidence old_evidence = 8;
65
- axern.control.capability.v1.CapabilityEvidence new_evidence = 9;
66
- axern.control.capability.v1.CapabilityReasonCode old_reason_code = 10;
67
- axern.control.capability.v1.CapabilityReasonCode new_reason_code = 11;
68
- string reason = 12;
69
- google.protobuf.Timestamp observed_at = 13;
70
- google.protobuf.Timestamp reported_at = 14;
54
+ message RevokeAdminNodeResponse {
55
+ AdminNode node = 1;
71
56
  }
72
57
 
73
- message ListNodeCapabilityTransitionsRequest {
58
+ message RetireAdminNodeRequest {
74
59
  string node_id = 1;
75
- int32 limit = 2;
76
- }
77
-
78
- message ListNodeCapabilityTransitionsResponse {
79
- repeated AdminCapabilityTransition transitions = 1;
60
+ string operator_reason = 2;
80
61
  }
81
62
 
82
- message AdminCapabilityReconcileItem {
83
- string allocation_id = 1;
84
- string node_id = 2;
85
- repeated axern.control.capability.v1.CapabilityDependency pending_dependencies = 3;
86
- int32 attempts = 4;
87
- google.protobuf.Timestamp next_run_at = 5;
88
- google.protobuf.Timestamp lease_expires_at = 6;
89
- string last_error = 7;
90
- google.protobuf.Timestamp updated_at = 8;
63
+ message RetireAdminNodeResponse {
64
+ AdminNode node = 1;
91
65
  }
92
66
 
93
- message ListCapabilityReconcileQueueRequest {
67
+ message GetNodeCapabilitySnapshotRequest {
94
68
  string node_id = 1;
95
- int32 limit = 2;
96
69
  }
97
70
 
98
- message ListCapabilityReconcileQueueResponse {
99
- repeated AdminCapabilityReconcileItem items = 1;
71
+ message GetNodeCapabilitySnapshotResponse {
72
+ axern.control.capability.v1.CapabilitySnapshot snapshot = 1;
100
73
  }
101
74
 
102
75
  message GetAllocationCapabilityDiagnosticsRequest {
@@ -106,32 +79,15 @@ message GetAllocationCapabilityDiagnosticsRequest {
106
79
  message GetAllocationCapabilityDiagnosticsResponse {
107
80
  string allocation_id = 1;
108
81
  string node_id = 2;
109
- repeated axern.control.capability.v1.CapabilityDependency required_dependencies = 3;
110
- repeated axern.control.capability.v1.CapabilityDependency admitted_dependencies = 4;
111
- axern.control.capability.v1.CapabilityConditionSet condition_set = 5;
112
- AdminCapabilityReconcileItem reconcile = 6;
113
- int64 allocation_attempt = 7;
114
- bool create_admission_recorded = 8;
115
- string create_dependency_set_digest = 9;
116
- google.protobuf.Timestamp create_admitted_at = 10;
117
- AllocationMemoryAdmissionEvidence memory_admission = 11;
118
- axern.control.node.v1.AllocationMemoryObservation latest_memory_observation = 12;
119
- }
120
-
121
- message AllocationMemoryAdmissionEvidence {
122
- int64 sandbox_memory_request_bytes = 1;
123
- int64 sandbox_memory_limit_bytes = 2;
124
- axern.control.node.v1.NodeMemoryBudget node_memory_budget = 3;
125
- google.protobuf.Timestamp summary_collected_at = 4;
126
- int64 node_local_commitment_bytes = 5;
127
- google.protobuf.Timestamp admitted_at = 6;
82
+ repeated axern.control.capability.v1.CapabilityRequirement requirements = 3;
83
+ axern.control.capability.v1.CapabilityConditionSet condition_set = 4;
128
84
  }
129
85
 
130
86
  service NodeAdmin {
87
+ rpc AdmitAdminNode(AdmitAdminNodeRequest) returns (AdmitAdminNodeResponse) {}
131
88
  rpc ListAdminNodes(ListAdminNodesRequest) returns (ListAdminNodesResponse) {}
89
+ rpc RevokeAdminNode(RevokeAdminNodeRequest) returns (RevokeAdminNodeResponse) {}
132
90
  rpc RetireAdminNode(RetireAdminNodeRequest) returns (RetireAdminNodeResponse) {}
133
91
  rpc GetNodeCapabilitySnapshot(GetNodeCapabilitySnapshotRequest) returns (GetNodeCapabilitySnapshotResponse) {}
134
- rpc ListNodeCapabilityTransitions(ListNodeCapabilityTransitionsRequest) returns (ListNodeCapabilityTransitionsResponse) {}
135
- rpc ListCapabilityReconcileQueue(ListCapabilityReconcileQueueRequest) returns (ListCapabilityReconcileQueueResponse) {}
136
92
  rpc GetAllocationCapabilityDiagnostics(GetAllocationCapabilityDiagnosticsRequest) returns (GetAllocationCapabilityDiagnosticsResponse) {}
137
93
  }
@@ -26,45 +26,8 @@ enum ConsistencyIssueSeverity {
26
26
 
27
27
  enum ConsistencyIssueCode {
28
28
  CONSISTENCY_ISSUE_CODE_UNSPECIFIED = 0;
29
- CONSISTENCY_ISSUE_CODE_ACTIVE_RESERVATION_MISSING_ALLOCATION = 1;
30
- CONSISTENCY_ISSUE_CODE_ACTIVE_RESERVATION_ON_ENDED_ALLOCATION = 2;
31
- CONSISTENCY_ISSUE_CODE_ACTIVE_RESERVATION_ALLOCATION_MISMATCH = 3;
32
- CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_MISSING_ALLOCATION = 4;
33
- CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_ON_ENDED_ALLOCATION = 5;
34
- CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_ALLOCATION_NODE_MISMATCH = 6;
35
- CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_MISSING_ALLOCATION = 7;
36
- CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ON_ENDED_ALLOCATION = 8;
37
- CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ALLOCATION_NODE_MISMATCH = 9;
38
- CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_MISSING_ALLOCATION = 10;
39
- CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_ENDED_ALLOCATION = 11;
40
- CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_OWNER_MISMATCH = 12;
41
- }
42
-
43
- enum ConsistencyRepairOwner {
44
- CONSISTENCY_REPAIR_OWNER_UNSPECIFIED = 0;
45
- CONSISTENCY_REPAIR_OWNER_WORKLOAD_CONTROLLER = 1;
46
- CONSISTENCY_REPAIR_OWNER_NODE_LIFECYCLE = 2;
47
- CONSISTENCY_REPAIR_OWNER_TUNNEL_CONTROLLER = 3;
48
- CONSISTENCY_REPAIR_OWNER_SERVICE_CONTROLLER = 4;
49
- CONSISTENCY_REPAIR_OWNER_ADMIN_OPERATOR_TRIAGE = 5;
50
- }
51
-
52
- enum ConsistencyRepairAction {
53
- CONSISTENCY_REPAIR_ACTION_UNSPECIFIED = 0;
54
- CONSISTENCY_REPAIR_ACTION_WORKLOAD_CLEANUP = 1;
55
- CONSISTENCY_REPAIR_ACTION_WORKLOAD_CLEANUP_AND_READMIT = 2;
56
- CONSISTENCY_REPAIR_ACTION_NODE_LIFECYCLE_RECONCILE = 3;
57
- CONSISTENCY_REPAIR_ACTION_TUNNEL_LIFECYCLE_RECONCILE = 4;
58
- CONSISTENCY_REPAIR_ACTION_SERVICE_RECONCILE = 5;
59
- CONSISTENCY_REPAIR_ACTION_ADMIN_TRIAGE = 6;
60
- }
61
-
62
- enum ConsistencyRepairTargetType {
63
- CONSISTENCY_REPAIR_TARGET_TYPE_UNSPECIFIED = 0;
64
- CONSISTENCY_REPAIR_TARGET_TYPE_ALLOCATION = 1;
65
- CONSISTENCY_REPAIR_TARGET_TYPE_RUN = 2;
66
- CONSISTENCY_REPAIR_TARGET_TYPE_SERVICE = 3;
67
- CONSISTENCY_REPAIR_TARGET_TYPE_TUNNEL_SESSION = 4;
29
+ CONSISTENCY_ISSUE_CODE_ACTIVE_ACCESS_GRANT_ON_ENDED_ALLOCATION = 1;
30
+ CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ON_ENDED_ALLOCATION = 2;
68
31
  }
69
32
 
70
33
  enum AdminReliabilitySignalCode {
@@ -72,14 +35,12 @@ enum AdminReliabilitySignalCode {
72
35
  ADMIN_RELIABILITY_SIGNAL_CODE_CONSISTENCY_ISSUES = 1;
73
36
  ADMIN_RELIABILITY_SIGNAL_CODE_ALLOCATION_LIFECYCLE_RETRIES = 2;
74
37
  ADMIN_RELIABILITY_SIGNAL_CODE_RECONCILE_FAILURES = 3;
75
- ADMIN_RELIABILITY_SIGNAL_CODE_STORAGE_BINDINGS = 4;
76
- ADMIN_RELIABILITY_SIGNAL_CODE_NODE_VOLUME_MANAGERS = 5;
77
- ADMIN_RELIABILITY_SIGNAL_CODE_NODE_FLEET = 6;
38
+ ADMIN_RELIABILITY_SIGNAL_CODE_NODE_FLEET = 4;
78
39
  }
79
40
 
80
41
  message ConsistencyCounts {
81
- int64 active_reservations = 1;
82
- int64 active_leases = 2;
42
+ int64 active_allocations = 1;
43
+ int64 active_access_grants = 2;
83
44
  int64 active_tunnels = 3;
84
45
  int64 allocation_lifecycle_retries = 4;
85
46
  int64 issues = 5;
@@ -89,16 +50,10 @@ message ConsistencyIssue {
89
50
  ConsistencyIssueCode code = 1;
90
51
  ConsistencyIssueSeverity severity = 2;
91
52
  string allocation_id = 3;
92
- string owner_type = 4;
93
- string owner_id = 5;
94
- string node_id = 6;
95
- string status = 7;
96
- string detail = 8;
97
- ConsistencyRepairOwner repair_owner = 9;
98
- ConsistencyRepairAction repair_action = 10;
99
- bool automatic_repair = 11;
100
- ConsistencyRepairTargetType repair_target_type = 12;
101
- string repair_target_id = 13;
53
+ string run_id = 4;
54
+ string node_id = 5;
55
+ string status = 6;
56
+ string detail = 7;
102
57
  }
103
58
 
104
59
  message ConsistencySnapshot {
@@ -120,10 +75,8 @@ message AdminReliabilityHealth {
120
75
  int64 due_allocation_lifecycle_retries = 4;
121
76
  int64 reconcile_unhealthy_components = 5;
122
77
  repeated AdminReliabilitySignal signals = 6;
123
- AdminNodeVolumeHealth node_volume_health = 7;
124
- AdminStorageBindingHealth storage_binding_health = 8;
125
- repeated ReconcileComponentHealth reconcile_components = 9;
126
- AdminNodeFleetHealth node_fleet_health = 10;
78
+ repeated ReconcileComponentHealth reconcile_components = 7;
79
+ AdminNodeFleetHealth node_fleet_health = 8;
127
80
  }
128
81
 
129
82
  message ReconcileComponentHealth {
@@ -148,14 +101,6 @@ message GetAdminReliabilityHealthResponse {
148
101
  AdminReliabilityHealth health = 1;
149
102
  }
150
103
 
151
- message AdminNodeVolumeHealth {
152
- int64 unhealthy_nodes = 1;
153
- int64 published_volumes = 2;
154
- int64 last_reconcile_stale_allocations = 3;
155
- int64 last_reconcile_invalid_volumes = 4;
156
- string error = 5;
157
- }
158
-
159
104
  message AdminNodeFleetHealth {
160
105
  int64 active_nodes = 1;
161
106
  int64 ready_nodes = 2;
@@ -166,18 +111,6 @@ message AdminNodeFleetHealth {
166
111
  string error = 7;
167
112
  }
168
113
 
169
- message AdminStorageBindingHealth {
170
- bool unavailable = 1;
171
- string error = 2;
172
- int64 failed_bindings = 3;
173
- int64 releasing_bindings = 4;
174
- int64 stuck_releasing_bindings = 5;
175
- int64 inconsistent_claims = 6;
176
- int64 invalid_bindings = 7;
177
- int64 deleting_claims = 8;
178
- int64 stuck_deleting_claims = 9;
179
- }
180
-
181
114
  service AdminReliability {
182
115
  rpc CheckConsistency(CheckConsistencyRequest) returns (CheckConsistencyResponse) {}
183
116
  rpc GetAdminReliabilityHealth(GetAdminReliabilityHealthRequest) returns (GetAdminReliabilityHealthResponse) {}
@@ -11,28 +11,22 @@ import "google/protobuf/timestamp.proto";
11
11
  // claims; only the owning observed-capability provider may publish them.
12
12
  enum PlatformCapability {
13
13
  PLATFORM_CAPABILITY_UNSPECIFIED = 0;
14
- PLATFORM_CAPABILITY_PORT_FORWARDING = 1;
15
- PLATFORM_CAPABILITY_NETWORK_BRIDGE = 2;
16
- PLATFORM_CAPABILITY_NETWORK_BPFNET = 3;
17
- PLATFORM_CAPABILITY_CGROUP_V2_MEMORY_CONTROLLER = 4;
18
- PLATFORM_CAPABILITY_RUNC_MEMORY_HARD_LIMIT = 5;
19
- PLATFORM_CAPABILITY_RUNSC_MEMORY_HARD_LIMIT = 6;
20
- PLATFORM_CAPABILITY_FILESTORE_OVERLAYFS_UPPER = 7;
21
- PLATFORM_CAPABILITY_XFS_PROJECT_QUOTA = 8;
22
- PLATFORM_CAPABILITY_RUNC_EPHEMERAL_STORAGE_HARD_LIMIT = 9;
23
- PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_STORAGE_HARD_LIMIT = 10;
24
- PLATFORM_CAPABILITY_ROOTFS_LOWER_EROFS = 11;
25
- // Provider facts consumed by the catalog's derived workload capabilities.
14
+ PLATFORM_CAPABILITY_NETWORK_BRIDGE = 1;
15
+ PLATFORM_CAPABILITY_NETWORK_BPFNET = 2;
16
+ PLATFORM_CAPABILITY_CGROUP_V2_MEMORY_CONTROLLER = 3;
17
+ PLATFORM_CAPABILITY_RUNSC_MEMORY_HARD_LIMIT = 4;
18
+ PLATFORM_CAPABILITY_FILESTORE_OVERLAYFS_UPPER = 5;
19
+ PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_STORAGE_HARD_LIMIT = 6;
20
+ PLATFORM_CAPABILITY_ROOTFS_LOWER_EROFS = 7;
21
+ // Provider facts consumed by derived workload capability definitions.
26
22
  // They are not valid workload requirements on their own.
27
- PLATFORM_CAPABILITY_RUNC_MEMORY_ENFORCEMENT_SELF_TEST = 12;
28
- PLATFORM_CAPABILITY_RUNSC_MEMORY_ENFORCEMENT_SELF_TEST = 13;
29
- PLATFORM_CAPABILITY_RUNC_EPHEMERAL_ENFORCEMENT_SELF_TEST = 14;
30
- PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_ENFORCEMENT_SELF_TEST = 15;
31
- PLATFORM_CAPABILITY_EGRESSD_DNS_POLICY_SELF_TEST = 16;
32
- PLATFORM_CAPABILITY_EGRESSD_STRICT_EGRESS_SELF_TEST = 17;
23
+ PLATFORM_CAPABILITY_RUNSC_MEMORY_ENFORCEMENT_SELF_TEST = 8;
24
+ PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_ENFORCEMENT_SELF_TEST = 9;
25
+ PLATFORM_CAPABILITY_EGRESSD_DNS_POLICY_SELF_TEST = 10;
26
+ PLATFORM_CAPABILITY_EGRESSD_STRICT_EGRESS_SELF_TEST = 11;
33
27
  // Workload-facing capabilities derived from the egressd self-test facts.
34
- PLATFORM_CAPABILITY_DNS_POLICY_ENFORCEMENT = 18;
35
- PLATFORM_CAPABILITY_STRICT_EGRESS_ENFORCEMENT = 19;
28
+ PLATFORM_CAPABILITY_DNS_POLICY_ENFORCEMENT = 12;
29
+ PLATFORM_CAPABILITY_STRICT_EGRESS_ENFORCEMENT = 13;
36
30
  }
37
31
 
38
32
  message ExtensionCapability {
@@ -63,10 +57,9 @@ enum CapabilityProvider {
63
57
  CAPABILITY_PROVIDER_CONFIG = 1;
64
58
  CAPABILITY_PROVIDER_HOST_CGROUP = 2;
65
59
  CAPABILITY_PROVIDER_FILESTORE = 3;
66
- CAPABILITY_PROVIDER_RUNC_SELF_TEST = 4;
67
- CAPABILITY_PROVIDER_RUNSC_SELF_TEST = 5;
68
- CAPABILITY_PROVIDER_NETWORK_HEALTH = 6;
69
- CAPABILITY_PROVIDER_DERIVED = 7;
60
+ CAPABILITY_PROVIDER_RUNSC_SELF_TEST = 4;
61
+ CAPABILITY_PROVIDER_NETWORK_HEALTH = 5;
62
+ CAPABILITY_PROVIDER_DERIVED = 6;
70
63
  }
71
64
 
72
65
  enum CapabilityReasonCode {
@@ -82,10 +75,6 @@ enum CapabilityReasonCode {
82
75
  CAPABILITY_REASON_CODE_ENFORCEMENT_LOST = 9;
83
76
  }
84
77
 
85
- message ConfigEvidenceIdentity {
86
- string config_digest = 1;
87
- }
88
-
89
78
  message BootEvidenceIdentity {
90
79
  string boot_id = 1;
91
80
  }
@@ -97,72 +86,35 @@ message MountEvidenceIdentity {
97
86
 
98
87
  message RuntimeEvidenceIdentity {
99
88
  string boot_id = 1;
100
- string runtime_name = 2;
101
- string runtime_binary_digest = 3;
102
- string runtime_config_digest = 4;
103
- }
104
-
105
- message DerivedEvidenceIdentity {
106
- string catalog_digest = 1;
107
- // Canonical digest of the typed evidence identities for every catalog
108
- // dependency. This makes the derived subject change when its mount,
109
- // runtime, boot, or config subjects change without treating a normal TTL
110
- // refresh as a new identity.
111
- string dependency_evidence_digest = 2;
89
+ string runtime_binary_digest = 2;
90
+ string runtime_config_digest = 3;
112
91
  }
113
92
 
114
- // CapabilityEvidence identifies the concrete subject that was probed. Its
115
- // identity is orthogonal to observation freshness: a mount or runtime proof
116
- // may still require valid_until even though its subject identity is stable.
93
+ // CapabilityEvidence identifies the concrete host subject that was inspected.
94
+ // It is descriptive evidence, not an identity, version, or cryptographic
95
+ // proof. Derived and configuration capabilities need no additional evidence.
117
96
  message CapabilityEvidence {
118
- string evidence_id = 1;
119
97
  oneof identity {
120
- ConfigEvidenceIdentity config = 2;
121
- BootEvidenceIdentity boot = 3;
122
- MountEvidenceIdentity mount = 4;
123
- RuntimeEvidenceIdentity runtime = 5;
124
- DerivedEvidenceIdentity derived = 6;
98
+ BootEvidenceIdentity boot = 1;
99
+ MountEvidenceIdentity mount = 2;
100
+ RuntimeEvidenceIdentity runtime = 3;
125
101
  }
126
102
  }
127
103
 
128
- // CapabilityObservationProof is the durable, non-recursive proof selected
129
- // from a snapshot. Dependencies are represented as one bounded flat proof set
130
- // so persistence and validation remain bounded.
131
- message CapabilityObservationProof {
104
+ message CapabilityObservation {
132
105
  CapabilityKey key = 1;
133
- string observation_id = 2;
106
+ CapabilityState state = 2;
134
107
  CapabilityProvider provider = 3;
135
108
  google.protobuf.Timestamp observed_at = 4;
136
109
  google.protobuf.Timestamp valid_until = 5;
137
110
  CapabilityEvidence evidence = 6;
138
- }
139
-
140
- message CapabilityObservation {
141
- CapabilityKey key = 1;
142
- CapabilityState state = 2;
143
- CapabilityProvider provider = 3;
144
- string observation_id = 4;
145
- google.protobuf.Timestamp observed_at = 5;
146
- google.protobuf.Timestamp valid_until = 6;
147
- CapabilityEvidence evidence = 7;
148
- repeated CapabilityObservationProof dependencies = 8;
149
- CapabilityReasonCode reason_code = 9;
150
- string reason = 10;
111
+ CapabilityReasonCode reason_code = 7;
112
+ string reason = 8;
151
113
  }
152
114
 
153
115
  message CapabilitySnapshot {
154
- string node_instance_id = 1;
155
- int64 sequence = 2;
156
- string snapshot_id = 3;
157
- google.protobuf.Timestamp collected_at = 4;
158
- repeated CapabilityObservation observations = 5;
159
- }
160
-
161
- message CapabilitySnapshotReference {
162
- string node_instance_id = 1;
163
- int64 sequence = 2;
164
- string snapshot_id = 3;
165
- google.protobuf.Timestamp collected_at = 4;
116
+ google.protobuf.Timestamp collected_at = 1;
117
+ repeated CapabilityObservation observations = 2;
166
118
  }
167
119
 
168
120
  message ExtensionCapabilityRequirement {
@@ -176,18 +128,9 @@ enum CapabilityLossPolicy {
176
128
  CAPABILITY_LOSS_POLICY_FAIL_STOP = 3;
177
129
  }
178
130
 
179
- message CapabilityDependency {
131
+ message CapabilityRequirement {
180
132
  CapabilityKey key = 1;
181
133
  CapabilityLossPolicy loss_policy = 2;
182
- CapabilitySnapshotReference selected_snapshot = 3;
183
- CapabilityObservationProof selected_observation = 4;
184
- repeated CapabilityObservationProof dependency_observations = 5;
185
- }
186
-
187
- // CapabilityDependencySet is the durable representation stored with an
188
- // allocation. A wrapper keeps JSON persistence on the canonical proto shape.
189
- message CapabilityDependencySet {
190
- repeated CapabilityDependency dependencies = 1;
191
134
  }
192
135
 
193
136
  enum CapabilityConditionState {
@@ -203,12 +146,9 @@ message CapabilityCondition {
203
146
  CapabilityConditionState state = 2;
204
147
  CapabilityReasonCode reason_code = 3;
205
148
  string message = 4;
206
- google.protobuf.Timestamp observed_at = 5;
207
- CapabilityObservationProof proof = 6;
208
149
  }
209
150
 
210
151
  message CapabilityConditionSet {
211
- int64 revision = 1;
212
- google.protobuf.Timestamp observed_at = 2;
213
- repeated CapabilityCondition conditions = 3;
152
+ google.protobuf.Timestamp observed_at = 1;
153
+ repeated CapabilityCondition conditions = 2;
214
154
  }