@xfey/tutti 0.1.119 → 0.1.120

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 (110) hide show
  1. package/dist/approvals/decision-command.d.ts +2 -2
  2. package/dist/collaboration-state/clarification-snapshot.d.ts +9 -9
  3. package/dist/collaboration-state/task-compile-context.d.ts +1 -1
  4. package/dist/control-plane/workflows/openai.d.ts +3 -4
  5. package/dist/control-plane/workflows/openai.js +3 -2
  6. package/dist/providers/openai/app-server/invocation-coordinator.d.ts +1 -0
  7. package/dist/providers/openai/app-server/invocation-coordinator.js +4 -1
  8. package/dist/providers/openai/app-server/invocation-deadline.d.ts +3 -0
  9. package/dist/providers/openai/app-server/invocation-deadline.js +15 -0
  10. package/dist/providers/openai/app-server/read-only-procedure.d.ts +4 -2
  11. package/dist/providers/openai/app-server/read-only-procedure.js +16 -0
  12. package/dist/providers/openai/app-server/workspace-write-run.d.ts +4 -2
  13. package/dist/providers/openai/app-server/workspace-write-run.js +16 -0
  14. package/dist/providers/openai/chat-assistant.d.ts +3 -4
  15. package/dist/providers/openai/chat-assistant.js +2 -1
  16. package/dist/providers/openai/execution-access.d.ts +17 -0
  17. package/dist/providers/openai/execution-access.js +13 -0
  18. package/dist/providers/openai/sdk-procedure-runner.d.ts +2 -2
  19. package/dist/providers/openai/sdk-procedure-runner.js +17 -0
  20. package/dist/run-pipeline/artifact-applicability.d.ts +3 -4
  21. package/dist/run-pipeline/artifact-applicability.js +2 -1
  22. package/dist/run-pipeline/openai.d.ts +3 -4
  23. package/dist/run-pipeline/openai.js +3 -2
  24. package/dist/run-pipeline/task-run-invocation.js +6 -12
  25. package/dist/server-shell/cli/cli.js +3 -0
  26. package/dist/server-shell/cli/host-lifecycle.js +1 -0
  27. package/dist/server-shell/cli/host-server-runtime.d.ts +1 -0
  28. package/dist/server-shell/cli/host-server-runtime.js +83 -34
  29. package/dist/server-shell/cli/launch-command.js +1 -1
  30. package/dist/server-shell/cli/launch.d.ts +7 -3
  31. package/dist/server-shell/cli/launch.js +23 -4
  32. package/dist/server-shell/cli/machine-local.d.ts +9 -0
  33. package/dist/server-shell/cli/machine-local.js +60 -6
  34. package/dist/server-shell/cli/project-resolver.d.ts +2 -2
  35. package/dist/server-shell/cli/project-resolver.js +6 -3
  36. package/dist/server-shell/cli/relay-registration.js +38 -1
  37. package/dist/server-shell/http/routes/local-control.d.ts +1 -1
  38. package/dist/server-shell/http/routes/local-control.js +2 -46
  39. package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.d.ts +47 -137
  40. package/dist/server-shell/http/routes/project-api/openapi.d.ts +47 -137
  41. package/dist/server-shell/http/routes/project-api/schemas.d.ts +25 -136
  42. package/dist/server-shell/http/routes/project-api/schemas.js +4 -58
  43. package/dist/server-shell/http/routes/project-api/types.d.ts +4 -0
  44. package/dist/server-shell/local-console/managed-project-routes.d.ts +9 -0
  45. package/dist/server-shell/local-console/managed-project-routes.js +120 -0
  46. package/dist/server-shell/local-console/managed-project-service.d.ts +151 -0
  47. package/dist/server-shell/local-console/managed-project-service.js +163 -0
  48. package/dist/server-shell/local-console/operation-coordinator.d.ts +1 -1
  49. package/dist/server-shell/local-console/package-update-hosts.js +2 -1
  50. package/dist/server-shell/local-console/project-service.d.ts +5 -1
  51. package/dist/server-shell/local-console/project-service.js +63 -14
  52. package/dist/server-shell/local-console/server.js +22 -2
  53. package/dist/server-shell/managed-access/execution-binding.d.ts +9 -0
  54. package/dist/server-shell/managed-access/execution-binding.js +22 -0
  55. package/dist/server-shell/managed-access/existing-project.d.ts +15 -0
  56. package/dist/server-shell/managed-access/existing-project.js +41 -0
  57. package/dist/server-shell/managed-access/model-control-client.d.ts +66 -0
  58. package/dist/server-shell/managed-access/model-control-client.js +114 -0
  59. package/dist/server-shell/managed-access/private-store.d.ts +19 -0
  60. package/dist/server-shell/managed-access/private-store.js +275 -0
  61. package/dist/server-shell/managed-access/project-provider.d.ts +18 -0
  62. package/dist/server-shell/managed-access/project-provider.js +30 -0
  63. package/dist/server-shell/managed-access/records.d.ts +108 -0
  64. package/dist/server-shell/managed-access/records.js +73 -0
  65. package/dist/server-shell/managed-access/runners.d.ts +11 -0
  66. package/dist/server-shell/managed-access/runners.js +103 -0
  67. package/dist/server-shell/managed-access/runtime-records.d.ts +110 -0
  68. package/dist/server-shell/managed-access/runtime-records.js +65 -0
  69. package/dist/server-shell/managed-access/runtime.d.ts +48 -0
  70. package/dist/server-shell/managed-access/runtime.js +301 -0
  71. package/dist/server-shell/managed-access/state.d.ts +54 -0
  72. package/dist/server-shell/managed-access/state.js +287 -0
  73. package/dist/server-shell/managed-access/transport.d.ts +48 -0
  74. package/dist/server-shell/managed-access/transport.js +38 -0
  75. package/dist/server-shell/managed-access/workspace.d.ts +10 -0
  76. package/dist/server-shell/managed-access/workspace.js +69 -0
  77. package/dist/server-shell/smoke/e2e-client.d.ts +8 -3
  78. package/dist/server-shell/smoke/e2e-client.js +11 -11
  79. package/node_modules/@tutti/relay-client/dist/host-control.d.ts +4 -1
  80. package/node_modules/@tutti/relay-client/dist/host-control.js +26 -3
  81. package/node_modules/@tutti/relay-client/dist/index.d.ts +1 -0
  82. package/node_modules/@tutti/relay-client/dist/index.js +1 -0
  83. package/node_modules/@tutti/relay-client/dist/project-authority.d.ts +75 -0
  84. package/node_modules/@tutti/relay-client/dist/project-authority.js +140 -0
  85. package/node_modules/@tutti/shared/dist/ids/index.d.ts +7 -0
  86. package/node_modules/@tutti/shared/dist/ids/index.js +7 -0
  87. package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +1 -0
  88. package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -0
  89. package/node_modules/@tutti/shared/dist/schemas/api/managed-account.d.ts +35 -0
  90. package/node_modules/@tutti/shared/dist/schemas/api/managed-account.js +41 -0
  91. package/node_modules/@tutti/shared/dist/schemas/api/provider-config.d.ts +8 -4
  92. package/node_modules/@tutti/shared/dist/schemas/api/provider-config.js +6 -0
  93. package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.d.ts +4 -0
  94. package/node_modules/@tutti/shared/dist/schemas/internal/creation-validation.d.ts +28 -0
  95. package/node_modules/@tutti/shared/dist/schemas/internal/creation-validation.js +42 -0
  96. package/node_modules/@tutti/shared/dist/schemas/internal/index.d.ts +5 -0
  97. package/node_modules/@tutti/shared/dist/schemas/internal/index.js +5 -0
  98. package/node_modules/@tutti/shared/dist/schemas/internal/managed-account.d.ts +12 -0
  99. package/node_modules/@tutti/shared/dist/schemas/internal/managed-account.js +13 -0
  100. package/node_modules/@tutti/shared/dist/schemas/internal/managed-models.d.ts +17 -0
  101. package/node_modules/@tutti/shared/dist/schemas/internal/managed-models.js +17 -0
  102. package/node_modules/@tutti/shared/dist/schemas/internal/managed-runtime.d.ts +116 -0
  103. package/node_modules/@tutti/shared/dist/schemas/internal/managed-runtime.js +87 -0
  104. package/node_modules/@tutti/shared/dist/schemas/internal/project-authority.d.ts +120 -0
  105. package/node_modules/@tutti/shared/dist/schemas/internal/project-authority.js +110 -0
  106. package/package.json +1 -1
  107. package/web/assets/{homepage-motion-scene-B6lCCHBq.js → homepage-motion-scene-DyMFsYmT.js} +1 -1
  108. package/web/assets/index-DSlecDXC.js +70 -0
  109. package/web/index.html +1 -1
  110. package/web/assets/index-DepsYMLl.js +0 -70
@@ -1,5 +1,5 @@
1
1
  import { createIdempotencyKey, } from "@tutti/shared/ids";
2
- import { isPlatformOutboundHandoffResponse, } from "@tutti/shared/schemas/internal";
2
+ import { isPlatformOutboundHandoffResponse, isHostDelegationProjection, isManagedProjectBootstrap, } from "@tutti/shared/schemas/internal";
3
3
  export class RelayHostControlClientError extends Error {
4
4
  code;
5
5
  retryable;
@@ -91,6 +91,12 @@ function createRegisterPayload(options) {
91
91
  account_handoff_token: options.accountHandoffToken,
92
92
  };
93
93
  }
94
+ if (options.managedBootstrap !== undefined) {
95
+ if (options.accountHandoffToken !== undefined ||
96
+ !isManagedProjectBootstrap(options.managedBootstrap))
97
+ throw new RelayHostControlClientError("relay_registration_failed", "Managed Host authority input is invalid", false);
98
+ payload.managed_bootstrap = options.managedBootstrap;
99
+ }
94
100
  return payload;
95
101
  }
96
102
  function createRefreshJoinTokenPayload(options) {
@@ -199,6 +205,10 @@ function assertRegistrationResponse(value) {
199
205
  throw new RelayHostControlClientError("relay_registration_failed", "Relay host registration response is invalid", false);
200
206
  }
201
207
  const dispositionKind = stringField(value.disposition, "kind");
208
+ if (isRecord(value.result) &&
209
+ value.result.managed_authority !== undefined &&
210
+ !isHostDelegationProjection(value.result.managed_authority))
211
+ throw new RelayHostControlClientError("relay_registration_failed", "Managed Host authority response is invalid", false);
202
212
  if (dispositionKind !== "registered" && dispositionKind !== "interrupted") {
203
213
  throw new RelayHostControlClientError("relay_registration_failed", "Relay host registration disposition is invalid", false);
204
214
  }
@@ -249,6 +259,7 @@ export async function registerRelayHostConnection(options) {
249
259
  const fetchImpl = options.fetch ?? fetch;
250
260
  const commandId = options.commandId ?? createIdempotencyKey();
251
261
  const issuedAt = options.issuedAt ?? new Date();
262
+ const payload = createRegisterPayload(options);
252
263
  const response = await (async () => {
253
264
  try {
254
265
  return await fetchWithTimeout(fetchImpl, registrationUrl(options.relayUrl), {
@@ -260,7 +271,7 @@ export async function registerRelayHostConnection(options) {
260
271
  body: JSON.stringify({
261
272
  command_id: commandId,
262
273
  issued_at: issuedAt.toISOString(),
263
- payload: createRegisterPayload(options),
274
+ payload,
264
275
  }),
265
276
  }, options.timeoutMs ?? DEFAULT_TIMEOUT_MS, options.signal);
266
277
  }
@@ -278,7 +289,19 @@ export async function registerRelayHostConnection(options) {
278
289
  }
279
290
  throw new RelayHostControlClientError(response.status >= 500 ? "relay_unavailable" : "relay_registration_failed", `Relay host registration failed with HTTP ${response.status}`, response.status >= 500, response.status, relayErrorCode);
280
291
  }
281
- return assertRegistrationResponse(await response.json());
292
+ const result = assertRegistrationResponse(await response.json());
293
+ if (options.managedBootstrap !== undefined &&
294
+ result.result !== undefined &&
295
+ result.result.managed_authority === undefined)
296
+ throw new RelayHostControlClientError("relay_registration_failed", "Relay does not support managed Host authority", false);
297
+ if (options.managedBootstrap !== undefined &&
298
+ result.result?.managed_authority !== undefined &&
299
+ (result.result.managed_authority.installation_ref !==
300
+ options.managedBootstrap.installation_ref ||
301
+ result.result.managed_authority.relay_project_ref !==
302
+ result.result.relay_project?.relay_project_ref))
303
+ throw new RelayHostControlClientError("relay_registration_failed", "Managed Host authority response does not match registration", false);
304
+ return result;
282
305
  }
283
306
  export async function refreshRelayJoinToken(options) {
284
307
  const fetchImpl = options.fetch ?? fetch;
@@ -1,4 +1,5 @@
1
1
  export * from "./host-control.js";
2
2
  export * from "./tunnel.js";
3
3
  export * from "./external-references.js";
4
+ export * from "./project-authority.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,5 @@
1
1
  export * from "./host-control.js";
2
2
  export * from "./tunnel.js";
3
3
  export * from "./external-references.js";
4
+ export * from "./project-authority.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,75 @@
1
+ import { type HostDelegationStatusBody, type NativeCreationProof } from "@tutti/shared/schemas/internal";
2
+ export declare class NativeAuthorityTransportError extends Error {
3
+ readonly code: string;
4
+ readonly status?: number | undefined;
5
+ readonly requestId?: string | undefined;
6
+ constructor(code: string, status?: number | undefined, requestId?: string | undefined);
7
+ }
8
+ type Transport = {
9
+ relayUrl: string;
10
+ fetchImpl?: typeof fetch;
11
+ signal?: AbortSignal;
12
+ };
13
+ export declare function validateNativeCreationAuthority(options: Transport & {
14
+ body: NativeCreationProof;
15
+ }): Promise<{
16
+ reason_code: "validation_started" | "validation_succeeded" | "validation_route_unavailable" | "validation_http_rejected" | "validation_response_invalid" | "validation_transport_unknown" | "validation_interrupted";
17
+ state: "failed" | "started" | "succeeded" | "unknown";
18
+ installation_ref: string;
19
+ project_id: string;
20
+ tier: "light" | "high" | "max";
21
+ creation_ref: string;
22
+ route_ref: string;
23
+ http_status: number | null;
24
+ }>;
25
+ export declare function readNativeCreationAuthority(options: Transport & {
26
+ body: NativeCreationProof;
27
+ }): Promise<{
28
+ authority?: {
29
+ expires_at: null;
30
+ state: "active";
31
+ relay_project_ref: string;
32
+ installation_ref: string;
33
+ funding_kind: "trial";
34
+ tier: "light" | "high" | "max";
35
+ delegation_ref: string;
36
+ grant_ref: string;
37
+ model_access: "runtime_authority_required" | "not_enabled";
38
+ };
39
+ account_ref: string;
40
+ request_ref: string;
41
+ creation: {
42
+ relay_project_ref?: string;
43
+ expires_at: string;
44
+ state: "expired" | "prepared" | "activated" | "revoked";
45
+ installation_ref: string;
46
+ project_id: string;
47
+ tier: "light" | "high" | "max";
48
+ surface: "standalone" | "feishu";
49
+ creation_ref: string;
50
+ };
51
+ }>;
52
+ export declare function readNativeHostAuthority(options: Transport & {
53
+ body: HostDelegationStatusBody;
54
+ }): Promise<{
55
+ expires_at: null;
56
+ state: "active";
57
+ relay_project_ref: string;
58
+ installation_ref: string;
59
+ funding_kind: "trial";
60
+ tier: "light" | "high" | "max";
61
+ delegation_ref: string;
62
+ grant_ref: string;
63
+ model_access: "runtime_authority_required" | "not_enabled";
64
+ }>;
65
+ export declare function authorizeNativeModelRuntime(options: Transport & {
66
+ body: HostDelegationStatusBody;
67
+ }): Promise<{
68
+ expires_at: number;
69
+ authorization: string;
70
+ tier: "light" | "high" | "max";
71
+ delegation_ref: string;
72
+ control_origin: string;
73
+ }>;
74
+ export {};
75
+ //# sourceMappingURL=project-authority.d.ts.map
@@ -0,0 +1,140 @@
1
+ import { Value } from "@sinclair/typebox/value";
2
+ import { HostDelegationProjectionSchema, HostDelegationStatusBodySchema, NativeCreationProofSchema, NativeCreationStatusSchema, CreationValidationResultSchema, NativeRuntimeAuthorizationSchema, } from "@tutti/shared/schemas/internal";
3
+ export class NativeAuthorityTransportError extends Error {
4
+ code;
5
+ status;
6
+ requestId;
7
+ constructor(code, status, requestId) {
8
+ super(code);
9
+ this.code = code;
10
+ this.status = status;
11
+ this.requestId = requestId;
12
+ this.name = "NativeAuthorityTransportError";
13
+ }
14
+ }
15
+ const safeReasons = new Set([
16
+ "account_session_required",
17
+ "account_authority_inactive",
18
+ "project_owner_required",
19
+ "creation_proof_invalid",
20
+ "creation_authority_revoked",
21
+ "creation_authority_expired",
22
+ "creation_authority_conflict",
23
+ "creation_policy_retired",
24
+ "installation_proof_invalid",
25
+ "host_delegation_invalid",
26
+ "host_delegation_inactive",
27
+ "trial_consent_inactive",
28
+ "creation_validation_required",
29
+ "creation_validation_unavailable",
30
+ "creation_validation_busy",
31
+ "creation_validation_invalid_response",
32
+ "managed_trial_not_enabled",
33
+ ]);
34
+ async function request(options, path, body, schema, timeoutMs = 15_000) {
35
+ try {
36
+ const origin = new URL(options.relayUrl);
37
+ if (origin.username ||
38
+ origin.password ||
39
+ origin.search ||
40
+ origin.hash ||
41
+ origin.pathname !== "/" ||
42
+ !(origin.protocol === "https:" ||
43
+ (origin.protocol === "http:" && ["127.0.0.1", "[::1]"].includes(origin.hostname))))
44
+ throw new NativeAuthorityTransportError("managed_relay_origin_invalid");
45
+ const timeout = AbortSignal.timeout(timeoutMs);
46
+ const response = await (options.fetchImpl ?? fetch)(new URL(path, origin), {
47
+ method: "POST",
48
+ redirect: "error",
49
+ headers: { "content-type": "application/json" },
50
+ body: JSON.stringify(body),
51
+ signal: options.signal === undefined ? timeout : AbortSignal.any([timeout, options.signal]),
52
+ });
53
+ const id = response.headers.get("x-tutti-request-id");
54
+ const requestId = id !== null && /^[A-Za-z0-9_-]{1,100}$/.test(id) ? id : undefined;
55
+ const reader = response.body?.getReader();
56
+ if (!reader)
57
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response", response.status, requestId);
58
+ const chunks = [];
59
+ let size = 0;
60
+ try {
61
+ for (;;) {
62
+ const part = await reader.read();
63
+ if (part.done)
64
+ break;
65
+ if (!(part.value instanceof Uint8Array))
66
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response", response.status, requestId);
67
+ size += part.value.byteLength;
68
+ if (size > 16 * 1024)
69
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response", response.status, requestId);
70
+ chunks.push(part.value);
71
+ }
72
+ }
73
+ finally {
74
+ await reader.cancel().catch(() => undefined);
75
+ reader.releaseLock();
76
+ }
77
+ let raw;
78
+ try {
79
+ raw = JSON.parse(Buffer.concat(chunks).toString("utf8"));
80
+ }
81
+ catch {
82
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response", response.status, requestId);
83
+ }
84
+ if (!response.ok) {
85
+ const code = raw?.error?.code;
86
+ throw new NativeAuthorityTransportError(typeof code === "string" && safeReasons.has(code) ? code : "managed_authority_unavailable", response.status, requestId);
87
+ }
88
+ if (!Value.Check(schema, raw))
89
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response", response.status, requestId);
90
+ return raw;
91
+ }
92
+ catch (error) {
93
+ throw error instanceof NativeAuthorityTransportError
94
+ ? error
95
+ : new NativeAuthorityTransportError("managed_authority_unavailable");
96
+ }
97
+ }
98
+ export async function validateNativeCreationAuthority(options) {
99
+ if (!Value.Check(NativeCreationProofSchema, options.body))
100
+ throw new NativeAuthorityTransportError("managed_authority_invalid_request");
101
+ const result = await request(options, "/host-control/v1/managed-authority/validate", options.body, CreationValidationResultSchema, 60_000);
102
+ if (result.project_id !== options.body.project_id ||
103
+ result.installation_ref !== options.body.installation_ref)
104
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response");
105
+ return result;
106
+ }
107
+ export async function readNativeCreationAuthority(options) {
108
+ if (!Value.Check(NativeCreationProofSchema, options.body))
109
+ throw new NativeAuthorityTransportError("managed_authority_invalid_request");
110
+ const result = await request(options, "/host-control/v1/managed-authority/preparation", options.body, NativeCreationStatusSchema);
111
+ if (result.request_ref !== options.body.request_ref ||
112
+ result.creation.project_id !== options.body.project_id ||
113
+ result.creation.installation_ref !== options.body.installation_ref ||
114
+ (result.creation.state === "activated") !== (result.authority !== undefined) ||
115
+ (result.authority !== undefined &&
116
+ (result.authority.tier !== result.creation.tier ||
117
+ result.authority.installation_ref !== options.body.installation_ref ||
118
+ result.authority.relay_project_ref !== result.creation.relay_project_ref)))
119
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response");
120
+ return result;
121
+ }
122
+ export async function readNativeHostAuthority(options) {
123
+ if (!Value.Check(HostDelegationStatusBodySchema, options.body))
124
+ throw new NativeAuthorityTransportError("managed_authority_invalid_request");
125
+ const result = await request(options, "/host-control/v1/managed-authority/status", options.body, HostDelegationProjectionSchema);
126
+ if (result.delegation_ref !== options.body.delegation_ref ||
127
+ result.relay_project_ref !== options.body.relay_project_ref ||
128
+ result.installation_ref !== options.body.installation_ref)
129
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response");
130
+ return result;
131
+ }
132
+ export async function authorizeNativeModelRuntime(options) {
133
+ if (!Value.Check(HostDelegationStatusBodySchema, options.body))
134
+ throw new NativeAuthorityTransportError("managed_authority_invalid_request");
135
+ const result = await request(options, "/host-control/v1/managed-authority/runtime", options.body, NativeRuntimeAuthorizationSchema);
136
+ if (result.delegation_ref !== options.body.delegation_ref)
137
+ throw new NativeAuthorityTransportError("managed_authority_invalid_response");
138
+ return result;
139
+ }
140
+ //# sourceMappingURL=project-authority.js.map
@@ -28,6 +28,13 @@ export declare const ID_PREFIXES: {
28
28
  readonly joinToken: "join_token_";
29
29
  readonly notice: "notice_";
30
30
  readonly controlPlaneIntent: "intent_";
31
+ readonly managedCredential: "managed_credential_";
32
+ readonly managedSession: "managed_session_";
33
+ readonly managedDevice: "managed_device_";
34
+ readonly managedCreation: "managed_creation_";
35
+ readonly hostInstallation: "host_installation_";
36
+ readonly hostDelegation: "host_delegation_";
37
+ readonly projectModelGrant: "project_model_grant_";
31
38
  };
32
39
  export type IdPrefix = (typeof ID_PREFIXES)[keyof typeof ID_PREFIXES];
33
40
  export type PrefixedId<TPrefix extends string> = `${TPrefix}${string}`;
@@ -30,6 +30,13 @@ export const ID_PREFIXES = {
30
30
  joinToken: "join_token_",
31
31
  notice: "notice_",
32
32
  controlPlaneIntent: "intent_",
33
+ managedCredential: "managed_credential_",
34
+ managedSession: "managed_session_",
35
+ managedDevice: "managed_device_",
36
+ managedCreation: "managed_creation_",
37
+ hostInstallation: "host_installation_",
38
+ hostDelegation: "host_delegation_",
39
+ projectModelGrant: "project_model_grant_",
33
40
  };
34
41
  export function createPrefixedId(prefix) {
35
42
  return `${prefix}${ulid()}`;
@@ -1,4 +1,5 @@
1
1
  export * from "./openapi.js";
2
+ export * from "./managed-account.js";
2
3
  export type * from "./types.js";
3
4
  export { ARTIFACT_FEEDBACK_MAX_ANNOTATIONS, ARTIFACT_FEEDBACK_MAX_AUTHORED_TEXT_LENGTH, ARTIFACT_FEEDBACK_MAX_COMMENT_LENGTH, ARTIFACT_FEEDBACK_MAX_SERIALIZED_BYTES, ARTIFACT_FEEDBACK_MAX_SUMMARY_LENGTH, ArtifactElementAnchorSchema, ArtifactElementKindSchema, ArtifactElementTargetSchema, ArtifactFeedbackAnnotationSchema, ArtifactFeedbackCommandSchema, ArtifactFeedbackRefSchema, ArtifactSemanticContextSchema, ArtifactSemanticSnapshotSchema, ArtifactSemanticStateSchema, } from "./artifact-feedback.js";
4
5
  export { CompleteDesktopEntryContinuationBodySchema, CompleteDesktopEntryContinuationResponseSchema, CreateDesktopEntryContinuationResponseSchema, DESKTOP_ENTRY_COMPLETION_TOKEN_LENGTH, DESKTOP_ENTRY_PAYLOAD_KEY_LENGTH, DESKTOP_ENTRY_SEALED_IV_LENGTH, DesktopEntryCompletionTokenSchema, DesktopEntryContinuationPendingProjectionSchema, DesktopEntryContinuationReadyProjectionSchema, DesktopEntryPayloadKeySchema, GetDesktopEntryContinuationResponseSchema, MAX_DESKTOP_ENTRY_SEALED_CIPHERTEXT_LENGTH, SealedDesktopEntryPayloadSchema, } from "./desktop-entry-continuations.js";
@@ -1,4 +1,5 @@
1
1
  export * from "./openapi.js";
2
+ export * from "./managed-account.js";
2
3
  export { ARTIFACT_FEEDBACK_MAX_ANNOTATIONS, ARTIFACT_FEEDBACK_MAX_AUTHORED_TEXT_LENGTH, ARTIFACT_FEEDBACK_MAX_COMMENT_LENGTH, ARTIFACT_FEEDBACK_MAX_SERIALIZED_BYTES, ARTIFACT_FEEDBACK_MAX_SUMMARY_LENGTH, ArtifactElementAnchorSchema, ArtifactElementKindSchema, ArtifactElementTargetSchema, ArtifactFeedbackAnnotationSchema, ArtifactFeedbackCommandSchema, ArtifactFeedbackRefSchema, ArtifactSemanticContextSchema, ArtifactSemanticSnapshotSchema, ArtifactSemanticStateSchema, } from "./artifact-feedback.js";
3
4
  export { CompleteDesktopEntryContinuationBodySchema, CompleteDesktopEntryContinuationResponseSchema, CreateDesktopEntryContinuationResponseSchema, DESKTOP_ENTRY_COMPLETION_TOKEN_LENGTH, DESKTOP_ENTRY_PAYLOAD_KEY_LENGTH, DESKTOP_ENTRY_SEALED_IV_LENGTH, DesktopEntryCompletionTokenSchema, DesktopEntryContinuationPendingProjectionSchema, DesktopEntryContinuationReadyProjectionSchema, DesktopEntryPayloadKeySchema, GetDesktopEntryContinuationResponseSchema, MAX_DESKTOP_ENTRY_SEALED_CIPHERTEXT_LENGTH, SealedDesktopEntryPayloadSchema, } from "./desktop-entry-continuations.js";
4
5
  export { LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MAX_LENGTH, LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MIN_LENGTH, RegisterLocalConsoleAccountHandoffBodySchema, RegisterLocalConsoleAccountHandoffResponseSchema, } from "./local-console-account-handoffs.js";
@@ -0,0 +1,35 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const ManagedAccountUsageSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
3
+ state: import("@sinclair/typebox").TLiteral<"not_initialized">;
4
+ unit: import("@sinclair/typebox").TLiteral<"newapi_quota">;
5
+ }>, import("@sinclair/typebox").TObject<{
6
+ state: import("@sinclair/typebox").TLiteral<"ready">;
7
+ unit: import("@sinclair/typebox").TLiteral<"newapi_quota">;
8
+ remaining: import("@sinclair/typebox").TInteger;
9
+ used: import("@sinclair/typebox").TInteger;
10
+ request_count: import("@sinclair/typebox").TInteger;
11
+ }>]>;
12
+ export type ManagedAccountUsage = Static<typeof ManagedAccountUsageSchema>;
13
+ export declare const ManagedAccountOverviewSchema: import("@sinclair/typebox").TObject<{
14
+ delegations: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
+ delegation_ref: import("@sinclair/typebox").TString;
16
+ grant_ref: import("@sinclair/typebox").TString;
17
+ installation_ref: import("@sinclair/typebox").TString;
18
+ relay_project_ref: import("@sinclair/typebox").TString;
19
+ project_name: import("@sinclair/typebox").TString;
20
+ surface: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"standalone">, import("@sinclair/typebox").TLiteral<"feishu">]>;
21
+ tier: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"light">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"max">]>;
22
+ created_at: import("@sinclair/typebox").TString;
23
+ state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"revoked">]>;
24
+ downstream_keys: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"not_requested">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"confirmed">]>;
25
+ }>>;
26
+ sessions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
27
+ session_ref: import("@sinclair/typebox").TString;
28
+ current: import("@sinclair/typebox").TBoolean;
29
+ created_at: import("@sinclair/typebox").TString;
30
+ expires_at: import("@sinclair/typebox").TString;
31
+ }>>;
32
+ truncated: import("@sinclair/typebox").TBoolean;
33
+ }>;
34
+ export type ManagedAccountOverview = Static<typeof ManagedAccountOverviewSchema>;
35
+ //# sourceMappingURL=managed-account.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { ID_PREFIXES, ULID_BODY_PATTERN } from "../../ids/index.js";
3
+ import { RelayProjectRefSchema, RelayAccountSessionRefSchema } from "../domain/index.js";
4
+ const ref = (prefix) => Type.String({ pattern: `^${prefix}${ULID_BODY_PATTERN}$` });
5
+ const timestamp = Type.String({ maxLength: 30 });
6
+ export const ManagedAccountUsageSchema = Type.Union([
7
+ Type.Object({ state: Type.Literal("not_initialized"), unit: Type.Literal("newapi_quota") }, { additionalProperties: false }),
8
+ Type.Object({
9
+ state: Type.Literal("ready"),
10
+ unit: Type.Literal("newapi_quota"),
11
+ remaining: Type.Integer(),
12
+ used: Type.Integer({ minimum: 0 }),
13
+ request_count: Type.Integer({ minimum: 0 }),
14
+ }, { additionalProperties: false }),
15
+ ]);
16
+ export const ManagedAccountOverviewSchema = Type.Object({
17
+ delegations: Type.Array(Type.Object({
18
+ delegation_ref: ref(ID_PREFIXES.hostDelegation),
19
+ grant_ref: ref(ID_PREFIXES.projectModelGrant),
20
+ installation_ref: ref(ID_PREFIXES.hostInstallation),
21
+ relay_project_ref: RelayProjectRefSchema,
22
+ project_name: Type.String(),
23
+ surface: Type.Union([Type.Literal("standalone"), Type.Literal("feishu")]),
24
+ tier: Type.Union([Type.Literal("light"), Type.Literal("high"), Type.Literal("max")]),
25
+ created_at: timestamp,
26
+ state: Type.Union([Type.Literal("active"), Type.Literal("revoked")]),
27
+ downstream_keys: Type.Union([
28
+ Type.Literal("not_requested"),
29
+ Type.Literal("pending"),
30
+ Type.Literal("confirmed"),
31
+ ]),
32
+ }, { additionalProperties: false }), { maxItems: 100 }),
33
+ sessions: Type.Array(Type.Object({
34
+ session_ref: RelayAccountSessionRefSchema,
35
+ current: Type.Boolean(),
36
+ created_at: timestamp,
37
+ expires_at: timestamp,
38
+ }, { additionalProperties: false }), { maxItems: 50 }),
39
+ truncated: Type.Boolean(),
40
+ }, { additionalProperties: false });
41
+ //# sourceMappingURL=managed-account.js.map
@@ -3,14 +3,14 @@ export declare const ProviderModelNameSchema: import("@sinclair/typebox").TStrin
3
3
  export declare const ProviderConfigInvalidReasonCodeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">, import("@sinclair/typebox").TLiteral<"unknown">]>;
4
4
  export declare const ProviderUnavailableReasonCodeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">, import("@sinclair/typebox").TLiteral<"unknown">]>;
5
5
  export declare const ProviderModelValidationFailureReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">]>;
6
- export declare const ProjectProviderUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
7
- export declare const ProviderModelDiscoveryUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
6
+ export declare const ProjectProviderUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"managed_model_fixed">, import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
7
+ export declare const ProviderModelDiscoveryUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"managed_model_fixed">, import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
8
8
  export declare const GetProviderModelsResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
9
9
  status: import("@sinclair/typebox").TLiteral<"available">;
10
10
  models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
11
11
  }>, import("@sinclair/typebox").TObject<{
12
12
  status: import("@sinclair/typebox").TLiteral<"unavailable">;
13
- reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
13
+ reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"managed_model_fixed">, import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
14
14
  }>]>;
15
15
  export declare const UpdateProviderDefaultModelPayloadSchema: import("@sinclair/typebox").TObject<{
16
16
  default_model: import("@sinclair/typebox").TString;
@@ -29,7 +29,7 @@ export declare const UpdateProviderDefaultModelDispositionSchema: import("@sincl
29
29
  retryable: import("@sinclair/typebox").TBoolean;
30
30
  }>, import("@sinclair/typebox").TObject<{
31
31
  kind: import("@sinclair/typebox").TLiteral<"provider_unavailable">;
32
- reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
32
+ reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"managed_model_fixed">, import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
33
33
  }>, import("@sinclair/typebox").TObject<{
34
34
  kind: import("@sinclair/typebox").TLiteral<"interrupted">;
35
35
  retry_with_new_command_id: import("@sinclair/typebox").TLiteral<true>;
@@ -38,6 +38,10 @@ export declare const UpdateProviderDefaultModelBodySchema: import("@sinclair/typ
38
38
  export declare const UpdateProviderDefaultModelResponseSchema: import("@sinclair/typebox").TSchema;
39
39
  export declare const ProviderConfigProjectionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
40
40
  status: import("@sinclair/typebox").TLiteral<"not_configured">;
41
+ }>, import("@sinclair/typebox").TObject<{
42
+ status: import("@sinclair/typebox").TLiteral<"managed">;
43
+ funding_kind: import("@sinclair/typebox").TLiteral<"trial">;
44
+ tier: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"light">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"max">]>;
41
45
  }>, import("@sinclair/typebox").TObject<{
42
46
  status: import("@sinclair/typebox").TLiteral<"configured">;
43
47
  provider: import("@sinclair/typebox").TLiteral<"openai">;
@@ -24,6 +24,7 @@ export const ProviderModelValidationFailureReasonSchema = Type.Union([
24
24
  Type.Literal("provider_network_error"),
25
25
  ]);
26
26
  export const ProjectProviderUnavailableReasonSchema = Type.Union([
27
+ Type.Literal("managed_model_fixed"),
27
28
  Type.Literal("provider_not_configured"),
28
29
  Type.Literal("provider_config_invalid"),
29
30
  Type.Literal("provider_credential_missing"),
@@ -69,6 +70,11 @@ export const UpdateProviderDefaultModelBodySchema = commandEnvelopeSchema(Update
69
70
  export const UpdateProviderDefaultModelResponseSchema = commandResponseSchema(UpdateProviderDefaultModelDispositionSchema);
70
71
  export const ProviderConfigProjectionSchema = Type.Union([
71
72
  Type.Object({ status: Type.Literal("not_configured") }, { additionalProperties: false }),
73
+ Type.Object({
74
+ status: Type.Literal("managed"),
75
+ funding_kind: Type.Literal("trial"),
76
+ tier: Type.Union([Type.Literal("light"), Type.Literal("high"), Type.Literal("max")]),
77
+ }, { additionalProperties: false }),
72
78
  Type.Object({
73
79
  status: Type.Literal("configured"),
74
80
  provider: Type.Literal("openai"),
@@ -537,6 +537,10 @@ export declare const ScratchpadUpdatedEventPayloadSchema: import("@sinclair/type
537
537
  export declare const ProviderConfigChangedEventPayloadSchema: import("@sinclair/typebox").TObject<{
538
538
  provider_config: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
539
539
  status: import("@sinclair/typebox").TLiteral<"not_configured">;
540
+ }>, import("@sinclair/typebox").TObject<{
541
+ status: import("@sinclair/typebox").TLiteral<"managed">;
542
+ funding_kind: import("@sinclair/typebox").TLiteral<"trial">;
543
+ tier: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"light">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"max">]>;
540
544
  }>, import("@sinclair/typebox").TObject<{
541
545
  status: import("@sinclair/typebox").TLiteral<"configured">;
542
546
  provider: import("@sinclair/typebox").TLiteral<"openai">;
@@ -0,0 +1,28 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const CreationValidationAuthoritySchema: import("@sinclair/typebox").TObject<{
3
+ version: import("@sinclair/typebox").TLiteral<1>;
4
+ audience: import("@sinclair/typebox").TLiteral<"tutti-creation-validation">;
5
+ issuer: import("@sinclair/typebox").TString;
6
+ account_ref: import("@sinclair/typebox").TString;
7
+ creation_ref: import("@sinclair/typebox").TString;
8
+ project_id: import("@sinclair/typebox").TString;
9
+ installation_ref: import("@sinclair/typebox").TString;
10
+ tier: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"light">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"max">]>;
11
+ creation_expires_at: import("@sinclair/typebox").TInteger;
12
+ nonce: import("@sinclair/typebox").TString;
13
+ issued_at: import("@sinclair/typebox").TInteger;
14
+ expires_at: import("@sinclair/typebox").TInteger;
15
+ }>;
16
+ export type CreationValidationAuthority = Static<typeof CreationValidationAuthoritySchema>;
17
+ export declare const CreationValidationResultSchema: import("@sinclair/typebox").TObject<{
18
+ creation_ref: import("@sinclair/typebox").TString;
19
+ project_id: import("@sinclair/typebox").TString;
20
+ installation_ref: import("@sinclair/typebox").TString;
21
+ tier: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"light">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"max">]>;
22
+ route_ref: import("@sinclair/typebox").TString;
23
+ state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"started">, import("@sinclair/typebox").TLiteral<"succeeded">, import("@sinclair/typebox").TLiteral<"failed">, import("@sinclair/typebox").TLiteral<"unknown">]>;
24
+ reason_code: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"validation_started">, import("@sinclair/typebox").TLiteral<"validation_succeeded">, import("@sinclair/typebox").TLiteral<"validation_route_unavailable">, import("@sinclair/typebox").TLiteral<"validation_http_rejected">, import("@sinclair/typebox").TLiteral<"validation_response_invalid">, import("@sinclair/typebox").TLiteral<"validation_transport_unknown">, import("@sinclair/typebox").TLiteral<"validation_interrupted">]>;
25
+ http_status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNull, import("@sinclair/typebox").TInteger]>;
26
+ }>;
27
+ export type CreationValidationResult = Static<typeof CreationValidationResultSchema>;
28
+ //# sourceMappingURL=creation-validation.d.ts.map
@@ -0,0 +1,42 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { IdempotencyKeySchema, ProjectIdSchema, RelayAccountRefSchema } from "../domain/index.js";
3
+ import { HostInstallationRefSchema, ManagedCreationRefSchema, ManagedTierSchema, } from "./project-authority.js";
4
+ // A fixed platform-funded connectivity probe, never a general model/key capability.
5
+ export const CreationValidationAuthoritySchema = Type.Object({
6
+ version: Type.Literal(1),
7
+ audience: Type.Literal("tutti-creation-validation"),
8
+ issuer: Type.String({ minLength: 1, maxLength: 200 }),
9
+ account_ref: RelayAccountRefSchema,
10
+ creation_ref: ManagedCreationRefSchema,
11
+ project_id: ProjectIdSchema,
12
+ installation_ref: HostInstallationRefSchema,
13
+ tier: ManagedTierSchema,
14
+ creation_expires_at: Type.Integer({ minimum: 0 }),
15
+ nonce: IdempotencyKeySchema,
16
+ issued_at: Type.Integer({ minimum: 0 }),
17
+ expires_at: Type.Integer({ minimum: 0 }),
18
+ }, { additionalProperties: false });
19
+ export const CreationValidationResultSchema = Type.Object({
20
+ creation_ref: ManagedCreationRefSchema,
21
+ project_id: ProjectIdSchema,
22
+ installation_ref: HostInstallationRefSchema,
23
+ tier: ManagedTierSchema,
24
+ route_ref: Type.String({ pattern: "^[a-z0-9][a-z0-9-]{1,60}$" }),
25
+ state: Type.Union([
26
+ Type.Literal("started"),
27
+ Type.Literal("succeeded"),
28
+ Type.Literal("failed"),
29
+ Type.Literal("unknown"),
30
+ ]),
31
+ reason_code: Type.Union([
32
+ Type.Literal("validation_started"),
33
+ Type.Literal("validation_succeeded"),
34
+ Type.Literal("validation_route_unavailable"),
35
+ Type.Literal("validation_http_rejected"),
36
+ Type.Literal("validation_response_invalid"),
37
+ Type.Literal("validation_transport_unknown"),
38
+ Type.Literal("validation_interrupted"),
39
+ ]),
40
+ http_status: Type.Union([Type.Null(), Type.Integer({ minimum: 100, maximum: 599 })]),
41
+ }, { additionalProperties: false });
42
+ //# sourceMappingURL=creation-validation.js.map
@@ -78,4 +78,9 @@ export * from "./external-references.js";
78
78
  export * from "./platform-clarification-content.js";
79
79
  export * from "./platform-clarification.js";
80
80
  export * from "./feishu-connections.js";
81
+ export * from "./managed-models.js";
82
+ export * from "./project-authority.js";
83
+ export * from "./creation-validation.js";
84
+ export * from "./managed-runtime.js";
85
+ export * from "./managed-account.js";
81
86
  //# sourceMappingURL=index.d.ts.map
@@ -72,4 +72,9 @@ export * from "./external-references.js";
72
72
  export * from "./platform-clarification-content.js";
73
73
  export * from "./platform-clarification.js";
74
74
  export * from "./feishu-connections.js";
75
+ export * from "./managed-models.js";
76
+ export * from "./project-authority.js";
77
+ export * from "./creation-validation.js";
78
+ export * from "./managed-runtime.js";
79
+ export * from "./managed-account.js";
75
80
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,12 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const ManagedAccountReadAuthoritySchema: import("@sinclair/typebox").TObject<{
3
+ version: import("@sinclair/typebox").TLiteral<1>;
4
+ audience: import("@sinclair/typebox").TLiteral<"tutti-managed-account-read">;
5
+ issuer: import("@sinclair/typebox").TString;
6
+ account_ref: import("@sinclair/typebox").TString;
7
+ nonce: import("@sinclair/typebox").TString;
8
+ issued_at: import("@sinclair/typebox").TInteger;
9
+ expires_at: import("@sinclair/typebox").TInteger;
10
+ }>;
11
+ export type ManagedAccountReadAuthority = Static<typeof ManagedAccountReadAuthoritySchema>;
12
+ //# sourceMappingURL=managed-account.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { RelayAccountRefSchema, IdempotencyKeySchema } from "../domain/index.js";
3
+ // Read-only account ledger snapshot. Cannot create users, pin routes or issue keys.
4
+ export const ManagedAccountReadAuthoritySchema = Type.Object({
5
+ version: Type.Literal(1),
6
+ audience: Type.Literal("tutti-managed-account-read"),
7
+ issuer: Type.String({ minLength: 1, maxLength: 200 }),
8
+ account_ref: RelayAccountRefSchema,
9
+ nonce: IdempotencyKeySchema,
10
+ issued_at: Type.Integer({ minimum: 0 }),
11
+ expires_at: Type.Integer({ minimum: 0 }),
12
+ }, { additionalProperties: false });
13
+ //# sourceMappingURL=managed-account.js.map