@tangle-network/agent-provider-tangle 0.14.1 → 0.14.2
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 +54 -54
- package/dist/tangle-interactive.d.ts +2 -2
- package/dist/tangle-interactive.js +95 -140
- package/dist/tangle-types.d.ts +36 -45
- package/dist/tangle-workspace-branching.js +290 -70
- package/package.json +9 -9
package/dist/tangle-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BackendRegistryEntry, BackendRegistryResponse, BackendType, CreateSandboxOptions, ExecResult as SandboxExecResult, PromptOptions, PromptResult, SandboxEvent } from "@tangle-network/sandbox";
|
|
2
|
-
import type { AgentRunCancellationAcknowledgement, AgentRunCancellationRequest,
|
|
2
|
+
import type { AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionAttach, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStatus, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, ConfidentialAttestation, ConfidentialExecutionEnvironment, InputPart, InteractionRequest, InteractionResponseCommand } from "@tangle-network/agent-interface";
|
|
3
3
|
import type { AgentEnvironmentCapabilities, AgentEnvironmentProvider, CreateAgentEnvironmentInput } from "@tangle-network/agent-interface/environment-provider";
|
|
4
4
|
/**
|
|
5
5
|
* The platform verdict for the create call that returned a sandbox.
|
|
@@ -335,57 +335,45 @@ export interface SandboxTerminalsLike {
|
|
|
335
335
|
handlers?: SandboxTerminalHandlersLike;
|
|
336
336
|
}): Promise<SandboxTerminalStreamLike>;
|
|
337
337
|
}
|
|
338
|
-
/**
|
|
339
|
-
export
|
|
340
|
-
sessionId: string;
|
|
341
|
-
harness: BackendType;
|
|
342
|
-
startedAt: string;
|
|
343
|
-
/** Provider-issued process incarnation. Replays return this exact value. */
|
|
344
|
-
incarnationId: string;
|
|
345
|
-
/** Canonical provider admission receipt for the effective route. */
|
|
346
|
-
preparationReceipt: AgentExecutionPreparationReceipt;
|
|
347
|
-
}
|
|
348
|
-
/** Start acknowledgement from the canonical Sandbox interactive API. */
|
|
349
|
-
export interface SandboxInteractiveSessionInfoLike extends SandboxInteractiveSessionIdentityLike {
|
|
350
|
-
streamUrl: string;
|
|
351
|
-
}
|
|
352
|
-
/** Lifecycle returned by the Sandbox exact interactive-session route. */
|
|
353
|
-
export type SandboxInteractiveSessionStatusLike = (SandboxInteractiveSessionInfoLike & {
|
|
338
|
+
/** Start result returned by the Sandbox exact interactive-session route. */
|
|
339
|
+
export type SandboxInteractiveSessionStartResultLike = {
|
|
354
340
|
state: "running";
|
|
355
|
-
|
|
341
|
+
ref: AgentInteractiveSessionRef;
|
|
342
|
+
control: AgentInteractiveSessionControlClaim;
|
|
343
|
+
streamUrl: string;
|
|
344
|
+
} | {
|
|
356
345
|
state: "exited";
|
|
346
|
+
ref: AgentInteractiveSessionRef;
|
|
347
|
+
control: AgentInteractiveSessionControlClaim;
|
|
357
348
|
endedAt: string;
|
|
358
349
|
exitCode?: number;
|
|
359
350
|
exitSignal?: string;
|
|
360
351
|
reason: "exited" | "stopped" | "lost";
|
|
361
|
-
}
|
|
352
|
+
};
|
|
362
353
|
/** Existing Sandbox SDK handle for one coding harness's native TUI. */
|
|
363
354
|
export interface SandboxInteractiveSessionLike {
|
|
364
|
-
start(
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
validateControl(control: AgentInteractiveSessionControlClaim): Promise<void>;
|
|
387
|
-
sendPrompt(command: AgentInteractiveSessionPromptCommand): Promise<AgentInteractiveSessionPromptAcknowledgement>;
|
|
388
|
-
stop(command: AgentInteractiveSessionStopCommand): Promise<AgentInteractiveSessionStopAcknowledgement>;
|
|
355
|
+
start(request: AgentInteractiveSessionStart, options?: {
|
|
356
|
+
signal?: AbortSignal;
|
|
357
|
+
}): Promise<SandboxInteractiveSessionStartResultLike>;
|
|
358
|
+
claimControl(request: AgentInteractiveSessionControlClaimRequest, options?: {
|
|
359
|
+
signal?: AbortSignal;
|
|
360
|
+
}): Promise<AgentInteractiveSessionControlClaimAcknowledgement>;
|
|
361
|
+
status(options?: {
|
|
362
|
+
signal?: AbortSignal;
|
|
363
|
+
}): Promise<AgentInteractiveSessionStatus | null>;
|
|
364
|
+
attachAgentTerminal(request: AgentInteractiveSessionAttach, options?: {
|
|
365
|
+
signal?: AbortSignal;
|
|
366
|
+
}): Promise<AgentInteractiveTerminalSession>;
|
|
367
|
+
/** Confirm that this claim is still the current writable generation. */
|
|
368
|
+
validateControl(control: AgentInteractiveSessionControlClaim, options?: {
|
|
369
|
+
signal?: AbortSignal;
|
|
370
|
+
}): Promise<void>;
|
|
371
|
+
sendPrompt(command: AgentInteractiveSessionPromptCommand, options?: {
|
|
372
|
+
signal?: AbortSignal;
|
|
373
|
+
}): Promise<AgentInteractiveSessionPromptAcknowledgement>;
|
|
374
|
+
stop(command: AgentInteractiveSessionStopCommand, options?: {
|
|
375
|
+
signal?: AbortSignal;
|
|
376
|
+
}): Promise<AgentInteractiveSessionStopAcknowledgement>;
|
|
389
377
|
}
|
|
390
378
|
export interface SandboxInstanceLike {
|
|
391
379
|
id: string;
|
|
@@ -502,7 +490,10 @@ export interface SandboxInstanceLike {
|
|
|
502
490
|
export interface SandboxSessionLike {
|
|
503
491
|
readonly id: string;
|
|
504
492
|
/** Exact native coding-agent TUI bound to this session id. */
|
|
505
|
-
interactive?(
|
|
493
|
+
interactive?(options?: {
|
|
494
|
+
ref?: AgentInteractiveSessionRef;
|
|
495
|
+
control?: AgentInteractiveSessionControlClaim;
|
|
496
|
+
}): unknown;
|
|
506
497
|
status(options?: {
|
|
507
498
|
signal?: AbortSignal;
|
|
508
499
|
}): Promise<unknown | null>;
|