@tangle-network/sandbox 1.0.146 → 1.0.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +3 -3
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +1 -1
  5. package/dist/{agent-run-outcome-uTC8fZDn.d.ts → agent-run-outcome-YZOY61uG.d.ts} +2 -2
  6. package/dist/auth/index.js +2 -2
  7. package/dist/{browser-interactive-control-controller-l4Yqgoug.js → browser-interactive-control-controller-CRCRI6x5.js} +15 -15
  8. package/dist/{browser-interactive-control-controller-CLxkpYNV.d.ts → browser-interactive-control-controller-DdtXzO5r.d.ts} +1 -1
  9. package/dist/cli-auth-bundle-i9Gg9P_C.js +2 -0
  10. package/dist/{cli-auth-bundle-CCi5yJ_D-5w0ql9ee.js → cli-auth-bundle-juH6LDo9-D1SaRyqA.js} +89 -27
  11. package/dist/{client-D9gvWAUR.js → client-COtiO9sl.js} +5 -5
  12. package/dist/{client-BzNqxL8v.d.ts → client-CXoRiPqY.d.ts} +35 -5
  13. package/dist/{core-BZp0z9Y9.js → core-j2Z95g2R.js} +4 -4
  14. package/dist/core.d.ts +6 -6
  15. package/dist/core.js +3 -3
  16. package/dist/{harness-Cgp9jduT.js → harness-BhAJqO2u.js} +6 -7
  17. package/dist/{index-BkL4InBJ.d.ts → index-Vn_rYk5C.d.ts} +5 -5
  18. package/dist/index.d.ts +9 -9
  19. package/dist/index.js +7 -7
  20. package/dist/interactive-control.d.ts +1 -1
  21. package/dist/interactive-control.js +1 -1
  22. package/dist/{interactive-controller-OfunwCqc.d.ts → interactive-controller-gJULGNKn.d.ts} +3 -3
  23. package/dist/{interactive-controller-CTKFnVTy.js → interactive-controller-vW55gCE7.js} +5 -4
  24. package/dist/{lines-QmDOwLnM.d.ts → lines-9g9dTW5t.d.ts} +1 -1
  25. package/dist/lines.d.ts +1 -1
  26. package/dist/{local-cli-auth-BKPsZonH.js → local-cli-auth-CjyRzRmz.js} +1 -1
  27. package/dist/{preview-BSIiT_Dk.d.ts → preview-D-uzBtP0.d.ts} +3 -3
  28. package/dist/{profile-schema-nys6Qejd.js → profile-schema-Y5Xl8aOt.js} +8 -8
  29. package/dist/{public-templates-CYws5jq5.d.ts → public-templates-DAp2vpqB.d.ts} +2 -2
  30. package/dist/public-templates.d.ts +1 -1
  31. package/dist/runtime.d.ts +5 -5
  32. package/dist/runtime.js +2 -2
  33. package/dist/{sandbox-Jbfqj2qv.js → sandbox-CDa23zXk.js} +33 -162
  34. package/dist/select-seat-command.d.ts +1 -1
  35. package/dist/tangle/index.d.ts +1 -1
  36. package/dist/tangle/index.js +1 -1
  37. package/dist/{tangle-WUsoz1QJ.js → tangle-BLujQYVN.js} +1 -1
  38. package/dist/{terminal-stream-types-8-sAl2J0.d.ts → terminal-stream-types-5kBchrj3.d.ts} +22 -17
  39. package/dist/{types-_cK3Fibu.d.ts → types-CeTsbEjb.d.ts} +30 -11
  40. package/package.json +5 -5
  41. package/dist/cli-auth-bundle-CUi_Sbeh.js +0 -2
@@ -1,6 +1,6 @@
1
- import { C as boundedIdentifierSchema, T as boundedJsonSchema, o as canonicalCandidateDigest } from "./harness-Cgp9jduT.js";
2
- import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-l4Yqgoug.js";
3
- import { r as agentProfileSchema } from "./profile-schema-nys6Qejd.js";
1
+ import { C as boundedIdentifierSchema, T as boundedJsonSchema, o as canonicalCandidateDigest } from "./harness-BhAJqO2u.js";
2
+ import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-CRCRI6x5.js";
3
+ import { r as agentProfileSchema } from "./profile-schema-Y5Xl8aOt.js";
4
4
  import { E as ValidationError, S as ServerError, h as NetworkError, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, x as SandboxError } from "./errors-BfR-fBvN.js";
5
5
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CDxyloxz.js";
6
6
  import { t as parseSSEStream } from "./sse-parser-DrI47LyG.js";
@@ -21,6 +21,7 @@ const ALL_BACKEND_TYPES = Object.values({
21
21
  NANOCLAW: "nanoclaw",
22
22
  ACP: "acp",
23
23
  CURSOR: "cursor",
24
+ GROK: "grok",
24
25
  CLI_BASE: "cli-base"
25
26
  });
26
27
  const backendTypeSchema = z.enum(ALL_BACKEND_TYPES);
@@ -73,7 +74,7 @@ function normalizeEffectiveBackend(value) {
73
74
  };
74
75
  }
75
76
  //#endregion
76
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/runtime-attachments.js
77
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/runtime-attachments.js
77
78
  const AgentRuntimeAttachmentsSchema = boundedJsonSchema.pipe(z.strictObject({ mcp: agentProfileSchema.shape.mcp.unwrap().superRefine((servers, context) => {
78
79
  for (const alias of Object.keys(servers)) {
79
80
  const result = boundedIdentifierSchema.safeParse(alias);
@@ -1,4 +1,4 @@
1
- import { Tn as CreateSandboxOptions, ga as BackendConfig } from "./types-_cK3Fibu.js";
1
+ import { Tn as CreateSandboxOptions, ga as BackendConfig } from "./types-CeTsbEjb.js";
2
2
 
3
3
  //#region src/line-application.d.ts
4
4
  /** Bounded callback request bytes after canonicalization, including JSON framing. */
package/dist/lines.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-QmDOwLnM.js";
1
+ import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-9g9dTW5t.js";
2
2
  export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-CCi5yJ_D-5w0ql9ee.js";
1
+ import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-juH6LDo9-D1SaRyqA.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { basename, dirname, join } from "node:path";
4
4
  import { homedir } from "node:os";
@@ -1,6 +1,6 @@
1
- import { O as SandboxInstance } from "./index-BkL4InBJ.js";
2
- import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-_cK3Fibu.js";
3
- import { t as Sandbox } from "./client-BzNqxL8v.js";
1
+ import { O as SandboxInstance } from "./index-Vn_rYk5C.js";
2
+ import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-CeTsbEjb.js";
3
+ import { t as Sandbox } from "./client-CXoRiPqY.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
@@ -1,6 +1,6 @@
1
- import { C as boundedIdentifierSchema, O as isBoundedJsonMaterial, _ as CONTRACT_MAX_ARRAY_LENGTH, a as agentCandidateSecretRefSchema, c as environmentNameSchema, d as isSafeExecutable, f as isSafeRelativePath, g as sha256DigestSchema, i as trainedModelIdForArtifact, l as headerNameSchema, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, v as CONTRACT_MAX_JSON_NODES } from "./harness-Cgp9jduT.js";
1
+ import { C as boundedIdentifierSchema, O as isBoundedJsonMaterial, _ as CONTRACT_MAX_ARRAY_LENGTH, a as agentCandidateSecretRefSchema, c as environmentNameSchema, d as isSafeExecutable, f as isSafeRelativePath, g as sha256DigestSchema, i as trainedModelIdForArtifact, l as headerNameSchema, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, v as CONTRACT_MAX_JSON_NODES } from "./harness-BhAJqO2u.js";
2
2
  import { z } from "zod";
3
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/profile-knowledge.js
3
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/profile-knowledge.js
4
4
  /** Immutable Hub generation identities, never aliases such as latest or a caller's scope. */
5
5
  const agentProfileKnowledgeRefSchema = z.strictObject({
6
6
  sourceId: z.string().regex(/^[A-Za-z0-9_-]{1,128}$/),
@@ -18,7 +18,7 @@ const agentProfileKnowledgeRefsSchema = z.array(agentProfileKnowledgeRefSchema).
18
18
  });
19
19
  });
20
20
  //#endregion
21
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/agent-profile-canonical.js
21
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/agent-profile-canonical.js
22
22
  /** Why a value cannot be AgentProfile JSON, with the path of the offending entry. */
23
23
  var AgentProfileValueError = class extends Error {
24
24
  path;
@@ -94,7 +94,7 @@ function renderPath(path) {
94
94
  return path.length === 0 ? "root" : path.join(".");
95
95
  }
96
96
  //#endregion
97
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/own-property-record.js
97
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/own-property-record.js
98
98
  /**
99
99
  * Zod records currently assign parsed values onto an ordinary object. The
100
100
  * special own key `__proto__` therefore invokes the legacy prototype setter
@@ -177,7 +177,7 @@ function decodeRecordKey(value) {
177
177
  return decoded;
178
178
  }
179
179
  //#endregion
180
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.js
180
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.js
181
181
  /**
182
182
  * Declarations request authority. The issuer intersects scope/expiry with authenticated tenant,
183
183
  * issuer policy and lineage, without personal/team fallback, pinning immutable secret ID/revision.
@@ -344,7 +344,7 @@ z.strictObject({
344
344
  requireInPlace: z.boolean().optional()
345
345
  });
346
346
  //#endregion
347
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/harness-capabilities.js
347
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/harness-capabilities.js
348
348
  /** Canonical harness/model, effort and prompt controls. Model-specific capability comes from the serving catalog. */
349
349
  /** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
350
350
  const reasoningLadder = REASONING_EFFORTS;
@@ -642,7 +642,7 @@ function harnessSystemPromptIntents(harness) {
642
642
  return harnessSystemPromptControls[harness] ?? noSystemPromptControls;
643
643
  }
644
644
  //#endregion
645
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/sandbox-size.js
645
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/sandbox-size.js
646
646
  /**
647
647
  * Portable sandbox size vocabulary.
648
648
  *
@@ -665,7 +665,7 @@ const SANDBOX_SIZE_PRESET_NAMES = [
665
665
  "large"
666
666
  ];
667
667
  //#endregion
668
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/profile-schema.js
668
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/profile-schema.js
669
669
  const profileOpaqueValueSchema = z.unknown().transform((value, context) => {
670
670
  if (value === void 0 || isBoundedJsonMaterial(value, {
671
671
  dataPropertiesOnly: true,
@@ -1,5 +1,5 @@
1
- import { bt as SandboxError } from "./terminal-stream-types-8-sAl2J0.js";
2
- import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-_cK3Fibu.js";
1
+ import { bt as SandboxError } from "./terminal-stream-types-5kBchrj3.js";
2
+ import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-CeTsbEjb.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/public-templates.d.ts
@@ -1,2 +1,2 @@
1
- import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-CYws5jq5.js";
1
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-DAp2vpqB.js";
2
2
  export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Ct as ServerError, Dt as TimeoutError, Ot as ValidationError, St as SandboxFailureDetail, _t as ProfileFileMountPathError, bt as SandboxError, gt as PartialFailureError, ht as NotFoundError, it as AuthError, mt as NetworkError, ot as CapabilityError, u as ScopedToken, ut as FileWriteConflictError, vt as QuotaError, wt as StateError, xt as SandboxErrorJson } from "./terminal-stream-types-8-sAl2J0.js";
2
- import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-_cK3Fibu.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-CLxkpYNV.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-OfunwCqc.js";
5
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-uTC8fZDn.js";
1
+ import { Ct as ServerError, Dt as TimeoutError, Ot as ValidationError, St as SandboxFailureDetail, _t as ProfileFileMountPathError, bt as SandboxError, gt as PartialFailureError, ht as NotFoundError, it as AuthError, mt as NetworkError, ot as CapabilityError, u as ScopedToken, ut as FileWriteConflictError, vt as QuotaError, wt as StateError, xt as SandboxErrorJson } from "./terminal-stream-types-5kBchrj3.js";
2
+ import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-CeTsbEjb.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-DdtXzO5r.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-gJULGNKn.js";
5
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-YZOY61uG.js";
6
6
 
7
7
  //#region src/lib/chunked-upload.d.ts
8
8
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
package/dist/runtime.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as projectAgentTerminalRecord, L as createAgentRunOutcomeTracker, R as deriveAgentResultOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as deriveAgentRunOutcome } from "./interactive-controller-CTKFnVTy.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-l4Yqgoug.js";
1
+ import { B as projectAgentTerminalRecord, L as createAgentRunOutcomeTracker, R as deriveAgentResultOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as deriveAgentRunOutcome } from "./interactive-controller-vW55gCE7.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-CRCRI6x5.js";
3
3
  import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, d as FileWriteConflictError, g as NotFoundError, h as NetworkError, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-BfR-fBvN.js";
4
4
  import { t as fetchSandboxApi } from "./api-request-DNrodWdz.js";
5
5
  import { s as uploadChunked } from "./chunked-upload-CyP-FOeZ.js";
@@ -1,8 +1,7 @@
1
- import { A as mergeRuntimeBackendConfig, C as encodePromptForWire, E as canUseNodeHttp2, G as normalizeEffectiveBackend, I as withoutRuntimeSecrets, L as createAgentRunOutcomeTracker, M as requestedPublicProfileDigest, N as requestedSecretProfilePublicDigest, O as applyRequestedModel, R as deriveAgentResultOutcome, S as validateAcceptedDispatchRunRef, T as runtimeFilesystemPath, _ as TRACE_ID_HEADER, a as assertScopedTokenActive, b as resolveTraceId, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as waitForRetryAfter, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as normalizeRuntimeBackendConfig, k as assertCurrentBackendType, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as isTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as mintTraceId } from "./interactive-controller-CTKFnVTy.js";
2
- import { C as boundedIdentifierSchema, E as boundedStringSchema, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1, u as isCanonicalJsonValue$1 } from "./harness-Cgp9jduT.js";
3
- import { t as sha256 } from "./sha2-vu4U-x2L.js";
4
- import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-l4Yqgoug.js";
5
- import { a as ProxySecretReceiptSchema, o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-nys6Qejd.js";
1
+ import { A as mergeRuntimeBackendConfig, C as encodePromptForWire, E as canUseNodeHttp2, G as normalizeEffectiveBackend, I as withoutRuntimeSecrets, L as createAgentRunOutcomeTracker, M as requestedPublicProfileDigest, N as requestedSecretProfilePublicDigest, O as applyRequestedModel, R as deriveAgentResultOutcome, S as validateAcceptedDispatchRunRef, T as runtimeFilesystemPath, _ as TRACE_ID_HEADER, a as assertScopedTokenActive, b as resolveTraceId, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as waitForRetryAfter, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as normalizeRuntimeBackendConfig, k as assertCurrentBackendType, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as isTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as mintTraceId } from "./interactive-controller-vW55gCE7.js";
2
+ import { C as boundedIdentifierSchema, E as boundedStringSchema, g as sha256DigestSchema, o as canonicalCandidateDigest, s as canonicalCandidateJson, u as isCanonicalJsonValue } from "./harness-BhAJqO2u.js";
3
+ import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-CRCRI6x5.js";
4
+ import { a as ProxySecretReceiptSchema, o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-Y5Xl8aOt.js";
6
5
  import { C as StateError, E as ValidationError, F as SANDBOX_AGENT_HOME, I as SANDBOX_FILE_API_ABSOLUTE_ROOTS, L as isProfileFileMountOutsideRoots, M as FILE_OPERATION_LIMITS, P as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, R as profileFileMountOutsideRootsMessage, S as ServerError, T as TimeoutError, a as AuthError, c as CompliancePlacementError, f as GpuProviderNotConfiguredError, g as NotFoundError, h as NetworkError, i as readResponseJson, j as SANDBOX_PROXY_REQUEST_MAX_BYTES, l as EdgeNotReadyError, m as NON_RETRYABLE_CREATE_QUOTA_REASONS, n as parseErrorResponse, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, v as ProfileFileMountPathError, w as StreamInterruptedError, x as SandboxError, y as QuotaError } from "./errors-BfR-fBvN.js";
7
6
  import { n as combineAbortSignals, r as delayUntilAborted, t as awaitWithAbort } from "./abort-signal-CDxyloxz.js";
8
7
  import { t as rewrapResponse } from "./response-rewrap-CpNkboDX.js";
@@ -11,8 +10,8 @@ import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-5DpLmHeN.
11
10
  import { t as parseSSEStream } from "./sse-parser-DrI47LyG.js";
12
11
  import { s as uploadChunked } from "./chunked-upload-CyP-FOeZ.js";
13
12
  import { t as runPreparedProcess } from "./prepared-process-C-rwZPIZ.js";
14
- import { a as backendTypeSchema, r as cliAuthReferenceSchema } from "./cli-auth-bundle-CCi5yJ_D-5w0ql9ee.js";
15
- import "./cli-auth-bundle-CUi_Sbeh.js";
13
+ import { a as backendTypeSchema, r as cliAuthReferenceSchema } from "./cli-auth-bundle-juH6LDo9-D1SaRyqA.js";
14
+ import "./cli-auth-bundle-i9Gg9P_C.js";
16
15
  import { n as SandboxLines } from "./lines-DlLR4pHq.js";
17
16
  import { t as downloadFile } from "./file-download-CICuFwGb.js";
18
17
  import { z } from "zod";
@@ -23,7 +22,7 @@ import "node:fs/promises";
23
22
  import { readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
24
23
  import "@tangle-network/agent-interface/environment-provider";
25
24
  import { OTLP_SPAN_KIND, OTLP_STATUS_CODE, msToUnixNano, otlpTraceExport, toOtlpAttributes, toW3CSpanId, toW3CTraceId } from "@tangle-network/agent-trace-contract/otlp";
26
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/agent-execution-preparation.js
25
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/agent-execution-preparation.js
27
26
  /**
28
27
  * Canonical RFC 8785/SHA-256 identity for one validated, public AgentProfile.
29
28
  * Secret-capable MCP/hook fields are tagged. Other prompt, resource, metadata,
@@ -34,11 +33,11 @@ import { OTLP_SPAN_KIND, OTLP_STATUS_CODE, msToUnixNano, otlpTraceExport, toOtlp
34
33
  */
35
34
  function canonicalAgentProfileDigest(profile) {
36
35
  const material = canonicalAgentProfileValue(agentProfileSchema.parse(profile));
37
- if (material === void 0 || !isCanonicalJsonValue$1(material)) throw new Error("AgentProfile must contain finite, acyclic RFC 8785 JSON values");
38
- return canonicalCandidateDigest$1(material);
36
+ if (material === void 0 || !isCanonicalJsonValue(material)) throw new Error("AgentProfile must contain finite, acyclic RFC 8785 JSON values");
37
+ return canonicalCandidateDigest(material);
39
38
  }
40
39
  //#endregion
41
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.js
40
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.js
42
41
  const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
43
42
  provider: boundedIdentifierSchema,
44
43
  environmentId: boundedIdentifierSchema,
@@ -55,7 +54,7 @@ const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
55
54
  const AgentInteractiveSessionStartSchema = z.strictObject({
56
55
  run: AgentExactRunControlRefSchema,
57
56
  profile: agentProfileSchema,
58
- requestedProfileDigest: sha256DigestSchema$1,
57
+ requestedProfileDigest: sha256DigestSchema,
59
58
  authMode: z.literal("oauth").optional(),
60
59
  initialPrompt: boundedStringSchema.optional(),
61
60
  cwd: boundedStringSchema.min(1).optional(),
@@ -66,7 +65,7 @@ const AgentInteractiveSessionStartSchema = z.strictObject({
66
65
  function agentInteractiveSessionRequestDigest(coordinates, input) {
67
66
  const exactCoordinates = AgentInteractiveSessionRunCoordinatesSchema.parse(coordinates);
68
67
  const exactInput = AgentInteractiveSessionStartSchema.omit({ run: true }).parse(input);
69
- return canonicalCandidateDigest$1({
68
+ return canonicalCandidateDigest({
70
69
  kind: "agent-interactive-session-start.v1",
71
70
  run: exactCoordinates,
72
71
  requestedProfileDigest: exactInput.requestedProfileDigest,
@@ -115,7 +114,7 @@ function runCoordinates(run) {
115
114
  };
116
115
  }
117
116
  //#endregion
118
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.9/node_modules/@tangle-network/agent-interface/dist/environment-terminal.js
117
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/environment-terminal.js
119
118
  const terminalDimensionSchema = z.number().int().positive().max(1e4);
120
119
  /**
121
120
  * Provider-neutral handle for one interactive terminal.
@@ -487,7 +486,7 @@ const PROFILE_IMPORT_PART_BYTES = 512 * 1024;
487
486
  const MANAGED_PROFILE_TRANSPORT = "managed-profile-reference-v1";
488
487
  /** Cache identity follows JSON wire semantics and RFC 8785 key ordering. */
489
488
  function profileCacheSha256(profile) {
490
- return canonicalCandidateDigest$1(JSON.parse(JSON.stringify(profile))).slice(7);
489
+ return canonicalCandidateDigest(JSON.parse(JSON.stringify(profile))).slice(7);
491
490
  }
492
491
  //#endregion
493
492
  //#region ../../../packages/runtime-contracts/dist/direct-read.js
@@ -762,7 +761,7 @@ async function responseNeedsProfileImport(response) {
762
761
  }
763
762
  /** Upload the public profile only. Runtime grants remain in the turn backend. */
764
763
  async function primeManagedProfile(profile, fetchRuntime) {
765
- const bytes = new TextEncoder().encode(canonicalCandidateJson$1(profile));
764
+ const bytes = new TextEncoder().encode(canonicalCandidateJson(profile));
766
765
  const sha256 = profileCacheSha256(profile);
767
766
  if (bytes.length > 8388608) throw new ValidationError("Managed profile exceeds the profile import bound");
768
767
  const post = async (body) => {
@@ -3130,118 +3129,6 @@ async function isRefusedBearer(response) {
3130
3129
  return false;
3131
3130
  }
3132
3131
  }
3133
- //#endregion
3134
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/agent-candidate-schema-common.js
3135
- const sha256Pattern = /^sha256:[a-f0-9]{64}$/;
3136
- const gitObjectPattern = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/;
3137
- const environmentNamePattern = /^[A-Za-z_][A-Za-z0-9_]*$/;
3138
- const headerNamePattern = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
3139
- const mediaTypePattern = /^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}\/[a-z0-9][a-z0-9!#$&^_.+-]{0,126}$/;
3140
- const githubComponentPattern = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$/;
3141
- const secretNamePattern = /(?:^|[_-])(?:api[_-]?key|access[_-]?key|private[_-]?key|token|secret|password|credentials?|authorization|cookie|database[_-]?url|dsn|pat)(?:[_-]|$)/i;
3142
- const obviousSecretValuePattern = /(?:\bsk[-_][-_A-Za-z0-9]{10,}\b|\bgh[pousr]_[A-Za-z0-9]{12,}\b|\bgithub_pat_[A-Za-z0-9_]{12,}\b|\bAKIA[A-Z0-9]{12,}\b|-----BEGIN [A-Z ]*PRIVATE KEY-----|\bBearer\s+\S+)/;
3143
- const controlCharacterPattern = /[\u0000-\u001f\u007f]/;
3144
- z.string().regex(sha256Pattern);
3145
- z.string().regex(gitObjectPattern);
3146
- const environmentNameSchema = z.string().regex(environmentNamePattern);
3147
- z.string().regex(headerNamePattern);
3148
- z.string().regex(mediaTypePattern);
3149
- function sha256Bytes(value) {
3150
- const bytes = sha256(value);
3151
- return `sha256:${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
3152
- }
3153
- /** RFC 8785 serialization used by every candidate-producing package. */
3154
- function canonicalCandidateJson(value) {
3155
- if (!isCanonicalJsonValue(value)) throw new Error("candidate document must be finite, acyclic RFC 8785 JSON");
3156
- return serializeCanonicalCandidate(value);
3157
- }
3158
- function canonicalCandidateBytes(value) {
3159
- return new TextEncoder().encode(canonicalCandidateJson(value));
3160
- }
3161
- function canonicalCandidateDigest(value) {
3162
- return sha256Bytes(canonicalCandidateBytes(value));
3163
- }
3164
- function serializeCanonicalCandidate(value) {
3165
- if (value === null || typeof value === "boolean" || typeof value === "number") return JSON.stringify(value);
3166
- if (typeof value === "string") return JSON.stringify(value);
3167
- if (Array.isArray(value)) return `[${value.map(serializeCanonicalCandidate).join(",")}]`;
3168
- return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${serializeCanonicalCandidate(value[key])}`).join(",")}}`;
3169
- }
3170
- function isWellFormedUnicode(value) {
3171
- for (let index = 0; index < value.length; index++) {
3172
- const code = value.charCodeAt(index);
3173
- if (code >= 55296 && code <= 56319) {
3174
- const next = value.charCodeAt(index + 1);
3175
- if (!(next >= 56320 && next <= 57343)) return false;
3176
- index++;
3177
- } else if (code >= 56320 && code <= 57343) return false;
3178
- }
3179
- return true;
3180
- }
3181
- function isCanonicalJsonValue(value, ancestors = /* @__PURE__ */ new Set()) {
3182
- if (value === null || typeof value === "boolean") return true;
3183
- if (typeof value === "string") return isWellFormedUnicode(value);
3184
- if (typeof value === "number") return Number.isFinite(value);
3185
- if (typeof value !== "object" || ancestors.has(value)) return false;
3186
- const prototype = Object.getPrototypeOf(value);
3187
- if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) return false;
3188
- const nextAncestors = new Set(ancestors).add(value);
3189
- if (Array.isArray(value)) {
3190
- for (let index = 0; index < value.length; index += 1) {
3191
- if (!(index in value)) return false;
3192
- if (!isCanonicalJsonValue(value[index], nextAncestors)) return false;
3193
- }
3194
- return true;
3195
- }
3196
- return Object.entries(value).every(([key, entry]) => isWellFormedUnicode(key) && isCanonicalJsonValue(entry, nextAncestors));
3197
- }
3198
- function hasCredentialBearingUrl(value) {
3199
- try {
3200
- const url = new URL(value);
3201
- if (url.username !== "" || url.password !== "") return true;
3202
- return [...url.searchParams.keys()].some((key) => secretNamePattern.test(key));
3203
- } catch {
3204
- return false;
3205
- }
3206
- }
3207
- /**
3208
- * Whether a string holds an obvious credential: a provider key (`sk-`, `gh*_`,
3209
- * `github_pat_`, `AKIA`), a PEM private key, a bearer token, or a URL with
3210
- * userinfo or a credential-named query parameter. The agent-eval redaction
3211
- * core calls it, so candidate validation and trace redaction agree.
3212
- */
3213
- function looksLikeCredential(value) {
3214
- return obviousSecretValuePattern.test(value) || hasCredentialBearingUrl(value);
3215
- }
3216
- function isPublicConfigValue(value) {
3217
- return !controlCharacterPattern.test(value) && isWellFormedUnicode(value) && !looksLikeCredential(value);
3218
- }
3219
- /** Shared public reference owner; resolution belongs to the trusted executor. */
3220
- const agentCandidateSecretRefSchema = z.strictObject({
3221
- kind: z.literal("secret-ref"),
3222
- key: z.string().min(1).max(500).refine((value) => value.trim().length > 0 && isPublicConfigValue(value), "secret reference key must be a public non-credential identity"),
3223
- format: z.enum(["raw", "bearer"]).optional()
3224
- });
3225
- const agentCandidatePublicValueSchema = z.strictObject({
3226
- kind: z.literal("public"),
3227
- value: z.string().refine(isPublicConfigValue, "candidate config cannot carry credentials; the evaluator owns model authorization")
3228
- });
3229
- const agentCandidateConfigValueSchema = z.discriminatedUnion("kind", [agentCandidatePublicValueSchema, agentCandidateSecretRefSchema]);
3230
- function configRecordSchema(keySchema) {
3231
- return z.record(keySchema, agentCandidateConfigValueSchema).superRefine((config, ctx) => {
3232
- for (const name of Object.keys(config)) if (secretNamePattern.test(name) && config[name]?.kind !== "secret-ref") ctx.addIssue({
3233
- code: "custom",
3234
- path: [name],
3235
- message: "candidate config cannot declare credential-bearing names"
3236
- });
3237
- });
3238
- }
3239
- configRecordSchema(environmentNameSchema);
3240
- z.object({
3241
- kind: z.literal("github"),
3242
- owner: z.string().regex(githubComponentPattern).refine((value) => value !== "." && value !== ".."),
3243
- repo: z.string().regex(githubComponentPattern).refine((value) => value !== "." && value !== "..")
3244
- }).strict();
3245
3132
  const CODEX_SYSTEM_PROMPT_FILE = ".codex/system-prompt.md";
3246
3133
  const OPENCODE_APPEND_SYSTEM_PROMPT_FILE = ".opencode/agent-system-prompt.md";
3247
3134
  const OPENCODE_CONFIG_FILE = "opencode.json";
@@ -6406,7 +6293,7 @@ var InteractiveSessionHandle = class {
6406
6293
  options?.signal?.throwIfAborted();
6407
6294
  const binding = this.requireBinding();
6408
6295
  const exactCommand = AgentInteractiveSessionPromptCommandSchema.parse(command);
6409
- if (canonicalCandidateDigest$1(exactCommand.ref) !== canonicalCandidateDigest$1(binding.ref) || canonicalCandidateDigest$1(exactCommand.control) !== canonicalCandidateDigest$1(binding.control)) throw new Error(`Interactive session ${this.sessionId} prompt is bound to a different exact ref`);
6296
+ if (canonicalCandidateDigest(exactCommand.ref) !== canonicalCandidateDigest(binding.ref) || canonicalCandidateDigest(exactCommand.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} prompt is bound to a different exact ref`);
6410
6297
  return (options === void 0 ? this.host._sendInteractivePrompt(this.sessionId, exactCommand) : this.host._sendInteractivePrompt(this.sessionId, exactCommand, options)).then((acknowledgement) => {
6411
6298
  const exactAcknowledgement = AgentInteractiveSessionPromptAcknowledgementSchema.parse(acknowledgement);
6412
6299
  if (!agentInteractiveSessionPromptAcknowledgementMatchesCommand(exactCommand, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} prompt acknowledgement does not match the command`);
@@ -6484,8 +6371,8 @@ var InteractiveSessionHandle = class {
6484
6371
  options?.signal?.throwIfAborted();
6485
6372
  const binding = this.requireBinding();
6486
6373
  const exactRequest = AgentInteractiveSessionAttachSchema.parse(request);
6487
- if (!agentInteractiveSessionControlClaimMatchesRef(binding.ref, exactRequest.control) || canonicalCandidateDigest$1(exactRequest.control) !== canonicalCandidateDigest$1(binding.control)) throw new Error(`Interactive session ${this.sessionId} terminal attach is bound to a different active control claim`);
6488
- const requestDigest = canonicalCandidateDigest$1(exactRequest);
6374
+ if (!agentInteractiveSessionControlClaimMatchesRef(binding.ref, exactRequest.control) || canonicalCandidateDigest(exactRequest.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} terminal attach is bound to a different active control claim`);
6375
+ const requestDigest = canonicalCandidateDigest(exactRequest);
6489
6376
  if (this.agentTerminalAttachInFlight !== void 0) {
6490
6377
  if (this.agentTerminalAttachDigest !== requestDigest) throw new Error(`Interactive session ${this.sessionId} cannot attach with a different terminal request while another attach is in flight`);
6491
6378
  return awaitWithAbort(this.agentTerminalAttachInFlight, options?.signal);
@@ -6538,7 +6425,7 @@ var InteractiveSessionHandle = class {
6538
6425
  options?.signal?.throwIfAborted();
6539
6426
  const ref = this.requireRef();
6540
6427
  const exactRequest = AgentInteractiveSessionControlClaimRequestSchema.parse(request);
6541
- if (canonicalCandidateDigest$1(exactRequest.ref) !== canonicalCandidateDigest$1(ref)) throw new Error(`Interactive session ${this.sessionId} control claim is bound to a different exact ref`);
6428
+ if (canonicalCandidateDigest(exactRequest.ref) !== canonicalCandidateDigest(ref)) throw new Error(`Interactive session ${this.sessionId} control claim is bound to a different exact ref`);
6542
6429
  return this.host._claimInteractiveControl(this.sessionId, exactRequest, options).then((acknowledgement) => {
6543
6430
  const exactAcknowledgement = AgentInteractiveSessionControlClaimAcknowledgementSchema.parse(acknowledgement);
6544
6431
  if (!agentInteractiveSessionControlClaimAcknowledgementMatchesRequest(exactRequest, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} control claim acknowledgement does not match the request`);
@@ -6553,7 +6440,7 @@ var InteractiveSessionHandle = class {
6553
6440
  options?.signal?.throwIfAborted();
6554
6441
  const binding = this.requireBinding();
6555
6442
  const exactCommand = AgentInteractiveSessionStopCommandSchema.parse(command);
6556
- if (canonicalCandidateDigest$1(exactCommand.ref) !== canonicalCandidateDigest$1(binding.ref) || canonicalCandidateDigest$1(exactCommand.control) !== canonicalCandidateDigest$1(binding.control)) throw new Error(`Interactive session ${this.sessionId} stop is bound to a different exact ref`);
6443
+ if (canonicalCandidateDigest(exactCommand.ref) !== canonicalCandidateDigest(binding.ref) || canonicalCandidateDigest(exactCommand.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} stop is bound to a different exact ref`);
6557
6444
  return (options === void 0 ? this.host._stopInteractive(this.sessionId, exactCommand) : this.host._stopInteractive(this.sessionId, exactCommand, options)).then((acknowledgement) => {
6558
6445
  const exactAcknowledgement = AgentInteractiveSessionStopAcknowledgementSchema.parse(acknowledgement);
6559
6446
  if (!agentInteractiveSessionStopAcknowledgementMatchesCommand(exactCommand, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} stop acknowledgement does not match the command`);
@@ -6565,7 +6452,7 @@ var InteractiveSessionHandle = class {
6565
6452
  const ref = this.requireRef();
6566
6453
  return (options === void 0 ? this.host._stopInteractiveLifecycle(this.sessionId, ref) : this.host._stopInteractiveLifecycle(this.sessionId, ref, options)).then((acknowledgement) => {
6567
6454
  const exactAcknowledgement = AgentInteractiveSessionStopAcknowledgementSchema.parse(acknowledgement);
6568
- if (canonicalCandidateDigest$1(exactAcknowledgement.ref) !== canonicalCandidateDigest$1(ref)) throw new Error(`Interactive session ${this.sessionId} lifecycle stop acknowledgement does not match the exact ref`);
6455
+ if (canonicalCandidateDigest(exactAcknowledgement.ref) !== canonicalCandidateDigest(ref)) throw new Error(`Interactive session ${this.sessionId} lifecycle stop acknowledgement does not match the exact ref`);
6569
6456
  if (exactAcknowledgement.status !== "accepted" && exactAcknowledgement.status !== "replayed") throw new Error(`Interactive session ${this.sessionId} lifecycle stop was not confirmed (${exactAcknowledgement.status})`);
6570
6457
  if (exactAcknowledgement.effect === "unknown") throw new Error(`Interactive session ${this.sessionId} lifecycle stop returned an unknown outcome`);
6571
6458
  return exactAcknowledgement;
@@ -7623,7 +7510,7 @@ const interactionResolutionDeliveryStateSchema = z.enum([
7623
7510
  const interactionResolutionAcknowledgementSchema = z.strictObject({
7624
7511
  status: z.enum(["accepted", "already_resolved_same"]),
7625
7512
  operationId: z.string().min(1),
7626
- responseDigest: sha256DigestSchema$1,
7513
+ responseDigest: sha256DigestSchema,
7627
7514
  interactionId: z.string().min(1),
7628
7515
  sessionId: z.string().min(1),
7629
7516
  outcome: z.enum([
@@ -7651,7 +7538,7 @@ const InteractionConflictEnvelopeSchema = z.object({
7651
7538
  code: z.string().min(1),
7652
7539
  message: z.string().min(1),
7653
7540
  status: REFUSED_INTERACTION_STATUS,
7654
- existingResponseDigest: sha256DigestSchema$1.optional(),
7541
+ existingResponseDigest: sha256DigestSchema.optional(),
7655
7542
  existingOperationId: z.string().min(1).optional(),
7656
7543
  resolvedAt: z.string().min(1).optional()
7657
7544
  })
@@ -7679,7 +7566,7 @@ function bindingsEqual(left, right) {
7679
7566
  return left.requestDigest === right.requestDigest && left.runId === right.runId && left.provider === right.provider && left.environmentId === right.environmentId && left.sessionId === right.sessionId && left.executionId === right.executionId && left.interactionId === right.interactionId;
7680
7567
  }
7681
7568
  function assertResolutionMatches(resolution, sessionId, submitted, response, endpoint) {
7682
- const expectedDigest = canonicalCandidateDigest$1(submitted);
7569
+ const expectedDigest = canonicalCandidateDigest(submitted);
7683
7570
  if (resolution.sessionId !== sessionId || resolution.interactionId !== submitted.id || resolution.outcome !== submitted.outcome || resolution.responseDigest !== expectedDigest) throw invalidRuntimeResponse("Sidecar returned a resolution for another interaction response", response, endpoint);
7684
7571
  }
7685
7572
  /** Parse one interaction response without discarding replay information. */
@@ -8595,7 +8482,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
8595
8482
  origin: "runtime",
8596
8483
  endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
8597
8484
  });
8598
- if (canonicalCandidateDigest$1(status.ref) !== canonicalCandidateDigest$1(exactCommand.ref)) throw new ValidationError("Interactive prompt ref or control does not match the session");
8485
+ if (canonicalCandidateDigest(status.ref) !== canonicalCandidateDigest(exactCommand.ref)) throw new ValidationError("Interactive prompt ref or control does not match the session");
8599
8486
  const endpoint = `/agents/sessions/${encodeURIComponent(id)}/interactive/prompt`;
8600
8487
  const response = await this.runtimeFetch(endpoint, {
8601
8488
  method: "POST",
@@ -8773,7 +8660,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
8773
8660
  origin: "runtime"
8774
8661
  });
8775
8662
  const acknowledgement = parsed.data.data;
8776
- if (canonicalCandidateDigest$1(acknowledgement.ref) !== canonicalCandidateDigest$1(exactRef)) throw new ServerError("Interactive lifecycle stop acknowledgement does not match the exact ref", 502, {
8663
+ if (canonicalCandidateDigest(acknowledgement.ref) !== canonicalCandidateDigest(exactRef)) throw new ServerError("Interactive lifecycle stop acknowledgement does not match the exact ref", 502, {
8777
8664
  endpoint,
8778
8665
  origin: "runtime"
8779
8666
  });
@@ -9795,26 +9682,9 @@ function interpretWorkspaceOperationLookup(body, kind) {
9795
9682
  kind: body?.kind ?? kind
9796
9683
  };
9797
9684
  }
9798
- const SNAPSHOT_RESTORE_POLL_INTERVAL_MS = 1e3;
9799
- const SNAPSHOT_RESTORE_FIRST_POLL_INTERVAL_MS = 200;
9800
- const SNAPSHOT_RESTORE_POLL_GROWTH = 1.6;
9685
+ const SNAPSHOT_RESTORE_HOLD_MS = 1e4;
9686
+ const SNAPSHOT_RESTORE_POLL_FLOOR_MS = 500;
9801
9687
  const SNAPSHOT_RESTORE_TIMEOUT_MS = 600 * 1e3;
9802
- /**
9803
- * How long to wait before the next restore-job status read.
9804
- *
9805
- * A flat 1 s cadence holds a finished restore for half a second on average.
9806
- * A production restore of a small workspace takes ~5 s
9807
- * (job `durationMs` 5112 against sandbox.tangle.tools), so that half second
9808
- * is
9809
- * real time the caller waits after the work is done. Backing off from 200 ms
9810
- * to the same 1 s ceiling narrows the window near the end of a short restore
9811
- * while leaving a long cross-host restore at one request per second — the
9812
- * poll rate is bounded by the ceiling, not by the starting interval.
9813
- */
9814
- function nextRestorePollDelayMs(pollsTaken) {
9815
- const delay = SNAPSHOT_RESTORE_FIRST_POLL_INTERVAL_MS * SNAPSHOT_RESTORE_POLL_GROWTH ** pollsTaken;
9816
- return Math.min(Math.round(delay), SNAPSHOT_RESTORE_POLL_INTERVAL_MS);
9817
- }
9818
9688
  const SNAPSHOT_VISIBILITY_POLL_INTERVAL_MS = 1e3;
9819
9689
  const SNAPSHOT_VISIBILITY_TIMEOUT_MS = 120 * 1e3;
9820
9690
  function toSnapshotResult(data, provenance) {
@@ -10039,9 +9909,9 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
10039
9909
  }
10040
9910
  async waitForSnapshotRestore(snapshotId, accepted) {
10041
9911
  const deadline = Date.now() + SNAPSHOT_RESTORE_TIMEOUT_MS;
10042
- let polls = 0;
10043
9912
  while (Date.now() < deadline) {
10044
- const status = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/jobs/${encodeURIComponent(accepted.jobId)}`));
9913
+ const polledAt = Date.now();
9914
+ const status = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/jobs/${encodeURIComponent(accepted.jobId)}?waitMs=${SNAPSHOT_RESTORE_HOLD_MS}`));
10045
9915
  if (status.status === "failed" || status.result?.success === false) throw new ServerError(status.result?.error ?? `Snapshot restore job ${accepted.jobId} failed`);
10046
9916
  if (status.status === "completed") {
10047
9917
  this.applyLifecycleResponse(status.sandbox ?? null);
@@ -10054,7 +9924,8 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
10054
9924
  };
10055
9925
  return await this.waitForSnapshotVisible(snapshotId, status.completedAt ? { createdAt: new Date(status.completedAt) } : void 0);
10056
9926
  }
10057
- await this.sleep(nextRestorePollDelayMs(polls++));
9927
+ const heldMs = Date.now() - polledAt;
9928
+ if (heldMs < SNAPSHOT_RESTORE_POLL_FLOOR_MS) await this.sleep(SNAPSHOT_RESTORE_POLL_FLOOR_MS - heldMs);
10058
9929
  }
10059
9930
  throw new TimeoutError(SNAPSHOT_RESTORE_TIMEOUT_MS);
10060
9931
  }
@@ -11268,7 +11139,7 @@ var SandboxInteractiveTerminalOperations = class {
11268
11139
  origin: "runtime",
11269
11140
  endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
11270
11141
  }, "INTERACTIVE_SESSION_EXITED");
11271
- if (canonicalCandidateDigest$1(status.ref) !== canonicalCandidateDigest$1(exactRef)) throw new ValidationError("Interactive attach ref does not match the current session");
11142
+ if (canonicalCandidateDigest(status.ref) !== canonicalCandidateDigest(exactRef)) throw new ValidationError("Interactive attach ref does not match the current session");
11272
11143
  return exactRef;
11273
11144
  }
11274
11145
  /**
@@ -1,4 +1,4 @@
1
- import { ft as SeatOwnerTransport } from "./client-BzNqxL8v.js";
1
+ import { ft as SeatOwnerTransport } from "./client-CXoRiPqY.js";
2
2
 
3
3
  //#region src/select-seat-command.d.ts
4
4
  /** Public reply bound; the owner prints one metadata object. */
@@ -1,2 +1,2 @@
1
- import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-BkL4InBJ.js";
1
+ import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-Vn_rYk5C.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
@@ -1,2 +1,2 @@
1
- import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-WUsoz1QJ.js";
1
+ import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-BLujQYVN.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
@@ -1,4 +1,4 @@
1
- import { n as createSandboxInstanceFromResponse } from "./sandbox-Jbfqj2qv.js";
1
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-CDa23zXk.js";
2
2
  import { i as readResponseJson } from "./errors-BfR-fBvN.js";
3
3
  import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-vaFoyyiO.js";
4
4
  //#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js