@owlmeans/viable-common 0.0.11 → 0.0.13

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 (102) hide show
  1. package/README.md +68 -1
  2. package/agent-meta/manifest.json +23 -0
  3. package/agent-meta/skills/agent-presentation/SKILL.md +62 -0
  4. package/agent-meta/skills/viable-common/SKILL.md +180 -0
  5. package/build/agent/index.d.ts +1 -0
  6. package/build/agent/index.d.ts.map +1 -1
  7. package/build/agent/index.js +1 -0
  8. package/build/agent/index.js.map +1 -1
  9. package/build/agent/presentation.d.ts +102 -0
  10. package/build/agent/presentation.d.ts.map +1 -0
  11. package/build/agent/presentation.js +303 -0
  12. package/build/agent/presentation.js.map +1 -0
  13. package/build/blueprint/case.js +3 -3
  14. package/build/connect/consts.d.ts +93 -5
  15. package/build/connect/consts.d.ts.map +1 -1
  16. package/build/connect/consts.js +90 -1
  17. package/build/connect/consts.js.map +1 -1
  18. package/build/connect/entrypoints.d.ts +208 -4
  19. package/build/connect/entrypoints.d.ts.map +1 -1
  20. package/build/connect/entrypoints.js +61 -33
  21. package/build/connect/entrypoints.js.map +1 -1
  22. package/build/connect/errors.d.ts +20 -0
  23. package/build/connect/errors.d.ts.map +1 -1
  24. package/build/connect/errors.js +39 -0
  25. package/build/connect/errors.js.map +1 -1
  26. package/build/connect/ops.d.ts +46 -2
  27. package/build/connect/ops.d.ts.map +1 -1
  28. package/build/connect/references.d.ts +60 -1
  29. package/build/connect/references.d.ts.map +1 -1
  30. package/build/connect/references.js +16 -0
  31. package/build/connect/references.js.map +1 -1
  32. package/build/connect/schemas.d.ts +17 -2
  33. package/build/connect/schemas.d.ts.map +1 -1
  34. package/build/connect/schemas.js +91 -7
  35. package/build/connect/schemas.js.map +1 -1
  36. package/build/connect/types.d.ts +125 -1
  37. package/build/connect/types.d.ts.map +1 -1
  38. package/build/convert/consts.d.ts +539 -0
  39. package/build/convert/consts.d.ts.map +1 -0
  40. package/build/convert/consts.js +630 -0
  41. package/build/convert/consts.js.map +1 -0
  42. package/build/convert/helpers.d.ts +91 -0
  43. package/build/convert/helpers.d.ts.map +1 -0
  44. package/build/convert/helpers.js +301 -0
  45. package/build/convert/helpers.js.map +1 -0
  46. package/build/convert/index.d.ts +11 -0
  47. package/build/convert/index.d.ts.map +1 -0
  48. package/build/convert/index.js +4 -0
  49. package/build/convert/index.js.map +1 -0
  50. package/build/convert/schemas.d.ts +62 -0
  51. package/build/convert/schemas.d.ts.map +1 -0
  52. package/build/convert/schemas.js +626 -0
  53. package/build/convert/schemas.js.map +1 -0
  54. package/build/convert/types.d.ts +683 -0
  55. package/build/convert/types.d.ts.map +1 -0
  56. package/build/convert/types.js +2 -0
  57. package/build/convert/types.js.map +1 -0
  58. package/build/index.d.ts +1 -0
  59. package/build/index.d.ts.map +1 -1
  60. package/build/index.js +1 -0
  61. package/build/index.js.map +1 -1
  62. package/build/skills/catalogue.d.ts.map +1 -1
  63. package/build/skills/catalogue.js +76 -34
  64. package/build/skills/catalogue.js.map +1 -1
  65. package/build/slot/consts.d.ts +73 -2
  66. package/build/slot/consts.d.ts.map +1 -1
  67. package/build/slot/consts.js +105 -5
  68. package/build/slot/consts.js.map +1 -1
  69. package/build/slot/schemas.d.ts +9 -1
  70. package/build/slot/schemas.d.ts.map +1 -1
  71. package/build/slot/schemas.js +18 -0
  72. package/build/slot/schemas.js.map +1 -1
  73. package/build/slot/types.d.ts +71 -0
  74. package/build/slot/types.d.ts.map +1 -1
  75. package/package.json +15 -7
  76. package/src/agent/index.ts +1 -0
  77. package/src/agent/presentation.ts +335 -0
  78. package/src/blueprint/case.ts +3 -3
  79. package/src/connect/consts.ts +93 -1
  80. package/src/connect/entrypoints.ts +113 -40
  81. package/src/connect/errors.ts +44 -0
  82. package/src/connect/ops.ts +50 -2
  83. package/src/connect/references.ts +53 -5
  84. package/src/connect/schemas.ts +102 -13
  85. package/src/connect/types.ts +130 -2
  86. package/src/convert/consts.ts +672 -0
  87. package/src/convert/helpers.ts +340 -0
  88. package/src/convert/index.ts +10 -0
  89. package/src/convert/schemas.ts +663 -0
  90. package/src/convert/types.ts +741 -0
  91. package/src/index.ts +1 -0
  92. package/src/skills/catalogue.ts +76 -34
  93. package/src/slot/consts.ts +112 -6
  94. package/src/slot/schemas.ts +20 -1
  95. package/src/slot/types.ts +80 -0
  96. package/tests/connect-convert.spec.ts +162 -0
  97. package/tests/connect-entrypoints.spec.ts +12 -4
  98. package/tests/connect-errors.spec.ts +22 -0
  99. package/tests/convert.spec.ts +318 -0
  100. package/tests/presentation.spec.ts +85 -0
  101. package/tests/skills.spec.ts +47 -0
  102. /package/tests/{design.test.ts → design.spec.ts} +0 -0
@@ -0,0 +1,303 @@
1
+ /**
2
+ * A compact, runtime-free description of how an agent message should be presented.
3
+ *
4
+ * The server emits this with thinking events and the browser refines it as streaming output
5
+ * becomes parseable. Keeping the vocabulary here prevents the two runtimes from drifting into
6
+ * their own guesses about the same model response.
7
+ */
8
+ export var AgentMessageCategory;
9
+ (function (AgentMessageCategory) {
10
+ AgentMessageCategory["Code"] = "code";
11
+ AgentMessageCategory["Diff"] = "diff";
12
+ AgentMessageCategory["Structured"] = "structured";
13
+ AgentMessageCategory["Markdown"] = "markdown";
14
+ AgentMessageCategory["Plain"] = "plain";
15
+ })(AgentMessageCategory || (AgentMessageCategory = {}));
16
+ export var AgentCodeLanguage;
17
+ (function (AgentCodeLanguage) {
18
+ AgentCodeLanguage["ReactTsx"] = "react-tsx";
19
+ AgentCodeLanguage["Css"] = "css";
20
+ AgentCodeLanguage["TypeScript"] = "typescript";
21
+ AgentCodeLanguage["Json"] = "json";
22
+ AgentCodeLanguage["Other"] = "other";
23
+ })(AgentCodeLanguage || (AgentCodeLanguage = {}));
24
+ /** A semantic shape that the manager can render as a purpose-built card. */
25
+ export var AgentStructuredKind;
26
+ (function (AgentStructuredKind) {
27
+ AgentStructuredKind["ToolCalls"] = "tool-calls";
28
+ AgentStructuredKind["ArtifactSelection"] = "artifact-selection";
29
+ AgentStructuredKind["EntitySelection"] = "entity-selection";
30
+ AgentStructuredKind["StoryPlan"] = "story-plan";
31
+ AgentStructuredKind["ScreenPlan"] = "screen-plan";
32
+ AgentStructuredKind["ComponentPlan"] = "component-plan";
33
+ AgentStructuredKind["TransitionPlan"] = "transition-plan";
34
+ AgentStructuredKind["EntrypointSelection"] = "entrypoint-selection";
35
+ AgentStructuredKind["AccessPolicy"] = "access-policy";
36
+ AgentStructuredKind["ScaffoldPlan"] = "scaffold-plan";
37
+ AgentStructuredKind["RuntimeDecision"] = "runtime-decision";
38
+ AgentStructuredKind["CandidateRanking"] = "candidate-ranking";
39
+ AgentStructuredKind["Decision"] = "decision";
40
+ AgentStructuredKind["GenericRecord"] = "generic-record";
41
+ AgentStructuredKind["GenericList"] = "generic-list";
42
+ AgentStructuredKind["GenericValue"] = "generic-value";
43
+ })(AgentStructuredKind || (AgentStructuredKind = {}));
44
+ export var AgentMarkdownKind;
45
+ (function (AgentMarkdownKind) {
46
+ AgentMarkdownKind["Specification"] = "specification";
47
+ AgentMarkdownKind["DesignDocument"] = "design-document";
48
+ AgentMarkdownKind["Documentation"] = "documentation";
49
+ })(AgentMarkdownKind || (AgentMarkdownKind = {}));
50
+ /** The family of specialist that produced an output, not an authorization role. */
51
+ export var AgentMessageRole;
52
+ (function (AgentMessageRole) {
53
+ AgentMessageRole["Technical"] = "technical";
54
+ AgentMessageRole["Analytical"] = "analytical";
55
+ AgentMessageRole["Product"] = "product";
56
+ AgentMessageRole["Ux"] = "ux";
57
+ AgentMessageRole["VisualDesign"] = "visual-design";
58
+ AgentMessageRole["Architect"] = "architect";
59
+ AgentMessageRole["Developer"] = "developer";
60
+ AgentMessageRole["Repair"] = "repair";
61
+ AgentMessageRole["Orchestrator"] = "orchestrator";
62
+ })(AgentMessageRole || (AgentMessageRole = {}));
63
+ const documentActions = {
64
+ 'write-specification': AgentMarkdownKind.Specification,
65
+ 'summarize-specification': AgentMarkdownKind.Specification,
66
+ 'write-design-concept': AgentMarkdownKind.DesignDocument,
67
+ 'describe-ui-component': AgentMarkdownKind.DesignDocument,
68
+ 'describe-ui-screen': AgentMarkdownKind.DesignDocument,
69
+ 'describe-ui-layout': AgentMarkdownKind.DesignDocument,
70
+ };
71
+ const codeActions = new Set(['code', 'update-code', 'update-code-full']);
72
+ /**
73
+ * The model's schema makes the final output self-describing; while it streams, the helper action
74
+ * gives the client the same semantic cue before a complete JSON value exists.
75
+ */
76
+ const structuredActions = {
77
+ 'choose-files-for-fix': AgentStructuredKind.ArtifactSelection,
78
+ 'list-files-to-fix': AgentStructuredKind.ArtifactSelection,
79
+ 'extract-user-stories-from-spec': AgentStructuredKind.StoryPlan,
80
+ 'derive-connecting-stories': AgentStructuredKind.StoryPlan,
81
+ 'derive-area-scaffold-stories': AgentStructuredKind.StoryPlan,
82
+ 'describe-ux-story-transitions': AgentStructuredKind.TransitionPlan,
83
+ 'find-entrypoint-for-screen': AgentStructuredKind.EntrypointSelection,
84
+ 'describe-api-access': AgentStructuredKind.AccessPolicy,
85
+ 'describe-screen-access': AgentStructuredKind.AccessPolicy,
86
+ 'plan-scaffold': AgentStructuredKind.ScaffoldPlan,
87
+ 'runtime-gate': AgentStructuredKind.RuntimeDecision,
88
+ 'detect-story-with-home-screen': AgentStructuredKind.CandidateRanking,
89
+ };
90
+ const asRecord = (value) => value != null && typeof value === 'object' && !Array.isArray(value)
91
+ ? value
92
+ : undefined;
93
+ const actionOf = (input) => input.action?.toLowerCase() ?? '';
94
+ const sourceOf = (input) => `${input.agent ?? ''} ${input.helper ?? ''}`.toLowerCase();
95
+ const contentOf = (input) => input.text?.trim() ?? '';
96
+ /**
97
+ * Source extraction is an internal context-reduction pass. Its terminal tool call contains only
98
+ * line ranges, which are useful to the coder but add no useful information to a person's journal.
99
+ */
100
+ export const isAgentMessageHidden = (input) => actionOf(input) === 'source-extract';
101
+ /** Maps the attribution that reached the event boundary to the visual specialist family. */
102
+ export const agentMessageRoleOf = (input) => {
103
+ const source = sourceOf(input);
104
+ const action = actionOf(input);
105
+ if (action === 'arbitrary-modification' || source.includes('orchestrator'))
106
+ return AgentMessageRole.Orchestrator;
107
+ if (source.includes('fix'))
108
+ return AgentMessageRole.Repair;
109
+ if (source.includes('coder') || source.includes('developer') || codeActions.has(action))
110
+ return AgentMessageRole.Developer;
111
+ if (source.includes('visual') || source.includes('ui-helper'))
112
+ return AgentMessageRole.VisualDesign;
113
+ if (source.includes('ux-'))
114
+ return AgentMessageRole.Ux;
115
+ if (source.includes('business') || source.includes('ba-') || source.includes('analysis') || source.includes('analyst'))
116
+ return AgentMessageRole.Analytical;
117
+ if (source.includes('product') || source.includes('naming'))
118
+ return AgentMessageRole.Product;
119
+ if (source.includes('architect') || source.includes('arch') || source.includes('layout-helper') ||
120
+ source.includes('api-helper') || source.includes('access-helper') || source.includes('datalayer-helper') ||
121
+ source.includes('domain') || source.includes('nav-helper') || source.includes('ui-com-helper') ||
122
+ source.includes('ui-state-helper'))
123
+ return AgentMessageRole.Architect;
124
+ return AgentMessageRole.Technical;
125
+ };
126
+ /** Pulls a schema argument out of LangChain's serialised tool-call shape. */
127
+ export const agentToolCallArguments = (value) => {
128
+ if (!Array.isArray(value) || value.length !== 1)
129
+ return value;
130
+ const call = asRecord(value[0]);
131
+ return call?.args ?? value;
132
+ };
133
+ const structuredKindOf = (value) => {
134
+ if (value == null)
135
+ return undefined;
136
+ const toolArgs = agentToolCallArguments(value);
137
+ const object = asRecord(toolArgs);
138
+ if (object == null) {
139
+ if (Array.isArray(toolArgs))
140
+ return AgentStructuredKind.GenericList;
141
+ return undefined;
142
+ }
143
+ // Checked ahead of the single-array shapes below: a scaffold plan carries its own `stories`
144
+ // array (so the StoryPlan check would otherwise swallow it), and a runtime decision straight
145
+ // from the MODEL never carries `actor`/`worker` — those are added only once the decision is
146
+ // persisted onto a StoryDesign — so requiring them here missed every live model call.
147
+ if ('identity' in object && 'guestHome' in object && 'areas' in object && 'stories' in object) {
148
+ return AgentStructuredKind.ScaffoldPlan;
149
+ }
150
+ if (Array.isArray(object.jobs) && Array.isArray(object.agents) && 'kv' in object) {
151
+ return AgentStructuredKind.RuntimeDecision;
152
+ }
153
+ if (Array.isArray(object.files))
154
+ return AgentStructuredKind.ArtifactSelection;
155
+ if (Array.isArray(object.entities))
156
+ return AgentStructuredKind.EntitySelection;
157
+ if (Array.isArray(object.stories))
158
+ return AgentStructuredKind.StoryPlan;
159
+ if (Array.isArray(object.screens))
160
+ return AgentStructuredKind.ScreenPlan;
161
+ if (Array.isArray(object.components))
162
+ return AgentStructuredKind.ComponentPlan;
163
+ if (Array.isArray(object.transitions))
164
+ return AgentStructuredKind.TransitionPlan;
165
+ if (Array.isArray(object.entries))
166
+ return AgentStructuredKind.EntrypointSelection;
167
+ if (Array.isArray(object.candidates))
168
+ return AgentStructuredKind.CandidateRanking;
169
+ if (Object.values(object).some(value => {
170
+ const entry = asRecord(value);
171
+ return entry != null && Array.isArray(entry.permissions) && 'level' in entry;
172
+ }))
173
+ return AgentStructuredKind.AccessPolicy;
174
+ return AgentStructuredKind.GenericRecord;
175
+ };
176
+ const decisionAction = (action) => action.startsWith('should-') || action.startsWith('is-') || action.includes('blueprint-case') || action.includes('choose-case');
177
+ const fileExtensionLanguage = (path) => {
178
+ const name = path.toLowerCase().split('?')[0];
179
+ if (/\.(tsx|jsx)$/.test(name))
180
+ return AgentCodeLanguage.ReactTsx;
181
+ if (/\.css$/.test(name))
182
+ return AgentCodeLanguage.Css;
183
+ if (/\.(ts|mts|cts|js|mjs|cjs)$/.test(name))
184
+ return AgentCodeLanguage.TypeScript;
185
+ if (/\.json$/.test(name))
186
+ return AgentCodeLanguage.Json;
187
+ return AgentCodeLanguage.Other;
188
+ };
189
+ /** Finds the language of a unified diff from its destination (or source) file path. */
190
+ export const agentDiffLanguageOf = (text) => {
191
+ const match = text.match(/^\+\+\+\s+(?:b\/)?(.+)$/m) ?? text.match(/^---\s+(?:a\/)?(.+)$/m);
192
+ return match == null ? AgentCodeLanguage.Other : fileExtensionLanguage(match[1]);
193
+ };
194
+ const fencedLanguageOf = (text) => {
195
+ const match = text.match(/^```([\w+-]+)/m);
196
+ const language = match?.[1]?.toLowerCase();
197
+ if (language == null)
198
+ return undefined;
199
+ if (['tsx', 'jsx', 'react'].includes(language))
200
+ return AgentCodeLanguage.ReactTsx;
201
+ if (language === 'css')
202
+ return AgentCodeLanguage.Css;
203
+ if (['ts', 'typescript', 'js', 'javascript'].includes(language))
204
+ return AgentCodeLanguage.TypeScript;
205
+ if (language === 'json')
206
+ return AgentCodeLanguage.Json;
207
+ return AgentCodeLanguage.Other;
208
+ };
209
+ /** Conservative code detection; prose with one identifier remains plain text. */
210
+ export const agentCodeLanguageOf = (text) => {
211
+ const content = text.trim().replace(/^```[\w+-]*\n?|\n?```$/g, '');
212
+ const fenced = fencedLanguageOf(text);
213
+ if (fenced != null)
214
+ return fenced;
215
+ if (content === '')
216
+ return AgentCodeLanguage.Other;
217
+ try {
218
+ JSON.parse(content);
219
+ if (/^[{[]/.test(content))
220
+ return AgentCodeLanguage.Json;
221
+ }
222
+ catch {
223
+ // The remaining heuristics deliberately require source-like syntax.
224
+ }
225
+ if (/<[A-Za-z][\w.:-]*(?:\s[^>]*)?\/>|<[A-Za-z][\w.:-]*(?:\s[^>]*)?>/.test(content) &&
226
+ /\b(import|export|const|function|return)\b/.test(content))
227
+ return AgentCodeLanguage.ReactTsx;
228
+ if (/(^|\n)\s*(?:[.#][\w-]+|[a-z][\w-]*(?:\[[^\]]+\])?)\s*\{[^}]*:[^}]*\}/.test(content)) {
229
+ return AgentCodeLanguage.Css;
230
+ }
231
+ if (/\b(import|export|interface|type|const|let|function|class)\b/.test(content) &&
232
+ /[;{}]|=>/.test(content))
233
+ return AgentCodeLanguage.TypeScript;
234
+ return AgentCodeLanguage.Other;
235
+ };
236
+ export const isUnifiedDiff = (text) => /^---\s+.+\n\+\+\+\s+.+/m.test(text) || (/^@@\s+[-+]/m.test(text) && /^(?:\+|-)[^+-]/m.test(text));
237
+ const markdownKindOf = (text) => {
238
+ if (/^#{1,6}\s+/m.test(text) || /^>\s+/m.test(text) || /^\|.+\|\s*$/m.test(text)) {
239
+ return AgentMarkdownKind.Documentation;
240
+ }
241
+ const listItems = text.match(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/gm)?.length ?? 0;
242
+ return listItems >= 2 ? AgentMarkdownKind.Documentation : undefined;
243
+ };
244
+ /**
245
+ * Classifies known model output by source AND shape. The `value` comes from a caller's JSON
246
+ * parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
247
+ */
248
+ /**
249
+ * Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
250
+ * lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
251
+ * are file/shell operations, not model-schema output, so they always render as ToolCalls even
252
+ * when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
253
+ * exactly like an ArtifactSelection.
254
+ */
255
+ const agentLoopActions = new Set([
256
+ 'coding-agent-ask', 'arbitrary-modification', 'fix-agent', 'architect', 'declaration-lookup',
257
+ 'source-extract',
258
+ ]);
259
+ const isGenericStructure = (kind) => kind == null || kind === AgentStructuredKind.GenericRecord || kind === AgentStructuredKind.GenericList ||
260
+ kind === AgentStructuredKind.GenericValue;
261
+ export const classifyAgentMessage = (input) => {
262
+ const role = agentMessageRoleOf(input);
263
+ const action = actionOf(input);
264
+ const text = contentOf(input);
265
+ const structure = structuredKindOf(input.value);
266
+ if (input.outputType === 'tool_calls') {
267
+ // A single pinned-schema call resolves to its own card; everything else — several calls in
268
+ // one turn, an unconstrained agent-loop action, or a shape too generic to be informative —
269
+ // is a tool call, not a schema result.
270
+ const isMultiCall = Array.isArray(input.value) && input.value.length > 1;
271
+ const isToolCalls = isMultiCall || agentLoopActions.has(action) || isGenericStructure(structure);
272
+ return {
273
+ category: AgentMessageCategory.Structured,
274
+ structure: isToolCalls ? AgentStructuredKind.ToolCalls : structure,
275
+ role,
276
+ };
277
+ }
278
+ if (structure != null)
279
+ return { category: AgentMessageCategory.Structured, structure, role };
280
+ const actionStructure = structuredActions[action];
281
+ if (actionStructure != null)
282
+ return { category: AgentMessageCategory.Structured, structure: actionStructure, role };
283
+ if (decisionAction(action))
284
+ return { category: AgentMessageCategory.Structured, structure: AgentStructuredKind.Decision, role };
285
+ if (isUnifiedDiff(text) || action === 'update-code') {
286
+ return { category: AgentMessageCategory.Diff, language: agentDiffLanguageOf(text), role };
287
+ }
288
+ if (codeActions.has(action) || fencedLanguageOf(text) != null || agentCodeLanguageOf(text) !== AgentCodeLanguage.Other) {
289
+ return { category: AgentMessageCategory.Code, language: agentCodeLanguageOf(text), role };
290
+ }
291
+ const document = documentActions[action] ?? markdownKindOf(text);
292
+ if (document != null)
293
+ return { category: AgentMessageCategory.Markdown, document, role };
294
+ if (input.value != null) {
295
+ return {
296
+ category: AgentMessageCategory.Structured,
297
+ structure: Array.isArray(input.value) ? AgentStructuredKind.GenericList : AgentStructuredKind.GenericValue,
298
+ role,
299
+ };
300
+ }
301
+ return { category: AgentMessageCategory.Plain, role };
302
+ };
303
+ //# sourceMappingURL=presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../src/agent/presentation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,6CAAqB,CAAA;IACrB,uCAAe,CAAA;AACjB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,2CAAsB,CAAA;IACtB,gCAAW,CAAA;IACX,8CAAyB,CAAA;IACzB,kCAAa,CAAA;IACb,oCAAe,CAAA;AACjB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAED,4EAA4E;AAC5E,MAAM,CAAN,IAAY,mBAiBX;AAjBD,WAAY,mBAA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EAAE,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IACxF,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACxB,OAAO;YACL,QAAQ,EAAE,oBAAoB,CAAC,UAAU;YACzC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,YAAY;YAC1G,IAAI;SACL,CAAA;IACH,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,oBAAoB,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;AACvD,CAAC,CAAA"}
@@ -45,8 +45,8 @@ export var GameKind;
45
45
  /** What every AI case installs. The langchain peers are declared here, at ONE range. */
46
46
  const AI_DEPS = {
47
47
  [SubProject.Backend]: {
48
- '@owlmeans/llm': '^0.1.18-rc.13',
49
- '@owlmeans/agent': '^0.1.18-rc.16',
48
+ '@owlmeans/llm': '^0.1.18-rc.22',
49
+ '@owlmeans/agent': '^0.1.18-rc.25',
50
50
  '@langchain/core': '^1.2.9',
51
51
  '@langchain/anthropic': '^1.5.8',
52
52
  '@langchain/openai': '^1.5.10',
@@ -189,7 +189,7 @@ in advance.
189
189
  deps: {
190
190
  [SubProject.Backend]: {
191
191
  ...AI_DEPS[SubProject.Backend],
192
- '@owlmeans/agent-skills': '^0.1.18-rc.12',
192
+ '@owlmeans/agent-skills': '^0.1.18-rc.21',
193
193
  },
194
194
  },
195
195
  libraries: AI_LIBRARIES,
@@ -62,8 +62,20 @@ export declare enum ConnectExecutor {
62
62
  Files = "files",
63
63
  Shell = "shell",
64
64
  Git = "git",
65
- /** The parent agent will answer model tasks. Present exactly when `llm` is `Local`. */
66
- Model = "model"
65
+ /**
66
+ * The parent agent PERFORMS the model calls of a run: each one arrives as a `ModelTask`, is run
67
+ * in a clean subagent and submitted back. Present exactly when `llm` is `Local`.
68
+ */
69
+ Model = "model",
70
+ /**
71
+ * A PERSON can be asked a question and their answer brought back.
72
+ *
73
+ * Advertised always, and by every connector: a parent agent has a human in front of it by
74
+ * definition, which is the whole reason the platform can ask one anything at all. It is not a
75
+ * narrower `Model` — a model task is inference the platform pays for either way, an inquiry is
76
+ * a decision only a person can make, and a run that cannot ask assumes instead.
77
+ */
78
+ Human = "human"
67
79
  }
68
80
  /** What one operation asks a connector to do. */
69
81
  export declare enum ConnectOpKind {
@@ -72,7 +84,15 @@ export declare enum ConnectOpKind {
72
84
  /** Run one model call and submit its answer. */
73
85
  ModelTask = "model-task",
74
86
  /** Write the target's configuration (its `.env` files) and report what services are reachable. */
75
- Configure = "configure"
87
+ Configure = "configure",
88
+ /**
89
+ * Put one question to the person the connector is working for, and bring back their answer.
90
+ *
91
+ * An operation like any other — queued to the project, redelivered to whichever session is
92
+ * attached, answered against its own op id — because the alternative was a second channel with
93
+ * its own delivery, expiry and reattachment rules for the one payload that already had them.
94
+ */
95
+ Inquiry = "inquiry"
76
96
  }
77
97
  /** How a connector is receiving operations. */
78
98
  export declare enum ConnectTransport {
@@ -152,7 +172,19 @@ export declare enum ConnectJobKind {
152
172
  ProjectReinit = "project-reinit",
153
173
  StoryDevelop = "story-develop",
154
174
  FreeFlight = "free-flight",
155
- PipelineResume = "pipeline-resume"
175
+ PipelineResume = "pipeline-resume",
176
+ /**
177
+ * The four stages of a conversion, plus the purge.
178
+ *
179
+ * One kind per stage rather than one for the whole conversion: each stage is its own platform
180
+ * pipeline run, ends at a decision the user makes, and is looked up by the pipeline alias its
181
+ * kind names. A single `convert` kind would match whichever run row happened to be newest.
182
+ */
183
+ ConvertIntake = "convert-intake",
184
+ ConvertAnalysis = "convert-analysis",
185
+ ConvertExtraction = "convert-extraction",
186
+ ConvertImplementation = "convert-implementation",
187
+ ConvertPurge = "convert-purge"
156
188
  }
157
189
  export declare enum ConnectJobStatus {
158
190
  Queued = "queued",
@@ -169,8 +201,46 @@ export declare enum ConnectJobBlock {
169
201
  /** Slot commands are queued and no connector is attached. */
170
202
  LocalOp = "local-op",
171
203
  /** The local target has no database configured and the run needs one. */
172
- Env = "env"
204
+ Env = "env",
205
+ /** A question is waiting for a person and nobody has answered it. */
206
+ Question = "question"
173
207
  }
208
+ /**
209
+ * The shapes a question can take on the wire.
210
+ *
211
+ * Mirrors `InquiryKind` in `@owlmeans/llm-common` value for value, and is deliberately a SEPARATE
212
+ * name rather than an import: the connect module is the wire contract and owns its own vocabulary
213
+ * — the same reason `ModelTask` mirrors `DelegatedTask` — which also keeps `manager-api`, which
214
+ * does not depend on the model runtime, free of `@owlmeans/llm-common`. Values are byte-identical,
215
+ * so the platform's mapper is a widening rather than a translation table, and a test pins that.
216
+ */
217
+ export declare enum ConnectInquiryKind {
218
+ /** Pick one of the offered options, or several when `multiple` is set. */
219
+ Choice = "choice",
220
+ /** Free text. */
221
+ Text = "text",
222
+ /** Yes or no. */
223
+ Confirm = "confirm"
224
+ }
225
+ /**
226
+ * How long the platform waits for a person to answer one question.
227
+ *
228
+ * The same forty-five minutes a model task gets, and for the same reason: the bound exists so a
229
+ * parent that has gone away eventually fails the step rather than holding a project lock forever,
230
+ * not to pace somebody who is thinking.
231
+ */
232
+ export declare const CONNECT_INQUIRY_TIMEOUT_MS = 2700000;
233
+ /** Options one choice question may offer. Beyond this it is a text question with a hint. */
234
+ export declare const CONNECT_INQUIRY_MAX_OPTIONS = 12;
235
+ /**
236
+ * The ceiling on an answer's text.
237
+ *
238
+ * ONE ceiling for the whole stack: the twin is `DEFAULT_INQUIRY_ANSWER_CHARS` in
239
+ * `@owlmeans/llm-common`, and the two must stay equal. Two ceilings means the layer with the
240
+ * larger one truncates silently at the smaller, and the caller records an assumption about an
241
+ * answer the person actually gave.
242
+ */
243
+ export declare const CONNECT_INQUIRY_MAX_TEXT = 2000;
174
244
  /**
175
245
  * How long a session survives without a sign of life.
176
246
  *
@@ -237,6 +307,7 @@ export declare const CONNECT_EVENT_SESSION = "connect:session";
237
307
  export declare const CONNECT_OP_PUBSUB = "connect-op-pubsub";
238
308
  export declare const CONNECT_RESULT_PUBSUB = "connect-result-pubsub";
239
309
  export declare const CONNECT_OP_STORE = "connect-op-store";
310
+ export declare const CONNECT_RESULT_STORE = "connect-result-store";
240
311
  export declare const CONNECT_SESSION_PUBSUB = "connect-session-pubsub";
241
312
  /** The backend resource alias for session records. */
242
313
  export declare const RES_CONNECT_SESSION = "connect-session";
@@ -273,8 +344,22 @@ export declare const connect: Readonly<{
273
344
  modify: "viable:manager-api:connect:project:modify";
274
345
  settings: "viable:manager-api:connect:project:settings";
275
346
  llm: "viable:manager-api:connect:project:llm";
347
+ /** The per-project converter inference mode. Separate from `llm`: it is not a paid capability. */
348
+ converterLlm: "viable:manager-api:connect:project:converter-llm";
276
349
  job: "viable:manager-api:connect:project:job";
277
350
  }>;
351
+ convert: Readonly<{
352
+ create: "viable:manager-api:connect:convert:create";
353
+ check: "viable:manager-api:connect:convert:check";
354
+ start: "viable:manager-api:connect:convert:start";
355
+ proceed: "viable:manager-api:connect:convert:proceed";
356
+ cancel: "viable:manager-api:connect:convert:cancel";
357
+ status: "viable:manager-api:connect:convert:status";
358
+ purge: "viable:manager-api:connect:convert:purge";
359
+ }>;
360
+ inquiry: Readonly<{
361
+ answer: "viable:manager-api:connect:inquiry:answer";
362
+ }>;
278
363
  story: Readonly<{
279
364
  list: "viable:manager-api:connect:story:list";
280
365
  get: "viable:manager-api:connect:story:get";
@@ -283,6 +368,9 @@ export declare const connect: Readonly<{
283
368
  delete: "viable:manager-api:connect:story:delete";
284
369
  develop: "viable:manager-api:connect:story:develop";
285
370
  }>;
371
+ files: Readonly<{
372
+ list: "viable:manager-api:connect:files:list";
373
+ }>;
286
374
  pipeline: Readonly<{
287
375
  state: "viable:manager-api:connect:pipeline:state";
288
376
  resume: "viable:manager-api:connect:pipeline:resume";
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/connect/consts.ts"],"names":[],"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kGAAkG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BpG,CAAA"}
@@ -67,8 +67,20 @@ export var ConnectExecutor;
67
67
  ConnectExecutor["Files"] = "files";
68
68
  ConnectExecutor["Shell"] = "shell";
69
69
  ConnectExecutor["Git"] = "git";
70
- /** The parent agent will answer model tasks. Present exactly when `llm` is `Local`. */
70
+ /**
71
+ * The parent agent PERFORMS the model calls of a run: each one arrives as a `ModelTask`, is run
72
+ * in a clean subagent and submitted back. Present exactly when `llm` is `Local`.
73
+ */
71
74
  ConnectExecutor["Model"] = "model";
75
+ /**
76
+ * A PERSON can be asked a question and their answer brought back.
77
+ *
78
+ * Advertised always, and by every connector: a parent agent has a human in front of it by
79
+ * definition, which is the whole reason the platform can ask one anything at all. It is not a
80
+ * narrower `Model` — a model task is inference the platform pays for either way, an inquiry is
81
+ * a decision only a person can make, and a run that cannot ask assumes instead.
82
+ */
83
+ ConnectExecutor["Human"] = "human";
72
84
  })(ConnectExecutor || (ConnectExecutor = {}));
73
85
  /** What one operation asks a connector to do. */
74
86
  export var ConnectOpKind;
@@ -79,6 +91,14 @@ export var ConnectOpKind;
79
91
  ConnectOpKind["ModelTask"] = "model-task";
80
92
  /** Write the target's configuration (its `.env` files) and report what services are reachable. */
81
93
  ConnectOpKind["Configure"] = "configure";
94
+ /**
95
+ * Put one question to the person the connector is working for, and bring back their answer.
96
+ *
97
+ * An operation like any other — queued to the project, redelivered to whichever session is
98
+ * attached, answered against its own op id — because the alternative was a second channel with
99
+ * its own delivery, expiry and reattachment rules for the one payload that already had them.
100
+ */
101
+ ConnectOpKind["Inquiry"] = "inquiry";
82
102
  })(ConnectOpKind || (ConnectOpKind = {}));
83
103
  /** How a connector is receiving operations. */
84
104
  export var ConnectTransport;
@@ -197,6 +217,18 @@ export var ConnectJobKind;
197
217
  ConnectJobKind["StoryDevelop"] = "story-develop";
198
218
  ConnectJobKind["FreeFlight"] = "free-flight";
199
219
  ConnectJobKind["PipelineResume"] = "pipeline-resume";
220
+ /**
221
+ * The four stages of a conversion, plus the purge.
222
+ *
223
+ * One kind per stage rather than one for the whole conversion: each stage is its own platform
224
+ * pipeline run, ends at a decision the user makes, and is looked up by the pipeline alias its
225
+ * kind names. A single `convert` kind would match whichever run row happened to be newest.
226
+ */
227
+ ConnectJobKind["ConvertIntake"] = "convert-intake";
228
+ ConnectJobKind["ConvertAnalysis"] = "convert-analysis";
229
+ ConnectJobKind["ConvertExtraction"] = "convert-extraction";
230
+ ConnectJobKind["ConvertImplementation"] = "convert-implementation";
231
+ ConnectJobKind["ConvertPurge"] = "convert-purge";
200
232
  })(ConnectJobKind || (ConnectJobKind = {}));
201
233
  export var ConnectJobStatus;
202
234
  (function (ConnectJobStatus) {
@@ -216,7 +248,46 @@ export var ConnectJobBlock;
216
248
  ConnectJobBlock["LocalOp"] = "local-op";
217
249
  /** The local target has no database configured and the run needs one. */
218
250
  ConnectJobBlock["Env"] = "env";
251
+ /** A question is waiting for a person and nobody has answered it. */
252
+ ConnectJobBlock["Question"] = "question";
219
253
  })(ConnectJobBlock || (ConnectJobBlock = {}));
254
+ /**
255
+ * The shapes a question can take on the wire.
256
+ *
257
+ * Mirrors `InquiryKind` in `@owlmeans/llm-common` value for value, and is deliberately a SEPARATE
258
+ * name rather than an import: the connect module is the wire contract and owns its own vocabulary
259
+ * — the same reason `ModelTask` mirrors `DelegatedTask` — which also keeps `manager-api`, which
260
+ * does not depend on the model runtime, free of `@owlmeans/llm-common`. Values are byte-identical,
261
+ * so the platform's mapper is a widening rather than a translation table, and a test pins that.
262
+ */
263
+ export var ConnectInquiryKind;
264
+ (function (ConnectInquiryKind) {
265
+ /** Pick one of the offered options, or several when `multiple` is set. */
266
+ ConnectInquiryKind["Choice"] = "choice";
267
+ /** Free text. */
268
+ ConnectInquiryKind["Text"] = "text";
269
+ /** Yes or no. */
270
+ ConnectInquiryKind["Confirm"] = "confirm";
271
+ })(ConnectInquiryKind || (ConnectInquiryKind = {}));
272
+ /**
273
+ * How long the platform waits for a person to answer one question.
274
+ *
275
+ * The same forty-five minutes a model task gets, and for the same reason: the bound exists so a
276
+ * parent that has gone away eventually fails the step rather than holding a project lock forever,
277
+ * not to pace somebody who is thinking.
278
+ */
279
+ export const CONNECT_INQUIRY_TIMEOUT_MS = 2_700_000;
280
+ /** Options one choice question may offer. Beyond this it is a text question with a hint. */
281
+ export const CONNECT_INQUIRY_MAX_OPTIONS = 12;
282
+ /**
283
+ * The ceiling on an answer's text.
284
+ *
285
+ * ONE ceiling for the whole stack: the twin is `DEFAULT_INQUIRY_ANSWER_CHARS` in
286
+ * `@owlmeans/llm-common`, and the two must stay equal. Two ceilings means the layer with the
287
+ * larger one truncates silently at the smaller, and the caller records an assumption about an
288
+ * answer the person actually gave.
289
+ */
290
+ export const CONNECT_INQUIRY_MAX_TEXT = 2_000;
220
291
  /**
221
292
  * How long a session survives without a sign of life.
222
293
  *
@@ -283,6 +354,7 @@ export const CONNECT_EVENT_SESSION = 'connect:session';
283
354
  export const CONNECT_OP_PUBSUB = 'connect-op-pubsub';
284
355
  export const CONNECT_RESULT_PUBSUB = 'connect-result-pubsub';
285
356
  export const CONNECT_OP_STORE = 'connect-op-store';
357
+ export const CONNECT_RESULT_STORE = 'connect-result-store';
286
358
  export const CONNECT_SESSION_PUBSUB = 'connect-session-pubsub';
287
359
  /** The backend resource alias for session records. */
288
360
  export const RES_CONNECT_SESSION = 'connect-session';
@@ -319,8 +391,22 @@ export const connect = Object.freeze({
319
391
  modify: 'viable:manager-api:connect:project:modify',
320
392
  settings: 'viable:manager-api:connect:project:settings',
321
393
  llm: 'viable:manager-api:connect:project:llm',
394
+ /** The per-project converter inference mode. Separate from `llm`: it is not a paid capability. */
395
+ converterLlm: 'viable:manager-api:connect:project:converter-llm',
322
396
  job: 'viable:manager-api:connect:project:job',
323
397
  }),
398
+ convert: Object.freeze({
399
+ create: 'viable:manager-api:connect:convert:create',
400
+ check: 'viable:manager-api:connect:convert:check',
401
+ start: 'viable:manager-api:connect:convert:start',
402
+ proceed: 'viable:manager-api:connect:convert:proceed',
403
+ cancel: 'viable:manager-api:connect:convert:cancel',
404
+ status: 'viable:manager-api:connect:convert:status',
405
+ purge: 'viable:manager-api:connect:convert:purge',
406
+ }),
407
+ inquiry: Object.freeze({
408
+ answer: 'viable:manager-api:connect:inquiry:answer',
409
+ }),
324
410
  story: Object.freeze({
325
411
  list: 'viable:manager-api:connect:story:list',
326
412
  get: 'viable:manager-api:connect:story:get',
@@ -329,6 +415,9 @@ export const connect = Object.freeze({
329
415
  delete: 'viable:manager-api:connect:story:delete',
330
416
  develop: 'viable:manager-api:connect:story:develop',
331
417
  }),
418
+ files: Object.freeze({
419
+ list: 'viable:manager-api:connect:files:list',
420
+ }),
332
421
  pipeline: Object.freeze({
333
422
  state: 'viable:manager-api:connect:pipeline:state',
334
423
  resume: 'viable:manager-api:connect:pipeline:resume',