@north-light/cli 0.3.708 → 0.3.710

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 (162) hide show
  1. package/dist/api/contract.d.ts +1 -1
  2. package/dist/api/contract.js +1 -1
  3. package/dist/api/dto/crons.d.ts +3 -0
  4. package/dist/clients/attach/chrome/inbox-strip.js +1 -1
  5. package/dist/clients/attach/chrome/roster.js +6 -6
  6. package/dist/clients/attach/chrome/status-line.d.ts +1 -1
  7. package/dist/clients/attach/chrome/status-line.js +1 -1
  8. package/dist/clients/attach/input/capabilities.js +1 -1
  9. package/dist/clients/attach/input/controller.d.ts +4 -0
  10. package/dist/clients/attach/input/controller.js +3 -3
  11. package/dist/clients/attach/overlays/graph.d.ts +3 -2
  12. package/dist/clients/attach/overlays/graph.js +1 -1
  13. package/dist/clients/attach/render/chat-view.d.ts +2 -0
  14. package/dist/clients/attach/render/chat-view.js +1 -1
  15. package/dist/clients/attach/render/doc-links.d.ts +1 -1
  16. package/dist/clients/attach/session/chrome-refresh.js +1 -1
  17. package/dist/clients/attach/session/connection.d.ts +10 -9
  18. package/dist/clients/attach/session/connection.js +1 -1
  19. package/dist/clients/attach/session/context.d.ts +1 -1
  20. package/dist/clients/attach/session/document-links.d.ts +1 -1
  21. package/dist/clients/attach/session/document-links.js +1 -1
  22. package/dist/clients/attach/session/identity.d.ts +2 -0
  23. package/dist/clients/attach/session/identity.js +1 -1
  24. package/dist/clients/attach/session/input-wiring.d.ts +2 -0
  25. package/dist/clients/attach/session/input-wiring.js +1 -1
  26. package/dist/clients/attach/session/keys.d.ts +2 -0
  27. package/dist/clients/attach/session/keys.js +1 -1
  28. package/dist/clients/attach/session/layout-record.d.ts +13 -0
  29. package/dist/clients/attach/session/layout-record.js +1 -0
  30. package/dist/clients/attach/session/pane-tag.d.ts +3 -1
  31. package/dist/clients/attach/session/pane-tag.js +1 -1
  32. package/dist/clients/attach/session/reconnect.js +1 -1
  33. package/dist/clients/attach/session/teardown.d.ts +4 -2
  34. package/dist/clients/attach/session/teardown.js +9 -7
  35. package/dist/clients/attach/slash/dispatch.js +2 -2
  36. package/dist/clients/attach/slash/recover.d.ts +10 -0
  37. package/dist/clients/attach/slash/recover.js +2 -0
  38. package/dist/clients/attach/viewer.d.ts +7 -5
  39. package/dist/clients/attach/viewer.js +563 -558
  40. package/dist/commands/node/wait.js +2 -6
  41. package/dist/core/broker-client/client.d.ts +6 -3
  42. package/dist/core/broker-client/client.js +1 -1
  43. package/dist/core/canvas/crons.d.ts +11 -1
  44. package/dist/core/canvas/crons.js +14 -14
  45. package/dist/core/canvas/executions.js +1 -1
  46. package/dist/core/canvas/managed-worktree-sweep-candidates.d.ts +2 -2
  47. package/dist/core/canvas/managed-worktree-sweep-candidates.js +5 -3
  48. package/dist/core/canvas/schema-pg/026-cron-deadline-body.sql +9 -0
  49. package/dist/core/canvas/schema-pg/027-cron-fires.sql +4 -0
  50. package/dist/core/canvas/schema-pg/028-machine-calls-worktree-sweep.sql +6 -0
  51. package/dist/core/canvas/schema-version.d.ts +1 -1
  52. package/dist/core/canvas/schema-version.js +1 -1
  53. package/dist/core/command.js +5 -5
  54. package/dist/core/feed/messages.d.ts +5 -0
  55. package/dist/core/feed/messages.js +5 -5
  56. package/dist/core/runtime/bearings.js +4 -4
  57. package/dist/core/runtime/boot-root.js +4 -4
  58. package/dist/core/runtime/broker-request.d.ts +2 -0
  59. package/dist/core/runtime/broker-request.js +1 -1
  60. package/dist/core/runtime/broker.js +1 -1
  61. package/dist/core/runtime/lifecycle.js +2 -2
  62. package/dist/core/runtime/model-swap.d.ts +2 -1
  63. package/dist/core/runtime/model-swap.js +1 -1
  64. package/dist/core/runtime/placement-tmux.d.ts +1 -1
  65. package/dist/core/runtime/placement-tmux.js +1 -1
  66. package/dist/core/runtime/revive.js +2 -2
  67. package/dist/core/runtime/runner/blaxel/client.d.ts +4 -0
  68. package/dist/core/runtime/runner/blaxel/client.js +1 -1
  69. package/dist/core/runtime/runner/blaxel/runner.d.ts +2 -3
  70. package/dist/core/runtime/runner/blaxel/runner.js +3 -3
  71. package/dist/core/runtime/runner/delete-sandboxes.d.ts +5 -0
  72. package/dist/core/runtime/runner/delete-sandboxes.js +6 -1
  73. package/dist/core/runtime/runner/machine/call.js +2 -2
  74. package/dist/core/runtime/runner/machine/ops.d.ts +11 -1
  75. package/dist/core/runtime/runner/machine/ops.js +1 -1
  76. package/dist/core/runtime/runner/types.d.ts +19 -3
  77. package/dist/core/runtime/tmux-driver.d.ts +7 -0
  78. package/dist/core/runtime/tmux-driver.js +6 -6
  79. package/dist/core/worktree-machine.d.ts +4 -1
  80. package/dist/core/worktree-machine.js +1 -1
  81. package/dist/core/worktree-sweep.d.ts +14 -3
  82. package/dist/core/worktree-sweep.js +4 -4
  83. package/dist/daemon/api/bridge.d.ts +5 -0
  84. package/dist/daemon/api/bridge.js +3 -3
  85. package/dist/daemon/api/handlers/crons.d.ts +2 -0
  86. package/dist/daemon/api/handlers/crons.js +1 -1
  87. package/dist/daemon/api/handlers/nodes.js +1 -1
  88. package/dist/daemon/api/operations.js +1 -1
  89. package/dist/daemon/cron/ended.d.ts +3 -0
  90. package/dist/daemon/cron/ended.js +2 -2
  91. package/dist/daemon/cron/lease-recovery.js +1 -1
  92. package/dist/daemon/cron/machine-fire.d.ts +9 -2
  93. package/dist/daemon/cron/machine-fire.js +1 -1
  94. package/dist/daemon/cron/passes.js +1 -1
  95. package/dist/daemon/cron-run.js +2 -2
  96. package/dist/daemon/fleet.d.ts +1 -1
  97. package/dist/daemon/fleet.js +4 -4
  98. package/dist/daemon/machine-link/client.js +1 -1
  99. package/dist/daemon/reconcilers/fault-retry-backstop.js +1 -1
  100. package/dist/daemon/reconcilers/idle-sandbox.d.ts +1 -1
  101. package/dist/daemon/reconcilers/idle-sandbox.js +2 -2
  102. package/dist/daemon/reconcilers/managed-worktree-sweep.js +1 -1
  103. package/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
  104. package/dist/daemon/runs/observer.d.ts +4 -0
  105. package/dist/daemon/runs/observer.js +1 -1
  106. package/dist/pi-extensions/canvas-inbox-watcher.js +1 -1
  107. package/package.json +3 -3
  108. package/packages/crouter-api/dist/api/contract.js +1 -1
  109. package/packages/crouter-api/dist/clients/attach/chrome/inbox-strip.js +5 -5
  110. package/packages/crouter-api/dist/clients/attach/chrome/roster.js +8 -8
  111. package/packages/crouter-api/dist/clients/attach/chrome/status-line.js +1 -1
  112. package/packages/crouter-api/dist/clients/attach/input/capabilities.js +3 -1
  113. package/packages/crouter-api/dist/clients/attach/input/controller.js +17 -0
  114. package/packages/crouter-api/dist/clients/attach/overlays/graph.js +4 -3
  115. package/packages/crouter-api/dist/clients/attach/render/chat-view.js +9 -0
  116. package/packages/crouter-api/dist/clients/attach/session/chrome-refresh.js +6 -3
  117. package/packages/crouter-api/dist/clients/attach/session/connection.js +53 -53
  118. package/packages/crouter-api/dist/clients/attach/session/document-links.js +1 -1
  119. package/packages/crouter-api/dist/clients/attach/session/identity.js +1 -0
  120. package/packages/crouter-api/dist/clients/attach/session/input-wiring.js +4 -3
  121. package/packages/crouter-api/dist/clients/attach/session/keys.js +11 -4
  122. package/packages/crouter-api/dist/clients/attach/session/layout-record.js +52 -0
  123. package/packages/crouter-api/dist/clients/attach/session/pane-tag.js +7 -1
  124. package/packages/crouter-api/dist/clients/attach/session/reconnect.js +3 -3
  125. package/packages/crouter-api/dist/clients/attach/session/teardown.js +9 -4
  126. package/packages/crouter-api/dist/clients/attach/slash/dispatch.js +12 -0
  127. package/packages/crouter-api/dist/clients/attach/slash/recover.js +111 -0
  128. package/packages/crouter-api/dist/clients/attach/viewer.js +86 -31
  129. package/packages/crouter-api/dist/commands/node/wait.js +2 -10
  130. package/packages/crouter-api/dist/core/broker-client/client.js +20 -10
  131. package/packages/crouter-api/dist/core/canvas/crons.js +26 -10
  132. package/packages/crouter-api/dist/core/canvas/executions.js +7 -2
  133. package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
  134. package/packages/crouter-api/dist/core/command.js +3 -0
  135. package/packages/crouter-api/dist/core/feed/messages.js +15 -0
  136. package/packages/crouter-api/dist/core/runtime/bearings.js +2 -2
  137. package/packages/crouter-api/dist/core/runtime/broker-ownership.js +6 -0
  138. package/packages/crouter-api/dist/core/runtime/broker-request.js +1 -1
  139. package/packages/crouter-api/dist/core/runtime/lifecycle.js +3 -0
  140. package/packages/crouter-api/dist/core/runtime/model-swap.js +2 -1
  141. package/packages/crouter-api/dist/core/runtime/placement-tmux.js +1 -1
  142. package/packages/crouter-api/dist/core/runtime/revive.js +5 -25
  143. package/packages/crouter-api/dist/core/runtime/runner/blaxel/client.js +15 -8
  144. package/packages/crouter-api/dist/core/runtime/runner/blaxel/runner.js +60 -19
  145. package/packages/crouter-api/dist/core/runtime/runner/delete-sandboxes.js +18 -2
  146. package/packages/crouter-api/dist/core/runtime/runner/machine/call.js +1 -1
  147. package/packages/crouter-api/dist/core/runtime/runner/machine/executor.js +235 -0
  148. package/packages/crouter-api/dist/core/runtime/runner/machine/ops.js +1 -1
  149. package/packages/crouter-api/dist/core/runtime/tmux-driver.js +11 -0
  150. package/packages/crouter-api/dist/core/worktree-machine.js +20 -0
  151. package/packages/crouter-api/dist/core/worktree-sweep.js +439 -0
  152. package/packages/crouter-api/dist/daemon/api/operations.js +2 -2
  153. package/packages/crouter-api/dist/daemon/cron/ended.js +22 -11
  154. package/packages/crouter-api/dist/daemon/cron/machine-fire.js +69 -6
  155. package/packages/crouter-api/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
  156. package/packages/crouter-api/dist/daemon/runs/observer.js +1 -1
  157. package/packages/crouter-api/package.json +1 -1
  158. package/packages/crouter-identity/package.json +1 -1
  159. package/packages/crouter-plugin/package.json +3 -3
  160. package/runtime.lock.json +14 -14
  161. package/dist/core/runtime/starting-screen.d.ts +0 -12
  162. package/dist/core/runtime/starting-screen.js +0 -9
@@ -150,8 +150,8 @@ export async function recoverLaunching(nodeId, now) {
150
150
  await publishNotice(nodeId, 'notice.crash', wake, { reason: 'child-crashed', child: nodeId });
151
151
  }
152
152
  }
153
- // The failed attempt's sandbox is of no further use (a retry creates its own), so it goes last, once the verdict is recorded.
154
- await runner.deleteExecution?.(execution);
153
+ // The failed launch's sandbox is not reused: the next start creates the node's sandbox afresh. It goes last, once the verdict is recorded.
154
+ await runner.delete(execution.nodeId);
155
155
  return true;
156
156
  }
157
157
  // gone: the next wake is attempt + 1, and the lane does not count it as a respawn failure.
@@ -330,7 +330,7 @@ class RunObserver {
330
330
  }
331
331
  /** The transport to the node's live broker, from where its runner says viewers connect: this machine's `view.sock`, or
332
332
  * the `/view` WebSocket behind a sandbox's preview. */
333
- async function viewTransport(nodeId) {
333
+ export async function viewTransport(nodeId) {
334
334
  const execution = await liveExecutionForNode(nodeId);
335
335
  if (execution === null)
336
336
  return new SocketTransport(nodeId, { recordsViewerFaults: false });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.708",
3
+ "version": "0.3.710",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/identity",
3
- "version": "0.3.708",
3
+ "version": "0.3.710",
4
4
  "description": "Northlight access-token verification and scope rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/plugin",
3
- "version": "0.3.708",
3
+ "version": "0.3.710",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
28
28
  },
29
29
  "dependencies": {
30
- "@north-light/api": "0.3.708",
31
- "@north-light/identity": "0.3.708"
30
+ "@north-light/api": "0.3.710",
31
+ "@north-light/identity": "0.3.710"
32
32
  },
33
33
  "license": "UNLICENSED",
34
34
  "publishConfig": {
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.708",
3
+ "version": "0.3.710",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/cli",
9
- "version": "0.3.708",
9
+ "version": "0.3.710",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "workspaces": [
@@ -28,8 +28,8 @@
28
28
  "@milkdown/preset-gfm": "^7.22.3",
29
29
  "@milkdown/prose": "^7.22.3",
30
30
  "@milkdown/utils": "^7.22.3",
31
- "@north-light/identity": "0.3.708",
32
- "@north-light/plugin": "0.3.708",
31
+ "@north-light/identity": "0.3.710",
32
+ "@north-light/plugin": "0.3.710",
33
33
  "cron-parser": "^5.6.0",
34
34
  "esbuild": "0.28.2",
35
35
  "jose": "^6.2.12",
@@ -11902,17 +11902,17 @@
11902
11902
  },
11903
11903
  "packages/crouter-api": {
11904
11904
  "name": "@north-light/api",
11905
- "version": "0.3.708",
11905
+ "version": "0.3.710",
11906
11906
  "license": "UNLICENSED"
11907
11907
  },
11908
11908
  "packages/crouter-env-docker": {
11909
11909
  "name": "@north-light/env-docker",
11910
- "version": "0.3.708",
11910
+ "version": "0.3.710",
11911
11911
  "license": "UNLICENSED"
11912
11912
  },
11913
11913
  "packages/crouter-identity": {
11914
11914
  "name": "@north-light/identity",
11915
- "version": "0.3.708",
11915
+ "version": "0.3.710",
11916
11916
  "license": "UNLICENSED",
11917
11917
  "dependencies": {
11918
11918
  "jose": "^6.2.1"
@@ -11920,21 +11920,21 @@
11920
11920
  },
11921
11921
  "packages/crouter-plugin": {
11922
11922
  "name": "@north-light/plugin",
11923
- "version": "0.3.708",
11923
+ "version": "0.3.710",
11924
11924
  "license": "UNLICENSED",
11925
11925
  "dependencies": {
11926
- "@north-light/api": "0.3.708",
11927
- "@north-light/identity": "0.3.708"
11926
+ "@north-light/api": "0.3.710",
11927
+ "@north-light/identity": "0.3.710"
11928
11928
  }
11929
11929
  },
11930
11930
  "packages/crouter-sdk": {
11931
11931
  "name": "@north-light/sdk",
11932
- "version": "0.3.708",
11932
+ "version": "0.3.710",
11933
11933
  "license": "UNLICENSED",
11934
11934
  "dependencies": {
11935
- "@north-light/api": "0.3.708",
11936
- "@north-light/identity": "0.3.708",
11937
- "@north-light/plugin": "0.3.708",
11935
+ "@north-light/api": "0.3.710",
11936
+ "@north-light/identity": "0.3.710",
11937
+ "@north-light/plugin": "0.3.710",
11938
11938
  "jose": "^6.2.1"
11939
11939
  },
11940
11940
  "bin": {
@@ -1,12 +0,0 @@
1
- export interface StartingInfo {
2
- version?: string;
3
- profile?: string;
4
- cwd?: string;
5
- }
6
- export interface StartingScreen {
7
- /** Erase the screen and give the terminal back (cursor shown, raw mode off). */
8
- stop(): void;
9
- /** Record the created node so an interrupt can say how to reopen it. */
10
- setNode(nodeId: string): void;
11
- }
12
- export declare function showStartingScreen(info: StartingInfo): StartingScreen;
@@ -1,9 +0,0 @@
1
- var R=Object.defineProperty;var e=(s,t)=>R(s,"name",{value:t,configurable:!0});import{homedir as g}from"node:os";import{croutonBannerLines as A}from"./banner.js";const T="\x1B[2m",x="\x1B[0m",D=100,G="\x1B7",E="\x1B8",S="\x1B[J",L="\x1B[2K";function v(s){const t=process.stdout,h=Date.now();let p=!1,r;const c=g(),u=s.cwd===void 0?void 0:s.cwd===c?"~":s.cwd.startsWith(`${c}/`)?`~${s.cwd.slice(c.length)}`:s.cwd,i=A({...s,...u===void 0?{}:{cwd:u}}).join(`\r
2
- `),d=e(()=>`${T}starting ${((Date.now()-h)/1e3).toFixed(1)}s${x}`,"seconds"),b=e(()=>{t.write(`\r${L}${d()}`)},"tick"),l=e(()=>{t.write(`${E}${S}${i}\r
3
- \r
4
- ${d()}`)},"drawAll"),w=e(()=>r===void 0?"":`crtr: the agent ${r} is still running; reopen it with crtr -r ${r}
5
- `,"reopenNote"),$=process.stdin.isTTY===!0,f=e(n=>{n.includes(3)&&(a(),process.stderr.write(w()),process.exit(130))},"onData"),o=e(n=>{a(),process.stderr.write(w()),process.kill(process.pid,n)},"onSignal");$&&(process.stdin.setRawMode(!0),process.stdin.on("data",f),process.stdin.resume()),process.once("SIGTERM",o),process.once("SIGHUP",o),t.on("resize",l);const m=i.split(`\r
6
- `).reduce((n,M)=>n+Math.max(1,Math.ceil(M.replaceAll(/\u001b\[[0-9;]*m/g,"").length/Math.max(1,t.columns??80))),0)+2;t.write(`\x1B[?25l${`
7
- `.repeat(m)}\x1B[${m}A${G}${i}\r
8
- \r
9
- ${d()}`);const I=setInterval(b,D);function a(){p||(p=!0,clearInterval(I),t.off("resize",l),process.off("SIGTERM",o),process.off("SIGHUP",o),t.write(`${E}${S}\x1B[?25h`),$&&(process.stdin.off("data",f),process.stdin.pause(),process.stdin.setRawMode(!1)))}return e(a,"stop"),{stop:a,setNode:e(n=>{r=n},"setNode")}}e(v,"showStartingScreen");export{v as showStartingScreen};