@north-light/cli 0.3.665 → 0.3.667
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/api/client.d.ts +5 -0
- package/dist/api/client.js +3 -3
- package/dist/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/environments.d.ts +25 -0
- package/dist/api/dto/environments.js +0 -0
- package/dist/api/dto/nodes.d.ts +2 -0
- package/dist/api/dto/profiles.d.ts +15 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -1
- package/dist/api/routes.d.ts +1 -0
- package/dist/api/routes.js +1 -1
- package/dist/builtin-memory/02-turn-lifecycle/00-ending-a-turn.md +3 -1
- package/dist/builtin-memory/04-base-worker-exploring.md +2 -2
- package/dist/builtin-memory/crouter-concepts/scopes-and-trust.md +1 -1
- package/dist/builtin-memory/crouter-sdk/release-notes.md +6 -0
- package/dist/builtin-memory/northlight-apps/guides/files-and-documents.md +4 -8
- package/dist/clients/attach/chrome/canvas-panels.d.ts +9 -1
- package/dist/clients/attach/chrome/canvas-panels.js +1 -1
- package/dist/clients/attach/chrome/roster.js +6 -6
- package/dist/clients/attach/viewer.js +499 -499
- package/dist/commands/node.js +1 -1
- package/dist/commands/profile/environment.d.ts +2 -0
- package/dist/commands/profile/environment.js +2 -0
- package/dist/commands/profile/new.js +1 -1
- package/dist/commands/profile.js +1 -1
- package/dist/core/canvas/canvas.js +18 -18
- package/dist/core/environment-recipe.d.ts +20 -10
- package/dist/core/environment-recipe.js +1 -1
- package/dist/core/environment-repos.d.ts +7 -0
- package/dist/core/environment-repos.js +1 -0
- package/dist/core/environments.d.ts +4 -1
- package/dist/core/environments.js +1 -1
- package/dist/core/profiles/manifest.d.ts +7 -1
- package/dist/core/profiles/manifest.js +1 -1
- package/dist/core/providers/files.js +1 -1
- package/dist/core/runs/operations.js +7 -7
- package/dist/core/runtime/runner/blaxel/image-build.d.ts +6 -2
- package/dist/core/runtime/runner/blaxel/image-build.js +6 -5
- package/dist/core/secrets/blaxel-launch.js +3 -3
- package/dist/core/storage/caller-file.d.ts +12 -0
- package/dist/core/storage/caller-file.js +1 -0
- package/dist/core/storage/client.d.ts +0 -1
- package/dist/core/storage/client.js +2 -2
- package/dist/core/storage/shares.d.ts +0 -12
- package/dist/core/storage/shares.js +1 -1
- package/dist/daemon/api/app-listener.js +9 -9
- package/dist/daemon/api/environment-of.d.ts +2 -0
- package/dist/daemon/api/environment-of.js +3 -3
- package/dist/daemon/api/handlers/app-profiles.d.ts +1 -0
- package/dist/daemon/api/handlers/app-profiles.js +1 -1
- package/dist/daemon/api/handlers/attach.js +1 -1
- package/dist/daemon/api/handlers/environments.d.ts +2 -0
- package/dist/daemon/api/handlers/environments.js +1 -0
- package/dist/daemon/api/handlers/profiles.js +1 -1
- package/dist/daemon/api/handlers/transfer.d.ts +0 -6
- package/dist/daemon/api/handlers/transfer.js +1 -1
- package/dist/daemon/api/map.js +2 -2
- package/dist/daemon/api/operations.d.ts +2 -2
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/server.js +1 -1
- package/dist/daemon/crtrd.js +11 -11
- package/dist/daemon/due-sources.d.ts +1 -1
- package/dist/daemon/due-sources.js +1 -1
- package/dist/daemon/due.js +6 -6
- package/dist/daemon/reconcilers/idle-sandbox.d.ts +18 -0
- package/dist/daemon/reconcilers/idle-sandbox.js +7 -0
- package/dist/daemon/reconcilers/recipe-image.js +4 -4
- package/docs/apps/guides/files-and-documents.md +2 -6
- package/docs/concepts/scopes-and-trust.md +1 -1
- package/docs/sdk/release-notes.md +6 -0
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +13 -13
- package/dist/core/storage/download.d.ts +0 -23
- package/dist/core/storage/download.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??"").replace(/\s+/g," ").trim();return
|
|
3
|
-
`)[0]}`),n.requestChromeRefresh()}))},"confirmKill");
|
|
4
|
-
`)[0]}`));return}if(e.kind==="bash"){
|
|
5
|
-
`)[0]}`));return}if(e.kind==="object-wait"){l(),n.openObject(e.objectId);return}const
|
|
6
|
-
`)[0]}`)),!0):
|
|
1
|
+
var U=Object.defineProperty;var r=(v,n)=>U(v,"name",{value:n,configurable:!0});import{execFile as $}from"node:child_process";import{Text as k,decodeKittyPrintable as X,matchesKey as N}from"@earendil-works/pi-tui";import{cliClient as g}from"../../../commands/api-client.js";import{focusNode as D}from"../../../core/runtime/focus-viewer.js";import{daemonErrorMessage as j}from"../../inbox/resolve.js";import{toBashJobStatus as x}from"./bash-jobs.js";import{fillBar as F,fillWidth as L,stripSgr as V,REVERSE as W}from"../../../core/canvas/nav-render.js";import{buildCanvasPanelLines as z}from"./canvas-panels.js";const G=15e3;function ce(v,n){const{editor:E,tui:K,pal:A,nodeId:m,remote:f,role:R,canvasSource:B}=v,I=v.containers.reports;let s=[],o,w=process.env.CRTR_ATTACH_ROSTER;w!==void 0&&delete process.env.CRTR_ATTACH_ROSTER;let u,h;const b=r(()=>{n.syncCursor(),I.clear();for(const e of s){const i=e.key===o;I.addChild(new k(i?F(V(e.line),L(),W):e.line,1,0))}K.requestRender()},"paint"),C=r(async()=>(await g().listBashJobs(m)).map(x),"listJobs"),M=r(async()=>{const e=f?[]:await g().listCrons(),i=e.filter(d=>d.created_by===m),c=f?[]:await C(),t=f?[]:(await g().listReviews({state:"open"})).reviews,a=t.filter(d=>d.origin_node_id===m),p=f?void 0:{crons:e,reviews:t,jobsOf:r(async d=>(await g().listBashJobs(d)).map(x),"jobsOf")};if(s=(await z(m,n.asks(),A,B,i,c,a,p)).items,w!==void 0){const d=w;w=void 0;const S=s.find(_=>_.kind==="node"&&_.nodeId===d);S!==void 0&&(o=S.key)}o!==void 0&&!s.some(d=>d.key===o)&&(o=void 0),u!==void 0&&!c.some(d=>d.jobId===u?.jobId)&&y(!0),b()},"refresh"),y=r(e=>{h!==void 0&&(clearTimeout(h),h=void 0),u!==void 0&&(u=void 0,e&&n.setNotice(""))},"disarmKill"),l=r(()=>{y(!0),o!==void 0&&(o=void 0,b())},"exit"),T=r(e=>X(e)??(e.length===1?e:void 0),"typed"),P=r((e,i=40)=>{const c=(e.split(`
|
|
2
|
+
`)[0]??"").replace(/\s+/g," ").trim();return c.length>i?`${c.slice(0,i-1)}\u2026`:c},"commandHead"),J=r(async()=>{if(R!=="controller"){n.setNotice("Read-only observer attach \u2014 cannot stop background jobs");return}const e=await C();if(e.length===0){n.setNotice("Background job already finished"),n.requestChromeRefresh();return}if(e.length>1){n.setNotice(`${e.length} background jobs \u2014 press \u21B5 to pick one in the Inspector`);return}const i=e[0];u={jobId:i.jobId,label:P(i.command)},n.setNotice(`Stop \u201C${u.label}\u201D? Press y to confirm.`,{sticky:!0}),h=setTimeout(()=>y(!0),G)},"armKill"),O=r(()=>{const e=u;e!==void 0&&(y(!1),n.setNotice(`Stopping \u201C${e.label}\u201D\u2026`),$("crtr",["node","bash","kill",e.jobId,"--node",m],i=>{n.setNotice(i===null?`Stopped \u201C${e.label}\u201D.`:`Could not stop the job: ${i.message.split(`
|
|
3
|
+
`)[0]}`),n.requestChromeRefresh()}))},"confirmKill");E.onCursorDownAtBottom=f?void 0:()=>{o!==void 0||s.length===0||(o=s[0].key,b())};const q=r(()=>{const e=s.find(t=>t.key===o);if(e===void 0||f)return;if(e.kind==="crons"){l(),n.openInspector("schedule");return}if(e.kind==="review"){if(R!=="controller"){n.setNotice("Read-only observer attach \u2014 cannot open the review companion");return}l();const t=process.env.TMUX_PANE;if(t===void 0||t===""){n.setNotice("Could not open the companion: no tmux pane");return}(async()=>{const a=g(),p=await a.getNode(e.companionNodeId);(await D(a,p,{pane:t})).focused||n.setNotice("Could not open the companion")})().catch(a=>n.setNotice(`Could not open the companion: ${j(a).split(`
|
|
4
|
+
`)[0]}`));return}if(e.kind==="bash"){C().then(t=>{if(t.length===0){n.setNotice("Background job already finished"),n.requestChromeRefresh();return}l(),n.openInspector("jobs")},t=>n.setNotice(`Could not list background jobs: ${j(t).split(`
|
|
5
|
+
`)[0]}`));return}if(e.kind==="object-wait"){l(),n.openObject(e.objectId);return}const i=e.nodeId;if(i===m){l();return}if(R!=="controller"){n.setNotice("Read-only observer attach \u2014 cannot focus nodes");return}const c=process.env.TMUX_PANE;if(c===void 0||c===""){n.setNotice("cannot swap \u2014 no tmux pane");return}$("tmux",["run-shell","-b",`crtr surface node focus ${i} --pane ${c} --in-place >/dev/null 2>&1`],()=>{})},"openSelected");return{refresh:M,handleKey:r(e=>{if(f)return!1;const i=N(e,"down"),c=N(e,"up");if(o===void 0)return!1;const t=s.findIndex(p=>p.key===o),a=s[t];if(u!==void 0){if(T(e)==="y")return O(),!0;y(!0)}return a?.kind==="bash"&&T(e)==="x"?(J().catch(p=>n.setNotice(`Could not list background jobs: ${j(p).split(`
|
|
6
|
+
`)[0]}`)),!0):c?(t<=0?l():(o=s[t-1].key,b()),!0):i?(t>=0&&t<s.length-1&&(o=s[t+1].key,b()),!0):N(e,"enter")?(q(),!0):N(e,"escape")?(l(),!0):(l(),!1)},"handleKey"),active:r(()=>o!==void 0,"active"),exit:l}}r(ce,"createRoster");export{ce as createRoster};
|