@tangle-network/sandbox-cli 0.21.64 → 0.21.65

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 (136) hide show
  1. package/README.md +31 -3
  2. package/SKILL.md +29 -1
  3. package/dist/graph-native-CS_TmaCK.mjs +1 -0
  4. package/dist/graph-viewer/Analytics-bWsqhurt.js +1001 -0
  5. package/dist/graph-viewer/{AnswerStrip-DhwqOyxI.js → AnswerStrip-COxV7gLW.js} +2 -2
  6. package/dist/graph-viewer/Checks-CQGmKcQ0.js +164 -0
  7. package/dist/graph-viewer/Conversations-DgCshBAf.js +627 -0
  8. package/dist/graph-viewer/{Files-DtZhf0ii.js → Files-CvIOGrAs.js} +81 -90
  9. package/dist/graph-viewer/LiveRun-DHmsr6F7.js +311 -0
  10. package/dist/graph-viewer/{Outputs-QET3nPPp.js → Outputs-rwBg_x36.js} +4 -4
  11. package/dist/graph-viewer/Overview-C150tkVa.js +194 -0
  12. package/dist/graph-viewer/{RunOverview-DJQDAMIx.js → RunOverview-CSqsunqf.js} +2 -2
  13. package/dist/graph-viewer/RunPage-F_prVwiV.js +286 -0
  14. package/dist/graph-viewer/Timeline-BFDywlmz.js +335 -0
  15. package/dist/graph-viewer/Today-BdDuqZGF.js +623 -0
  16. package/dist/graph-viewer/Topology-SAfGtd5u.js +238 -0
  17. package/dist/graph-viewer/Traces-BYqXaS_s.js +254 -0
  18. package/dist/graph-viewer/{WallPages-4d9QUZDq.js → WallPages-MM70VZrC.js} +48 -30
  19. package/dist/graph-viewer/agent-runtime.js +55 -55
  20. package/dist/graph-viewer/{data-BJmP7F1M.js → data-DTGmre1W.js} +31 -27
  21. package/dist/graph-viewer/harness-sessions.js +1 -1
  22. package/dist/graph-viewer/index.js +1357 -1392
  23. package/dist/graph-viewer/{lazy-pages-DM0cZM10.js → lazy-pages-BYuq_L_n.js} +9 -5
  24. package/dist/graph-viewer/{outputs-model-CGdvjkQh.js → outputs-model-CHTx8rMz.js} +2 -2
  25. package/dist/graph-viewer/{viewer/plain-words-CgvxtEOa.js → plain-words-BrMHl0On.js} +9 -4
  26. package/dist/graph-viewer/receipt.js +2 -2
  27. package/dist/graph-viewer/record-CsP_3NJS.js +612 -0
  28. package/dist/graph-viewer/record-part-CuT9Xw37.js +334 -0
  29. package/dist/graph-viewer/record.js +2 -336
  30. package/dist/graph-viewer/report-viewer.js +65 -65
  31. package/dist/graph-viewer/report.js +1 -1
  32. package/dist/graph-viewer/research-publication.js +1 -1
  33. package/dist/graph-viewer/{run-files-C1NgzM0l.js → run-files-BckQDdTD.js} +1 -1
  34. package/dist/graph-viewer/{run-receipt-Bvi4-KVM.js → run-receipt-Bt2iXJUy.js} +1 -0
  35. package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +3 -0
  36. package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +2 -0
  37. package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +1 -0
  38. package/dist/graph-viewer/styles.css +4559 -2385
  39. package/dist/graph-viewer/trace-spans.js +1 -1
  40. package/dist/graph-viewer/ui-xa5w5bEN.js +889 -0
  41. package/dist/graph-viewer/viewer/{AgentGraphCanvas-CMdOlSlh-4EervjeC.js → AgentGraphCanvas-B74GN1o6-BZEumF7-.js} +2610 -2707
  42. package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +1002 -0
  43. package/dist/graph-viewer/viewer/{AnswerStrip-CGUyXuYH.js → AnswerStrip-B7xMU57A.js} +2 -2
  44. package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +165 -0
  45. package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +904 -0
  46. package/dist/graph-viewer/viewer/Files-DxL1576V.js +630 -0
  47. package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +820 -0
  48. package/dist/graph-viewer/viewer/{Outputs-CumGyjQo.js → Outputs-BoIpgfMv.js} +24 -23
  49. package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +436 -0
  50. package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +285 -0
  51. package/dist/graph-viewer/viewer/{Scores-ZS16yk0n.js → Scores-Dgv4WePL.js} +3 -3
  52. package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +335 -0
  53. package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +623 -0
  54. package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +239 -0
  55. package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +254 -0
  56. package/dist/graph-viewer/viewer/{WallPages-CzWpyIfp.js → WallPages-Clj4bORg.js} +50 -32
  57. package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +4027 -0
  58. package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +2 -0
  59. package/dist/graph-viewer/viewer/{bot-D6Nrej7Z.js → bot-BaQU59LG.js} +1 -1
  60. package/dist/graph-viewer/viewer/{chevron-right-D_5IKLxu.js → chevron-right-Xn05jYLT.js} +1 -1
  61. package/dist/graph-viewer/viewer/{createLucideIcon-yH0cxLMy.js → createLucideIcon-BSphcoOJ.js} +1 -1
  62. package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +371 -0
  63. package/dist/graph-viewer/viewer/{data-CkWfWr7i.js → data-CVHeKhrh.js} +144 -139
  64. package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +349 -0
  65. package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +1615 -0
  66. package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +3506 -0
  67. package/dist/graph-viewer/viewer/{final-output-kwY11u9X.js → final-output-BYT-g-9j.js} +1 -1
  68. package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +2696 -0
  69. package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +28 -0
  70. package/dist/graph-viewer/viewer/{highlights-Btsi5OXl.js → highlights-DWeSCtiR.js} +4 -4
  71. package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +319 -0
  72. package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +803 -0
  73. package/dist/graph-viewer/viewer/{markdown-CX_sVrXB.js → markdown-lADwhD7y.js} +2324 -2608
  74. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +476 -0
  75. package/dist/graph-viewer/viewer/{page-header-Brq611fd.js → page-header-QbUg8F8i.js} +12 -11
  76. package/dist/graph-viewer/{plain-words-CgvxtEOa.js → viewer/plain-words-BrMHl0On.js} +9 -4
  77. package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +346 -0
  78. package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +4254 -0
  79. package/dist/graph-viewer/viewer/{react-dom-t1L4_-il.js → react-dom-BEusmvQH.js} +1 -1
  80. package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +3523 -0
  81. package/dist/graph-viewer/viewer/record-W39D5MO-.js +1 -0
  82. package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +335 -0
  83. package/dist/graph-viewer/viewer/{segmented-control-BaJmvTNd.js → segmented-control-Di1mbQlP.js} +27 -26
  84. package/dist/graph-viewer/viewer/{shiki-Qnby7Sh6.js → shiki-BfNNlmfZ.js} +15 -15
  85. package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +273 -0
  86. package/dist/graph-viewer/viewer/{stream-tokenizer-CWtnjmRd.js → stream-tokenizer-B5wWaM3U.js} +12 -12
  87. package/dist/graph-viewer/viewer/{themes-1i1fzpRk.js → themes-DuRxHiga.js} +1 -1
  88. package/dist/graph-viewer/viewer/ui-Co03nZUX.js +889 -0
  89. package/dist/graph-viewer/viewer/utils-BuObIC0n.js +1815 -0
  90. package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +28351 -0
  91. package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +3298 -0
  92. package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +2468 -0
  93. package/dist/graph-viewer/{workspace-model-Ewf17pTW.js → workspace-model-BkPl_J8E.js} +1 -1
  94. package/dist/graph-viewer/workspace-viewer.js +7452 -7489
  95. package/dist/graph-viewer/workspace.js +1 -1
  96. package/dist/index.mjs +27 -22
  97. package/package.json +9 -8
  98. package/dist/graph-viewer/Analytics-DFWW8Phh.js +0 -938
  99. package/dist/graph-viewer/Checks-qgqV4xgV.js +0 -155
  100. package/dist/graph-viewer/Conversations-CGB45kpj.js +0 -545
  101. package/dist/graph-viewer/LiveRun-C21wUKAY.js +0 -210
  102. package/dist/graph-viewer/Overview-BjeLsA2I.js +0 -506
  103. package/dist/graph-viewer/RunPage-CkkcBEUe.js +0 -258
  104. package/dist/graph-viewer/Timeline-C2Xolk0t.js +0 -293
  105. package/dist/graph-viewer/Today-BVVDtSVN.js +0 -660
  106. package/dist/graph-viewer/Topology-DO5XX8e4.js +0 -545
  107. package/dist/graph-viewer/Traces-BhMxjNgw.js +0 -259
  108. package/dist/graph-viewer/part-events-BrLrg_EV.js +0 -276
  109. package/dist/graph-viewer/record-part-CZal_IMH.js +0 -1408
  110. package/dist/graph-viewer/ui-D8QZRsC3.js +0 -938
  111. package/dist/graph-viewer/viewer/Analytics-DD__nbLm.js +0 -939
  112. package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +0 -156
  113. package/dist/graph-viewer/viewer/Conversations-C1n0EBBd.js +0 -819
  114. package/dist/graph-viewer/viewer/Files-Cjr7NMU_.js +0 -448
  115. package/dist/graph-viewer/viewer/LiveRun-uPTkPSjo.js +0 -6772
  116. package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +0 -507
  117. package/dist/graph-viewer/viewer/RunPage-DZlBW7Va.js +0 -257
  118. package/dist/graph-viewer/viewer/Timeline-BnK6-yBR.js +0 -294
  119. package/dist/graph-viewer/viewer/Today-a_-oNigi.js +0 -660
  120. package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +0 -546
  121. package/dist/graph-viewer/viewer/Traces-C0IGk0L4.js +0 -259
  122. package/dist/graph-viewer/viewer/WorkflowGraph-DZ3xejKE-jRXKeSrg.js +0 -1559
  123. package/dist/graph-viewer/viewer/agent-record-Dw772ROs.css +0 -2
  124. package/dist/graph-viewer/viewer/agent-timeline-Cs9Qbpvo.js +0 -1798
  125. package/dist/graph-viewer/viewer/dist-C1-7EfoW.js +0 -488
  126. package/dist/graph-viewer/viewer/file-text-m7a3piQF.js +0 -47
  127. package/dist/graph-viewer/viewer/jsx-runtime-DQWyJOhv.js +0 -2136
  128. package/dist/graph-viewer/viewer/lazy-pages-BowaGsg-.js +0 -20
  129. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-fagiBQam.js +0 -723
  130. package/dist/graph-viewer/viewer/popover-CvOAjlnk.js +0 -5329
  131. package/dist/graph-viewer/viewer/react-CY3IbSNO.js +0 -4262
  132. package/dist/graph-viewer/viewer/record-part-D3_Anfpe.js +0 -1329
  133. package/dist/graph-viewer/viewer/terminal-83J_I4Ne.js +0 -52
  134. package/dist/graph-viewer/viewer/ui-C9b1rIUH.js +0 -938
  135. package/dist/graph-viewer/viewer/workspace-CekmOBs3.js +0 -25100
  136. package/dist/graph-viewer/viewer/x-DOc2URqZ.js +0 -56
package/README.md CHANGED
@@ -15,7 +15,7 @@ See [Limitations](#limitations) for open gaps.
15
15
 
16
16
  ## Install
17
17
 
18
- One-liner (requires Node on PATH matching the package's [`engines` metadata](./package.json)):
18
+ One-liner (installs the CLI and a private runtime selected from its [`engines` metadata](./package.json)):
19
19
 
20
20
  ```bash
21
21
  curl -fsSL https://sandbox.tangle.tools/install.sh | sh
@@ -52,7 +52,7 @@ pnpm --filter @tangle-network/sandbox-cli build
52
52
  node products/sandbox/cli/bin/tangle.js --help
53
53
  ```
54
54
 
55
- ## Local graphs
55
+ ## Graph factories
56
56
 
57
57
  Save a graph in a repository's `.tangle/graphs/<name>.yaml` or in
58
58
  `~/.tangle/graphs/<name>.yaml`. Repository graphs take precedence. The packaged
@@ -63,6 +63,9 @@ critic and a declared completion check.
63
63
  tangle graph new "Write and independently judge a haiku" --name haiku-review
64
64
  tangle graph run haiku-review --dry-run
65
65
  tangle graph run haiku-review
66
+ tangle --json graph run haiku-review --cloud
67
+ tangle --json graph inspect <run-id>
68
+ tangle graph run haiku-review --resume <run-id>
66
69
  ```
67
70
 
68
71
  Graphs use the selected harness's native subscription login. Set `seat` in
@@ -75,9 +78,34 @@ exact `tangle hub connect <provider>` command. Ctrl-C cancels login, connection
75
78
  polling and pending Hub requests.
76
79
 
77
80
  Progress goes to stderr; `--json` returns the result or the shared error contract
78
- on stdout. Run journals live under `~/.tangle/runs/<run-id>`, and graph history
81
+ on stdout. Local run journals live under `~/.tangle/runs/<run-id>`, and local graph history
79
82
  lives in `~/.tangle/graph-registry`. Unknown token and cost totals remain `null`.
80
83
 
84
+ `--cloud` saves the same source through Hub Workflows and returns its run ID
85
+ immediately. The Workflow API owns execution, retained evidence and recovery;
86
+ closing the CLI leaves the cloud run running. `inspect` reads that same run and
87
+ prints the shared workflow viewer URL outside JSON mode.
88
+
89
+ `--resume` restores saved inputs and rejects changed source, parameters, seat
90
+ settings or placement. A completed winner returns its retained result without
91
+ new native effects. A healthy cloud run attaches by reading its current state;
92
+ only the server decides whether interrupted work can recover. Failed or
93
+ cancelled terminal runs refuse continuation.
94
+
95
+ For a cited analysis of retained graph evidence, install the maintained Braid companion
96
+ with `npm install --global @tangle-network/braid`, then use an existing canonical
97
+ AgentProfile reference:
98
+
99
+ ```bash
100
+ tangle graph analyze <run-id> --profile ./profiles/reviewer.json --dry-run
101
+ tangle graph analyze <run-id> --profile ./profiles/reviewer.json
102
+ ```
103
+
104
+ Here `--profile` selects the analysis agent, distinct from a Tangle account
105
+ profile. Analysis uses the CLI-owned subscription-only Bridge. Braid owns its
106
+ saved analysis and encrypted state; the result includes its state path. Missing
107
+ native capture or usage remains explicitly unavailable.
108
+
81
109
  ## Supervisor accounting
82
110
 
83
111
  `tangle supervise` reports measured tokens and cost for successful and failed runs.
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tangle-cli
3
- description: Use Tangle Sandbox CLI for lifecycle, prompts, files, fleets, Hub tools, and integrations.
3
+ description: Use Tangle Sandbox CLI for graph factories, sandbox lifecycle, prompts, files, fleets, Hub tools, and integrations.
4
4
  ---
5
5
 
6
6
  # Tangle CLI
@@ -61,6 +61,34 @@ tangle auth profiles use work
61
61
 
62
62
  For hub env auth, set **exactly one** of `TANGLE_API_KEY` or `TANGLE_HUB_CAPABILITY_TOKEN`.
63
63
 
64
+ ## Graph factories
65
+
66
+ Use the existing `graph` commands to build and run AgentGraphs. Keep one source
67
+ file for local and cloud execution; `graph --help` owns command usage.
68
+
69
+ ```bash
70
+ tangle graph new "Implement and independently review the change" --name reviewed-change
71
+ tangle graph run reviewed-change --dry-run
72
+ tangle graph run reviewed-change
73
+ tangle --json graph run reviewed-change --cloud
74
+ tangle --json graph inspect <run-id>
75
+ tangle graph run reviewed-change --resume <run-id>
76
+ ```
77
+
78
+ Cloud dispatch returns immediately and the Workflow API owns the same run after
79
+ CLI disconnect. Resume preserves recorded source and execution settings. A
80
+ completed winner replays retained output; running cloud work attaches by read,
81
+ while the server decides recovery eligibility. Failed or cancelled terminal
82
+ work refuses continuation. Read retained evidence before starting fresh work.
83
+
84
+ `graph analyze <run-id> --profile <name|path>` sends the retained source to the
85
+ maintained Braid companion. Install it through `npm install --global
86
+ @tangle-network/braid`. This `--profile` selects a canonical analysis AgentProfile,
87
+ not Tangle account credentials. Use `--dry-run` to inspect the bound analysis
88
+ configuration without dispatch. The CLI supplies its subscription-only Bridge;
89
+ Braid owns the saved analysis. Missing source, native capture or measured usage
90
+ stays unavailable.
91
+
64
92
  ## Sandbox Lifecycle
65
93
 
66
94
  ```bash
@@ -0,0 +1 @@
1
+ import{constants as e}from"node:fs";import{isAbsolute as t,join as n,relative as r}from"node:path";import{open as i,opendir as a,realpath as o}from"node:fs/promises";import{z as s}from"zod";import*as c from"@tangle-network/agent-runtime/kernel";import{CODEX_HOME_RULE as l,codexRefForFile as u,readSessionInput as d,storeGlob as f,withinPath as p}from"@tangle-network/harness-sessions";const m=s.object({harness:s.literal(`codex`),root:s.string().refine(t),basis:s.literal(`host-jail`),nativeSessionId:s.string().min(1),runId:s.string().min(1),requestDigest:s.string().regex(/^sha256:[a-f0-9]{64}$/)}),h=s.object({externalId:s.string(),internalId:s.string(),backend:s.literal(`codex`),cwd:s.string(),metadata:s.object({effective_native_store:m,agent_profile_binding:s.object({effectiveProfileDigest:s.string()})})});async function g(e,t){let i=[],s=l.sessionDirs.map(t=>n(e,t)),d=f(l.rollout),m=0;for(;s.length;){t.throwIfAborted();let l=s.shift();if(l===void 0)break;let f;try{f=await o(l)}catch(e){if(e.code===`ENOENT`)continue;throw e}if(!p(f,e))throw Error(`Native inventory escaped its attested store`);let h=await a(f);for await(let a of h){if(t.throwIfAborted(),++m>c.HARNESS_TRANSCRIPT_READ_LIMITS.maxFiles)throw Error(`Native inventory exceeds the capture bound`);let o=n(h.path,a.name);a.isDirectory()?s.push(o):a.isFile()&&d.test(a.name)&&i.push({path:r(e,o),nativeSessionId:u(o).nativeSessionId})}}return i}function _(t){return async r=>{if(r.harness!==`codex`)return{status:`unavailable`,reason:`unknown-harness`,skipped:[{path:r.harness,reason:`Native transcript capture is not configured for this harness`}]};let a=await fetch(`${t.bridgeUrl}/v1/sessions?session_id=${encodeURIComponent(r.sessionId)}&backend=${r.harness}`,{headers:{authorization:`Bearer ${t.bridgeBearer}`},signal:r.signal});if(!a.ok)throw Error(`Bridge session lookup failed (HTTP ${a.status})`);let l=s.object({data:s.tuple([h])}).parse(await a.json()).data[0],u=l.metadata.effective_native_store,f=await o(u.root);if(l.externalId!==r.sessionId||l.internalId!==u.nativeSessionId||l.cwd!==t.cwd||r.cwd!==t.cwd||l.metadata.agent_profile_binding.effectiveProfileDigest!==r.profileDigest||f!==u.root||!p(f,n(t.cwd,`.agent-home`))||!r.runs.some(e=>e.runId===u.runId&&e.requestDigest===u.requestDigest))throw Error(`Bridge native binding does not match this execution`);return c.captureBoundHarnessTranscript({harness:r.harness,binding:{kind:`bridge`,sessionId:r.sessionId,nativeSessionId:u.nativeSessionId,profileDigest:r.profileDigest,runs:r.runs,...r.node===void 0?{}:{node:r.node}},nativeSessionId:u.nativeSessionId,files:await g(f,r.signal),signal:r.signal,parse:(e,t)=>d(r.harness,{text:e},{nativeSessionId:t.nativeSessionId,label:t.path},{corruption:`strict`}),read:async(t,r)=>{let a=await o(n(f,t.path));if(!p(a,f))throw Error(`Native session escaped its attested store`);let s=await i(a,e.O_RDONLY|e.O_NOFOLLOW);try{let e=await s.stat();if(!e.isFile()||e.size>c.HARNESS_TRANSCRIPT_READ_LIMITS.maxFileBytes)throw Error(`Native session is not a bounded regular file`);r?.throwIfAborted();let t=await s.readFile();return r?.throwIfAborted(),t}finally{await s.close()}}})}}const v=async(e,t)=>{if(e.harness!==`codex`||e.binding?.kind!==`bridge`)throw Error(`Native transcript reader is not configured for this capture`);return(await c.readBoundHarnessSessions({nativeSessionId:e.binding.nativeSessionId,files:e.files.map(e=>({path:e.path,nativeSessionId:u(e.path).nativeSessionId,byteLength:e.bytes})),read:async t=>{let n=e.files.find(e=>e.path===t.path);if(!n)throw Error(`Retained native file is absent`);return Buffer.from(n.content,`utf8`)},parse:(e,t)=>d(`codex`,{text:e},{nativeSessionId:t.nativeSessionId,label:t.path},{corruption:`strict`}),signal:t})).sessions};export{_ as graphNativeCapture,v as readGraphSessions};