yarramate 1.25.2 → 1.26.0

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.
Files changed (31) hide show
  1. package/README.md +6 -2
  2. package/dist/adapters/mcp-cli.d.ts +45 -1
  3. package/dist/adapters/mcp-cli.js +297 -50
  4. package/dist/adapters/visual/protocol-contract.d.ts +29 -2
  5. package/dist/adapters/visual/session-server.js +27 -6
  6. package/dist/adapters/visual/session-store.js +1 -0
  7. package/dist/adapters/visual/wire.d.ts +18 -0
  8. package/dist/adapters/visual/workspace-model.js +11 -1
  9. package/dist/visual-app/assets/{elk.bundled-ZYNFKdcv.js → elk.bundled-CYZFv-C6.js} +1 -1
  10. package/dist/visual-app/assets/{index-CMqEmjU2.js → index-CRYHv5jy.js} +6 -2
  11. package/dist/visual-app/assets/index-DdE5s692.css +1 -0
  12. package/dist/visual-app/index.html +2 -2
  13. package/dist/visual-app-lib/editor.js +7812 -7485
  14. package/dist/visual-app-lib/styles.css +1 -1
  15. package/dist/visual-app-lib/types/adapters/visual/protocol-contract.d.ts +29 -2
  16. package/dist/visual-app-lib/types/adapters/visual/wire.d.ts +18 -0
  17. package/dist/visual-app-lib/types/visual-app/App.d.ts +7 -1
  18. package/dist/visual-app-lib/types/visual-app/context-menu-model.d.ts +36 -0
  19. package/dist/visual-app-lib/types/visual-app/mount.d.ts +9 -1
  20. package/dist/visual-app-lib/types/visual-app/open-questions.d.ts +18 -2
  21. package/dist/visual-app-lib/types/visual-app/question-verbs.d.ts +54 -0
  22. package/dist/visual-app-lib/types/visual-app/session-client.d.ts +3 -0
  23. package/dist/visual-app-lib/types/visual-app/state.d.ts +4 -1
  24. package/dist/visual-app-lib/types/visual-app/workspace-state.d.ts +13 -0
  25. package/docs/CONSUMING-YARRAMATE.md +17 -5
  26. package/package.json +1 -1
  27. package/schema/yarramate-visual-event.schema.json +324 -73
  28. package/schema/yarramate-visual-response.schema.json +230 -56
  29. package/skills/yarramate-architecture/SKILL.md +6 -2
  30. package/skills/yarramate-architecture/references/visual-conversations.md +21 -3
  31. package/dist/visual-app/assets/index-CJVWkpLt.css +0 -1
@@ -17,6 +17,7 @@ const NEWLINE = 0x0a;
17
17
  const ACTIONABLE_EVENT_TYPES = {
18
18
  'chat.message': true,
19
19
  'choice.selected': true,
20
+ 'question.delegate': true,
20
21
  'session.end': true,
21
22
  };
22
23
  /**
@@ -1,3 +1,4 @@
1
+ import type { CatalogueCondition } from '../../interrogate-command.js';
1
2
  import type { CanvasGraph } from '../../graph-projection.js';
2
3
  import type { PatternMembership, PatternVacancy } from '../../compiler.js';
3
4
  import type { VISUAL_PROTOCOL_VERSION, VisualApplyResultPayload, VisualAuthority, VisualBrowserInput, VisualCapabilities, VisualChoicePresentPayload, VisualDiagnostic, VisualFilterResultPayload, VisualFreezeReason, VisualKindOption, VisualPatternOption, VisualLayoutPositions, VisualLayoutRoutes, VisualLayoutSaveResultPayload, VisualResponse, VisualTerminationReason, VisualViewSummary } from './protocol-contract.js';
@@ -18,6 +19,23 @@ export interface VisualQuestionEntry {
18
19
  readonly question: string;
19
20
  readonly authority: 'human' | 'agent' | 'either';
20
21
  readonly since?: string;
22
+ /**
23
+ * Which list the row came from (#515): a workspace row names no subject
24
+ * and has no panel to open, a subject row is keyed under its subject.
25
+ * Optional so a host that constructs rows by hand is not broken by a
26
+ * field only the pane's verbs read.
27
+ */
28
+ readonly scope?: 'workspace' | 'subject';
29
+ /** Why the question matters, in the catalogue's words (ADR 0110). */
30
+ readonly materiality?: string;
31
+ /** What would close it, in prose. */
32
+ readonly resolution?: string;
33
+ /**
34
+ * The catalogue conditions that opened it, verbatim (#515, ADR 0110): the
35
+ * machine-readable answer shape a row, a menu entry or a chip turns into
36
+ * a verb. Optional for the same reason as `scope`.
37
+ */
38
+ readonly trigger?: readonly CatalogueCondition[];
21
39
  }
22
40
  /**
23
41
  * The interrogation report, folded for drawing (#292).
@@ -142,9 +142,18 @@ dismissed = []) => {
142
142
  questionId: question.id,
143
143
  authority: question.authority,
144
144
  ...(question.since === undefined ? {} : { since: question.since }),
145
+ // The answer shape rides along (#515, ADR 0110): materiality for the
146
+ // row's own words, the trigger for the verb that would close it.
147
+ materiality: question.materiality,
148
+ resolution: question.resolution,
149
+ trigger: question.trigger,
145
150
  };
146
151
  if (question.subjects === undefined) {
147
- workspace.push({ ...base, question: question.question });
152
+ workspace.push({
153
+ ...base,
154
+ scope: "workspace",
155
+ question: question.question,
156
+ });
148
157
  continue;
149
158
  }
150
159
  for (const subject of question.subjects) {
@@ -153,6 +162,7 @@ dismissed = []) => {
153
162
  }
154
163
  (subjects[subject.id] ??= []).push({
155
164
  ...base,
165
+ scope: "subject",
156
166
  question: subject.question,
157
167
  });
158
168
  }