@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.
@@ -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', name: 'child', entries: [{ kind: 'update', body: 'private inbox detail' }] },
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
- assert.match(expanded, /private inbox detail/, 'an expanded inbox card shows the actual delivered update');
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 detail/);
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
  ]),