@north-light/crouter 0.3.206 → 0.3.207
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/dto/messages.d.ts +4 -3
- package/dist/clients/attach/viewer.js +366 -366
- package/dist/core/canvas/paths.d.ts +2 -2
- package/dist/core/canvas/paths.js +2 -2
- package/dist/core/runtime/situational-context.d.ts +0 -2
- package/dist/core/runtime/situational-context.js +3 -2
- package/dist/core/runtime/situational-live.js +1 -1
- package/dist/core/runtime/spawn.d.ts +4 -4
- package/dist/daemon/messaging/node-message.d.ts +4 -1
- package/dist/pi-extensions/canvas-inbox-watcher.js +4 -2
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
|
@@ -59,8 +59,8 @@ export declare function reportsDir(nodeId: string): string;
|
|
|
59
59
|
export declare function messagesDir(nodeId: string): string;
|
|
60
60
|
export declare function nodeMetaPath(nodeId: string): string;
|
|
61
61
|
export declare function inboxPath(nodeId: string): string;
|
|
62
|
-
/** The node-owned ambient "current situation" sidecar —
|
|
63
|
-
*
|
|
62
|
+
/** The node-owned ambient "current situation" sidecar — ONE rendered runtime
|
|
63
|
+
* card, restated by the session-start bearings (see
|
|
64
64
|
* `runtime/situational-context.ts`), upserted in place rather than appended so
|
|
65
65
|
* only the newest applet/situation state is ever carried. Lives beside
|
|
66
66
|
* meta.json/inbox.jsonl (node-runtime state) rather than under context/ (the
|
|
@@ -137,8 +137,8 @@ export function nodeMetaPath(nodeId) {
|
|
|
137
137
|
export function inboxPath(nodeId) {
|
|
138
138
|
return join(nodeDir(nodeId), 'inbox.jsonl');
|
|
139
139
|
}
|
|
140
|
-
/** The node-owned ambient "current situation" sidecar —
|
|
141
|
-
*
|
|
140
|
+
/** The node-owned ambient "current situation" sidecar — ONE rendered runtime
|
|
141
|
+
* card, restated by the session-start bearings (see
|
|
142
142
|
* `runtime/situational-context.ts`), upserted in place rather than appended so
|
|
143
143
|
* only the newest applet/situation state is ever carried. Lives beside
|
|
144
144
|
* meta.json/inbox.jsonl (node-runtime state) rather than under context/ (the
|
|
@@ -12,8 +12,6 @@ export declare function formatSituationalProse(prose: string): string;
|
|
|
12
12
|
* No-op for blank text, so a caller can pass through an optional/empty value
|
|
13
13
|
* with no guard at the call site. */
|
|
14
14
|
export declare function appendSituationalContext(nodeId: string, text: string): void;
|
|
15
|
-
/** Read the current situational context, or null if none was ever set. */
|
|
16
|
-
export declare function readSituationalContext(nodeId: string): string | null;
|
|
17
15
|
/** The node's stored situational card, verbatim, or null when none is set.
|
|
18
16
|
* The ONE read of the sidecar. A sidecar written before the card cut holds
|
|
19
17
|
* bare prose; that single legacy branch lives here alone and self-clears on
|
|
@@ -46,8 +46,9 @@ export function appendSituationalContext(nodeId, text) {
|
|
|
46
46
|
mkdirSync(nodeDir(nodeId), { recursive: true });
|
|
47
47
|
writeFileSync(situationalContextPath(nodeId), body + '\n', 'utf8');
|
|
48
48
|
}
|
|
49
|
-
/** Read the
|
|
50
|
-
|
|
49
|
+
/** Read the stored text, or null if none was ever set. Module-private:
|
|
50
|
+
* `situationalContextEnvelope` is the one read, and it shape-checks. */
|
|
51
|
+
function readSituationalContext(nodeId) {
|
|
51
52
|
const p = situationalContextPath(nodeId);
|
|
52
53
|
if (!existsSync(p))
|
|
53
54
|
return null;
|
|
@@ -32,7 +32,7 @@ export async function setSituationalContextLive(nodeId, text) {
|
|
|
32
32
|
throw new Error(`setSituationalContextLive: unknown node ${nodeId}`);
|
|
33
33
|
const envelope = situationalContextEnvelope(nodeId);
|
|
34
34
|
if (envelope === null)
|
|
35
|
-
return; // blank text
|
|
35
|
+
return; // no sidecar at all — blank text on a node that never had one
|
|
36
36
|
await deliverCustomMessageLive(nodeId, {
|
|
37
37
|
customType: SITUATIONAL_CONTEXT_CUSTOM_TYPE,
|
|
38
38
|
content: envelope,
|
|
@@ -67,10 +67,10 @@ export interface SpawnChildOpts {
|
|
|
67
67
|
/** Preallocated node id, used when a managed worktree must be named before birth. */
|
|
68
68
|
nodeId?: string;
|
|
69
69
|
/** Hidden ambient "current situation" text — NOT the visible prompt/body.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
70
|
+
* Stored as a `situational` card BEFORE launch so canvas-context-intro's
|
|
71
|
+
* session_start bearings nest it from the node's very first turn. Passed
|
|
72
|
+
* through unchanged into a scheduled node-birth command. Omit for no
|
|
73
|
+
* ambient context. */
|
|
74
74
|
situationalContext?: string;
|
|
75
75
|
}
|
|
76
76
|
/** Resolve a `--fork-from` value to an ABSOLUTE `.jsonl` source path for the
|
|
@@ -5,7 +5,10 @@ export interface NodeMessageDelivery {
|
|
|
5
5
|
revived: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface RuntimeMessageCard {
|
|
8
|
-
kind
|
|
8
|
+
/** A bare core kind only. This renders with `formatCard`, which leaves the
|
|
9
|
+
* body raw — a namespaced kind's body is decoded on read (D12) and would be
|
|
10
|
+
* corrupted. Extend the union rather than widening to `string`. */
|
|
11
|
+
kind: 'review-comment' | 'review-queued' | 'review-approval';
|
|
9
12
|
facts: Record<string, string | number | boolean | undefined>;
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
@@ -705,8 +705,10 @@ class CanvasInboxWatcher {
|
|
|
705
705
|
});
|
|
706
706
|
}, stage);
|
|
707
707
|
}
|
|
708
|
-
/** The visible delivery and its own entry's one-shot cards
|
|
709
|
-
*
|
|
708
|
+
/** The visible delivery and its own entry's one-shot cards share ONE failure
|
|
709
|
+
* unit: a throw anywhere requeues the whole entry, so a retry may repeat a
|
|
710
|
+
* card already handed off (context is restatable; the human's body is not,
|
|
711
|
+
* and it is sent last). */
|
|
710
712
|
sendVisible(entries, cards, content, route, stage) {
|
|
711
713
|
return this.sendDelivery('visible', entries, () => {
|
|
712
714
|
if (route !== 'idle' && route !== 'steer' && route !== 'followUp') {
|
package/package.json
CHANGED
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/crouter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.207",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/crouter",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.207",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|