@tangle-network/agent-interface 0.45.0 → 0.46.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 +1 -1
- package/dist/agent-candidate-profile-schema.d.ts +2 -2
- package/dist/agent-candidate-promotion-schema.d.ts +22 -22
- package/dist/agent-candidate-schema-common.js +1 -1
- package/dist/agent-candidate-schema.d.ts +2 -2
- package/dist/agent-execution-preparation.d.ts +26 -26
- package/dist/agent-profile.d.ts +10 -3
- package/dist/agent-profile.js +45 -22
- package/dist/backend-message.d.ts +14 -0
- package/dist/backend-message.js +1 -0
- package/dist/contract-limits.d.ts +26 -0
- package/dist/contract-limits.js +175 -0
- package/dist/environment-exact-process.d.ts +161 -0
- package/dist/environment-exact-process.js +1 -0
- package/dist/environment-profile-capabilities.d.ts +26 -0
- package/dist/environment-profile-capabilities.js +34 -0
- package/dist/environment-provider.d.ts +3 -730
- package/dist/environment-provider.js +3 -245
- package/dist/environment-requests.d.ts +70 -0
- package/dist/environment-requests.js +1 -0
- package/dist/environment-runtime.d.ts +834 -0
- package/dist/environment-runtime.js +228 -0
- package/dist/execution-types.d.ts +50 -0
- package/dist/execution-types.js +1 -0
- package/dist/host-services.d.ts +91 -0
- package/dist/host-services.js +1 -0
- package/dist/index.d.ts +10 -617
- package/dist/index.js +10 -125
- package/dist/interaction-answer-validation.d.ts +13 -0
- package/dist/interaction-answer-validation.js +149 -0
- package/dist/interaction-data.d.ts +22 -0
- package/dist/interaction-data.js +46 -0
- package/dist/interaction-envelope.d.ts +267 -0
- package/dist/interaction-envelope.js +247 -0
- package/dist/interaction-fields.d.ts +130 -0
- package/dist/interaction-fields.js +227 -0
- package/dist/interaction-permissions.d.ts +28 -0
- package/dist/interaction-permissions.js +57 -0
- package/dist/interaction-resolution-validation.d.ts +9 -0
- package/dist/interaction-resolution-validation.js +50 -0
- package/dist/interaction-response-validation.d.ts +17 -0
- package/dist/interaction-response-validation.js +102 -0
- package/dist/interaction.d.ts +6 -397
- package/dist/interaction.js +6 -603
- package/dist/mcp.d.ts +38 -0
- package/dist/mcp.js +1 -0
- package/dist/parts.d.ts +104 -0
- package/dist/parts.js +55 -0
- package/dist/portable-context-base.d.ts +82 -0
- package/dist/portable-context-base.js +63 -0
- package/dist/portable-context-continuation.d.ts +168 -0
- package/dist/portable-context-continuation.js +194 -0
- package/dist/portable-context-plan-request.d.ts +86 -0
- package/dist/portable-context-plan-request.js +102 -0
- package/dist/portable-context-plan.d.ts +229 -0
- package/dist/portable-context-plan.js +241 -0
- package/dist/portable-context-shared.d.ts +36 -0
- package/dist/portable-context-shared.js +46 -0
- package/dist/portable-context-transfer.d.ts +319 -0
- package/dist/portable-context-transfer.js +206 -0
- package/dist/portable-context.d.ts +5 -753
- package/dist/portable-context.js +5 -754
- package/dist/profile-diff.js +56 -47
- package/dist/provider-adapter.d.ts +45 -0
- package/dist/provider-adapter.js +1 -0
- package/dist/provider-config.d.ts +58 -0
- package/dist/provider-config.js +42 -0
- package/dist/runtime-control.d.ts +87 -10
- package/dist/runtime-control.js +159 -38
- package/dist/stream-events.d.ts +55 -0
- package/dist/stream-events.js +1 -0
- package/dist/workspace-branching-shared.d.ts +7 -0
- package/dist/workspace-branching-shared.js +20 -0
- package/dist/workspace-branching.d.ts +4 -254
- package/dist/workspace-branching.js +4 -400
- package/dist/workspace-checkpoint.d.ts +99 -0
- package/dist/workspace-checkpoint.js +169 -0
- package/dist/workspace-cleanup.d.ts +85 -0
- package/dist/workspace-cleanup.js +156 -0
- package/dist/workspace-confidentiality.d.ts +59 -0
- package/dist/workspace-confidentiality.js +123 -0
- package/dist/workspace-fork.d.ts +182 -0
- package/dist/workspace-fork.js +267 -0
- package/package.json +1 -1
|
@@ -1,730 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { InputPart, StreamEvent, TokenUsage } from "./index.js";
|
|
5
|
-
import { type InteractionAcknowledgement, type InteractionCapabilities, type InteractionResponseCommand } from "./interaction.js";
|
|
6
|
-
import { type ContextTransferReceipt, type ContextTransferRequest, type NativeContextBoundaryProof, type NativeContextContinuationRequest, type NativeContextContinuationTurn } from "./portable-context.js";
|
|
7
|
-
import { type AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunControlRef } from "./runtime-control.js";
|
|
8
|
-
import type { AgentWorkspaceBranching } from "./workspace-branching.js";
|
|
9
|
-
/** Portable profile reference: inline profile or provider catalog id. */
|
|
10
|
-
export type AgentProfileRef = AgentProfile | string;
|
|
11
|
-
export type AgentEnvironmentStatus = "pending" | "provisioning" | "running" | "stopped" | "failed" | "expired" | "unknown";
|
|
12
|
-
export type AgentSessionStatus = AgentEnvironmentStatus | "completed" | "cancelled";
|
|
13
|
-
export interface WorkspaceRequest {
|
|
14
|
-
/** Provider-specific environment/template id, for example "universal". */
|
|
15
|
-
environment?: string;
|
|
16
|
-
/** Container image or image alias when the provider supports image-backed workspaces. */
|
|
17
|
-
image?: string;
|
|
18
|
-
/** Repository to clone or mount before the agent runs. */
|
|
19
|
-
repoUrl?: string;
|
|
20
|
-
/** Git ref for {@link repoUrl}. */
|
|
21
|
-
gitRef?: string;
|
|
22
|
-
/** Initial working directory inside the environment. */
|
|
23
|
-
cwd?: string;
|
|
24
|
-
/** Opaque provider-native workspace fields. */
|
|
25
|
-
providerOptions?: Record<string, unknown>;
|
|
26
|
-
}
|
|
27
|
-
export interface ResourceRequest {
|
|
28
|
-
cpu?: number;
|
|
29
|
-
memoryMb?: number;
|
|
30
|
-
diskMb?: number;
|
|
31
|
-
gpu?: string;
|
|
32
|
-
providerOptions?: Record<string, unknown>;
|
|
33
|
-
}
|
|
34
|
-
export interface AgentEnvironmentQuery {
|
|
35
|
-
name?: string;
|
|
36
|
-
metadata?: Record<string, unknown>;
|
|
37
|
-
providerOptions?: Record<string, unknown>;
|
|
38
|
-
}
|
|
39
|
-
export interface AgentEnvironmentSummary {
|
|
40
|
-
id: string;
|
|
41
|
-
provider: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
status?: AgentEnvironmentStatus;
|
|
44
|
-
metadata?: Record<string, unknown>;
|
|
45
|
-
}
|
|
46
|
-
export interface ExecRequest {
|
|
47
|
-
cwd?: string;
|
|
48
|
-
env?: Record<string, string>;
|
|
49
|
-
timeoutMs?: number;
|
|
50
|
-
signal?: AbortSignal;
|
|
51
|
-
}
|
|
52
|
-
export interface ExecResult {
|
|
53
|
-
exitCode: number;
|
|
54
|
-
stdout: string;
|
|
55
|
-
stderr: string;
|
|
56
|
-
}
|
|
57
|
-
export type AgentExactProcessEgressMode = "blocked" | "strict";
|
|
58
|
-
/**
|
|
59
|
-
* Outbound network policy for an exact process environment. `blocked` denies
|
|
60
|
-
* every protocol. `strict` permits only the named domains; direct-address,
|
|
61
|
-
* alternate-protocol, and cross-environment bypasses must fail.
|
|
62
|
-
*/
|
|
63
|
-
export type AgentExactProcessEgressPolicy = {
|
|
64
|
-
mode: "blocked";
|
|
65
|
-
} | {
|
|
66
|
-
mode: "strict";
|
|
67
|
-
allowDomains: readonly string[];
|
|
68
|
-
};
|
|
69
|
-
/** Explicit portable limits for an exact process environment. */
|
|
70
|
-
export interface AgentExactProcessResources {
|
|
71
|
-
/** Positive CPU core count. */
|
|
72
|
-
cpu: number;
|
|
73
|
-
/** Positive integer mebibytes of memory. */
|
|
74
|
-
memoryMb: number;
|
|
75
|
-
/** Positive integer mebibytes of disk. */
|
|
76
|
-
diskMb: number;
|
|
77
|
-
}
|
|
78
|
-
/** Terminal or running state reported by an exact process host. */
|
|
79
|
-
export interface AgentExactProcessStatus {
|
|
80
|
-
pid: number;
|
|
81
|
-
running: boolean;
|
|
82
|
-
/** -1 while running; the exact process exit code after termination. */
|
|
83
|
-
exitCode: number;
|
|
84
|
-
exitSignal?: string;
|
|
85
|
-
/** Required after termination; absent only while running. */
|
|
86
|
-
termination?: AgentCandidateTermination;
|
|
87
|
-
}
|
|
88
|
-
/** Recoverable handle for one shell-free process. */
|
|
89
|
-
export interface AgentExactProcess {
|
|
90
|
-
readonly pid: number;
|
|
91
|
-
status(): Promise<AgentExactProcessStatus>;
|
|
92
|
-
wait(): Promise<AgentCandidateTermination>;
|
|
93
|
-
/** Force-stop the full process tree. Idempotent after the process exits. */
|
|
94
|
-
kill(): Promise<void>;
|
|
95
|
-
/** Each iteration replays buffered UTF-8 stdout, then continues until exit. */
|
|
96
|
-
stdout(): AsyncIterable<string>;
|
|
97
|
-
/** Each iteration replays buffered UTF-8 stderr, then continues until exit. */
|
|
98
|
-
stderr(): AsyncIterable<string>;
|
|
99
|
-
}
|
|
100
|
-
/** Shell-free launch whose environment replaces, rather than extends, ambient variables. */
|
|
101
|
-
export interface AgentExactProcessLaunch {
|
|
102
|
-
/** Absolute path unless {@link env} supplies an explicit `PATH`. */
|
|
103
|
-
executable: string;
|
|
104
|
-
args: readonly string[];
|
|
105
|
-
cwd: string;
|
|
106
|
-
env: Readonly<Record<string, string>>;
|
|
107
|
-
stdin?: string;
|
|
108
|
-
/** Positive integer milliseconds, or zero to disable the process timeout. */
|
|
109
|
-
timeoutMs: number;
|
|
110
|
-
}
|
|
111
|
-
export interface AgentExactProcessManager {
|
|
112
|
-
list(): Promise<AgentExactProcessStatus[]>;
|
|
113
|
-
get(pid: number): Promise<AgentExactProcess | null>;
|
|
114
|
-
/** Providers must honor the abort signal when supplied. */
|
|
115
|
-
spawn(input: AgentExactProcessLaunch, options?: {
|
|
116
|
-
signal?: AbortSignal;
|
|
117
|
-
}): Promise<AgentExactProcess>;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Fresh environment with no provider-managed user workload.
|
|
121
|
-
*
|
|
122
|
-
* Authenticated provider control services may exist, but no customer workload
|
|
123
|
-
* ingress or provider-managed user process may exist. The launched process
|
|
124
|
-
* sees only its supplied environment variables, with no ambient or injected
|
|
125
|
-
* secrets.
|
|
126
|
-
*/
|
|
127
|
-
export interface AgentExactProcessEnvironment {
|
|
128
|
-
readonly id: string;
|
|
129
|
-
readonly provider: string;
|
|
130
|
-
readonly metadata?: Record<string, unknown>;
|
|
131
|
-
readonly process: AgentExactProcessManager;
|
|
132
|
-
/** Write exact bytes to an absolute path with a POSIX mode from 0 through 07777. Providers must honor the abort signal when supplied. */
|
|
133
|
-
writeFile(path: string, bytes: Uint8Array, options: {
|
|
134
|
-
mode: number;
|
|
135
|
-
signal?: AbortSignal;
|
|
136
|
-
}): Promise<void>;
|
|
137
|
-
/** Read exact bytes or fail before content is loaded when the file exceeds maxBytes. */
|
|
138
|
-
readFile(path: string, options: {
|
|
139
|
-
maxBytes: number;
|
|
140
|
-
signal?: AbortSignal;
|
|
141
|
-
}): Promise<Uint8Array>;
|
|
142
|
-
destroy(): Promise<void>;
|
|
143
|
-
}
|
|
144
|
-
export interface AgentExactProcessEnvironmentQuery {
|
|
145
|
-
/** Every supplied key/value must match persisted environment metadata exactly. */
|
|
146
|
-
metadata?: Record<string, unknown>;
|
|
147
|
-
providerOptions?: Record<string, unknown>;
|
|
148
|
-
}
|
|
149
|
-
/** Input for a fresh environment with no provider-managed agent process. */
|
|
150
|
-
export interface CreateAgentExactProcessEnvironmentInput {
|
|
151
|
-
/** Provider-specific immutable image reference. */
|
|
152
|
-
image: string;
|
|
153
|
-
egress: AgentExactProcessEgressPolicy;
|
|
154
|
-
/** Positive integer milliseconds. */
|
|
155
|
-
maxLifetimeMs: number;
|
|
156
|
-
/** Positive integer milliseconds when supplied. */
|
|
157
|
-
provisionTimeoutMs?: number;
|
|
158
|
-
/** Required limits; exact execution never inherits provider defaults. */
|
|
159
|
-
resources: AgentExactProcessResources;
|
|
160
|
-
metadata: Record<string, unknown>;
|
|
161
|
-
idempotencyKey: string;
|
|
162
|
-
signal?: AbortSignal;
|
|
163
|
-
/** Provider-native fields may narrow, but never weaken, the isolation contract. */
|
|
164
|
-
providerOptions?: Record<string, unknown>;
|
|
165
|
-
}
|
|
166
|
-
/** Optional all-or-nothing exact process capability of an environment provider. */
|
|
167
|
-
export interface AgentExactProcessProvider {
|
|
168
|
-
/**
|
|
169
|
-
* Repeating the same idempotency key and input returns the same environment.
|
|
170
|
-
* Reusing the key with any different create input must fail.
|
|
171
|
-
* Unsupported egress modes must fail instead of weakening the policy.
|
|
172
|
-
*/
|
|
173
|
-
create(input: CreateAgentExactProcessEnvironmentInput): Promise<AgentExactProcessEnvironment>;
|
|
174
|
-
/** Ordinary environments must return null. */
|
|
175
|
-
get(id: string): Promise<AgentExactProcessEnvironment | null>;
|
|
176
|
-
/** Return every matching exact environment; providers own any native pagination. */
|
|
177
|
-
list(query?: AgentExactProcessEnvironmentQuery): Promise<AgentExactProcessEnvironment[]>;
|
|
178
|
-
}
|
|
179
|
-
export interface CheckpointRequest {
|
|
180
|
-
name?: string;
|
|
181
|
-
metadata?: Record<string, unknown>;
|
|
182
|
-
}
|
|
183
|
-
export interface CheckpointRef {
|
|
184
|
-
id: string;
|
|
185
|
-
provider?: string;
|
|
186
|
-
metadata?: Record<string, unknown>;
|
|
187
|
-
}
|
|
188
|
-
export interface ForkRequest {
|
|
189
|
-
name?: string;
|
|
190
|
-
metadata?: Record<string, unknown>;
|
|
191
|
-
}
|
|
192
|
-
export interface PlacementInfo {
|
|
193
|
-
kind: "local" | "sandbox" | "fleet" | "provider";
|
|
194
|
-
sandboxId?: string;
|
|
195
|
-
fleetId?: string;
|
|
196
|
-
machineId?: string;
|
|
197
|
-
region?: string;
|
|
198
|
-
providerMetadata?: Record<string, unknown>;
|
|
199
|
-
}
|
|
200
|
-
export interface AgentTurnInput {
|
|
201
|
-
prompt?: string;
|
|
202
|
-
parts?: InputPart[];
|
|
203
|
-
sessionId?: string;
|
|
204
|
-
model?: string;
|
|
205
|
-
timeoutMs?: number;
|
|
206
|
-
executionId?: string;
|
|
207
|
-
lastEventId?: string;
|
|
208
|
-
turnId?: string;
|
|
209
|
-
detach?: boolean;
|
|
210
|
-
/** Stable coordinates for a retained run when one already exists. */
|
|
211
|
-
controlRef?: AgentRunControlRef;
|
|
212
|
-
/** Approved portable history for a fresh provider session. */
|
|
213
|
-
contextTransfer?: ContextTransferRequest;
|
|
214
|
-
/** Verified same-session continuation; never carries duplicate history. */
|
|
215
|
-
nativeContinuation?: NativeContextContinuationRequest;
|
|
216
|
-
context?: Record<string, unknown>;
|
|
217
|
-
signal?: AbortSignal;
|
|
218
|
-
providerOptions?: Record<string, unknown>;
|
|
219
|
-
}
|
|
220
|
-
export interface AgentTurnResult {
|
|
221
|
-
text: string;
|
|
222
|
-
success: boolean;
|
|
223
|
-
error?: string;
|
|
224
|
-
sessionId?: string;
|
|
225
|
-
usage?: TokenUsage;
|
|
226
|
-
metadata?: Record<string, unknown>;
|
|
227
|
-
events?: AgentEnvironmentEvent[];
|
|
228
|
-
contextTransferReceipt?: ContextTransferReceipt;
|
|
229
|
-
}
|
|
230
|
-
/** Runtime validator for a provider turn returned from durable continuation. */
|
|
231
|
-
export declare const AgentTurnResultSchema: z.ZodObject<{
|
|
232
|
-
text: z.ZodString;
|
|
233
|
-
success: z.ZodBoolean;
|
|
234
|
-
error: z.ZodOptional<z.ZodString>;
|
|
235
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
236
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
237
|
-
inputTokens: z.ZodNumber;
|
|
238
|
-
outputTokens: z.ZodNumber;
|
|
239
|
-
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
240
|
-
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
241
|
-
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
242
|
-
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
243
|
-
cost: z.ZodOptional<z.ZodNumber>;
|
|
244
|
-
}, z.core.$strict>>;
|
|
245
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
246
|
-
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
247
|
-
type: z.ZodString;
|
|
248
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
249
|
-
id: z.ZodOptional<z.ZodString>;
|
|
250
|
-
normalized: z.ZodOptional<z.ZodType<StreamEvent, unknown, z.core.$ZodTypeInternals<StreamEvent, unknown>>>;
|
|
251
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
252
|
-
inputTokens: z.ZodNumber;
|
|
253
|
-
outputTokens: z.ZodNumber;
|
|
254
|
-
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
255
|
-
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
256
|
-
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
257
|
-
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
258
|
-
cost: z.ZodOptional<z.ZodNumber>;
|
|
259
|
-
}, z.core.$strict>>;
|
|
260
|
-
providerEvent: z.ZodOptional<z.ZodUnknown>;
|
|
261
|
-
}, z.core.$strict>>>;
|
|
262
|
-
contextTransferReceipt: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
263
|
-
status: z.ZodLiteral<"accepted" | "replayed">;
|
|
264
|
-
operationId: z.ZodString;
|
|
265
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
266
|
-
planDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
267
|
-
contextDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
268
|
-
destination: z.ZodObject<{
|
|
269
|
-
runner: z.ZodString;
|
|
270
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
271
|
-
model: z.ZodOptional<z.ZodString>;
|
|
272
|
-
profileDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
273
|
-
}, z.core.$strict>;
|
|
274
|
-
provider: z.ZodString;
|
|
275
|
-
environmentId: z.ZodString;
|
|
276
|
-
sessionId: z.ZodString;
|
|
277
|
-
sessionCreatedForOperationId: z.ZodString;
|
|
278
|
-
sessionCreatedAt: z.ZodISODateTime;
|
|
279
|
-
transferredMessageIds: z.ZodArray<z.ZodString>;
|
|
280
|
-
omittedMessageIds: z.ZodArray<z.ZodString>;
|
|
281
|
-
admittedAt: z.ZodISODateTime;
|
|
282
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
-
status: z.ZodLiteral<"accepted" | "replayed">;
|
|
284
|
-
operationId: z.ZodString;
|
|
285
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
286
|
-
planDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
287
|
-
contextDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
288
|
-
destination: z.ZodObject<{
|
|
289
|
-
runner: z.ZodString;
|
|
290
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
291
|
-
model: z.ZodOptional<z.ZodString>;
|
|
292
|
-
profileDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
293
|
-
}, z.core.$strict>;
|
|
294
|
-
provider: z.ZodString;
|
|
295
|
-
environmentId: z.ZodString;
|
|
296
|
-
sessionId: z.ZodString;
|
|
297
|
-
sessionCreatedForOperationId: z.ZodString;
|
|
298
|
-
sessionCreatedAt: z.ZodISODateTime;
|
|
299
|
-
transferredMessageIds: z.ZodArray<z.ZodString>;
|
|
300
|
-
omittedMessageIds: z.ZodArray<z.ZodString>;
|
|
301
|
-
admittedAt: z.ZodISODateTime;
|
|
302
|
-
}, z.core.$strict>], "status">>;
|
|
303
|
-
}, z.core.$strict>;
|
|
304
|
-
/** Durable provider result for one digest-bound native continuation operation. */
|
|
305
|
-
export declare const AgentNativeContextContinuationResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
306
|
-
acknowledgement: z.ZodIntersection<z.ZodObject<{
|
|
307
|
-
operationId: z.ZodString;
|
|
308
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
309
|
-
status: z.ZodEnum<{
|
|
310
|
-
conflict: "conflict";
|
|
311
|
-
accepted: "accepted";
|
|
312
|
-
transport_failure: "transport_failure";
|
|
313
|
-
replayed: "replayed";
|
|
314
|
-
boundary_mismatch: "boundary_mismatch";
|
|
315
|
-
unverified: "unverified";
|
|
316
|
-
unknown_session: "unknown_session";
|
|
317
|
-
}>;
|
|
318
|
-
historyMessagesSent: z.ZodNumber;
|
|
319
|
-
existingRequestDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
320
|
-
actualBoundary: z.ZodOptional<z.ZodObject<{
|
|
321
|
-
runId: z.ZodString;
|
|
322
|
-
provider: z.ZodString;
|
|
323
|
-
environmentId: z.ZodString;
|
|
324
|
-
sessionId: z.ZodString;
|
|
325
|
-
boundary: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
326
|
-
kind: z.ZodLiteral<"token">;
|
|
327
|
-
token: z.ZodString;
|
|
328
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
329
|
-
kind: z.ZodLiteral<"revision">;
|
|
330
|
-
revision: z.ZodString;
|
|
331
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
332
|
-
kind: z.ZodLiteral<"digest">;
|
|
333
|
-
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
334
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
335
|
-
kind: z.ZodLiteral<"messages">;
|
|
336
|
-
messageIds: z.ZodArray<z.ZodString>;
|
|
337
|
-
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
338
|
-
}, z.core.$strict>], "kind">;
|
|
339
|
-
observedAt: z.ZodISODateTime;
|
|
340
|
-
}, z.core.$strict>>;
|
|
341
|
-
message: z.ZodOptional<z.ZodString>;
|
|
342
|
-
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
343
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
344
|
-
status: z.ZodEnum<{
|
|
345
|
-
accepted: "accepted";
|
|
346
|
-
replayed: "replayed";
|
|
347
|
-
}>;
|
|
348
|
-
}, z.core.$strip>>;
|
|
349
|
-
result: z.ZodObject<{
|
|
350
|
-
text: z.ZodString;
|
|
351
|
-
success: z.ZodBoolean;
|
|
352
|
-
error: z.ZodOptional<z.ZodString>;
|
|
353
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
354
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
355
|
-
inputTokens: z.ZodNumber;
|
|
356
|
-
outputTokens: z.ZodNumber;
|
|
357
|
-
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
358
|
-
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
359
|
-
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
360
|
-
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
361
|
-
cost: z.ZodOptional<z.ZodNumber>;
|
|
362
|
-
}, z.core.$strict>>;
|
|
363
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
364
|
-
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
365
|
-
type: z.ZodString;
|
|
366
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
367
|
-
id: z.ZodOptional<z.ZodString>;
|
|
368
|
-
normalized: z.ZodOptional<z.ZodType<StreamEvent, unknown, z.core.$ZodTypeInternals<StreamEvent, unknown>>>;
|
|
369
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
370
|
-
inputTokens: z.ZodNumber;
|
|
371
|
-
outputTokens: z.ZodNumber;
|
|
372
|
-
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
373
|
-
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
374
|
-
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
375
|
-
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
376
|
-
cost: z.ZodOptional<z.ZodNumber>;
|
|
377
|
-
}, z.core.$strict>>;
|
|
378
|
-
providerEvent: z.ZodOptional<z.ZodUnknown>;
|
|
379
|
-
}, z.core.$strict>>>;
|
|
380
|
-
contextTransferReceipt: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
381
|
-
status: z.ZodLiteral<"accepted" | "replayed">;
|
|
382
|
-
operationId: z.ZodString;
|
|
383
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
384
|
-
planDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
385
|
-
contextDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
386
|
-
destination: z.ZodObject<{
|
|
387
|
-
runner: z.ZodString;
|
|
388
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
389
|
-
model: z.ZodOptional<z.ZodString>;
|
|
390
|
-
profileDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
391
|
-
}, z.core.$strict>;
|
|
392
|
-
provider: z.ZodString;
|
|
393
|
-
environmentId: z.ZodString;
|
|
394
|
-
sessionId: z.ZodString;
|
|
395
|
-
sessionCreatedForOperationId: z.ZodString;
|
|
396
|
-
sessionCreatedAt: z.ZodISODateTime;
|
|
397
|
-
transferredMessageIds: z.ZodArray<z.ZodString>;
|
|
398
|
-
omittedMessageIds: z.ZodArray<z.ZodString>;
|
|
399
|
-
admittedAt: z.ZodISODateTime;
|
|
400
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
401
|
-
status: z.ZodLiteral<"accepted" | "replayed">;
|
|
402
|
-
operationId: z.ZodString;
|
|
403
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
404
|
-
planDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
405
|
-
contextDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
406
|
-
destination: z.ZodObject<{
|
|
407
|
-
runner: z.ZodString;
|
|
408
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
409
|
-
model: z.ZodOptional<z.ZodString>;
|
|
410
|
-
profileDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
411
|
-
}, z.core.$strict>;
|
|
412
|
-
provider: z.ZodString;
|
|
413
|
-
environmentId: z.ZodString;
|
|
414
|
-
sessionId: z.ZodString;
|
|
415
|
-
sessionCreatedForOperationId: z.ZodString;
|
|
416
|
-
sessionCreatedAt: z.ZodISODateTime;
|
|
417
|
-
transferredMessageIds: z.ZodArray<z.ZodString>;
|
|
418
|
-
omittedMessageIds: z.ZodArray<z.ZodString>;
|
|
419
|
-
admittedAt: z.ZodISODateTime;
|
|
420
|
-
}, z.core.$strict>], "status">>;
|
|
421
|
-
}, z.core.$strict>;
|
|
422
|
-
controlRef: z.ZodObject<{
|
|
423
|
-
runId: z.ZodString;
|
|
424
|
-
provider: z.ZodString;
|
|
425
|
-
environmentId: z.ZodString;
|
|
426
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
427
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
428
|
-
requestDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
429
|
-
}, z.core.$strict>;
|
|
430
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
431
|
-
acknowledgement: z.ZodIntersection<z.ZodObject<{
|
|
432
|
-
operationId: z.ZodString;
|
|
433
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
434
|
-
status: z.ZodEnum<{
|
|
435
|
-
conflict: "conflict";
|
|
436
|
-
accepted: "accepted";
|
|
437
|
-
transport_failure: "transport_failure";
|
|
438
|
-
replayed: "replayed";
|
|
439
|
-
boundary_mismatch: "boundary_mismatch";
|
|
440
|
-
unverified: "unverified";
|
|
441
|
-
unknown_session: "unknown_session";
|
|
442
|
-
}>;
|
|
443
|
-
historyMessagesSent: z.ZodNumber;
|
|
444
|
-
existingRequestDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
445
|
-
actualBoundary: z.ZodOptional<z.ZodObject<{
|
|
446
|
-
runId: z.ZodString;
|
|
447
|
-
provider: z.ZodString;
|
|
448
|
-
environmentId: z.ZodString;
|
|
449
|
-
sessionId: z.ZodString;
|
|
450
|
-
boundary: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
451
|
-
kind: z.ZodLiteral<"token">;
|
|
452
|
-
token: z.ZodString;
|
|
453
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
454
|
-
kind: z.ZodLiteral<"revision">;
|
|
455
|
-
revision: z.ZodString;
|
|
456
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
457
|
-
kind: z.ZodLiteral<"digest">;
|
|
458
|
-
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
459
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
460
|
-
kind: z.ZodLiteral<"messages">;
|
|
461
|
-
messageIds: z.ZodArray<z.ZodString>;
|
|
462
|
-
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
463
|
-
}, z.core.$strict>], "kind">;
|
|
464
|
-
observedAt: z.ZodISODateTime;
|
|
465
|
-
}, z.core.$strict>>;
|
|
466
|
-
message: z.ZodOptional<z.ZodString>;
|
|
467
|
-
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
468
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
469
|
-
status: z.ZodEnum<{
|
|
470
|
-
conflict: "conflict";
|
|
471
|
-
transport_failure: "transport_failure";
|
|
472
|
-
boundary_mismatch: "boundary_mismatch";
|
|
473
|
-
unverified: "unverified";
|
|
474
|
-
unknown_session: "unknown_session";
|
|
475
|
-
}>;
|
|
476
|
-
}, z.core.$strip>>;
|
|
477
|
-
}, z.core.$strict>]>;
|
|
478
|
-
export type AgentNativeContextContinuationResult = z.infer<typeof AgentNativeContextContinuationResultSchema>;
|
|
479
|
-
/** Runtime-only controls kept outside the digest-bound user turn. */
|
|
480
|
-
export interface AgentNativeContextContinuationOptions {
|
|
481
|
-
turn: NativeContextContinuationTurn;
|
|
482
|
-
timeoutMs?: number;
|
|
483
|
-
signal?: AbortSignal;
|
|
484
|
-
}
|
|
485
|
-
/** Cross-check a successful result against its exact request and retained session. */
|
|
486
|
-
export declare function agentNativeContextContinuationResultMatchesRequest(request: NativeContextContinuationRequest, outcome: AgentNativeContextContinuationResult): boolean;
|
|
487
|
-
export interface AgentSessionRef {
|
|
488
|
-
id: string;
|
|
489
|
-
provider?: string;
|
|
490
|
-
controlRef?: AgentRunControlRef;
|
|
491
|
-
contextTransferReceipt?: ContextTransferReceipt;
|
|
492
|
-
metadata?: Record<string, unknown>;
|
|
493
|
-
}
|
|
494
|
-
export interface AgentEnvironmentEvent {
|
|
495
|
-
type: string;
|
|
496
|
-
data: Record<string, unknown>;
|
|
497
|
-
id?: string;
|
|
498
|
-
normalized?: StreamEvent;
|
|
499
|
-
usage?: TokenUsage;
|
|
500
|
-
providerEvent?: unknown;
|
|
501
|
-
}
|
|
502
|
-
export interface AgentSession {
|
|
503
|
-
readonly id: string;
|
|
504
|
-
readonly controlRef?: AgentRunControlRef;
|
|
505
|
-
status(): Promise<AgentSessionStatus | null>;
|
|
506
|
-
events(options?: {
|
|
507
|
-
/** Exclusive stable event id previously emitted by this session. */
|
|
508
|
-
since?: string;
|
|
509
|
-
/** Provider execution selected by the durable control reference, when required. */
|
|
510
|
-
executionId?: string;
|
|
511
|
-
signal?: AbortSignal;
|
|
512
|
-
}): AsyncIterable<AgentEnvironmentEvent>;
|
|
513
|
-
result(): Promise<AgentTurnResult>;
|
|
514
|
-
prompt(input: AgentTurnInput): Promise<AgentTurnResult>;
|
|
515
|
-
respondToInteraction?(command: InteractionResponseCommand, options?: {
|
|
516
|
-
signal?: AbortSignal;
|
|
517
|
-
}): Promise<InteractionAcknowledgement>;
|
|
518
|
-
contextBoundary?(options?: {
|
|
519
|
-
signal?: AbortSignal;
|
|
520
|
-
}): Promise<NativeContextBoundaryProof | null>;
|
|
521
|
-
/**
|
|
522
|
-
* Atomically verify the boundary and admit one digest-bound continuation.
|
|
523
|
-
* Repeating an operation id with the same request returns the original result;
|
|
524
|
-
* repeating it with a different request returns a conflict without dispatch.
|
|
525
|
-
*/
|
|
526
|
-
continueNative?(request: NativeContextContinuationRequest, options: AgentNativeContextContinuationOptions): Promise<AgentNativeContextContinuationResult>;
|
|
527
|
-
/** Retry-safe cancellation bound to one exact run and caller operation. */
|
|
528
|
-
cancelRun?(request: AgentRunCancellationRequest, options?: {
|
|
529
|
-
signal?: AbortSignal;
|
|
530
|
-
}): Promise<AgentRunCancellationAcknowledgement>;
|
|
531
|
-
cancel(): Promise<void>;
|
|
532
|
-
}
|
|
533
|
-
export interface AgentEnvironment {
|
|
534
|
-
readonly id: string;
|
|
535
|
-
readonly provider: string;
|
|
536
|
-
readonly name?: string;
|
|
537
|
-
status(): Promise<AgentEnvironmentStatus>;
|
|
538
|
-
stream(input: AgentTurnInput): AsyncIterable<AgentEnvironmentEvent>;
|
|
539
|
-
dispatch?(input: AgentTurnInput): Promise<AgentSessionRef>;
|
|
540
|
-
session?(id: string, options?: {
|
|
541
|
-
controlRef?: AgentRunControlRef;
|
|
542
|
-
}): AgentSession;
|
|
543
|
-
respondToInteraction?(command: InteractionResponseCommand, options?: {
|
|
544
|
-
signal?: AbortSignal;
|
|
545
|
-
}): Promise<InteractionAcknowledgement>;
|
|
546
|
-
read?(path: string, options?: {
|
|
547
|
-
sessionId?: string;
|
|
548
|
-
}): Promise<string>;
|
|
549
|
-
write?(path: string, content: string, options?: {
|
|
550
|
-
sessionId?: string;
|
|
551
|
-
}): Promise<void>;
|
|
552
|
-
exec?(command: string, options?: ExecRequest): Promise<ExecResult>;
|
|
553
|
-
checkpoint?(options?: CheckpointRequest): Promise<CheckpointRef>;
|
|
554
|
-
fork?(checkpoint: CheckpointRef, options?: ForkRequest): Promise<AgentEnvironment>;
|
|
555
|
-
/** Durable, retry-safe checkpoint and environment-fork operations. */
|
|
556
|
-
readonly workspaceBranching?: AgentWorkspaceBranching;
|
|
557
|
-
placement?(): Promise<PlacementInfo>;
|
|
558
|
-
refresh?(): Promise<void>;
|
|
559
|
-
destroy?(): Promise<void>;
|
|
560
|
-
}
|
|
561
|
-
export interface AgentEnvironmentCapabilities {
|
|
562
|
-
profile: AgentProfileCapabilities;
|
|
563
|
-
streaming: {
|
|
564
|
-
live: boolean;
|
|
565
|
-
replay: boolean;
|
|
566
|
-
detach: boolean;
|
|
567
|
-
turnIdempotency: boolean;
|
|
568
|
-
};
|
|
569
|
-
sessions: {
|
|
570
|
-
continue: boolean;
|
|
571
|
-
list: boolean;
|
|
572
|
-
messages: boolean;
|
|
573
|
-
};
|
|
574
|
-
/** Present only when every retained-run identity and retry promise is implemented. */
|
|
575
|
-
retainedControl?: {
|
|
576
|
-
exactRunIdentity: boolean;
|
|
577
|
-
resultIdentity: boolean;
|
|
578
|
-
eventIdentity: boolean;
|
|
579
|
-
cancellationIdempotency: boolean;
|
|
580
|
-
};
|
|
581
|
-
/** Absent when verified, retry-safe same-session continuation is unsupported. */
|
|
582
|
-
nativeContinuation?: {
|
|
583
|
-
/** Boundary comparison and operation admission are one atomic provider action. */
|
|
584
|
-
atomicBoundary: boolean;
|
|
585
|
-
/** Operation id + request digest recover retries and reject changed input. */
|
|
586
|
-
requestIdempotency: boolean;
|
|
587
|
-
};
|
|
588
|
-
/** Absent when the provider cannot originate or answer interactions. */
|
|
589
|
-
interactions?: InteractionCapabilities;
|
|
590
|
-
workspace: {
|
|
591
|
-
read: boolean;
|
|
592
|
-
write: boolean;
|
|
593
|
-
exec: boolean;
|
|
594
|
-
git: boolean;
|
|
595
|
-
upload: boolean;
|
|
596
|
-
download: boolean;
|
|
597
|
-
};
|
|
598
|
-
branching: {
|
|
599
|
-
checkpoint: boolean;
|
|
600
|
-
fork: boolean;
|
|
601
|
-
/** True only when key + canonical request digest semantics are implemented. */
|
|
602
|
-
retrySafe?: boolean;
|
|
603
|
-
/** True only when operations can be recovered by idempotency key. */
|
|
604
|
-
lookup?: boolean;
|
|
605
|
-
/** True only when checkpoints and forked environments have confirmed cleanup. */
|
|
606
|
-
cleanup?: boolean;
|
|
607
|
-
};
|
|
608
|
-
placement: boolean;
|
|
609
|
-
usage: boolean;
|
|
610
|
-
confidential: boolean;
|
|
611
|
-
/** Present only when {@link AgentEnvironmentProvider.exactProcess} is implemented. */
|
|
612
|
-
exactProcess?: {
|
|
613
|
-
egress: readonly AgentExactProcessEgressMode[];
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
/** Strict runtime validator for provider capability negotiation. */
|
|
617
|
-
export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
|
|
618
|
-
profile: z.ZodObject<{
|
|
619
|
-
namedProfiles: z.ZodBoolean;
|
|
620
|
-
systemPrompt: z.ZodObject<{
|
|
621
|
-
replace: z.ZodBoolean;
|
|
622
|
-
append: z.ZodBoolean;
|
|
623
|
-
}, z.core.$strict>;
|
|
624
|
-
instructions: z.ZodBoolean;
|
|
625
|
-
tools: z.ZodBoolean;
|
|
626
|
-
permissions: z.ZodBoolean;
|
|
627
|
-
mcp: z.ZodBoolean;
|
|
628
|
-
subagents: z.ZodBoolean;
|
|
629
|
-
resources: z.ZodObject<{
|
|
630
|
-
files: z.ZodBoolean;
|
|
631
|
-
instructions: z.ZodBoolean;
|
|
632
|
-
tools: z.ZodOptional<z.ZodBoolean>;
|
|
633
|
-
skills: z.ZodOptional<z.ZodBoolean>;
|
|
634
|
-
agents: z.ZodOptional<z.ZodBoolean>;
|
|
635
|
-
commands: z.ZodOptional<z.ZodBoolean>;
|
|
636
|
-
}, z.core.$strict>;
|
|
637
|
-
hooks: z.ZodOptional<z.ZodBoolean>;
|
|
638
|
-
modes: z.ZodOptional<z.ZodBoolean>;
|
|
639
|
-
runtimeUpdate: z.ZodBoolean;
|
|
640
|
-
validation: z.ZodBoolean;
|
|
641
|
-
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
642
|
-
}, z.core.$strict>;
|
|
643
|
-
streaming: z.ZodObject<{
|
|
644
|
-
live: z.ZodBoolean;
|
|
645
|
-
replay: z.ZodBoolean;
|
|
646
|
-
detach: z.ZodBoolean;
|
|
647
|
-
turnIdempotency: z.ZodBoolean;
|
|
648
|
-
}, z.core.$strict>;
|
|
649
|
-
sessions: z.ZodObject<{
|
|
650
|
-
continue: z.ZodBoolean;
|
|
651
|
-
list: z.ZodBoolean;
|
|
652
|
-
messages: z.ZodBoolean;
|
|
653
|
-
}, z.core.$strict>;
|
|
654
|
-
retainedControl: z.ZodOptional<z.ZodObject<{
|
|
655
|
-
exactRunIdentity: z.ZodBoolean;
|
|
656
|
-
resultIdentity: z.ZodBoolean;
|
|
657
|
-
eventIdentity: z.ZodBoolean;
|
|
658
|
-
cancellationIdempotency: z.ZodBoolean;
|
|
659
|
-
}, z.core.$strict>>;
|
|
660
|
-
nativeContinuation: z.ZodOptional<z.ZodObject<{
|
|
661
|
-
atomicBoundary: z.ZodBoolean;
|
|
662
|
-
requestIdempotency: z.ZodBoolean;
|
|
663
|
-
}, z.core.$strict>>;
|
|
664
|
-
interactions: z.ZodOptional<z.ZodObject<{
|
|
665
|
-
kinds: z.ZodArray<z.ZodString>;
|
|
666
|
-
answerFieldTypes: z.ZodArray<z.ZodEnum<{
|
|
667
|
-
number: "number";
|
|
668
|
-
boolean: "boolean";
|
|
669
|
-
text: "text";
|
|
670
|
-
select: "select";
|
|
671
|
-
secret: "secret";
|
|
672
|
-
}>>;
|
|
673
|
-
responseScopes: z.ZodArray<z.ZodEnum<{
|
|
674
|
-
interaction: "interaction";
|
|
675
|
-
session: "session";
|
|
676
|
-
persistent: "persistent";
|
|
677
|
-
}>>;
|
|
678
|
-
secretAnswers: z.ZodBoolean;
|
|
679
|
-
concurrentRequests: z.ZodBoolean;
|
|
680
|
-
replay: z.ZodBoolean;
|
|
681
|
-
responseIdempotency: z.ZodBoolean;
|
|
682
|
-
}, z.core.$strict>>;
|
|
683
|
-
workspace: z.ZodObject<{
|
|
684
|
-
read: z.ZodBoolean;
|
|
685
|
-
write: z.ZodBoolean;
|
|
686
|
-
exec: z.ZodBoolean;
|
|
687
|
-
git: z.ZodBoolean;
|
|
688
|
-
upload: z.ZodBoolean;
|
|
689
|
-
download: z.ZodBoolean;
|
|
690
|
-
}, z.core.$strict>;
|
|
691
|
-
branching: z.ZodObject<{
|
|
692
|
-
checkpoint: z.ZodBoolean;
|
|
693
|
-
fork: z.ZodBoolean;
|
|
694
|
-
retrySafe: z.ZodOptional<z.ZodBoolean>;
|
|
695
|
-
lookup: z.ZodOptional<z.ZodBoolean>;
|
|
696
|
-
cleanup: z.ZodOptional<z.ZodBoolean>;
|
|
697
|
-
}, z.core.$strict>;
|
|
698
|
-
placement: z.ZodBoolean;
|
|
699
|
-
usage: z.ZodBoolean;
|
|
700
|
-
confidential: z.ZodBoolean;
|
|
701
|
-
exactProcess: z.ZodOptional<z.ZodObject<{
|
|
702
|
-
egress: z.ZodArray<z.ZodEnum<{
|
|
703
|
-
blocked: "blocked";
|
|
704
|
-
strict: "strict";
|
|
705
|
-
}>>;
|
|
706
|
-
}, z.core.$strict>>;
|
|
707
|
-
}, z.core.$strict>;
|
|
708
|
-
export interface CreateAgentEnvironmentInput {
|
|
709
|
-
profile: AgentProfileRef;
|
|
710
|
-
/** Agent backend inside the provider, for example "opencode" or "codex". */
|
|
711
|
-
backend?: string;
|
|
712
|
-
workspace?: WorkspaceRequest;
|
|
713
|
-
resources?: ResourceRequest;
|
|
714
|
-
env?: Record<string, string>;
|
|
715
|
-
secrets?: string[] | Record<string, string>;
|
|
716
|
-
metadata?: Record<string, unknown>;
|
|
717
|
-
name?: string;
|
|
718
|
-
idempotencyKey?: string;
|
|
719
|
-
signal?: AbortSignal;
|
|
720
|
-
providerOptions?: Record<string, unknown>;
|
|
721
|
-
}
|
|
722
|
-
export interface AgentEnvironmentProvider {
|
|
723
|
-
readonly name: string;
|
|
724
|
-
readonly exactProcess?: AgentExactProcessProvider;
|
|
725
|
-
capabilities(): AgentEnvironmentCapabilities | Promise<AgentEnvironmentCapabilities>;
|
|
726
|
-
validateProfile?(profile: AgentProfileRef): AgentProfileValidationResult | Promise<AgentProfileValidationResult>;
|
|
727
|
-
create(input: CreateAgentEnvironmentInput): Promise<AgentEnvironment>;
|
|
728
|
-
get?(id: string): Promise<AgentEnvironment | null>;
|
|
729
|
-
list?(query?: AgentEnvironmentQuery): Promise<AgentEnvironmentSummary[]>;
|
|
730
|
-
}
|
|
1
|
+
export * from "./environment-requests.js";
|
|
2
|
+
export * from "./environment-exact-process.js";
|
|
3
|
+
export * from "./environment-runtime.js";
|