@owlmeans/viable-common 0.0.43 → 0.0.44

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 (322) hide show
  1. package/README.md +3 -3
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
  4. package/agent-meta/skills/viable-common/SKILL.md +22 -11
  5. package/build/agent/consts.d.ts +58 -0
  6. package/build/agent/consts.d.ts.map +1 -0
  7. package/build/agent/consts.js +63 -0
  8. package/build/agent/consts.js.map +1 -0
  9. package/build/agent/consts.local.d.ts +21 -0
  10. package/build/agent/consts.local.d.ts.map +1 -0
  11. package/build/agent/consts.local.js +44 -0
  12. package/build/agent/consts.local.js.map +1 -0
  13. package/build/agent/index.d.ts +1 -0
  14. package/build/agent/index.d.ts.map +1 -1
  15. package/build/agent/index.js +1 -0
  16. package/build/agent/index.js.map +1 -1
  17. package/build/agent/presentation.d.ts +2 -86
  18. package/build/agent/presentation.d.ts.map +1 -1
  19. package/build/agent/presentation.js +2 -104
  20. package/build/agent/presentation.js.map +1 -1
  21. package/build/agent/types.d.ts +30 -0
  22. package/build/agent/types.d.ts.map +1 -1
  23. package/build/agent/types.local.d.ts +2 -0
  24. package/build/agent/types.local.d.ts.map +1 -0
  25. package/build/agent/types.local.js +2 -0
  26. package/build/agent/types.local.js.map +1 -0
  27. package/build/areas/consts.d.ts +5 -0
  28. package/build/areas/consts.d.ts.map +1 -1
  29. package/build/areas/consts.js +4 -0
  30. package/build/areas/consts.js.map +1 -1
  31. package/build/areas/tenancy.d.ts +1 -36
  32. package/build/areas/tenancy.d.ts.map +1 -1
  33. package/build/areas/tenancy.js +1 -5
  34. package/build/areas/tenancy.js.map +1 -1
  35. package/build/areas/types.d.ts +32 -0
  36. package/build/areas/types.d.ts.map +1 -1
  37. package/build/ba/types.d.ts +1 -1
  38. package/build/ba/types.d.ts.map +1 -1
  39. package/build/blueprint/consts.d.ts +41 -0
  40. package/build/blueprint/consts.d.ts.map +1 -1
  41. package/build/blueprint/consts.js +51 -0
  42. package/build/blueprint/consts.js.map +1 -1
  43. package/build/blueprint/consts.local.d.ts +2 -0
  44. package/build/blueprint/consts.local.d.ts.map +1 -0
  45. package/build/blueprint/consts.local.js +3 -0
  46. package/build/blueprint/consts.local.js.map +1 -0
  47. package/build/blueprint/index.d.ts +1 -0
  48. package/build/blueprint/index.d.ts.map +1 -1
  49. package/build/blueprint/index.js +1 -0
  50. package/build/blueprint/index.js.map +1 -1
  51. package/build/blueprint/types.d.ts +2 -50
  52. package/build/blueprint/types.d.ts.map +1 -1
  53. package/build/blueprint/types.js +1 -65
  54. package/build/blueprint/types.js.map +1 -1
  55. package/build/blueprint/utils.d.ts +11 -0
  56. package/build/blueprint/utils.d.ts.map +1 -0
  57. package/build/blueprint/utils.js +16 -0
  58. package/build/blueprint/utils.js.map +1 -0
  59. package/build/branding.d.ts +0 -8
  60. package/build/branding.d.ts.map +1 -1
  61. package/build/branding.js +0 -16
  62. package/build/branding.js.map +1 -1
  63. package/build/connect/consts.d.ts +0 -10
  64. package/build/connect/consts.d.ts.map +1 -1
  65. package/build/connect/consts.js +0 -23
  66. package/build/connect/consts.js.map +1 -1
  67. package/build/connect/entrypoints.d.ts +49 -86
  68. package/build/connect/entrypoints.d.ts.map +1 -1
  69. package/build/connect/entrypoints.js +5 -2
  70. package/build/connect/entrypoints.js.map +1 -1
  71. package/build/connect/errors.d.ts +32 -0
  72. package/build/connect/errors.d.ts.map +1 -1
  73. package/build/connect/errors.js +65 -0
  74. package/build/connect/errors.js.map +1 -1
  75. package/build/connect/index.d.ts +1 -0
  76. package/build/connect/index.d.ts.map +1 -1
  77. package/build/connect/index.js +1 -0
  78. package/build/connect/index.js.map +1 -1
  79. package/build/connect/references.d.ts +1 -153
  80. package/build/connect/references.d.ts.map +1 -1
  81. package/build/connect/references.js.map +1 -1
  82. package/build/connect/schemas.d.ts +2 -1
  83. package/build/connect/schemas.d.ts.map +1 -1
  84. package/build/connect/schemas.js +9 -0
  85. package/build/connect/schemas.js.map +1 -1
  86. package/build/connect/types.d.ts +214 -1
  87. package/build/connect/types.d.ts.map +1 -1
  88. package/build/connect/types.local.d.ts +4 -0
  89. package/build/connect/types.local.d.ts.map +1 -0
  90. package/build/connect/types.local.js +2 -0
  91. package/build/connect/types.local.js.map +1 -0
  92. package/build/connect/utils.d.ts +12 -0
  93. package/build/connect/utils.d.ts.map +1 -0
  94. package/build/connect/utils.js +25 -0
  95. package/build/connect/utils.js.map +1 -0
  96. package/build/consts.d.ts +8 -0
  97. package/build/consts.d.ts.map +1 -1
  98. package/build/consts.js +16 -0
  99. package/build/consts.js.map +1 -1
  100. package/build/convert/consts.d.ts +0 -12
  101. package/build/convert/consts.d.ts.map +1 -1
  102. package/build/convert/consts.js +0 -3
  103. package/build/convert/consts.js.map +1 -1
  104. package/build/convert/consts.local.d.ts +55 -0
  105. package/build/convert/consts.local.d.ts.map +1 -0
  106. package/build/convert/consts.local.js +104 -0
  107. package/build/convert/consts.local.js.map +1 -0
  108. package/build/convert/helpers.d.ts.map +1 -1
  109. package/build/convert/helpers.js +1 -102
  110. package/build/convert/helpers.js.map +1 -1
  111. package/build/convert/index.d.ts +1 -0
  112. package/build/convert/index.d.ts.map +1 -1
  113. package/build/convert/index.js +1 -0
  114. package/build/convert/index.js.map +1 -1
  115. package/build/convert/types.d.ts +10 -1
  116. package/build/convert/types.d.ts.map +1 -1
  117. package/build/convert/utils.d.ts +4 -0
  118. package/build/convert/utils.d.ts.map +1 -0
  119. package/build/convert/utils.js +5 -0
  120. package/build/convert/utils.js.map +1 -0
  121. package/build/design/consts.d.ts +37 -0
  122. package/build/design/consts.d.ts.map +1 -1
  123. package/build/design/consts.js +44 -8
  124. package/build/design/consts.js.map +1 -1
  125. package/build/design/runtime.d.ts +2 -103
  126. package/build/design/runtime.d.ts.map +1 -1
  127. package/build/design/runtime.js +1 -44
  128. package/build/design/runtime.js.map +1 -1
  129. package/build/design/schemas.d.ts +1 -9
  130. package/build/design/schemas.d.ts.map +1 -1
  131. package/build/design/schemas.js +1 -1
  132. package/build/design/schemas.js.map +1 -1
  133. package/build/design/types.d.ts +75 -1
  134. package/build/design/types.d.ts.map +1 -1
  135. package/build/dev/schemas.d.ts.map +1 -1
  136. package/build/dev/schemas.js.map +1 -1
  137. package/build/dev/types.local.d.ts +4 -0
  138. package/build/dev/types.local.d.ts.map +1 -0
  139. package/build/dev/types.local.js +2 -0
  140. package/build/dev/types.local.js.map +1 -0
  141. package/build/integrity/consts.d.ts +0 -117
  142. package/build/integrity/consts.d.ts.map +1 -1
  143. package/build/integrity/consts.js +0 -281
  144. package/build/integrity/consts.js.map +1 -1
  145. package/build/integrity/consts.local.d.ts +5 -0
  146. package/build/integrity/consts.local.d.ts.map +1 -0
  147. package/build/integrity/consts.local.js +5 -0
  148. package/build/integrity/consts.local.js.map +1 -0
  149. package/build/integrity/index.d.ts +1 -0
  150. package/build/integrity/index.d.ts.map +1 -1
  151. package/build/integrity/index.js +1 -0
  152. package/build/integrity/index.js.map +1 -1
  153. package/build/integrity/types.d.ts +33 -1
  154. package/build/integrity/types.d.ts.map +1 -1
  155. package/build/integrity/utils.d.ts +88 -0
  156. package/build/integrity/utils.d.ts.map +1 -0
  157. package/build/integrity/utils.js +280 -0
  158. package/build/integrity/utils.js.map +1 -0
  159. package/build/integrity/verify.d.ts.map +1 -1
  160. package/build/integrity/verify.js +2 -1
  161. package/build/integrity/verify.js.map +1 -1
  162. package/build/intent/consts.local.d.ts +4 -0
  163. package/build/intent/consts.local.d.ts.map +1 -0
  164. package/build/intent/consts.local.js +3 -0
  165. package/build/intent/consts.local.js.map +1 -0
  166. package/build/intent/entrypoints.d.ts +0 -1
  167. package/build/intent/entrypoints.d.ts.map +1 -1
  168. package/build/intent/flow.d.ts.map +1 -1
  169. package/build/intent/flow.js +2 -2
  170. package/build/intent/flow.js.map +1 -1
  171. package/build/intent/types.d.ts +2 -0
  172. package/build/intent/types.d.ts.map +1 -1
  173. package/build/metadata/consts.d.ts +33 -0
  174. package/build/metadata/consts.d.ts.map +1 -1
  175. package/build/metadata/consts.js +37 -0
  176. package/build/metadata/consts.js.map +1 -1
  177. package/build/metadata/types.d.ts +1 -33
  178. package/build/metadata/types.d.ts.map +1 -1
  179. package/build/metadata/types.js +1 -38
  180. package/build/metadata/types.js.map +1 -1
  181. package/build/planning/consts.d.ts +13 -1
  182. package/build/planning/consts.d.ts.map +1 -1
  183. package/build/planning/consts.js +13 -0
  184. package/build/planning/consts.js.map +1 -1
  185. package/build/planning/index.d.ts +0 -1
  186. package/build/planning/index.d.ts.map +1 -1
  187. package/build/planning/index.js +0 -1
  188. package/build/planning/index.js.map +1 -1
  189. package/build/planning/landing.d.ts +0 -12
  190. package/build/planning/landing.d.ts.map +1 -1
  191. package/build/planning/landing.js +1 -13
  192. package/build/planning/landing.js.map +1 -1
  193. package/build/planning/schemas.d.ts +37 -0
  194. package/build/planning/schemas.d.ts.map +1 -1
  195. package/build/planning/schemas.js +173 -4
  196. package/build/planning/schemas.js.map +1 -1
  197. package/build/planning/types.d.ts +2 -2
  198. package/build/planning/types.d.ts.map +1 -1
  199. package/build/preview/consts.d.ts +3 -1
  200. package/build/preview/consts.d.ts.map +1 -1
  201. package/build/preview/consts.js +2 -0
  202. package/build/preview/consts.js.map +1 -1
  203. package/build/preview/types.d.ts +17 -2
  204. package/build/preview/types.d.ts.map +1 -1
  205. package/build/scaffold/helpers.d.ts +1 -14
  206. package/build/scaffold/helpers.d.ts.map +1 -1
  207. package/build/scaffold/helpers.js +11 -0
  208. package/build/scaffold/helpers.js.map +1 -1
  209. package/build/scaffold/types.d.ts +2 -0
  210. package/build/scaffold/types.d.ts.map +1 -1
  211. package/build/slot/consts.d.ts +7 -13
  212. package/build/slot/consts.d.ts.map +1 -1
  213. package/build/slot/consts.js +10 -36
  214. package/build/slot/consts.js.map +1 -1
  215. package/build/slot/helpers.d.ts +1 -6
  216. package/build/slot/helpers.d.ts.map +1 -1
  217. package/build/slot/helpers.js.map +1 -1
  218. package/build/slot/index.d.ts +1 -0
  219. package/build/slot/index.d.ts.map +1 -1
  220. package/build/slot/index.js +1 -0
  221. package/build/slot/index.js.map +1 -1
  222. package/build/slot/layout.d.ts +1 -57
  223. package/build/slot/layout.d.ts.map +1 -1
  224. package/build/slot/layout.js +0 -12
  225. package/build/slot/layout.js.map +1 -1
  226. package/build/slot/types.d.ts +55 -1
  227. package/build/slot/types.d.ts.map +1 -1
  228. package/build/slot/utils.d.ts +18 -0
  229. package/build/slot/utils.d.ts.map +1 -0
  230. package/build/slot/utils.js +41 -0
  231. package/build/slot/utils.js.map +1 -0
  232. package/build/topology/card.d.ts +1 -6
  233. package/build/topology/card.d.ts.map +1 -1
  234. package/build/topology/card.js +1 -3
  235. package/build/topology/card.js.map +1 -1
  236. package/build/topology/consts.local.d.ts +4 -0
  237. package/build/topology/consts.local.d.ts.map +1 -0
  238. package/build/topology/consts.local.js +4 -0
  239. package/build/topology/consts.local.js.map +1 -0
  240. package/build/topology/types.d.ts +5 -0
  241. package/build/topology/types.d.ts.map +1 -1
  242. package/package.json +13 -13
  243. package/src/agent/consts.local.ts +47 -0
  244. package/src/agent/consts.ts +61 -0
  245. package/src/agent/index.ts +1 -0
  246. package/src/agent/presentation.ts +4 -147
  247. package/src/agent/types.local.ts +1 -0
  248. package/src/agent/types.ts +40 -0
  249. package/src/areas/consts.ts +7 -0
  250. package/src/areas/tenancy.ts +2 -38
  251. package/src/areas/types.ts +31 -0
  252. package/src/ba/types.ts +1 -1
  253. package/src/blueprint/consts.local.ts +3 -0
  254. package/src/blueprint/consts.ts +52 -0
  255. package/src/blueprint/index.ts +1 -0
  256. package/src/blueprint/types.ts +2 -72
  257. package/src/blueprint/utils.ts +20 -0
  258. package/src/branding.ts +0 -17
  259. package/src/connect/consts.ts +0 -22
  260. package/src/connect/entrypoints.ts +7 -35
  261. package/src/connect/errors.ts +75 -0
  262. package/src/connect/index.ts +1 -0
  263. package/src/connect/references.ts +4 -75
  264. package/src/connect/schemas.ts +11 -0
  265. package/src/connect/types.local.ts +5 -0
  266. package/src/connect/types.ts +124 -1
  267. package/src/connect/utils.ts +23 -0
  268. package/src/consts.ts +17 -0
  269. package/src/convert/consts.local.ts +120 -0
  270. package/src/convert/consts.ts +0 -14
  271. package/src/convert/helpers.ts +1 -119
  272. package/src/convert/index.ts +1 -0
  273. package/src/convert/types.ts +11 -5
  274. package/src/convert/utils.ts +8 -0
  275. package/src/design/consts.ts +48 -0
  276. package/src/design/runtime.ts +2 -115
  277. package/src/design/schemas.ts +2 -10
  278. package/src/design/types.ts +81 -1
  279. package/src/dev/schemas.ts +1 -3
  280. package/src/dev/types.local.ts +4 -0
  281. package/src/integrity/consts.local.ts +5 -0
  282. package/src/integrity/consts.ts +0 -348
  283. package/src/integrity/index.ts +1 -0
  284. package/src/integrity/types.ts +34 -1
  285. package/src/integrity/utils.ts +320 -0
  286. package/src/integrity/verify.ts +2 -4
  287. package/src/intent/consts.local.ts +3 -0
  288. package/src/intent/entrypoints.ts +0 -1
  289. package/src/intent/flow.ts +2 -3
  290. package/src/intent/types.ts +3 -0
  291. package/src/metadata/consts.ts +37 -0
  292. package/src/metadata/types.ts +1 -37
  293. package/src/planning/consts.ts +15 -2
  294. package/src/planning/index.ts +0 -1
  295. package/src/planning/landing.ts +1 -14
  296. package/src/planning/schemas.ts +191 -4
  297. package/src/planning/types.ts +2 -2
  298. package/src/preview/consts.ts +2 -0
  299. package/src/preview/types.ts +19 -0
  300. package/src/scaffold/helpers.ts +1 -4
  301. package/src/scaffold/types.ts +3 -0
  302. package/src/slot/consts.ts +11 -40
  303. package/src/slot/helpers.ts +1 -6
  304. package/src/slot/index.ts +1 -0
  305. package/src/slot/layout.ts +1 -62
  306. package/src/slot/types.ts +57 -1
  307. package/src/slot/utils.ts +45 -0
  308. package/src/topology/card.ts +2 -9
  309. package/src/topology/consts.local.ts +6 -0
  310. package/src/topology/types.ts +6 -0
  311. package/tests/branding.spec.ts +2 -2
  312. package/tests/connect-convert.spec.ts +21 -1
  313. package/tests/connect-errors.spec.ts +34 -1
  314. package/tests/convert.spec.ts +2 -3
  315. package/tests/error-status.spec.ts +7 -1
  316. package/tests/planning.spec.ts +3 -18
  317. package/tests/presentation.spec.ts +2 -4
  318. package/build/planning/flows.d.ts +0 -34
  319. package/build/planning/flows.d.ts.map +0 -1
  320. package/build/planning/flows.js +0 -174
  321. package/build/planning/flows.js.map +0 -1
  322. package/src/planning/flows.ts +0 -204
package/README.md CHANGED
@@ -21,7 +21,7 @@ filesystem, no inference SDK. It is safe to import from a browser bundle.
21
21
  ## Installation
22
22
 
23
23
  ```bash
24
- bun add @owlmeans/viable-common@^0.0.43
24
+ bun add @owlmeans/viable-common@^0.0.44
25
25
  ```
26
26
 
27
27
  ## Rules worth knowing before you change something
@@ -39,7 +39,7 @@ means "inherit" has no other spelling. `tests/convert.spec.ts` walks every expor
39
39
  both faults, and for draft-04 tuple `items`.
40
40
 
41
41
  **A field that crosses a version skew carries no `enum`.** A connector is installed with
42
- `npx -y @owlmeans/viable-mcp@^0.1.18-rc.41` and talks to a separately deployed platform, so an executor kind it
42
+ `npx -y @owlmeans/viable-mcp@^0.1.18-rc.42` and talks to a separately deployed platform, so an executor kind it
43
43
  sends must remain an unused capability on an older platform rather than a refused session.
44
44
 
45
45
  **A ceiling exists once.** The inquiry answer cap here equals `DEFAULT_INQUIRY_ANSWER_CHARS` in
@@ -59,7 +59,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
59
59
  your project's skill store (`.agents/skills/`):
60
60
 
61
61
  ```sh
62
- npx @owlmeans/agent-skills@^0.1.18-rc.46
62
+ npx @owlmeans/agent-skills@^0.1.18-rc.48
63
63
  ```
64
64
 
65
65
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/viable-common",
4
- "version": "0.0.43",
5
- "generatedAt": "2026-10-04T01:01:54.404Z",
4
+ "version": "0.0.44",
5
+ "generatedAt": "2026-10-05T08:32:19.128Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -6,7 +6,7 @@ description: Shared, runtime-free taxonomy for presenting OwlMeans Viable agent
6
6
 
7
7
  # Agent output presentation
8
8
 
9
- **Install:** `"@owlmeans/viable-common": "^0.0.43"` in `dependencies`
9
+ **Install:** `"@owlmeans/viable-common": "^0.0.44"` in `dependencies`
10
10
 
11
11
  `@owlmeans/viable-common`'s `agent/presentation.ts` owns the browser-safe vocabulary for agent
12
12
  output. Keep the server and every client on `classifyAgentMessage()`; consumers may refine a
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/viable-common
9
9
 
10
10
  **Layer:** Cross-cutting domain (contracts only)
11
- **Install:** `"@owlmeans/viable-common": "^0.0.43"` in `dependencies`
11
+ **Install:** `"@owlmeans/viable-common": "^0.0.44"` in `dependencies`
12
12
  **Subpaths:** `.` · `./slot` · `./connect` · `./convert` · `./integrity` · `./intent` — the barrel
13
13
  re-exports every subpath except `./intent`.
14
14
  **Runtime-free:** no `@langchain/*`, no filesystem, no Ajv at run time (a devDependency, for the
@@ -31,9 +31,9 @@ execution state and card fields name.
31
31
 
32
32
  | Subpath | What it declares |
33
33
  |---|---|
34
- | `.` (barrel) | The planning module (`VIABLE_*_TYPE`, `VIABLE_TYPE_SCHEMAS`, `VIABLE_FLOW_SCHEMAS`, `ViableStoryStatus`/`ViableProjectStatus` and their transitions, `ViableSpecCategory`, `ViableRelationship`, `ViableChannel`, `ViableProjectCard`/`ViableStoryCard`, the card helpers, the landing sentence helpers, the `Project*` refusals); `SlotMetadata` and the three metadata vocabularies (`metadataConfigs`, `metadataLists`, `metadataSecrets`), `BRANDING_ENV_KEYS` / `brandingEnv`; `ProjectArea` / `AREA_PATHS` / `AREA_ACCESS` / `AREA_TIER`, `ADMIN_PERMISSION` / `OPERATOR_PERMISSION`; the tenancy contract (`ProjectTenancy`, `ViableTenancyDecision`, `NO_TENANCY`, `tenancyOf`, `tenantedArea`, `TENANCY_QUOTE_MAX`); `ModelRole` and the viable `ExecutionState`; the `ViableSkill` / `ViablePersona` enums; the `Blueprint` layer types, `BlueprintRef` / `BlueprintPatch`, `BlueprintCase` / `GameKind` / `WorkKind`, `CASE_QUOTE_MAX`, `DEFAULT_BLUEPRINT_ID` / `BLUEPRINT_META_KEY`, `landingGatePreferenceOf`; the target topology (`TopologyDescriptor`, `LAYOUT_TOPOLOGIES`, `resolveTopology`, `packageForRole` — meaning in `/blueprints`); the BA shapes (`mergeConnectingStories`), the dev (`AccessBlock`, `AccessLevel`, `PermissionDefault`), UX, design and scaffold shapes and their schemas, `StoryDesignPort`; `ModerationCategory` / `ModerationSubject` / `decideModeration`; the `docs/` metadata paths; `PreviewEventType`; the agent-output taxonomy (`classifyAgentMessage`, `isAgentMessageHidden` — `/agent-presentation`) and the spectator entry types |
34
+ | `.` (barrel) | The planning module (`VIABLE_*_TYPE`, `VIABLE_TYPE_SCHEMAS`, `VIABLE_FLOW_SCHEMAS`, `ViableStoryStatus`/`ViableProjectStatus` and their transitions, `ViableSpecCategory`, `ViableRelationship`, `ViableChannel`, `ViableProjectCard`/`ViableStoryCard`, the card helpers, the landing sentence helpers, the `Project*` refusals); `SlotMetadata` and the three metadata vocabularies (`metadataConfigs`, `metadataLists`, `metadataSecrets`), `BRANDING_ENV_KEYS` / `brandingEnv`; `ProjectArea` / `AREA_PATHS` / `AREA_ACCESS` / `AREA_TIER`, `ADMIN_PERMISSION` / `OPERATOR_PERMISSION`; the tenancy contract (`ProjectTenancy`, `ViableTenancyDecision`, `NO_TENANCY`, `tenancyOf`, `tenantedArea`, `TENANCY_QUOTE_MAX`); `ModelRole` and the viable `ExecutionState`; the `ViableSkill` / `ViablePersona` enums; the `Blueprint` layer types, `BlueprintRef` / `BlueprintPatch`, `BlueprintCase` / `GameKind` / `WorkKind`, `CASE_QUOTE_MAX`, `DEFAULT_BLUEPRINT_ID` / `BLUEPRINT_META_KEY`, `landingGatePreferenceOf`; the target topology (`TopologyDescriptor`, `LAYOUT_TOPOLOGIES`, `resolveTopology`, `packageForRole` — meaning in `/blueprints`); the BA shapes (`mergeConnectingStories`), the dev (`AccessBlock`, `AccessLevel`, `PermissionDefault`), UX, design and scaffold shapes and their schemas, `StoryDesignPort`; `ModerationCategory` / `ModerationSubject` / `decideModeration`; the `docs/` metadata paths; `PreviewEventType` (error kinds plus `Analytics` — an analytics event a target's web posted through the preview reporter's channel; the target-side plugins live in `@owlmeans/viable-log`) and the `OwlMeansAnalyticsPayload` shape; the agent-output taxonomy (`classifyAgentMessage`, `isAgentMessageHidden` — `/agent-presentation`) and the spectator entry types |
35
35
  | `./slot` | `SlotCommandType` and the `SlotFileCommand` / `SlotShellCommand` / `SlotGitCommand` / `SlotDatabaseCommand` sets; `SlotDatabaseInfo`, `SlotDatabaseQueryArgs` / `SlotDatabaseQueryResult`, `DATABASE_READ_LIMITS`; the per-command deadlines and timeouts (`commandDeadline`, `commandTimeout`), `SubProject`, `LAYOUTS` / `ROLE_DIRS` / `subprojectDirOf`, `WorkloadKind`, the target ports and process markers, `slotOrigin` / `targetRedirectUrisForOrigin` |
36
- | `./connect` | `ConnectTarget`, `ConnectLlm`, `ConnectHarness`, `ConnectExecutor`, `ConnectOpKind`, `ConnectProjectStatus`, `ConnectStoryStatus`, `ConnectPipelineState`, `ConnectWaitReason`, `ConnectProjectBranding` / `ConnectProjectBrandingSave`, the planning-kit views (`PlanningKitView`, `ConnectKitDescribe`, `ConnectKitApplyBody`, `ConnectKitApplyResult` and their `*Schema`s), `ModelTier` + `tierOfRole`/`clampTier`, `ModelTask*`, `InquiryPayload` + `ConnectInquiryKind`, the session and domain-status views, the `Connect*` error family, `connectProtocols(opts)` and every `*Schema` behind them |
36
+ | `./connect` | `ConnectTarget`, `ConnectLlm`, `ConnectHarness`, `ConnectExecutor`, `ConnectOpKind`, `ConnectProjectStatus`, `ConnectStoryStatus`, `ConnectPipelineState`, `ConnectWaitReason`, `ConnectProjectBranding` / `ConnectProjectBrandingSave`, the planning-kit views (`PlanningKitView`, `ConnectKitDescribe`, `ConnectKitApplyBody`, `ConnectKitApplyResult` and their `*Schema`s), `ModelTier` + `tierOfRole`/`clampTier`, `ModelTask*`, `InquiryPayload` + `ConnectInquiryKind`, the session and domain-status views, the convert bodies (`ConnectConvertCreateBody`, `ConnectConvertStartBody`, `ConnectConvertProceedBody`), the `Connect*` error family with `ConnectConfirmation` / `ConnectConfirmationAction`, `connectProtocols(opts)` and every `*Schema` behind them |
37
37
  | `./convert` | `ConversionStage`/`Status`/`Decision` and the `stageAfter`/`decisionFor`/`canEnter` transitions, `OriginKind`/`OriginShape`/`OriginState`, `StackId` + `STACK_FAMILY`, `ArchitectureCase`, `ConvertibilityVerdict`/`ConvertibilityReason`, the census classifiers (`fileClassOf`, `sizeClassOf`, `entropyClassOf`, `binaryByExtension`), the `docs/conversion/` paths, `CONVERTED_ORIGIN_DIR`, `SOURCE_LIST_EXCLUSIONS`, `CENSUS_SKIP_DIRS`, `RELOCATE_ALWAYS_KEEP`, and the model-answer schemas the conversion asks with |
38
38
  | `./integrity` | `TargetLayout` + `TARGET_LAYOUTS`, `detectTargetLayout`, `verifyTargetShape`, `TARGET_INTEGRITY_FILES`, `TARGET_PROTECTED_FILES`, `isLegacyLayout`, `targetPackageName` |
39
39
  | `./intent` | `intent` (the four aliases), `makeIntentProtocols(opts?)`, `intentFlow` + `IntentFlowStep` + `INTENT_PAYLOAD_REF`, `IntentStashBodySchema` / `IntentPickupBodySchema`, the `INTENT_*` constants, `IntentDraft`, `IntentExpired` (404) / `IntentThrottled` (429) |
@@ -262,6 +262,10 @@ DEPLOYMENT's parts are injected: the guard alias, the ownership gate, and the pa
262
262
  `ConnectProjectStatus.project` flattens the project card into a parent agent's names (`name` =
263
263
  title, `alias` = code, the three brief bodies) plus `status` and `intrinsic`;
264
264
  `ConnectConfirmBody` carries the three brief parts including `designSystem`.
265
+ - `convert.start` and `convert.proceed` carry `confirm?: boolean` (`ConnectConvertStartBody(Schema)`
266
+ — the start's whole body — and `ConnectConvertProceedBody(Schema)`): a PERSON agreed to what the
267
+ step costs. The platform refuses a step that would use the plan's conversion or spend credits
268
+ without it (`ConnectConfirmationRequired`); a `null` is "not confirmed", never a refused body.
265
269
  - Branding routes hang under `base` (guard + ownership gate, no paid gate). The save body
266
270
  (`ConnectProjectBrandingSaveSchema`) is a PATCH of strings with structural bounds only
267
271
  (`CONNECT_BRANDING_*_MAX`, each equal to its platform twin); value acceptability is the
@@ -404,16 +408,23 @@ silently at the smaller; never introduce a local cap.
404
408
 
405
409
  `ConnectError` and its family (`ConnectSessionNotFound`, `ConnectSessionGone`, `ConnectOpTimeout`,
406
410
  `ConnectOpRefused`, `LocalSlotUnsupported`, `ConnectOpUnknown`, `ConnectOutOfCredits`,
407
- `ConnectConsentRequired`) are `ResilientError` classes with `viable-connect:` markers. The two
408
- refusals a connector phrases for a person pack their fields into the message (only `type` and
409
- `message` survive a marshal), are built with `static encode(...)` and rebuilt in
410
- `finalizeUnmarshal()`:
411
+ `ConnectConsentRequired`, `ConnectConfirmationRequired`) are `ResilientError` classes with
412
+ `viable-connect:` markers. The three refusals a connector phrases for a person pack their fields
413
+ into the message (only `type` and `message` survive a marshal), are built with `static encode(...)`
414
+ and rebuilt in `finalizeUnmarshal()`:
411
415
 
412
416
  - `ConnectOutOfCredits` — `out-of-credits:<gate>:<requiredUsd>:<balanceUsd>:<encodeURIComponent(topUpUrl)>`;
413
417
  - `ConnectConsentRequired` — `consent-required:<gate>:<deadline epoch ms | 0>:<encodeURIComponent(consentUrl)>`
414
418
  (`0` = unknown; epoch ms and the URL last because ISO dates and URLs contain colons). It is the
415
419
  connector's face of the EU spend consent (`PerformanceConsentRequired` on the web, `/payment`):
416
- only a PERSON gives it, in the browser at `consentUrl`.
420
+ only a PERSON gives it, in the browser at `consentUrl`;
421
+ - `ConnectConfirmationRequired` — `confirmation-required:<action>:<cap>:<spent>:<estimate>:<fromAllowance>:<fromCreditLimits>:<moneyUsd>`,
422
+ `encode(fields: ConnectConfirmation)` and its inverse `decode(packed)` (an unreadable number reads
423
+ back as `0`, never `NaN`). A conversion verb (`action`: `convert-start` / `convert-proceed`) would
424
+ use the plan's conversion or spend credits: `cap` and `spent` are the conversion limit and what the
425
+ conversion used of it (`0` with no plan unit), `estimate` the stage's, split into `fromAllowance`
426
+ and `fromCreditLimits` (credits) and `moneyUsd` (topped-up credits, the only money figure). A person
427
+ agrees in the CONVERSATION and the caller repeats the call with `confirm: true`.
417
428
 
418
429
  `ConnectSessionGone` is registered FATAL on the agent side: the step fails as an OUTCOME, so the
419
430
  run row records where it stopped and `pipeline.resume` picks it up when a connector returns.
@@ -432,7 +443,7 @@ refuses an exported class whose status was not decided:
432
443
  | Status | Classes |
433
444
  |---|---|
434
445
  | 402 | `ConnectOutOfCredits` |
435
- | 428 | `ConnectConsentRequired` |
446
+ | 428 | `ConnectConsentRequired`, `ConnectConfirmationRequired` |
436
447
  | 404 | `ProjectNotFound`, `ProjectStoryNotFound`, `ConnectSessionNotFound`, `ConnectOpUnknown` |
437
448
  | 409 | `ProjectAgentOccupied`, `ProjectStoryMissconfigured`, `ConnectSessionGone` (no connector attached), `LocalSlotUnsupported` |
438
449
  | 422 | `ConnectOpRefused` |
@@ -453,10 +464,10 @@ the manager's `useErrorPhrase` read the same substrings. A marker change changes
453
464
  | `access-schema.spec.ts` | the model-facing access schema: model keys only, byte-identical |
454
465
  | `scaffold.spec.ts` | old- and new-shape plans passing the schema and slot, `null` optionals, no `minItems` |
455
466
  | `blueprint.spec.ts` · `branding.spec.ts` | `landingGatePreferenceOf` defaults · the build env and metadata vocabulary |
456
- | `connect-entrypoints.spec.ts` · `connect-convert.spec.ts` | every route's method and path, aliases = `connectRef`, the paid gate on the delegated session alone, no socket or story route, branding body, the kit routes and their closed shapes · conversion routes, an unknown executor kind accepted |
467
+ | `connect-entrypoints.spec.ts` · `connect-convert.spec.ts` | every route's method and path, aliases = `connectRef`, the paid gate on the delegated session alone, no socket or story route, branding body, the kit routes and their closed shapes · conversion routes, the start's body and both verbs' `confirm`, an unknown executor kind accepted |
457
468
  | `convert.spec.ts` | the three structural walks over the barrel, nullable enums under Ajv, census classifiers, stage transitions |
458
469
  | `design.spec.ts` | the design aggregate, staleness ranking, schema refusals, `userStoryOfDesign` |
459
- | `error-status.spec.ts` · `connect-errors.spec.ts` | declared statuses through a marshal · packed refusal fields fresh and after a round trip |
470
+ | `error-status.spec.ts` · `connect-errors.spec.ts` | declared statuses through a marshal · packed refusal fields fresh and after a round trip, the confirmation's `decode` |
460
471
  | `intent.spec.ts` | the four declarations without guards, schema cases incl. crafted refs, the flow walk and `suspendFlow` payload, error statuses |
461
472
  | `presentation.spec.ts` | the agent-output classifier (`/agent-presentation`) |
462
473
 
@@ -0,0 +1,58 @@
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 declare enum AgentMessageCategory {
9
+ Code = "code",
10
+ Diff = "diff",
11
+ Structured = "structured",
12
+ Markdown = "markdown",
13
+ Plain = "plain"
14
+ }
15
+ export declare enum AgentCodeLanguage {
16
+ ReactTsx = "react-tsx",
17
+ Css = "css",
18
+ TypeScript = "typescript",
19
+ Json = "json",
20
+ Other = "other"
21
+ }
22
+ /** A semantic shape that the manager can render as a purpose-built card. */
23
+ export declare enum AgentStructuredKind {
24
+ ToolCalls = "tool-calls",
25
+ ArtifactSelection = "artifact-selection",
26
+ EntitySelection = "entity-selection",
27
+ StoryPlan = "story-plan",
28
+ ScreenPlan = "screen-plan",
29
+ ComponentPlan = "component-plan",
30
+ TransitionPlan = "transition-plan",
31
+ EntrypointSelection = "entrypoint-selection",
32
+ AccessPolicy = "access-policy",
33
+ ScaffoldPlan = "scaffold-plan",
34
+ RuntimeDecision = "runtime-decision",
35
+ CandidateRanking = "candidate-ranking",
36
+ Decision = "decision",
37
+ GenericRecord = "generic-record",
38
+ GenericList = "generic-list",
39
+ GenericValue = "generic-value"
40
+ }
41
+ export declare enum AgentMarkdownKind {
42
+ Specification = "specification",
43
+ DesignDocument = "design-document",
44
+ Documentation = "documentation"
45
+ }
46
+ /** The family of specialist that produced an output, not an authorization role. */
47
+ export declare enum AgentMessageRole {
48
+ Technical = "technical",
49
+ Analytical = "analytical",
50
+ Product = "product",
51
+ Ux = "ux",
52
+ VisualDesign = "visual-design",
53
+ Architect = "architect",
54
+ Developer = "developer",
55
+ Repair = "repair",
56
+ Orchestrator = "orchestrator"
57
+ }
58
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/agent/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,4EAA4E;AAC5E,oBAAY,mBAAmB;IAC7B,SAAS,eAAe;IACxB,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IACpC,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,mBAAmB,yBAAyB;IAC5C,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;CAC/B;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,cAAc,oBAAoB;IAClC,aAAa,kBAAkB;CAChC;AAED,mFAAmF;AACnF,oBAAY,gBAAgB;IAC1B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B"}
@@ -0,0 +1,63 @@
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
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/agent/consts.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,mBAAmB;IAC7B,+CAAwB,CAAA;IACxB,+DAAwC,CAAA;IACxC,2DAAoC,CAAA;IACpC,+CAAwB,CAAA;IACxB,iDAA0B,CAAA;IAC1B,uDAAgC,CAAA;IAChC,yDAAkC,CAAA;IAClC,mEAA4C,CAAA;IAC5C,qDAA8B,CAAA;IAC9B,qDAA8B,CAAA;IAC9B,2DAAoC,CAAA;IACpC,6DAAsC,CAAA;IACtC,4CAAqB,CAAA;IACrB,uDAAgC,CAAA;IAChC,mDAA4B,CAAA;IAC5B,qDAA8B,CAAA;AAChC,CAAC,EAjBW,mBAAmB,KAAnB,mBAAmB,QAiB9B;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,uDAAkC,CAAA;IAClC,oDAA+B,CAAA;AACjC,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED,mFAAmF;AACnF,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;IACzB,uCAAmB,CAAA;IACnB,6BAAS,CAAA;IACT,kDAA8B,CAAA;IAC9B,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,iDAA6B,CAAA;AAC/B,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B"}
@@ -0,0 +1,21 @@
1
+ import { AgentMarkdownKind, AgentStructuredKind } from './consts.js';
2
+ export declare const documentActions: Record<string, AgentMarkdownKind>;
3
+ export declare const codeActions: Set<string>;
4
+ /**
5
+ * The model's schema makes the final output self-describing; while it streams, the helper action
6
+ * gives the client the same semantic cue before a complete JSON value exists.
7
+ */
8
+ export declare const structuredActions: Record<string, AgentStructuredKind>;
9
+ /**
10
+ * Classifies known model output by source AND shape. The `value` comes from a caller's JSON
11
+ * parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
12
+ */
13
+ /**
14
+ * Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
15
+ * lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
16
+ * are file/shell operations, not model-schema output, so they always render as ToolCalls even
17
+ * when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
18
+ * exactly like an ArtifactSelection.
19
+ */
20
+ export declare const agentLoopActions: Set<string>;
21
+ //# sourceMappingURL=consts.local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/agent/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEpE,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAO7D,CAAA;AAED,eAAO,MAAM,WAAW,aAAuD,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAajE,CAAA;AAED;;;GAGG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,aAG3B,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { AgentMarkdownKind, AgentStructuredKind } from './consts.js';
2
+ export const documentActions = {
3
+ 'write-specification': AgentMarkdownKind.Specification,
4
+ 'summarize-specification': AgentMarkdownKind.Specification,
5
+ 'write-design-concept': AgentMarkdownKind.DesignDocument,
6
+ 'describe-ui-component': AgentMarkdownKind.DesignDocument,
7
+ 'describe-ui-screen': AgentMarkdownKind.DesignDocument,
8
+ 'describe-ui-layout': AgentMarkdownKind.DesignDocument,
9
+ };
10
+ export const codeActions = new Set(['code', 'update-code', 'update-code-full']);
11
+ /**
12
+ * The model's schema makes the final output self-describing; while it streams, the helper action
13
+ * gives the client the same semantic cue before a complete JSON value exists.
14
+ */
15
+ export const structuredActions = {
16
+ 'choose-files-for-fix': AgentStructuredKind.ArtifactSelection,
17
+ 'list-files-to-fix': AgentStructuredKind.ArtifactSelection,
18
+ 'extract-user-stories-from-spec': AgentStructuredKind.StoryPlan,
19
+ 'derive-connecting-stories': AgentStructuredKind.StoryPlan,
20
+ 'derive-area-scaffold-stories': AgentStructuredKind.StoryPlan,
21
+ 'describe-ux-story-transitions': AgentStructuredKind.TransitionPlan,
22
+ 'find-entrypoint-for-screen': AgentStructuredKind.EntrypointSelection,
23
+ 'describe-api-access': AgentStructuredKind.AccessPolicy,
24
+ 'describe-screen-access': AgentStructuredKind.AccessPolicy,
25
+ 'plan-scaffold': AgentStructuredKind.ScaffoldPlan,
26
+ 'runtime-gate': AgentStructuredKind.RuntimeDecision,
27
+ 'detect-story-with-home-screen': AgentStructuredKind.CandidateRanking,
28
+ };
29
+ /**
30
+ * Classifies known model output by source AND shape. The `value` comes from a caller's JSON
31
+ * parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
32
+ */
33
+ /**
34
+ * Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
35
+ * lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
36
+ * are file/shell operations, not model-schema output, so they always render as ToolCalls even
37
+ * when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
38
+ * exactly like an ArtifactSelection.
39
+ */
40
+ export const agentLoopActions = new Set([
41
+ 'coding-agent-ask', 'arbitrary-modification', 'fix-agent', 'architect', 'declaration-lookup',
42
+ 'source-extract',
43
+ ]);
44
+ //# sourceMappingURL=consts.local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/agent/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,qBAAqB,EAAE,iBAAiB,CAAC,aAAa;IACtD,yBAAyB,EAAE,iBAAiB,CAAC,aAAa;IAC1D,sBAAsB,EAAE,iBAAiB,CAAC,cAAc;IACxD,uBAAuB,EAAE,iBAAiB,CAAC,cAAc;IACzD,oBAAoB,EAAE,iBAAiB,CAAC,cAAc;IACtD,oBAAoB,EAAE,iBAAiB,CAAC,cAAc;CACvD,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwC;IACpE,sBAAsB,EAAE,mBAAmB,CAAC,iBAAiB;IAC7D,mBAAmB,EAAE,mBAAmB,CAAC,iBAAiB;IAC1D,gCAAgC,EAAE,mBAAmB,CAAC,SAAS;IAC/D,2BAA2B,EAAE,mBAAmB,CAAC,SAAS;IAC1D,8BAA8B,EAAE,mBAAmB,CAAC,SAAS;IAC7D,+BAA+B,EAAE,mBAAmB,CAAC,cAAc;IACnE,4BAA4B,EAAE,mBAAmB,CAAC,mBAAmB;IACrE,qBAAqB,EAAE,mBAAmB,CAAC,YAAY;IACvD,wBAAwB,EAAE,mBAAmB,CAAC,YAAY;IAC1D,eAAe,EAAE,mBAAmB,CAAC,YAAY;IACjD,cAAc,EAAE,mBAAmB,CAAC,eAAe;IACnD,+BAA+B,EAAE,mBAAmB,CAAC,gBAAgB;CACtE,CAAA;AAED;;;GAGG;AACH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IACtC,kBAAkB,EAAE,wBAAwB,EAAE,WAAW,EAAE,WAAW,EAAE,oBAAoB;IAC5F,gBAAgB;CACjB,CAAC,CAAA"}
@@ -2,4 +2,5 @@ export type * from './types.js';
2
2
  export * from './spectator/index.js';
3
3
  export * from './memory.js';
4
4
  export * from './presentation.js';
5
+ export * from './consts.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './spectator/index.js';
2
2
  export * from './memory.js';
3
3
  export * from './presentation.js';
4
+ export * from './consts.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
@@ -1,89 +1,5 @@
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 declare enum AgentMessageCategory {
9
- Code = "code",
10
- Diff = "diff",
11
- Structured = "structured",
12
- Markdown = "markdown",
13
- Plain = "plain"
14
- }
15
- export declare enum AgentCodeLanguage {
16
- ReactTsx = "react-tsx",
17
- Css = "css",
18
- TypeScript = "typescript",
19
- Json = "json",
20
- Other = "other"
21
- }
22
- /** A semantic shape that the manager can render as a purpose-built card. */
23
- export declare enum AgentStructuredKind {
24
- ToolCalls = "tool-calls",
25
- ArtifactSelection = "artifact-selection",
26
- EntitySelection = "entity-selection",
27
- StoryPlan = "story-plan",
28
- ScreenPlan = "screen-plan",
29
- ComponentPlan = "component-plan",
30
- TransitionPlan = "transition-plan",
31
- EntrypointSelection = "entrypoint-selection",
32
- AccessPolicy = "access-policy",
33
- ScaffoldPlan = "scaffold-plan",
34
- RuntimeDecision = "runtime-decision",
35
- CandidateRanking = "candidate-ranking",
36
- Decision = "decision",
37
- GenericRecord = "generic-record",
38
- GenericList = "generic-list",
39
- GenericValue = "generic-value"
40
- }
41
- export declare enum AgentMarkdownKind {
42
- Specification = "specification",
43
- DesignDocument = "design-document",
44
- Documentation = "documentation"
45
- }
46
- /** The family of specialist that produced an output, not an authorization role. */
47
- export declare enum AgentMessageRole {
48
- Technical = "technical",
49
- Analytical = "analytical",
50
- Product = "product",
51
- Ux = "ux",
52
- VisualDesign = "visual-design",
53
- Architect = "architect",
54
- Developer = "developer",
55
- Repair = "repair",
56
- Orchestrator = "orchestrator"
57
- }
58
- export interface AgentCodePresentation {
59
- category: AgentMessageCategory.Code | AgentMessageCategory.Diff;
60
- language: AgentCodeLanguage;
61
- role: AgentMessageRole;
62
- }
63
- export interface AgentStructuredPresentation {
64
- category: AgentMessageCategory.Structured;
65
- structure: AgentStructuredKind;
66
- role: AgentMessageRole;
67
- }
68
- export interface AgentMarkdownPresentation {
69
- category: AgentMessageCategory.Markdown;
70
- document: AgentMarkdownKind;
71
- role: AgentMessageRole;
72
- }
73
- export interface AgentPlainPresentation {
74
- category: AgentMessageCategory.Plain;
75
- role: AgentMessageRole;
76
- }
77
- export type AgentMessagePresentation = AgentCodePresentation | AgentStructuredPresentation | AgentMarkdownPresentation | AgentPlainPresentation;
78
- /** The attribution and content available to either side of a thinking event. */
79
- export interface AgentMessageClassificationInput {
80
- agent?: string;
81
- helper?: string;
82
- action?: string;
83
- outputType?: string;
84
- text?: string;
85
- value?: unknown;
86
- }
1
+ import { AgentCodeLanguage, AgentMessageRole } from './consts.js';
2
+ import type { AgentMessageClassificationInput, AgentMessagePresentation } from './types.js';
87
3
  /**
88
4
  * Source extraction is an internal context-reduction pass. Its terminal tool call contains only
89
5
  * line ranges, which are useful to the coder but add no useful information to a person's journal.
@@ -1 +1 @@
1
- {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/agent/presentation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,4EAA4E;AAC5E,oBAAY,mBAAmB;IAC7B,SAAS,eAAe;IACxB,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IACpC,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,mBAAmB,yBAAyB;IAC5C,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;CAC/B;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,cAAc,oBAAoB;IAClC,aAAa,kBAAkB;CAChC;AAED,mFAAmF;AACnF,oBAAY,gBAAgB;IAC1B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAA;IAC/D,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAA;IACzC,SAAS,EAAE,mBAAmB,CAAA;IAC9B,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,oBAAoB,CAAC,KAAK,CAAA;IACpC,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,MAAM,MAAM,wBAAwB,GAChC,qBAAqB,GACrB,2BAA2B,GAC3B,yBAAyB,GACzB,sBAAsB,CAAA;AAE1B,gFAAgF;AAChF,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AA8CD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,OACxC,CAAA;AAEtC,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,UAAW,+BAA+B,KAAG,gBAgB3E,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,OAIvD,CAAA;AAkDD,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAGlD,CAAA;AAaD,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAmBlD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,OACuD,CAAA;AA8BpG,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,wBAsC7E,CAAA"}
1
+ {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/agent/presentation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA2C,gBAAgB,EAAuB,MAAM,aAAa,CAAA;AAE/H,OAAO,KAAK,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAc3F;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,OACxC,CAAA;AAEtC,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,UAAW,+BAA+B,KAAG,gBAgB3E,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,OAIvD,CAAA;AAkDD,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAGlD,CAAA;AAaD,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAmBlD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,OACuD,CAAA;AAcpG,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,wBAsC7E,CAAA"}
@@ -1,92 +1,5 @@
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
- };
1
+ import { agentLoopActions, codeActions, documentActions, structuredActions } from './consts.local.js';
2
+ import { AgentCodeLanguage, AgentMarkdownKind, AgentMessageCategory, AgentMessageRole, AgentStructuredKind } from './consts.js';
90
3
  const asRecord = (value) => value != null && typeof value === 'object' && !Array.isArray(value)
91
4
  ? value
92
5
  : undefined;
@@ -241,21 +154,6 @@ const markdownKindOf = (text) => {
241
154
  const listItems = text.match(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/gm)?.length ?? 0;
242
155
  return listItems >= 2 ? AgentMarkdownKind.Documentation : undefined;
243
156
  };
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
157
  const isGenericStructure = (kind) => kind == null || kind === AgentStructuredKind.GenericRecord || kind === AgentStructuredKind.GenericList ||
260
158
  kind === AgentStructuredKind.GenericValue;
261
159
  export const classifyAgentMessage = (input) => {