@tangle-network/sandbox 0.62.13 → 0.62.15

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/README.md +20 -0
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +4 -4
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/{agent-run-outcome-CWrBnv3S.d.ts → agent-run-outcome-BjZ1EHSq.d.ts} +1 -1
  6. package/dist/auth/index.js +1 -1
  7. package/dist/{chunked-upload-ClCKGr59.js → chunked-upload-B867njKv.js} +2 -59
  8. package/dist/{chunked-upload-file-RaMaNFN_.js → chunked-upload-file-Bs5qcfRB.js} +2 -1
  9. package/dist/{client-C7NbsKZQ.js → client-Bfc6UMn7.js} +9 -8
  10. package/dist/{client-CIrZUB7Q.d.ts → client-CnP49sg1.d.ts} +5 -5
  11. package/dist/collaboration/index.js +1 -1
  12. package/dist/{collaboration-DZCyTGdn.js → collaboration-CXtTwK3x.js} +1 -1
  13. package/dist/core.d.ts +8 -8
  14. package/dist/core.js +4 -4
  15. package/dist/{errors-DSJBKmGZ.js → errors-Bfhg_Zc6.js} +130 -1
  16. package/dist/{errors-tik04CKT.d.ts → errors-H96CGXWZ.d.ts} +14 -2
  17. package/dist/{index-CuFC5al5.d.ts → index-CygLpbAJ.d.ts} +2 -2
  18. package/dist/index.d.ts +10 -10
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence/index.js +1 -1
  21. package/dist/{interactive-controller-B2VcB_SK.js → interactive-controller-CDtsgRnx.js} +2 -2
  22. package/dist/{lines-BWLeaELK.d.ts → lines-CodL_Yhd.d.ts} +1 -1
  23. package/dist/lines.d.ts +1 -1
  24. package/dist/lines.js +1 -1
  25. package/dist/{local-cli-auth-BSFX2vnt.js → local-cli-auth-yn7YxF87.js} +1 -1
  26. package/dist/{managed-process-qH__EafL.d.ts → managed-process-BEgMYGGu.d.ts} +1 -1
  27. package/dist/{preview-BFBAIphI.d.ts → preview-Bz14bj-R.d.ts} +3 -3
  28. package/dist/{public-templates-CM9_NpaD.d.ts → public-templates-CrcJd0Ho.d.ts} +2 -2
  29. package/dist/public-templates.d.ts +1 -1
  30. package/dist/public-templates.js +1 -1
  31. package/dist/{raw-evidence-archive-tCj9wHJ4.js → raw-evidence-archive-Bxk6fUjS.js} +12 -2
  32. package/dist/runtime.d.ts +4 -4
  33. package/dist/runtime.js +4 -4
  34. package/dist/{sandbox-D0NNcvnQ.js → sandbox-NDSp3I1V.js} +132 -32
  35. package/dist/{sandbox-BogoNKYF.d.ts → sandbox-NDYZY46C.d.ts} +12 -4
  36. package/dist/tangle/index.d.ts +1 -1
  37. package/dist/tangle/index.js +1 -1
  38. package/dist/{tangle-Cr6EkNcG.js → tangle-Cwu6ql_V.js} +2 -2
  39. package/dist/{types-B91mhT62.d.ts → types-Bal6rlUP.d.ts} +23 -0
  40. package/package.json +3 -3
  41. /package/dist/{cli-auth-bundle-BvXQd1UX.js → cli-auth-bundle-DBRU4ifV.js} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { r as backendTypeSchema } from "./backend-types-D6bYbvMB.js";
2
- import { C as resolveDispatchRunIdentity, D as parseSSEStream, E as encodeTextForWire, L as withoutRuntimeSecrets, M as normalizeRuntimeBackendConfig, N as requestedPublicProfileDigest, O as applyRequestedModel, P as requestedSecretProfilePublicDigest, R as createAgentRunOutcomeTracker, S as canUseNodeHttp2, T as encodePromptForWire, _ as mintTraceId, a as terminalUpgradeHeadersSupported, b as appendSessionIdQuery, d as isRetryableCredentialRefusal, f as normalizeSessionInfo, g as isTraceId, h as TRACE_ID_HEADER, i as TerminalStreamError, j as mergeRuntimeBackendConfig, k as assertCurrentBackendType, l as requestScopedToken, m as waitForRetryAfter, n as InteractiveSessionController, p as sessionMessageRequestBody, r as TerminalStream, s as assertScopedTokenActive, u as SandboxRuntimeApi, v as resolveTraceId, w as validateAcceptedDispatchRunRef, x as sessionHeaders, y as traceHeaders, z as deriveAgentResultOutcome } from "./interactive-controller-B2VcB_SK.js";
3
- import { C as readResponseJson, S as parseResponseError, _ as StateError, b as ValidationError, d as NotFoundError, g as ServerError, h as SandboxError, i as EdgeNotReadyError, p as QuotaError, r as CapabilityError, t as AuthError, u as NetworkError, v as StreamInterruptedError, x as parseErrorResponse, y as TimeoutError } from "./errors-DSJBKmGZ.js";
2
+ import { C as resolveDispatchRunIdentity, D as parseSSEStream, E as encodeTextForWire, L as withoutRuntimeSecrets, M as normalizeRuntimeBackendConfig, N as requestedPublicProfileDigest, O as applyRequestedModel, P as requestedSecretProfilePublicDigest, R as createAgentRunOutcomeTracker, S as canUseNodeHttp2, T as encodePromptForWire, _ as mintTraceId, a as terminalUpgradeHeadersSupported, b as appendSessionIdQuery, d as isRetryableCredentialRefusal, f as normalizeSessionInfo, g as isTraceId, h as TRACE_ID_HEADER, i as TerminalStreamError, j as mergeRuntimeBackendConfig, k as assertCurrentBackendType, l as requestScopedToken, m as waitForRetryAfter, n as InteractiveSessionController, p as sessionMessageRequestBody, r as TerminalStream, s as assertScopedTokenActive, u as SandboxRuntimeApi, v as resolveTraceId, w as validateAcceptedDispatchRunRef, x as sessionHeaders, y as traceHeaders, z as deriveAgentResultOutcome } from "./interactive-controller-CDtsgRnx.js";
3
+ import { A as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, C as parseResponseError, M as SANDBOX_FILE_API_ABSOLUTE_ROOTS, N as isProfileFileMountOutsideRoots, O as SANDBOX_PROXY_REQUEST_MAX_BYTES, P as profileFileMountOutsideRootsMessage, S as parseErrorResponse, _ as ServerError, b as TimeoutError, d as NotFoundError, g as SandboxError, i as EdgeNotReadyError, j as SANDBOX_AGENT_HOME, m as QuotaError, p as ProfileFileMountPathError, r as CapabilityError, t as AuthError, u as NetworkError, v as StateError, w as readResponseJson, x as ValidationError, y as StreamInterruptedError } from "./errors-Bfhg_Zc6.js";
4
4
  import { d as awaitWithAbort, f as combineAbortSignals, g as interactiveSessionStatusResponseSchema, h as interactiveSessionControlValidationResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionControlReleaseResponseSchema, p as interactiveSessionControlClaimResponseSchema } from "./browser-interactive-control-controller-BJf0P_J4.js";
5
5
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-qPVvvkgJ.js";
6
6
  import { SandboxLines } from "./lines.js";
7
- import { l as SANDBOX_PROXY_REQUEST_MAX_BYTES, s as uploadChunked } from "./chunked-upload-ClCKGr59.js";
8
- import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-BvXQd1UX.js";
7
+ import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-DBRU4ifV.js";
8
+ import { s as uploadChunked } from "./chunked-upload-B867njKv.js";
9
9
  import { z } from "zod";
10
10
  import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, InteractionAcknowledgementSchema, InteractionBindingSchema, InteractionRequestSchema, InteractionResponseCommandSchema, InteractionResponseSchema, PlanContinuationSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest, canonicalCandidateJson, exactAgentInteractiveSessionStart, sha256DigestSchema, terminalSessionUsable } from "@tangle-network/agent-interface";
11
11
  import { AgentInteractiveSessionControlClaimSchema as AgentInteractiveSessionControlClaimSchema$1, AgentInteractiveSessionPromptAcknowledgementSchema as AgentInteractiveSessionPromptAcknowledgementSchema$1, AgentInteractiveSessionRefSchema as AgentInteractiveSessionRefSchema$1, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema as AgentInteractiveSessionStopAcknowledgementSchema$1 } from "@tangle-network/agent-interface/environment-interactive-control";
@@ -338,7 +338,7 @@ const UNDECIDED_WRITE_STATUSES = new Set([
338
338
  ]);
339
339
  const PROFILE_FILE_MOUNT_PACE_MS = 0;
340
340
  const PROFILE_BIN_DIR_RE$1 = /(^|\/)(s?bin)\//;
341
- const PROFILE_AGENT_HOME = ["/home", "agent"].join("/");
341
+ const PROFILE_AGENT_HOME = SANDBOX_AGENT_HOME;
342
342
  /**
343
343
  * Wire budget for a single-shot `POST /files/write` of a mount.
344
344
  * Materialization runs over whatever connection the box has — on the
@@ -357,12 +357,8 @@ function fitsSingleShotWrite(content, contentBytes) {
357
357
  if (contentBytes * 6 <= PROFILE_FILE_WRITE_WIRE_BUDGET_BYTES) return true;
358
358
  return new TextEncoder().encode(JSON.stringify(content)).byteLength <= PROFILE_FILE_WRITE_WIRE_BUDGET_BYTES;
359
359
  }
360
- const DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES = [
361
- PROFILE_AGENT_HOME,
362
- ["/home", "user"].join("/"),
363
- "/tmp",
364
- "/output"
365
- ];
360
+ /** The sidecar file API's absolute roots, read from their single owner. */
361
+ const DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES = SANDBOX_FILE_API_ABSOLUTE_ROOTS;
366
362
  function inlineContent(mount) {
367
363
  const resource = mount.resource;
368
364
  if (resource.kind !== "inline") throw new Error(`materializeProfileFileMounts: ${mount.path} requires an inline resource`);
@@ -376,16 +372,31 @@ function inlineContent(mount) {
376
372
  * client-detectable bad input (traversal paths, control characters,
377
373
  * non-string content) fails without paying for a sandbox that would only be
378
374
  * orphaned by the post-provision throw.
375
+ *
376
+ * A path the sidecar file API refuses (an absolute path outside
377
+ * `SANDBOX_FILE_API_ABSOLUTE_ROOTS`) follows the profile's resource policy:
378
+ * with `failOnError` true (the default) it throws
379
+ * {@link ProfileFileMountPathError} (422); with `failOnError: false` the
380
+ * mount is dropped with a warning. Returns the mounts to deliver.
379
381
  */
380
- function validateDeferredProfileFileMounts(files) {
382
+ function validateDeferredProfileFileMounts(files, options = {}) {
383
+ const kept = [];
381
384
  const paths = /* @__PURE__ */ new Set();
382
385
  for (const mount of files) {
383
386
  inlineContent(mount);
384
387
  validateProfileFilePath(mount.path);
388
+ if (isProfileFileMountOutsideRoots(mount.path)) {
389
+ const message = `materializeProfileFileMounts: ${profileFileMountOutsideRootsMessage(mount.path)}`;
390
+ if (options.failOnError !== false) throw new ProfileFileMountPathError(mount.path, message, PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE);
391
+ console.warn(`[sandbox.profile] dropped profile file mount (resources.failOnError is false): ${message}`);
392
+ continue;
393
+ }
385
394
  const path = (mount.path.startsWith("~/") ? `${PROFILE_AGENT_HOME}/${mount.path.slice(2)}` : mount.path).replace(/\/+/g, "/");
386
395
  if (paths.has(path)) throw new Error(`materializeProfileFileMounts: duplicate file path ${mount.path}`);
387
396
  paths.add(path);
397
+ kept.push(mount);
388
398
  }
399
+ return kept;
389
400
  }
390
401
  /**
391
402
  * Split inline `resources.skills` out of a profile the way
@@ -592,6 +603,81 @@ function transientExecError(err) {
592
603
  };
593
604
  return { retryable: false };
594
605
  }
606
+ /**
607
+ * A materialization step failure. `detail` holds the sandbox's own output
608
+ * (stderr). It is kept apart from the message, which names the mount path,
609
+ * so classification never reads the caller's path as a cause.
610
+ */
611
+ var ProfileFileMaterializeError = class extends Error {
612
+ exitCode;
613
+ detail;
614
+ /** True when the SDK itself decided the failure, with no sandbox call. */
615
+ decided;
616
+ constructor(message, options = {}) {
617
+ super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
618
+ this.name = "ProfileFileMaterializeError";
619
+ this.exitCode = options.exitCode;
620
+ this.detail = options.detail;
621
+ this.decided = options.decided === true;
622
+ }
623
+ };
624
+ /**
625
+ * HTTP answers below 500 that do not decide a write after create: a route
626
+ * that is still settling (401, 404), a timeout, a conflict, too early, or a
627
+ * rate limit.
628
+ */
629
+ const UNSETTLED_HTTP_STATUSES = new Set([
630
+ 401,
631
+ 404,
632
+ 408,
633
+ 409,
634
+ 425,
635
+ 429
636
+ ]);
637
+ /** Sandbox output that names a cause a repeat cannot change. */
638
+ const DECIDED_CAUSE_RE = /\bEROFS\b|read-only file system|\bEACCES\b|\bEPERM\b|permission denied|operation not permitted|checksum mismatch|refusing|outside allowed roots|reserved control-plane|duplicate profile file target/i;
639
+ /**
640
+ * Whether a failed materialization may succeed when repeated. Only a clear
641
+ * deterministic cause makes it terminal:
642
+ * - a read-only file system, permission denied, a refused path or a
643
+ * checksum mismatch in the sandbox's output;
644
+ * - a 4xx write refusal other than {@link UNSETTLED_HTTP_STATUSES};
645
+ * - a delivery the SDK refused itself.
646
+ *
647
+ * A transport failure, a timeout, any 5xx (Cloudflare 520-530 included), an
648
+ * unsettled 4xx or an exit code of 128 or more (a signal or OOM kill) is
649
+ * retryable, and so is any failure with no clear cause. Text is read only
650
+ * from the sandbox's output and from errors the SDK did not raise, never from
651
+ * an SDK message that names the mount path.
652
+ */
653
+ function isRetryableProfileFileMaterializeFailure(err) {
654
+ let decided = false;
655
+ const seen = /* @__PURE__ */ new Set();
656
+ for (let link = err; link && typeof link === "object";) {
657
+ if (seen.has(link)) break;
658
+ seen.add(link);
659
+ if (link instanceof ProfileFileMountExecTimeoutError || link instanceof NetworkError || link instanceof TimeoutError) return true;
660
+ const status = errorStatus(link);
661
+ if (status !== void 0) {
662
+ if (status >= 500 || UNSETTLED_HTTP_STATUSES.has(status)) return true;
663
+ if (status >= 400) decided = true;
664
+ }
665
+ if (link instanceof ProfileFileMaterializeError) {
666
+ if (link.exitCode !== void 0 && link.exitCode >= 128) return true;
667
+ if (link.decided) decided = true;
668
+ if (link.detail !== void 0 && DECIDED_CAUSE_RE.test(link.detail)) decided = true;
669
+ } else {
670
+ const { code, message } = link;
671
+ if (typeof code === "string" && TRANSIENT_EXEC_CODE_RE.test(code)) return true;
672
+ if (typeof message === "string") {
673
+ if (TRANSIENT_EXEC_MESSAGE_RE.test(message)) return true;
674
+ if (DECIDED_CAUSE_RE.test(message)) decided = true;
675
+ }
676
+ }
677
+ link = link.cause;
678
+ }
679
+ return !decided;
680
+ }
595
681
  function isUndecidedWriteFailure(err) {
596
682
  if (err instanceof NetworkError) return true;
597
683
  if (!err || typeof err !== "object") return false;
@@ -655,13 +741,19 @@ async function execProfileFileMount(box, mount, content, options, execState) {
655
741
  await sleep(Math.min(retryAfter ?? backoff, PROFILE_FILE_MOUNT_RETRY_MAX_MS));
656
742
  continue;
657
743
  }
658
- throw new Error(`materializeProfileFileMounts: exec failed for ${path}`, { cause: err });
744
+ throw new ProfileFileMaterializeError(`materializeProfileFileMounts: exec failed for ${path}`, { cause: err });
659
745
  }
660
746
  }
661
747
  };
662
748
  const step = async (cmd) => {
663
749
  const result = await run(`${homeGuard}${cmd}`);
664
- if (result.exitCode !== 0) throw new Error(`materializeProfileFileMounts: failed to write ${path} (exit ${result.exitCode}): ${result.stderr.slice(0, 500)}`);
750
+ if (result.exitCode !== 0) {
751
+ const stderr = result.stderr.slice(0, 500);
752
+ throw new ProfileFileMaterializeError(`materializeProfileFileMounts: failed to write ${path} (exit ${result.exitCode}): ${stderr}`, {
753
+ exitCode: result.exitCode,
754
+ detail: stderr
755
+ });
756
+ }
665
757
  };
666
758
  await step(dir ? `mkdir -p ${shellPath(dir)}` : ":");
667
759
  for (let i = 0; i < b64Chunks.length; i++) {
@@ -696,7 +788,7 @@ async function materializeProfileFileMounts(box, files, options = {}) {
696
788
  const mode = profileFileMode(mount);
697
789
  const contentBytes = new TextEncoder().encode(content).byteLength;
698
790
  if (!fitsSingleShotWrite(content, contentBytes)) {
699
- if (typeof uploadDataFn !== "function") throw new Error(`materializeProfileFileMounts: ${mount.path} (${contentBytes} bytes decoded) does not fit a gateway-safe single-shot write once JSON-serialized, and the box does not expose fs.uploadData for chunked delivery`);
791
+ if (typeof uploadDataFn !== "function") throw new ProfileFileMaterializeError(`materializeProfileFileMounts: ${mount.path} (${contentBytes} bytes decoded) does not fit a gateway-safe single-shot write once JSON-serialized, and the box does not expose fs.uploadData for chunked delivery`, { decided: true });
700
792
  viaUpload.push({
701
793
  path: target,
702
794
  content,
@@ -725,7 +817,7 @@ async function materializeProfileFileMounts(box, files, options = {}) {
725
817
  maxRetries
726
818
  }), maxRetries);
727
819
  } catch (err) {
728
- throw new Error("materializeProfileFileMounts: file API batch write failed", { cause: err });
820
+ throw new ProfileFileMaterializeError("materializeProfileFileMounts: file API batch write failed", { cause: err });
729
821
  }
730
822
  let homeFilesWrittenByApi = 0;
731
823
  if (viaHomeFileApi.length > 0) {
@@ -741,7 +833,7 @@ async function materializeProfileFileMounts(box, files, options = {}) {
741
833
  }), maxRetries);
742
834
  homeFilesWrittenByApi = viaHomeFileApi.length;
743
835
  } catch (err) {
744
- if (!isFileApiRootOnlyError(err)) throw new Error("materializeProfileFileMounts: home file API batch write failed", { cause: err });
836
+ if (!isFileApiRootOnlyError(err)) throw new ProfileFileMaterializeError("materializeProfileFileMounts: home file API batch write failed", { cause: err });
745
837
  viaExec.push(...viaHomeFileApi.map(({ mount, content }) => ({
746
838
  mount,
747
839
  content
@@ -757,7 +849,7 @@ async function materializeProfileFileMounts(box, files, options = {}) {
757
849
  maxRetries
758
850
  });
759
851
  } catch (err) {
760
- throw new Error(`materializeProfileFileMounts: uploadData failed for ${item.path}`, { cause: err });
852
+ throw new ProfileFileMaterializeError(`materializeProfileFileMounts: uploadData failed for ${item.path}`, { cause: err });
761
853
  }
762
854
  }
763
855
  const execState = { started: false };
@@ -867,7 +959,13 @@ async function materializeAbsentProfileFiles(box, files, options) {
867
959
  throw error;
868
960
  }
869
961
  const applied = await execWithTimeout(box, `node -e ${shellSingleQuote(APPLY_STAGED_PROFILE_FILES)} ${shellSingleQuote(stage)}`, options.execTimeoutMs ?? PROFILE_FILE_MOUNT_EXEC_TIMEOUT_MS);
870
- if (applied.exitCode !== 0) throw new Error(`materializeProfileFileMounts: ${applied.stderr.slice(0, 1500)}`);
962
+ if (applied.exitCode !== 0) {
963
+ const stderr = applied.stderr.slice(0, 1500);
964
+ throw new ProfileFileMaterializeError(`materializeProfileFileMounts: ${stderr}`, {
965
+ exitCode: applied.exitCode,
966
+ detail: stderr
967
+ });
968
+ }
871
969
  return {
872
970
  ...result,
873
971
  written: files.length,
@@ -2571,8 +2669,9 @@ var ProfileFileDelivery = class {
2571
2669
  pending = Promise.resolve();
2572
2670
  unsupportedBoxes = /* @__PURE__ */ new WeakSet();
2573
2671
  prepare(box, profile, signal, existingFiles = "allow-identical") {
2574
- const { leanProfile, deferredFiles } = splitInlineProfileFileMounts(structuredClone(profile));
2575
- validateDeferredProfileFileMounts(deferredFiles);
2672
+ const split = splitInlineProfileFileMounts(structuredClone(profile));
2673
+ const { leanProfile } = split;
2674
+ const deferredFiles = validateDeferredProfileFileMounts(split.deferredFiles, { failOnError: profile.resources?.failOnError !== false });
2576
2675
  if (deferredFiles.length === 0) return Promise.resolve(leanProfile);
2577
2676
  const bundle = profileFileBundleKey(deferredFiles);
2578
2677
  const prepared = this.pending.then(async () => {
@@ -6605,7 +6704,7 @@ var SandboxInstance = class SandboxInstance {
6605
6704
  totalBytes: size,
6606
6705
  percentage: 0
6607
6706
  });
6608
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-RaMaNFN_.js");
6707
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-Bs5qcfRB.js");
6609
6708
  await uploadChunkedFromFile({ fetch: (path, init) => this.runtimeFetch(path, init) }, remotePath, localPath, {
6610
6709
  mode: options?.permissions,
6611
6710
  onProgress: options?.onProgress ? (progress) => {
@@ -9377,16 +9476,17 @@ var SandboxInstance = class SandboxInstance {
9377
9476
  }
9378
9477
  /** @internal — invoked before the sandbox is deleted. */
9379
9478
  async _sessionExportRawEvidence(id, destination, options) {
9380
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-tCj9wHJ4.js");
9479
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-Bxk6fUjS.js");
9381
9480
  await this.ensureRunning();
9382
9481
  await this.refresh();
9383
- return exportRawEvidenceDirectory((signal) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams({
9384
- maxBytes: String(options.maxBytes),
9385
- maxFiles: String(options.maxFiles),
9386
- ...options.copy ? { copy: options.copy } : {},
9387
- ...options.executionId ? { executionId: options.executionId } : {},
9388
- ...options.parts ? { parts: options.parts } : {}
9389
- })}`, {
9482
+ return exportRawEvidenceDirectory((signal) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
9483
+ ["maxBytes", String(options.maxBytes)],
9484
+ ["maxFiles", String(options.maxFiles)],
9485
+ ...options.copy ? [["copy", options.copy]] : [],
9486
+ ...options.executionId ? [["executionId", options.executionId]] : [],
9487
+ ...options.parts ? [["parts", options.parts]] : [],
9488
+ ...(options.omitContent ?? []).map((prefix) => ["omitContent", prefix])
9489
+ ])}`, {
9390
9490
  method: "GET",
9391
9491
  signal
9392
9492
  }), id, destination, options, this.#info.captureProof);
@@ -9404,7 +9504,7 @@ var SandboxInstance = class SandboxInstance {
9404
9504
  * and the byte and file bounds are verified before the directory appears.
9405
9505
  */
9406
9506
  async exportRawEvidence(destination, options) {
9407
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-tCj9wHJ4.js");
9507
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-Bxk6fUjS.js");
9408
9508
  await this.ensureRunning();
9409
9509
  await this.refresh();
9410
9510
  return exportRawEvidenceDirectory((signal) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -9976,4 +10076,4 @@ function quoteForShell(value) {
9976
10076
  return `'${value.replace(/'/g, "'\\''")}'`;
9977
10077
  }
9978
10078
  //#endregion
9979
- export { rewrapResponse as A, ManagedProcessClient as C, validateDeferredProfileFileMounts as D, splitInlineProfileSkills as E, exportTraceBundle as M, otelTraceIdForTangleTrace as N, normalizeConnection as O, toOtelJson as P, isToolBearingEvent as S, splitInlineProfileFileMounts as T, SandboxOperationFailedError as _, normalizeStartupDiagnostics as a, collectAgentResponseText as b, MAX_EGRESS_DENIALS_LIMIT as c, InteractiveSessionHandle as d, agentInteractiveSessionPromptRequestDigest as f, SandboxOperation as g, createInteractiveTerminalSession as h, normalizeSandboxCreateReceipt as i, buildTraceExportPayload as j, normalizeSandboxShape as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, WorkspaceImages as o, InteractiveTerminalFrameLog as p, normalizeCaptureProof as r, GPU_LEASE_PROVIDER_NAMES as s, SandboxInstance as t, SandboxSession as u, applySandboxEventText as v, materializeProfileFileMounts as w, getSandboxEventText as x, collectAgentFinalMessageText as y };
10079
+ export { normalizeSandboxShape as A, ManagedProcessClient as C, splitInlineProfileSkills as D, splitInlineProfileFileMounts as E, toOtelJson as F, buildTraceExportPayload as M, exportTraceBundle as N, validateDeferredProfileFileMounts as O, otelTraceIdForTangleTrace as P, isToolBearingEvent as S, materializeProfileFileMounts as T, SandboxOperationFailedError as _, normalizeStartupDiagnostics as a, collectAgentResponseText as b, MAX_EGRESS_DENIALS_LIMIT as c, InteractiveSessionHandle as d, agentInteractiveSessionPromptRequestDigest as f, SandboxOperation as g, createInteractiveTerminalSession as h, normalizeSandboxCreateReceipt as i, rewrapResponse as j, normalizeConnection as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, WorkspaceImages as o, InteractiveTerminalFrameLog as p, normalizeCaptureProof as r, GPU_LEASE_PROVIDER_NAMES as s, SandboxInstance as t, SandboxSession as u, applySandboxEventText as v, isRetryableProfileFileMaterializeFailure as w, getSandboxEventText as x, collectAgentFinalMessageText as y };
@@ -1,10 +1,10 @@
1
1
  import { t as CliAuthReference } from "./cli-auth-bundle-BKsrsbxy.js";
2
- import { $a as WriteFileOptions, $t as ForkCounts, A as CommitTaskSessionOptions, An as JsonValue, Bi as SandboxTerminalAttachOptions, C as BranchOptions, Ca as SnapshotProvenance, Ci as SandboxInfo, Cn as HttpClient, Cr as RestoreSnapshotOptions, D as CodeExecutionResult, Da as StartupDiagnostics, Di as SandboxOperationState, Dn as IntelligenceReportCompareTo, Dr as RolloutOptions, E as CodeExecutionOptions, Ei as SandboxOperationKind, En as IntelligenceReportBudget, Fa as TaskSessionInfo, Fi as SandboxRuntimeHealth, Ft as FileWriteResult, Ga as TurnDriveResult, Gi as SandboxTerminals, Gn as NetworkManager, H as CreateTaskSessionOptions, Hr as SandboxEvent, Ii as SandboxShape, Ir as SandboxConnection, Jn as PermissionsManager, Ki as SandboxTraceBundle, La as TeeAttestationOptions, Lr as SandboxDeleteAcknowledgement, M as ConversationTurnOptions, Ma as TaskSessionChanges, N as ConversationTurnResult, Na as TaskSessionCommitResult, Nr as SSHCommandDescriptor, O as CodeLanguage, Oi as SandboxPortBinding, Pi as SandboxRuntimeCapabilities, Pr as SSHCredentials, Q as DispatchedSession, Qa as WorkspaceOperationLookup, Qi as SearchOptions, Rr as SandboxDeleteOptions, Sa as SnapshotOptions, St as ExecResult, Ta as SnapshotResult, Ti as SandboxOperationInfo, Tn as IntelligenceReport, Tr as Rollout, V as CreateSessionOptions, Va as TeePublicKeyResponse, Wa as TurnBackendConfig, Xa as WaitForOptions, Xn as PreviewLinkManager, Yi as SandboxTraceOptions, Z as DispatchPromptOptions, Za as WaitForRolloutOptions, Zi as SearchMatch, aa as SessionEventStreamOptions, an as GitCommit, ao as SandboxEnvRecovery, at as DriverInfo, cn as GitStatus, cr as PromptResult, ct as DurablePlanDecisionOptions, d as BackendConfig, da as SessionInterruptOptions, do as RawEvidenceBoxDirectoryExport, en as ForkIdempotency, eo as WriteManyFile, fa as SessionListOptions, fo as RawEvidenceBoxExportOptions, ga as SessionResultOptions, gt as EgressManager, in as GitBranch, io as SandboxCreateReceipt, j as CompletedTurnResult, ji as SandboxResourceUsage, jn as ListMessagesOptions, ka as StopOptions, kn as IntelligenceReportWindow, kr as RolloutStartResult, kt as FileSystem, la as SessionForkOptions, ln as GpuLease, lr as ProvisionEvent, lt as DurablePlanDecisionResult, ma as SessionMessageAdmission, mn as GpuLeaseManager, mo as RawEvidenceExportOptions, na as SendSessionMessageRequest, nr as ProcessManager, oa as SessionExecutionInfo, oo as SandboxEnvRecoveryView, or as PromptInputPart, p as BackendManager, pa as SessionMessage, pi as SandboxFleetTraceBundle, po as RawEvidenceDirectoryExport, pr as PublicProfileConflict, ra as SentSessionMessage, rt as DriveTurnOptions, sn as GitDiff, sr as PromptOptions, st as DurablePlan, ta as SendSessionMessageOptions, tn as ForkLookupOptions, to as WriteManyOptions, ua as SessionInfo, ur as ProvisionResult, va as SnapshotDeleteAcknowledgement, vo as WorkspaceImagePublishResult$1, wn as InstalledTool, wr as ResumeOptions, xa as SnapshotInfo, xt as ExecOptions, yo as InteractionResolutionAcknowledgement, yt as EventStreamOptions, za as TeeAttestationResponse, zi as SandboxStatus } from "./types-B91mhT62.js";
2
+ import { $a as WriteFileOptions, $t as ForkCounts, A as CommitTaskSessionOptions, An as JsonValue, Bi as SandboxTerminalAttachOptions, C as BranchOptions, Ca as SnapshotProvenance, Ci as SandboxInfo, Cn as HttpClient, Cr as RestoreSnapshotOptions, D as CodeExecutionResult, Da as StartupDiagnostics, Di as SandboxOperationState, Dn as IntelligenceReportCompareTo, Dr as RolloutOptions, E as CodeExecutionOptions, Ei as SandboxOperationKind, En as IntelligenceReportBudget, Fa as TaskSessionInfo, Fi as SandboxRuntimeHealth, Ft as FileWriteResult, Ga as TurnDriveResult, Gi as SandboxTerminals, Gn as NetworkManager, H as CreateTaskSessionOptions, Hr as SandboxEvent, Ii as SandboxShape, Ir as SandboxConnection, Jn as PermissionsManager, Ki as SandboxTraceBundle, La as TeeAttestationOptions, Lr as SandboxDeleteAcknowledgement, M as ConversationTurnOptions, Ma as TaskSessionChanges, N as ConversationTurnResult, Na as TaskSessionCommitResult, Nr as SSHCommandDescriptor, O as CodeLanguage, Oi as SandboxPortBinding, Pi as SandboxRuntimeCapabilities, Pr as SSHCredentials, Q as DispatchedSession, Qa as WorkspaceOperationLookup, Qi as SearchOptions, Rr as SandboxDeleteOptions, Sa as SnapshotOptions, St as ExecResult, Ta as SnapshotResult, Ti as SandboxOperationInfo, Tn as IntelligenceReport, Tr as Rollout, V as CreateSessionOptions, Va as TeePublicKeyResponse, Wa as TurnBackendConfig, Xa as WaitForOptions, Xn as PreviewLinkManager, Yi as SandboxTraceOptions, Z as DispatchPromptOptions, Za as WaitForRolloutOptions, Zi as SearchMatch, aa as SessionEventStreamOptions, an as GitCommit, ao as SandboxEnvRecovery, at as DriverInfo, cn as GitStatus, cr as PromptResult, ct as DurablePlanDecisionOptions, d as BackendConfig, da as SessionInterruptOptions, do as RawEvidenceBoxDirectoryExport, en as ForkIdempotency, eo as WriteManyFile, fa as SessionListOptions, fo as RawEvidenceBoxExportOptions, ga as SessionResultOptions, gt as EgressManager, in as GitBranch, io as SandboxCreateReceipt, j as CompletedTurnResult, ji as SandboxResourceUsage, jn as ListMessagesOptions, ka as StopOptions, kn as IntelligenceReportWindow, kr as RolloutStartResult, kt as FileSystem, la as SessionForkOptions, ln as GpuLease, lr as ProvisionEvent, lt as DurablePlanDecisionResult, ma as SessionMessageAdmission, mn as GpuLeaseManager, mo as RawEvidenceExportOptions, na as SendSessionMessageRequest, nr as ProcessManager, oa as SessionExecutionInfo, oo as SandboxEnvRecoveryView, or as PromptInputPart, p as BackendManager, pa as SessionMessage, pi as SandboxFleetTraceBundle, po as RawEvidenceDirectoryExport, pr as PublicProfileConflict, ra as SentSessionMessage, rt as DriveTurnOptions, sn as GitDiff, sr as PromptOptions, st as DurablePlan, ta as SendSessionMessageOptions, tn as ForkLookupOptions, to as WriteManyOptions, ua as SessionInfo, ur as ProvisionResult, va as SnapshotDeleteAcknowledgement, vo as WorkspaceImagePublishResult$1, wn as InstalledTool, wr as ResumeOptions, xa as SnapshotInfo, xt as ExecOptions, yo as InteractionResolutionAcknowledgement, yt as EventStreamOptions, za as TeeAttestationResponse, zi as SandboxStatus } from "./types-Bal6rlUP.js";
3
3
  import { c as TerminalStreamReconnectAuthority, f as MintScopedTokenOptions, n as TerminalStream, o as TerminalStreamHandlers, p as ScopedToken, y as TerminalReadyInfo } from "./terminal-stream-DgD7GlFi.js";
4
4
  import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-B6sySQFu.js";
5
5
  import { r as InteractiveAttachRequest } from "./interactive-controller-BSWoA0YE.js";
6
- import { z as SandboxLines } from "./lines-BWLeaELK.js";
7
- import { h as SandboxError } from "./errors-tik04CKT.js";
6
+ import { z as SandboxLines } from "./lines-CodL_Yhd.js";
7
+ import { g as SandboxError } from "./errors-H96CGXWZ.js";
8
8
  import { z } from "zod";
9
9
  import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentProfileFileMount, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
10
10
 
@@ -422,8 +422,16 @@ type ProfileFileMountBox = {
422
422
  * client-detectable bad input (traversal paths, control characters,
423
423
  * non-string content) fails without paying for a sandbox that would only be
424
424
  * orphaned by the post-provision throw.
425
+ *
426
+ * A path the sidecar file API refuses (an absolute path outside
427
+ * `SANDBOX_FILE_API_ABSOLUTE_ROOTS`) follows the profile's resource policy:
428
+ * with `failOnError` true (the default) it throws
429
+ * {@link ProfileFileMountPathError} (422); with `failOnError: false` the
430
+ * mount is dropped with a warning. Returns the mounts to deliver.
425
431
  */
426
- declare function validateDeferredProfileFileMounts(files: readonly AgentProfileFileMount[]): void;
432
+ declare function validateDeferredProfileFileMounts(files: readonly AgentProfileFileMount[], options?: {
433
+ /** The profile's `resources.failOnError`; false drops refused mounts. */failOnError?: boolean;
434
+ }): AgentProfileFileMount[];
427
435
  interface SplitInlineProfileSkillsResult {
428
436
  /** Profile with inline skill refs removed (github refs kept — they resolve
429
437
  * server-side). Suitable for the create body, whose wire cap the full skill
@@ -1,2 +1,2 @@
1
- import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, 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 TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-CuFC5al5.js";
1
+ import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, 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 TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-CygLpbAJ.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 JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Cr6EkNcG.js";
1
+ import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Cwu6ql_V.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,5 +1,5 @@
1
- import { C as readResponseJson } from "./errors-DSJBKmGZ.js";
2
- import { n as createSandboxInstanceFromResponse } from "./sandbox-D0NNcvnQ.js";
1
+ import { w as readResponseJson } from "./errors-Bfhg_Zc6.js";
2
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-NDSp3I1V.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-B6gap92T.js";
4
4
  //#region src/tangle/abi.ts
5
5
  /**
@@ -1242,6 +1242,11 @@ type RawEvidenceNativeFile = RawEvidenceNativeMetadata & {
1242
1242
  sha256?: string;
1243
1243
  linkTarget?: string; /** Replaces contentBase64 for regular files. Symlinks remain metadata only. */
1244
1244
  content?: RawEvidencePayloadFile;
1245
+ /**
1246
+ * The request's `omitContent` names this file's directory: the file has
1247
+ * its metadata and no `content` or `sha256`, and its bytes stay on the box.
1248
+ */
1249
+ contentOmitted?: true;
1245
1250
  };
1246
1251
  interface RawEvidenceArchiveAttempt {
1247
1252
  executionId: string;
@@ -1278,6 +1283,12 @@ interface RawEvidenceArchiveManifest {
1278
1283
  rootScope: "session-home" | "workspace-session";
1279
1284
  path: string;
1280
1285
  }>;
1286
+ /**
1287
+ * The request's `omitContent` prefixes, present only when it named some.
1288
+ * A prefix that covers or enters the harness's native session store is
1289
+ * refused with 400, so the session store always keeps its bytes.
1290
+ */
1291
+ omitContent?: string[];
1281
1292
  files: RawEvidenceNativeFile[];
1282
1293
  excluded: Array<RawEvidenceNativeMetadata & {
1283
1294
  reason: "credential";
@@ -1432,6 +1443,18 @@ interface RawEvidenceExportOptions {
1432
1443
  * ignores it and serves the full archive, within the same bounds.
1433
1444
  */
1434
1445
  parts?: "native";
1446
+ /**
1447
+ * Session-HOME-relative directory prefixes, each ending in `/` (for
1448
+ * example `.codex/plugins/cache/`). The HOME walk names each file below
1449
+ * one with its metadata and `contentOmitted: true`, and never reads its
1450
+ * bytes. Use it for directories a harness downloads again, so their bytes
1451
+ * do not cross the network. At most 64 prefixes of at most 512 characters;
1452
+ * not with `parts`. A prefix that covers or enters the harness's native
1453
+ * session store is refused. A sidecar older than the option ignores it and
1454
+ * sends every file's bytes, so keep `maxBytes` sized for the whole HOME
1455
+ * until every sidecar serves the option.
1456
+ */
1457
+ omitContent?: readonly string[];
1435
1458
  /** Bound all archive file entries, including empty files. */
1436
1459
  maxFiles: number;
1437
1460
  /** Compressed transport bound; defaults to maxBytes plus bounded tar overhead. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.62.13",
3
+ "version": "0.62.15",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -168,8 +168,8 @@
168
168
  "@tangle-network/sse-core": "0.0.0"
169
169
  },
170
170
  "tangleRelease": {
171
- "sourceSha": "30c28d435438c1fd649011a81311a08fda7cb732",
172
- "mergedAt": "2026-10-19T12:26:06-06:00"
171
+ "sourceSha": "88684a72e3023f878ddd904ae5a50bca8b8aeb23",
172
+ "mergedAt": "2026-10-19T13:24:14-06:00"
173
173
  },
174
174
  "scripts": {
175
175
  "build": "node scripts/build-dist.mjs",