@north-light/cli 0.3.646 → 0.3.648
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/clients/attach/session/teardown.d.ts +4 -0
- package/dist/clients/attach/session/teardown.js +3 -2
- package/dist/clients/attach/viewer.js +352 -351
- package/dist/core/canvas/pid.d.ts +7 -0
- package/dist/core/canvas/pid.js +5 -5
- package/dist/core/runtime/runner/machine/executor.d.ts +2 -2
- package/dist/core/runtime/runner/machine/executor.js +1 -1
- package/dist/daemon/api/router.js +1 -1
- package/dist/daemon/machine-link/client.d.ts +20 -0
- package/dist/daemon/machine-link/client.js +1 -1
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +13 -13
- package/scripts/install-runtime.mjs +3 -0
|
@@ -10,6 +10,10 @@ export interface TeardownHooks {
|
|
|
10
10
|
* precise reason (e.g. an oversized-frame overflow) instead of the generic
|
|
11
11
|
* message. Read at teardown time, not captured at wiring time. */
|
|
12
12
|
lastSocketError: () => string | undefined;
|
|
13
|
+
/** The exact `crtr surface attach to …` command that reopens this viewer
|
|
14
|
+
* (same node, same --observer / --canvas), printed under the broker-gone
|
|
15
|
+
* message so the user can reattach by hand. */
|
|
16
|
+
reattachCommand: string;
|
|
13
17
|
/** This viewer's tmux pane, as self-tagged at startup. Used only by the
|
|
14
18
|
* node-done path to close our own pane. */
|
|
15
19
|
tagPane: () => string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g=Object.defineProperty;var n=(o,t)=>g(o,"name",{value:t,configurable:!0});import{closePane as w,currentTmux as S,inTmux as T}from"../../../core/runtime/placement-tmux.js";import{FOCUS_REPORTING_OFF as I}from"./focus-events.js";function G(o,t){const{tui:f,socket:c,nodeId:i,remote:u}=o;let a=!1;const d=n(()=>{if(!a){a=!0;try{process.stdout.write(I),f.stop()}catch{}}},"restore");process.once("exit",d);let s=!1,l;const m=new Promise(e=>{l=e}),p=n(e=>{if(!s){if(s=!0,t.stopLocal(),e==="detach"&&c.send({type:"bye"}),c.close(),d(),e==="broker-gone"){const r=t.lastSocketError()??`broker gone \u2014 node ${i} is no longer running its engine.`;process.stderr.write(`
|
|
2
2
|
${r}
|
|
3
|
+
Reattach with: ${t.reattachCommand}
|
|
3
4
|
`)}if(e==="node-done"){process.stderr.write(`
|
|
4
5
|
\u2713 node ${i} finished \u2014 final report submitted.
|
|
5
|
-
`);const r=
|
|
6
|
+
`);const r=t.tagPane()??process.env.TMUX_PANE??S()?.pane;!u&&r!==void 0&&T()&&w(r)}l()}},"teardown");return{done:m,teardown:p,isTornDown:n(()=>s,"isTornDown"),installSignalHandlers:n(()=>{const e=n(()=>p("signal"),"onSignal");process.once("SIGTERM",e),process.once("SIGHUP",e),process.once("SIGINT",e)},"installSignalHandlers")}}n(G,"createTeardown");export{G as createTeardown};
|