@wildo-ai/dev-companion 1.1.5 → 1.1.6

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 (596) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  3. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +0 -1
  4. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
  5. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +0 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  8. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +8 -0
  9. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.js +6 -0
  11. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  12. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts +21 -0
  13. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts.map +1 -0
  14. package/dist/esm/brand/services/brand-propagation.companion.utils.js +33 -0
  15. package/dist/esm/brand/services/brand-propagation.companion.utils.js.map +1 -0
  16. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +69 -1
  17. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  18. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +84 -3
  19. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  20. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +8 -4
  21. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  22. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +9 -5
  23. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  24. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +1 -1
  25. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -1
  26. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +4 -0
  27. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -1
  28. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +25 -3
  29. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -1
  30. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +159 -11
  31. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +424 -41
  33. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +333 -60
  35. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  36. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +1029 -185
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +8 -2
  39. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +8 -2
  41. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts +20 -0
  43. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts.map +1 -0
  44. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js +29 -0
  45. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js.map +1 -0
  46. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +11 -0
  47. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +60 -7
  49. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  50. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +5 -4
  51. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  52. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +13 -4
  53. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  54. package/dist/esm/companion-api/companion-api.schemas.d.ts +193 -2
  55. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  56. package/dist/esm/companion-api/companion-api.schemas.js +20 -1
  57. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  58. package/dist/esm/companion-api/companion-error-guidance.models.d.ts +25 -0
  59. package/dist/esm/companion-api/companion-error-guidance.models.d.ts.map +1 -0
  60. package/dist/esm/companion-api/companion-error-guidance.models.js +26 -0
  61. package/dist/esm/companion-api/companion-error-guidance.models.js.map +1 -0
  62. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts +44 -0
  63. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts.map +1 -0
  64. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js +111 -0
  65. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js.map +1 -0
  66. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +6 -14
  67. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -1
  68. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +6 -14
  69. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -1
  70. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts +12 -0
  71. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts.map +1 -0
  72. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js +20 -0
  73. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js.map +1 -0
  74. package/dist/esm/companion-api/controllers/companion.controller.d.ts +104 -14
  75. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  76. package/dist/esm/companion-api/controllers/companion.controller.js +516 -122
  77. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  78. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +6 -38
  80. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  81. package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
  82. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  83. package/dist/esm/core/config/primary-language.companion.utils.js +19 -0
  84. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  85. package/dist/esm/core/context/companion-package-loaders.companion.js +1 -39
  86. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  87. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  88. package/dist/esm/core/inject/models/container.js +4 -0
  89. package/dist/esm/core/inject/models/container.js.map +1 -1
  90. package/dist/esm/core/inject/models/service-types.d.ts +4 -0
  91. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  92. package/dist/esm/core/inject/models/service-types.js +4 -0
  93. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  94. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  95. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +16 -0
  96. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
  97. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +1 -1
  98. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  99. package/dist/esm/core/introspection/models/companion-introspection.models.js +6 -0
  100. package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
  101. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts +41 -0
  102. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts.map +1 -0
  103. package/dist/esm/core/introspection/resources/application-secrets.companion.js +155 -0
  104. package/dist/esm/core/introspection/resources/application-secrets.companion.js.map +1 -0
  105. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +76 -0
  106. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -0
  107. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +197 -0
  108. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -0
  109. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +47 -0
  110. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -0
  111. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +199 -0
  112. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -0
  113. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +42 -0
  114. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  115. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +173 -22
  116. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  117. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +78 -90
  118. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +288 -25
  120. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  121. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +22 -36
  122. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +49 -13
  124. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
  125. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +1 -1
  126. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  127. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +10 -15
  128. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
  129. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +2 -0
  130. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  131. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts +4 -0
  133. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.js.map +1 -1
  135. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +77 -9
  137. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +45 -3
  139. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +8 -1
  141. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  142. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +3 -2
  143. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  144. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +8 -3
  145. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
  146. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +30 -1
  147. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  148. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +128 -20
  149. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  150. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +13 -0
  151. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  152. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +21 -17
  153. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  154. package/dist/esm/core/runtime/companion-endpoint-record.d.ts +8 -0
  155. package/dist/esm/core/runtime/companion-endpoint-record.d.ts.map +1 -0
  156. package/dist/esm/core/runtime/companion-endpoint-record.js +23 -0
  157. package/dist/esm/core/runtime/companion-endpoint-record.js.map +1 -0
  158. package/dist/esm/core/runtime/companion-env-file.d.ts +30 -0
  159. package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -0
  160. package/dist/esm/core/runtime/companion-env-file.js +53 -0
  161. package/dist/esm/core/runtime/companion-env-file.js.map +1 -0
  162. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +5 -0
  163. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  164. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +11 -0
  165. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  166. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts +56 -0
  167. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts.map +1 -0
  168. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js +97 -0
  169. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js.map +1 -0
  170. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +43 -3
  171. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  172. package/dist/esm/core/runtime/services/start-companion-application.service.js +127 -22
  173. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  174. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +11 -1
  175. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  176. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +42 -19
  177. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  178. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/resource-specification-context.factory.js +10 -1
  180. package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
  181. package/dist/esm/core/traceability/companion-traceability.models.d.ts +1 -7
  182. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  183. package/dist/esm/core/traceability/companion-traceability.models.js +3 -5
  184. package/dist/esm/core/traceability/companion-traceability.models.js.map +1 -1
  185. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
  186. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +15 -14
  187. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
  188. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +0 -23
  189. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
  190. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +251 -50
  191. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
  192. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  193. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +0 -2
  194. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  195. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  196. package/dist/esm/deliberations/services/deliberation.companion.service.js +3 -2
  197. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  198. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  199. package/dist/esm/email/models/email-template.actors-system.definitions.js +0 -1
  200. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  201. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -3
  202. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  203. package/dist/esm/email/services/email-template.companion.service.js +53 -255
  204. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  205. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts +12 -0
  206. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  207. package/dist/esm/email/utils/email-labels-file-source.utils.js +62 -3
  208. package/dist/esm/email/utils/email-labels-file-source.utils.js.map +1 -1
  209. package/dist/esm/email/utils/email-labels-tree.utils.d.ts +52 -0
  210. package/dist/esm/email/utils/email-labels-tree.utils.d.ts.map +1 -0
  211. package/dist/esm/email/utils/email-labels-tree.utils.js +261 -0
  212. package/dist/esm/email/utils/email-labels-tree.utils.js.map +1 -0
  213. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +2 -0
  214. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -1
  215. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +21 -1
  216. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -1
  217. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
  218. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  219. package/dist/esm/executions/services/companion-executions.companion.service.js +187 -46
  220. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  221. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  222. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +0 -1
  223. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  224. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  225. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +0 -1
  226. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  227. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  228. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +10 -0
  229. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  230. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +1 -8
  231. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  232. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +2 -9
  233. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
  234. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -0
  235. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  236. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +3 -1
  237. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
  238. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts +32 -0
  239. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts.map +1 -0
  240. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js +32 -0
  241. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js.map +1 -0
  242. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +0 -1
  243. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  244. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +0 -1
  245. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
  246. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +0 -7
  247. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  248. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +0 -7
  249. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
  250. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +30 -4
  251. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -1
  252. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +31 -5
  253. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -1
  254. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +0 -2
  255. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  256. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +0 -2
  257. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
  258. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -0
  259. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  260. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +5 -1
  261. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
  262. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +1 -15
  263. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  264. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +1 -15
  265. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
  266. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +0 -3
  267. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  268. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +0 -3
  269. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  270. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +49 -16
  271. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  272. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +49 -16
  273. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  274. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +0 -5
  275. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  276. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +0 -5
  277. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
  278. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +3 -0
  279. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
  280. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +4 -1
  281. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
  282. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +7 -1
  283. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +8 -2
  285. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
  286. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +1 -0
  287. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +2 -1
  289. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
  290. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +1 -0
  291. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +2 -1
  293. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
  294. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts +12 -0
  295. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts.map +1 -0
  296. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js +12 -0
  297. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js.map +1 -0
  298. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -0
  299. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +2 -1
  301. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
  302. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +10 -0
  303. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +11 -1
  305. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -1
  306. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +8 -0
  307. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +9 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +3 -0
  311. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +4 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  314. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +2 -1
  315. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +3 -2
  317. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  318. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +6 -0
  319. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +7 -1
  321. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
  322. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +1 -0
  323. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +2 -1
  325. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
  326. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +0 -2
  327. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/progression_milestone_tracker.en.js +0 -2
  329. package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
  330. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +1 -0
  331. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +123 -19
  333. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
  334. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +12 -0
  336. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -1
  337. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts +25 -0
  338. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts.map +1 -0
  339. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js +26 -0
  340. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js.map +1 -0
  341. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +26 -3
  342. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/errors_messages/errors-messages.en.js +25 -3
  344. package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -1
  345. package/dist/esm/i18n/index.d.ts +10 -8
  346. package/dist/esm/i18n/index.d.ts.map +1 -1
  347. package/dist/esm/i18n/index.js +10 -8
  348. package/dist/esm/i18n/index.js.map +1 -1
  349. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +10 -0
  350. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +2 -0
  352. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
  353. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts +97 -0
  354. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts.map +1 -0
  355. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js +60 -0
  356. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js.map +1 -0
  357. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/resources/workbenchAspects.en.js +6 -0
  359. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  360. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +5 -0
  361. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +1 -0
  363. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -1
  364. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +24 -0
  365. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +8 -0
  367. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -1
  368. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +30 -0
  369. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +9 -0
  371. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
  372. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +17 -4
  373. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +32 -4
  375. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -1
  376. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +8 -2
  377. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +6 -2
  379. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -1
  380. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +18 -7
  381. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -1
  382. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +17 -7
  383. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -1
  384. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +28 -3
  385. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  386. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +13 -3
  387. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
  388. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +3 -2
  389. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +8 -2
  391. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
  392. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +118 -8
  393. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +42 -16
  395. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  396. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +12 -2
  397. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +16 -2
  399. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -1
  400. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +10 -0
  401. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/system_enums/application-creation.en.js +11 -0
  403. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  404. package/dist/esm/i18n/system_enums/processor-register.en.d.ts +6 -0
  405. package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/system_enums/processor-register.en.js +6 -0
  407. package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -1
  408. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +4 -1
  409. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +5 -1
  411. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
  412. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts +46 -0
  413. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts.map +1 -0
  414. package/dist/esm/i18n/system_enums/workbench-secrets.en.js +46 -0
  415. package/dist/esm/i18n/system_enums/workbench-secrets.en.js.map +1 -0
  416. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +8 -0
  417. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +13 -0
  419. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -1
  420. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts +61 -0
  421. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts.map +1 -0
  422. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js +22 -0
  423. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js.map +1 -0
  424. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +105 -24
  425. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  426. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +55 -24
  427. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  428. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  429. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +0 -2
  430. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  431. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts +48 -0
  432. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -0
  433. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +145 -0
  434. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -0
  435. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +70 -18
  436. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  437. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +330 -113
  438. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  439. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +45 -0
  440. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +208 -6
  442. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  443. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +11 -2
  444. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  445. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +101 -18
  446. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  447. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +64 -1
  448. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  449. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +393 -70
  450. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  451. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +9 -5
  452. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  453. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  454. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts +54 -0
  455. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts.map +1 -0
  456. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js +74 -0
  457. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js.map +1 -0
  458. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +3 -3
  459. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
  460. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts +24 -0
  461. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts.map +1 -0
  462. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js +34 -0
  463. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js.map +1 -0
  464. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -1
  465. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +5 -1
  466. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -1
  467. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts +76 -0
  468. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts.map +1 -0
  469. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js +110 -0
  470. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js.map +1 -0
  471. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts +17 -0
  472. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts.map +1 -0
  473. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js +23 -0
  474. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js.map +1 -0
  475. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +36 -3
  476. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  477. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +77 -5
  478. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  479. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts +38 -0
  480. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts.map +1 -0
  481. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js +66 -0
  482. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js.map +1 -0
  483. package/dist/esm/index.d.ts.map +1 -1
  484. package/dist/esm/index.js +9 -3
  485. package/dist/esm/index.js.map +1 -1
  486. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -1
  487. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +0 -1
  488. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -1
  489. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  490. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +1 -3
  491. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  492. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts +11 -0
  493. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts.map +1 -0
  494. package/dist/esm/meta-workflows/models/application-line-catalog.models.js +17 -0
  495. package/dist/esm/meta-workflows/models/application-line-catalog.models.js.map +1 -0
  496. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +0 -1
  498. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  499. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +1 -1
  500. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
  501. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +14 -0
  502. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -1
  503. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +18 -0
  504. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -1
  505. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts +14 -0
  506. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts.map +1 -0
  507. package/dist/esm/meta-workflows/models/human-decision-settler.models.js +18 -0
  508. package/dist/esm/meta-workflows/models/human-decision-settler.models.js.map +1 -0
  509. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +31 -23
  510. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  511. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +36 -5
  512. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  513. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +1 -3
  515. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  516. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +19 -0
  517. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
  518. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +38 -6
  519. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
  520. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +48 -3
  521. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  522. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +61 -8
  523. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  524. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +15 -1
  525. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -1
  526. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +50 -5
  527. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -1
  528. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +52 -9
  529. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  530. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +131 -59
  531. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  532. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts +19 -0
  533. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts.map +1 -0
  534. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js +36 -0
  535. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js.map +1 -0
  536. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +9 -0
  537. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  538. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +41 -17
  539. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  540. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +42 -2
  541. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  542. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +121 -4
  543. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  544. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +32 -0
  545. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -0
  546. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +161 -0
  547. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -0
  548. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +2 -0
  549. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -1
  550. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +1 -0
  551. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -1
  552. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +3 -2
  553. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
  554. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +12 -3
  555. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
  556. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -1
  557. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
  558. package/dist/esm/meta-workflows/services/dossier.companion.service.js +227 -30
  559. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
  560. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +29 -2
  561. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  562. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +68 -5
  563. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  564. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts +40 -0
  565. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts.map +1 -0
  566. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js +91 -0
  567. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js.map +1 -0
  568. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts +25 -0
  569. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts.map +1 -0
  570. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js +40 -0
  571. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js.map +1 -0
  572. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts +90 -0
  573. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -0
  574. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +307 -0
  575. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -0
  576. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +29 -0
  577. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  578. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +44 -4
  579. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  580. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +360 -47
  581. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  582. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +1424 -246
  583. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  584. package/package.json +17 -17
  585. package/dist/esm/__time-gov.probe.d.mts +0 -0
  586. package/dist/esm/__time-gov.probe.d.mts.map +0 -0
  587. package/dist/esm/__time-gov.probe.mjs.map +0 -0
  588. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
  589. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
  590. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
  591. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -0
  592. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -0
  593. package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -0
  594. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
  595. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
  596. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"companion-api.schemas.js","sourceRoot":"","sources":["../../../../src/companion-api/companion-api.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4CAA4C,EAC5C,sCAAsC,EACtC,+CAA+C,EAC/C,uCAAuC,EACvC,uCAAuC,GACxC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,2CAA2C,GAC5C,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAExF,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAqB;IACjE,kBAAkB,CAAC,SAAS;IAC5B,kBAAkB,CAAC,MAAM;IACzB,kBAAkB,CAAC,SAAS;IAC5B,kBAAkB,CAAC,OAAO;CAC3B,CAAC,CAAC;AAEH,SAAS,2BAA2B,CAAC,MAA0B;IAC7D,OAAO,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AAEH,gFAAgF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","sourcesContent":["import { z } from 'zod';\nimport {\n Actors_Task_Schema,\n ActorSystem_ExecutionSchema,\n FlowSystem_Execution_Schema,\n FlowsActors_Status,\n} from '@wildo-ai/saas-models';\nimport {\n CompanionIntrospectionBehaviorCategoryValues,\n CompanionIntrospectionBehaviorIdValues,\n CompanionIntrospectionMaterializationKindValues,\n CompanionIntrospectionRouteTargetValues,\n CompanionIntrospectionServiceKindValues,\n} from '../core/introspection/models/companion-introspection.models';\nimport {\n safeParseSpecificationContextFactoryRequest,\n} from '../core/specifications/specification-context-factory.models';\nimport { BuildTaskRearmReason } from '../meta-workflows/models/build-task-rearm.models';\n\nconst TERMINAL_FLOWS_ACTORS_STATUSES = new Set<FlowsActors_Status>([\n FlowsActors_Status.COMPLETED,\n FlowsActors_Status.FAILED,\n FlowsActors_Status.CANCELLED,\n FlowsActors_Status.ABORTED,\n]);\n\nfunction isTerminalFlowsActorsStatus(status: FlowsActors_Status): boolean {\n return TERMINAL_FLOWS_ACTORS_STATUSES.has(status);\n}\n\n/**\n * Dev Companion API Schemas\n * \n * DTOs for communication between platform services and the dev companion\n */\n\n// =============================================================================\n// File Operations\n// =============================================================================\n\n/** ──────────────────────────────────────────────────────────────\n * Internal Schemas with z.ZodObject type annotation\n * \n * ✅ Preserves all ZodObject methods (.extend, .partial, .omit, .pick, .shape)\n * ✅ Compatible with isolatedDeclarations: true (OXC)\n * ────────────────────────────────────────────────────────────── */\n\n\n\nexport const FileEntrySchema: z.ZodObject<{\n name: z.ZodString;\n isDirectory: z.ZodBoolean;\n path: z.ZodString;\n}> = z.object({\n /** File or directory name */\n name: z.string(),\n /** Whether this entry is a directory */\n isDirectory: z.boolean(),\n /** Full relative path */\n path: z.string(),\n});\n\n// =============================================================================\n// Resources Registry\n// =============================================================================\n\n\nexport const CompanionIntrospectionRequestSchema = z.object({\n serviceKey: z.string().min(1),\n behavior: z.enum(CompanionIntrospectionBehaviorIdValues),\n input: z.unknown().optional(),\n}).transform((request, context) => {\n if (request.behavior !== 'specification-context-parts') {\n return request;\n }\n\n const parsedInput = safeParseSpecificationContextFactoryRequest(request.input);\n if ('issues' in parsedInput) {\n for (const issue of parsedInput.issues) {\n context.addIssue({\n code: 'custom',\n message: issue.message,\n path: ['input', ...issue.path],\n });\n }\n\n return z.NEVER;\n }\n\n return {\n ...request,\n input: parsedInput.data,\n };\n});\n\nconst CompanionIntrospectionResultBaseSchema = z.object({\n serviceKey: z.string().min(1),\n serviceKind: z.enum(CompanionIntrospectionServiceKindValues),\n behavior: z.enum(CompanionIntrospectionBehaviorIdValues),\n behaviorCategory: z.enum(CompanionIntrospectionBehaviorCategoryValues),\n materializationKind: z.enum(CompanionIntrospectionMaterializationKindValues),\n targetId: z.enum(CompanionIntrospectionRouteTargetValues),\n durationMs: z.number().nonnegative(),\n stdout: z.string().optional(),\n stderr: z.string().optional(),\n /**\n * Parent-side provenance, never sent by the child.\n *\n * Declared here anyway so the schema and the two hand-written interfaces below describe the same\n * shape: the parent's derivation cache stamps this on a memoized result, and a schema that did\n * not know the key would strip it from anything that round-trips through a parse.\n */\n servedFromCache: z.literal(true).optional(),\n});\nconst CompanionIntrospectionErrorSchema = z.object({\n message: z.string(),\n name: z.string().optional(),\n stack: z.string().optional(),\n});\nexport const CompanionIntrospectionResultSchema = z.discriminatedUnion('success', [\n CompanionIntrospectionResultBaseSchema.extend({\n success: z.literal(true),\n // `data` may carry any shape (per-behavior payloads vary), but the success\n // branch must always deliver SOMETHING — the asymmetry mirrors the failure\n // branch's required `error` block. Zod 4's `z.unknown()` accepts a missing\n // key, so we wrap with a presence refinement; replacing it with a typed\n // schema would over-constrain the cross-behavior payload union.\n data: z.unknown().refine((value) => value !== undefined, {\n message: 'data is required for successful introspection results',\n }),\n error: z.never().optional(),\n }),\n CompanionIntrospectionResultBaseSchema.extend({\n success: z.literal(false),\n data: z.never().optional(),\n error: CompanionIntrospectionErrorSchema,\n }),\n]);\n\n// =============================================================================\n// Health Check\n// =============================================================================\n\n\n/** ──────────────────────────────────────────────────────────────\n * Explicit Interfaces (for OXC isolatedDeclarations compatibility)\n * ────────────────────────────────────────────────────────────── */\n\nexport interface FileUpdateRequest {\n path: string;\n content: string;\n encoding: string;\n createDirectories: boolean;\n}\n\n\nexport interface FileEntry {\n name: string;\n isDirectory: boolean;\n path: string;\n}\n\n\n\n\nexport interface CompanionIntrospectionRequest {\n serviceKey: string;\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n input?: unknown;\n}\n\nexport interface CompanionIntrospectionSuccessResult {\n success: true;\n serviceKey: string;\n serviceKind: typeof CompanionIntrospectionServiceKindValues[number];\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n behaviorCategory: typeof CompanionIntrospectionBehaviorCategoryValues[number];\n materializationKind: typeof CompanionIntrospectionMaterializationKindValues[number];\n targetId: typeof CompanionIntrospectionRouteTargetValues[number];\n durationMs: number;\n data: unknown;\n stdout?: string;\n stderr?: string;\n /** Set when a memoized derivation answered this request; see the schema above. */\n servedFromCache?: true;\n}\n\nexport interface CompanionIntrospectionFailureResult {\n success: false;\n serviceKey: string;\n serviceKind: typeof CompanionIntrospectionServiceKindValues[number];\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n behaviorCategory: typeof CompanionIntrospectionBehaviorCategoryValues[number];\n materializationKind: typeof CompanionIntrospectionMaterializationKindValues[number];\n targetId: typeof CompanionIntrospectionRouteTargetValues[number];\n durationMs: number;\n error: {\n message: string;\n name?: string;\n stack?: string;\n };\n stdout?: string;\n stderr?: string;\n}\n\nexport type CompanionIntrospectionResult =\n | CompanionIntrospectionSuccessResult\n | CompanionIntrospectionFailureResult;\n\n\n/**\n * The ENVELOPE of a governance-fact landing request (#192) — and deliberately only the envelope.\n *\n * ## Why this stops where it does\n *\n * Everything about what makes an ANSWER SET valid — which questions this document asks, whether each\n * was answered, whether a qualified-review answer names a reviewer, whether \"does not apply\" is even\n * offered — belongs to `buildGovernanceFactDeclarations`, which derives it from the engine's question\n * catalog. A second copy here could only ever disagree with the one that actually refuses, and would\n * refuse with a worse message.\n *\n * What the transport must still check is that a body is SHAPED like a request at all. Without this a\n * malformed payload reached the service and threw a `TypeError` on a missing `answers` array, which\n * the generic error path classifies INTERNAL and sanitizes to the literal \"internal\" — a 500 saying\n * nothing for what is plainly a bad request. Measured against the live companion, 2026-09-03.\n *\n * So `answers` is `z.array(z.unknown())`: present and a list, contents unexamined. That is the exact\n * line between \"this is a request\" and \"this is a good answer set\".\n */\nexport const CompanionLandGovernanceFactsRequestSchema = z.object({\n definitionRef: z.string().min(1),\n decidedByRef: z.string().min(1),\n decidedAt: z.string().min(1),\n governanceScope: z.object({\n subjectKind: z.string().min(1),\n subjectRef: z.string().min(1),\n scopeRef: z.string().min(1),\n scopeVersion: z.number().int().positive(),\n participantRefs: z.array(z.string()),\n precedenceRuleRefs: z.array(z.string()),\n }),\n answers: z.array(z.unknown()),\n});\n\nexport const CompanionExecutionsListQuerySchema = z.object({\n systemRef: z.string().min(1).optional(),\n status: z.enum(FlowsActors_Status).optional(),\n limit: z.coerce.number().int().min(1).max(200).default(50),\n});\n\nexport const CompanionCreateActorExecutionRequestSchema = ActorSystem_ExecutionSchema.omit({\n _id: true,\n kind: true,\n}).extend({\n createdAt: ActorSystem_ExecutionSchema.shape.createdAt.optional(),\n updatedAt: ActorSystem_ExecutionSchema.shape.updatedAt.optional(),\n statusChanges: ActorSystem_ExecutionSchema.shape.statusChanges.default([]),\n standaloneTasks: ActorSystem_ExecutionSchema.shape.standaloneTasks.default([]),\n standaloneTaskStates: ActorSystem_ExecutionSchema.shape.standaloneTaskStates.default([]),\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n\n const seenTaskIds = new Set<string>();\n value.standaloneTasks.forEach((task, index) => {\n if (seenTaskIds.has(task._id)) {\n ctx.addIssue({\n code: 'custom',\n message: 'standalone task ids must be unique within one execution payload',\n path: ['standaloneTasks', index, '_id'],\n });\n return;\n }\n\n seenTaskIds.add(task._id);\n\n if (task.completedAt && !isTerminalFlowsActorsStatus(task.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'completedAt can only be provided for a terminal task status',\n path: ['standaloneTasks', index, 'completedAt'],\n });\n }\n });\n\n value.standaloneTaskStates.forEach((taskState, index) => {\n if (!seenTaskIds.has(taskState.taskId)) {\n ctx.addIssue({\n code: 'custom',\n message: 'standaloneTaskStates must reference a task declared in standaloneTasks',\n path: ['standaloneTaskStates', index, 'taskId'],\n });\n }\n });\n});\n\nexport const CompanionCreateFlowExecutionRequestSchema = FlowSystem_Execution_Schema.omit({\n _id: true,\n kind: true,\n}).extend({\n createdAt: FlowSystem_Execution_Schema.shape.createdAt.optional(),\n updatedAt: FlowSystem_Execution_Schema.shape.updatedAt.optional(),\n statusChanges: FlowSystem_Execution_Schema.shape.statusChanges.default([]),\n nodeStates: FlowSystem_Execution_Schema.shape.nodeStates.default([]),\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n});\n\nconst EMPTY_ACTORS_MEMORY = {\n shortTerm: { entries: [] },\n longTerm: { entries: [] },\n working: { entries: [] },\n};\n\nexport const CompanionActorTasksListQuerySchema = z.object({\n executionId: z.string().min(1).optional(),\n status: z.enum(FlowsActors_Status).optional(),\n /**\n * Keep only tasks addressed to one of these actors — applied BEFORE `limit` trims (#1359).\n *\n * Without it the trim spans every actor: a caller looking for one lane's rows read the N most\n * recently updated tasks of the whole application, so a busy judge or labelling lane could push a\n * coding row out of the window and the caller would conclude it never existed. The list is\n * materialised before it is trimmed, so this is an in-memory filter and not a nested-path query a\n * store might silently ignore. A single value arrives as a string from a query string.\n */\n actorRefs: z.union([z.string().min(1).transform((value) => [value]), z.array(z.string().min(1)).min(1)]).optional(),\n limit: z.coerce.number().int().min(1).max(200).default(50),\n});\n\n// `.strict()` refuses unknown context keys instead of Zod's default silent strip.\nconst CompanionExternalActorTaskContextSchema = Actors_Task_Schema.shape.context.strict();\n\nexport const CompanionCreateActorTaskRequestSchema = Actors_Task_Schema.omit({\n _id: true,\n createdAt: true,\n updatedAt: true,\n}).extend({\n title: z.string().min(1),\n initiator: Actors_Task_Schema.shape.initiator.default({}),\n relationships: Actors_Task_Schema.shape.relationships.default([]),\n input: Actors_Task_Schema.shape.input.default({}),\n memory: Actors_Task_Schema.shape.memory.default(EMPTY_ACTORS_MEMORY),\n context: CompanionExternalActorTaskContextSchema.default({}),\n actorStates: Actors_Task_Schema.shape.actorStates.default([]),\n createdAt: Actors_Task_Schema.shape.createdAt.optional(),\n updatedAt: Actors_Task_Schema.shape.updatedAt.optional(),\n wildoApplicationActorSystemExecutionId: z.string().min(1).optional(),\n}).superRefine((value, ctx) => {\n if (value.completedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'completedAt can only be provided for a terminal task status',\n path: ['completedAt'],\n });\n }\n});\n\n/**\n * Settling an EXECUTION, which until 2026-09-19 nothing could do (#1343).\n *\n * `createActorExecution` existed and no update did, so an execution could be opened and never\n * closed: its `status` stayed wherever it was created while `standaloneTaskStates` moved underneath\n * it, because `syncTaskIntoExecutionSnapshot` writes the task snapshot and never the execution's own\n * state. An execution stuck at `PROCESSING` forever is the shape this lane already suffers from —\n * a control-plane row that looks like it tracks something and does not.\n *\n * Deliberately NARROW: status, and the two fields that only mean anything beside it. Everything\n * else about an execution is either immutable (`systemRef`, `kind`) or maintained by the task\n * snapshot, and a broad update DTO would invite a caller to rewrite the latter by hand.\n */\nexport const CompanionUpdateActorExecutionRequestSchema = z.object({\n status: ActorSystem_ExecutionSchema.shape.status,\n /** Only meaningful for a terminal status; the service refuses the combination otherwise. */\n finishedAt: ActorSystem_ExecutionSchema.shape.finishedAt,\n statusChanges: ActorSystem_ExecutionSchema.shape.statusChanges.optional(),\n /**\n * The two fields the engine's driver writes beside a move (#1360): the human decision a run now\n * waits on, and its resume inputs. `null` CLEARS, absent leaves alone — the distinction the driver\n * relies on when a resume clears the suspension and keeps the checkpoint. Still narrow: these are\n * the execution's own state, not the task snapshot a caller must never rewrite by hand.\n */\n suspension: ActorSystem_ExecutionSchema.shape.suspension,\n checkpoint: ActorSystem_ExecutionSchema.shape.checkpoint,\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n});\nexport type CompanionUpdateActorExecutionRequest = z.infer<typeof CompanionUpdateActorExecutionRequestSchema>;\n\n/** `POST /build/tasks/:taskRef/rearm` (#1535) — why the task goes back in the queue. */\nexport const CompanionRearmBuildTaskRequestSchema = z.strictObject({\n reason: z.enum(BuildTaskRearmReason),\n /** What was fixed, in a sentence. Required: a reason code alone cannot say which defect. */\n note: z.string().trim().min(1),\n});\nexport type CompanionRearmBuildTaskRequest = z.infer<typeof CompanionRearmBuildTaskRequestSchema>;\n\nexport const CompanionUpdateActorTaskRequestSchema = Actors_Task_Schema.omit({\n _id: true,\n createdAt: true,\n context: true,\n}).partial().extend({\n title: z.string().min(1).optional(),\n context: CompanionExternalActorTaskContextSchema.optional(),\n updatedAt: Actors_Task_Schema.shape.updatedAt.optional(),\n wildoApplicationActorSystemExecutionId: z.string().min(1).optional(),\n clearExecutionLink: z.boolean().optional(),\n}).refine(\n (value) => !(value.clearExecutionLink && value.wildoApplicationActorSystemExecutionId),\n {\n message: 'clearExecutionLink cannot be combined with wildoApplicationActorSystemExecutionId',\n path: ['clearExecutionLink'],\n },\n);\n\n// =============================================================================\n// Coding-agent status (typed Flows/Actors coding path)\n// =============================================================================\n// The raw dispatch request/response DTOs were deleted with the\n// POST /coding-agent/dispatch endpoint at the first-activation hard cut.\n\n/**\n * Readiness snapshot for `GET /api/companion/coding-agent/status`.\n * `codingAgentRegistered` only reflects the agent registry —\n * it does NOT guarantee the `claude` binary is present or authenticated.\n */\nexport const CompanionCodingAgentStatusResponseSchema = z.object({\n codingAgentRegistered: z.boolean(),\n activeRun: z.object({\n taskId: z.string().min(1),\n startedAt: z.string().min(1),\n }).nullable(),\n /**\n * Coding tasks PARKED on an operator question, answerable in this process via\n * `POST /coding-agent/session/respond`. Always present (empty when none), so a\n * client tells \"nothing is waiting\" from \"the field is missing\".\n */\n pendingQuestions: z.array(z.object({\n taskId: z.string().min(1),\n taskRef: z.string().min(1),\n question: z.string().min(1),\n parkedAt: z.string().min(1),\n /** Whether the answer can resume the same agent session (agent advertised loadSession). */\n resumable: z.boolean(),\n })),\n limits: z.object({\n defaultTimeoutMs: z.number().int().positive(),\n hardMaxTimeoutMs: z.number().int().positive(),\n defaultMaxCapturedBytes: z.number().int().positive(),\n hardMaxCapturedBytes: z.number().int().positive(),\n }),\n lockFilePath: z.string().min(1),\n});\n\nexport type CompanionExecutionsListQuery = z.infer<typeof CompanionExecutionsListQuerySchema>;\nexport type CompanionCreateActorExecutionRequest =\n z.infer<typeof CompanionCreateActorExecutionRequestSchema>;\nexport type CompanionCreateFlowExecutionRequest =\n z.infer<typeof CompanionCreateFlowExecutionRequestSchema>;\nexport type CompanionActorTasksListQuery = z.infer<typeof CompanionActorTasksListQuerySchema>;\nexport type CompanionCreateActorTaskRequest =\n z.infer<typeof CompanionCreateActorTaskRequestSchema>;\nexport type CompanionUpdateActorTaskRequest =\n z.infer<typeof CompanionUpdateActorTaskRequestSchema>;\nexport type CompanionCodingAgentStatusResponse =\n z.infer<typeof CompanionCodingAgentStatusResponseSchema>;\n"]}
1
+ {"version":3,"file":"companion-api.schemas.js","sourceRoot":"","sources":["../../../../src/companion-api/companion-api.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAA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;QACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC7B,CAAC,CAAC,QAAQ,EAAE;IACb;;;;OAIG;IACH,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,2FAA2F;QAC3F,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;QACtB,uHAAuH;QACvH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACjC,CAAC,CAAC;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC7C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC7C,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACpD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAClD,CAAC;IACF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC","sourcesContent":["import { CodingAgentHostLoginState } from '@wildo-ai/external-connectors-models';\nimport { z } from 'zod';\nimport {\n Actors_Task_Schema,\n ActorSystem_ExecutionSchema,\n FlowSystem_Execution_Schema,\n FlowsActors_Status,\n HumanDecision_ResolutionSchema,\n} from '@wildo-ai/saas-models';\nimport {\n CompanionIntrospectionBehaviorCategoryValues,\n CompanionIntrospectionBehaviorIdValues,\n CompanionIntrospectionMaterializationKindValues,\n CompanionIntrospectionRouteTargetValues,\n CompanionIntrospectionServiceKindValues,\n} from '../core/introspection/models/companion-introspection.models';\nimport {\n safeParseSpecificationContextFactoryRequest,\n} from '../core/specifications/specification-context-factory.models';\nimport { BuildTaskRearmReason } from '../meta-workflows/models/build-task-rearm.models';\n\nconst TERMINAL_FLOWS_ACTORS_STATUSES = new Set<FlowsActors_Status>([\n FlowsActors_Status.COMPLETED,\n FlowsActors_Status.FAILED,\n FlowsActors_Status.CANCELLED,\n FlowsActors_Status.ABORTED,\n]);\n\nfunction isTerminalFlowsActorsStatus(status: FlowsActors_Status): boolean {\n return TERMINAL_FLOWS_ACTORS_STATUSES.has(status);\n}\n\n/**\n * Dev Companion API Schemas\n * \n * DTOs for communication between platform services and the dev companion\n */\n\n// =============================================================================\n// File Operations\n// =============================================================================\n\n/** ──────────────────────────────────────────────────────────────\n * Internal Schemas with z.ZodObject type annotation\n * \n * ✅ Preserves all ZodObject methods (.extend, .partial, .omit, .pick, .shape)\n * ✅ Compatible with isolatedDeclarations: true (OXC)\n * ────────────────────────────────────────────────────────────── */\n\n\n\nexport const FileEntrySchema: z.ZodObject<{\n name: z.ZodString;\n isDirectory: z.ZodBoolean;\n path: z.ZodString;\n}> = z.object({\n /** File or directory name */\n name: z.string(),\n /** Whether this entry is a directory */\n isDirectory: z.boolean(),\n /** Full relative path */\n path: z.string(),\n});\n\n// =============================================================================\n// Resources Registry\n// =============================================================================\n\n\nexport const CompanionIntrospectionRequestSchema = z.object({\n serviceKey: z.string().min(1),\n behavior: z.enum(CompanionIntrospectionBehaviorIdValues),\n input: z.unknown().optional(),\n}).transform((request, context) => {\n if (request.behavior !== 'specification-context-parts') {\n return request;\n }\n\n const parsedInput = safeParseSpecificationContextFactoryRequest(request.input);\n if ('issues' in parsedInput) {\n for (const issue of parsedInput.issues) {\n context.addIssue({\n code: 'custom',\n message: issue.message,\n path: ['input', ...issue.path],\n });\n }\n\n return z.NEVER;\n }\n\n return {\n ...request,\n input: parsedInput.data,\n };\n});\n\nconst CompanionIntrospectionResultBaseSchema = z.object({\n serviceKey: z.string().min(1),\n serviceKind: z.enum(CompanionIntrospectionServiceKindValues),\n behavior: z.enum(CompanionIntrospectionBehaviorIdValues),\n behaviorCategory: z.enum(CompanionIntrospectionBehaviorCategoryValues),\n materializationKind: z.enum(CompanionIntrospectionMaterializationKindValues),\n targetId: z.enum(CompanionIntrospectionRouteTargetValues),\n durationMs: z.number().nonnegative(),\n stdout: z.string().optional(),\n stderr: z.string().optional(),\n /**\n * Parent-side provenance, never sent by the child.\n *\n * Declared here anyway so the schema and the two hand-written interfaces below describe the same\n * shape: the parent's derivation cache stamps this on a memoized result, and a schema that did\n * not know the key would strip it from anything that round-trips through a parse.\n */\n servedFromCache: z.literal(true).optional(),\n});\nconst CompanionIntrospectionErrorSchema = z.object({\n message: z.string(),\n name: z.string().optional(),\n stack: z.string().optional(),\n});\nexport const CompanionIntrospectionResultSchema = z.discriminatedUnion('success', [\n CompanionIntrospectionResultBaseSchema.extend({\n success: z.literal(true),\n // `data` may carry any shape (per-behavior payloads vary), but the success\n // branch must always deliver SOMETHING — the asymmetry mirrors the failure\n // branch's required `error` block. Zod 4's `z.unknown()` accepts a missing\n // key, so we wrap with a presence refinement; replacing it with a typed\n // schema would over-constrain the cross-behavior payload union.\n data: z.unknown().refine((value) => value !== undefined, {\n message: 'data is required for successful introspection results',\n }),\n error: z.never().optional(),\n }),\n CompanionIntrospectionResultBaseSchema.extend({\n success: z.literal(false),\n data: z.never().optional(),\n error: CompanionIntrospectionErrorSchema,\n }),\n]);\n\n// =============================================================================\n// Health Check\n// =============================================================================\n\n\n/** ──────────────────────────────────────────────────────────────\n * Explicit Interfaces (for OXC isolatedDeclarations compatibility)\n * ────────────────────────────────────────────────────────────── */\n\nexport interface FileUpdateRequest {\n path: string;\n content: string;\n encoding: string;\n createDirectories: boolean;\n}\n\n\nexport interface FileEntry {\n name: string;\n isDirectory: boolean;\n path: string;\n}\n\n\n\n\nexport interface CompanionIntrospectionRequest {\n serviceKey: string;\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n input?: unknown;\n}\n\nexport interface CompanionIntrospectionSuccessResult {\n success: true;\n serviceKey: string;\n serviceKind: typeof CompanionIntrospectionServiceKindValues[number];\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n behaviorCategory: typeof CompanionIntrospectionBehaviorCategoryValues[number];\n materializationKind: typeof CompanionIntrospectionMaterializationKindValues[number];\n targetId: typeof CompanionIntrospectionRouteTargetValues[number];\n durationMs: number;\n data: unknown;\n stdout?: string;\n stderr?: string;\n /** Set when a memoized derivation answered this request; see the schema above. */\n servedFromCache?: true;\n}\n\nexport interface CompanionIntrospectionFailureResult {\n success: false;\n serviceKey: string;\n serviceKind: typeof CompanionIntrospectionServiceKindValues[number];\n behavior: typeof CompanionIntrospectionBehaviorIdValues[number];\n behaviorCategory: typeof CompanionIntrospectionBehaviorCategoryValues[number];\n materializationKind: typeof CompanionIntrospectionMaterializationKindValues[number];\n targetId: typeof CompanionIntrospectionRouteTargetValues[number];\n durationMs: number;\n error: {\n message: string;\n name?: string;\n stack?: string;\n };\n stdout?: string;\n stderr?: string;\n}\n\nexport type CompanionIntrospectionResult =\n | CompanionIntrospectionSuccessResult\n | CompanionIntrospectionFailureResult;\n\n\n/**\n * The ENVELOPE of a governance-fact landing request (#192) — and deliberately only the envelope.\n *\n * ## Why this stops where it does\n *\n * Everything about what makes an ANSWER SET valid — which questions this document asks, whether each\n * was answered, whether a qualified-review answer names a reviewer, whether \"does not apply\" is even\n * offered — belongs to `buildGovernanceFactDeclarations`, which derives it from the engine's question\n * catalog. A second copy here could only ever disagree with the one that actually refuses, and would\n * refuse with a worse message.\n *\n * What the transport must still check is that a body is SHAPED like a request at all. Without this a\n * malformed payload reached the service and threw a `TypeError` on a missing `answers` array, which\n * the generic error path classifies INTERNAL and sanitizes to the literal \"internal\" — a 500 saying\n * nothing for what is plainly a bad request. Measured against the live companion, 2026-09-03.\n *\n * So `answers` is `z.array(z.unknown())`: present and a list, contents unexamined. That is the exact\n * line between \"this is a request\" and \"this is a good answer set\".\n */\nexport const CompanionLandGovernanceFactsRequestSchema = z.object({\n definitionRef: z.string().min(1),\n decidedByRef: z.string().min(1),\n decidedAt: z.string().min(1),\n governanceScope: z.object({\n subjectKind: z.string().min(1),\n subjectRef: z.string().min(1),\n scopeRef: z.string().min(1),\n scopeVersion: z.number().int().positive(),\n participantRefs: z.array(z.string()),\n precedenceRuleRefs: z.array(z.string()),\n }),\n answers: z.array(z.unknown()),\n});\n\nexport const CompanionExecutionsListQuerySchema = z.object({\n systemRef: z.string().min(1).optional(),\n status: z.enum(FlowsActors_Status).optional(),\n limit: z.coerce.number().int().min(1).max(200).default(50),\n});\n\nexport const CompanionCreateActorExecutionRequestSchema = ActorSystem_ExecutionSchema.omit({\n _id: true,\n kind: true,\n}).extend({\n createdAt: ActorSystem_ExecutionSchema.shape.createdAt.optional(),\n updatedAt: ActorSystem_ExecutionSchema.shape.updatedAt.optional(),\n statusChanges: ActorSystem_ExecutionSchema.shape.statusChanges.default([]),\n standaloneTasks: ActorSystem_ExecutionSchema.shape.standaloneTasks.default([]),\n standaloneTaskStates: ActorSystem_ExecutionSchema.shape.standaloneTaskStates.default([]),\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n\n const seenTaskIds = new Set<string>();\n value.standaloneTasks.forEach((task, index) => {\n if (seenTaskIds.has(task._id)) {\n ctx.addIssue({\n code: 'custom',\n message: 'standalone task ids must be unique within one execution payload',\n path: ['standaloneTasks', index, '_id'],\n });\n return;\n }\n\n seenTaskIds.add(task._id);\n\n if (task.completedAt && !isTerminalFlowsActorsStatus(task.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'completedAt can only be provided for a terminal task status',\n path: ['standaloneTasks', index, 'completedAt'],\n });\n }\n });\n\n value.standaloneTaskStates.forEach((taskState, index) => {\n if (!seenTaskIds.has(taskState.taskId)) {\n ctx.addIssue({\n code: 'custom',\n message: 'standaloneTaskStates must reference a task declared in standaloneTasks',\n path: ['standaloneTaskStates', index, 'taskId'],\n });\n }\n });\n});\n\nexport const CompanionCreateFlowExecutionRequestSchema = FlowSystem_Execution_Schema.omit({\n _id: true,\n kind: true,\n}).extend({\n createdAt: FlowSystem_Execution_Schema.shape.createdAt.optional(),\n updatedAt: FlowSystem_Execution_Schema.shape.updatedAt.optional(),\n statusChanges: FlowSystem_Execution_Schema.shape.statusChanges.default([]),\n nodeStates: FlowSystem_Execution_Schema.shape.nodeStates.default([]),\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n});\n\nconst EMPTY_ACTORS_MEMORY = {\n shortTerm: { entries: [] },\n longTerm: { entries: [] },\n working: { entries: [] },\n};\n\nexport const CompanionActorTasksListQuerySchema = z.object({\n executionId: z.string().min(1).optional(),\n status: z.enum(FlowsActors_Status).optional(),\n /**\n * Keep only tasks addressed to one of these actors — applied BEFORE `limit` trims (#1359).\n *\n * Without it the trim spans every actor: a caller looking for one lane's rows read the N most\n * recently updated tasks of the whole application, so a busy judge or labelling lane could push a\n * coding row out of the window and the caller would conclude it never existed. The list is\n * materialised before it is trimmed, so this is an in-memory filter and not a nested-path query a\n * store might silently ignore. A single value arrives as a string from a query string.\n */\n actorRefs: z.union([z.string().min(1).transform((value) => [value]), z.array(z.string().min(1)).min(1)]).optional(),\n limit: z.coerce.number().int().min(1).max(200).default(50),\n});\n\n// `.strict()` refuses unknown context keys instead of Zod's default silent strip.\nconst CompanionExternalActorTaskContextSchema = Actors_Task_Schema.shape.context.strict();\n\nexport const CompanionCreateActorTaskRequestSchema = Actors_Task_Schema.omit({\n _id: true,\n createdAt: true,\n updatedAt: true,\n}).extend({\n title: z.string().min(1),\n initiator: Actors_Task_Schema.shape.initiator.default({}),\n relationships: Actors_Task_Schema.shape.relationships.default([]),\n input: Actors_Task_Schema.shape.input.default({}),\n memory: Actors_Task_Schema.shape.memory.default(EMPTY_ACTORS_MEMORY),\n context: CompanionExternalActorTaskContextSchema.default({}),\n actorStates: Actors_Task_Schema.shape.actorStates.default([]),\n createdAt: Actors_Task_Schema.shape.createdAt.optional(),\n updatedAt: Actors_Task_Schema.shape.updatedAt.optional(),\n wildoApplicationActorSystemExecutionId: z.string().min(1).optional(),\n}).superRefine((value, ctx) => {\n if (value.completedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'completedAt can only be provided for a terminal task status',\n path: ['completedAt'],\n });\n }\n});\n\n/**\n * Settling an EXECUTION, which until 2026-09-19 nothing could do (#1343).\n *\n * `createActorExecution` existed and no update did, so an execution could be opened and never\n * closed: its `status` stayed wherever it was created while `standaloneTaskStates` moved underneath\n * it, because `syncTaskIntoExecutionSnapshot` writes the task snapshot and never the execution's own\n * state. An execution stuck at `PROCESSING` forever is the shape this lane already suffers from —\n * a control-plane row that looks like it tracks something and does not.\n *\n * Deliberately NARROW: status, and the two fields that only mean anything beside it. Everything\n * else about an execution is either immutable (`systemRef`, `kind`) or maintained by the task\n * snapshot, and a broad update DTO would invite a caller to rewrite the latter by hand.\n */\nexport const CompanionUpdateActorExecutionRequestSchema = z.object({\n status: ActorSystem_ExecutionSchema.shape.status,\n /** Only meaningful for a terminal status; the service refuses the combination otherwise. */\n finishedAt: ActorSystem_ExecutionSchema.shape.finishedAt,\n statusChanges: ActorSystem_ExecutionSchema.shape.statusChanges.optional(),\n /**\n * The two fields the engine's driver writes beside a move (#1360): the human decision a run now\n * waits on, and its resume inputs. `null` CLEARS, absent leaves alone — the distinction the driver\n * relies on when a resume clears the suspension and keeps the checkpoint. Still narrow: these are\n * the execution's own state, not the task snapshot a caller must never rewrite by hand.\n */\n suspension: ActorSystem_ExecutionSchema.shape.suspension,\n checkpoint: ActorSystem_ExecutionSchema.shape.checkpoint,\n /**\n * How the decision a move out of waiting ENDS (#1594 I4). Honoured only by the guarded swap, which writes\n * it onto the status change it appends — in the same statement as the move.\n */\n resolution: HumanDecision_ResolutionSchema.optional(),\n}).superRefine((value, ctx) => {\n if (value.finishedAt && !isTerminalFlowsActorsStatus(value.status)) {\n ctx.addIssue({\n code: 'custom',\n message: 'finishedAt can only be provided for a terminal execution status',\n path: ['finishedAt'],\n });\n }\n});\nexport type CompanionUpdateActorExecutionRequest = z.infer<typeof CompanionUpdateActorExecutionRequestSchema>;\n\n/** `POST /build/tasks/:taskRef/rearm` (#1535) — why the task goes back in the queue. */\nexport const CompanionRearmBuildTaskRequestSchema = z.strictObject({\n reason: z.enum(BuildTaskRearmReason),\n /** What was fixed, in a sentence. Required: a reason code alone cannot say which defect. */\n note: z.string().trim().min(1),\n});\nexport type CompanionRearmBuildTaskRequest = z.infer<typeof CompanionRearmBuildTaskRequestSchema>;\n\nexport const CompanionUpdateActorTaskRequestSchema = Actors_Task_Schema.omit({\n _id: true,\n createdAt: true,\n context: true,\n}).partial().extend({\n title: z.string().min(1).optional(),\n context: CompanionExternalActorTaskContextSchema.optional(),\n updatedAt: Actors_Task_Schema.shape.updatedAt.optional(),\n wildoApplicationActorSystemExecutionId: z.string().min(1).optional(),\n clearExecutionLink: z.boolean().optional(),\n}).refine(\n (value) => !(value.clearExecutionLink && value.wildoApplicationActorSystemExecutionId),\n {\n message: 'clearExecutionLink cannot be combined with wildoApplicationActorSystemExecutionId',\n path: ['clearExecutionLink'],\n },\n);\n\n// =============================================================================\n// Coding-agent status (typed Flows/Actors coding path)\n// =============================================================================\n// The raw dispatch request/response DTOs were deleted with the\n// POST /coding-agent/dispatch endpoint at the first-activation hard cut.\n\n/**\n * Readiness snapshot for `GET /api/companion/coding-agent/status`.\n * `codingAgentRegistered` only reflects the agent registry —\n * it does NOT guarantee the `claude` binary is present or authenticated.\n */\nexport const CompanionCodingAgentStatusResponseSchema = z.object({\n codingAgentRegistered: z.boolean(),\n /**\n * The SELECTED agent's login on this host, read from the agent's own status command (#1637) —\n * what \"registered\" cannot say: a registered agent whose operator is signed out fails every run.\n * `null` when the selection cannot be resolved or its provider declares no way to read the login.\n */\n codingAgentLogin: z.object({\n providerRef: z.string().min(1),\n state: z.enum(CodingAgentHostLoginState),\n detail: z.string(),\n remedy: z.string().nullable(),\n }).nullable(),\n activeRun: z.object({\n taskId: z.string().min(1),\n startedAt: z.string().min(1),\n }).nullable(),\n /**\n * Coding tasks PARKED on an operator question, answerable in this process via\n * `POST /coding-agent/session/respond`. Always present (empty when none), so a\n * client tells \"nothing is waiting\" from \"the field is missing\".\n */\n pendingQuestions: z.array(z.object({\n taskId: z.string().min(1),\n taskRef: z.string().min(1),\n question: z.string().min(1),\n parkedAt: z.string().min(1),\n /** Whether the answer can resume the same agent session (agent advertised loadSession). */\n resumable: z.boolean(),\n /** Which of the run's questions this is; `respond` requires it back, so the answer continues only this one (#1581). */\n suspensionRef: z.string().min(1),\n })),\n limits: z.object({\n defaultTimeoutMs: z.number().int().positive(),\n hardMaxTimeoutMs: z.number().int().positive(),\n defaultMaxCapturedBytes: z.number().int().positive(),\n hardMaxCapturedBytes: z.number().int().positive(),\n }),\n lockFilePath: z.string().min(1),\n});\n\nexport type CompanionExecutionsListQuery = z.infer<typeof CompanionExecutionsListQuerySchema>;\nexport type CompanionCreateActorExecutionRequest =\n z.infer<typeof CompanionCreateActorExecutionRequestSchema>;\nexport type CompanionCreateFlowExecutionRequest =\n z.infer<typeof CompanionCreateFlowExecutionRequestSchema>;\nexport type CompanionActorTasksListQuery = z.infer<typeof CompanionActorTasksListQuerySchema>;\nexport type CompanionCreateActorTaskRequest =\n z.infer<typeof CompanionCreateActorTaskRequestSchema>;\nexport type CompanionUpdateActorTaskRequest =\n z.infer<typeof CompanionUpdateActorTaskRequestSchema>;\nexport type CompanionCodingAgentStatusResponse =\n z.infer<typeof CompanionCodingAgentStatusResponseSchema>;\n"]}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The companion's own error-guidance keys — `errors_guidance.{key}.explanation` in its label tree.
3
+ *
4
+ * A NOT_FOUND refusal carries its words HERE, never in `context.message`: the engine's client sanitizer
5
+ * (`sanitizeErrorForClient`) keeps a context only for VALIDATION, CONFLICT and RATE_LIMIT, and strips it
6
+ * for every other type — a 404 included, deliberately, since 404 is also the non-member answer. A
7
+ * sentence placed in a 404's context therefore never reaches anyone, while `userGuidance` survives: the
8
+ * workbench resolves its key before anything else (#1584 review R1), and the CLI prints its raw
9
+ * explanation and resolution (#1588).
10
+ */
11
+ export declare enum CompanionErrorGuidanceKey {
12
+ /** A playbook clarification answered, declined or cancelled after the run stopped waiting. */
13
+ SUSPENDED_PLAYBOOK_RUN_NOT_WAITING = "suspended_playbook_run_not_waiting",
14
+ /** A parked coding question's row that no longer names a waiting run. */
15
+ PARKED_CODING_QUESTION_NOT_FOUND = "parked_coding_question_not_found",
16
+ /** `wildo context workspace get <resource>` (`GET /api/companion/workspace/elements?op=get`) named a resource the application does not register (#1588). */
17
+ WORKSPACE_RESOURCE_NOT_REGISTERED = "workspace_resource_not_registered",
18
+ /**
19
+ * `wildo secrets set/unset`, run by the workbench's secrets section, refused the change — an unknown
20
+ * name, a malformed value, no `gh` for a remote environment (#1637). The explanation carries the
21
+ * CLI's own sentence, which names the remedy.
22
+ */
23
+ APPLICATION_SECRET_CHANGE_REFUSED = "application_secret_change_refused"
24
+ }
25
+ //# sourceMappingURL=companion-error-guidance.models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-error-guidance.models.d.ts","sourceRoot":"","sources":["../../../../src/companion-api/companion-error-guidance.models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oBAAY,yBAAyB;IACnC,8FAA8F;IAC9F,kCAAkC,uCAAuC;IACzE,yEAAyE;IACzE,gCAAgC,qCAAqC;IACrE,4JAA4J;IAC5J,iCAAiC,sCAAsC;IACvE;;;;OAIG;IACH,iCAAiC,sCAAsC;CACxE"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The companion's own error-guidance keys — `errors_guidance.{key}.explanation` in its label tree.
3
+ *
4
+ * A NOT_FOUND refusal carries its words HERE, never in `context.message`: the engine's client sanitizer
5
+ * (`sanitizeErrorForClient`) keeps a context only for VALIDATION, CONFLICT and RATE_LIMIT, and strips it
6
+ * for every other type — a 404 included, deliberately, since 404 is also the non-member answer. A
7
+ * sentence placed in a 404's context therefore never reaches anyone, while `userGuidance` survives: the
8
+ * workbench resolves its key before anything else (#1584 review R1), and the CLI prints its raw
9
+ * explanation and resolution (#1588).
10
+ */
11
+ export var CompanionErrorGuidanceKey;
12
+ (function (CompanionErrorGuidanceKey) {
13
+ /** A playbook clarification answered, declined or cancelled after the run stopped waiting. */
14
+ CompanionErrorGuidanceKey["SUSPENDED_PLAYBOOK_RUN_NOT_WAITING"] = "suspended_playbook_run_not_waiting";
15
+ /** A parked coding question's row that no longer names a waiting run. */
16
+ CompanionErrorGuidanceKey["PARKED_CODING_QUESTION_NOT_FOUND"] = "parked_coding_question_not_found";
17
+ /** `wildo context workspace get <resource>` (`GET /api/companion/workspace/elements?op=get`) named a resource the application does not register (#1588). */
18
+ CompanionErrorGuidanceKey["WORKSPACE_RESOURCE_NOT_REGISTERED"] = "workspace_resource_not_registered";
19
+ /**
20
+ * `wildo secrets set/unset`, run by the workbench's secrets section, refused the change — an unknown
21
+ * name, a malformed value, no `gh` for a remote environment (#1637). The explanation carries the
22
+ * CLI's own sentence, which names the remedy.
23
+ */
24
+ CompanionErrorGuidanceKey["APPLICATION_SECRET_CHANGE_REFUSED"] = "application_secret_change_refused";
25
+ })(CompanionErrorGuidanceKey || (CompanionErrorGuidanceKey = {}));
26
+ //# sourceMappingURL=companion-error-guidance.models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-error-guidance.models.js","sourceRoot":"","sources":["../../../../src/companion-api/companion-error-guidance.models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,yBAaX;AAbD,WAAY,yBAAyB;IACnC,8FAA8F;IAC9F,sGAAyE,CAAA;IACzE,yEAAyE;IACzE,kGAAqE,CAAA;IACrE,4JAA4J;IAC5J,oGAAuE,CAAA;IACvE;;;;OAIG;IACH,oGAAuE,CAAA;AACzE,CAAC,EAbW,yBAAyB,KAAzB,yBAAyB,QAapC","sourcesContent":["/**\n * The companion's own error-guidance keys — `errors_guidance.{key}.explanation` in its label tree.\n *\n * A NOT_FOUND refusal carries its words HERE, never in `context.message`: the engine's client sanitizer\n * (`sanitizeErrorForClient`) keeps a context only for VALIDATION, CONFLICT and RATE_LIMIT, and strips it\n * for every other type — a 404 included, deliberately, since 404 is also the non-member answer. A\n * sentence placed in a 404's context therefore never reaches anyone, while `userGuidance` survives: the\n * workbench resolves its key before anything else (#1584 review R1), and the CLI prints its raw\n * explanation and resolution (#1588).\n */\nexport enum CompanionErrorGuidanceKey {\n /** A playbook clarification answered, declined or cancelled after the run stopped waiting. */\n SUSPENDED_PLAYBOOK_RUN_NOT_WAITING = 'suspended_playbook_run_not_waiting',\n /** A parked coding question's row that no longer names a waiting run. */\n PARKED_CODING_QUESTION_NOT_FOUND = 'parked_coding_question_not_found',\n /** `wildo context workspace get <resource>` (`GET /api/companion/workspace/elements?op=get`) named a resource the application does not register (#1588). */\n WORKSPACE_RESOURCE_NOT_REGISTERED = 'workspace_resource_not_registered',\n /**\n * `wildo secrets set/unset`, run by the workbench's secrets section, refused the change — an unknown\n * name, a malformed value, no `gh` for a remote environment (#1637). The explanation carries the\n * CLI's own sentence, which names the remedy.\n */\n APPLICATION_SECRET_CHANGE_REFUSED = 'application_secret_change_refused',\n}\n"]}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * What the companion's generic file routes (`GET /file`, `GET /files/list`, `POST /files/update`) may
3
+ * reach: files inside the application root, and never the ones that hold secrets.
4
+ *
5
+ * Why it is needed at all: the companion's token floor gates by HTTP VERB and leaves every read open
6
+ * by design (`companion-token-floor.policy.ts` — a stale token must not blind diagnostics), and the
7
+ * three routes resolved any path the caller sent with `path.resolve(saasRoot, …)`. So any local
8
+ * process could read `infrastructure/<env>/secrets/secrets.json` — every provider key, every
9
+ * platform credential — or anything else on the machine through `../`. Measured 2026-09-25 (#1637).
10
+ *
11
+ * Secrets have exactly one door, the secrets surface (`wildo secrets`, and the workbench section
12
+ * built on it), which is write-only for values. These routes are for workspace files.
13
+ *
14
+ * The OUTSIDE-the-root check is lexical, so a symlink inside the application pointing outside it (pnpm's
15
+ * virtual store does exactly this) is still readable. The SECRET check is not: it also classifies the path
16
+ * as the disk resolves it, so neither a symlink nor a case- or Unicode-folded spelling reaches a secret.
17
+ */
18
+ export declare enum CompanionFileRouteRefusal {
19
+ /** The path resolves outside the application root (`../`, an absolute path elsewhere). */
20
+ OUTSIDE_APPLICATION_ROOT = "outside_application_root",
21
+ /** The path names a file or directory that holds secrets. */
22
+ SECRET_BEARING_PATH = "secret_bearing_path"
23
+ }
24
+ export type CompanionFileRouteDecision = {
25
+ readonly admitted: true;
26
+ readonly absolutePath: string;
27
+ } | {
28
+ readonly admitted: false;
29
+ readonly refusal: CompanionFileRouteRefusal;
30
+ readonly relativePath: string;
31
+ };
32
+ /**
33
+ * Whether a path, relative to the application root with `/` separators, holds secrets:
34
+ *
35
+ * - `infrastructure/<environment>/secrets/…` — the operator's `secrets.json` per environment;
36
+ * - any `.env` / `.env.<variant>` file (not `.env.example`), and any `<name>.env` — the generated
37
+ * runtime environments and `provider-secrets.generated.env` carry the same values;
38
+ * - `.wildo-saas/deploy/…` — rendered Kubernetes Secret manifests and per-service compose env files;
39
+ * - `.wildo-saas/state/companion.token` — the credential the token floor itself checks.
40
+ */
41
+ export declare function isSecretBearingPath(relativePath: string): boolean;
42
+ /** Decide whether a requested path may be read, listed or written, and resolve it. */
43
+ export declare function confineCompanionFilePath(applicationRoot: string, requestedPath: string): CompanionFileRouteDecision;
44
+ //# sourceMappingURL=companion-file-route-confinement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-file-route-confinement.d.ts","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-file-route-confinement.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,yBAAyB;IACnC,0FAA0F;IAC1F,wBAAwB,6BAA6B;IACrD,6DAA6D;IAC7D,mBAAmB,wBAAwB;CAC5C;AAED,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAK7G;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAWjE;AA6CD,sFAAsF;AACtF,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,0BAA0B,CAcnH"}
@@ -0,0 +1,111 @@
1
+ import { existsSync, realpathSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ /**
4
+ * What the companion's generic file routes (`GET /file`, `GET /files/list`, `POST /files/update`) may
5
+ * reach: files inside the application root, and never the ones that hold secrets.
6
+ *
7
+ * Why it is needed at all: the companion's token floor gates by HTTP VERB and leaves every read open
8
+ * by design (`companion-token-floor.policy.ts` — a stale token must not blind diagnostics), and the
9
+ * three routes resolved any path the caller sent with `path.resolve(saasRoot, …)`. So any local
10
+ * process could read `infrastructure/<env>/secrets/secrets.json` — every provider key, every
11
+ * platform credential — or anything else on the machine through `../`. Measured 2026-09-25 (#1637).
12
+ *
13
+ * Secrets have exactly one door, the secrets surface (`wildo secrets`, and the workbench section
14
+ * built on it), which is write-only for values. These routes are for workspace files.
15
+ *
16
+ * The OUTSIDE-the-root check is lexical, so a symlink inside the application pointing outside it (pnpm's
17
+ * virtual store does exactly this) is still readable. The SECRET check is not: it also classifies the path
18
+ * as the disk resolves it, so neither a symlink nor a case- or Unicode-folded spelling reaches a secret.
19
+ */
20
+ export var CompanionFileRouteRefusal;
21
+ (function (CompanionFileRouteRefusal) {
22
+ /** The path resolves outside the application root (`../`, an absolute path elsewhere). */
23
+ CompanionFileRouteRefusal["OUTSIDE_APPLICATION_ROOT"] = "outside_application_root";
24
+ /** The path names a file or directory that holds secrets. */
25
+ CompanionFileRouteRefusal["SECRET_BEARING_PATH"] = "secret_bearing_path";
26
+ })(CompanionFileRouteRefusal || (CompanionFileRouteRefusal = {}));
27
+ /** The template every `.env` family file is copied from; it carries no values. */
28
+ const ENV_EXAMPLE_FILE = '.env.example';
29
+ /**
30
+ * Whether a path, relative to the application root with `/` separators, holds secrets:
31
+ *
32
+ * - `infrastructure/<environment>/secrets/…` — the operator's `secrets.json` per environment;
33
+ * - any `.env` / `.env.<variant>` file (not `.env.example`), and any `<name>.env` — the generated
34
+ * runtime environments and `provider-secrets.generated.env` carry the same values;
35
+ * - `.wildo-saas/deploy/…` — rendered Kubernetes Secret manifests and per-service compose env files;
36
+ * - `.wildo-saas/state/companion.token` — the credential the token floor itself checks.
37
+ */
38
+ export function isSecretBearingPath(relativePath) {
39
+ const segments = relativePath
40
+ .split('/')
41
+ .filter((segment) => segment.length > 0 && segment !== '.')
42
+ .map(normalizeSegmentForClassification);
43
+ if (segments[0] === 'infrastructure' && segments.length >= 3 && segments[2] === 'secrets')
44
+ return true;
45
+ if (segments[0] === '.wildo-saas' && segments[1] === 'deploy')
46
+ return true;
47
+ if (segments.join('/') === '.wildo-saas/state/companion.token')
48
+ return true;
49
+ return segments.some((segment) => segment !== ENV_EXAMPLE_FILE && (segment === '.env' || segment.startsWith('.env.') || segment.endsWith('.env')));
50
+ }
51
+ /**
52
+ * The spelling a filesystem would treat as the same entry, for CLASSIFICATION of the REQUESTED path.
53
+ *
54
+ * NFKC first, then lower case: the default macOS and Windows filesystems ignore case and fold compatibility
55
+ * forms, so `INFRASTRUCTURE/…`, `ſecrets` (long s) and a Kelvin-sign `K` open the files their plain
56
+ * spellings name — the #1637 review read the real `secrets.json` and the companion token through each. Windows
57
+ * also drops trailing dots and spaces and treats `name:stream` as `name`. This only ever WIDENS what is
58
+ * refused. It is the half of the check that works for a path that does not exist yet; for one that does,
59
+ * {@link onDiskRelativePath} asks the disk itself, which no string folding can out-guess.
60
+ */
61
+ function normalizeSegmentForClassification(segment) {
62
+ const withoutStream = segment.includes(':') ? segment.slice(0, segment.indexOf(':')) : segment;
63
+ // `.` and `..` never reach here: the caller drops `.` and the path is already resolved.
64
+ return withoutStream.normalize('NFKC').toLowerCase().replace(/[. ]+$/, '');
65
+ }
66
+ /**
67
+ * The path as the DISK spells it, relative to the root with `/` separators — or `null` when it cannot be
68
+ * told (the root or every ancestor is missing, or the path leaves the root through a link).
69
+ *
70
+ * The nearest EXISTING ancestor is resolved with `realpathSync.native`, which returns each component as
71
+ * stored (measured on macOS: `infrastructure/local/ſecrets/secrets.json` resolves to `…/secrets/secrets.json`),
72
+ * and the not-yet-existing tail is appended as sent. So however a request spells an existing secrets
73
+ * directory, this reports its real name.
74
+ */
75
+ function onDiskRelativePath(root, absolutePath) {
76
+ let existing = absolutePath;
77
+ const tail = [];
78
+ while (!existsSync(existing)) {
79
+ const parent = path.dirname(existing);
80
+ if (parent === existing)
81
+ return null;
82
+ tail.unshift(path.basename(existing));
83
+ existing = parent;
84
+ }
85
+ try {
86
+ const relative = path.relative(realpathSync.native(root), path.join(realpathSync.native(existing), ...tail));
87
+ if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))
88
+ return null;
89
+ return relative.split(path.sep).join('/');
90
+ }
91
+ catch {
92
+ return null;
93
+ }
94
+ }
95
+ /** Decide whether a requested path may be read, listed or written, and resolve it. */
96
+ export function confineCompanionFilePath(applicationRoot, requestedPath) {
97
+ const root = path.resolve(applicationRoot);
98
+ const absolutePath = path.resolve(root, requestedPath);
99
+ const relative = path.relative(root, absolutePath);
100
+ const relativePath = relative.split(path.sep).join('/');
101
+ if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
102
+ return { admitted: false, refusal: CompanionFileRouteRefusal.OUTSIDE_APPLICATION_ROOT, relativePath };
103
+ }
104
+ // Both spellings are classified: the requested one (folded) and the one the disk resolves it to.
105
+ const onDisk = onDiskRelativePath(root, absolutePath);
106
+ if (isSecretBearingPath(relativePath) || (onDisk !== null && isSecretBearingPath(onDisk))) {
107
+ return { admitted: false, refusal: CompanionFileRouteRefusal.SECRET_BEARING_PATH, relativePath };
108
+ }
109
+ return { admitted: true, absolutePath };
110
+ }
111
+ //# sourceMappingURL=companion-file-route-confinement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-file-route-confinement.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-file-route-confinement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAN,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACnC,0FAA0F;IAC1F,kFAAqD,CAAA;IACrD,6DAA6D;IAC7D,wEAA2C,CAAA;AAC7C,CAAC,EALW,yBAAyB,KAAzB,yBAAyB,QAKpC;AAMD,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAoB;IACtD,MAAM,Q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nD,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxD,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3F,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,yBAAyB,CAAC,wBAAwB,EAAE,YAAY,EAAE,CAAC;IACxG,CAAC;IACD,iGAAiG;IACjG,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACtD,IAAI,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC1F,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,yBAAyB,CAAC,mBAAmB,EAAE,YAAY,EAAE,CAAC;IACnG,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["import { existsSync, realpathSync } from 'node:fs';\nimport path from 'node:path';\n\n/**\n * What the companion's generic file routes (`GET /file`, `GET /files/list`, `POST /files/update`) may\n * reach: files inside the application root, and never the ones that hold secrets.\n *\n * Why it is needed at all: the companion's token floor gates by HTTP VERB and leaves every read open\n * by design (`companion-token-floor.policy.ts` — a stale token must not blind diagnostics), and the\n * three routes resolved any path the caller sent with `path.resolve(saasRoot, …)`. So any local\n * process could read `infrastructure/<env>/secrets/secrets.json` — every provider key, every\n * platform credential — or anything else on the machine through `../`. Measured 2026-09-25 (#1637).\n *\n * Secrets have exactly one door, the secrets surface (`wildo secrets`, and the workbench section\n * built on it), which is write-only for values. These routes are for workspace files.\n *\n * The OUTSIDE-the-root check is lexical, so a symlink inside the application pointing outside it (pnpm's\n * virtual store does exactly this) is still readable. The SECRET check is not: it also classifies the path\n * as the disk resolves it, so neither a symlink nor a case- or Unicode-folded spelling reaches a secret.\n */\nexport enum CompanionFileRouteRefusal {\n /** The path resolves outside the application root (`../`, an absolute path elsewhere). */\n OUTSIDE_APPLICATION_ROOT = 'outside_application_root',\n /** The path names a file or directory that holds secrets. */\n SECRET_BEARING_PATH = 'secret_bearing_path',\n}\n\nexport type CompanionFileRouteDecision =\n | { readonly admitted: true; readonly absolutePath: string }\n | { readonly admitted: false; readonly refusal: CompanionFileRouteRefusal; readonly relativePath: string };\n\n/** The template every `.env` family file is copied from; it carries no values. */\nconst ENV_EXAMPLE_FILE = '.env.example';\n\n/**\n * Whether a path, relative to the application root with `/` separators, holds secrets:\n *\n * - `infrastructure/<environment>/secrets/…` — the operator's `secrets.json` per environment;\n * - any `.env` / `.env.<variant>` file (not `.env.example`), and any `<name>.env` — the generated\n * runtime environments and `provider-secrets.generated.env` carry the same values;\n * - `.wildo-saas/deploy/…` — rendered Kubernetes Secret manifests and per-service compose env files;\n * - `.wildo-saas/state/companion.token` — the credential the token floor itself checks.\n */\nexport function isSecretBearingPath(relativePath: string): boolean {\n const segments = relativePath\n .split('/')\n .filter((segment) => segment.length > 0 && segment !== '.')\n .map(normalizeSegmentForClassification);\n if (segments[0] === 'infrastructure' && segments.length >= 3 && segments[2] === 'secrets') return true;\n if (segments[0] === '.wildo-saas' && segments[1] === 'deploy') return true;\n if (segments.join('/') === '.wildo-saas/state/companion.token') return true;\n return segments.some(\n (segment) => segment !== ENV_EXAMPLE_FILE && (segment === '.env' || segment.startsWith('.env.') || segment.endsWith('.env')),\n );\n}\n\n/**\n * The spelling a filesystem would treat as the same entry, for CLASSIFICATION of the REQUESTED path.\n *\n * NFKC first, then lower case: the default macOS and Windows filesystems ignore case and fold compatibility\n * forms, so `INFRASTRUCTURE/…`, `ſecrets` (long s) and a Kelvin-sign `K` open the files their plain\n * spellings name — the #1637 review read the real `secrets.json` and the companion token through each. Windows\n * also drops trailing dots and spaces and treats `name:stream` as `name`. This only ever WIDENS what is\n * refused. It is the half of the check that works for a path that does not exist yet; for one that does,\n * {@link onDiskRelativePath} asks the disk itself, which no string folding can out-guess.\n */\nfunction normalizeSegmentForClassification(segment: string): string {\n const withoutStream = segment.includes(':') ? segment.slice(0, segment.indexOf(':')) : segment;\n // `.` and `..` never reach here: the caller drops `.` and the path is already resolved.\n return withoutStream.normalize('NFKC').toLowerCase().replace(/[. ]+$/, '');\n}\n\n/**\n * The path as the DISK spells it, relative to the root with `/` separators — or `null` when it cannot be\n * told (the root or every ancestor is missing, or the path leaves the root through a link).\n *\n * The nearest EXISTING ancestor is resolved with `realpathSync.native`, which returns each component as\n * stored (measured on macOS: `infrastructure/local/ſecrets/secrets.json` resolves to `…/secrets/secrets.json`),\n * and the not-yet-existing tail is appended as sent. So however a request spells an existing secrets\n * directory, this reports its real name.\n */\nfunction onDiskRelativePath(root: string, absolutePath: string): string | null {\n let existing = absolutePath;\n const tail: string[] = [];\n while (!existsSync(existing)) {\n const parent = path.dirname(existing);\n if (parent === existing) return null;\n tail.unshift(path.basename(existing));\n existing = parent;\n }\n try {\n const relative = path.relative(realpathSync.native(root), path.join(realpathSync.native(existing), ...tail));\n if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) return null;\n return relative.split(path.sep).join('/');\n } catch {\n return null;\n }\n}\n\n/** Decide whether a requested path may be read, listed or written, and resolve it. */\nexport function confineCompanionFilePath(applicationRoot: string, requestedPath: string): CompanionFileRouteDecision {\n const root = path.resolve(applicationRoot);\n const absolutePath = path.resolve(root, requestedPath);\n const relative = path.relative(root, absolutePath);\n const relativePath = relative.split(path.sep).join('/');\n if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {\n return { admitted: false, refusal: CompanionFileRouteRefusal.OUTSIDE_APPLICATION_ROOT, relativePath };\n }\n // Both spellings are classified: the requested one (folded) and the one the disk resolves it to.\n const onDisk = onDiskRelativePath(root, absolutePath);\n if (isSecretBearingPath(relativePath) || (onDisk !== null && isSecretBearingPath(onDisk))) {\n return { admitted: false, refusal: CompanionFileRouteRefusal.SECRET_BEARING_PATH, relativePath };\n }\n return { admitted: true, absolutePath };\n}\n"]}
@@ -34,27 +34,19 @@
34
34
  */
35
35
  export declare const COMPANION_TOKEN_FLOOR_UNGATED_METHODS: ReadonlySet<string>;
36
36
  /**
37
- * The mutating routes a BROWSER reaches, which therefore cannot carry the token.
37
+ * The mutating routes a BROWSER may reach without the token — the one opening in the floor.
38
38
  *
39
- * These are not an opinion about their risk — `/compliance/governance-facts` genuinely writes files.
40
- * They are a statement of fact about their one caller: the application-creation workbench is a bundle
41
- * running in the operator's browser (`platform/factory/application-creation-workbench`), and a browser
42
- * cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk). Gating them would
43
- * 401 the board's own buttons, so the real choice is between an exemption that is written down and a
44
- * gate that is quietly not applied.
39
+ * A browser bundle cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk), so
40
+ * a mutating call from the application-creation workbench (`platform/factory/application-creation-workbench`)
41
+ * could never present it. The answer is not an exemption: the workbench reaches every act it performs as
42
+ * a CUSTOM RESOURCE OPERATION on the engine's authenticated `/api/v1` plane, and its only call to this
43
+ * mount is a `GET` event stream, which the floor leaves open by method. The list is therefore empty.
45
44
  *
46
45
  * Proxy-injecting the token in the workbench's Vite dev server was considered and rejected twice over:
47
46
  * it is dev-only (`server.proxy` has no effect on a built bundle, which reaches the companion through
48
47
  * `VITE_COMPANION_URL`), and it would re-open on the workbench's own origin exactly the forgery the
49
48
  * floor exists to refuse.
50
49
  *
51
- * The real fix is a migration already under way and half-finished: `runPlaybook`, `resumePlaybookRun`,
52
- * `dispatchNextBuildTask` and `revertRunWrites` left this mount for CUSTOM RESOURCE OPERATIONS on the
53
- * engine's `/api/v1` plane, which the workbench reaches with an authenticated session (it really does
54
- * `POST /auth/authenticate`). These three are the stragglers — the workbench's own client names
55
- * `cancelCodingAgentRun` "a recorded singleton exception until it has a resource to carry the verb".
56
- * When each grows its resource operation, delete its row here.
57
- *
58
50
  * Kept as an EXEMPTION rather than as a gated-route list so the polarity stays right: the default is
59
51
  * refusal, and every opening is one line somebody had to write and justify.
60
52
  */
@@ -1 +1 @@
1
- {"version":3,"file":"companion-token-floor.policy.d.ts","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-token-floor.policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qCAAqC,EAAE,WAAW,CAAC,MAAM,CAAuC,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,0CAA0C,EAAE,SAAS,MAAM,EAevE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,EACnH,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GACvD,OAAO,CAGT"}
1
+ {"version":3,"file":"companion-token-floor.policy.d.ts","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-token-floor.policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qCAAqC,EAAE,WAAW,CAAC,MAAM,CAAuC,CAAC;AAE9G;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0CAA0C,EAAE,SAAS,MAAM,EAevE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,EACnH,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GACvD,OAAO,CAGT"}
@@ -34,27 +34,19 @@
34
34
  */
35
35
  export const COMPANION_TOKEN_FLOOR_UNGATED_METHODS = new Set(['GET', 'HEAD', 'OPTIONS']);
36
36
  /**
37
- * The mutating routes a BROWSER reaches, which therefore cannot carry the token.
37
+ * The mutating routes a BROWSER may reach without the token — the one opening in the floor.
38
38
  *
39
- * These are not an opinion about their risk — `/compliance/governance-facts` genuinely writes files.
40
- * They are a statement of fact about their one caller: the application-creation workbench is a bundle
41
- * running in the operator's browser (`platform/factory/application-creation-workbench`), and a browser
42
- * cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk). Gating them would
43
- * 401 the board's own buttons, so the real choice is between an exemption that is written down and a
44
- * gate that is quietly not applied.
39
+ * A browser bundle cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk), so
40
+ * a mutating call from the application-creation workbench (`platform/factory/application-creation-workbench`)
41
+ * could never present it. The answer is not an exemption: the workbench reaches every act it performs as
42
+ * a CUSTOM RESOURCE OPERATION on the engine's authenticated `/api/v1` plane, and its only call to this
43
+ * mount is a `GET` event stream, which the floor leaves open by method. The list is therefore empty.
45
44
  *
46
45
  * Proxy-injecting the token in the workbench's Vite dev server was considered and rejected twice over:
47
46
  * it is dev-only (`server.proxy` has no effect on a built bundle, which reaches the companion through
48
47
  * `VITE_COMPANION_URL`), and it would re-open on the workbench's own origin exactly the forgery the
49
48
  * floor exists to refuse.
50
49
  *
51
- * The real fix is a migration already under way and half-finished: `runPlaybook`, `resumePlaybookRun`,
52
- * `dispatchNextBuildTask` and `revertRunWrites` left this mount for CUSTOM RESOURCE OPERATIONS on the
53
- * engine's `/api/v1` plane, which the workbench reaches with an authenticated session (it really does
54
- * `POST /auth/authenticate`). These three are the stragglers — the workbench's own client names
55
- * `cancelCodingAgentRun` "a recorded singleton exception until it has a resource to carry the verb".
56
- * When each grows its resource operation, delete its row here.
57
- *
58
50
  * Kept as an EXEMPTION rather than as a gated-route list so the polarity stays right: the default is
59
51
  * refusal, and every opening is one line somebody had to write and justify.
60
52
  */
@@ -1 +1 @@
1
- {"version":3,"file":"companion-token-floor.policy.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-token-floor.policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAwB,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAsB;AAC3E;;;;;;;;;;;;;GAaG;CACJ,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAAc,EAAE,IAAY;IAC7E,IAAI,qCAAqC,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IAClF,OAAO,CAAC,0CAA0C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sCAAsC,CACpD,OAAmH,EACnH,YAAwD;IAExD,IAAI,CAAC,kCAAkC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnF,OAAO,YAAY,CAAC,OAAO,OAAO,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACvG,CAAC","sourcesContent":["/**\n * WHO must present the machine-local companion token — the P-29b floor's decision, and nothing else.\n *\n * It is a module of its own, with no imports, for two reasons that both bit this floor before:\n *\n * - **It is the half that can be pinned.** The floor's previous life ended because the middleware\n * that used it was deleted with the single endpoint it guarded, and the service's own unit test —\n * six cases, all mint-and-validate — went on passing. A decision expressed inside a controller that\n * drags the whole companion DI graph behind it is a decision no cheap test ever exercises.\n * - **Two ends must agree.** The CLI decides whether to ATTACH the token and the companion decides\n * whether to REQUIRE it. Those are the same predicate written twice, in two packages that cannot\n * import each other, so the least this side can do is state it once and name the other end.\n *\n * The CLI's copy is `COMPANION_TOKEN_UNGATED_METHODS` in\n * `platform/factory/wildo-cli/src/services/companion/companion-client.service.ts`. Move one, move both.\n */\n\n/**\n * The methods that pass unconditionally.\n *\n * Gating is decided by the HTTP VERB rather than by a list of gated paths, and that is the whole\n * design: the companion controller registers 68 routes and grows, so any hand-kept list of \"the\n * mutating ones\" is a second enumeration of a population that moves — the shape\n * `.claude/rules/invariant-call-site-enumeration.md` records as this repository's most frequent\n * defect. With the verb as the discriminator, a route added tomorrow is gated by construction and\n * there is nothing to remember.\n *\n * Reads stay open, deliberately: DD-6's posture for read-only routes is unchanged, and a token that\n * has gone stale (an older CLI, a companion restarted under a running client) must not be able to\n * blind the diagnostics an operator needs precisely when something is wrong.\n *\n * `OPTIONS` passes so a CORS preflight is answered rather than 401'd — a preflight carries no\n * author-supplied headers by definition, so refusing it would only replace a legible refusal on the\n * real request with an opaque browser-side CORS failure.\n */\nexport const COMPANION_TOKEN_FLOOR_UNGATED_METHODS: ReadonlySet<string> = new Set(['GET', 'HEAD', 'OPTIONS']);\n\n/**\n * The mutating routes a BROWSER reaches, which therefore cannot carry the token.\n *\n * These are not an opinion about their risk — `/compliance/governance-facts` genuinely writes files.\n * They are a statement of fact about their one caller: the application-creation workbench is a bundle\n * running in the operator's browser (`platform/factory/application-creation-workbench`), and a browser\n * cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk). Gating them would\n * 401 the board's own buttons, so the real choice is between an exemption that is written down and a\n * gate that is quietly not applied.\n *\n * Proxy-injecting the token in the workbench's Vite dev server was considered and rejected twice over:\n * it is dev-only (`server.proxy` has no effect on a built bundle, which reaches the companion through\n * `VITE_COMPANION_URL`), and it would re-open on the workbench's own origin exactly the forgery the\n * floor exists to refuse.\n *\n * The real fix is a migration already under way and half-finished: `runPlaybook`, `resumePlaybookRun`,\n * `dispatchNextBuildTask` and `revertRunWrites` left this mount for CUSTOM RESOURCE OPERATIONS on the\n * engine's `/api/v1` plane, which the workbench reaches with an authenticated session (it really does\n * `POST /auth/authenticate`). These three are the stragglers — the workbench's own client names\n * `cancelCodingAgentRun` \"a recorded singleton exception until it has a resource to carry the verb\".\n * When each grows its resource operation, delete its row here.\n *\n * Kept as an EXEMPTION rather than as a gated-route list so the polarity stays right: the default is\n * refusal, and every opening is one line somebody had to write and justify.\n */\nexport const COMPANION_TOKEN_FLOOR_BROWSER_EXEMPT_PATHS: readonly string[] = [\n /*\n * EMPTY since 2026-09-22 (#1454), and kept as the seam rather than deleted.\n *\n * It held four rows — `/playbooks/refresh-board`, `/compliance/governance-facts`,\n * `/coding-agent/cancel`, `/coding-agent/session/respond` — each a workbench browser call the floor\n * would otherwise have refused, because a browser bundle cannot read the 0600 `companion.token`.\n * Every one of those acts is a RESOURCE OPERATION now (`read_interview`, `land_facts`, `cancel`,\n * `answer` and their siblings on the creation-plane resources), reached through the engine's\n * authenticated `/api/v1` plane, so the browser no longer touches this mount with a mutating verb.\n * The routes survive for the CLI, which holds the token.\n *\n * The list stays because the polarity is the design: the default is refusal, and the day a browser\n * call needs this mount again it is one line somebody has to write and justify here.\n */\n];\n\n/**\n * Does this request have to present the local companion token?\n *\n * `path` is MOUNT-RELATIVE (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and carries no\n * query string — the same coordinate `req.path` gives inside the mounted router, and the same one\n * `attachRequestTraceSession` already compares against.\n *\n * A path variant the exemption list does not match exactly — a trailing slash, a different case —\n * requires the token. That is the safe direction, and it costs nothing: such a variant matches no\n * route either.\n */\nexport function companionRequestRequiresLocalToken(method: string, path: string): boolean {\n if (COMPANION_TOKEN_FLOOR_UNGATED_METHODS.has(method.toUpperCase())) return false;\n return !COMPANION_TOKEN_FLOOR_BROWSER_EXEMPT_PATHS.includes(path);\n}\n\n/**\n * The floor's complete verdict on one request: admit, or refuse.\n *\n * `isValidToken` is passed in rather than imported so this stays a pure function of its inputs — the\n * validator is `CompanionAuthFloorCompanionService.isValidToken`, a constant-time digest comparison\n * that already fails closed when the floor was never initialized.\n *\n * A repeated header arrives typed `string[]`. It is refused rather than searched: a caller that sends\n * the token twice is either confused or probing, and \"one of the values was right\" is not a rule this\n * floor wants to own.\n */\nexport function companionRequestIsAdmittedByTokenFloor(\n request: { readonly method: string; readonly path: string; readonly presentedToken: string | string[] | undefined },\n isValidToken: (presented: string | undefined) => boolean,\n): boolean {\n if (!companionRequestRequiresLocalToken(request.method, request.path)) return true;\n return isValidToken(typeof request.presentedToken === 'string' ? request.presentedToken : undefined);\n}\n"]}
1
+ {"version":3,"file":"companion-token-floor.policy.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-token-floor.policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAwB,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9G;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAsB;AAC3E;;;;;;;;;;;;;GAaG;CACJ,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAAc,EAAE,IAAY;IAC7E,IAAI,qCAAqC,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IAClF,OAAO,CAAC,0CAA0C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sCAAsC,CACpD,OAAmH,EACnH,YAAwD;IAExD,IAAI,CAAC,kCAAkC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnF,OAAO,YAAY,CAAC,OAAO,OAAO,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACvG,CAAC","sourcesContent":["/**\n * WHO must present the machine-local companion token — the P-29b floor's decision, and nothing else.\n *\n * It is a module of its own, with no imports, for two reasons that both bit this floor before:\n *\n * - **It is the half that can be pinned.** The floor's previous life ended because the middleware\n * that used it was deleted with the single endpoint it guarded, and the service's own unit test —\n * six cases, all mint-and-validate — went on passing. A decision expressed inside a controller that\n * drags the whole companion DI graph behind it is a decision no cheap test ever exercises.\n * - **Two ends must agree.** The CLI decides whether to ATTACH the token and the companion decides\n * whether to REQUIRE it. Those are the same predicate written twice, in two packages that cannot\n * import each other, so the least this side can do is state it once and name the other end.\n *\n * The CLI's copy is `COMPANION_TOKEN_UNGATED_METHODS` in\n * `platform/factory/wildo-cli/src/services/companion/companion-client.service.ts`. Move one, move both.\n */\n\n/**\n * The methods that pass unconditionally.\n *\n * Gating is decided by the HTTP VERB rather than by a list of gated paths, and that is the whole\n * design: the companion controller registers 68 routes and grows, so any hand-kept list of \"the\n * mutating ones\" is a second enumeration of a population that moves — the shape\n * `.claude/rules/invariant-call-site-enumeration.md` records as this repository's most frequent\n * defect. With the verb as the discriminator, a route added tomorrow is gated by construction and\n * there is nothing to remember.\n *\n * Reads stay open, deliberately: DD-6's posture for read-only routes is unchanged, and a token that\n * has gone stale (an older CLI, a companion restarted under a running client) must not be able to\n * blind the diagnostics an operator needs precisely when something is wrong.\n *\n * `OPTIONS` passes so a CORS preflight is answered rather than 401'd — a preflight carries no\n * author-supplied headers by definition, so refusing it would only replace a legible refusal on the\n * real request with an opaque browser-side CORS failure.\n */\nexport const COMPANION_TOKEN_FLOOR_UNGATED_METHODS: ReadonlySet<string> = new Set(['GET', 'HEAD', 'OPTIONS']);\n\n/**\n * The mutating routes a BROWSER may reach without the token — the one opening in the floor.\n *\n * A browser bundle cannot read `<saasRoot>/.wildo-saas/state/companion.token` (mode 0600, on disk), so\n * a mutating call from the application-creation workbench (`platform/factory/application-creation-workbench`)\n * could never present it. The answer is not an exemption: the workbench reaches every act it performs as\n * a CUSTOM RESOURCE OPERATION on the engine's authenticated `/api/v1` plane, and its only call to this\n * mount is a `GET` event stream, which the floor leaves open by method. The list is therefore empty.\n *\n * Proxy-injecting the token in the workbench's Vite dev server was considered and rejected twice over:\n * it is dev-only (`server.proxy` has no effect on a built bundle, which reaches the companion through\n * `VITE_COMPANION_URL`), and it would re-open on the workbench's own origin exactly the forgery the\n * floor exists to refuse.\n *\n * Kept as an EXEMPTION rather than as a gated-route list so the polarity stays right: the default is\n * refusal, and every opening is one line somebody had to write and justify.\n */\nexport const COMPANION_TOKEN_FLOOR_BROWSER_EXEMPT_PATHS: readonly string[] = [\n /*\n * EMPTY since 2026-09-22 (#1454), and kept as the seam rather than deleted.\n *\n * It held four rows — `/playbooks/refresh-board`, `/compliance/governance-facts`,\n * `/coding-agent/cancel`, `/coding-agent/session/respond` — each a workbench browser call the floor\n * would otherwise have refused, because a browser bundle cannot read the 0600 `companion.token`.\n * Every one of those acts is a RESOURCE OPERATION now (`read_interview`, `land_facts`, `cancel`,\n * `answer` and their siblings on the creation-plane resources), reached through the engine's\n * authenticated `/api/v1` plane, so the browser no longer touches this mount with a mutating verb.\n * The routes survive for the CLI, which holds the token.\n *\n * The list stays because the polarity is the design: the default is refusal, and the day a browser\n * call needs this mount again it is one line somebody has to write and justify here.\n */\n];\n\n/**\n * Does this request have to present the local companion token?\n *\n * `path` is MOUNT-RELATIVE (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and carries no\n * query string — the same coordinate `req.path` gives inside the mounted router, and the same one\n * `attachRequestTraceSession` already compares against.\n *\n * A path variant the exemption list does not match exactly — a trailing slash, a different case —\n * requires the token. That is the safe direction, and it costs nothing: such a variant matches no\n * route either.\n */\nexport function companionRequestRequiresLocalToken(method: string, path: string): boolean {\n if (COMPANION_TOKEN_FLOOR_UNGATED_METHODS.has(method.toUpperCase())) return false;\n return !COMPANION_TOKEN_FLOOR_BROWSER_EXEMPT_PATHS.includes(path);\n}\n\n/**\n * The floor's complete verdict on one request: admit, or refuse.\n *\n * `isValidToken` is passed in rather than imported so this stays a pure function of its inputs — the\n * validator is `CompanionAuthFloorCompanionService.isValidToken`, a constant-time digest comparison\n * that already fails closed when the floor was never initialized.\n *\n * A repeated header arrives typed `string[]`. It is refused rather than searched: a caller that sends\n * the token twice is either confused or probing, and \"one of the values was right\" is not a rule this\n * floor wants to own.\n */\nexport function companionRequestIsAdmittedByTokenFloor(\n request: { readonly method: string; readonly path: string; readonly presentedToken: string | string[] | undefined },\n isValidToken: (presented: string | undefined) => boolean,\n): boolean {\n if (!companionRequestRequiresLocalToken(request.method, request.path)) return true;\n return isValidToken(typeof request.presentedToken === 'string' ? request.presentedToken : undefined);\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The companion routes (mount-relative) that are POLLED, and so never get a per-request trace session —
3
+ * see `isTraceExemptProbe` for why a polled read must not mint one: a session directory per ping, and
4
+ * churn of the bounded session map that evicts the live sessions of long-running work.
5
+ *
6
+ * The creation console's two reads are here because `wildo creation feed --follow` reads the feed every
7
+ * few seconds for as long as someone is working, and an agent re-reads the question queue before each
8
+ * answer. Each minted session would also move the trace-session board, republishing a watched
9
+ * workbench on every poll.
10
+ */
11
+ export declare const COMPANION_TRACE_EXEMPT_GET_PATHS: readonly string[];
12
+ //# sourceMappingURL=companion-trace-exemptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-trace-exemptions.d.ts","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-trace-exemptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAQ5D,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The companion routes (mount-relative) that are POLLED, and so never get a per-request trace session —
3
+ * see `isTraceExemptProbe` for why a polled read must not mint one: a session directory per ping, and
4
+ * churn of the bounded session map that evicts the live sessions of long-running work.
5
+ *
6
+ * The creation console's two reads are here because `wildo creation feed --follow` reads the feed every
7
+ * few seconds for as long as someone is working, and an agent re-reads the question queue before each
8
+ * answer. Each minted session would also move the trace-session board, republishing a watched
9
+ * workbench on every poll.
10
+ */
11
+ export const COMPANION_TRACE_EXEMPT_GET_PATHS = Object.freeze([
12
+ '/',
13
+ '/health',
14
+ '/coding-agent/status',
15
+ '/creation/feed',
16
+ '/creation/questions',
17
+ /* Polled by a hook on every prompt and by a status line every few seconds (#1657). */
18
+ '/creation/pulse',
19
+ ]);
20
+ //# sourceMappingURL=companion-trace-exemptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-trace-exemptions.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion-trace-exemptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC/E,GAAG;IACH,SAAS;IACT,sBAAsB;IACtB,gBAAgB;IAChB,qBAAqB;IACrB,sFAAsF;IACtF,iBAAiB;CAClB,CAAC,CAAC","sourcesContent":["/**\n * The companion routes (mount-relative) that are POLLED, and so never get a per-request trace session —\n * see `isTraceExemptProbe` for why a polled read must not mint one: a session directory per ping, and\n * churn of the bounded session map that evicts the live sessions of long-running work.\n *\n * The creation console's two reads are here because `wildo creation feed --follow` reads the feed every\n * few seconds for as long as someone is working, and an agent re-reads the question queue before each\n * answer. Each minted session would also move the trace-session board, republishing a watched\n * workbench on every poll.\n */\nexport const COMPANION_TRACE_EXEMPT_GET_PATHS: readonly string[] = Object.freeze([\n '/',\n '/health',\n '/coding-agent/status',\n '/creation/feed',\n '/creation/questions',\n /* Polled by a hook on every prompt and by a status line every few seconds (#1657). */\n '/creation/pulse',\n]);\n"]}