@tangle-network/sandbox-cli 0.23.36 → 0.23.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-B0jBXI7i.mjs → account-Bvp7ybXe.mjs} +1 -1
- package/dist/{clone-TrjN3dSh.mjs → clone-CGZYYIyg.mjs} +1 -1
- package/dist/{device-D7ugbMa7.mjs → device-BHXfYbhx.mjs} +1 -1
- package/dist/{graph-DM6m3tGE.mjs → graph-Dj9Ph1eP.mjs} +3 -3
- package/dist/{graph-learning-iP9CAbAp.mjs → graph-learning-SdGriyFG.mjs} +1 -1
- package/dist/{graph-operating-evidence-vjpyxE18.mjs → graph-operating-evidence-BRvZR9rj.mjs} +1 -1
- package/dist/{graph-profile-learning-D10xKfoi.mjs → graph-profile-learning-D_Osrg7I.mjs} +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{output-OajdaYuM.mjs → output-COlRi7gh.mjs} +1 -1
- package/dist/{run-DoN6esPU.mjs → run-Dqle1Aqw.mjs} +1 -1
- package/dist/{submit-D-p8N1-u.mjs → submit-BdeTE48V.mjs} +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"chalk";import t from"ora";let n=!1;function r(e){n=e}function i(...e){n?console.error(...e):console.log(...e)}function a(t){return t==null?e.dim(`-`):typeof t==`boolean`?t?e.green(`yes`):e.red(`no`):t instanceof Date?s(t):typeof t==`string`&&o(t)?s(new Date(t)):String(t)}function o(e){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e)}function s(e){let t=Date.now()-e.getTime();if(t<6e4)return`just now`;if(t<36e5)return`${Math.floor(t/6e4)} min ago`;if(t<864e5){let e=Math.floor(t/36e5);return`${e} hour${e>1?`s`:``} ago`}let n=Math.floor(t/864e5);return`${n} day${n>1?`s`:``} ago`}function c(t){switch(t){case`running`:return e.green(t);case`pending`:case`provisioning`:return e.yellow(t);case`stopped`:return e.gray(t);case`failed`:case`deleted`:return e.red(t);default:return t}}function l(e,t){let n=t.map(t=>{let n=t.header.length,r=Math.max(...e.map(e=>a(e[t.key]).length));return t.width??Math.max(n,r)+2}),r=e.map(e=>t.map(t=>t.key===`status`?c(String(e[t.key])):a(e[t.key])));x(t.map(e=>e.header),r,n)}function u(e){console.log(JSON.stringify(e,null,2))}function d(t){i(e.green(`✓`),t)}function f(t){console.error(e.red(`✗`),t)}function p(t){i(e.yellow(`!`),t)}function m(t){i(e.blue(`→`),t)}const h=new Set;function g(e){let r=t({text:e,color:`cyan`,isSilent:n});return h.add(r),r}function _(){for(let e of h)e.isSpinning&&e.stop();h.clear()}function v(t,n=0){let r=` `.repeat(n);for(let[n,i]of Object.entries(t))i!=null&&console.log(`${r}${e.dim(`${n}:`)} ${a(i)}`)}function y(e){let t=`${e.cpuCores} vCPU / ${e.memoryMB} MB / ${e.diskGB} GB`;return e.pool?`${t} (pool: ${e.pool})`:t}function b(t){if(console.log(),console.log(e.bold(`Sandbox Details`)),console.log(e.dim(`─`.repeat(40))),v({ID:t.id,Name:t.name,Status:c(t.status),Resources:t.resources?y(t.resources):void 0,Created:t.createdAt,Expires:t.expiresAt}),t.connection){if(console.log(),console.log(e.bold(`Connection`)),console.log(e.dim(`─`.repeat(40))),t.connection.ssh){let{ssh:e}=t.connection,n=process.platform===`win32`?`NUL`:`/dev/null`,r=`ssh -o ProxyCommand="${e.proxyCommand}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=${n} -o GlobalKnownHostsFile=${n} -o LogLevel=ERROR -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -o TCPKeepAlive=yes ${e.username}@localhost -p ${e.port}`;v({SSH:process.platform===`win32`?`$env:TANGLE_SSH_PROXY_AUTH_TOKEN='<token>'; ${r}`:`TANGLE_SSH_PROXY_AUTH_TOKEN='<token>' ${r}`})}t.connection.webTerminalUrl&&v({"Web Terminal":t.connection.webTerminalUrl}),t.connection.runtimeUrl&&v({"API URL":t.connection.runtimeUrl})}console.log()}function x(t,n,r){if(n.length===0){console.log(e.dim(`No items found.`));return}let i=r??t.map((e,t)=>{let r=Math.max(...n.map(e=>String(e[t]??``).length));return Math.max(e.length,r)+2});console.log(t.map((t,n)=>e.bold(t.padEnd(i[n]))).join(``));for(let e of n)console.log(e.map((e,t)=>String(e??``).padEnd(i[t])).join(``))}export{u as a,l as c,_ as d,d as f,x as i,r as l,y as n,v as o,p,m as r,b as s,f as t,g as u};
|
|
1
|
+
import e from"chalk";import t from"ora";let n=!1;function r(e){n=e}function i(...e){n?console.error(...e):console.log(...e)}function a(t){return t==null?e.dim(`-`):typeof t==`boolean`?t?e.green(`yes`):e.red(`no`):t instanceof Date?s(t):typeof t==`string`&&o(t)?s(new Date(t)):String(t)}function o(e){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e)}function s(e){let t=Date.now()-e.getTime();if(t<6e4)return`just now`;if(t<36e5)return`${Math.floor(t/6e4)} min ago`;if(t<864e5){let e=Math.floor(t/36e5);return`${e} hour${e>1?`s`:``} ago`}let n=Math.floor(t/864e5);return`${n} day${n>1?`s`:``} ago`}function c(t){switch(t){case`running`:return e.green(t);case`pending`:case`provisioning`:return e.yellow(t);case`stopped`:return e.gray(t);case`failed`:case`deleted`:return e.red(t);default:return t}}function l(e,t){let n=t.map(t=>{let n=t.header.length,r=Math.max(...e.map(e=>a(e[t.key]).length));return t.width??Math.max(n,r)+2}),r=e.map(e=>t.map(t=>t.key===`status`?c(String(e[t.key])):a(e[t.key])));x(t.map(e=>e.header),r,n)}function u(e){console.log(JSON.stringify(e,null,2))}function d(t){i(e.green(`✓`),t)}function f(t){console.error(e.red(`✗`),t)}function p(t){i(e.yellow(`!`),t)}function m(t){i(e.blue(`→`),t)}const h=new Set;function g(e){let r=t({text:e,color:`cyan`,isSilent:n});return h.add(r),r}function _(){for(let e of h)e.isSpinning&&e.stop();h.clear()}function v(t,n=0){let r=` `.repeat(n);for(let[n,i]of Object.entries(t))i!=null&&console.log(`${r}${e.dim(`${n}:`)} ${a(i)}`)}function y(e){let t=`${e.cpuCores} vCPU / ${e.memoryMB} MB / ${e.diskGB} GB`;return e.pool?`${t} (pool: ${e.pool})`:t}function b(t){if(console.log(),console.log(e.bold(`Sandbox Details`)),console.log(e.dim(`─`.repeat(40))),v({ID:t.id,Name:t.name,Status:c(t.status),Runtime:t.runtime,Resources:t.resources?y(t.resources):void 0,Created:t.createdAt,Expires:t.expiresAt}),t.connection){if(console.log(),console.log(e.bold(`Connection`)),console.log(e.dim(`─`.repeat(40))),t.connection.ssh){let{ssh:e}=t.connection,n=process.platform===`win32`?`NUL`:`/dev/null`,r=`ssh -o ProxyCommand="${e.proxyCommand}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=${n} -o GlobalKnownHostsFile=${n} -o LogLevel=ERROR -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -o TCPKeepAlive=yes ${e.username}@localhost -p ${e.port}`;v({SSH:process.platform===`win32`?`$env:TANGLE_SSH_PROXY_AUTH_TOKEN='<token>'; ${r}`:`TANGLE_SSH_PROXY_AUTH_TOKEN='<token>' ${r}`})}t.connection.webTerminalUrl&&v({"Web Terminal":t.connection.webTerminalUrl}),t.connection.runtimeUrl&&v({"API URL":t.connection.runtimeUrl})}console.log()}function x(t,n,r){if(n.length===0){console.log(e.dim(`No items found.`));return}let i=r??t.map((e,t)=>{let r=Math.max(...n.map(e=>String(e[t]??``).length));return Math.max(e.length,r)+2});console.log(t.map((t,n)=>e.bold(t.padEnd(i[n]))).join(``));for(let e of n)console.log(e.map((e,t)=>String(e??``).padEnd(i[t])).join(``))}export{u as a,l as c,_ as d,d as f,x as i,r as l,y as n,v as o,p,m as r,b as s,f as t,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,f as t,o as n,r,u as i}from"./output-
|
|
1
|
+
import{a as e,f as t,o as n,r,u as i}from"./output-COlRi7gh.mjs";import{v as a}from"./index.mjs";import{t as o}from"./solve-signer-BAxIt1Qi.mjs";import{c as s,f as c,n as l,o as u,s as d,t as f}from"./workspace-BNZ3MDaM.mjs";import{n as p,t as m}from"./solve-checker-20YvRxEl.mjs";import*as h from"node:path";import{randomBytes as g,randomUUID as _}from"node:crypto";import{toHex as v}from"viem";async function y(y,b){try{let{root:a,manifest:x}=await d(y,b.directory),S=await u(a),C=x.provenance?await s(a,x,S,{allowMissing:!0}):void 0,w=o(),T=i(`Running ${x.title} checker…`);b.json||T.start();let E;try{E=await m(a,x.checker)}finally{T.stop()}let D=l(E,C,x.provenance,void 0,{allowMissingSource:!0,requirePullRequest:!1}),O=v(g(32)),k=p(E.candidateRef,O),A={version:1,competition:x.slug,candidateRef:E.candidateRef,evidence:D.evidence,evidenceJson:E.evidenceJson,evidenceRefs:D.evidenceRefs,salt:O,candidateId:k,...C?{source:C}:{},deviceAddress:w.account.address,clientSubmissionId:_(),createdAt:new Date().toISOString()};await c(h.join(a,`.tangle-solve-run.json`),A),b.json?e({localRun:A}):(t(`Checker output recorded locally for operator evaluation`),n({Competition:x.slug,Candidate:E.candidateRef,"Device address":w.account.address,"Evidence refs":D.evidenceRefs.length}),r("Commit any changes, then run `tangle solve submit` from this directory."),x.provenance&&!C&&r(`Add your GitHub fork as 'origin' before submitting. The task repository is available as '${f}'.`))}catch(e){a(e)}}export{y as runCompetition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,f as t,o as n,u as r}from"./output-
|
|
1
|
+
import{a as e,f as t,o as n,u as r}from"./output-COlRi7gh.mjs";import{v as i}from"./index.mjs";import{n as a}from"./solve-signer-BAxIt1Qi.mjs";import{a as o,c as s,d as c,f as l,h as u,l as d,m as f,n as p,o as m,s as h,u as g}from"./workspace-BNZ3MDaM.mjs";import{a as _,i as v,t as y}from"./api-BGYiAuZk.mjs";import{n as b,r as x,t as S}from"./solve-checker-20YvRxEl.mjs";import*as C from"node:path";const w=/^0x[0-9a-f]{64}$/i;async function T(e){let t=await y({deviceAddress:e.deviceAddress,apiUrl:e.apiUrl,profile:e.profile}),n=await e.signer.signMessage({message:t.message});return{walletChallengeId:t.challengeId,walletSignature:n}}async function E(y,E){try{let{root:i,manifest:D}=await h(y,E.directory);v({profile:E.profile});let O=await m(i),k=await o(i);if(k.competition!==D.slug)throw Error(`.tangle-solve-run.json does not match this competition`);if(!w.test(k.salt)||!w.test(k.candidateId))throw Error("This run predates durable candidate identity. Run `tangle solve run` again");let A=D.provenance?await s(i,D,O):void 0;if(D.provenance&&k.source&&!d(k.source,A))throw Error("The saved run points to a different repository or revision. Keep your fork as 'origin' and run `tangle solve run` again before submitting");let j=a();if(!j)throw Error("No Solve device signer found. Run `tangle solve run` first");if(j.account.address.toLowerCase()!==k.deviceAddress.toLowerCase())throw Error("The local Solve device account changed after `tangle solve run`; run the checker again");let M=r(`Checking the committed candidate…`);E.json||M.start();let N;try{N=await S(i,D.checker)}finally{M.stop()}if(N.candidateRef!==k.candidateRef||N.evidenceJson!==k.evidenceJson)throw Error("The committed checker output changed after `tangle solve run`; run the checker again");if(b(N.candidateRef,k.salt).toLowerCase()!==k.candidateId.toLowerCase())throw Error(`The saved candidate identity does not match the checker output; run the checker again`);let P=u(E.prUrl);if(!D.provenance&&P)throw Error(`This competition does not accept GitHub pull request provenance`);if(P){if(!A)throw Error(`A provenance policy is required for a pull request`);await c({pullRequest:P,taskRepository:A.taskRepository,submissionRepository:A.submissionRepository,submissionRevision:O})}let F=p(N,A,D.provenance,P,{requirePullRequest:!0}),I={...k,...A?{source:A}:{},chainState:{status:`submitting`,transactions:{...k.chainState?.transactions??{}}}},L=C.join(i,`.tangle-solve-run.json`);await l(L,I);let R=r(`Submitting candidate to Tempo…`);E.json||R.start();let z;try{z=await x(f(D),j.account,{artifactRef:N.candidateRef,salt:k.salt,evidenceJson:N.evidenceJson,evidenceRefs:F.evidenceRefs},{resumeTransactions:I.chainState?.transactions,onTransaction:async(e,t)=>{I={...I,chainState:{status:`submitting`,transactions:{...I.chainState?.transactions??{},[e]:t}}},await l(L,I)}})}finally{R.stop()}I={...I,chainReceipt:z,chainState:{status:`accepted`,transactions:{...I.chainState?.transactions??{},...g(z)}}},await l(L,I);let B=await T({deviceAddress:z.address,signer:j.account,apiUrl:E.apiUrl,profile:E.profile}),V=await _({path:`/v1/submissions`,method:`POST`,apiUrl:E.apiUrl,profile:E.profile,body:{competition:D.slug,candidateRef:N.candidateRef,candidateId:z.candidateId,evidenceJson:N.evidenceJson,evidenceRefs:F.evidenceRefs,deviceAddress:z.address,reportTxHash:z.report,evaluationTxHash:z.evaluation,transactions:g(z),...D.provenance&&A?{source:{...A,...P?{pullRequest:P}:{}}}:{},clientSubmissionId:k.clientSubmissionId,...B,...E.model?{model:E.model}:{},...E.note?{note:E.note}:{}}});E.json?e({...V,transactions:g(z),candidateId:z.candidateId}):(t(`Submission accepted on Tempo`),n({Competition:D.slug,Candidate:z.candidateId,"Device address":z.address,"Report transaction":z.report,"Evaluation transaction":z.evaluation,"Submission ID":typeof V.id==`string`?V.id:V.submission?.id}))}catch(e){i(e)}}export{E as submitCompetition};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-cli",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.38",
|
|
4
4
|
"description": "CLI for Tangle Sandbox operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@tangle-network/agent-core": "^1.0.3",
|
|
23
|
-
"@tangle-network/agent-eval": "1.0.
|
|
23
|
+
"@tangle-network/agent-eval": "1.0.40",
|
|
24
24
|
"@tangle-network/agent-interface": "^5.10.27",
|
|
25
25
|
"@tangle-network/agent-provider-cli-bridge": "2.0.16",
|
|
26
26
|
"@tangle-network/agent-runtime": "^10.0.6",
|
|
27
27
|
"@tangle-network/harness-sessions": "^1.0.13",
|
|
28
28
|
"@tangle-network/hub-sdk": "1.0.31",
|
|
29
|
-
"@tangle-network/sandbox": "^1.0.
|
|
29
|
+
"@tangle-network/sandbox": "^1.0.449",
|
|
30
30
|
"@tangle-network/sdk-cli-runner": "^0.3.12",
|
|
31
31
|
"chalk": "^5.6.2",
|
|
32
32
|
"cli-bridge": "https://codeload.github.com/drewstone/cli-bridge/tar.gz/b4a56761dcd4db0cf080792a3ddd967b797a4f90",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"tsx": "^4.23.15",
|
|
60
60
|
"typescript": "^6.0.3",
|
|
61
61
|
"vitest": "^4.1.12",
|
|
62
|
-
"@tangle-network/sdk-session-persistence": "0.7.0",
|
|
63
|
-
"@tangle-network/runtime-contracts": "0.20.0",
|
|
64
62
|
"@repo/shared": "0.0.0",
|
|
63
|
+
"@tangle-network/runtime-contracts": "0.20.0",
|
|
64
|
+
"@tangle-network/sdk-session-persistence": "0.7.0",
|
|
65
65
|
"@repo/knowledge-host": "0.0.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"author": "Tangle Network",
|
|
87
87
|
"license": "MIT",
|
|
88
88
|
"tangleRelease": {
|
|
89
|
-
"sourceSha": "
|
|
90
|
-
"mergedAt": "2026-11-
|
|
89
|
+
"sourceSha": "024d9ff4d93e10d38933fa20f04c03b3f9531a4f",
|
|
90
|
+
"mergedAt": "2026-11-17T17:38:09-08:00"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "tsdown",
|