c8ctl-plugin-nano 1.44.4 → 1.44.5
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/package.json +8 -8
- package/work-relay.mjs +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c8ctl-plugin-nano",
|
|
3
|
-
"version": "1.44.
|
|
3
|
+
"version": "1.44.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
|
|
6
6
|
"main": "c8ctl-plugin.js",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
},
|
|
58
58
|
"optionalDependencies": {
|
|
59
59
|
"node-pty": "^1.0.0",
|
|
60
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.44.
|
|
61
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.44.
|
|
62
|
-
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.44.
|
|
63
|
-
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.44.
|
|
64
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.44.
|
|
65
|
-
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.44.
|
|
66
|
-
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.44.
|
|
60
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.44.5",
|
|
61
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.44.5",
|
|
62
|
+
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.44.5",
|
|
63
|
+
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.44.5",
|
|
64
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.44.5",
|
|
65
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.44.5",
|
|
66
|
+
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.44.5"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/work-relay.mjs
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
// a duck-typed terminal handle, so it is unit-testable with a fake terminal and
|
|
24
24
|
// a fake channel.
|
|
25
25
|
|
|
26
|
+
import { transcript as agenticTranscript } from './agentic.mjs';
|
|
27
|
+
|
|
26
28
|
/** Prefix for a per-job relay stream name. One stream carries a job's terminal. */
|
|
27
29
|
export const RELAY_STREAM_PREFIX = 'job:';
|
|
28
30
|
|
|
@@ -40,6 +42,26 @@ export function relayStreamName(jobKey) {
|
|
|
40
42
|
return `${RELAY_STREAM_PREFIX}${String(jobKey)}`;
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
/**
|
|
46
|
+
* The initial produce frame emitted on a relay stream the instant a session is
|
|
47
|
+
* created: a canonical `@nanobpm/agentic` lifecycle "open" transcript event.
|
|
48
|
+
*
|
|
49
|
+
* It carries no agent output — its sole job is to OPEN the `job:<jobKey>` stream
|
|
50
|
+
* immediately so the app's correlation registry links this worker→jobKey on
|
|
51
|
+
* session creation, INDEPENDENT of whether the agent later emits any transcript
|
|
52
|
+
* bytes. Without it, a quiet ACP agent (one that emits no mappable
|
|
53
|
+
* `session/update`) never produces a `job:` frame, so the app never correlates
|
|
54
|
+
* the job — it renders "—" in the cockpit with no drill-in, even though the job
|
|
55
|
+
* ran and completed (regression since #128 coupled correlation to transcript
|
|
56
|
+
* bytes). Newline-framed to match the transcript-chunk framing the ACP relay
|
|
57
|
+
* path uses, and derived through `encodeTranscriptEvent` (never hand-rolled) so
|
|
58
|
+
* the wire marker stays single-sourced in `@nanobpm/agentic`.
|
|
59
|
+
*/
|
|
60
|
+
export const RELAY_OPEN_CHUNK = `${agenticTranscript.encodeTranscriptEvent({
|
|
61
|
+
kind: 'lifecycle',
|
|
62
|
+
phase: 'open',
|
|
63
|
+
})}\n`;
|
|
64
|
+
|
|
43
65
|
/**
|
|
44
66
|
* Resolve a role's terminal mode — whether the agent harness for this role gets
|
|
45
67
|
* a full PTY or a plain pipe. Honors the vocab's per-role opt-in: a role may set
|
|
@@ -189,5 +211,11 @@ export function createRelaySession({ channel, jobKey, logger } = {}) {
|
|
|
189
211
|
for (const detach of [...activeDetaches]) detach();
|
|
190
212
|
};
|
|
191
213
|
|
|
214
|
+
// Open the stream the instant the session exists, so the app correlates
|
|
215
|
+
// worker→jobKey immediately — independent of any later agent transcript bytes
|
|
216
|
+
// (a quiet ACP agent emits none). Routed through the internal relay(), which
|
|
217
|
+
// already swallows sink errors, so opening the stream never fails the job.
|
|
218
|
+
relay(RELAY_OPEN_CHUNK);
|
|
219
|
+
|
|
192
220
|
return { stream, relay, attachSteer, close };
|
|
193
221
|
}
|