@tangle-network/sandbox 1.0.20 → 1.0.22

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 (76) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +5 -5
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +3 -3
  5. package/dist/{agent-run-outcome-I1nMkkrz.d.ts → agent-run-outcome-DQjHjmTQ.d.ts} +2 -2
  6. package/dist/{api-request-EseiF9B1.js → api-request-DNrodWdz.js} +1 -1
  7. package/dist/auth/index.d.ts +2 -2
  8. package/dist/auth/index.js +1 -1
  9. package/dist/{browser-interactive-control-controller-Bt1vcu9c.js → browser-interactive-control-controller-EhML8YjF.js} +186 -2131
  10. package/dist/{browser-interactive-control-controller-CVnME80O.d.ts → browser-interactive-control-controller-i9JtmJDf.d.ts} +1 -1
  11. package/dist/{chunked-upload-Df_5Q2x8.js → chunked-upload-KRWmiJsw.js} +1 -1
  12. package/dist/{chunked-upload-file-Dtm1GBkE.js → chunked-upload-file-DPSyrGUb.js} +2 -2
  13. package/dist/cli-auth-bundle-V7sPQYej.js +1594 -0
  14. package/dist/{client-DEvdnu0z.d.ts → client-1bgxaNQD.d.ts} +5 -5
  15. package/dist/{client-kXxHARKu.js → client-DC1Q6oJb.js} +11 -11
  16. package/dist/collaboration/index.d.ts +1 -1
  17. package/dist/collaboration/index.js +1 -1
  18. package/dist/{collaboration-BTGTf3We.js → collaboration-DPukGUcF.js} +1 -1
  19. package/dist/{core-DvYE_89H.js → core-0iCiDt_5.js} +5 -5
  20. package/dist/core.d.ts +6 -6
  21. package/dist/core.js +5 -5
  22. package/dist/{direct-http2-B0ra_xhU.js → direct-http2-C0H7zN9h.js} +1 -1
  23. package/dist/{errors-ZmDrrk4f.js → errors-BUPIDjn4.js} +1 -1
  24. package/dist/{sha2-BUPMvGTk.js → harness-DkCl2wJv.js} +417 -1
  25. package/dist/{index-C3GQDkDm.d.ts → index-vcweImuL.d.ts} +6 -6
  26. package/dist/index.d.ts +11 -11
  27. package/dist/index.js +11 -11
  28. package/dist/intelligence/index.js +2 -2
  29. package/dist/interactive-control.d.ts +1 -1
  30. package/dist/interactive-control.js +1 -1
  31. package/dist/{interactive-controller-Bf8yrdzR.d.ts → interactive-controller-B16SZKZt.d.ts} +3 -3
  32. package/dist/{interactive-controller-BkfV4Cs_.js → interactive-controller-kZk52Eff.js} +19 -21
  33. package/dist/lib/prepared-evidence.js +1 -1
  34. package/dist/lib/prepared-process.js +1 -1
  35. package/dist/{lines-BqZOl_io.js → lines-BnAWHGX3.js} +1 -1
  36. package/dist/{lines-CA1IbRzE.d.ts → lines-BxCEZUkf.d.ts} +1 -1
  37. package/dist/lines.d.ts +1 -1
  38. package/dist/lines.js +1 -1
  39. package/dist/local-cli-auth-CJuKPr1j.js +29 -0
  40. package/dist/{mcp-local-BcRLN_Ic.js → mcp-local-C88efQL3.js} +1 -1
  41. package/dist/{prepared-evidence-CuUh_mz6.js → prepared-evidence-DC-M4WEF.js} +1 -1
  42. package/dist/{preview-DQs0Zh9L.d.ts → preview-QcwZWgzk.d.ts} +3 -3
  43. package/dist/{profile-schema-CT3hB1mG.js → profile-schema-1WmjXjE9.js} +23 -12
  44. package/dist/{public-templates-COGktcNu.d.ts → public-templates-GNIKn_wg.d.ts} +2 -2
  45. package/dist/public-templates.d.ts +1 -1
  46. package/dist/public-templates.js +1 -1
  47. package/dist/{raw-evidence-archive-CqarcYcp.js → raw-evidence-archive-Bc-OdA_Q.js} +1 -1
  48. package/dist/runtime.d.ts +5 -5
  49. package/dist/runtime.js +5 -5
  50. package/dist/{sandbox-BAhF5QaX.js → sandbox-Qn9ScVvS.js} +46 -48
  51. package/dist/{secp256k1-CZWrpqxW.js → secp256k1-BGtA1PsN.js} +1 -1
  52. package/dist/select-seat-command.d.ts +1 -1
  53. package/dist/select-seat-command.js +1 -1
  54. package/dist/session-gateway/index.js +3 -3
  55. package/dist/tangle/index.d.ts +1 -1
  56. package/dist/tangle/index.js +1 -1
  57. package/dist/{tangle-CwfZovBM.js → tangle-DOwUAne4.js} +4 -4
  58. package/dist/{terminal-stream-types-DwXQzUbH.d.ts → terminal-stream-types-BM5J4lt0.d.ts} +155 -769
  59. package/dist/{types-BF8se4_x.d.ts → types-MYaFNkH5.d.ts} +7 -7
  60. package/package.json +5 -5
  61. package/dist/cli-auth-bundle-KtV88h1f.js +0 -2597
  62. package/dist/harness-BD_OISom.js +0 -201
  63. package/dist/harness-DWL2MM4q.js +0 -418
  64. package/dist/local-cli-auth-g0wSTWf5.js +0 -36
  65. /package/dist/{abort-signal-jU-SEjLT.js → abort-signal-CDxyloxz.js} +0 -0
  66. /package/dist/{cli-auth-bundle-MskLEgtA.d.ts → cli-auth-bundle-CFZx0muA.d.ts} +0 -0
  67. /package/dist/{index-Dqcr9p97.d.ts → index-DnZdhFs2.d.ts} +0 -0
  68. /package/dist/{index-Dslyq85a.d.ts → index-rbeL2Rct.d.ts} +0 -0
  69. /package/dist/{keep-alive-fetch-C2DX2_rG.js → keep-alive-fetch-BbSFbRCd.js} +0 -0
  70. /package/dist/{prepared-process-LjBfQnZ5.js → prepared-process-BQUSksTH.js} +0 -0
  71. /package/dist/{preview-operations-BvgwYaoL.js → preview-operations-D2fXB_dc.js} +0 -0
  72. /package/dist/{response-rewrap-MBztoTLx.js → response-rewrap-CpNkboDX.js} +0 -0
  73. /package/dist/{retry-after-header-BZbs5rig.js → retry-after-header-DUdCC0KJ.js} +0 -0
  74. /package/dist/{sidecar-proxy-error-Dty4zmN7.js → sidecar-proxy-error-5DpLmHeN.js} +0 -0
  75. /package/dist/{sse-parser-CJ52bhG3.js → sse-parser-CKkE9zWy.js} +0 -0
  76. /package/dist/{utils-vaFoyyiO.js → utils-CoawKwX_.js} +0 -0
@@ -394,759 +394,7 @@ declare class TerminalStreamError extends Error {
394
394
  });
395
395
  }
396
396
  //#endregion
397
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@4.0.0/node_modules/@tangle-network/agent-interface/dist/harness.d.ts
398
- /**
399
- * The execution runner for an agent — WHICH runtime materializes and runs an `AgentProfile`.
400
- *
401
- * This enum describes an EXECUTION concern. When an `AgentProfile` authors a `harness`
402
- * preference, that field participates in its canonical identity like every other parsed profile
403
- * field. A caller or executor may override the preference for one run, but the execution receipt
404
- * preserves the authored identity, effective identity, and selected harness separately. This is
405
- * the single shared enum every layer references instead of keeping its own copy (session control,
406
- * the profile materializer, the cli-bridge backends, VB profile specs).
407
- *
408
- * `cli-base` is the router-backed mode — a plain multi-turn router call (a reviewer, a cheap judge,
409
- * a one-shot) with no full coding-agent harness. The rest are full agentic harnesses run in a
410
- * sandbox or locally via the CLI bridge.
411
- *
412
- * `forge` (tailcallhq/forgecode) and `cursor` (cursor-agent) are multi-provider CLI harnesses with
413
- * no vendor lock, so they carry no entry in the capability tables and resolve as router-backed.
414
- *
415
- * `prime` (PrimeIntellect-ai/prime-agent) is the prime fork of the pi line — the RLM
416
- * IPython-kernel harness. It is a distinct harness from `pi`: the fork's wire protocol has
417
- * diverged (its daemon rejects pi-line clients), so the two are not interchangeable at run time.
418
- */
419
- type HarnessType$1 = "claude-code" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "pi" | "prime" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "forge" | "cursor" | "acp" | "cli-base";
420
- //#endregion
421
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@4.0.0/node_modules/@tangle-network/agent-interface/dist/agent-profile.d.ts
422
- /**
423
- * Permission policy value for a capability.
424
- */
425
- type AgentProfilePermissionValue$1 = "allow" | "ask" | "deny";
426
- type AgentProfilePermission$1 = AgentProfilePermissionValue$1 | Record<string, AgentProfilePermissionValue$1>;
427
- /**
428
- * Generic resource reference that can be resolved into a file or instruction.
429
- */
430
- type AgentProfileResourceRef$1 = {
431
- kind: "inline";
432
- name: string;
433
- content: string;
434
- } | {
435
- kind: "github";
436
- /**
437
- * Optional repository in "owner/repo" form. When omitted, providers may
438
- * only resolve the path if they have an ambient repository context.
439
- */
440
- repository?: string;
441
- path: string;
442
- ref?: string;
443
- name?: string;
444
- };
445
- /**
446
- * Resource mounted into a backend workspace.
447
- */
448
- interface AgentProfileFileMount$1 {
449
- path: string;
450
- resource: AgentProfileResourceRef$1;
451
- executable?: boolean;
452
- }
453
- /**
454
- * Provider-neutral resource bundle.
455
- */
456
- interface AgentProfileResources$1 {
457
- /**
458
- * Generic files to materialize into the agent workspace before execution.
459
- */
460
- files?: AgentProfileFileMount$1[];
461
- /**
462
- * Provider-native tool files. Backends materialize these into their standard
463
- * discovery location when they support file-based tools.
464
- */
465
- tools?: AgentProfileResourceRef$1[];
466
- /**
467
- * Agent Skills (`SKILL.md`) packages. Supported by Cursor, Claude Code,
468
- * Codex-compatible layouts, OpenCode, and Hermes-style skill harnesses.
469
- */
470
- skills?: AgentProfileResourceRef$1[];
471
- /**
472
- * Provider-native subagent definition files.
473
- */
474
- agents?: AgentProfileResourceRef$1[];
475
- /**
476
- * Provider-native slash command files.
477
- */
478
- commands?: AgentProfileResourceRef$1[];
479
- /**
480
- * Additional instructions injected into the agent context.
481
- */
482
- instructions?: string | AgentProfileResourceRef$1;
483
- /**
484
- * Fail initialization when a provider cannot materialize a resource.
485
- */
486
- failOnError?: boolean;
487
- }
488
- /**
489
- * Portable reasoning/thinking effort. Backends map it to their native control at materialization:
490
- * codex `model_reasoning_effort`, kimi `--thinking`/`--no-thinking`, claude thinking budget.
491
- * Ordered low→high:
492
- * - `none` — extended thinking OFF (no reasoning budget at all)
493
- * - `minimal` — thinking ON, the lowest budget (distinct from `none`)
494
- * - `low` / `medium` / `high` / `xhigh`
495
- * - `ultracode` — maximum (Claude Code's `max` and Codex's `ultra` reconcile here).
496
- * A backend without a matching native tier may clamp down to its strongest supported level, but it
497
- * must never turn reasoning on for `none` or silently increase a requested effort.
498
- */
499
- declare const REASONING_EFFORTS$1: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "ultracode"];
500
- type ReasoningEffort$1 = (typeof REASONING_EFFORTS$1)[number];
501
- /**
502
- * Model selection hints for backends.
503
- */
504
- interface AgentProfileModelHints$1 {
505
- /**
506
- * Preferred default model (format depends on backend, commonly "provider/model").
507
- */
508
- default?: string;
509
- /**
510
- * Preferred small/cheap model for lightweight work.
511
- */
512
- small?: string;
513
- /**
514
- * Optional provider preference hint.
515
- */
516
- provider?: string;
517
- /**
518
- * Reasoning/thinking effort hint — a first-class, portable model dimension (not buried in
519
- * `extensions`). Backends map it to their native control at materialization.
520
- *
521
- * This is a quality dial, not a spend limit. It never bounds token count.
522
- */
523
- reasoningEffort?: ReasoningEffort$1;
524
- /**
525
- * Maximum visible answer tokens a backend may bill for one completion.
526
- * A positive integer. Independent of the reasoning and total ceilings.
527
- */
528
- maxVisibleOutputTokens?: number;
529
- /**
530
- * Maximum hidden reasoning tokens a backend may bill for one completion.
531
- * A positive integer, separate from visible answer tokens.
532
- */
533
- maxReasoningTokens?: number;
534
- /**
535
- * Maximum total billed completion tokens for visible answer and hidden
536
- * reasoning tokens together. A positive integer. When it is set with either
537
- * single ceiling, that single ceiling must not exceed it.
538
- */
539
- maxTotalOutputTokens?: number;
540
- /**
541
- * Backend-agnostic model metadata/hints.
542
- */
543
- metadata?: Record<string, unknown>;
544
- }
545
- /** An authored subscription choice. The executor resolves account availability at run time. */
546
- interface AgentProfileSeat$1 {
547
- /** Exact harness to use for this segment. */
548
- harness: HarnessType$1;
549
- /** Provider that must serve `model`; a different provider requires another stage. */
550
- provider: string;
551
- /** Exact model requested from this provider. */
552
- model: string;
553
- /** Select all eligible accounts in account-manager order, or one named account. */
554
- selector: {
555
- kind: "all-eligible";
556
- } | {
557
- kind: "seat";
558
- id: string;
559
- };
560
- /** Replace the profile-level native tool map for this stage; `{}` clears it. */
561
- tools?: Record<string, boolean>;
562
- /** Replace the profile-level permission map for this stage; `{}` clears it. */
563
- permissions?: Record<string, AgentProfilePermission$1>;
564
- }
565
- /**
566
- * Prompt shaping for an agent.
567
- *
568
- * Replacement and addition are two different intents against the same channel
569
- * and are never interchangeable. A backend that can only do one of them must
570
- * refuse the other rather than substituting it, which is why
571
- * {@link AgentProfileCapabilities.systemPrompt} carries a separate bit for each.
572
- *
573
- * Setting `systemPrompt` and `appendSystemPrompt` together is legal and ordered:
574
- * the replacement is installed first and the addition composes on top of it, so
575
- * the effective prompt is `systemPrompt` then `appendSystemPrompt`. The pair is
576
- * deliberately allowed because {@link mergeAgentProfiles} composes the two
577
- * fields independently — refusing it would let two individually valid profiles
578
- * merge into an invalid one.
579
- */
580
- interface AgentProfilePrompt$1 {
581
- /**
582
- * REPLACE the harness's own system prompt with this text.
583
- *
584
- * The harness's built-in prompt is DELETED, not extended: the model stops
585
- * receiving the tool descriptions, output conventions, refusal rules, and
586
- * workflow scaffolding it was tuned against, so behavior can move far beyond
587
- * the words written here. Supply a prompt that stands on its own.
588
- *
589
- * Honored only where {@link AgentProfileSystemPromptCapability.replace} is
590
- * true — a harness that exposes a real replacement control (`pi
591
- * --system-prompt <file>` with context files, skills, and prompt templates
592
- * off; gemini `.gemini/system.md` with `GEMINI_SYSTEM_MD=1`). A backend that
593
- * can only add text must reject this field. Folding it into an addition is a
594
- * silent semantic downgrade: the instructions the caller asked to delete stay
595
- * in force, and nothing in the result says so.
596
- */
597
- systemPrompt?: string;
598
- /**
599
- * ADD this text to the harness's own system prompt, which stays intact.
600
- *
601
- * The model keeps everything it was tuned against and receives this on top,
602
- * in the same privileged position as the system prompt. Maps to claude-code
603
- * `--append-system-prompt`, and to a leading `role: "system"` message on
604
- * harnesses that take a message list.
605
- *
606
- * Distinct from {@link AgentProfilePrompt.instructions}, which harnesses
607
- * materialize into their lower-privilege project-instruction surface.
608
- *
609
- * Honored only where {@link AgentProfileSystemPromptCapability.append} is
610
- * true.
611
- */
612
- appendSystemPrompt?: string;
613
- /**
614
- * Additional instruction lines composed into the agent's project-instruction
615
- * surface — the harness's `AGENTS.md` / `CLAUDE.md`-style files or its own
616
- * caller-instruction preamble. Lower privilege than
617
- * {@link AgentProfilePrompt.appendSystemPrompt} and placed wherever the
618
- * harness keeps caller instructions rather than in the system prompt.
619
- */
620
- instructions?: string[];
621
- }
622
- /** Deliberately public configuration included in profile identity. */
623
- interface AgentProfilePublicConfigValue$1 {
624
- kind: "public";
625
- value: string;
626
- }
627
- /**
628
- * Opaque reference resolved only inside the private prepared executor.
629
- * `key` is caller-declared public identity naming provider/operator-owned
630
- * secret material; callers must not put the secret value in it.
631
- */
632
- interface AgentProfileSecretRef$1 {
633
- kind: "secret-ref";
634
- key: string;
635
- /** Apply no decoration or a `Bearer ` prefix after private resolution. */
636
- format?: "raw" | "bearer";
637
- }
638
- /** A configuration value is public bytes or an opaque secret identity. */
639
- type AgentProfileConfigValue$1 = AgentProfilePublicConfigValue$1 | AgentProfileSecretRef$1;
640
- /**
641
- * Generic subagent definition.
642
- */
643
- interface AgentSubagentProfile$1 {
644
- description?: string;
645
- prompt?: string;
646
- model?: string;
647
- tools?: Record<string, boolean>;
648
- permissions?: Record<string, AgentProfilePermission$1>;
649
- maxSteps?: number;
650
- metadata?: Record<string, unknown>;
651
- }
652
- interface AgentProfileHookCommand$1 {
653
- command: string;
654
- timeoutMs?: number;
655
- blocking?: boolean;
656
- matcher?: string;
657
- env?: Record<string, AgentProfileConfigValue$1>;
658
- }
659
- interface AgentProfileMode$1 {
660
- description?: string;
661
- model?: string;
662
- prompt?: string;
663
- tools?: Record<string, boolean>;
664
- permissions?: Record<string, AgentProfilePermission$1>;
665
- metadata?: Record<string, unknown>;
666
- }
667
- /**
668
- * Confidential-execution options for sandbox backends.
669
- *
670
- * The Tangle blueprint path translates this into TEE job parameters and fails
671
- * closed when the requested TEE is unavailable. Callers should verify returned
672
- * attestation evidence before treating a session as confidential.
673
- */
674
- interface AgentProfileConfidential$1 {
675
- /**
676
- * TEE variant requested from the operator.
677
- */
678
- tee?: "tdx" | "nitro" | "phala-dstack" | "sev-snp" | "any" | (string & {});
679
- /**
680
- * Optional hex-encoded 32-64 byte challenge for deploy-time report data.
681
- */
682
- attestationNonce?: string;
683
- /**
684
- * Require no persistence across session end when supported by the backend.
685
- */
686
- sealed?: boolean;
687
- /**
688
- * Ask the SDK/backend to create or require a fresh attestation challenge.
689
- */
690
- attestationRefresh?: boolean;
691
- }
692
- /**
693
- * Generic MCP server configuration.
694
- */
695
- interface AgentProfileMcpServerBase$1 {
696
- metadata?: Record<string, unknown>;
697
- }
698
- interface AgentProfileLocalMcpServer$1 extends AgentProfileMcpServerBase$1 {
699
- enabled?: true;
700
- transport?: "stdio";
701
- command: string;
702
- args?: AgentProfileConfigValue$1[];
703
- env?: Record<string, AgentProfileConfigValue$1>;
704
- cwd?: string;
705
- url?: never;
706
- headers?: never;
707
- }
708
- interface AgentProfileRemoteMcpServer$1 extends AgentProfileMcpServerBase$1 {
709
- enabled?: true;
710
- transport?: "sse" | "http";
711
- command?: never;
712
- args?: never;
713
- env?: never;
714
- cwd?: never;
715
- url: string;
716
- headers?: Record<string, AgentProfileConfigValue$1>;
717
- }
718
- interface AgentProfileDisabledMcpServer$1 extends AgentProfileMcpServerBase$1 {
719
- enabled: false;
720
- transport?: never;
721
- command?: never;
722
- args?: never;
723
- env?: never;
724
- cwd?: never;
725
- url?: never;
726
- headers?: never;
727
- }
728
- type AgentProfileMcpServer$1 = AgentProfileLocalMcpServer$1 | AgentProfileRemoteMcpServer$1 | AgentProfileDisabledMcpServer$1;
729
- /**
730
- * Hub-managed integration grant. The sandbox runtime resolves each declared
731
- * connection/capability pair into an MCP tool backed by Tangle Hub policy.
732
- */
733
- interface AgentProfileConnection$1 {
734
- /**
735
- * Hub connection id selected by the user, for example a connected Gmail
736
- * account.
737
- */
738
- connectionId: string;
739
- /**
740
- * Capability paths explicitly granted to the agent.
741
- */
742
- capabilities: string[];
743
- /**
744
- * Optional MCP server alias. Must be unique after profile merge.
745
- */
746
- alias?: string;
747
- }
748
- /** Identity of a task whose data was exposed to training or model selection. */
749
- interface AgentTrainingTask$1 {
750
- benchmark: string;
751
- task: string;
752
- contentDigest: Sha256Digest$1;
753
- }
754
- /** Complete exposure inventory, derived from the exact dataset delivered to a trainer. */
755
- interface AgentTrainingDatasetIdentity$1 {
756
- digest: Sha256Digest$1;
757
- taskSetDigest: Sha256Digest$1;
758
- tasks: AgentTrainingTask$1[];
759
- }
760
- interface AgentTrainingReceipt$1 {
761
- version: 1;
762
- dataset: AgentTrainingDatasetIdentity$1;
763
- parentProfileDigest: Sha256Digest$1;
764
- /** Null only when the parent has no training receipt. */
765
- parentReceiptDigest: Sha256Digest$1 | null;
766
- executionRef: Sha256Digest$1;
767
- trainer: {
768
- mode: "command" | "managed";
769
- id: string;
770
- revision: Sha256Digest$1; /** Public hyperparameters only; credentials belong to the private executor. */
771
- parameters: Record<string, string | number | boolean | null>;
772
- };
773
- checkpoint: {
774
- artifactDigest: Sha256Digest$1;
775
- artifactBytes: number;
776
- routerModelId: string; /** Digest of independently verified serving evidence, not trainer stdout. */
777
- servingDigest: Sha256Digest$1;
778
- };
779
- }
780
- interface AgentProfileTraining$1 {
781
- receipt: AgentTrainingReceipt$1;
782
- /** Immediate parent first, terminating at a receipt with parentReceiptDigest=null. */
783
- ancestors: AgentTrainingReceipt$1[];
784
- }
785
- interface AgentProfileMetadata$1 extends Record<string, unknown> {
786
- /** Reserved: a trained model is admitted only with a complete checkpoint receipt. */
787
- training?: AgentProfileTraining$1;
788
- }
789
- /**
790
- * Public provider-neutral agent profile contract.
791
- */
792
- interface AgentProfile$1 {
793
- name?: string;
794
- description?: string;
795
- version?: string;
796
- tags?: string[];
797
- prompt?: AgentProfilePrompt$1;
798
- model?: AgentProfileModelHints$1;
799
- /**
800
- * Preferred execution harness for this profile — the coding-CLI runtime that
801
- * materializes and runs it (`claude-code`, `codex`, `opencode`, `pi`, …).
802
- *
803
- * This optional authored preference participates in canonical profile
804
- * identity. An executor MAY override it for one run; the effective profile and
805
- * execution receipt then bind that override without changing what was
806
- * authored. When unset, the caller/executor chooses. Formalizes what runtimes
807
- * already read as `profile.harness`; making it typed also lets an improvement
808
- * loop optimize harness routing as a first-class lever.
809
- */
810
- harness?: HarnessType$1;
811
- /**
812
- * Ordered, authored subscription chain for one logical agent. The first
813
- * stage must match `harness`, `model.provider`, and `model.default` above.
814
- * Omission preserves the existing single-provider execution policy.
815
- */
816
- seats?: AgentProfileSeat$1[];
817
- permissions?: Record<string, AgentProfilePermission$1>;
818
- tools?: Record<string, boolean>;
819
- mcp?: Record<string, AgentProfileMcpServer$1>;
820
- connections?: AgentProfileConnection$1[];
821
- subagents?: Record<string, AgentSubagentProfile$1>;
822
- resources?: AgentProfileResources$1;
823
- hooks?: Record<string, AgentProfileHookCommand$1[]>;
824
- modes?: Record<string, AgentProfileMode$1>;
825
- confidential?: AgentProfileConfidential$1;
826
- metadata?: AgentProfileMetadata$1;
827
- /**
828
- * Non-portable backend-specific extensions.
829
- *
830
- * Use this only for features that cannot be expressed generically.
831
- * SDK consumers should treat extension keys as backend namespaces.
832
- */
833
- extensions?: Record<string, Record<string, unknown> | undefined>;
834
- }
835
- //#endregion
836
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@4.0.0/node_modules/@tangle-network/agent-interface/dist/agent-candidate.d.ts
837
- /** Full SHA-256 digest with an explicit algorithm prefix. */
838
- type Sha256Digest$1 = `sha256:${string}`;
839
- //#endregion
840
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@4.0.0/node_modules/@tangle-network/agent-interface/dist/environment-interactive-control.d.ts
841
- /**
842
- * Durable identity of one coding-agent TUI.
843
- *
844
- * This reference identifies the exact admitted run and preparation receipt.
845
- * It is not a generic shell id and cannot be used to create another process.
846
- */
847
- declare const AgentInteractiveSessionRefSchema$1: z.ZodObject<{
848
- run: z.ZodObject<{
849
- runId: z.ZodString;
850
- provider: z.ZodString;
851
- environmentId: z.ZodString;
852
- sessionId: z.ZodString;
853
- executionId: z.ZodString;
854
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
855
- }, z.core.$strict>;
856
- preparationReceipt: z.ZodObject<{
857
- kind: z.ZodLiteral<"agent-execution-preparation">;
858
- schemaVersion: z.ZodLiteral<1>;
859
- preparationId: z.ZodString;
860
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
861
- authoredProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
862
- effectiveProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
863
- backend: z.ZodString;
864
- harness: z.ZodEnum<{
865
- acp: "acp";
866
- amp: "amp";
867
- "claude-code": "claude-code";
868
- "cli-base": "cli-base";
869
- codex: "codex";
870
- cursor: "cursor";
871
- "factory-droids": "factory-droids";
872
- forge: "forge";
873
- gemini: "gemini";
874
- hermes: "hermes";
875
- "kimi-code": "kimi-code";
876
- nanoclaw: "nanoclaw";
877
- openclaw: "openclaw";
878
- opencode: "opencode";
879
- pi: "pi";
880
- prime: "prime";
881
- }>;
882
- harnessVersion: z.ZodString;
883
- resolvedModel: z.ZodObject<{
884
- requested: z.ZodString;
885
- resolved: z.ZodString;
886
- provider: z.ZodOptional<z.ZodString>;
887
- reasoningEffort: z.ZodOptional<z.ZodObject<{
888
- requested: z.ZodEnum<{
889
- high: "high";
890
- low: "low";
891
- medium: "medium";
892
- minimal: "minimal";
893
- none: "none";
894
- ultracode: "ultracode";
895
- xhigh: "xhigh";
896
- }>;
897
- resolved: z.ZodOptional<z.ZodEnum<{
898
- high: "high";
899
- low: "low";
900
- medium: "medium";
901
- minimal: "minimal";
902
- none: "none";
903
- ultracode: "ultracode";
904
- xhigh: "xhigh";
905
- }>>;
906
- fidelity: z.ZodEnum<{
907
- clamped: "clamped";
908
- exact: "exact";
909
- unsupported: "unsupported";
910
- }>;
911
- }, z.core.$strict>>;
912
- }, z.core.$strict>;
913
- workspace: z.ZodObject<{
914
- leaseId: z.ZodString;
915
- provider: z.ZodString;
916
- identityDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
917
- isolation: z.ZodEnum<{
918
- "per-run": "per-run";
919
- shared: "shared";
920
- }>;
921
- sourceSnapshotDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
922
- sourceSnapshotPolicy: z.ZodObject<{
923
- kind: z.ZodLiteral<"provider-declared">;
924
- name: z.ZodString;
925
- version: z.ZodNumber;
926
- digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
927
- }, z.core.$strict>;
928
- preparedWorkspaceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
929
- profileActivationDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
930
- }, z.core.$strict>;
931
- axisResults: z.ZodArray<z.ZodObject<{
932
- axis: z.ZodEnum<{
933
- appendSystemPrompt: "appendSystemPrompt";
934
- commands: "commands";
935
- confidential: "confidential";
936
- connections: "connections";
937
- description: "description";
938
- extensions: "extensions";
939
- files: "files";
940
- harness: "harness";
941
- hooks: "hooks";
942
- instructions: "instructions";
943
- mcp: "mcp";
944
- metadata: "metadata";
945
- modelDefault: "modelDefault";
946
- modelMaxReasoningTokens: "modelMaxReasoningTokens";
947
- modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
948
- modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
949
- modelMetadata: "modelMetadata";
950
- modelProvider: "modelProvider";
951
- modelReasoningEffort: "modelReasoningEffort";
952
- modelSmall: "modelSmall";
953
- modes: "modes";
954
- name: "name";
955
- permissions: "permissions";
956
- resourceAgents: "resourceAgents";
957
- resourceFailOnError: "resourceFailOnError";
958
- resourceInstructions: "resourceInstructions";
959
- resourceTools: "resourceTools";
960
- seats: "seats";
961
- skills: "skills";
962
- subagents: "subagents";
963
- systemPrompt: "systemPrompt";
964
- tags: "tags";
965
- tools: "tools";
966
- version: "version";
967
- }>;
968
- disposition: z.ZodEnum<{
969
- behavior: "behavior";
970
- control: "control";
971
- overridden: "overridden";
972
- unsupported: "unsupported";
973
- }>;
974
- owner: z.ZodEnum<{
975
- executor: "executor";
976
- runtime: "runtime";
977
- }>;
978
- mechanism: z.ZodString;
979
- evidenceDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
980
- path: z.ZodOptional<z.ZodString>;
981
- reason: z.ZodOptional<z.ZodString>;
982
- }, z.core.$strict>>;
983
- executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
984
- materializer: z.ZodObject<{
985
- name: z.ZodString;
986
- version: z.ZodString;
987
- }, z.core.$strict>;
988
- expiresAtMs: z.ZodNumber;
989
- digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
990
- }, z.core.$strict>;
991
- incarnationId: z.ZodString;
992
- startedAt: z.ZodISODateTime;
993
- }, z.core.$strict>;
994
- type AgentInteractiveSessionRef$1 = z.infer<typeof AgentInteractiveSessionRefSchema$1>;
995
- /**
996
- * Provider-issued write authority for one exact interactive process.
997
- *
998
- * Expiry blocks mutations but does not kill the coding process. A coordinator
999
- * can issue a new compare-and-swap claim after expiry. The provider's PTY owner
1000
- * lease remains the separate process-cleanup authority.
1001
- */
1002
- declare const AgentInteractiveSessionControlClaimSchema$1: z.ZodObject<{
1003
- refDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1004
- generation: z.ZodNumber;
1005
- leaseId: z.ZodString;
1006
- holderId: z.ZodString;
1007
- expiresAt: z.ZodISODateTime;
1008
- }, z.core.$strict>;
1009
- type AgentInteractiveSessionControlClaim$1 = z.infer<typeof AgentInteractiveSessionControlClaimSchema$1>;
1010
- //#endregion
1011
- //#region ../../../packages/runtime-contracts/dist/terminal-websocket.d.ts
1012
- /** Non-credential protocol selected during a successful terminal handshake. */
1013
- declare const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
1014
- /**
1015
- * Server stamps for one attach, in epoch milliseconds on the sidecar's clock.
1016
- * They are absolute so a caller can lay them against its own marks and read
1017
- * each leg (client clock skew is the only error). `spawn*` and `initPersistAt`
1018
- * are absent when the attach adopted a PTY that already existed.
1019
- */
1020
- declare const terminalReadyTimingsSchema: z.ZodObject<{
1021
- upgradeAt: z.ZodNumber;
1022
- authAt: z.ZodNumber;
1023
- initAt: z.ZodNumber;
1024
- loadAt: z.ZodNumber;
1025
- spawnAt: z.ZodOptional<z.ZodNumber>;
1026
- initPersistAt: z.ZodOptional<z.ZodNumber>;
1027
- loadedAt: z.ZodNumber;
1028
- historyAt: z.ZodNumber;
1029
- historyEvents: z.ZodNumber;
1030
- historyBytes: z.ZodNumber;
1031
- readyAt: z.ZodNumber;
1032
- via: z.ZodEnum<{
1033
- upgrade: "upgrade";
1034
- frame: "frame";
1035
- }>;
1036
- ptid: z.ZodOptional<z.ZodString>;
1037
- }, z.core.$strip>;
1038
- type TerminalReadyTimings = z.infer<typeof terminalReadyTimingsSchema>;
1039
- declare const terminalReadyMessageSchema: z.ZodObject<{
1040
- type: z.ZodLiteral<"ready">;
1041
- connectionId: z.ZodString;
1042
- sessionId: z.ZodString;
1043
- restored: z.ZodBoolean;
1044
- detachTimeoutMs: z.ZodNumber;
1045
- attachCount: z.ZodOptional<z.ZodNumber>;
1046
- cursors: z.ZodOptional<z.ZodObject<{
1047
- earliest: z.ZodNumber;
1048
- latest: z.ZodNumber;
1049
- }, z.core.$strip>>;
1050
- timings: z.ZodOptional<z.ZodObject<{
1051
- upgradeAt: z.ZodNumber;
1052
- authAt: z.ZodNumber;
1053
- initAt: z.ZodNumber;
1054
- loadAt: z.ZodNumber;
1055
- spawnAt: z.ZodOptional<z.ZodNumber>;
1056
- initPersistAt: z.ZodOptional<z.ZodNumber>;
1057
- loadedAt: z.ZodNumber;
1058
- historyAt: z.ZodNumber;
1059
- historyEvents: z.ZodNumber;
1060
- historyBytes: z.ZodNumber;
1061
- readyAt: z.ZodNumber;
1062
- via: z.ZodEnum<{
1063
- upgrade: "upgrade";
1064
- frame: "frame";
1065
- }>;
1066
- ptid: z.ZodOptional<z.ZodString>;
1067
- }, z.core.$strip>>;
1068
- }, z.core.$strip>;
1069
- type TerminalReadyMessage = z.infer<typeof terminalReadyMessageSchema>;
1070
- type TerminalReadyInfo = Omit<TerminalReadyMessage, "type">;
1071
- /** One sequenced output frame for an exact interactive terminal. */
1072
- declare const terminalOutputMessageSchema: z.ZodObject<{
1073
- type: z.ZodLiteral<"output">;
1074
- seq: z.ZodNumber;
1075
- data: z.ZodString;
1076
- }, z.core.$strip>;
1077
- type TerminalOutputMessage = z.infer<typeof terminalOutputMessageSchema>;
1078
- declare const terminalExitMessageSchema: z.ZodObject<{
1079
- type: z.ZodLiteral<"exit">;
1080
- exitCode: z.ZodOptional<z.ZodNumber>;
1081
- exitSignal: z.ZodOptional<z.ZodString>;
1082
- }, z.core.$strip>;
1083
- type TerminalExitMessage = z.infer<typeof terminalExitMessageSchema>;
1084
- type TerminalExitInfo = Omit<TerminalExitMessage, "type">;
1085
- type TerminalStreamAuthFormat = "edge" | "sidecar-direct";
1086
- interface TerminalInteractiveSessionIdentity {
1087
- incarnationId: AgentInteractiveSessionRef$1["incarnationId"];
1088
- control: AgentInteractiveSessionControlClaim$1;
1089
- }
1090
- //#endregion
1091
- //#region src/scoped-token-types.d.ts
1092
- /**
1093
- * Public types for scoped consumer-side tokens.
1094
- *
1095
- * This module intentionally has no SDK implementation imports. Terminal
1096
- * streams and token requests share these contracts without depending on the
1097
- * SDK's aggregate types module.
1098
- */
1099
- /**
1100
- * Scope of a `box.mintScopedToken()` request. `session` and `project` mint
1101
- * SessionGateway read tokens. `session-runtime` and `read-only` mint sidecar
1102
- * capability tokens for browser-safe runtime access; request access:"read-only"
1103
- * on session-runtime for a session event stream without write capabilities.
1104
- */
1105
- type ScopedTokenScope = "session" | "session-runtime" | "project" | "read-only";
1106
- interface MintScopedTokenBase {
1107
- /** TTL in minutes. Default 5; clamped to [1, 15]. */
1108
- ttlMinutes?: number;
1109
- /** Cancel the token request before it reaches the terminal dial. */
1110
- signal?: AbortSignal;
1111
- }
1112
- /** Options for `box.mintScopedToken()`, narrowed by consumer scope. */
1113
- type MintScopedTokenOptions = (MintScopedTokenBase & {
1114
- scope: "session"; /** Client-facing browser session ID. */
1115
- sessionId: string; /** Actual runtime session ID used to filter the sandbox event stream. */
1116
- runtimeSessionId: string;
1117
- }) | (MintScopedTokenBase & {
1118
- scope: "session-runtime";
1119
- sessionId: string; /** Restrict this session's bearer to reads; omission also grants workspace/terminal. */
1120
- access?: "read-only";
1121
- runtimeSessionId?: never;
1122
- }) | (MintScopedTokenBase & {
1123
- scope: "project" | "read-only";
1124
- sessionId?: never;
1125
- runtimeSessionId?: never;
1126
- });
1127
- /** Options for the server-side exact interactive-session token request. */
1128
- type MintInteractiveSessionTokenOptions = Pick<MintScopedTokenBase, "ttlMinutes" | "signal">;
1129
- /**
1130
- * Returned by `box.mintScopedToken()`. Native session streams use a read-only
1131
- * session-runtime token. Session/project tokens retain legacy gateway semantics.
1132
- */
1133
- interface ScopedToken {
1134
- /** Bearer token (JWT) for the consumer selected by `scope`. */
1135
- token: string;
1136
- /** When the token expires. */
1137
- expiresAt: Date;
1138
- /** The runtime's direct edge URL. Use with runtime scopes; session/project
1139
- * tokens instead connect to the Sandbox API's `/session` WebSocket. */
1140
- runtimeUrl: string;
1141
- /** Browser-safe Sandbox API proxy base for terminal and runtime requests. */
1142
- sidecarProxyUrl: string;
1143
- /** Echo of the requested scope. */
1144
- scope: ScopedTokenScope;
1145
- /** Acknowledged session-runtime restriction; absent for unrestricted requests. */
1146
- access?: "read-only";
1147
- }
1148
- //#endregion
1149
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/plan.d.ts
397
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/plan.d.ts
1150
398
  /**
1151
399
  * Typed server-originated continuation. Adapters consume this instead of
1152
400
  * inferring approval from a free-form user message.
@@ -1182,7 +430,7 @@ declare const PlanContinuationSchema: z.ZodObject<{
1182
430
  }, z.core.$strict>;
1183
431
  type PlanContinuation = z.infer<typeof PlanContinuationSchema>;
1184
432
  //#endregion
1185
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/interaction-data.d.ts
433
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/interaction-data.d.ts
1186
434
  declare const InteractionSecretReferenceSchema: z.ZodObject<{
1187
435
  kind: z.ZodLiteral<"secret_handle">;
1188
436
  handleId: z.ZodString;
@@ -1203,7 +451,7 @@ declare const InteractionResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
1203
451
  }, z.core.$strict>], "outcome">;
1204
452
  type InteractionResolution = z.infer<typeof InteractionResolutionSchema>;
1205
453
  //#endregion
1206
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.d.ts
454
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.d.ts
1207
455
  declare const ProxySecretBindingSchema: z.ZodObject<{
1208
456
  hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1209
457
  methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -1255,7 +503,7 @@ declare const ProxySecretCapabilitiesSchema: z.ZodObject<{
1255
503
  }, z.core.$strict>;
1256
504
  type ProxySecretCapabilities = z.infer<typeof ProxySecretCapabilitiesSchema>;
1257
505
  //#endregion
1258
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/harness.d.ts
506
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/harness.d.ts
1259
507
  /**
1260
508
  * Recognized execution identities, not a deployment's list of installed runners.
1261
509
  * A profile's authored harness remains part of its canonical identity; execution
@@ -1289,7 +537,7 @@ declare const harnessTypeSchema: z.ZodEnum<{
1289
537
  /** One declaration owns runtime validation and the compile-time vocabulary. */
1290
538
  type HarnessType = z.infer<typeof harnessTypeSchema>;
1291
539
  //#endregion
1292
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/agent-profile.d.ts
540
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/agent-profile.d.ts
1293
541
  /**
1294
542
  * Permission policy value for a capability.
1295
543
  */
@@ -1765,11 +1013,11 @@ interface AgentProfileValidationResult {
1765
1013
  normalizedProfile?: AgentProfile;
1766
1014
  }
1767
1015
  //#endregion
1768
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/agent-candidate.d.ts
1016
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/agent-candidate.d.ts
1769
1017
  /** Full SHA-256 digest with an explicit algorithm prefix. */
1770
1018
  type Sha256Digest = `sha256:${string}`;
1771
1019
  //#endregion
1772
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/interaction-fields.d.ts
1020
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/interaction-fields.d.ts
1773
1021
  declare const InteractionAnswerSpecSchema: z.ZodObject<{
1774
1022
  fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1775
1023
  type: z.ZodLiteral<"text">;
@@ -1823,7 +1071,7 @@ declare const InteractionResponseScopeSchema: z.ZodEnum<{
1823
1071
  persistent: "persistent";
1824
1072
  }>;
1825
1073
  //#endregion
1826
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/interaction-envelope.d.ts
1074
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/interaction-envelope.d.ts
1827
1075
  declare const InteractionSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1828
1076
  type: z.ZodLiteral<"tool">;
1829
1077
  toolName: z.ZodString;
@@ -1930,7 +1178,7 @@ declare const InteractionAcknowledgementSchema: z.ZodObject<{
1930
1178
  }, z.core.$strict>;
1931
1179
  type InteractionAcknowledgement = z.infer<typeof InteractionAcknowledgementSchema>;
1932
1180
  //#endregion
1933
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/runtime-control.d.ts
1181
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/runtime-control.d.ts
1934
1182
  /** Provider-neutral coordinates sufficient to recreate control of one run. */
1935
1183
  interface AgentRunControlRef {
1936
1184
  runId: string;
@@ -1967,7 +1215,7 @@ interface AgentRunCancellationAcknowledgement {
1967
1215
  existingRequestDigest?: Sha256Digest;
1968
1216
  }
1969
1217
  //#endregion
1970
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/environment-terminal.d.ts
1218
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/environment-terminal.d.ts
1971
1219
  /**
1972
1220
  * Provider-neutral handle for one interactive terminal.
1973
1221
  *
@@ -2086,7 +1334,7 @@ interface AgentTerminalSession {
2086
1334
  }): AsyncIterable<TerminalOutputEvent>;
2087
1335
  }
2088
1336
  //#endregion
2089
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/environment-interactive-control.d.ts
1337
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/environment-interactive-control.d.ts
2090
1338
  /**
2091
1339
  * Durable identity of one coding-agent TUI.
2092
1340
  *
@@ -2807,7 +2055,7 @@ interface AgentInteractiveSessionPromptAcknowledgement {
2807
2055
  existingRequestDigest?: `sha256:${string}`;
2808
2056
  }
2809
2057
  //#endregion
2810
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.d.ts
2058
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.d.ts
2811
2059
  /**
2812
2060
  * Start one native coding-agent TUI from caller-owned request material.
2813
2061
  *
@@ -3098,13 +2346,13 @@ declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
3098
2346
  }, z.core.$strict>;
3099
2347
  type AgentInteractiveSessionStart = z.infer<typeof AgentInteractiveSessionStartSchema>;
3100
2348
  //#endregion
3101
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/runtime-attachments.d.ts
2349
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/runtime-attachments.d.ts
3102
2350
  /** Runtime-owned bindings do not alter the authored AgentProfile or candidate identity. */
3103
2351
  interface AgentRuntimeAttachments {
3104
2352
  mcp: Record<string, AgentProfileMcpServer>;
3105
2353
  }
3106
2354
  //#endregion
3107
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/sandbox-size.d.ts
2355
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/sandbox-size.d.ts
3108
2356
  /**
3109
2357
  * Portable sandbox size vocabulary.
3110
2358
  *
@@ -3128,7 +2376,7 @@ declare const SANDBOX_SIZE_PRESET_NAMES: readonly ["nano", "small", "medium", "l
3128
2376
  */
3129
2377
  type SandboxSizePreset = (typeof SANDBOX_SIZE_PRESET_NAMES)[number];
3130
2378
  //#endregion
3131
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/profile-schema.d.ts
2379
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/profile-schema.d.ts
3132
2380
  /**
3133
2381
  * A registered capability: a stable id paired with its canonical
3134
2382
  * {@link AgentProfile}. `definition` is the full profile (prompt/model/tools/
@@ -3150,7 +2398,7 @@ interface Capability {
3150
2398
  recommendedSize?: SandboxSizePreset;
3151
2399
  }
3152
2400
  //#endregion
3153
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.8.1/node_modules/@tangle-network/agent-interface/dist/profile-security.d.ts
2401
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.9.0/node_modules/@tangle-network/agent-interface/dist/profile-security.d.ts
3154
2402
  /** Policy for {@link validateAgentProfileSecurity}. */
3155
2403
  interface AgentProfileSecurityPolicy {
3156
2404
  /**
@@ -3185,6 +2433,144 @@ interface AgentProfileSecurityPolicy {
3185
2433
  allowConnections?: boolean;
3186
2434
  }
3187
2435
  //#endregion
2436
+ //#region ../../../packages/runtime-contracts/dist/terminal-websocket.d.ts
2437
+ /** Non-credential protocol selected during a successful terminal handshake. */
2438
+ declare const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
2439
+ /**
2440
+ * Server stamps for one attach, in epoch milliseconds on the sidecar's clock.
2441
+ * They are absolute so a caller can lay them against its own marks and read
2442
+ * each leg (client clock skew is the only error). `spawn*` and `initPersistAt`
2443
+ * are absent when the attach adopted a PTY that already existed.
2444
+ */
2445
+ declare const terminalReadyTimingsSchema: z.ZodObject<{
2446
+ upgradeAt: z.ZodNumber;
2447
+ authAt: z.ZodNumber;
2448
+ initAt: z.ZodNumber;
2449
+ loadAt: z.ZodNumber;
2450
+ spawnAt: z.ZodOptional<z.ZodNumber>;
2451
+ initPersistAt: z.ZodOptional<z.ZodNumber>;
2452
+ loadedAt: z.ZodNumber;
2453
+ historyAt: z.ZodNumber;
2454
+ historyEvents: z.ZodNumber;
2455
+ historyBytes: z.ZodNumber;
2456
+ readyAt: z.ZodNumber;
2457
+ via: z.ZodEnum<{
2458
+ upgrade: "upgrade";
2459
+ frame: "frame";
2460
+ }>;
2461
+ ptid: z.ZodOptional<z.ZodString>;
2462
+ }, z.core.$strip>;
2463
+ type TerminalReadyTimings = z.infer<typeof terminalReadyTimingsSchema>;
2464
+ declare const terminalReadyMessageSchema: z.ZodObject<{
2465
+ type: z.ZodLiteral<"ready">;
2466
+ connectionId: z.ZodString;
2467
+ sessionId: z.ZodString;
2468
+ restored: z.ZodBoolean;
2469
+ detachTimeoutMs: z.ZodNumber;
2470
+ attachCount: z.ZodOptional<z.ZodNumber>;
2471
+ cursors: z.ZodOptional<z.ZodObject<{
2472
+ earliest: z.ZodNumber;
2473
+ latest: z.ZodNumber;
2474
+ }, z.core.$strip>>;
2475
+ timings: z.ZodOptional<z.ZodObject<{
2476
+ upgradeAt: z.ZodNumber;
2477
+ authAt: z.ZodNumber;
2478
+ initAt: z.ZodNumber;
2479
+ loadAt: z.ZodNumber;
2480
+ spawnAt: z.ZodOptional<z.ZodNumber>;
2481
+ initPersistAt: z.ZodOptional<z.ZodNumber>;
2482
+ loadedAt: z.ZodNumber;
2483
+ historyAt: z.ZodNumber;
2484
+ historyEvents: z.ZodNumber;
2485
+ historyBytes: z.ZodNumber;
2486
+ readyAt: z.ZodNumber;
2487
+ via: z.ZodEnum<{
2488
+ upgrade: "upgrade";
2489
+ frame: "frame";
2490
+ }>;
2491
+ ptid: z.ZodOptional<z.ZodString>;
2492
+ }, z.core.$strip>>;
2493
+ }, z.core.$strip>;
2494
+ type TerminalReadyMessage = z.infer<typeof terminalReadyMessageSchema>;
2495
+ type TerminalReadyInfo = Omit<TerminalReadyMessage, "type">;
2496
+ /** One sequenced output frame for an exact interactive terminal. */
2497
+ declare const terminalOutputMessageSchema: z.ZodObject<{
2498
+ type: z.ZodLiteral<"output">;
2499
+ seq: z.ZodNumber;
2500
+ data: z.ZodString;
2501
+ }, z.core.$strip>;
2502
+ type TerminalOutputMessage = z.infer<typeof terminalOutputMessageSchema>;
2503
+ declare const terminalExitMessageSchema: z.ZodObject<{
2504
+ type: z.ZodLiteral<"exit">;
2505
+ exitCode: z.ZodOptional<z.ZodNumber>;
2506
+ exitSignal: z.ZodOptional<z.ZodString>;
2507
+ }, z.core.$strip>;
2508
+ type TerminalExitMessage = z.infer<typeof terminalExitMessageSchema>;
2509
+ type TerminalExitInfo = Omit<TerminalExitMessage, "type">;
2510
+ type TerminalStreamAuthFormat = "edge" | "sidecar-direct";
2511
+ interface TerminalInteractiveSessionIdentity {
2512
+ incarnationId: AgentInteractiveSessionRef["incarnationId"];
2513
+ control: AgentInteractiveSessionControlClaim;
2514
+ }
2515
+ //#endregion
2516
+ //#region src/scoped-token-types.d.ts
2517
+ /**
2518
+ * Public types for scoped consumer-side tokens.
2519
+ *
2520
+ * This module intentionally has no SDK implementation imports. Terminal
2521
+ * streams and token requests share these contracts without depending on the
2522
+ * SDK's aggregate types module.
2523
+ */
2524
+ /**
2525
+ * Scope of a `box.mintScopedToken()` request. `session` and `project` mint
2526
+ * SessionGateway read tokens. `session-runtime` and `read-only` mint sidecar
2527
+ * capability tokens for browser-safe runtime access; request access:"read-only"
2528
+ * on session-runtime for a session event stream without write capabilities.
2529
+ */
2530
+ type ScopedTokenScope = "session" | "session-runtime" | "project" | "read-only";
2531
+ interface MintScopedTokenBase {
2532
+ /** TTL in minutes. Default 5; clamped to [1, 15]. */
2533
+ ttlMinutes?: number;
2534
+ /** Cancel the token request before it reaches the terminal dial. */
2535
+ signal?: AbortSignal;
2536
+ }
2537
+ /** Options for `box.mintScopedToken()`, narrowed by consumer scope. */
2538
+ type MintScopedTokenOptions = (MintScopedTokenBase & {
2539
+ scope: "session"; /** Client-facing browser session ID. */
2540
+ sessionId: string; /** Actual runtime session ID used to filter the sandbox event stream. */
2541
+ runtimeSessionId: string;
2542
+ }) | (MintScopedTokenBase & {
2543
+ scope: "session-runtime";
2544
+ sessionId: string; /** Restrict this session's bearer to reads; omission also grants workspace/terminal. */
2545
+ access?: "read-only";
2546
+ runtimeSessionId?: never;
2547
+ }) | (MintScopedTokenBase & {
2548
+ scope: "project" | "read-only";
2549
+ sessionId?: never;
2550
+ runtimeSessionId?: never;
2551
+ });
2552
+ /** Options for the server-side exact interactive-session token request. */
2553
+ type MintInteractiveSessionTokenOptions = Pick<MintScopedTokenBase, "ttlMinutes" | "signal">;
2554
+ /**
2555
+ * Returned by `box.mintScopedToken()`. Native session streams use a read-only
2556
+ * session-runtime token. Session/project tokens retain legacy gateway semantics.
2557
+ */
2558
+ interface ScopedToken {
2559
+ /** Bearer token (JWT) for the consumer selected by `scope`. */
2560
+ token: string;
2561
+ /** When the token expires. */
2562
+ expiresAt: Date;
2563
+ /** The runtime's direct edge URL. Use with runtime scopes; session/project
2564
+ * tokens instead connect to the Sandbox API's `/session` WebSocket. */
2565
+ runtimeUrl: string;
2566
+ /** Browser-safe Sandbox API proxy base for terminal and runtime requests. */
2567
+ sidecarProxyUrl: string;
2568
+ /** Echo of the requested scope. */
2569
+ scope: ScopedTokenScope;
2570
+ /** Acknowledged session-runtime restriction; absent for unrestricted requests. */
2571
+ access?: "read-only";
2572
+ }
2573
+ //#endregion
3188
2574
  //#region src/terminal-stream-types.d.ts
3189
2575
  /**
3190
2576
  * Event callbacks, passed at construction (the same idiom as
@@ -3325,4 +2711,4 @@ interface TerminalStreamOptions {
3325
2711
  mintMs?: number;
3326
2712
  }
3327
2713
  //#endregion
3328
- export { PlanContinuation as $, AgentRunCancellationRequest as A, SandboxErrorJson as At, AgentProfileMcpServer as B, AgentInteractiveSessionStopCommand as C, NetworkError as Ct, TerminalReplayWindow as D, QuotaError as Dt, TerminalOutputEvent as E, ProfileFileMountPathError as Et, AgentProfileCapabilities as F, StreamInterruptionReason as Ft, AgentProfileResourceRef as G, AgentProfileModelHints as H, AgentProfileConfidential as I, TimeoutError as It, AgentProfileValidationIssue as J, AgentProfileResources as K, AgentProfileConfigValue as L, ValidationError as Lt, InteractionRequest as M, ServerError as Mt, InteractionResponseCommand as N, StateError as Nt, AgentExactRunControlRef as O, ResumeEnvRequiredError as Ot, AgentProfile as P, StreamInterruptedError as Pt, InteractionData as Q, AgentProfileConnection as R, SandboxCreateOutcome as Rt, AgentInteractiveSessionStopAcknowledgement as S, KeyBudgetExhaustedError as St, agentInteractiveSessionPromptRequestDigest as T, PartialFailureError as Tt, AgentProfilePermissionValue as U, AgentProfileMetadata as V, AgentProfilePrompt as W, AgentSubagentProfile as X, AgentProfileValidationResult as Y, ReasoningEffort as Z, AgentInteractiveSessionControlClaimRequest as _, EdgeNotReadyError as _t, TerminalStreamOptions as a, TerminalExitInfo as at, AgentInteractiveSessionRef as b, GpuProviderNotConfiguredError as bt, AgentProfileSecurityPolicy as c, TerminalReadyInfo as ct, SandboxSizePreset as d, AgentProfile$1 as dt, MintInteractiveSessionTokenOptions as et, AgentRuntimeAttachments as f, TerminalStreamError as ft, AgentInteractiveSessionControlClaimAcknowledgement as g, CompliancePlacementError as gt, AgentInteractiveSessionControlClaim as h, CapabilityError as ht, TerminalStreamHandlers as i, TERMINAL_WS_ECHO_SUBPROTOCOL as it, InteractionAcknowledgement as j, SandboxFailureDetail as jt, AgentRunCancellationAcknowledgement as k, SandboxError as kt, Capability as l, TerminalReadyTimings as lt, AgentInteractiveSessionAttach as m, BranchFanoutExceedsHostError as mt, TerminalStreamApiKey as n, ScopedToken as nt, TerminalStreamReconnectAuthority as o, TerminalInteractiveSessionIdentity as ot, AgentInteractiveSessionStart as p, AuthError as pt, AgentProfileSeat as q, TerminalStreamBearerToken as r, ScopedTokenScope as rt, TerminalStreamToken as s, TerminalOutputMessage as st, TerminalAttachTimings as t, MintScopedTokenOptions as tt, SANDBOX_SIZE_PRESET_NAMES as u, TerminalStreamAuthFormat as ut, AgentInteractiveSessionPromptAcknowledgement as v, EgressProxyRecoveryError as vt, AgentInteractiveTerminalSession as w, NotFoundError as wt, AgentInteractiveSessionStatus as x, GpuProviderRequirement as xt, AgentInteractiveSessionPromptCommand as y, FileWriteConflictError as yt, AgentProfileFileMount as z, SandboxCreateReceipt as zt };
2714
+ export { AgentProfileModelHints as $, AgentInteractiveSessionPromptCommand as A, SandboxFailureDetail as At, AgentRunCancellationAcknowledgement as B, AgentRuntimeAttachments as C, NotFoundError as Ct, AgentInteractiveSessionControlClaimAcknowledgement as D, ResumeEnvRequiredError as Dt, AgentInteractiveSessionControlClaim as E, QuotaError as Et, AgentInteractiveTerminalSession as F, TimeoutError as Ft, AgentProfile as G, InteractionAcknowledgement as H, agentInteractiveSessionPromptRequestDigest as I, ValidationError as It, AgentProfileConfigValue as J, AgentProfileCapabilities as K, TerminalOutputEvent as L, SandboxCreateOutcome as Lt, AgentInteractiveSessionStatus as M, StateError as Mt, AgentInteractiveSessionStopAcknowledgement as N, StreamInterruptedError as Nt, AgentInteractiveSessionControlClaimRequest as O, SandboxError as Ot, AgentInteractiveSessionStopCommand as P, StreamInterruptionReason as Pt, AgentProfileMetadata as Q, TerminalReplayWindow as R, SandboxCreateReceipt as Rt, SandboxSizePreset as S, NetworkError as St, AgentInteractiveSessionAttach as T, ProfileFileMountPathError as Tt, InteractionRequest as U, AgentRunCancellationRequest as V, InteractionResponseCommand as W, AgentProfileFileMount as X, AgentProfileConnection as Y, AgentProfileMcpServer as Z, TerminalReadyTimings as _, EgressProxyRecoveryError as _t, TerminalStreamOptions as a, AgentProfileValidationIssue as at, Capability as b, GpuProviderRequirement as bt, MintInteractiveSessionTokenOptions as c, ReasoningEffort as ct, ScopedTokenScope as d, TerminalStreamError as dt, AgentProfilePermissionValue as et, TERMINAL_WS_ECHO_SUBPROTOCOL as f, AuthError as ft, TerminalReadyInfo as g, EdgeNotReadyError as gt, TerminalOutputMessage as h, CompliancePlacementError as ht, TerminalStreamHandlers as i, AgentProfileSeat as it, AgentInteractiveSessionRef as j, ServerError as jt, AgentInteractiveSessionPromptAcknowledgement as k, SandboxErrorJson as kt, MintScopedTokenOptions as l, InteractionData as lt, TerminalInteractiveSessionIdentity as m, CapabilityError as mt, TerminalStreamApiKey as n, AgentProfileResourceRef as nt, TerminalStreamReconnectAuthority as o, AgentProfileValidationResult as ot, TerminalExitInfo as p, BranchFanoutExceedsHostError as pt, AgentProfileConfidential as q, TerminalStreamBearerToken as r, AgentProfileResources as rt, TerminalStreamToken as s, AgentSubagentProfile as st, TerminalAttachTimings as t, AgentProfilePrompt as tt, ScopedToken as u, PlanContinuation as ut, TerminalStreamAuthFormat as v, FileWriteConflictError as vt, AgentInteractiveSessionStart as w, PartialFailureError as wt, SANDBOX_SIZE_PRESET_NAMES as x, KeyBudgetExhaustedError as xt, AgentProfileSecurityPolicy as y, GpuProviderNotConfiguredError as yt, AgentExactRunControlRef as z };