@north-light/crouter 0.3.213 → 0.3.214
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/inbox.d.ts +19 -0
- package/dist/clients/attach/__tests__/context-message.test.js +5 -4
- package/dist/clients/attach/viewer.js +307 -307
- package/dist/core/__tests__/canvas-inbox-watcher.test.js +1 -1
- package/dist/core/__tests__/dead-node-policy-table.test.js +13 -0
- package/dist/core/feed/inbox.js +1 -6
- package/dist/core/human/component-docs.js +3 -2
- package/dist/core/human/page-schema.d.ts +28 -0
- package/dist/core/human/page-schema.js +35 -2
- package/dist/core/human/scan.js +7 -1
- package/dist/core/human/types.d.ts +4 -0
- package/dist/core/runtime/broker/inbox.js +1 -5
- package/dist/core/substrate/on-read.js +16 -0
- package/dist/daemon/api/handlers/inbox.js +31 -41
- package/dist/daemon/fleet.d.ts +8 -4
- package/dist/daemon/fleet.js +36 -3
- package/dist/daemon/reconcilers/live-obligation.d.ts +9 -0
- package/dist/daemon/reconcilers/live-obligation.js +17 -0
- package/dist/shared/__tests__/generated-context-grammar.test.js +4 -6
- package/dist/shared/generated-context.d.ts +0 -4
- package/dist/shared/generated-context.js +6 -9
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
package/dist/api/dto/inbox.d.ts
CHANGED
|
@@ -17,6 +17,21 @@ export interface ReviewTicketSummaryDTO {
|
|
|
17
17
|
blocked_since: IsoTime;
|
|
18
18
|
source: TicketSourceDTO;
|
|
19
19
|
}
|
|
20
|
+
/** One question's recommended option, flat on the wire like every other summary field. */
|
|
21
|
+
export interface RecommendedOptionDTO {
|
|
22
|
+
slot_id: string;
|
|
23
|
+
option_id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* What one keypress on an inbox row publishes. `responses` is a complete final response
|
|
28
|
+
* map this daemon already accepts for the ticket, so a client publishes it untouched
|
|
29
|
+
* rather than assembling one from the summary.
|
|
30
|
+
*/
|
|
31
|
+
export interface PageFastActionDTO {
|
|
32
|
+
kind: 'answer' | 'acknowledge';
|
|
33
|
+
responses: PageResponsesDTO;
|
|
34
|
+
}
|
|
20
35
|
export interface PageTicketSummaryDTO {
|
|
21
36
|
ticket_id: InboxTicketIdDTO;
|
|
22
37
|
kind: 'page';
|
|
@@ -30,6 +45,10 @@ export interface PageTicketSummaryDTO {
|
|
|
30
45
|
source: TicketSourceDTO;
|
|
31
46
|
slot_kinds: string[];
|
|
32
47
|
awaits_response: boolean;
|
|
48
|
+
/** Omitted when no question recommends an option. */
|
|
49
|
+
recommended_options?: RecommendedOptionDTO[];
|
|
50
|
+
/** Present only on a pending ticket that a row can settle without opening it. */
|
|
51
|
+
fast_action?: PageFastActionDTO;
|
|
33
52
|
state: 'pending' | 'resolved' | 'canceled' | 'passive';
|
|
34
53
|
/** Present only on resolved history entries; the stored one-line answer digest. */
|
|
35
54
|
answer_digest?: string;
|
|
@@ -46,7 +46,7 @@ test('collapsed generated context never leaks its body; Ctrl+O restores it', asy
|
|
|
46
46
|
{
|
|
47
47
|
role: 'user',
|
|
48
48
|
content: formatInboxCard([
|
|
49
|
-
{ id: 'child-node-123',
|
|
49
|
+
{ id: 'child-node-123', entries: [{ kind: 'update', body: 'private inbox detail' }] },
|
|
50
50
|
]),
|
|
51
51
|
},
|
|
52
52
|
{ role: 'user', content: formatCard('review-approval', {}, 'The human reviewed and approved private-review.md.') },
|
|
@@ -61,11 +61,13 @@ test('collapsed generated context never leaks its body; Ctrl+O restores it', asy
|
|
|
61
61
|
assert.match(expanded, /loaded INDEX\.md content/);
|
|
62
62
|
assert.match(expanded, /resume from this note/);
|
|
63
63
|
assert.doesNotMatch(expanded, /private restart continuation|private context reminder/);
|
|
64
|
-
|
|
64
|
+
// The terminal may wrap mid-phrase (ANSI runs land between words), so match
|
|
65
|
+
// across the wrap instead of requiring the phrase on one line.
|
|
66
|
+
assert.match(expanded, /private inbox[\s\S]{0,200}detail/, 'an expanded inbox card shows the actual delivered update');
|
|
65
67
|
assert.match(expanded, /private-review\.md/, 'an expanded review card shows the approval');
|
|
66
68
|
assert.deepEqual(view.toggleToolsExpanded(), { kind: 'summaries', shown: true });
|
|
67
69
|
assert.equal(internals.toolOutputExpanded, false);
|
|
68
|
-
assert.doesNotMatch(container.render(80).join('\n'), /loaded INDEX\.md content|resume from this note|private restart continuation|private context reminder|private inbox
|
|
70
|
+
assert.doesNotMatch(container.render(80).join('\n'), /loaded INDEX\.md content|resume from this note|private restart continuation|private context reminder|private inbox/);
|
|
69
71
|
});
|
|
70
72
|
test('a human message that reads like runtime recovery is not folded as generated context', () => {
|
|
71
73
|
assert.equal(parseCard({ role: 'user', content: 'continue' }), null, 'a human one-word continue is not mistaken for runtime recovery');
|
|
@@ -87,7 +89,6 @@ test("a person's inbox answer renders as their own message, not a runtime card",
|
|
|
87
89
|
content: formatInboxCard([
|
|
88
90
|
{
|
|
89
91
|
id: 'human-ticket-node',
|
|
90
|
-
name: 'human interaction',
|
|
91
92
|
entries: [{ kind: 'final', disposition: 'human-answer', body: 'ship it on friday' }],
|
|
92
93
|
},
|
|
93
94
|
]),
|