@aexhq/sdk 0.52.0 → 0.53.1
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.
- package/README.md +99 -41
- package/dist/client/aex.d.ts +6 -1
- package/dist/client/aex.js +51 -10
- package/dist/client/aex.js.map +1 -1
- package/dist/client/credentials.d.ts +3 -3
- package/dist/client/credentials.js +8 -8
- package/dist/client/credentials.js.map +1 -1
- package/dist/client/routing.d.ts +1 -1
- package/dist/client/routing.js +2 -5
- package/dist/client/routing.js.map +1 -1
- package/dist/files/workspace-files.d.ts +55 -0
- package/dist/files/workspace-files.js +150 -0
- package/dist/files/workspace-files.js.map +1 -0
- package/dist/generated/errors.js +2 -17
- package/dist/generated/errors.js.map +1 -1
- package/dist/generated/models.d.ts +248 -796
- package/dist/generated/models.js +4 -4
- package/dist/generated/models.js.map +1 -1
- package/dist/generated/resources.d.ts +72 -519
- package/dist/generated/resources.js +49 -428
- package/dist/generated/resources.js.map +1 -1
- package/dist/generated/routes.d.ts +4 -4
- package/dist/generated/routes.js +190 -1600
- package/dist/generated/routes.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/transport/transport.d.ts +9 -1
- package/dist/transport/transport.js +79 -1
- package/dist/transport/transport.js.map +1 -1
- package/package.json +1 -5
- package/dist/node/session-file-limits.d.ts +0 -4
- package/dist/node/session-file-limits.js +0 -7
- package/dist/node/session-file-limits.js.map +0 -1
- package/dist/node/session-files.d.ts +0 -80
- package/dist/node/session-files.js +0 -254
- package/dist/node/session-files.js.map +0 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const ID_PREFIXES: {
|
|
8
8
|
readonly user: "usr";
|
|
9
|
+
readonly account: "acc";
|
|
9
10
|
readonly organization: "org";
|
|
10
11
|
readonly membership: "mem";
|
|
11
12
|
readonly invitation: "inv";
|
|
@@ -22,16 +23,15 @@ export declare const ID_PREFIXES: {
|
|
|
22
23
|
readonly file_upload: "ful";
|
|
23
24
|
readonly file_download: "fdl";
|
|
24
25
|
readonly observation: "obs";
|
|
25
|
-
readonly telemetry_batch: "bch";
|
|
26
|
-
readonly telemetry_gap: "gap";
|
|
27
|
-
readonly export: "exp";
|
|
28
26
|
readonly upload: "upl";
|
|
29
27
|
readonly measurement: "msr";
|
|
30
28
|
readonly statement: "stm";
|
|
29
|
+
readonly payment_method: "pmt";
|
|
30
|
+
readonly billing_transaction: "txn";
|
|
31
31
|
};
|
|
32
32
|
export type IdKind = keyof typeof ID_PREFIXES;
|
|
33
33
|
export type Id<K extends IdKind = IdKind> = `${(typeof ID_PREFIXES)[K]}_${string}`;
|
|
34
|
-
export declare const ID_KINDS: readonly ("message" | "user" | "organization" | "membership" | "invitation" | "workspace" | "api_key" | "provider_credential" | "session" | "agent" | "tool_call" | "operation" | "approval" | "generation" | "file_upload" | "file_download" | "observation" | "
|
|
34
|
+
export declare const ID_KINDS: readonly ("message" | "user" | "account" | "organization" | "membership" | "invitation" | "workspace" | "api_key" | "provider_credential" | "session" | "agent" | "tool_call" | "operation" | "approval" | "generation" | "file_upload" | "file_download" | "observation" | "upload" | "measurement" | "statement" | "payment_method" | "billing_transaction")[];
|
|
35
35
|
export declare function idPatternSource(kind: IdKind): string;
|
|
36
36
|
export declare function idPattern(kind: IdKind): RegExp;
|
|
37
37
|
export declare function isId<K extends IdKind>(kind: K, value: unknown): value is Id<K>;
|
|
@@ -51,15 +51,13 @@ export type AccountOperationalState = (AccountActiveState & {
|
|
|
51
51
|
}) | (AccountPausedState & {
|
|
52
52
|
readonly status: "paused";
|
|
53
53
|
});
|
|
54
|
-
/** Why
|
|
54
|
+
/** Why the personal prepaid account cannot admit paid work. */
|
|
55
55
|
export type AccountPauseReason = "top_up_required" | "payment_hold" | "dispute_hold" | "account_closed";
|
|
56
|
-
/** A paused account and
|
|
56
|
+
/** A paused account and its customer-visible remedy. */
|
|
57
57
|
export interface AccountPausedState {
|
|
58
58
|
readonly changedAt: string;
|
|
59
|
-
readonly deletionScheduledAt?: string;
|
|
60
59
|
readonly minimumRestoreCents?: string;
|
|
61
60
|
readonly reason: AccountPauseReason;
|
|
62
|
-
readonly retentionFundedUntil?: string;
|
|
63
61
|
readonly revision: number;
|
|
64
62
|
}
|
|
65
63
|
/** The one error envelope every failing request returns. */
|
|
@@ -68,59 +66,93 @@ export interface ApiError {
|
|
|
68
66
|
}
|
|
69
67
|
/** The failure itself. */
|
|
70
68
|
export interface ApiErrorBody {
|
|
71
|
-
readonly code: "unauthenticated" | "forbidden" | "insufficient_scope" | "token_invalid" | "token_revoked" | "token_expired" | "malformed_token" | "
|
|
69
|
+
readonly code: "unauthenticated" | "forbidden" | "insufficient_scope" | "token_invalid" | "token_revoked" | "token_expired" | "malformed_token" | "slow_down" | "not_found" | "gone" | "idempotency_conflict" | "idempotency_in_flight" | "api_key_secret_unavailable" | "operation_idempotency_conflict" | "invalid_request" | "invalid_scope" | "invalid_cursor" | "invalid_file_selection" | "invalid_range" | "unsupported_media_type" | "payload_too_large" | "limit_exceeded" | "session_not_idle" | "session_terminated" | "workspace_activation_required" | "workspace_not_live" | "session_deleting" | "session_deleted" | "deletion_in_progress" | "resource_conflict" | "last_owner_required" | "operation_not_cancelable" | "approval_not_found" | "approval_already_resolved" | "approval_binding_changed" | "file_not_found" | "content_missing" | "download_grant_expired" | "invalid_query" | "invalid_network_policy" | "unsupported_package_ecosystem" | "package_resolution_failed" | "package_artifact_unavailable" | "package_integrity_mismatch" | "unknown_provider" | "unknown_model" | "invalid_auto_topup_policy" | "payment_method_required" | "authentication_unavailable" | "account_paused" | "account_state_unavailable" | "precondition_failed" | "wrong_workspace_region" | "usage_unavailable" | "usage_coverage_gap" | "rate_limited" | "upstream_error" | "workspace_provision_pending" | "commit_outcome_unknown" | "not_implemented" | "internal_error";
|
|
72
70
|
readonly details?: ErrorDetails;
|
|
73
71
|
readonly message: string;
|
|
74
72
|
readonly operationId?: Id<"operation">;
|
|
75
73
|
readonly requestId: string;
|
|
76
74
|
readonly retryable: boolean;
|
|
77
75
|
}
|
|
78
|
-
/** Workspace API key metadata.
|
|
76
|
+
/** Workspace API key metadata. Secret material is never returned by reads. */
|
|
79
77
|
export interface ApiKey {
|
|
80
78
|
readonly createdAt: string;
|
|
81
79
|
readonly id: Id<"api_key">;
|
|
82
80
|
readonly name: string;
|
|
83
81
|
readonly revokedAt?: string;
|
|
84
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "
|
|
82
|
+
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "sessions:read" | "sessions:write" | "sessions:delete" | "resources:read" | "resources:write">;
|
|
85
83
|
readonly workspaceId: Id<"workspace">;
|
|
86
84
|
}
|
|
87
|
-
/** Mint a
|
|
85
|
+
/** Mint a key for the account's fixed workspace. */
|
|
88
86
|
export interface ApiKeyCreateRequest {
|
|
89
87
|
readonly name: string;
|
|
90
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "
|
|
88
|
+
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "sessions:read" | "sessions:write" | "sessions:delete" | "resources:read" | "resources:write">;
|
|
91
89
|
readonly workspaceId: Id<"workspace">;
|
|
92
90
|
}
|
|
93
|
-
/** One page of API key metadata. */
|
|
91
|
+
/** One bounded page of API key metadata. */
|
|
94
92
|
export interface ApiKeyPage {
|
|
95
93
|
readonly items: ReadonlyArray<ApiKey>;
|
|
96
94
|
readonly nextCursor?: string;
|
|
97
95
|
}
|
|
98
|
-
/** The
|
|
99
|
-
export interface AutoTopupPolicy {
|
|
100
|
-
readonly amountCents: string;
|
|
101
|
-
readonly enabled: boolean;
|
|
102
|
-
readonly organizationId: Id<"organization">;
|
|
103
|
-
readonly revision: number;
|
|
104
|
-
readonly thresholdCents: string;
|
|
105
|
-
readonly updatedAt: string;
|
|
106
|
-
}
|
|
107
|
-
/** Replace the automatic top-up policy; every field is required. */
|
|
108
|
-
export interface AutoTopupPolicyRequest {
|
|
109
|
-
readonly amountCents: string;
|
|
110
|
-
readonly enabled: boolean;
|
|
111
|
-
readonly thresholdCents: string;
|
|
112
|
-
}
|
|
113
|
-
/** The prepaid balance of one organization. */
|
|
96
|
+
/** The current prepaid position of the caller's personal account. */
|
|
114
97
|
export interface BillingBalance {
|
|
98
|
+
readonly accountId: Id<"account">;
|
|
115
99
|
readonly availableCents: string;
|
|
116
100
|
readonly currency: Currency;
|
|
117
|
-
readonly operationalState: AccountOperationalState;
|
|
118
|
-
readonly organizationId: Id<"organization">;
|
|
119
101
|
readonly pendingCents: string;
|
|
120
102
|
readonly reservedCents: string;
|
|
121
|
-
readonly revision: number;
|
|
122
103
|
readonly updatedAt: string;
|
|
123
104
|
}
|
|
105
|
+
/** One immutable customer-visible ledger transaction. */
|
|
106
|
+
export interface BillingTransaction {
|
|
107
|
+
readonly amountCents: string;
|
|
108
|
+
readonly balanceAfterCents: string;
|
|
109
|
+
readonly currency: Currency;
|
|
110
|
+
readonly direction: BillingTransactionDirection;
|
|
111
|
+
readonly id: Id<"billing_transaction">;
|
|
112
|
+
readonly kind: BillingTransactionKind;
|
|
113
|
+
readonly occurredAt: string;
|
|
114
|
+
readonly reversesTransactionId?: Id<"billing_transaction">;
|
|
115
|
+
readonly sessionId?: Id<"session">;
|
|
116
|
+
}
|
|
117
|
+
/** Whether the transaction increases or decreases available prepaid value. */
|
|
118
|
+
export type BillingTransactionDirection = "credit" | "debit";
|
|
119
|
+
/** The customer-visible reason for an immutable balanced ledger transaction. */
|
|
120
|
+
export type BillingTransactionKind = "top_up" | "usage" | "refund" | "reversal" | "reservation" | "reservation_release";
|
|
121
|
+
/** One newest-first page of immutable ledger transactions. */
|
|
122
|
+
export interface BillingTransactionPage {
|
|
123
|
+
readonly items: ReadonlyArray<BillingTransaction>;
|
|
124
|
+
readonly nextCursor?: string;
|
|
125
|
+
}
|
|
126
|
+
/** The independently measured and rated launch categories. */
|
|
127
|
+
export type BillingUsageCategory = "model" | "runtime" | "storage" | "transfer";
|
|
128
|
+
/** The trustworthy completeness boundary for one usage answer. */
|
|
129
|
+
export interface BillingUsageCoverage {
|
|
130
|
+
readonly completeThrough: string;
|
|
131
|
+
readonly hasGap: boolean;
|
|
132
|
+
readonly includesThrough: string;
|
|
133
|
+
}
|
|
134
|
+
/** One bounded rated-usage aggregate with exact charge evidence. */
|
|
135
|
+
export interface BillingUsageItem {
|
|
136
|
+
readonly amountCents: string;
|
|
137
|
+
readonly category: BillingUsageCategory;
|
|
138
|
+
readonly chargedQuantity: string;
|
|
139
|
+
readonly currency: Currency;
|
|
140
|
+
readonly model?: string;
|
|
141
|
+
readonly provider?: ProviderId;
|
|
142
|
+
readonly quantity: string;
|
|
143
|
+
readonly serviceTime: TimeRange;
|
|
144
|
+
readonly sessionId?: Id<"session">;
|
|
145
|
+
readonly settlement: BillingUsageSettlement;
|
|
146
|
+
readonly unit: string;
|
|
147
|
+
}
|
|
148
|
+
/** One bounded page of rated usage and its explicit completeness boundary. */
|
|
149
|
+
export interface BillingUsagePage {
|
|
150
|
+
readonly coverage: BillingUsageCoverage;
|
|
151
|
+
readonly items: ReadonlyArray<BillingUsageItem>;
|
|
152
|
+
readonly nextCursor?: string;
|
|
153
|
+
}
|
|
154
|
+
/** Whether this rated row has been posted to the money ledger. */
|
|
155
|
+
export type BillingUsageSettlement = "pending" | "settled";
|
|
124
156
|
/** How inline blob bytes are encoded. */
|
|
125
157
|
export type BlobEncoding = "utf8" | "base64";
|
|
126
158
|
/** A small value carried in the request. */
|
|
@@ -134,6 +166,8 @@ export type BlobInput = (BlobInline & {
|
|
|
134
166
|
readonly type: "inline";
|
|
135
167
|
}) | (BlobUpload & {
|
|
136
168
|
readonly type: "upload";
|
|
169
|
+
}) | (BlobUrl & {
|
|
170
|
+
readonly type: "url";
|
|
137
171
|
});
|
|
138
172
|
/** A large value staged through the upload surface. */
|
|
139
173
|
export interface BlobUpload {
|
|
@@ -141,12 +175,18 @@ export interface BlobUpload {
|
|
|
141
175
|
readonly sizeBytes: string;
|
|
142
176
|
readonly uploadId: Id<"upload">;
|
|
143
177
|
}
|
|
178
|
+
/** An HTTPS source fetched asynchronously under the platform SSRF, redirect, time and size policy. */
|
|
179
|
+
export interface BlobUrl {
|
|
180
|
+
readonly url: string;
|
|
181
|
+
}
|
|
144
182
|
/** An explicit inclusive byte range over an immutable object. */
|
|
145
183
|
export interface ByteRange {
|
|
146
184
|
readonly endInclusive: string;
|
|
147
185
|
readonly start: string;
|
|
148
186
|
}
|
|
149
|
-
/**
|
|
187
|
+
/** Customer-safe card-network display metadata reported by Stripe. */
|
|
188
|
+
export type CardBrand = "visa" | "mastercard" | "amex" | "discover" | "diners" | "jcb" | "unionpay" | "unknown";
|
|
189
|
+
/** One resolved sandbox compute dimension. */
|
|
150
190
|
export interface ComputeShape {
|
|
151
191
|
readonly memoryMiB: number;
|
|
152
192
|
readonly vcpus: number;
|
|
@@ -156,74 +196,34 @@ export interface ContentRef {
|
|
|
156
196
|
readonly sha256: string;
|
|
157
197
|
readonly sizeBytes: string;
|
|
158
198
|
}
|
|
159
|
-
/** The only
|
|
199
|
+
/** The only launch currency. */
|
|
160
200
|
export type Currency = "USD";
|
|
161
|
-
/** The
|
|
201
|
+
/** The single bounded read that fills the launch dashboard shell. */
|
|
162
202
|
export interface DashboardBootstrap {
|
|
163
|
-
readonly
|
|
203
|
+
readonly accountId: Id<"account">;
|
|
204
|
+
readonly accountState: AccountOperationalState;
|
|
164
205
|
readonly email: string;
|
|
165
206
|
readonly generatedAt: string;
|
|
166
|
-
readonly organizations: ReadonlyArray<Organization>;
|
|
167
207
|
readonly userId: Id<"user">;
|
|
168
|
-
readonly
|
|
208
|
+
readonly workspace: Workspace;
|
|
169
209
|
}
|
|
170
|
-
/** A
|
|
210
|
+
/** A rotated browser session returned exactly once. */
|
|
171
211
|
export interface DashboardSessionCredential {
|
|
172
212
|
readonly expiresAt: string;
|
|
173
213
|
readonly session: string;
|
|
174
214
|
readonly userId: Id<"user">;
|
|
175
215
|
}
|
|
176
|
-
/** Complete a browser sign-in
|
|
216
|
+
/** Complete a Google OAuth browser sign-in using PKCE-bound state. */
|
|
177
217
|
export interface DashboardSessionRequest {
|
|
178
218
|
readonly code: string;
|
|
179
219
|
readonly codeVerifier: string;
|
|
180
|
-
readonly provider: IdentityProvider;
|
|
181
220
|
readonly state: string;
|
|
182
221
|
}
|
|
183
|
-
/**
|
|
222
|
+
/** Minimal deletion marker returned while content cleanup runs. */
|
|
184
223
|
export interface DeletingSession {
|
|
185
224
|
readonly id: Id<"session">;
|
|
186
225
|
readonly operationId: Id<"operation">;
|
|
187
226
|
readonly startedAt: string;
|
|
188
|
-
readonly workspaceId: Id<"workspace">;
|
|
189
|
-
}
|
|
190
|
-
/** A pending device authorization the user must approve in a browser. */
|
|
191
|
-
export interface DeviceAuthorization {
|
|
192
|
-
readonly deviceCode: string;
|
|
193
|
-
readonly expiresAt: string;
|
|
194
|
-
readonly intervalSeconds: number;
|
|
195
|
-
readonly userCode: string;
|
|
196
|
-
readonly verificationUri: string;
|
|
197
|
-
readonly verificationUriComplete: string;
|
|
198
|
-
}
|
|
199
|
-
/** Begin the CLI device-authorization flow. */
|
|
200
|
-
export interface DeviceAuthorizationRequest {
|
|
201
|
-
readonly clientId: string;
|
|
202
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "organizations:read" | "organizations:write" | "memberships:read" | "memberships:write" | "memberships:accept" | "workspaces:read" | "workspaces:write" | "workspaces:delete" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "operations:read" | "operations:write" | "workspace:read" | "sessions:read" | "sessions:write" | "sessions:delete" | "files:live" | "resources:read" | "resources:write" | "provider_credentials:read" | "provider_credentials:write" | "telemetry:read" | "telemetry:write">;
|
|
203
|
-
}
|
|
204
|
-
/** What a person chose about a device authorization. */
|
|
205
|
-
export type DeviceDecision = "approve" | "deny";
|
|
206
|
-
/** Approve or deny a pending device authorization by its user code. */
|
|
207
|
-
export interface DeviceDecisionRequest {
|
|
208
|
-
readonly decision: DeviceDecision;
|
|
209
|
-
readonly userCode: string;
|
|
210
|
-
}
|
|
211
|
-
/** The recorded outcome of a device decision. */
|
|
212
|
-
export interface DeviceDecisionResult {
|
|
213
|
-
readonly decidedAt: string;
|
|
214
|
-
readonly decision: DeviceDecision;
|
|
215
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "organizations:read" | "organizations:write" | "memberships:read" | "memberships:write" | "memberships:accept" | "workspaces:read" | "workspaces:write" | "workspaces:delete" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "operations:read" | "operations:write" | "workspace:read" | "sessions:read" | "sessions:write" | "sessions:delete" | "files:live" | "resources:read" | "resources:write" | "provider_credentials:read" | "provider_credentials:write" | "telemetry:read" | "telemetry:write">;
|
|
216
|
-
}
|
|
217
|
-
/** An issued account token. */
|
|
218
|
-
export interface DeviceToken {
|
|
219
|
-
readonly accountToken: string;
|
|
220
|
-
readonly expiresAt: string;
|
|
221
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "organizations:read" | "organizations:write" | "memberships:read" | "memberships:write" | "memberships:accept" | "workspaces:read" | "workspaces:write" | "workspaces:delete" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "operations:read" | "operations:write" | "workspace:read" | "sessions:read" | "sessions:write" | "sessions:delete" | "files:live" | "resources:read" | "resources:write" | "provider_credentials:read" | "provider_credentials:write" | "telemetry:read" | "telemetry:write">;
|
|
222
|
-
}
|
|
223
|
-
/** Exchange an approved device code for an account token. */
|
|
224
|
-
export interface DeviceTokenRequest {
|
|
225
|
-
readonly clientId: string;
|
|
226
|
-
readonly deviceCode: string;
|
|
227
227
|
}
|
|
228
228
|
/** A short-lived signed grant for exactly one object and range. */
|
|
229
229
|
export interface DownloadGrant {
|
|
@@ -239,7 +239,7 @@ export interface DownloadGrant {
|
|
|
239
239
|
export interface EffectiveWorkspaceLimit {
|
|
240
240
|
readonly changedAt: string;
|
|
241
241
|
readonly effectiveValue: LimitValue;
|
|
242
|
-
readonly id: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "
|
|
242
|
+
readonly id: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "query.page" | "registry.entries" | "registry.value_bytes";
|
|
243
243
|
readonly revision: number;
|
|
244
244
|
readonly source: LimitSource;
|
|
245
245
|
}
|
|
@@ -265,17 +265,11 @@ export type ErrorDetails = (ErrorDetailsRequiredScope & {
|
|
|
265
265
|
readonly type: "operation";
|
|
266
266
|
}) | (ErrorDetailsValidation & {
|
|
267
267
|
readonly type: "validation";
|
|
268
|
-
}) | (ErrorDetailsGap & {
|
|
269
|
-
readonly type: "gap";
|
|
270
268
|
});
|
|
271
|
-
/** The telemetry gaps that blocked a completeness requirement. */
|
|
272
|
-
export interface ErrorDetailsGap {
|
|
273
|
-
readonly gapIds: ReadonlyArray<Id<"telemetry_gap">>;
|
|
274
|
-
}
|
|
275
269
|
/** The effective limit that was exceeded. */
|
|
276
270
|
export interface ErrorDetailsLimit {
|
|
277
271
|
readonly effective: string;
|
|
278
|
-
readonly limit: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "
|
|
272
|
+
readonly limit: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "query.page" | "registry.entries" | "registry.value_bytes";
|
|
279
273
|
readonly measured: string;
|
|
280
274
|
}
|
|
281
275
|
/** The original operation the replay resolved to. */
|
|
@@ -285,7 +279,7 @@ export interface ErrorDetailsOperation {
|
|
|
285
279
|
/** The quota dimension that was exhausted. */
|
|
286
280
|
export interface ErrorDetailsQuota {
|
|
287
281
|
readonly attempted: string;
|
|
288
|
-
readonly dimension: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "
|
|
282
|
+
readonly dimension: "context.tool_result_bytes" | "session.materialized_agents" | "session.initial_files_bytes" | "session.initial_files_count" | "session.agent_execution" | "session.run_budget" | "api.json_body" | "query.page" | "registry.entries" | "registry.value_bytes";
|
|
289
283
|
readonly used: string;
|
|
290
284
|
}
|
|
291
285
|
/** The authoritative placement of the workspace. */
|
|
@@ -295,7 +289,7 @@ export interface ErrorDetailsRegion {
|
|
|
295
289
|
}
|
|
296
290
|
/** The scope the credential lacks. */
|
|
297
291
|
export interface ErrorDetailsRequiredScope {
|
|
298
|
-
readonly scope: "account:read" | "account:write" | "
|
|
292
|
+
readonly scope: "account:read" | "account:write" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "sessions:read" | "sessions:write" | "sessions:delete" | "resources:read" | "resources:write";
|
|
299
293
|
}
|
|
300
294
|
/** How long to wait before retrying. */
|
|
301
295
|
export interface ErrorDetailsRetry {
|
|
@@ -306,46 +300,7 @@ export interface ErrorDetailsValidation {
|
|
|
306
300
|
readonly pointer: string;
|
|
307
301
|
readonly reason: string;
|
|
308
302
|
}
|
|
309
|
-
/**
|
|
310
|
-
export type ExportCompleteness = "require" | "allow_gaps";
|
|
311
|
-
/** The two export formats. Parquet is deliberately absent: its encoder is a
|
|
312
|
-
typed refusal pending a writer that can be pinned to byte-identical
|
|
313
|
-
output, and admitting an operation guaranteed to fail is worse than
|
|
314
|
-
refusing the request. Re-adding it is a wire change.
|
|
315
|
-
*/
|
|
316
|
-
export type ExportFormat = "ndjson" | "otlp_json";
|
|
317
|
-
/** What one export walks. Deliberately not an `ObservationQuery`: an export
|
|
318
|
-
has no caller-visible pagination, so a cursor, a limit and a walk
|
|
319
|
-
direction are meaningless states rather than states to refuse at runtime.
|
|
320
|
-
The partition list and the snapshot position are pinned at admission and
|
|
321
|
-
live on the export row, which is the only channel the task has.
|
|
322
|
-
*/
|
|
323
|
-
export interface ExportQuery {
|
|
324
|
-
readonly consistency?: ObservationConsistency;
|
|
325
|
-
readonly filter?: ObservationFilter;
|
|
326
|
-
readonly signal: ObservationSignal;
|
|
327
|
-
readonly timeRange: TimeRange;
|
|
328
|
-
}
|
|
329
|
-
/** Where an export is in its lifecycle. */
|
|
330
|
-
export type ExportStatus = "preparing" | "ready" | "failed" | "expired" | "revoked";
|
|
331
|
-
/** One file entry, identified by its normalized POSIX path. */
|
|
332
|
-
export interface FileEntry {
|
|
333
|
-
readonly mode: string;
|
|
334
|
-
readonly mtime: string;
|
|
335
|
-
readonly path: string;
|
|
336
|
-
readonly sha256?: string;
|
|
337
|
-
readonly sizeBytes: string;
|
|
338
|
-
readonly target?: string;
|
|
339
|
-
readonly type: FileEntryType;
|
|
340
|
-
}
|
|
341
|
-
/** One page of file entries. */
|
|
342
|
-
export interface FileEntryPage {
|
|
343
|
-
readonly items: ReadonlyArray<FileEntry>;
|
|
344
|
-
readonly nextCursor?: string;
|
|
345
|
-
}
|
|
346
|
-
/** What a file entry is. */
|
|
347
|
-
export type FileEntryType = "file" | "directory" | "symlink";
|
|
348
|
-
/** The guest network policy. */
|
|
303
|
+
/** The sandbox network policy. */
|
|
349
304
|
export interface HandsNetworkRequest {
|
|
350
305
|
readonly mode: NetworkMode;
|
|
351
306
|
}
|
|
@@ -359,32 +314,6 @@ export interface HttpHeader {
|
|
|
359
314
|
readonly name: string;
|
|
360
315
|
readonly value: string;
|
|
361
316
|
}
|
|
362
|
-
/** An external sign-in provider AEX links a person to. */
|
|
363
|
-
export type IdentityProvider = "google";
|
|
364
|
-
/** A pending invitation to join an organization. */
|
|
365
|
-
export interface Invitation {
|
|
366
|
-
readonly createdAt: string;
|
|
367
|
-
readonly email: string;
|
|
368
|
-
readonly expiresAt: string;
|
|
369
|
-
readonly id: Id<"invitation">;
|
|
370
|
-
readonly organizationId: Id<"organization">;
|
|
371
|
-
readonly resolvedAt?: string;
|
|
372
|
-
readonly role: InvitationRole;
|
|
373
|
-
readonly status: InvitationStatus;
|
|
374
|
-
}
|
|
375
|
-
/** What one acceptance redeemed. An invitation carries no secret, so acceptance names nothing: every pending invitation addressed to the caller's verified email is redeemed in one transaction. The list is empty when nothing was pending, which is what a repeated call answers. */
|
|
376
|
-
export interface InvitationAcceptResult {
|
|
377
|
-
readonly memberships: ReadonlyArray<Membership>;
|
|
378
|
-
}
|
|
379
|
-
/** Invite a person to an organization. */
|
|
380
|
-
export interface InvitationCreateRequest {
|
|
381
|
-
readonly email: string;
|
|
382
|
-
readonly role: InvitationRole;
|
|
383
|
-
}
|
|
384
|
-
/** The role an invitation grants; ownership is never invited. */
|
|
385
|
-
export type InvitationRole = "admin" | "member";
|
|
386
|
-
/** Where an invitation is in its lifecycle. */
|
|
387
|
-
export type InvitationStatus = "pending" | "accepted" | "revoked" | "expired";
|
|
388
317
|
/** A limit whose effective value is a map of named dimensions. */
|
|
389
318
|
export interface LimitMapValue {
|
|
390
319
|
readonly values: Readonly<Record<string, string>>;
|
|
@@ -401,116 +330,18 @@ export type LimitValue = (LimitScalarValue & {
|
|
|
401
330
|
}) | (LimitMapValue & {
|
|
402
331
|
readonly shape: "map";
|
|
403
332
|
});
|
|
404
|
-
/** One
|
|
405
|
-
export interface
|
|
406
|
-
readonly
|
|
407
|
-
readonly
|
|
408
|
-
readonly id: Id<"file_download">;
|
|
409
|
-
readonly partCount: number;
|
|
410
|
-
readonly partSizeBytes: number;
|
|
411
|
-
readonly parts: ReadonlyArray<LiveFileDownloadPart>;
|
|
412
|
-
readonly path: string;
|
|
413
|
-
readonly sessionId: Id<"session">;
|
|
414
|
-
readonly sha256: string;
|
|
415
|
-
readonly sizeBytes: string;
|
|
416
|
-
readonly state: LiveFileDownloadState;
|
|
417
|
-
readonly version: string;
|
|
418
|
-
readonly workspaceAccess: WorkspaceAccess;
|
|
419
|
-
}
|
|
420
|
-
/** Close an exact live-file descriptor after the SDK verified every part and the whole hash. */
|
|
421
|
-
export interface LiveFileDownloadCompleteRequest {
|
|
422
|
-
readonly sha256: string;
|
|
423
|
-
readonly version: string;
|
|
424
|
-
}
|
|
425
|
-
/** One fixed range and its expected digest in an exact live-file version. */
|
|
426
|
-
export interface LiveFileDownloadPart {
|
|
427
|
-
readonly offset: string;
|
|
428
|
-
readonly partNumber: number;
|
|
429
|
-
readonly sha256: string;
|
|
430
|
-
readonly sizeBytes: number;
|
|
431
|
-
}
|
|
432
|
-
/** Open one regular file without following a symlink, auto-resuming the same generation. */
|
|
433
|
-
export interface LiveFileDownloadRequest {
|
|
434
|
-
readonly ifGenerationId?: Id<"generation">;
|
|
435
|
-
readonly path: string;
|
|
436
|
-
}
|
|
437
|
-
/** Whether an exact-version live download is still open or fully verified. */
|
|
438
|
-
export type LiveFileDownloadState = "open" | "verified";
|
|
439
|
-
/** One live file entry plus what the read did to the workspace. */
|
|
440
|
-
export interface LiveFileEntry {
|
|
441
|
-
readonly entry: FileEntry;
|
|
442
|
-
readonly workspaceAccess: WorkspaceAccess;
|
|
443
|
-
}
|
|
444
|
-
/** One page of live file entries plus what the read did. */
|
|
445
|
-
export interface LiveFileEntryPage {
|
|
446
|
-
readonly items: ReadonlyArray<FileEntry>;
|
|
447
|
-
readonly nextCursor?: string;
|
|
448
|
-
readonly workspaceAccess: WorkspaceAccess;
|
|
449
|
-
}
|
|
450
|
-
/** List live workspace files, auto-resuming the same retained generation if suspended. */
|
|
451
|
-
export interface LiveFileListRequest {
|
|
452
|
-
readonly cursor?: string;
|
|
453
|
-
readonly ifGenerationId?: Id<"generation">;
|
|
454
|
-
readonly limit?: number;
|
|
455
|
-
readonly path?: string;
|
|
456
|
-
readonly recursive?: boolean;
|
|
457
|
-
}
|
|
458
|
-
/** Stat one live workspace file, auto-resuming the same retained generation if suspended. */
|
|
459
|
-
export interface LiveFileStatRequest {
|
|
460
|
-
readonly ifGenerationId?: Id<"generation">;
|
|
461
|
-
readonly path: string;
|
|
462
|
-
}
|
|
463
|
-
/** One resumable upload held only by the session's exact `MicroVM` generation. Suspension retains it; termination or runtime loss destroys it. */
|
|
464
|
-
export interface LiveFileUpload {
|
|
465
|
-
readonly expiresAt: string;
|
|
466
|
-
readonly generationId: Id<"generation">;
|
|
467
|
-
readonly id: Id<"file_upload">;
|
|
468
|
-
readonly mode: RegisteredFileMode;
|
|
469
|
-
readonly partCount: number;
|
|
470
|
-
readonly partSizeBytes: number;
|
|
471
|
-
readonly parts: ReadonlyArray<LiveFileUploadPart>;
|
|
472
|
-
readonly path: string;
|
|
473
|
-
readonly sessionId: Id<"session">;
|
|
474
|
-
readonly sha256: string;
|
|
475
|
-
readonly sizeBytes: string;
|
|
476
|
-
readonly state: LiveFileUploadState;
|
|
477
|
-
readonly workspaceAccess: WorkspaceAccess;
|
|
478
|
-
}
|
|
479
|
-
/** Create or exactly replay a resumable upload in the session's retained generation. */
|
|
480
|
-
export interface LiveFileUploadCreateRequest {
|
|
481
|
-
readonly ifGenerationId?: Id<"generation">;
|
|
482
|
-
readonly mode?: RegisteredFileMode;
|
|
483
|
-
readonly path: string;
|
|
484
|
-
readonly sha256: string;
|
|
485
|
-
readonly sizeBytes: string;
|
|
486
|
-
}
|
|
487
|
-
/** One verified logical part retained by the exact `MicroVM` generation. */
|
|
488
|
-
export interface LiveFileUploadPart {
|
|
489
|
-
readonly offset: string;
|
|
490
|
-
readonly partNumber: number;
|
|
491
|
-
readonly sha256: string;
|
|
492
|
-
readonly sizeBytes: number;
|
|
493
|
-
}
|
|
494
|
-
/** The generation-local position of one ephemeral upload. */
|
|
495
|
-
export type LiveFileUploadState = "staging" | "complete";
|
|
496
|
-
/** A person's role inside one organization. */
|
|
497
|
-
export interface Membership {
|
|
498
|
-
readonly createdAt: string;
|
|
499
|
-
readonly email: string;
|
|
500
|
-
readonly id: Id<"membership">;
|
|
501
|
-
readonly organizationId: Id<"organization">;
|
|
502
|
-
readonly role: OrganizationRole;
|
|
503
|
-
readonly status: MembershipStatus;
|
|
504
|
-
readonly userId: Id<"user">;
|
|
505
|
-
}
|
|
506
|
-
/** One page of memberships. */
|
|
507
|
-
export interface MembershipPage {
|
|
508
|
-
readonly items: ReadonlyArray<Membership>;
|
|
509
|
-
readonly nextCursor?: string;
|
|
333
|
+
/** One frozen MCP definition and its bounded tool namespace. */
|
|
334
|
+
export interface McpServer {
|
|
335
|
+
readonly name: string;
|
|
336
|
+
readonly transport: McpTransport;
|
|
510
337
|
}
|
|
511
|
-
/**
|
|
512
|
-
export type
|
|
513
|
-
|
|
338
|
+
/** The two admitted MCP transports. */
|
|
339
|
+
export type McpTransport = (RemoteMcpServer & {
|
|
340
|
+
readonly kind: "remote_http";
|
|
341
|
+
}) | (SandboxMcpServer & {
|
|
342
|
+
readonly kind: "sandbox_process";
|
|
343
|
+
});
|
|
344
|
+
/** One complete sealed message in immutable visibility order. */
|
|
514
345
|
export interface Message {
|
|
515
346
|
readonly content: ReadonlyArray<MessagePart>;
|
|
516
347
|
readonly createdAt: string;
|
|
@@ -518,12 +349,12 @@ export interface Message {
|
|
|
518
349
|
readonly role: MessageRole;
|
|
519
350
|
readonly sessionId: Id<"session">;
|
|
520
351
|
}
|
|
521
|
-
/** One page of complete
|
|
352
|
+
/** One page of complete messages. */
|
|
522
353
|
export interface MessagePage {
|
|
523
354
|
readonly items: ReadonlyArray<Message>;
|
|
524
355
|
readonly nextCursor?: string;
|
|
525
356
|
}
|
|
526
|
-
/** One part of a complete message.
|
|
357
|
+
/** One part of a complete committed message. */
|
|
527
358
|
export type MessagePart = (MessagePartText & {
|
|
528
359
|
readonly type: "text";
|
|
529
360
|
}) | (MessagePartToolCall & {
|
|
@@ -531,356 +362,103 @@ export type MessagePart = (MessagePartText & {
|
|
|
531
362
|
}) | (MessagePartToolResult & {
|
|
532
363
|
readonly type: "tool_result";
|
|
533
364
|
});
|
|
534
|
-
/**
|
|
365
|
+
/** Text content. */
|
|
535
366
|
export interface MessagePartText {
|
|
536
367
|
readonly text: string;
|
|
537
368
|
}
|
|
538
|
-
/**
|
|
369
|
+
/** Canonical provider-independent tool call. */
|
|
539
370
|
export interface MessagePartToolCall {
|
|
540
|
-
readonly
|
|
371
|
+
readonly arguments: JsonValue;
|
|
541
372
|
readonly id: Id<"tool_call">;
|
|
373
|
+
readonly name: string;
|
|
542
374
|
}
|
|
543
|
-
/**
|
|
375
|
+
/** Bounded tool result; large/full bytes remain at its sandbox path unless storage.persist explicitly registers them as a workspace file. */
|
|
544
376
|
export interface MessagePartToolResult {
|
|
545
377
|
readonly id: Id<"tool_call">;
|
|
546
|
-
readonly
|
|
378
|
+
readonly preview: string;
|
|
379
|
+
readonly sandboxPath?: string;
|
|
380
|
+
readonly sha256?: string;
|
|
381
|
+
readonly sizeBytes?: string;
|
|
382
|
+
readonly truncated: boolean;
|
|
547
383
|
}
|
|
548
|
-
/** Who produced a message. */
|
|
384
|
+
/** Who produced a committed message. */
|
|
549
385
|
export type MessageRole = "user" | "assistant" | "tool";
|
|
550
|
-
/**
|
|
386
|
+
/** Text-only user message; arbitrary files are referenced by mounted paths in this text. */
|
|
551
387
|
export interface MessageSendRequest {
|
|
552
388
|
readonly deadline?: string;
|
|
553
389
|
readonly maxSpendCents?: string;
|
|
390
|
+
readonly responseFormat?: ResponseFormat;
|
|
554
391
|
readonly text: string;
|
|
555
392
|
}
|
|
556
|
-
/** The admitted user message and
|
|
393
|
+
/** The admitted user message and session now processing it. */
|
|
557
394
|
export interface MessageSendResult {
|
|
558
395
|
readonly message: Message;
|
|
559
396
|
readonly session: Session;
|
|
560
397
|
}
|
|
561
|
-
/**
|
|
562
|
-
export
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
readonly
|
|
566
|
-
readonly
|
|
567
|
-
readonly
|
|
568
|
-
}
|
|
569
|
-
/** One page of aggregated groups plus the coverage they are complete over. */
|
|
570
|
-
export interface MetricAggregationPage {
|
|
571
|
-
readonly coverage: ObservationCoverage;
|
|
572
|
-
readonly items: ReadonlyArray<MetricAggregationGroup>;
|
|
573
|
-
readonly nextCursor?: string;
|
|
574
|
-
}
|
|
575
|
-
/** A bounded metric aggregation. */
|
|
576
|
-
export interface MetricAggregationRequest {
|
|
577
|
-
readonly calculation: MetricAggregationCalculation;
|
|
578
|
-
readonly cursor?: string;
|
|
579
|
-
readonly filter?: ObservationFilter;
|
|
580
|
-
readonly groupBy?: ReadonlyArray<string>;
|
|
581
|
-
readonly limit?: number;
|
|
582
|
-
readonly metric: string;
|
|
583
|
-
readonly timeRange: TimeRange;
|
|
584
|
-
}
|
|
585
|
-
/** A known hole in the ordered series. */
|
|
586
|
-
export interface MissingInterval {
|
|
587
|
-
readonly gapId: Id<"telemetry_gap">;
|
|
588
|
-
readonly range: TimeRange;
|
|
398
|
+
/** One bounded NDJSON assistant-stream frame. */
|
|
399
|
+
export interface MessageStreamFrame {
|
|
400
|
+
readonly kind: MessageStreamKind;
|
|
401
|
+
readonly message?: Message;
|
|
402
|
+
readonly messageId?: Id<"message">;
|
|
403
|
+
readonly sequence: string;
|
|
404
|
+
readonly text?: string;
|
|
589
405
|
}
|
|
406
|
+
/** Preview/commit reconciliation protocol. */
|
|
407
|
+
export type MessageStreamKind = "preview" | "committed" | "reconcile" | "gap" | "heartbeat";
|
|
590
408
|
/** An explicit provider and model pair; a model-only override is rejected. */
|
|
591
409
|
export interface ModelSelection {
|
|
592
|
-
readonly credentialId?: Id<"provider_credential">;
|
|
593
410
|
readonly model: string;
|
|
594
411
|
readonly provider: ProviderId;
|
|
595
412
|
}
|
|
596
|
-
/** What the
|
|
413
|
+
/** What the sandbox may reach. */
|
|
597
414
|
export type NetworkMode = "none" | "public_internet";
|
|
598
|
-
/** A freshly minted key
|
|
415
|
+
/** A freshly minted key; its value is returned once and never stored. */
|
|
599
416
|
export interface NewApiKey {
|
|
600
417
|
readonly createdAt: string;
|
|
601
418
|
readonly id: Id<"api_key">;
|
|
602
419
|
readonly name: string;
|
|
603
|
-
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "
|
|
420
|
+
readonly scopes: ReadonlyArray<"account:read" | "account:write" | "api_keys:read" | "api_keys:write" | "billing:read" | "billing:write" | "sessions:read" | "sessions:write" | "sessions:delete" | "resources:read" | "resources:write">;
|
|
604
421
|
readonly value: string;
|
|
605
422
|
readonly workspaceId: Id<"workspace">;
|
|
606
423
|
}
|
|
607
|
-
/**
|
|
608
|
-
export interface Observation {
|
|
609
|
-
readonly acceptedAt: string;
|
|
610
|
-
readonly body: JsonValue;
|
|
611
|
-
readonly id: Id<"observation">;
|
|
612
|
-
readonly observedAt: string;
|
|
613
|
-
readonly sequence: string;
|
|
614
|
-
readonly sessionId?: Id<"session">;
|
|
615
|
-
readonly signal: ObservationSignal;
|
|
616
|
-
readonly spanId?: string;
|
|
617
|
-
readonly traceId?: string;
|
|
618
|
-
readonly workspaceId: Id<"workspace">;
|
|
619
|
-
}
|
|
620
|
-
/** How much of the accepted series a read must observe. */
|
|
621
|
-
export type ObservationConsistency = "indexed" | "accepted";
|
|
622
|
-
/** What the answer is actually complete over. Never omitted. All four watermarks are accepted-time positions in epoch milliseconds (O-04). */
|
|
623
|
-
export interface ObservationCoverage {
|
|
624
|
-
readonly accepted: string;
|
|
625
|
-
readonly caughtUp: boolean;
|
|
626
|
-
readonly complete: boolean;
|
|
627
|
-
readonly earliestReplay: string;
|
|
628
|
-
readonly indexed: string;
|
|
629
|
-
readonly missingIntervals: ReadonlyArray<MissingInterval>;
|
|
630
|
-
readonly snapshot: string;
|
|
631
|
-
readonly unboundedGaps: ReadonlyArray<Id<"telemetry_gap">>;
|
|
632
|
-
}
|
|
633
|
-
/** A bounded filter AST. Structural bounds are enforced before construction. */
|
|
634
|
-
export type ObservationFilter = (ObservationFilterAll & {
|
|
635
|
-
readonly op: "all";
|
|
636
|
-
}) | (ObservationFilterAny & {
|
|
637
|
-
readonly op: "any";
|
|
638
|
-
}) | (ObservationFilterNot & {
|
|
639
|
-
readonly op: "not";
|
|
640
|
-
}) | (ObservationFilterCompare & {
|
|
641
|
-
readonly op: "compare";
|
|
642
|
-
}) | (ObservationFilterIn & {
|
|
643
|
-
readonly op: "in";
|
|
644
|
-
}) | (ObservationFilterExists & {
|
|
645
|
-
readonly op: "exists";
|
|
646
|
-
});
|
|
647
|
-
/** Every child must match. */
|
|
648
|
-
export interface ObservationFilterAll {
|
|
649
|
-
readonly filters: ReadonlyArray<ObservationFilter>;
|
|
650
|
-
}
|
|
651
|
-
/** At least one child must match. */
|
|
652
|
-
export interface ObservationFilterAny {
|
|
653
|
-
readonly filters: ReadonlyArray<ObservationFilter>;
|
|
654
|
-
}
|
|
655
|
-
/** A comparison against one field. */
|
|
656
|
-
export interface ObservationFilterCompare {
|
|
657
|
-
readonly field: string;
|
|
658
|
-
readonly operator: ObservationOperator;
|
|
659
|
-
readonly value: string;
|
|
660
|
-
}
|
|
661
|
-
/** Presence of a field. */
|
|
662
|
-
export interface ObservationFilterExists {
|
|
663
|
-
readonly field: string;
|
|
664
|
-
}
|
|
665
|
-
/** Membership of a bounded value set. */
|
|
666
|
-
export interface ObservationFilterIn {
|
|
667
|
-
readonly field: string;
|
|
668
|
-
readonly values: ReadonlyArray<string>;
|
|
669
|
-
}
|
|
670
|
-
/** The child must not match. */
|
|
671
|
-
export interface ObservationFilterNot {
|
|
672
|
-
readonly filters: ReadonlyArray<ObservationFilter>;
|
|
673
|
-
}
|
|
674
|
-
/** One NDJSON frame. `stream` and `listen` emit nothing else. */
|
|
675
|
-
export type ObservationFrame = (ObservationFrameRecords & {
|
|
676
|
-
readonly type: "records";
|
|
677
|
-
}) | (ObservationFrameGap & {
|
|
678
|
-
readonly type: "gap";
|
|
679
|
-
}) | (ObservationFrameCursor & {
|
|
680
|
-
readonly type: "cursor";
|
|
681
|
-
}) | (ObservationFrameRotate & {
|
|
682
|
-
readonly type: "rotate";
|
|
683
|
-
});
|
|
684
|
-
/** A resumable position. */
|
|
685
|
-
export interface ObservationFrameCursor {
|
|
686
|
-
readonly coverage: ObservationCoverage;
|
|
687
|
-
readonly cursor: string;
|
|
688
|
-
}
|
|
689
|
-
/** A gap surfaced inline; it is never silently skipped. */
|
|
690
|
-
export interface ObservationFrameGap {
|
|
691
|
-
readonly gap: TelemetryGap;
|
|
692
|
-
}
|
|
693
|
-
/** A batch of observations. The server splits before the effective frame bound. */
|
|
694
|
-
export interface ObservationFrameRecords {
|
|
695
|
-
readonly items: ReadonlyArray<Observation>;
|
|
696
|
-
}
|
|
697
|
-
/** The terminal condition after a 200. A stream always ends with a reason. */
|
|
698
|
-
export interface ObservationFrameRotate {
|
|
699
|
-
readonly cursor?: string;
|
|
700
|
-
readonly error?: ApiErrorBody;
|
|
701
|
-
readonly reason: RotateReason;
|
|
702
|
-
readonly retryable: boolean;
|
|
703
|
-
}
|
|
704
|
-
/** Capture the current accepted position and follow it. Origins are rejected. */
|
|
705
|
-
export interface ObservationListenRequest {
|
|
706
|
-
readonly filter?: ObservationFilter;
|
|
707
|
-
readonly signal: ObservationSignal;
|
|
708
|
-
}
|
|
709
|
-
/** The comparison operators a filter leaf may use. */
|
|
710
|
-
export type ObservationOperator = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "prefix";
|
|
711
|
-
/** Which direction a read walks the ordered series. */
|
|
712
|
-
export type ObservationOrder = "ascending" | "descending";
|
|
713
|
-
/** Exactly one origin. A stream that declares none or two is rejected. */
|
|
714
|
-
export type ObservationOrigin = (ObservationOriginCursor & {
|
|
715
|
-
readonly from: "cursor";
|
|
716
|
-
}) | (ObservationOriginTime & {
|
|
717
|
-
readonly from: "time";
|
|
718
|
-
}) | (ObservationOriginEarliest & {
|
|
719
|
-
readonly from: "earliest";
|
|
720
|
-
});
|
|
721
|
-
/** Resume from an exact prior position. */
|
|
722
|
-
export interface ObservationOriginCursor {
|
|
723
|
-
readonly cursor: string;
|
|
724
|
-
}
|
|
725
|
-
/** Start from the earliest replayable position. */
|
|
726
|
-
export type ObservationOriginEarliest = Readonly<Record<string, never>>;
|
|
727
|
-
/** Start from an instant. */
|
|
728
|
-
export interface ObservationOriginTime {
|
|
729
|
-
readonly at: string;
|
|
730
|
-
}
|
|
731
|
-
/** One page of observations plus the coverage it is complete over. */
|
|
732
|
-
export interface ObservationPage {
|
|
733
|
-
readonly coverage: ObservationCoverage;
|
|
734
|
-
readonly items: ReadonlyArray<Observation>;
|
|
735
|
-
readonly nextCursor?: string;
|
|
736
|
-
}
|
|
737
|
-
/** A bounded, paged observation read. */
|
|
738
|
-
export interface ObservationQuery {
|
|
739
|
-
readonly consistency?: ObservationConsistency;
|
|
740
|
-
readonly cursor?: string;
|
|
741
|
-
readonly filter?: ObservationFilter;
|
|
742
|
-
readonly limit?: number;
|
|
743
|
-
readonly order?: ObservationOrder;
|
|
744
|
-
readonly signal: ObservationSignal;
|
|
745
|
-
readonly timeRange: TimeRange;
|
|
746
|
-
}
|
|
747
|
-
/** The six observable signals. */
|
|
748
|
-
export type ObservationSignal = "events" | "logs" | "spans" | "metrics" | "traces" | "telemetry";
|
|
749
|
-
/** Replay from exactly one declared origin as NDJSON. */
|
|
750
|
-
export interface ObservationStreamRequest {
|
|
751
|
-
readonly filter?: ObservationFilter;
|
|
752
|
-
readonly origin: ObservationOrigin;
|
|
753
|
-
readonly signal: ObservationSignal;
|
|
754
|
-
}
|
|
755
|
-
/** A durable operation record. */
|
|
756
|
-
export interface Operation {
|
|
757
|
-
readonly cancelable: boolean;
|
|
758
|
-
readonly committedAt?: string;
|
|
759
|
-
readonly createdAt: string;
|
|
760
|
-
readonly error?: OperationFailure;
|
|
761
|
-
readonly id: Id<"operation">;
|
|
762
|
-
readonly kind: OperationKind;
|
|
763
|
-
readonly progress?: OperationProgress;
|
|
764
|
-
readonly result?: OperationResult;
|
|
765
|
-
readonly sessionId?: Id<"session">;
|
|
766
|
-
readonly startedAt?: string;
|
|
767
|
-
readonly status: OperationStatus;
|
|
768
|
-
readonly terminalAt?: string;
|
|
769
|
-
readonly updatedAt: string;
|
|
770
|
-
readonly workspaceId: Id<"workspace">;
|
|
771
|
-
}
|
|
772
|
-
/** A durable operation failure. It carries no synthetic request identity. */
|
|
773
|
-
export interface OperationFailure {
|
|
774
|
-
readonly code: "unauthenticated" | "forbidden" | "insufficient_scope" | "token_invalid" | "token_revoked" | "token_expired" | "malformed_token" | "authorization_pending" | "slow_down" | "not_found" | "gone" | "idempotency_conflict" | "idempotency_in_flight" | "api_key_secret_unavailable" | "operation_idempotency_conflict" | "invalid_request" | "invalid_scope" | "invalid_cursor" | "invalid_file_selection" | "invalid_range" | "unsupported_media_type" | "payload_too_large" | "limit_exceeded" | "session_not_idle" | "session_terminated" | "workspace_activation_required" | "workspace_not_live" | "session_deleting" | "session_deleted" | "deletion_in_progress" | "resource_conflict" | "last_owner_required" | "operation_not_cancelable" | "approval_not_found" | "approval_already_resolved" | "approval_binding_changed" | "file_not_found" | "content_missing" | "export_not_found" | "export_not_ready" | "export_expired" | "export_revoked" | "export_capacity" | "download_grant_expired" | "telemetry_payload_too_large" | "invalid_telemetry" | "telemetry_quota_exceeded" | "telemetry_incomplete" | "unsupported_export_signal" | "invalid_query" | "telemetry_query_budget_exhausted" | "invalid_metric_aggregation" | "invalid_network_policy" | "unsupported_package_ecosystem" | "package_resolution_failed" | "package_artifact_unavailable" | "package_integrity_mismatch" | "unknown_provider" | "unknown_model" | "provider_credential_not_found" | "provider_credential_revoked" | "invalid_auto_topup_policy" | "payment_method_required" | "authentication_unavailable" | "account_paused" | "account_state_unavailable" | "precondition_failed" | "wrong_workspace_region" | "observability_unavailable" | "usage_unavailable" | "rate_limited" | "upstream_error" | "workspace_provision_pending" | "commit_outcome_unknown" | "not_implemented" | "internal_error";
|
|
775
|
-
readonly detail?: JsonValue;
|
|
776
|
-
readonly retryable: boolean;
|
|
777
|
-
}
|
|
778
|
-
/** Every durable operation the platform admits. */
|
|
779
|
-
export type OperationKind = "session_cancel" | "session_suspend" | "session_resume" | "session_terminate" | "session_delete" | "telemetry_export" | "workspace_delete";
|
|
780
|
-
/** One page of durable operations. */
|
|
781
|
-
export interface OperationPage {
|
|
782
|
-
readonly items: ReadonlyArray<Operation>;
|
|
783
|
-
readonly nextCursor?: string;
|
|
784
|
-
}
|
|
785
|
-
/** Coarse progress; never a completion promise. */
|
|
786
|
-
export interface OperationProgress {
|
|
787
|
-
readonly completed?: string;
|
|
788
|
-
readonly phase: string;
|
|
789
|
-
readonly total?: string;
|
|
790
|
-
}
|
|
791
|
-
/** The typed successful result of a durable operation. */
|
|
792
|
-
export type OperationResult = (SessionCancelResult & {
|
|
793
|
-
readonly kind: "session_cancel";
|
|
794
|
-
}) | (SessionSuspendResult & {
|
|
795
|
-
readonly kind: "session_suspend";
|
|
796
|
-
}) | (SessionResumeResult & {
|
|
797
|
-
readonly kind: "session_resume";
|
|
798
|
-
}) | (SessionTerminateResult & {
|
|
799
|
-
readonly kind: "session_terminate";
|
|
800
|
-
}) | (SessionTombstone & {
|
|
801
|
-
readonly kind: "session_delete";
|
|
802
|
-
}) | (TelemetryExportResult & {
|
|
803
|
-
readonly kind: "telemetry_export";
|
|
804
|
-
}) | (WorkspaceTombstone & {
|
|
805
|
-
readonly kind: "workspace_delete";
|
|
806
|
-
});
|
|
807
|
-
/** Where a durable operation is in its lifecycle. */
|
|
808
|
-
export type OperationStatus = "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
809
|
-
/** Where a workspace operational state comes from. */
|
|
810
|
-
export type OperationalStateSource = "account";
|
|
811
|
-
/** The billing and ownership boundary. */
|
|
812
|
-
export interface Organization {
|
|
813
|
-
readonly callerRole: OrganizationRole;
|
|
814
|
-
readonly createdAt: string;
|
|
815
|
-
readonly id: Id<"organization">;
|
|
816
|
-
readonly name: string;
|
|
817
|
-
readonly slug: string;
|
|
818
|
-
}
|
|
819
|
-
/** One organization's operational state in a multi-organization dashboard snapshot. */
|
|
820
|
-
export interface OrganizationAccount {
|
|
821
|
-
readonly organizationId: Id<"organization">;
|
|
822
|
-
readonly state: AccountOperationalState;
|
|
823
|
-
}
|
|
824
|
-
/** Create an organization. */
|
|
825
|
-
export interface OrganizationCreateRequest {
|
|
826
|
-
readonly name: string;
|
|
827
|
-
}
|
|
828
|
-
/** One page of organizations. */
|
|
829
|
-
export interface OrganizationPage {
|
|
830
|
-
readonly items: ReadonlyArray<Organization>;
|
|
831
|
-
readonly nextCursor?: string;
|
|
832
|
-
}
|
|
833
|
-
/** The caller role inside one organization. */
|
|
834
|
-
export type OrganizationRole = "owner" | "admin" | "member";
|
|
835
|
-
/** The package ecosystems a session may pre-install from. */
|
|
424
|
+
/** Supported setup package ecosystems. */
|
|
836
425
|
export type PackageEcosystem = "apt" | "pip" | "npm";
|
|
837
|
-
/** One exactly
|
|
426
|
+
/** One exactly pinned setup package. */
|
|
838
427
|
export interface PackageRequest {
|
|
839
428
|
readonly ecosystem: PackageEcosystem;
|
|
840
429
|
readonly name: string;
|
|
841
430
|
readonly version: string;
|
|
842
431
|
}
|
|
843
|
-
/**
|
|
844
|
-
export interface
|
|
845
|
-
readonly
|
|
846
|
-
}
|
|
847
|
-
/** A BYOK provider-credential binding. The key material never appears here. */
|
|
848
|
-
export interface ProviderCredential {
|
|
432
|
+
/** Display-only metadata for one Stripe card; never PAN, CVC, or a client secret. */
|
|
433
|
+
export interface PaymentMethod {
|
|
434
|
+
readonly brand: CardBrand;
|
|
849
435
|
readonly createdAt: string;
|
|
850
|
-
readonly
|
|
851
|
-
readonly
|
|
852
|
-
readonly
|
|
853
|
-
readonly
|
|
854
|
-
readonly
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
readonly
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
export interface ProviderCredentialRegisterRequest {
|
|
866
|
-
readonly apiKey: string;
|
|
867
|
-
readonly name: string;
|
|
868
|
-
readonly provider: ProviderId;
|
|
436
|
+
readonly expiryMonth: number;
|
|
437
|
+
readonly expiryYear: number;
|
|
438
|
+
readonly id: Id<"payment_method">;
|
|
439
|
+
readonly isDefault: boolean;
|
|
440
|
+
readonly last4: string;
|
|
441
|
+
}
|
|
442
|
+
/** The bounded set of cards attached to the caller's account. */
|
|
443
|
+
export interface PaymentMethodPage {
|
|
444
|
+
readonly items: ReadonlyArray<PaymentMethod>;
|
|
445
|
+
}
|
|
446
|
+
/** Request a Stripe-hosted card setup session. */
|
|
447
|
+
export interface PaymentMethodSessionRequest {
|
|
448
|
+
readonly cancelUrl?: string;
|
|
449
|
+
readonly consent: boolean;
|
|
450
|
+
readonly successUrl?: string;
|
|
869
451
|
}
|
|
870
|
-
/**
|
|
871
|
-
export type
|
|
872
|
-
/** The eight customer-owned BYOK authorities. Gateway authorities use fixed endpoints; arbitrary base URLs are not accepted. */
|
|
873
|
-
export type ProviderId = "openai" | "anthropic" | "deepseek" | "zai" | "moonshotai" | "google" | "openrouter" | "vercel_ai_gateway";
|
|
452
|
+
/** The candidate official BYOK authorities. Only models admitted by the current Rig-backed catalog are selectable; arbitrary base URLs are not accepted. */
|
|
453
|
+
export type ProviderId = "openai" | "anthropic" | "deepseek" | "xai" | "meta" | "moonshotai" | "alibaba";
|
|
874
454
|
/** A registered file entry, complete. */
|
|
875
455
|
export interface RegisteredFile {
|
|
876
456
|
readonly createdAt: string;
|
|
457
|
+
readonly failureCode?: string;
|
|
877
458
|
readonly name: string;
|
|
878
|
-
readonly revision: number;
|
|
879
|
-
readonly sha256: string;
|
|
880
|
-
readonly sizeBytes: string;
|
|
881
459
|
readonly state: RegisteredState;
|
|
882
460
|
readonly updatedAt: string;
|
|
883
|
-
readonly value
|
|
461
|
+
readonly value?: RegisteredFileRead;
|
|
884
462
|
}
|
|
885
463
|
/** The two permitted registered-file modes. */
|
|
886
464
|
export type RegisteredFileMode = "0644" | "0755";
|
|
@@ -894,32 +472,33 @@ export interface RegisteredFileRead {
|
|
|
894
472
|
readonly content: ContentRef;
|
|
895
473
|
readonly mediaType: string;
|
|
896
474
|
readonly mode: RegisteredFileMode;
|
|
897
|
-
readonly mountPath: string;
|
|
898
475
|
}
|
|
899
476
|
/** One registered file as a collection row. A listing carries no value document; read the entry itself to get one. */
|
|
900
477
|
export interface RegisteredFileRow {
|
|
901
478
|
readonly createdAt: string;
|
|
479
|
+
readonly failureCode?: string;
|
|
902
480
|
readonly name: string;
|
|
903
|
-
readonly revision: number;
|
|
904
|
-
readonly sha256: string;
|
|
905
|
-
readonly sizeBytes: string;
|
|
906
481
|
readonly state: RegisteredState;
|
|
907
482
|
readonly updatedAt: string;
|
|
908
483
|
}
|
|
909
|
-
/** A registered file. */
|
|
484
|
+
/** A latest-only registered file replacement. */
|
|
910
485
|
export interface RegisteredFileValue {
|
|
911
486
|
readonly content: BlobInput;
|
|
912
487
|
readonly mediaType: string;
|
|
913
488
|
readonly mode: RegisteredFileMode;
|
|
914
|
-
readonly mountPath: string;
|
|
915
489
|
}
|
|
916
|
-
/**
|
|
917
|
-
export type RegisteredState = "
|
|
490
|
+
/** State of the single current value; prior values are never addressable. */
|
|
491
|
+
export type RegisteredState = "pending" | "ready" | "failed";
|
|
918
492
|
/** Mint a download grant for a registered file. */
|
|
919
493
|
export interface RegistryDownloadRequest {
|
|
920
494
|
readonly range?: ByteRange;
|
|
921
495
|
}
|
|
922
|
-
/**
|
|
496
|
+
/** A remote Streamable HTTP MCP server frozen at session setup and invoked on demand inside the sandbox. */
|
|
497
|
+
export interface RemoteMcpServer {
|
|
498
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
499
|
+
readonly url: string;
|
|
500
|
+
}
|
|
501
|
+
/** Complete provider-derived capacity of the frozen shape. */
|
|
923
502
|
export interface ResolvedCompute {
|
|
924
503
|
readonly baseline: ComputeShape;
|
|
925
504
|
readonly endpointBandwidthMBps: number;
|
|
@@ -928,74 +507,82 @@ export interface ResolvedCompute {
|
|
|
928
507
|
readonly peak: ComputeShape;
|
|
929
508
|
readonly size: "512mb" | "1gb" | "2gb" | "4gb" | "8gb";
|
|
930
509
|
}
|
|
931
|
-
/**
|
|
510
|
+
/** Customer-safe frozen session configuration; all plaintext secrets are omitted. */
|
|
932
511
|
export interface ResolvedConfig {
|
|
933
|
-
readonly
|
|
934
|
-
readonly compute: ResolvedCompute;
|
|
512
|
+
readonly compute?: ResolvedCompute;
|
|
935
513
|
readonly lifecycle: SessionLifecyclePolicy;
|
|
514
|
+
readonly mcpServerNames: ReadonlyArray<string>;
|
|
936
515
|
readonly model: string;
|
|
937
|
-
readonly network
|
|
516
|
+
readonly network?: ResolvedNetwork;
|
|
938
517
|
readonly packages: ReadonlyArray<PackageRequest>;
|
|
939
518
|
readonly provider: ProviderId;
|
|
940
|
-
readonly providerCredentialId: Id<"provider_credential">;
|
|
941
519
|
readonly registered: SessionRegisteredSelection;
|
|
520
|
+
readonly sandboxEnabled: boolean;
|
|
942
521
|
}
|
|
943
|
-
/**
|
|
522
|
+
/** Resolved sandbox network policy. */
|
|
944
523
|
export interface ResolvedNetwork {
|
|
945
524
|
readonly hands: HandsNetworkRequest;
|
|
946
525
|
}
|
|
947
|
-
/**
|
|
948
|
-
export
|
|
949
|
-
|
|
526
|
+
/** Optional native structured-output request; prompt emulation is never presented as strict. */
|
|
527
|
+
export interface ResponseFormat {
|
|
528
|
+
readonly kind: ResponseFormatKind;
|
|
529
|
+
readonly schema?: JsonValue;
|
|
530
|
+
}
|
|
531
|
+
/** Requested final response format. */
|
|
532
|
+
export type ResponseFormatKind = "text" | "json_schema";
|
|
533
|
+
/** An MCP process launched inside the sandbox after workspace materialization. */
|
|
534
|
+
export interface SandboxMcpServer {
|
|
535
|
+
readonly args?: ReadonlyArray<string>;
|
|
536
|
+
readonly command: string;
|
|
537
|
+
readonly environment?: Readonly<Record<string, string>>;
|
|
538
|
+
readonly workingDirectory?: string;
|
|
539
|
+
}
|
|
540
|
+
/** Observable preparation state of the session's single default-on sandbox. */
|
|
541
|
+
export type SandboxStatus = "disabled" | "requested" | "ready" | "suspending" | "suspended" | "resuming" | "lost";
|
|
542
|
+
/** The only public execution resource; sandbox loss never terminates agent state. */
|
|
950
543
|
export interface Session {
|
|
951
|
-
readonly activeDeadline?: string;
|
|
952
|
-
readonly activeMaxSpendCents?: string;
|
|
953
544
|
readonly activeMessageId?: Id<"message">;
|
|
954
545
|
readonly createdAt: string;
|
|
955
546
|
readonly expiresAt: string;
|
|
956
547
|
readonly id: Id<"session">;
|
|
957
|
-
readonly idleSince?: string;
|
|
958
|
-
readonly launchedAt: string;
|
|
959
548
|
readonly metadata?: Readonly<Record<string, string | number | boolean | null>>;
|
|
960
549
|
readonly resolvedConfig: ResolvedConfig;
|
|
961
550
|
readonly revision: number;
|
|
551
|
+
readonly sandboxStatus: SandboxStatus;
|
|
962
552
|
readonly status: SessionStatus;
|
|
963
|
-
readonly suspendAt?: string;
|
|
964
|
-
readonly suspendedAt?: string;
|
|
965
553
|
readonly terminatedAt?: string;
|
|
966
|
-
readonly terminationReason?: SessionTerminationReason;
|
|
967
554
|
readonly updatedAt: string;
|
|
968
555
|
readonly workspaceId: Id<"workspace">;
|
|
969
556
|
}
|
|
970
|
-
/**
|
|
971
|
-
export interface
|
|
972
|
-
readonly
|
|
557
|
+
/** Admission receipt for an asynchronous session command; there is no generic operations resource. */
|
|
558
|
+
export interface SessionCommandReceipt {
|
|
559
|
+
readonly acceptedAt: string;
|
|
560
|
+
readonly operationId: Id<"operation">;
|
|
973
561
|
readonly sessionId: Id<"session">;
|
|
974
|
-
readonly sessionRevision: number;
|
|
975
562
|
}
|
|
976
|
-
/** The
|
|
563
|
+
/** The single sandbox's bounded compute selector. */
|
|
977
564
|
export interface SessionComputeRequest {
|
|
978
565
|
readonly size?: "512mb" | "1gb" | "2gb" | "4gb" | "8gb";
|
|
979
566
|
}
|
|
980
|
-
/** Create
|
|
567
|
+
/** Create a durable session with a write-only BYOK key, frozen file/MCP config and a default-on eager sandbox. */
|
|
981
568
|
export interface SessionCreateRequest {
|
|
982
|
-
readonly
|
|
569
|
+
readonly expiresAt?: string;
|
|
570
|
+
readonly maxSpendCents?: string;
|
|
571
|
+
readonly mcpServers?: ReadonlyArray<McpServer>;
|
|
983
572
|
readonly metadata?: Readonly<Record<string, string | number | boolean | null>>;
|
|
984
573
|
readonly model: string;
|
|
985
|
-
readonly network?: SessionNetworkRequest;
|
|
986
|
-
readonly packages?: ReadonlyArray<PackageRequest>;
|
|
987
574
|
readonly provider: ProviderId;
|
|
988
|
-
readonly
|
|
575
|
+
readonly providerApiKey: string;
|
|
989
576
|
readonly registered?: SessionRegisteredSelection;
|
|
577
|
+
readonly sandbox?: SessionSandboxRequest;
|
|
990
578
|
}
|
|
991
|
-
/**
|
|
579
|
+
/** Immutable public session bounds; sandbox suspension is an internal lifecycle. */
|
|
992
580
|
export interface SessionLifecyclePolicy {
|
|
993
|
-
readonly idleSuspendAfterSeconds: number;
|
|
994
581
|
readonly maximumLifetimeSeconds: number;
|
|
995
|
-
readonly
|
|
996
|
-
readonly
|
|
582
|
+
readonly maximumSubagentDepth: number;
|
|
583
|
+
readonly maximumSubagents: number;
|
|
997
584
|
}
|
|
998
|
-
/**
|
|
585
|
+
/** Bounded collection projection. */
|
|
999
586
|
export interface SessionListItem {
|
|
1000
587
|
readonly activeMessageId?: Id<"message">;
|
|
1001
588
|
readonly createdAt: string;
|
|
@@ -1003,7 +590,7 @@ export interface SessionListItem {
|
|
|
1003
590
|
readonly id: Id<"session">;
|
|
1004
591
|
readonly model: string;
|
|
1005
592
|
readonly provider: ProviderId;
|
|
1006
|
-
readonly
|
|
593
|
+
readonly sandboxStatus: SandboxStatus;
|
|
1007
594
|
readonly status: SessionStatus;
|
|
1008
595
|
readonly updatedAt: string;
|
|
1009
596
|
readonly workspaceId: Id<"workspace">;
|
|
@@ -1013,174 +600,65 @@ export interface SessionListPage {
|
|
|
1013
600
|
readonly items: ReadonlyArray<SessionListItem>;
|
|
1014
601
|
readonly nextCursor?: string;
|
|
1015
602
|
}
|
|
1016
|
-
/** Network policy for the
|
|
603
|
+
/** Network policy for the one sandbox. */
|
|
1017
604
|
export interface SessionNetworkRequest {
|
|
1018
605
|
readonly hands: HandsNetworkRequest;
|
|
1019
606
|
}
|
|
1020
|
-
/**
|
|
607
|
+
/** Files resolved once at session admission; later workspace overwrites cannot mutate this manifest. */
|
|
1021
608
|
export interface SessionRegisteredSelection {
|
|
1022
|
-
readonly
|
|
1023
|
-
}
|
|
1024
|
-
/** The result of manually resuming the same retained generation to idle. */
|
|
1025
|
-
export interface SessionResumeResult {
|
|
1026
|
-
readonly changed: boolean;
|
|
1027
|
-
readonly resumedAt: string;
|
|
1028
|
-
readonly sessionId: Id<"session">;
|
|
1029
|
-
readonly sessionRevision: number;
|
|
1030
|
-
readonly status: SessionStatus;
|
|
1031
|
-
}
|
|
1032
|
-
/** What a session is doing right now. */
|
|
1033
|
-
export type SessionStatus = "idle" | "running" | "suspending" | "suspended" | "resuming" | "terminating" | "terminated" | "deleting";
|
|
1034
|
-
/** The result of manually suspending an idle session's exact retained generation. Active work must be cancelled first. */
|
|
1035
|
-
export interface SessionSuspendResult {
|
|
1036
|
-
readonly changed: boolean;
|
|
1037
|
-
readonly sessionId: Id<"session">;
|
|
1038
|
-
readonly sessionRevision: number;
|
|
1039
|
-
readonly suspendedAt: string;
|
|
609
|
+
readonly mounts: ReadonlyArray<WorkspaceFileMount>;
|
|
1040
610
|
}
|
|
1041
|
-
/**
|
|
1042
|
-
export interface
|
|
1043
|
-
readonly
|
|
1044
|
-
readonly
|
|
1045
|
-
readonly
|
|
1046
|
-
readonly
|
|
611
|
+
/** Default-on sandbox configuration; enabled=false creates no Hand. */
|
|
612
|
+
export interface SessionSandboxRequest {
|
|
613
|
+
readonly compute?: SessionComputeRequest;
|
|
614
|
+
readonly enabled?: boolean;
|
|
615
|
+
readonly network?: SessionNetworkRequest;
|
|
616
|
+
readonly packages?: ReadonlyArray<PackageRequest>;
|
|
1047
617
|
}
|
|
1048
|
-
/**
|
|
1049
|
-
export type
|
|
1050
|
-
/**
|
|
618
|
+
/** Customer-visible session lifecycle, independent of sandbox suspension. */
|
|
619
|
+
export type SessionStatus = "idle" | "running" | "terminating" | "terminated" | "deleting";
|
|
620
|
+
/** Minimal marker after irreversible deletion. */
|
|
1051
621
|
export interface SessionTombstone {
|
|
1052
622
|
readonly deletedAt: string;
|
|
1053
623
|
readonly id: Id<"session">;
|
|
1054
|
-
readonly operationId: Id<"operation">;
|
|
1055
|
-
readonly workspaceId: Id<"workspace">;
|
|
1056
|
-
}
|
|
1057
|
-
/** One immutable issued statement. The platform never rerenders history. */
|
|
1058
|
-
export interface Statement {
|
|
1059
|
-
readonly artifactHash: string;
|
|
1060
|
-
readonly currency: Currency;
|
|
1061
|
-
readonly id: Id<"statement">;
|
|
1062
|
-
readonly issuedAt: string;
|
|
1063
|
-
readonly lines: ReadonlyArray<StatementLine>;
|
|
1064
|
-
readonly organizationId: Id<"organization">;
|
|
1065
|
-
readonly period: TimeRange;
|
|
1066
|
-
readonly totalCents: string;
|
|
1067
|
-
}
|
|
1068
|
-
/** One priced category line. Lines sum exactly to the statement total. */
|
|
1069
|
-
export interface StatementLine {
|
|
1070
|
-
readonly category: UsageCategory;
|
|
1071
|
-
readonly totalCents: string;
|
|
1072
|
-
}
|
|
1073
|
-
/** The header of one immutable issued statement. */
|
|
1074
|
-
export interface StatementSummary {
|
|
1075
|
-
readonly artifactHash: string;
|
|
1076
|
-
readonly currency: Currency;
|
|
1077
|
-
readonly id: Id<"statement">;
|
|
1078
|
-
readonly issuedAt: string;
|
|
1079
|
-
readonly organizationId: Id<"organization">;
|
|
1080
|
-
readonly period: TimeRange;
|
|
1081
|
-
readonly totalCents: string;
|
|
1082
|
-
}
|
|
1083
|
-
/** One page of statement headers, newest first. */
|
|
1084
|
-
export interface StatementSummaryPage {
|
|
1085
|
-
readonly items: ReadonlyArray<StatementSummary>;
|
|
1086
|
-
readonly nextCursor?: string;
|
|
1087
|
-
}
|
|
1088
|
-
/** The AEX receipt returned alongside the standard OTLP response. */
|
|
1089
|
-
export interface TelemetryAdmissionReceipt {
|
|
1090
|
-
readonly accepted: string;
|
|
1091
|
-
readonly acceptedAt: string;
|
|
1092
|
-
readonly batchId: Id<"telemetry_batch">;
|
|
1093
|
-
readonly bytes: string;
|
|
1094
|
-
readonly rejected: string;
|
|
1095
624
|
}
|
|
1096
|
-
/**
|
|
1097
|
-
export interface
|
|
1098
|
-
readonly completeness: ExportCompleteness;
|
|
1099
|
-
readonly createdAt: string;
|
|
1100
|
-
readonly expiresAt?: string;
|
|
1101
|
-
readonly format: ExportFormat;
|
|
1102
|
-
readonly gapIds?: ReadonlyArray<Id<"telemetry_gap">>;
|
|
1103
|
-
readonly id: Id<"export">;
|
|
1104
|
-
readonly manifestHash?: string;
|
|
1105
|
-
readonly readyAt?: string;
|
|
1106
|
-
readonly revokedAt?: string;
|
|
1107
|
-
readonly sessionId?: Id<"session">;
|
|
1108
|
-
readonly sizeBytes?: string;
|
|
1109
|
-
readonly status: ExportStatus;
|
|
1110
|
-
readonly workspaceId: Id<"workspace">;
|
|
1111
|
-
}
|
|
1112
|
-
/** Admit a durable telemetry-export operation. */
|
|
1113
|
-
export interface TelemetryExportRequest {
|
|
1114
|
-
readonly completeness: ExportCompleteness;
|
|
1115
|
-
readonly format: ExportFormat;
|
|
1116
|
-
readonly query: ExportQuery;
|
|
1117
|
-
}
|
|
1118
|
-
/** The result of a telemetry-export operation. */
|
|
1119
|
-
export interface TelemetryExportResult {
|
|
625
|
+
/** Short-lived signed download for one immutable compressed telemetry export. */
|
|
626
|
+
export interface TelemetryDownloadGrant {
|
|
1120
627
|
readonly expiresAt: string;
|
|
1121
|
-
readonly
|
|
1122
|
-
readonly
|
|
1123
|
-
readonly
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
readonly detectedAt: string;
|
|
628
|
+
readonly mediaType: string;
|
|
629
|
+
readonly sha256: string;
|
|
630
|
+
readonly sizeBytes: string;
|
|
631
|
+
readonly url: string;
|
|
632
|
+
}
|
|
633
|
+
/** Select a bounded half-open telemetry export. */
|
|
634
|
+
export interface TelemetryDownloadRequest {
|
|
1129
635
|
readonly fromSequence?: string;
|
|
1130
|
-
readonly id: Id<"telemetry_gap">;
|
|
1131
|
-
readonly observationCount?: string;
|
|
1132
|
-
readonly reason: TelemetryGapReason;
|
|
1133
|
-
readonly recoverable: boolean;
|
|
1134
|
-
readonly repairSource?: string;
|
|
1135
|
-
readonly repairedAt?: string;
|
|
1136
|
-
readonly revision: number;
|
|
1137
|
-
readonly sessionId?: Id<"session">;
|
|
1138
|
-
readonly signals: ReadonlyArray<ObservationSignal>;
|
|
1139
|
-
readonly timeRange?: TimeRange;
|
|
1140
636
|
readonly toSequence?: string;
|
|
1141
|
-
readonly workspaceId: Id<"workspace">;
|
|
1142
|
-
}
|
|
1143
|
-
/** One page of recorded gaps. */
|
|
1144
|
-
export interface TelemetryGapPage {
|
|
1145
|
-
readonly items: ReadonlyArray<TelemetryGap>;
|
|
1146
|
-
readonly nextCursor?: string;
|
|
1147
637
|
}
|
|
1148
|
-
/**
|
|
1149
|
-
export interface
|
|
1150
|
-
readonly
|
|
1151
|
-
readonly
|
|
1152
|
-
readonly
|
|
1153
|
-
readonly
|
|
1154
|
-
readonly
|
|
638
|
+
/** One bounded normalized telemetry frame transmitted live and persisted in compressed S3 segments. */
|
|
639
|
+
export interface TelemetryFrame {
|
|
640
|
+
readonly body?: JsonValue;
|
|
641
|
+
readonly kind: TelemetryKind;
|
|
642
|
+
readonly occurredAt: string;
|
|
643
|
+
readonly preview?: string;
|
|
644
|
+
readonly sequence: string;
|
|
645
|
+
readonly spanId?: string;
|
|
646
|
+
readonly traceId?: string;
|
|
647
|
+
readonly truncated: boolean;
|
|
1155
648
|
}
|
|
1156
|
-
/**
|
|
1157
|
-
export type
|
|
649
|
+
/** Trusted live and retained session signals. */
|
|
650
|
+
export type TelemetryKind = "assistant" | "tool" | "runtime" | "log" | "span" | "usage" | "gap" | "heartbeat";
|
|
1158
651
|
/** A half-open instant range, `gte` inclusive and `lt` exclusive. */
|
|
1159
652
|
export interface TimeRange {
|
|
1160
653
|
readonly gte: string;
|
|
1161
654
|
readonly lt: string;
|
|
1162
655
|
}
|
|
1163
|
-
/**
|
|
656
|
+
/** Request a one-time Stripe-hosted prepaid top-up. */
|
|
1164
657
|
export interface TopUpCheckoutRequest {
|
|
1165
658
|
readonly amountCents: string;
|
|
1166
659
|
readonly cancelUrl?: string;
|
|
1167
660
|
readonly successUrl?: string;
|
|
1168
661
|
}
|
|
1169
|
-
/** One assembled trace and the observations it was assembled from. */
|
|
1170
|
-
export interface TraceDetail {
|
|
1171
|
-
readonly coverage: ObservationCoverage;
|
|
1172
|
-
readonly spans: ReadonlyArray<Observation>;
|
|
1173
|
-
readonly summary: TraceSummary;
|
|
1174
|
-
}
|
|
1175
|
-
/** The header of one assembled trace. */
|
|
1176
|
-
export interface TraceSummary {
|
|
1177
|
-
readonly endedAt: string;
|
|
1178
|
-
readonly rootName: string;
|
|
1179
|
-
readonly spanCount: string;
|
|
1180
|
-
readonly startedAt: string;
|
|
1181
|
-
readonly traceId: string;
|
|
1182
|
-
readonly workspaceId?: Id<"workspace">;
|
|
1183
|
-
}
|
|
1184
662
|
/** One staged multipart upload. Uploads are transport plumbing, not assets. */
|
|
1185
663
|
export interface Upload {
|
|
1186
664
|
readonly contentType: string;
|
|
@@ -1193,13 +671,20 @@ export interface Upload {
|
|
|
1193
671
|
readonly sizeBytes: string;
|
|
1194
672
|
readonly state: UploadState;
|
|
1195
673
|
}
|
|
674
|
+
/** One pending current-file overwrite and every bounded part grant needed to upload it; no extra public grant route exists. */
|
|
675
|
+
export interface UploadAdmission {
|
|
676
|
+
readonly grants: ReadonlyArray<UploadPartGrant>;
|
|
677
|
+
readonly upload: Upload;
|
|
678
|
+
}
|
|
1196
679
|
/** Complete a staged upload. */
|
|
1197
680
|
export interface UploadCompleteRequest {
|
|
1198
681
|
readonly parts: ReadonlyArray<UploadPart>;
|
|
1199
682
|
}
|
|
1200
|
-
/** Stage a large
|
|
683
|
+
/** Stage a large current workspace-file replacement. */
|
|
1201
684
|
export interface UploadCreateRequest {
|
|
1202
685
|
readonly contentType: string;
|
|
686
|
+
readonly name: string;
|
|
687
|
+
readonly parts: ReadonlyArray<UploadPartRequest>;
|
|
1203
688
|
readonly sha256: string;
|
|
1204
689
|
readonly sizeBytes: string;
|
|
1205
690
|
}
|
|
@@ -1215,21 +700,12 @@ export interface UploadPartGrant {
|
|
|
1215
700
|
readonly partNumber: number;
|
|
1216
701
|
readonly url: string;
|
|
1217
702
|
}
|
|
1218
|
-
/** The presigned grants for the requested parts. */
|
|
1219
|
-
export interface UploadPartGrants {
|
|
1220
|
-
readonly grants: ReadonlyArray<UploadPartGrant>;
|
|
1221
|
-
readonly uploadId: Id<"upload">;
|
|
1222
|
-
}
|
|
1223
703
|
/** One part to presign. The part's own SHA-256 is required because S3 verifies it on the way up and the completion manifest checks it again; the server never sees the bytes, so it cannot compute it. */
|
|
1224
704
|
export interface UploadPartRequest {
|
|
1225
705
|
readonly partNumber: number;
|
|
1226
706
|
readonly sha256: string;
|
|
1227
707
|
readonly sizeBytes: string;
|
|
1228
708
|
}
|
|
1229
|
-
/** Mint presigned PUT grants for the named parts. At most 1000 parts per call against the 10000-part ceiling, so a maximal upload needs at least ten calls. */
|
|
1230
|
-
export interface UploadPartsRequest {
|
|
1231
|
-
readonly parts: ReadonlyArray<UploadPartRequest>;
|
|
1232
|
-
}
|
|
1233
709
|
/** Where a staged upload is in its lifecycle. */
|
|
1234
710
|
export type UploadState = "staging" | "ready";
|
|
1235
711
|
/** One resource aggregate, discriminated by category. */
|
|
@@ -1342,51 +818,27 @@ export interface UsageStorageAggregate {
|
|
|
1342
818
|
readonly byteMinutes: string;
|
|
1343
819
|
readonly settlement: UsageSettlement;
|
|
1344
820
|
}
|
|
1345
|
-
/**
|
|
821
|
+
/** The account's fixed eu-west-1 execution and content boundary. */
|
|
1346
822
|
export interface Workspace {
|
|
1347
823
|
readonly apiUrl: string;
|
|
1348
824
|
readonly createdAt: string;
|
|
1349
|
-
readonly deletionOperationId?: Id<"operation">;
|
|
1350
825
|
readonly id: Id<"workspace">;
|
|
1351
826
|
readonly name: string;
|
|
1352
827
|
readonly operationalState: WorkspaceOperationalState;
|
|
1353
|
-
readonly organizationId: Id<"organization">;
|
|
1354
828
|
readonly region: "us-east-1" | "us-east-2" | "us-west-2" | "ap-northeast-1" | "eu-west-1";
|
|
1355
|
-
readonly slug: string;
|
|
1356
|
-
readonly status: WorkspaceStatus;
|
|
1357
829
|
}
|
|
1358
830
|
/** Which retained session generation answered a live workspace call. */
|
|
1359
831
|
export interface WorkspaceAccess {
|
|
1360
832
|
readonly generationId: Id<"generation">;
|
|
1361
833
|
readonly resumed: boolean;
|
|
1362
834
|
}
|
|
1363
|
-
/**
|
|
1364
|
-
export interface
|
|
835
|
+
/** Resolve one current workspace-file name to a private immutable hash and mount path at admission. */
|
|
836
|
+
export interface WorkspaceFileMount {
|
|
1365
837
|
readonly name: string;
|
|
1366
|
-
readonly
|
|
1367
|
-
readonly region: "us-east-1" | "us-east-2" | "us-west-2" | "ap-northeast-1" | "eu-west-1";
|
|
1368
|
-
}
|
|
1369
|
-
/** Admit the global workspace-deletion operation. */
|
|
1370
|
-
export interface WorkspaceDeleteRequest {
|
|
1371
|
-
readonly confirmation: Id<"workspace">;
|
|
838
|
+
readonly path: string;
|
|
1372
839
|
}
|
|
1373
|
-
/** The workspace
|
|
840
|
+
/** The fixed workspace's inherited personal-account state. */
|
|
1374
841
|
export interface WorkspaceOperationalState {
|
|
1375
|
-
readonly
|
|
1376
|
-
readonly organizationId: Id<"organization">;
|
|
842
|
+
readonly accountId: Id<"account">;
|
|
1377
843
|
readonly state: AccountOperationalState;
|
|
1378
844
|
}
|
|
1379
|
-
/** One page of workspaces. */
|
|
1380
|
-
export interface WorkspacePage {
|
|
1381
|
-
readonly items: ReadonlyArray<Workspace>;
|
|
1382
|
-
readonly nextCursor?: string;
|
|
1383
|
-
}
|
|
1384
|
-
/** Whether a workspace admits work. */
|
|
1385
|
-
export type WorkspaceStatus = "active" | "deleting";
|
|
1386
|
-
/** What remains of a deleted workspace. */
|
|
1387
|
-
export interface WorkspaceTombstone {
|
|
1388
|
-
readonly deletedAt: string;
|
|
1389
|
-
readonly operationId: Id<"operation">;
|
|
1390
|
-
readonly organizationId: Id<"organization">;
|
|
1391
|
-
readonly workspaceId: Id<"workspace">;
|
|
1392
|
-
}
|