@nexusclawhq/cli 0.2.1

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 (914) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +13 -0
  3. package/dist/build-info.json +8 -0
  4. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/capability-extractor.d.ts +38 -0
  5. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/capability-extractor.js +323 -0
  6. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/capability-extractor.js.map +1 -0
  7. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/code-static-analysis.d.ts +6 -0
  8. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/code-static-analysis.js +225 -0
  9. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/analysis/code-static-analysis.js.map +1 -0
  10. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/checksums.d.ts +64 -0
  11. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/checksums.js +72 -0
  12. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/checksums.js.map +1 -0
  13. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/code-action-compiler.d.ts +38 -0
  14. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/code-action-compiler.js +369 -0
  15. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/code-action-compiler.js.map +1 -0
  16. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/schema-to-typescript.d.ts +5 -0
  17. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/schema-to-typescript.js +127 -0
  18. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/compiler/schema-to-typescript.js.map +1 -0
  19. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/index.d.ts +109 -0
  20. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/index.js +39 -0
  21. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/index.js.map +1 -0
  22. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/archive-safety.d.ts +31 -0
  23. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/archive-safety.js +119 -0
  24. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/archive-safety.js.map +1 -0
  25. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/canonical-zip.d.ts +46 -0
  26. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/canonical-zip.js +314 -0
  27. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/canonical-zip.js.map +1 -0
  28. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/manifest-inventory.d.ts +49 -0
  29. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/manifest-inventory.js +95 -0
  30. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/manifest-inventory.js.map +1 -0
  31. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/workforce-bundle-inventory.d.ts +19 -0
  32. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/workforce-bundle-inventory.js +196 -0
  33. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/package/workforce-bundle-inventory.js.map +1 -0
  34. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/runtime/local-runner-lock.d.ts +8 -0
  35. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/runtime/local-runner-lock.js +25 -0
  36. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/runtime/local-runner-lock.js.map +1 -0
  37. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/schema/code-schema-loader.d.ts +52 -0
  38. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/schema/code-schema-loader.js +189 -0
  39. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/dist/schema/code-schema-loader.js.map +1 -0
  40. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/package.json +16 -0
  41. package/dist/nexus-cli/node_modules/@nexusclaw/code-authoring/src/runtime/local-runner.lock.json +7 -0
  42. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-avatars/presets.d.ts +17 -0
  43. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-avatars/presets.js +55 -0
  44. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-avatars/presets.js.map +1 -0
  45. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context-signing.d.ts +35 -0
  46. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context-signing.js +243 -0
  47. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context-signing.js.map +1 -0
  48. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context.types.d.ts +232 -0
  49. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context.types.js +160 -0
  50. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/ai-authoring-context.types.js.map +1 -0
  51. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/candidate-execution-workspace-admin.types.d.ts +71 -0
  52. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/candidate-execution-workspace-admin.types.js +3 -0
  53. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/candidate-execution-workspace-admin.types.js.map +1 -0
  54. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/canonical-hash.d.ts +124 -0
  55. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/canonical-hash.js +366 -0
  56. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/canonical-hash.js.map +1 -0
  57. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/cli-contract.types.d.ts +140 -0
  58. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/cli-contract.types.js +3 -0
  59. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/cli-contract.types.js.map +1 -0
  60. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-action.types.d.ts +278 -0
  61. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-action.types.js +8 -0
  62. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-action.types.js.map +1 -0
  63. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-extension-manifest.types.d.ts +65 -0
  64. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-extension-manifest.types.js +35 -0
  65. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/code-extension-manifest.types.js.map +1 -0
  66. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-schemas.d.ts +77 -0
  67. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-schemas.js +387 -0
  68. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-schemas.js.map +1 -0
  69. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-versions.d.ts +125 -0
  70. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-versions.js +137 -0
  71. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/contract-versions.js.map +1 -0
  72. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/error-catalog.d.ts +25 -0
  73. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/error-catalog.js +295 -0
  74. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/error-catalog.js.map +1 -0
  75. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/executable-package-validation.types.d.ts +134 -0
  76. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/executable-package-validation.types.js +65 -0
  77. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/executable-package-validation.types.js.map +1 -0
  78. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-payload-v2.types.d.ts +105 -0
  79. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-payload-v2.types.js +17 -0
  80. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-payload-v2.types.js.map +1 -0
  81. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-v2-canonical.d.ts +33 -0
  82. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-v2-canonical.js +175 -0
  83. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/flow-v2-canonical.js.map +1 -0
  84. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/index.d.ts +28 -0
  85. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/index.js +100 -0
  86. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/index.js.map +1 -0
  87. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/json-value.d.ts +48 -0
  88. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/json-value.js +108 -0
  89. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/json-value.js.map +1 -0
  90. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence-validation.d.ts +34 -0
  91. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence-validation.js +135 -0
  92. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence-validation.js.map +1 -0
  93. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence.types.d.ts +232 -0
  94. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence.types.js +3 -0
  95. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/release-evidence.types.js.map +1 -0
  96. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-bundle.types.d.ts +98 -0
  97. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-bundle.types.js +3 -0
  98. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-bundle.types.js.map +1 -0
  99. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-lock.types.d.ts +96 -0
  100. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-lock.types.js +3 -0
  101. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-lock.types.js.map +1 -0
  102. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-events.types.d.ts +28 -0
  103. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-events.types.js +3 -0
  104. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-events.types.js.map +1 -0
  105. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-gate-receipt.d.ts +2 -0
  106. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-gate-receipt.js +26 -0
  107. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/workforce-release-gate-receipt.js.map +1 -0
  108. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-markdown-policy/index.d.ts +25 -0
  109. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-markdown-policy/index.js +66 -0
  110. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-markdown-policy/index.js.map +1 -0
  111. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.d.ts +38 -0
  112. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.js +502 -0
  113. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.js.map +1 -0
  114. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.d.ts +173 -0
  115. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.js +3 -0
  116. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.js.map +1 -0
  117. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.d.ts +4 -0
  118. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.js +53 -0
  119. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.js.map +1 -0
  120. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.d.ts +37 -0
  121. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.js +3 -0
  122. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.js.map +1 -0
  123. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.d.ts +19 -0
  124. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.js +42 -0
  125. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.js.map +1 -0
  126. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.d.ts +12 -0
  127. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.js +161 -0
  128. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.js.map +1 -0
  129. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.d.ts +44 -0
  130. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.js +3 -0
  131. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.js.map +1 -0
  132. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.d.ts +5 -0
  133. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.js +81 -0
  134. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.js.map +1 -0
  135. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.d.ts +61 -0
  136. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.js +3 -0
  137. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.js.map +1 -0
  138. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.d.ts +15 -0
  139. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.js +32 -0
  140. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.js.map +1 -0
  141. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.d.ts +9 -0
  142. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.js +170 -0
  143. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.js.map +1 -0
  144. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.d.ts +98 -0
  145. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.js +3 -0
  146. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.js.map +1 -0
  147. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.d.ts +21 -0
  148. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.js +157 -0
  149. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.js.map +1 -0
  150. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.d.ts +47 -0
  151. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.js +3 -0
  152. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.js.map +1 -0
  153. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.d.ts +19 -0
  154. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.js +177 -0
  155. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.js.map +1 -0
  156. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.d.ts +66 -0
  157. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.js +3 -0
  158. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.js.map +1 -0
  159. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.d.ts +53 -0
  160. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.js +42 -0
  161. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.js.map +1 -0
  162. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.d.ts +743 -0
  163. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.js +1261 -0
  164. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.js.map +1 -0
  165. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/index.d.ts +2 -0
  166. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/index.js +8 -0
  167. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/index.js.map +1 -0
  168. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/types.d.ts +208 -0
  169. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/types.js +26 -0
  170. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/types.js.map +1 -0
  171. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/validator.d.ts +13 -0
  172. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/validator.js +257 -0
  173. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/validator.js.map +1 -0
  174. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/index.d.ts +12 -0
  175. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/index.js +31 -0
  176. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/index.js.map +1 -0
  177. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.d.ts +20892 -0
  178. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js +21538 -0
  179. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js.map +1 -0
  180. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/flatten.d.ts +8 -0
  181. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/flatten.js +24 -0
  182. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/flatten.js.map +1 -0
  183. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/index.d.ts +41790 -0
  184. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/index.js +19 -0
  185. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/index.js.map +1 -0
  186. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.d.ts +20892 -0
  187. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js +21538 -0
  188. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js.map +1 -0
  189. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-release-governance/index.d.ts +71 -0
  190. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-release-governance/index.js +13 -0
  191. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-release-governance/index.js.map +1 -0
  192. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-route-readiness/index.d.ts +91 -0
  193. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-route-readiness/index.js +331 -0
  194. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-route-readiness/index.js.map +1 -0
  195. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/index.d.ts +1 -0
  196. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/index.js +18 -0
  197. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/index.js.map +1 -0
  198. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/page-source-file.d.ts +73 -0
  199. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/page-source-file.js +266 -0
  200. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/source-format/page-source-file.js.map +1 -0
  201. package/dist/nexus-cli/node_modules/@nexusclaw/shared/package.json +55 -0
  202. package/dist/nexus-cli/src/cli.d.ts +3 -0
  203. package/dist/nexus-cli/src/cli.js +120 -0
  204. package/dist/nexus-cli/src/cli.js.map +1 -0
  205. package/dist/nexus-cli/src/cli.test.d.ts +1 -0
  206. package/dist/nexus-cli/src/cli.test.js +69 -0
  207. package/dist/nexus-cli/src/cli.test.js.map +1 -0
  208. package/dist/nexus-cli/src/commands/ai/context-export.d.ts +22 -0
  209. package/dist/nexus-cli/src/commands/ai/context-export.js +309 -0
  210. package/dist/nexus-cli/src/commands/ai/context-export.js.map +1 -0
  211. package/dist/nexus-cli/src/commands/ai/context-export.test.d.ts +1 -0
  212. package/dist/nexus-cli/src/commands/ai/context-export.test.js +146 -0
  213. package/dist/nexus-cli/src/commands/ai/context-export.test.js.map +1 -0
  214. package/dist/nexus-cli/src/commands/ai/context-v2.d.ts +19 -0
  215. package/dist/nexus-cli/src/commands/ai/context-v2.js +115 -0
  216. package/dist/nexus-cli/src/commands/ai/context-v2.js.map +1 -0
  217. package/dist/nexus-cli/src/commands/ai/help.d.ts +14 -0
  218. package/dist/nexus-cli/src/commands/ai/help.js +129 -0
  219. package/dist/nexus-cli/src/commands/ai/help.js.map +1 -0
  220. package/dist/nexus-cli/src/commands/ai/help.test.d.ts +1 -0
  221. package/dist/nexus-cli/src/commands/ai/help.test.js +114 -0
  222. package/dist/nexus-cli/src/commands/ai/help.test.js.map +1 -0
  223. package/dist/nexus-cli/src/commands/ai/index.d.ts +2 -0
  224. package/dist/nexus-cli/src/commands/ai/index.js +21 -0
  225. package/dist/nexus-cli/src/commands/ai/index.js.map +1 -0
  226. package/dist/nexus-cli/src/commands/changeset/index.d.ts +6 -0
  227. package/dist/nexus-cli/src/commands/changeset/index.js +250 -0
  228. package/dist/nexus-cli/src/commands/changeset/index.js.map +1 -0
  229. package/dist/nexus-cli/src/commands/changeset/index.test.d.ts +1 -0
  230. package/dist/nexus-cli/src/commands/changeset/index.test.js +68 -0
  231. package/dist/nexus-cli/src/commands/changeset/index.test.js.map +1 -0
  232. package/dist/nexus-cli/src/commands/commands.test.d.ts +1 -0
  233. package/dist/nexus-cli/src/commands/commands.test.js +106 -0
  234. package/dist/nexus-cli/src/commands/commands.test.js.map +1 -0
  235. package/dist/nexus-cli/src/commands/customer-entitlement/activate.d.ts +2 -0
  236. package/dist/nexus-cli/src/commands/customer-entitlement/activate.js +49 -0
  237. package/dist/nexus-cli/src/commands/customer-entitlement/activate.js.map +1 -0
  238. package/dist/nexus-cli/src/commands/customer-entitlement/create.d.ts +2 -0
  239. package/dist/nexus-cli/src/commands/customer-entitlement/create.js +70 -0
  240. package/dist/nexus-cli/src/commands/customer-entitlement/create.js.map +1 -0
  241. package/dist/nexus-cli/src/commands/customer-entitlement/deactivate.d.ts +2 -0
  242. package/dist/nexus-cli/src/commands/customer-entitlement/deactivate.js +49 -0
  243. package/dist/nexus-cli/src/commands/customer-entitlement/deactivate.js.map +1 -0
  244. package/dist/nexus-cli/src/commands/customer-entitlement/get.d.ts +2 -0
  245. package/dist/nexus-cli/src/commands/customer-entitlement/get.js +60 -0
  246. package/dist/nexus-cli/src/commands/customer-entitlement/get.js.map +1 -0
  247. package/dist/nexus-cli/src/commands/customer-entitlement/index.d.ts +2 -0
  248. package/dist/nexus-cli/src/commands/customer-entitlement/index.js +21 -0
  249. package/dist/nexus-cli/src/commands/customer-entitlement/index.js.map +1 -0
  250. package/dist/nexus-cli/src/commands/customer-entitlement/list.d.ts +2 -0
  251. package/dist/nexus-cli/src/commands/customer-entitlement/list.js +56 -0
  252. package/dist/nexus-cli/src/commands/customer-entitlement/list.js.map +1 -0
  253. package/dist/nexus-cli/src/commands/customer-entitlement/validate.d.ts +2 -0
  254. package/dist/nexus-cli/src/commands/customer-entitlement/validate.js +52 -0
  255. package/dist/nexus-cli/src/commands/customer-entitlement/validate.js.map +1 -0
  256. package/dist/nexus-cli/src/commands/data/delete-bulk.d.ts +2 -0
  257. package/dist/nexus-cli/src/commands/data/delete-bulk.js +24 -0
  258. package/dist/nexus-cli/src/commands/data/delete-bulk.js.map +1 -0
  259. package/dist/nexus-cli/src/commands/data/export-tree.d.ts +2 -0
  260. package/dist/nexus-cli/src/commands/data/export-tree.js +71 -0
  261. package/dist/nexus-cli/src/commands/data/export-tree.js.map +1 -0
  262. package/dist/nexus-cli/src/commands/data/import-tree.d.ts +2 -0
  263. package/dist/nexus-cli/src/commands/data/import-tree.js +68 -0
  264. package/dist/nexus-cli/src/commands/data/import-tree.js.map +1 -0
  265. package/dist/nexus-cli/src/commands/data/index.d.ts +2 -0
  266. package/dist/nexus-cli/src/commands/data/index.js +17 -0
  267. package/dist/nexus-cli/src/commands/data/index.js.map +1 -0
  268. package/dist/nexus-cli/src/commands/data/query.d.ts +2 -0
  269. package/dist/nexus-cli/src/commands/data/query.js +49 -0
  270. package/dist/nexus-cli/src/commands/data/query.js.map +1 -0
  271. package/dist/nexus-cli/src/commands/deployment/employee-report.d.ts +2 -0
  272. package/dist/nexus-cli/src/commands/deployment/employee-report.js +82 -0
  273. package/dist/nexus-cli/src/commands/deployment/employee-report.js.map +1 -0
  274. package/dist/nexus-cli/src/commands/deployment/index.d.ts +2 -0
  275. package/dist/nexus-cli/src/commands/deployment/index.js +86 -0
  276. package/dist/nexus-cli/src/commands/deployment/index.js.map +1 -0
  277. package/dist/nexus-cli/src/commands/deployment/quick.d.ts +2 -0
  278. package/dist/nexus-cli/src/commands/deployment/quick.js +53 -0
  279. package/dist/nexus-cli/src/commands/deployment/quick.js.map +1 -0
  280. package/dist/nexus-cli/src/commands/deployment/report.d.ts +2 -0
  281. package/dist/nexus-cli/src/commands/deployment/report.js +142 -0
  282. package/dist/nexus-cli/src/commands/deployment/report.js.map +1 -0
  283. package/dist/nexus-cli/src/commands/deployment/resume.d.ts +2 -0
  284. package/dist/nexus-cli/src/commands/deployment/resume.js +119 -0
  285. package/dist/nexus-cli/src/commands/deployment/resume.js.map +1 -0
  286. package/dist/nexus-cli/src/commands/dx-pages.d.ts +18 -0
  287. package/dist/nexus-cli/src/commands/dx-pages.js +213 -0
  288. package/dist/nexus-cli/src/commands/dx-pages.js.map +1 -0
  289. package/dist/nexus-cli/src/commands/dx-release-boundary.e2e.test.d.ts +1 -0
  290. package/dist/nexus-cli/src/commands/dx-release-boundary.e2e.test.js +624 -0
  291. package/dist/nexus-cli/src/commands/dx-release-boundary.e2e.test.js.map +1 -0
  292. package/dist/nexus-cli/src/commands/dx-workflows.e2e.test.d.ts +1 -0
  293. package/dist/nexus-cli/src/commands/dx-workflows.e2e.test.js +659 -0
  294. package/dist/nexus-cli/src/commands/dx-workflows.e2e.test.js.map +1 -0
  295. package/dist/nexus-cli/src/commands/dx.d.ts +17 -0
  296. package/dist/nexus-cli/src/commands/dx.js +857 -0
  297. package/dist/nexus-cli/src/commands/dx.js.map +1 -0
  298. package/dist/nexus-cli/src/commands/employee/bundle.d.ts +16 -0
  299. package/dist/nexus-cli/src/commands/employee/bundle.js +213 -0
  300. package/dist/nexus-cli/src/commands/employee/bundle.js.map +1 -0
  301. package/dist/nexus-cli/src/commands/employee/code.d.ts +2 -0
  302. package/dist/nexus-cli/src/commands/employee/code.js +119 -0
  303. package/dist/nexus-cli/src/commands/employee/code.js.map +1 -0
  304. package/dist/nexus-cli/src/commands/employee/deploy.d.ts +2 -0
  305. package/dist/nexus-cli/src/commands/employee/deploy.e2e.test.d.ts +1 -0
  306. package/dist/nexus-cli/src/commands/employee/deploy.e2e.test.js +199 -0
  307. package/dist/nexus-cli/src/commands/employee/deploy.e2e.test.js.map +1 -0
  308. package/dist/nexus-cli/src/commands/employee/deploy.js +97 -0
  309. package/dist/nexus-cli/src/commands/employee/deploy.js.map +1 -0
  310. package/dist/nexus-cli/src/commands/employee/flow.d.ts +2 -0
  311. package/dist/nexus-cli/src/commands/employee/flow.js +96 -0
  312. package/dist/nexus-cli/src/commands/employee/flow.js.map +1 -0
  313. package/dist/nexus-cli/src/commands/employee/index.d.ts +2 -0
  314. package/dist/nexus-cli/src/commands/employee/index.js +17 -0
  315. package/dist/nexus-cli/src/commands/employee/index.js.map +1 -0
  316. package/dist/nexus-cli/src/commands/entitlement/grant.d.ts +2 -0
  317. package/dist/nexus-cli/src/commands/entitlement/grant.js +41 -0
  318. package/dist/nexus-cli/src/commands/entitlement/grant.js.map +1 -0
  319. package/dist/nexus-cli/src/commands/entitlement/index.d.ts +2 -0
  320. package/dist/nexus-cli/src/commands/entitlement/index.js +15 -0
  321. package/dist/nexus-cli/src/commands/entitlement/index.js.map +1 -0
  322. package/dist/nexus-cli/src/commands/entitlement/list.d.ts +2 -0
  323. package/dist/nexus-cli/src/commands/entitlement/list.js +34 -0
  324. package/dist/nexus-cli/src/commands/entitlement/list.js.map +1 -0
  325. package/dist/nexus-cli/src/commands/entitlement/revoke.d.ts +2 -0
  326. package/dist/nexus-cli/src/commands/entitlement/revoke.js +36 -0
  327. package/dist/nexus-cli/src/commands/entitlement/revoke.js.map +1 -0
  328. package/dist/nexus-cli/src/commands/generate/class.d.ts +2 -0
  329. package/dist/nexus-cli/src/commands/generate/class.js +64 -0
  330. package/dist/nexus-cli/src/commands/generate/class.js.map +1 -0
  331. package/dist/nexus-cli/src/commands/generate/component.d.ts +2 -0
  332. package/dist/nexus-cli/src/commands/generate/component.js +67 -0
  333. package/dist/nexus-cli/src/commands/generate/component.js.map +1 -0
  334. package/dist/nexus-cli/src/commands/generate/index.d.ts +2 -0
  335. package/dist/nexus-cli/src/commands/generate/index.js +20 -0
  336. package/dist/nexus-cli/src/commands/generate/index.js.map +1 -0
  337. package/dist/nexus-cli/src/commands/generate/project.d.ts +25 -0
  338. package/dist/nexus-cli/src/commands/generate/project.js +574 -0
  339. package/dist/nexus-cli/src/commands/generate/project.js.map +1 -0
  340. package/dist/nexus-cli/src/commands/generate/project.test.d.ts +1 -0
  341. package/dist/nexus-cli/src/commands/generate/project.test.js +214 -0
  342. package/dist/nexus-cli/src/commands/generate/project.test.js.map +1 -0
  343. package/dist/nexus-cli/src/commands/generate/test.d.ts +2 -0
  344. package/dist/nexus-cli/src/commands/generate/test.js +61 -0
  345. package/dist/nexus-cli/src/commands/generate/test.js.map +1 -0
  346. package/dist/nexus-cli/src/commands/generate/trigger.d.ts +2 -0
  347. package/dist/nexus-cli/src/commands/generate/trigger.js +67 -0
  348. package/dist/nexus-cli/src/commands/generate/trigger.js.map +1 -0
  349. package/dist/nexus-cli/src/commands/index.d.ts +2 -0
  350. package/dist/nexus-cli/src/commands/index.js +23 -0
  351. package/dist/nexus-cli/src/commands/index.js.map +1 -0
  352. package/dist/nexus-cli/src/commands/install-contract/index.d.ts +2 -0
  353. package/dist/nexus-cli/src/commands/install-contract/index.js +146 -0
  354. package/dist/nexus-cli/src/commands/install-contract/index.js.map +1 -0
  355. package/dist/nexus-cli/src/commands/log/get.d.ts +2 -0
  356. package/dist/nexus-cli/src/commands/log/get.js +20 -0
  357. package/dist/nexus-cli/src/commands/log/get.js.map +1 -0
  358. package/dist/nexus-cli/src/commands/log/index.d.ts +2 -0
  359. package/dist/nexus-cli/src/commands/log/index.js +15 -0
  360. package/dist/nexus-cli/src/commands/log/index.js.map +1 -0
  361. package/dist/nexus-cli/src/commands/log/list.d.ts +2 -0
  362. package/dist/nexus-cli/src/commands/log/list.js +34 -0
  363. package/dist/nexus-cli/src/commands/log/list.js.map +1 -0
  364. package/dist/nexus-cli/src/commands/log/tail.d.ts +3 -0
  365. package/dist/nexus-cli/src/commands/log/tail.js +91 -0
  366. package/dist/nexus-cli/src/commands/log/tail.js.map +1 -0
  367. package/dist/nexus-cli/src/commands/metadata/deploy.d.ts +2 -0
  368. package/dist/nexus-cli/src/commands/metadata/deploy.js +117 -0
  369. package/dist/nexus-cli/src/commands/metadata/deploy.js.map +1 -0
  370. package/dist/nexus-cli/src/commands/metadata/diff.d.ts +2 -0
  371. package/dist/nexus-cli/src/commands/metadata/diff.js +41 -0
  372. package/dist/nexus-cli/src/commands/metadata/diff.js.map +1 -0
  373. package/dist/nexus-cli/src/commands/metadata/export.d.ts +2 -0
  374. package/dist/nexus-cli/src/commands/metadata/export.e2e.test.d.ts +1 -0
  375. package/dist/nexus-cli/src/commands/metadata/export.e2e.test.js +105 -0
  376. package/dist/nexus-cli/src/commands/metadata/export.e2e.test.js.map +1 -0
  377. package/dist/nexus-cli/src/commands/metadata/export.js +65 -0
  378. package/dist/nexus-cli/src/commands/metadata/export.js.map +1 -0
  379. package/dist/nexus-cli/src/commands/metadata/import.d.ts +2 -0
  380. package/dist/nexus-cli/src/commands/metadata/import.js +47 -0
  381. package/dist/nexus-cli/src/commands/metadata/import.js.map +1 -0
  382. package/dist/nexus-cli/src/commands/metadata/retrieve.d.ts +2 -0
  383. package/dist/nexus-cli/src/commands/metadata/retrieve.js +57 -0
  384. package/dist/nexus-cli/src/commands/metadata/retrieve.js.map +1 -0
  385. package/dist/nexus-cli/src/commands/metadata/validate-source.d.ts +2 -0
  386. package/dist/nexus-cli/src/commands/metadata/validate-source.js +38 -0
  387. package/dist/nexus-cli/src/commands/metadata/validate-source.js.map +1 -0
  388. package/dist/nexus-cli/src/commands/metadata/validate.d.ts +2 -0
  389. package/dist/nexus-cli/src/commands/metadata/validate.js +61 -0
  390. package/dist/nexus-cli/src/commands/metadata/validate.js.map +1 -0
  391. package/dist/nexus-cli/src/commands/org/default-set.d.ts +2 -0
  392. package/dist/nexus-cli/src/commands/org/default-set.js +19 -0
  393. package/dist/nexus-cli/src/commands/org/default-set.js.map +1 -0
  394. package/dist/nexus-cli/src/commands/org/display.d.ts +2 -0
  395. package/dist/nexus-cli/src/commands/org/display.js +48 -0
  396. package/dist/nexus-cli/src/commands/org/display.js.map +1 -0
  397. package/dist/nexus-cli/src/commands/org/index.d.ts +2 -0
  398. package/dist/nexus-cli/src/commands/org/index.js +23 -0
  399. package/dist/nexus-cli/src/commands/org/index.js.map +1 -0
  400. package/dist/nexus-cli/src/commands/org/list.d.ts +2 -0
  401. package/dist/nexus-cli/src/commands/org/list.js +45 -0
  402. package/dist/nexus-cli/src/commands/org/list.js.map +1 -0
  403. package/dist/nexus-cli/src/commands/org/login-jwt.d.ts +25 -0
  404. package/dist/nexus-cli/src/commands/org/login-jwt.js +82 -0
  405. package/dist/nexus-cli/src/commands/org/login-jwt.js.map +1 -0
  406. package/dist/nexus-cli/src/commands/org/login-jwt.test.d.ts +1 -0
  407. package/dist/nexus-cli/src/commands/org/login-jwt.test.js +45 -0
  408. package/dist/nexus-cli/src/commands/org/login-jwt.test.js.map +1 -0
  409. package/dist/nexus-cli/src/commands/org/login-web.d.ts +9 -0
  410. package/dist/nexus-cli/src/commands/org/login-web.js +419 -0
  411. package/dist/nexus-cli/src/commands/org/login-web.js.map +1 -0
  412. package/dist/nexus-cli/src/commands/org/login-web.test.d.ts +1 -0
  413. package/dist/nexus-cli/src/commands/org/login-web.test.js +66 -0
  414. package/dist/nexus-cli/src/commands/org/login-web.test.js.map +1 -0
  415. package/dist/nexus-cli/src/commands/org/logout.d.ts +2 -0
  416. package/dist/nexus-cli/src/commands/org/logout.js +26 -0
  417. package/dist/nexus-cli/src/commands/org/logout.js.map +1 -0
  418. package/dist/nexus-cli/src/commands/org/open.d.ts +3 -0
  419. package/dist/nexus-cli/src/commands/org/open.js +73 -0
  420. package/dist/nexus-cli/src/commands/org/open.js.map +1 -0
  421. package/dist/nexus-cli/src/commands/package/deprecate.d.ts +2 -0
  422. package/dist/nexus-cli/src/commands/package/deprecate.js +68 -0
  423. package/dist/nexus-cli/src/commands/package/deprecate.js.map +1 -0
  424. package/dist/nexus-cli/src/commands/package/format.d.ts +2 -0
  425. package/dist/nexus-cli/src/commands/package/format.js +30 -0
  426. package/dist/nexus-cli/src/commands/package/format.js.map +1 -0
  427. package/dist/nexus-cli/src/commands/package/helpers.d.ts +33 -0
  428. package/dist/nexus-cli/src/commands/package/helpers.js +118 -0
  429. package/dist/nexus-cli/src/commands/package/helpers.js.map +1 -0
  430. package/dist/nexus-cli/src/commands/package/history.d.ts +2 -0
  431. package/dist/nexus-cli/src/commands/package/history.js +43 -0
  432. package/dist/nexus-cli/src/commands/package/history.js.map +1 -0
  433. package/dist/nexus-cli/src/commands/package/index.d.ts +2 -0
  434. package/dist/nexus-cli/src/commands/package/index.js +51 -0
  435. package/dist/nexus-cli/src/commands/package/index.js.map +1 -0
  436. package/dist/nexus-cli/src/commands/package/info.d.ts +2 -0
  437. package/dist/nexus-cli/src/commands/package/info.js +67 -0
  438. package/dist/nexus-cli/src/commands/package/info.js.map +1 -0
  439. package/dist/nexus-cli/src/commands/package/install.d.ts +2 -0
  440. package/dist/nexus-cli/src/commands/package/install.js +180 -0
  441. package/dist/nexus-cli/src/commands/package/install.js.map +1 -0
  442. package/dist/nexus-cli/src/commands/package/list.d.ts +2 -0
  443. package/dist/nexus-cli/src/commands/package/list.js +81 -0
  444. package/dist/nexus-cli/src/commands/package/list.js.map +1 -0
  445. package/dist/nexus-cli/src/commands/package/pack.d.ts +2 -0
  446. package/dist/nexus-cli/src/commands/package/pack.js +83 -0
  447. package/dist/nexus-cli/src/commands/package/pack.js.map +1 -0
  448. package/dist/nexus-cli/src/commands/package/package-governance.e2e.test.d.ts +1 -0
  449. package/dist/nexus-cli/src/commands/package/package-governance.e2e.test.js +205 -0
  450. package/dist/nexus-cli/src/commands/package/package-governance.e2e.test.js.map +1 -0
  451. package/dist/nexus-cli/src/commands/package/package-lifecycle.e2e.test.d.ts +1 -0
  452. package/dist/nexus-cli/src/commands/package/package-lifecycle.e2e.test.js +386 -0
  453. package/dist/nexus-cli/src/commands/package/package-lifecycle.e2e.test.js.map +1 -0
  454. package/dist/nexus-cli/src/commands/package/package-payload.e2e.test.d.ts +1 -0
  455. package/dist/nexus-cli/src/commands/package/package-payload.e2e.test.js +126 -0
  456. package/dist/nexus-cli/src/commands/package/package-payload.e2e.test.js.map +1 -0
  457. package/dist/nexus-cli/src/commands/package/package-query-json.e2e.test.d.ts +1 -0
  458. package/dist/nexus-cli/src/commands/package/package-query-json.e2e.test.js +84 -0
  459. package/dist/nexus-cli/src/commands/package/package-query-json.e2e.test.js.map +1 -0
  460. package/dist/nexus-cli/src/commands/package/plan.d.ts +2 -0
  461. package/dist/nexus-cli/src/commands/package/plan.js +51 -0
  462. package/dist/nexus-cli/src/commands/package/plan.js.map +1 -0
  463. package/dist/nexus-cli/src/commands/package/promote.d.ts +2 -0
  464. package/dist/nexus-cli/src/commands/package/promote.js +59 -0
  465. package/dist/nexus-cli/src/commands/package/promote.js.map +1 -0
  466. package/dist/nexus-cli/src/commands/package/promotion-history.d.ts +2 -0
  467. package/dist/nexus-cli/src/commands/package/promotion-history.js +39 -0
  468. package/dist/nexus-cli/src/commands/package/promotion-history.js.map +1 -0
  469. package/dist/nexus-cli/src/commands/package/publish.d.ts +2 -0
  470. package/dist/nexus-cli/src/commands/package/publish.js +57 -0
  471. package/dist/nexus-cli/src/commands/package/publish.js.map +1 -0
  472. package/dist/nexus-cli/src/commands/package/rollback.d.ts +2 -0
  473. package/dist/nexus-cli/src/commands/package/rollback.js +137 -0
  474. package/dist/nexus-cli/src/commands/package/rollback.js.map +1 -0
  475. package/dist/nexus-cli/src/commands/package/rollout-status.d.ts +2 -0
  476. package/dist/nexus-cli/src/commands/package/rollout-status.js +27 -0
  477. package/dist/nexus-cli/src/commands/package/rollout-status.js.map +1 -0
  478. package/dist/nexus-cli/src/commands/package/rollout-update.d.ts +2 -0
  479. package/dist/nexus-cli/src/commands/package/rollout-update.js +43 -0
  480. package/dist/nexus-cli/src/commands/package/rollout-update.js.map +1 -0
  481. package/dist/nexus-cli/src/commands/package/rollout-workspaces.d.ts +2 -0
  482. package/dist/nexus-cli/src/commands/package/rollout-workspaces.js +33 -0
  483. package/dist/nexus-cli/src/commands/package/rollout-workspaces.js.map +1 -0
  484. package/dist/nexus-cli/src/commands/package/search.d.ts +2 -0
  485. package/dist/nexus-cli/src/commands/package/search.js +44 -0
  486. package/dist/nexus-cli/src/commands/package/search.js.map +1 -0
  487. package/dist/nexus-cli/src/commands/package/uninstall.d.ts +2 -0
  488. package/dist/nexus-cli/src/commands/package/uninstall.js +53 -0
  489. package/dist/nexus-cli/src/commands/package/uninstall.js.map +1 -0
  490. package/dist/nexus-cli/src/commands/package/upgrade.d.ts +3 -0
  491. package/dist/nexus-cli/src/commands/package/upgrade.js +160 -0
  492. package/dist/nexus-cli/src/commands/package/upgrade.js.map +1 -0
  493. package/dist/nexus-cli/src/commands/package/validate.d.ts +2 -0
  494. package/dist/nexus-cli/src/commands/package/validate.js +130 -0
  495. package/dist/nexus-cli/src/commands/package/validate.js.map +1 -0
  496. package/dist/nexus-cli/src/commands/package/versions.d.ts +2 -0
  497. package/dist/nexus-cli/src/commands/package/versions.js +38 -0
  498. package/dist/nexus-cli/src/commands/package/versions.js.map +1 -0
  499. package/dist/nexus-cli/src/commands/preflight/get.d.ts +2 -0
  500. package/dist/nexus-cli/src/commands/preflight/get.js +54 -0
  501. package/dist/nexus-cli/src/commands/preflight/get.js.map +1 -0
  502. package/dist/nexus-cli/src/commands/preflight/index.d.ts +2 -0
  503. package/dist/nexus-cli/src/commands/preflight/index.js +13 -0
  504. package/dist/nexus-cli/src/commands/preflight/index.js.map +1 -0
  505. package/dist/nexus-cli/src/commands/preflight/run.d.ts +2 -0
  506. package/dist/nexus-cli/src/commands/preflight/run.e2e.test.d.ts +1 -0
  507. package/dist/nexus-cli/src/commands/preflight/run.e2e.test.js +159 -0
  508. package/dist/nexus-cli/src/commands/preflight/run.e2e.test.js.map +1 -0
  509. package/dist/nexus-cli/src/commands/preflight/run.js +81 -0
  510. package/dist/nexus-cli/src/commands/preflight/run.js.map +1 -0
  511. package/dist/nexus-cli/src/commands/project/convert.d.ts +2 -0
  512. package/dist/nexus-cli/src/commands/project/convert.js +323 -0
  513. package/dist/nexus-cli/src/commands/project/convert.js.map +1 -0
  514. package/dist/nexus-cli/src/commands/project/deploy-start.d.ts +2 -0
  515. package/dist/nexus-cli/src/commands/project/deploy-start.js +164 -0
  516. package/dist/nexus-cli/src/commands/project/deploy-start.js.map +1 -0
  517. package/dist/nexus-cli/src/commands/project/index.d.ts +2 -0
  518. package/dist/nexus-cli/src/commands/project/index.js +47 -0
  519. package/dist/nexus-cli/src/commands/project/index.js.map +1 -0
  520. package/dist/nexus-cli/src/commands/revision/baseline.d.ts +4 -0
  521. package/dist/nexus-cli/src/commands/revision/baseline.js +44 -0
  522. package/dist/nexus-cli/src/commands/revision/baseline.js.map +1 -0
  523. package/dist/nexus-cli/src/commands/revision/diff.d.ts +2 -0
  524. package/dist/nexus-cli/src/commands/revision/diff.js +33 -0
  525. package/dist/nexus-cli/src/commands/revision/diff.js.map +1 -0
  526. package/dist/nexus-cli/src/commands/revision/history.d.ts +2 -0
  527. package/dist/nexus-cli/src/commands/revision/history.js +52 -0
  528. package/dist/nexus-cli/src/commands/revision/history.js.map +1 -0
  529. package/dist/nexus-cli/src/commands/revision/index.d.ts +2 -0
  530. package/dist/nexus-cli/src/commands/revision/index.js +17 -0
  531. package/dist/nexus-cli/src/commands/revision/index.js.map +1 -0
  532. package/dist/nexus-cli/src/commands/revision/revision.e2e.test.d.ts +1 -0
  533. package/dist/nexus-cli/src/commands/revision/revision.e2e.test.js +135 -0
  534. package/dist/nexus-cli/src/commands/revision/revision.e2e.test.js.map +1 -0
  535. package/dist/nexus-cli/src/commands/revision/rollback.d.ts +2 -0
  536. package/dist/nexus-cli/src/commands/revision/rollback.js +26 -0
  537. package/dist/nexus-cli/src/commands/revision/rollback.js.map +1 -0
  538. package/dist/nexus-cli/src/commands/sandbox/create.d.ts +2 -0
  539. package/dist/nexus-cli/src/commands/sandbox/create.js +25 -0
  540. package/dist/nexus-cli/src/commands/sandbox/create.js.map +1 -0
  541. package/dist/nexus-cli/src/commands/sandbox/delete.d.ts +2 -0
  542. package/dist/nexus-cli/src/commands/sandbox/delete.js +24 -0
  543. package/dist/nexus-cli/src/commands/sandbox/delete.js.map +1 -0
  544. package/dist/nexus-cli/src/commands/sandbox/index.d.ts +2 -0
  545. package/dist/nexus-cli/src/commands/sandbox/index.js +17 -0
  546. package/dist/nexus-cli/src/commands/sandbox/index.js.map +1 -0
  547. package/dist/nexus-cli/src/commands/sandbox/list.d.ts +2 -0
  548. package/dist/nexus-cli/src/commands/sandbox/list.js +30 -0
  549. package/dist/nexus-cli/src/commands/sandbox/list.js.map +1 -0
  550. package/dist/nexus-cli/src/commands/sandbox/promote.d.ts +2 -0
  551. package/dist/nexus-cli/src/commands/sandbox/promote.e2e.test.d.ts +1 -0
  552. package/dist/nexus-cli/src/commands/sandbox/promote.e2e.test.js +120 -0
  553. package/dist/nexus-cli/src/commands/sandbox/promote.e2e.test.js.map +1 -0
  554. package/dist/nexus-cli/src/commands/sandbox/promote.js +69 -0
  555. package/dist/nexus-cli/src/commands/sandbox/promote.js.map +1 -0
  556. package/dist/nexus-cli/src/commands/script/index.d.ts +2 -0
  557. package/dist/nexus-cli/src/commands/script/index.js +11 -0
  558. package/dist/nexus-cli/src/commands/script/index.js.map +1 -0
  559. package/dist/nexus-cli/src/commands/script/run.d.ts +2 -0
  560. package/dist/nexus-cli/src/commands/script/run.js +78 -0
  561. package/dist/nexus-cli/src/commands/script/run.js.map +1 -0
  562. package/dist/nexus-cli/src/commands/source/dx-pull-pages.e2e.test.d.ts +1 -0
  563. package/dist/nexus-cli/src/commands/source/dx-pull-pages.e2e.test.js +336 -0
  564. package/dist/nexus-cli/src/commands/source/dx-pull-pages.e2e.test.js.map +1 -0
  565. package/dist/nexus-cli/src/commands/source/get.d.ts +2 -0
  566. package/dist/nexus-cli/src/commands/source/get.js +34 -0
  567. package/dist/nexus-cli/src/commands/source/get.js.map +1 -0
  568. package/dist/nexus-cli/src/commands/source/index.d.ts +2 -0
  569. package/dist/nexus-cli/src/commands/source/index.js +17 -0
  570. package/dist/nexus-cli/src/commands/source/index.js.map +1 -0
  571. package/dist/nexus-cli/src/commands/source/pull.d.ts +2 -0
  572. package/dist/nexus-cli/src/commands/source/pull.js +167 -0
  573. package/dist/nexus-cli/src/commands/source/pull.js.map +1 -0
  574. package/dist/nexus-cli/src/commands/source/push.d.ts +2 -0
  575. package/dist/nexus-cli/src/commands/source/push.js +172 -0
  576. package/dist/nexus-cli/src/commands/source/push.js.map +1 -0
  577. package/dist/nexus-cli/src/commands/source/source-page-diff.e2e.test.d.ts +1 -0
  578. package/dist/nexus-cli/src/commands/source/source-page-diff.e2e.test.js +318 -0
  579. package/dist/nexus-cli/src/commands/source/source-page-diff.e2e.test.js.map +1 -0
  580. package/dist/nexus-cli/src/commands/source/source-sync.e2e.test.d.ts +1 -0
  581. package/dist/nexus-cli/src/commands/source/source-sync.e2e.test.js +274 -0
  582. package/dist/nexus-cli/src/commands/source/source-sync.e2e.test.js.map +1 -0
  583. package/dist/nexus-cli/src/commands/source/status.d.ts +2 -0
  584. package/dist/nexus-cli/src/commands/source/status.js +132 -0
  585. package/dist/nexus-cli/src/commands/source/status.js.map +1 -0
  586. package/dist/nexus-cli/src/commands/test/index.d.ts +2 -0
  587. package/dist/nexus-cli/src/commands/test/index.js +13 -0
  588. package/dist/nexus-cli/src/commands/test/index.js.map +1 -0
  589. package/dist/nexus-cli/src/commands/test/report.d.ts +2 -0
  590. package/dist/nexus-cli/src/commands/test/report.js +38 -0
  591. package/dist/nexus-cli/src/commands/test/report.js.map +1 -0
  592. package/dist/nexus-cli/src/commands/test/run.d.ts +2 -0
  593. package/dist/nexus-cli/src/commands/test/run.js +49 -0
  594. package/dist/nexus-cli/src/commands/test/run.js.map +1 -0
  595. package/dist/nexus-cli/src/commands/validate/index.d.ts +2 -0
  596. package/dist/nexus-cli/src/commands/validate/index.js +55 -0
  597. package/dist/nexus-cli/src/commands/validate/index.js.map +1 -0
  598. package/dist/nexus-cli/src/commands/workspace/index.d.ts +2 -0
  599. package/dist/nexus-cli/src/commands/workspace/index.js +412 -0
  600. package/dist/nexus-cli/src/commands/workspace/index.js.map +1 -0
  601. package/dist/nexus-cli/src/commands/workspace/workspace.e2e.test.d.ts +1 -0
  602. package/dist/nexus-cli/src/commands/workspace/workspace.e2e.test.js +320 -0
  603. package/dist/nexus-cli/src/commands/workspace/workspace.e2e.test.js.map +1 -0
  604. package/dist/nexus-cli/src/config/metadata-type-map.json +12 -0
  605. package/dist/nexus-cli/src/contracts/argv-predicate.d.ts +17 -0
  606. package/dist/nexus-cli/src/contracts/argv-predicate.js +88 -0
  607. package/dist/nexus-cli/src/contracts/argv-predicate.js.map +1 -0
  608. package/dist/nexus-cli/src/contracts/command-contract.d.ts +15 -0
  609. package/dist/nexus-cli/src/contracts/command-contract.exporter.d.ts +7 -0
  610. package/dist/nexus-cli/src/contracts/command-contract.exporter.js +24 -0
  611. package/dist/nexus-cli/src/contracts/command-contract.exporter.js.map +1 -0
  612. package/dist/nexus-cli/src/contracts/command-contract.guard.d.ts +5 -0
  613. package/dist/nexus-cli/src/contracts/command-contract.guard.js +149 -0
  614. package/dist/nexus-cli/src/contracts/command-contract.guard.js.map +1 -0
  615. package/dist/nexus-cli/src/contracts/command-contract.js +39 -0
  616. package/dist/nexus-cli/src/contracts/command-contract.js.map +1 -0
  617. package/dist/nexus-cli/src/contracts/command-contract.registry.d.ts +16 -0
  618. package/dist/nexus-cli/src/contracts/command-contract.registry.js +542 -0
  619. package/dist/nexus-cli/src/contracts/command-contract.registry.js.map +1 -0
  620. package/dist/nexus-cli/src/contracts/command-order.d.ts +23 -0
  621. package/dist/nexus-cli/src/contracts/command-order.js +151 -0
  622. package/dist/nexus-cli/src/contracts/command-order.js.map +1 -0
  623. package/dist/nexus-cli/src/contracts/contracts.test.d.ts +1 -0
  624. package/dist/nexus-cli/src/contracts/contracts.test.js +301 -0
  625. package/dist/nexus-cli/src/contracts/contracts.test.js.map +1 -0
  626. package/dist/nexus-cli/src/contracts/exit-codes.d.ts +3 -0
  627. package/dist/nexus-cli/src/contracts/exit-codes.js +7 -0
  628. package/dist/nexus-cli/src/contracts/exit-codes.js.map +1 -0
  629. package/dist/nexus-cli/src/contracts/index.d.ts +8 -0
  630. package/dist/nexus-cli/src/contracts/index.js +35 -0
  631. package/dist/nexus-cli/src/contracts/index.js.map +1 -0
  632. package/dist/nexus-cli/src/contracts/machine-result.d.ts +21 -0
  633. package/dist/nexus-cli/src/contracts/machine-result.js +95 -0
  634. package/dist/nexus-cli/src/contracts/machine-result.js.map +1 -0
  635. package/dist/nexus-cli/src/services/ai-authoring-context-v2.d.ts +30 -0
  636. package/dist/nexus-cli/src/services/ai-authoring-context-v2.js +386 -0
  637. package/dist/nexus-cli/src/services/ai-authoring-context-v2.js.map +1 -0
  638. package/dist/nexus-cli/src/services/ai-authoring-context-v2.test.d.ts +1 -0
  639. package/dist/nexus-cli/src/services/ai-authoring-context-v2.test.js +171 -0
  640. package/dist/nexus-cli/src/services/ai-authoring-context-v2.test.js.map +1 -0
  641. package/dist/nexus-cli/src/services/ai-context-managed-install.d.ts +16 -0
  642. package/dist/nexus-cli/src/services/ai-context-managed-install.js +79 -0
  643. package/dist/nexus-cli/src/services/ai-context-managed-install.js.map +1 -0
  644. package/dist/nexus-cli/src/services/ai-context-pack.d.ts +33 -0
  645. package/dist/nexus-cli/src/services/ai-context-pack.js +72 -0
  646. package/dist/nexus-cli/src/services/ai-context-pack.js.map +1 -0
  647. package/dist/nexus-cli/src/services/ai-context-pack.test.d.ts +1 -0
  648. package/dist/nexus-cli/src/services/ai-context-pack.test.js +102 -0
  649. package/dist/nexus-cli/src/services/ai-context-pack.test.js.map +1 -0
  650. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.d.ts +17 -0
  651. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.js +160 -0
  652. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.js.map +1 -0
  653. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.test.d.ts +1 -0
  654. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.test.js +114 -0
  655. package/dist/nexus-cli/src/services/ai-context-signing-key-cache.test.js.map +1 -0
  656. package/dist/nexus-cli/src/services/api-client.d.ts +1097 -0
  657. package/dist/nexus-cli/src/services/api-client.js +1352 -0
  658. package/dist/nexus-cli/src/services/api-client.js.map +1 -0
  659. package/dist/nexus-cli/src/services/api-client.test.d.ts +1 -0
  660. package/dist/nexus-cli/src/services/api-client.test.js +669 -0
  661. package/dist/nexus-cli/src/services/api-client.test.js.map +1 -0
  662. package/dist/nexus-cli/src/services/auth-store.d.ts +19 -0
  663. package/dist/nexus-cli/src/services/auth-store.js +146 -0
  664. package/dist/nexus-cli/src/services/auth-store.js.map +1 -0
  665. package/dist/nexus-cli/src/services/auth-store.test.d.ts +1 -0
  666. package/dist/nexus-cli/src/services/auth-store.test.js +104 -0
  667. package/dist/nexus-cli/src/services/auth-store.test.js.map +1 -0
  668. package/dist/nexus-cli/src/services/code-authoring-local.d.ts +65 -0
  669. package/dist/nexus-cli/src/services/code-authoring-local.js +403 -0
  670. package/dist/nexus-cli/src/services/code-authoring-local.js.map +1 -0
  671. package/dist/nexus-cli/src/services/code-authoring-local.test.d.ts +1 -0
  672. package/dist/nexus-cli/src/services/code-authoring-local.test.js +129 -0
  673. package/dist/nexus-cli/src/services/code-authoring-local.test.js.map +1 -0
  674. package/dist/nexus-cli/src/services/code-extension-governance.d.ts +4 -0
  675. package/dist/nexus-cli/src/services/code-extension-governance.js +217 -0
  676. package/dist/nexus-cli/src/services/code-extension-governance.js.map +1 -0
  677. package/dist/nexus-cli/src/services/config.d.ts +23 -0
  678. package/dist/nexus-cli/src/services/config.js +109 -0
  679. package/dist/nexus-cli/src/services/config.js.map +1 -0
  680. package/dist/nexus-cli/src/services/config.test.d.ts +1 -0
  681. package/dist/nexus-cli/src/services/config.test.js +120 -0
  682. package/dist/nexus-cli/src/services/config.test.js.map +1 -0
  683. package/dist/nexus-cli/src/services/core-version.d.ts +14 -0
  684. package/dist/nexus-cli/src/services/core-version.js +149 -0
  685. package/dist/nexus-cli/src/services/core-version.js.map +1 -0
  686. package/dist/nexus-cli/src/services/executable-workforce-future-api.types.d.ts +22 -0
  687. package/dist/nexus-cli/src/services/executable-workforce-future-api.types.js +3 -0
  688. package/dist/nexus-cli/src/services/executable-workforce-future-api.types.js.map +1 -0
  689. package/dist/nexus-cli/src/services/flow-authoring-local.d.ts +46 -0
  690. package/dist/nexus-cli/src/services/flow-authoring-local.js +116 -0
  691. package/dist/nexus-cli/src/services/flow-authoring-local.js.map +1 -0
  692. package/dist/nexus-cli/src/services/flow-authoring-local.test.d.ts +1 -0
  693. package/dist/nexus-cli/src/services/flow-authoring-local.test.js +51 -0
  694. package/dist/nexus-cli/src/services/flow-authoring-local.test.js.map +1 -0
  695. package/dist/nexus-cli/src/services/json-diff.d.ts +8 -0
  696. package/dist/nexus-cli/src/services/json-diff.js +66 -0
  697. package/dist/nexus-cli/src/services/json-diff.js.map +1 -0
  698. package/dist/nexus-cli/src/services/manifest-parser.d.ts +10 -0
  699. package/dist/nexus-cli/src/services/manifest-parser.js +82 -0
  700. package/dist/nexus-cli/src/services/manifest-parser.js.map +1 -0
  701. package/dist/nexus-cli/src/services/pack-registry.d.ts +55 -0
  702. package/dist/nexus-cli/src/services/pack-registry.js +450 -0
  703. package/dist/nexus-cli/src/services/pack-registry.js.map +1 -0
  704. package/dist/nexus-cli/src/services/pack-registry.test.d.ts +1 -0
  705. package/dist/nexus-cli/src/services/pack-registry.test.js +108 -0
  706. package/dist/nexus-cli/src/services/pack-registry.test.js.map +1 -0
  707. package/dist/nexus-cli/src/services/package-manifest.d.ts +14 -0
  708. package/dist/nexus-cli/src/services/package-manifest.js +313 -0
  709. package/dist/nexus-cli/src/services/package-manifest.js.map +1 -0
  710. package/dist/nexus-cli/src/services/package-pack-inventory.d.ts +7 -0
  711. package/dist/nexus-cli/src/services/package-pack-inventory.js +126 -0
  712. package/dist/nexus-cli/src/services/package-pack-inventory.js.map +1 -0
  713. package/dist/nexus-cli/src/services/package-pack-inventory.test.d.ts +1 -0
  714. package/dist/nexus-cli/src/services/package-pack-inventory.test.js +133 -0
  715. package/dist/nexus-cli/src/services/package-pack-inventory.test.js.map +1 -0
  716. package/dist/nexus-cli/src/services/package-self-containment.d.ts +47 -0
  717. package/dist/nexus-cli/src/services/package-self-containment.js +223 -0
  718. package/dist/nexus-cli/src/services/package-self-containment.js.map +1 -0
  719. package/dist/nexus-cli/src/services/page-source-file.d.ts +14 -0
  720. package/dist/nexus-cli/src/services/page-source-file.js +114 -0
  721. package/dist/nexus-cli/src/services/page-source-file.js.map +1 -0
  722. package/dist/nexus-cli/src/services/page-source-file.test.d.ts +1 -0
  723. package/dist/nexus-cli/src/services/page-source-file.test.js +154 -0
  724. package/dist/nexus-cli/src/services/page-source-file.test.js.map +1 -0
  725. package/dist/nexus-cli/src/services/revision-ledger/baseline-service.d.ts +8 -0
  726. package/dist/nexus-cli/src/services/revision-ledger/baseline-service.js +65 -0
  727. package/dist/nexus-cli/src/services/revision-ledger/baseline-service.js.map +1 -0
  728. package/dist/nexus-cli/src/services/revision-ledger/drift-calculator.d.ts +7 -0
  729. package/dist/nexus-cli/src/services/revision-ledger/drift-calculator.js +14 -0
  730. package/dist/nexus-cli/src/services/revision-ledger/drift-calculator.js.map +1 -0
  731. package/dist/nexus-cli/src/services/revision-ledger/index.d.ts +13 -0
  732. package/dist/nexus-cli/src/services/revision-ledger/index.js +30 -0
  733. package/dist/nexus-cli/src/services/revision-ledger/index.js.map +1 -0
  734. package/dist/nexus-cli/src/services/revision-ledger/initialize.d.ts +1 -0
  735. package/dist/nexus-cli/src/services/revision-ledger/initialize.js +23 -0
  736. package/dist/nexus-cli/src/services/revision-ledger/initialize.js.map +1 -0
  737. package/dist/nexus-cli/src/services/revision-ledger/ledger-storage.d.ts +14 -0
  738. package/dist/nexus-cli/src/services/revision-ledger/ledger-storage.js +91 -0
  739. package/dist/nexus-cli/src/services/revision-ledger/ledger-storage.js.map +1 -0
  740. package/dist/nexus-cli/src/services/revision-ledger/migration-service.d.ts +8 -0
  741. package/dist/nexus-cli/src/services/revision-ledger/migration-service.js +115 -0
  742. package/dist/nexus-cli/src/services/revision-ledger/migration-service.js.map +1 -0
  743. package/dist/nexus-cli/src/services/revision-ledger/page-source-baseline-store.d.ts +10 -0
  744. package/dist/nexus-cli/src/services/revision-ledger/page-source-baseline-store.js +36 -0
  745. package/dist/nexus-cli/src/services/revision-ledger/page-source-baseline-store.js.map +1 -0
  746. package/dist/nexus-cli/src/services/revision-ledger/query-api.d.ts +4 -0
  747. package/dist/nexus-cli/src/services/revision-ledger/query-api.js +11 -0
  748. package/dist/nexus-cli/src/services/revision-ledger/query-api.js.map +1 -0
  749. package/dist/nexus-cli/src/services/revision-ledger/revision-ledger.test.d.ts +1 -0
  750. package/dist/nexus-cli/src/services/revision-ledger/revision-ledger.test.js +384 -0
  751. package/dist/nexus-cli/src/services/revision-ledger/revision-ledger.test.js.map +1 -0
  752. package/dist/nexus-cli/src/services/revision-ledger/revision-service.d.ts +44 -0
  753. package/dist/nexus-cli/src/services/revision-ledger/revision-service.js +189 -0
  754. package/dist/nexus-cli/src/services/revision-ledger/revision-service.js.map +1 -0
  755. package/dist/nexus-cli/src/services/revision-ledger/rollback-service.d.ts +15 -0
  756. package/dist/nexus-cli/src/services/revision-ledger/rollback-service.js +146 -0
  757. package/dist/nexus-cli/src/services/revision-ledger/rollback-service.js.map +1 -0
  758. package/dist/nexus-cli/src/services/revision-ledger/source-tracking-bridge.d.ts +3 -0
  759. package/dist/nexus-cli/src/services/revision-ledger/source-tracking-bridge.js +22 -0
  760. package/dist/nexus-cli/src/services/revision-ledger/source-tracking-bridge.js.map +1 -0
  761. package/dist/nexus-cli/src/services/revision-ledger/state-helpers.d.ts +23 -0
  762. package/dist/nexus-cli/src/services/revision-ledger/state-helpers.js +357 -0
  763. package/dist/nexus-cli/src/services/revision-ledger/state-helpers.js.map +1 -0
  764. package/dist/nexus-cli/src/services/revision-ledger/types.d.ts +178 -0
  765. package/dist/nexus-cli/src/services/revision-ledger/types.js +3 -0
  766. package/dist/nexus-cli/src/services/revision-ledger/types.js.map +1 -0
  767. package/dist/nexus-cli/src/services/revision-ledger/utils.d.ts +5 -0
  768. package/dist/nexus-cli/src/services/revision-ledger/utils.js +61 -0
  769. package/dist/nexus-cli/src/services/revision-ledger/utils.js.map +1 -0
  770. package/dist/nexus-cli/src/services/source-tracker.d.ts +71 -0
  771. package/dist/nexus-cli/src/services/source-tracker.js +709 -0
  772. package/dist/nexus-cli/src/services/source-tracker.js.map +1 -0
  773. package/dist/nexus-cli/src/services/source-tracker.test.d.ts +1 -0
  774. package/dist/nexus-cli/src/services/source-tracker.test.js +362 -0
  775. package/dist/nexus-cli/src/services/source-tracker.test.js.map +1 -0
  776. package/dist/nexus-cli/src/services/sse-client.d.ts +13 -0
  777. package/dist/nexus-cli/src/services/sse-client.js +107 -0
  778. package/dist/nexus-cli/src/services/sse-client.js.map +1 -0
  779. package/dist/nexus-cli/src/services/target-context.d.ts +31 -0
  780. package/dist/nexus-cli/src/services/target-context.js +91 -0
  781. package/dist/nexus-cli/src/services/target-context.js.map +1 -0
  782. package/dist/nexus-cli/src/services/target-context.test.d.ts +1 -0
  783. package/dist/nexus-cli/src/services/target-context.test.js +93 -0
  784. package/dist/nexus-cli/src/services/target-context.test.js.map +1 -0
  785. package/dist/nexus-cli/src/services/workforce-bundle-archive.d.ts +12 -0
  786. package/dist/nexus-cli/src/services/workforce-bundle-archive.js +102 -0
  787. package/dist/nexus-cli/src/services/workforce-bundle-archive.js.map +1 -0
  788. package/dist/nexus-cli/src/services/workforce-bundle-archive.test.d.ts +1 -0
  789. package/dist/nexus-cli/src/services/workforce-bundle-archive.test.js +54 -0
  790. package/dist/nexus-cli/src/services/workforce-bundle-archive.test.js.map +1 -0
  791. package/dist/nexus-cli/src/services/workforce-bundle-local.d.ts +26 -0
  792. package/dist/nexus-cli/src/services/workforce-bundle-local.js +250 -0
  793. package/dist/nexus-cli/src/services/workforce-bundle-local.js.map +1 -0
  794. package/dist/nexus-cli/src/services/workforce-bundle-local.test.d.ts +1 -0
  795. package/dist/nexus-cli/src/services/workforce-bundle-local.test.js +100 -0
  796. package/dist/nexus-cli/src/services/workforce-bundle-local.test.js.map +1 -0
  797. package/dist/nexus-cli/src/services/workforce-bundle-remote.d.ts +63 -0
  798. package/dist/nexus-cli/src/services/workforce-bundle-remote.js +138 -0
  799. package/dist/nexus-cli/src/services/workforce-bundle-remote.js.map +1 -0
  800. package/dist/nexus-cli/src/services/workforce-remote-operations.d.ts +60 -0
  801. package/dist/nexus-cli/src/services/workforce-remote-operations.e2e.test.d.ts +1 -0
  802. package/dist/nexus-cli/src/services/workforce-remote-operations.e2e.test.js +266 -0
  803. package/dist/nexus-cli/src/services/workforce-remote-operations.e2e.test.js.map +1 -0
  804. package/dist/nexus-cli/src/services/workforce-remote-operations.js +156 -0
  805. package/dist/nexus-cli/src/services/workforce-remote-operations.js.map +1 -0
  806. package/dist/nexus-cli/src/services/workspace-contract.d.ts +140 -0
  807. package/dist/nexus-cli/src/services/workspace-contract.js +744 -0
  808. package/dist/nexus-cli/src/services/workspace-contract.js.map +1 -0
  809. package/dist/nexus-cli/src/services/workspace-contract.test.d.ts +1 -0
  810. package/dist/nexus-cli/src/services/workspace-contract.test.js +404 -0
  811. package/dist/nexus-cli/src/services/workspace-contract.test.js.map +1 -0
  812. package/dist/nexus-cli/src/services/workspace-dx.d.ts +31 -0
  813. package/dist/nexus-cli/src/services/workspace-dx.js +168 -0
  814. package/dist/nexus-cli/src/services/workspace-dx.js.map +1 -0
  815. package/dist/nexus-cli/src/services/workspace-health.d.ts +140 -0
  816. package/dist/nexus-cli/src/services/workspace-health.js +548 -0
  817. package/dist/nexus-cli/src/services/workspace-health.js.map +1 -0
  818. package/dist/nexus-cli/src/services/workspace-health.test.d.ts +1 -0
  819. package/dist/nexus-cli/src/services/workspace-health.test.js +808 -0
  820. package/dist/nexus-cli/src/services/workspace-health.test.js.map +1 -0
  821. package/dist/nexus-cli/src/templates/class.ts.tpl +15 -0
  822. package/dist/nexus-cli/src/templates/component.ts.tpl +28 -0
  823. package/dist/nexus-cli/src/templates/project/nexus-project.json.tpl +6 -0
  824. package/dist/nexus-cli/src/templates/project/package.json.tpl +15 -0
  825. package/dist/nexus-cli/src/templates/project/template-manifest.json +59 -0
  826. package/dist/nexus-cli/src/templates/project/templates/base-crm/README.md.tpl +41 -0
  827. package/dist/nexus-cli/src/templates/project/templates/base-crm/nexus-project.json.tpl +35 -0
  828. package/dist/nexus-cli/src/templates/project/templates/base-crm/package.json.tpl +24 -0
  829. package/dist/nexus-cli/src/templates/project/templates/base-crm/tsconfig.json.tpl +15 -0
  830. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/README.md.tpl +47 -0
  831. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/nexus-project.json.tpl +39 -0
  832. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/package.json.tpl +24 -0
  833. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/scenario-payload/approvals.yaml +80 -0
  834. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/scenario-payload/flows.yaml +77 -0
  835. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/scenario-payload/records.yaml +2109 -0
  836. package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/tsconfig.json.tpl +15 -0
  837. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/README.md.tpl +45 -0
  838. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/deploy-artifacts/drill-code-extension-page.deploy.json +190 -0
  839. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/deploy-artifacts/runtime-account-data-page.png +0 -0
  840. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/deploy-artifacts/runtime-nav-page-formal.png +0 -0
  841. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/deploy-artifacts/runtime-nav-page.png +0 -0
  842. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/deploy-artifacts/runtime-page.png +0 -0
  843. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/env/drill.sandbox.yaml +4 -0
  844. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-project.json.tpl +25 -0
  845. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/package.json.tpl +26 -0
  846. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/preview/drill-code-extension-page.html +31 -0
  847. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/scripts/build-component.mjs +12 -0
  848. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/scripts/deploy-drill.mjs +341 -0
  849. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/src/components/drill-code-extension-page/index.js +70 -0
  850. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/src/metadata/drill-code-extension-page.manifest.json +63 -0
  851. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/src/tests/drill-code-extension-page.assertions.json +13 -0
  852. package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/tsconfig.json.tpl +15 -0
  853. package/dist/nexus-cli/src/templates/project/templates/empty/README.md.tpl +40 -0
  854. package/dist/nexus-cli/src/templates/project/templates/empty/nexus-project.json.tpl +32 -0
  855. package/dist/nexus-cli/src/templates/project/templates/empty/package.json.tpl +24 -0
  856. package/dist/nexus-cli/src/templates/project/templates/empty/tsconfig.json.tpl +15 -0
  857. package/dist/nexus-cli/src/templates/project/templates/industry-education/README.md.tpl +36 -0
  858. package/dist/nexus-cli/src/templates/project/templates/industry-education/nexus-project.json.tpl +37 -0
  859. package/dist/nexus-cli/src/templates/project/templates/industry-education/package.json.tpl +24 -0
  860. package/dist/nexus-cli/src/templates/project/templates/industry-education/tsconfig.json.tpl +15 -0
  861. package/dist/nexus-cli/src/templates/project/templates/industry-finance/README.md.tpl +36 -0
  862. package/dist/nexus-cli/src/templates/project/templates/industry-finance/nexus-project.json.tpl +37 -0
  863. package/dist/nexus-cli/src/templates/project/templates/industry-finance/package.json.tpl +24 -0
  864. package/dist/nexus-cli/src/templates/project/templates/industry-finance/tsconfig.json.tpl +15 -0
  865. package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/README.md.tpl +36 -0
  866. package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/nexus-project.json.tpl +37 -0
  867. package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/package.json.tpl +24 -0
  868. package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/tsconfig.json.tpl +15 -0
  869. package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/README.md.tpl +42 -0
  870. package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/nexus-project.json.tpl +36 -0
  871. package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/package.json.tpl +24 -0
  872. package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/tsconfig.json.tpl +15 -0
  873. package/dist/nexus-cli/src/templates/project/templates/industry-retail/README.md.tpl +36 -0
  874. package/dist/nexus-cli/src/templates/project/templates/industry-retail/nexus-project.json.tpl +37 -0
  875. package/dist/nexus-cli/src/templates/project/templates/industry-retail/package.json.tpl +24 -0
  876. package/dist/nexus-cli/src/templates/project/templates/industry-retail/tsconfig.json.tpl +15 -0
  877. package/dist/nexus-cli/src/templates/project/tsconfig.json.tpl +15 -0
  878. package/dist/nexus-cli/src/templates/test.ts.tpl +24 -0
  879. package/dist/nexus-cli/src/templates/trigger.ts.tpl +26 -0
  880. package/dist/nexus-cli/src/test-discovery.guard.test.d.ts +1 -0
  881. package/dist/nexus-cli/src/test-discovery.guard.test.js +83 -0
  882. package/dist/nexus-cli/src/test-discovery.guard.test.js.map +1 -0
  883. package/dist/nexus-cli/src/test-utils/target-context-fixture.d.ts +10 -0
  884. package/dist/nexus-cli/src/test-utils/target-context-fixture.js +49 -0
  885. package/dist/nexus-cli/src/test-utils/target-context-fixture.js.map +1 -0
  886. package/dist/nexus-cli/src/tests/revision-ledger/properties/generators.d.ts +8 -0
  887. package/dist/nexus-cli/src/tests/revision-ledger/properties/generators.js +85 -0
  888. package/dist/nexus-cli/src/tests/revision-ledger/properties/generators.js.map +1 -0
  889. package/dist/nexus-cli/src/utils/error-handler.d.ts +8 -0
  890. package/dist/nexus-cli/src/utils/error-handler.js +57 -0
  891. package/dist/nexus-cli/src/utils/error-handler.js.map +1 -0
  892. package/dist/nexus-cli/src/utils/logger.d.ts +6 -0
  893. package/dist/nexus-cli/src/utils/logger.js +14 -0
  894. package/dist/nexus-cli/src/utils/logger.js.map +1 -0
  895. package/dist/nexus-cli/src/utils/spinner.d.ts +2 -0
  896. package/dist/nexus-cli/src/utils/spinner.js +11 -0
  897. package/dist/nexus-cli/src/utils/spinner.js.map +1 -0
  898. package/dist/nexus-cli/src/utils/structured-error.d.ts +16 -0
  899. package/dist/nexus-cli/src/utils/structured-error.js +57 -0
  900. package/dist/nexus-cli/src/utils/structured-error.js.map +1 -0
  901. package/dist/nexus-cli/src/utils/table-formatter.d.ts +7 -0
  902. package/dist/nexus-cli/src/utils/table-formatter.js +31 -0
  903. package/dist/nexus-cli/src/utils/table-formatter.js.map +1 -0
  904. package/dist/shared/src/source-format/__tests__/page-source-file.properties.test.d.ts +1 -0
  905. package/dist/shared/src/source-format/__tests__/page-source-file.properties.test.js +167 -0
  906. package/dist/shared/src/source-format/__tests__/page-source-file.properties.test.js.map +1 -0
  907. package/dist/shared/src/source-format/index.d.ts +1 -0
  908. package/dist/shared/src/source-format/index.js +16 -0
  909. package/dist/shared/src/source-format/index.js.map +1 -0
  910. package/dist/shared/src/source-format/page-source-file.d.ts +53 -0
  911. package/dist/shared/src/source-format/page-source-file.js +214 -0
  912. package/dist/shared/src/source-format/page-source-file.js.map +1 -0
  913. package/dist/tsconfig.tsbuildinfo +1 -0
  914. package/package.json +39 -0
@@ -0,0 +1,1261 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_WORKFORCE_LEARNING_STATUS_TRANSITIONS = exports.AI_WORKFORCE_TEMPLATE_KEY_PATTERN = exports.AI_WORKFORCE_STABLE_TOOL_NAME_PATTERN = exports.AI_WORKFORCE_REDACTED_VALUE = exports.AI_WORKFORCE_HIRING_MARKETPLACE_RELEASE_READINESS = exports.AI_WORKFORCE_HIRING_MARKETPLACE_CANDIDATE_TYPES = exports.AI_WORKFORCE_HIRING_MARKETPLACE_SOURCE_TYPES = exports.AI_WORKFORCE_GOAL_TO_AGENT_BLUEPRINT_STATUSES = exports.AI_WORKFORCE_LEARNING_CONTENT_STATUSES = exports.AI_WORKFORCE_TARGET_ARTIFACT_CONTENT_POSTURE = exports.AI_WORKFORCE_LEARNING_CONTENT_POSTURES = exports.AI_WORKFORCE_MODEL_ROUTING_GUARD_REASON_CODES = exports.AI_WORKFORCE_ROLLBACK_REASON_CODES = exports.LEARNING_ELIGIBLE_RISK_LEVELS = exports.AI_WORKFORCE_RISK_LEVELS = exports.AI_WORKFORCE_APPROVAL_STATUSES = exports.AI_WORKFORCE_RELEASE_GATE_STATUSES = exports.AI_WORKFORCE_REDACTION_STATUSES = exports.AI_WORKFORCE_LEARNING_PIPELINE_STATUSES = exports.AI_WORKFORCE_TARGET_ARTIFACT_TYPES = exports.AI_WORKFORCE_ARTIFACT_CANDIDATE_TYPES = exports.AI_WORKFORCE_IMPROVEMENT_RECOMMENDATION_SOURCE_TYPES = exports.AI_WORKFORCE_IMPROVEMENT_RECOMMENDATION_TYPES = exports.AI_WORKFORCE_LEARNING_SIGNAL_TYPES = exports.AI_WORKFORCE_BEHAVIOR_EVENT_TYPES = void 0;
4
+ exports.isLearningEligibleRiskLevel = isLearningEligibleRiskLevel;
5
+ exports.requiresApprovalRiskLevel = requiresApprovalRiskLevel;
6
+ exports.getAiWorkforceLearningContentPosture = getAiWorkforceLearningContentPosture;
7
+ exports.canTransitionAiWorkforceLearningStatus = canTransitionAiWorkforceLearningStatus;
8
+ exports.getAiWorkforceLearningReadinessIssues = getAiWorkforceLearningReadinessIssues;
9
+ exports.isAiWorkforceBehaviorEventLearningReady = isAiWorkforceBehaviorEventLearningReady;
10
+ exports.createRedactedAiWorkforceBehaviorEventSample = createRedactedAiWorkforceBehaviorEventSample;
11
+ exports.validateLearningGuardrailRuleCandidatePatch = validateLearningGuardrailRuleCandidatePatch;
12
+ exports.validateLearningKnowledgeSourceCandidatePatch = validateLearningKnowledgeSourceCandidatePatch;
13
+ exports.validateLearningToolPermissionCandidateConfig = validateLearningToolPermissionCandidateConfig;
14
+ exports.validateLearningApprovalPolicyCandidatePatch = validateLearningApprovalPolicyCandidatePatch;
15
+ exports.validateLearningEmployeeTemplateCandidatePatch = validateLearningEmployeeTemplateCandidatePatch;
16
+ exports.validateLearningSopDocumentCandidatePatch = validateLearningSopDocumentCandidatePatch;
17
+ exports.validateLearningWorkflowDraftDefinition = validateLearningWorkflowDraftDefinition;
18
+ exports.validateLearningPromptPolicyDraftContent = validateLearningPromptPolicyDraftContent;
19
+ exports.validateLearningModelRoutingCandidatePatch = validateLearningModelRoutingCandidatePatch;
20
+ exports.validateLearningPromptTemplateCandidatePatch = validateLearningPromptTemplateCandidatePatch;
21
+ exports.validateLearningAgentCandidatePatch = validateLearningAgentCandidatePatch;
22
+ exports.AI_WORKFORCE_BEHAVIOR_EVENT_TYPES = [
23
+ 'execution_started',
24
+ 'user_input_received',
25
+ 'context_retrieved',
26
+ 'knowledge_retrieved',
27
+ 'agent_output_generated',
28
+ 'tool_call_started',
29
+ 'tool_call_completed',
30
+ 'tool_call_failed',
31
+ 'policy_checked',
32
+ 'guardrail_triggered',
33
+ 'approval_requested',
34
+ 'approval_approved',
35
+ 'approval_rejected',
36
+ 'human_edit_applied',
37
+ 'human_handoff_triggered',
38
+ 'execution_completed',
39
+ 'execution_failed',
40
+ 'outcome_verified',
41
+ 'feedback_received',
42
+ 'learning_signal_generated',
43
+ 'improvement_recommendation_generated',
44
+ ];
45
+ exports.AI_WORKFORCE_LEARNING_SIGNAL_TYPES = [
46
+ 'successful_behavior_pattern',
47
+ 'failed_behavior_pattern',
48
+ 'human_correction_pattern',
49
+ 'approval_pattern',
50
+ 'rejection_pattern',
51
+ 'knowledge_gap',
52
+ 'knowledge_conflict',
53
+ 'missing_tool',
54
+ 'tool_failure_pattern',
55
+ 'prompt_policy_gap',
56
+ 'guardrail_gap',
57
+ 'workflow_bottleneck',
58
+ 'sop_drift',
59
+ 'model_routing_issue',
60
+ 'cost_optimization_opportunity',
61
+ 'autonomy_upgrade_candidate',
62
+ 'autonomy_downgrade_candidate',
63
+ 'test_case_candidate',
64
+ 'regression_case_candidate',
65
+ 'template_candidate',
66
+ 'auto_approval_candidate',
67
+ ];
68
+ exports.AI_WORKFORCE_IMPROVEMENT_RECOMMENDATION_TYPES = [
69
+ 'hire_new_employee',
70
+ 'improve_existing_employee',
71
+ 'create_workflow',
72
+ 'update_workflow',
73
+ 'add_guardrail',
74
+ 'relax_guardrail',
75
+ 'add_tool',
76
+ 'change_tool_permission',
77
+ 'update_sop',
78
+ 'update_knowledge',
79
+ 'generate_test_suite',
80
+ 'upgrade_autonomy',
81
+ 'downgrade_autonomy',
82
+ 'change_model_routing',
83
+ 'auto_approval_policy',
84
+ 'prompt_policy_update',
85
+ ];
86
+ exports.AI_WORKFORCE_IMPROVEMENT_RECOMMENDATION_SOURCE_TYPES = [
87
+ 'learning_signal',
88
+ 'learned_pattern',
89
+ 'behavior_event',
90
+ 'goal_blueprint',
91
+ 'advisor_recommendation',
92
+ ];
93
+ exports.AI_WORKFORCE_ARTIFACT_CANDIDATE_TYPES = [
94
+ 'prompt_policy_update',
95
+ 'prompt_template_update',
96
+ 'guardrail_update',
97
+ 'workflow_update',
98
+ 'sop_update',
99
+ 'knowledge_update',
100
+ 'tool_permission_update',
101
+ 'approval_policy_update',
102
+ 'model_routing_update',
103
+ 'employee_template',
104
+ 'test_case',
105
+ 'eval_suite',
106
+ 'skill_recommendation',
107
+ ];
108
+ exports.AI_WORKFORCE_TARGET_ARTIFACT_TYPES = [
109
+ 'agent',
110
+ 'agent_version',
111
+ 'prompt_policy',
112
+ 'prompt_template',
113
+ 'guardrail',
114
+ 'workflow',
115
+ 'sop',
116
+ 'knowledge',
117
+ 'tool_permission',
118
+ 'approval_policy',
119
+ 'model_routing',
120
+ 'employee_template',
121
+ 'test_case',
122
+ 'eval_suite',
123
+ ];
124
+ exports.AI_WORKFORCE_LEARNING_PIPELINE_STATUSES = [
125
+ 'captured',
126
+ 'redaction_pending',
127
+ 'redacted',
128
+ 'ineligible',
129
+ 'eligible',
130
+ 'signal_extracted',
131
+ 'pattern_generated',
132
+ 'recommendation_generated',
133
+ 'draft_created',
134
+ 'tests_required',
135
+ 'simulation_running',
136
+ 'simulation_failed',
137
+ 'approval_required',
138
+ 'approved',
139
+ 'rejected',
140
+ 'ready_to_publish',
141
+ 'published',
142
+ 'rolled_back',
143
+ ];
144
+ exports.AI_WORKFORCE_REDACTION_STATUSES = [
145
+ 'not_required',
146
+ 'pending',
147
+ 'redacted',
148
+ 'failed',
149
+ 'blocked',
150
+ ];
151
+ exports.AI_WORKFORCE_RELEASE_GATE_STATUSES = [
152
+ 'not_started',
153
+ 'tests_required',
154
+ 'tests_running',
155
+ 'tests_failed',
156
+ 'simulation_required',
157
+ 'simulation_running',
158
+ 'simulation_failed',
159
+ 'approval_required',
160
+ 'ready_to_publish',
161
+ 'published',
162
+ 'blocked',
163
+ 'rolled_back',
164
+ ];
165
+ exports.AI_WORKFORCE_APPROVAL_STATUSES = [
166
+ 'not_required',
167
+ 'required',
168
+ 'pending',
169
+ 'approved',
170
+ 'rejected',
171
+ 'expired',
172
+ ];
173
+ exports.AI_WORKFORCE_RISK_LEVELS = ['L0', 'L1', 'L2', 'L3', 'L4'];
174
+ /**
175
+ * code-quality-audit-remediation-v1 R6 (P1-9) — single source of truth for
176
+ * "which risk levels are learning-eligible". Before this, three call sites
177
+ * each independently hand-wrote this same rule with drifted literal
178
+ * expressions: `behavior-learning-capture.service.ts` used
179
+ * `['L0','L1','L2'].includes(riskLevel)`, `behavior-learning-pipeline
180
+ * .service.ts` independently rewrote the identical whitelist for its
181
+ * `risk_not_allowed` gate, and `behavior-learning-governance-route
182
+ * .service.ts` used the logically-equivalent-but-differently-written
183
+ * complement `riskLevel !== 'L0' && riskLevel !== 'L1'` for its
184
+ * `approvalRequired` gate (see `requiresApprovalRiskLevel` below — a
185
+ * DIFFERENT rule, not a duplicate of this one; the two happen to be
186
+ * complements of each other today but govern different decisions and must
187
+ * stay as two named functions, not be collapsed into one).
188
+ */
189
+ exports.LEARNING_ELIGIBLE_RISK_LEVELS = ['L0', 'L1', 'L2'];
190
+ function isLearningEligibleRiskLevel(riskLevel) {
191
+ return exports.LEARNING_ELIGIBLE_RISK_LEVELS.includes(riskLevel);
192
+ }
193
+ /**
194
+ * code-quality-audit-remediation-v1 R6 (P1-9) — single source of truth for
195
+ * "which risk levels require approval before publication". Governs
196
+ * `behavior-learning-governance-route.service.ts`'s `approvalRequired`
197
+ * decision. See `isLearningEligibleRiskLevel` above for why this is a
198
+ * separate function rather than reusing/negating that one.
199
+ */
200
+ function requiresApprovalRiskLevel(riskLevel) {
201
+ return !(riskLevel === 'L0' || riskLevel === 'L1');
202
+ }
203
+ /**
204
+ * learning-content-generation-v1 R2.2 (rollback mutation) — closed set of
205
+ * stable reasonCode values a caller may pass to `rollbackLearningPublication`.
206
+ *
207
+ * Prior to this (Phase 0 finding), `rollback_reason_code`
208
+ * (`behavior-learning-rollback-execution.entity.ts`) and every owner
209
+ * rollback service only enforced the generic stable-code SHAPE regex
210
+ * (`^[a-z][a-z0-9_]*$`, see `normalizeRequiredStableCode()` in
211
+ * `behavior-learning-rollback-execution.service.ts`) — there was no closed
212
+ * vocabulary. This is a genuinely new contract, not a pre-existing word
213
+ * list being "discovered". The DB column stays free-form varchar to remain
214
+ * compatible with any pre-existing rows; this enum is enforced at the
215
+ * GraphQL/class-validator layer only (see
216
+ * `RollbackLearningPublicationInput.reasonCode` in
217
+ * `ai-workforce-learning-rollback.input.ts`).
218
+ *
219
+ * `cost_regression` / `safety_regression` added by
220
+ * model-routing-learning-publication-v1 Phase 5 (requirements.md R6,
221
+ * design.md §6): the three model_routing monitoring regression triggers
222
+ * (cost/quality/safety) each produce a rollback RECOMMENDATION carrying one
223
+ * of these stable codes. `quality_regression` already existed and is reused
224
+ * verbatim for the quality trigger — it is not a new concept, just a new
225
+ * (real) producer of an existing code. Per Q4 (signed): every trigger only
226
+ * ever produces a recommendation; a human must still separately call
227
+ * `rollbackLearningPublication` with this same reasonCode for the EXISTING
228
+ * Phase 4 rollback path to actually run — no trigger, including safety,
229
+ * calls that mutation itself (see
230
+ * `model-routing-monitoring-regression.service.ts`).
231
+ */
232
+ exports.AI_WORKFORCE_ROLLBACK_REASON_CODES = [
233
+ 'quality_regression',
234
+ 'cost_regression',
235
+ 'safety_regression',
236
+ 'incident_rollback',
237
+ 'manual_operator_decision',
238
+ 'policy_violation',
239
+ ];
240
+ /**
241
+ * model-routing-learning-publication-v1 R2/R3/R5 — new stable reason codes
242
+ * the (Phase 4) `ModelRoutingPublicationAdapter` and its R2 safety guard /
243
+ * R3 budget guard / R5 simulation-evidence gate return via
244
+ * `BehaviorLearningPublicationAdapterRefusal.reasonCode`
245
+ * (`behavior-learning-publication-adapter.registry.ts`'s
246
+ * `reasonCode: string` field). The 4 existing adapters (guardrail/
247
+ * tool_permission/approval_policy/sop) reuse a shared *generic* rejection
248
+ * vocabulary (`target_missing` / `content_missing` / `content_invalid` /
249
+ * `rollback_owner_rejected`) as inline literals scattered per-adapter-file
250
+ * — there is no dedicated shared-package constant for that generic set
251
+ * today, and this spec does not introduce one (out of scope). What IS new
252
+ * here is a set of reason codes specific to a single artifact type's own
253
+ * guard logic (safety/budget/simulation-evidence gates unique to
254
+ * `model_routing`, requirements.md R2/R3/R5) — those get a named closed-set
255
+ * export so Phase 2's guards and Phase 4's adapter both reference the same
256
+ * stable codes instead of re-typing string literals in multiple files.
257
+ * Chinese/English copy for these lives only in
258
+ * `packages/shared/src/locales/{zh-CN,en-US}.ts`
259
+ * (`aiWorkforceLearningCopy.contentPanel.modelRoutingGuardReasonCode`,
260
+ * requirements.md R8) — never re-derive display text from the code string
261
+ * itself.
262
+ */
263
+ exports.AI_WORKFORCE_MODEL_ROUTING_GUARD_REASON_CODES = [
264
+ 'safety_guard_rejected',
265
+ 'budget_guard_rejected',
266
+ 'simulation_evidence_missing',
267
+ ];
268
+ /**
269
+ * learning-content-generation-v1 R3.6/R4 — content-generation posture per
270
+ * `AiWorkforceTargetArtifactType`. Drives both the `generateLearningDraftContent`
271
+ * mutation's structured-rejection branch and the front-end's per-type
272
+ * rendering (design.md §7):
273
+ *
274
+ * - `llm_patch`: the 7 patch-type owners (guardrail/knowledge/tool_permission/
275
+ * approval_policy/employee_template/sop/model_routing) — LLM drafts a patch
276
+ * payload against the type's content contract, subject to the full
277
+ * evidence/validator/generation pipeline. NOTE (Phase 0 finding for the
278
+ * first 6, do not re-litigate; model-routing-learning-publication-v1
279
+ * Phase 4 for the 7th): 5 of these 7 (guardrail/tool_permission/
280
+ * approval_policy/sop/model_routing) have zero real `targetArtifactId` in
281
+ * the current pipeline (`BehaviorLearningTargetIdentityService` does not
282
+ * resolve `model_routing` — see `model-routing-publication.adapter.ts`'s
283
+ * class doc) and will therefore always terminate at a "target missing"
284
+ * outcome before an LLM call is ever made — this posture only says "the
285
+ * content SHAPE is patch-like", not "a real candidate of this type can
286
+ * reach `generated`" via the fully-automated pipeline. Honesty note
287
+ * specific to `model_routing` (do not conflate with the publish/rollback
288
+ * chain below, which IS fully real): `learning-draft-content-generator
289
+ * .service.ts`'s internal `describeSchemaForType()`/`validateForType()`
290
+ * switches also have no `model_routing` case yet (both fall to their
291
+ * generic default), so even a hand-supplied `targetArtifactId` reaching
292
+ * the real `generateLearningDraftContent` mutation would terminate at
293
+ * `validation_failed`, not `generated` — wiring that LLM-drafting path is
294
+ * a real, separate, still-open gap, not required by
295
+ * model-routing-learning-publication-v1 (R1-R7 only cover PUBLISHING an
296
+ * already-generated candidate, not drafting one). What IS fully real and
297
+ * proven end-to-end: a candidate whose `generatedContent` is set directly
298
+ * (bypassing the LLM generator, the same "hand-built content" idiom the
299
+ * other four adapters' own e2e coverage already uses) flows through the
300
+ * real R1 re-validator, R2/R3/R5 guards, R4 canary overlay, and real
301
+ * `setOrgPolicy` publish/rollback — see the real-Postgres full-lifecycle
302
+ * integration test in `model-routing-publication-adapter.e2e.integration
303
+ * .spec.ts`.
304
+ * - `reference_no_content`: `test_case`/`eval_suite` — the artifact already
305
+ * has real, publishable content (a materialized `AgentTestCase` /
306
+ * `AgentTestSuite`); there is nothing for an LLM to draft.
307
+ * - `reference_draft_pending`: `workflow`/`prompt_policy`/`prompt_template`/
308
+ * `agent` — drafting requires materializing a non-active draft entity
309
+ * through the owning module's own creation path, not just writing
310
+ * `generated_content` on the candidate row. `prompt_template` moved INTO
311
+ * this bucket in prompt-template-learning-publication-v1 Phase 2
312
+ * (requirements.md R1/R7): `PromptTemplateVersionService`'s snapshot/
313
+ * archive path is still not treated as the draft boundary (that judgment
314
+ * from learning-content-generation-v2 phase-5 stands unchanged) — the NEW
315
+ * `PromptTemplateLearningDraft` table is the real pending→activated→
316
+ * rolled_back draft boundary instead. `agent` moved INTO this bucket in
317
+ * agent-learning-publication-v1 Phase 2 (requirements.md R1/R3/R7, Q9
318
+ * signed): ONLY `improve_existing_employee`-sourced candidates can reach
319
+ * `generated` — `upgrade_autonomy`/`downgrade_autonomy` candidates share
320
+ * this same `targetArtifactType`/posture but are still honestly deferred
321
+ * by the generator's own R3 sub-gate (posture cannot distinguish
322
+ * recommendationType; see `learning-draft-content-generator.service.ts`'s
323
+ * `checkAgentAutonomySubGate()`) — autonomy-level semantics have no data
324
+ * model in this codebase (Phase 0 finding) and remain out of scope for a
325
+ * future, independent spec.
326
+ * - `deferred`: `agent_version` only — v2 product-decision defer, now
327
+ * permanent (agent-version-learning-publication-v1 closed by decision,
328
+ * 2026-07-09: standalone publication is not needed — the existing
329
+ * rollback owner already IS "publish a historical AgentVersion" in
330
+ * substance). `model_routing` moved OUT of this bucket in model-routing-
331
+ * learning-publication-v1 Phase 4 (requirements.md R7) — it is now
332
+ * `llm_patch`, real adapter, real owner, real publish/rollback (see
333
+ * `ModelRoutingPublicationAdapter`).
334
+ */
335
+ exports.AI_WORKFORCE_LEARNING_CONTENT_POSTURES = [
336
+ 'llm_patch',
337
+ 'reference_no_content',
338
+ 'reference_draft_pending',
339
+ 'deferred',
340
+ ];
341
+ /**
342
+ * Per-type posture lookup — single source of truth consumed by both the
343
+ * backend (`generateLearningDraftContent` mutation's non-`llm_patch`
344
+ * structured rejection) and the front-end (design.md §7 per-posture
345
+ * rendering). Every one of the 14 `AiWorkforceTargetArtifactType`s must
346
+ * appear exactly once here.
347
+ */
348
+ exports.AI_WORKFORCE_TARGET_ARTIFACT_CONTENT_POSTURE = {
349
+ guardrail: 'llm_patch',
350
+ knowledge: 'llm_patch',
351
+ tool_permission: 'llm_patch',
352
+ approval_policy: 'llm_patch',
353
+ employee_template: 'llm_patch',
354
+ sop: 'llm_patch',
355
+ test_case: 'reference_no_content',
356
+ eval_suite: 'reference_no_content',
357
+ workflow: 'reference_draft_pending',
358
+ prompt_policy: 'reference_draft_pending',
359
+ // prompt-template-learning-publication-v1 Phase 2 (requirements.md R1/R7,
360
+ // Phase 0 correction) — flipped from 'deferred' to 'reference_draft_pending'.
361
+ // This flip only unlocks DRAFT GENERATION (a real `PromptTemplateLearningDraft`
362
+ // row can now be materialized) — PUBLISH remains blocked independently
363
+ // until Phase 4 registers `PromptTemplatePublicationAdapter` (dispatch
364
+ // gates on `registry.get()`, not this posture value; see
365
+ // `behavior-learning-publication-dispatch.service.ts`).
366
+ prompt_template: 'reference_draft_pending',
367
+ // agent-learning-publication-v1 Phase 2 (requirements.md R1/R3/R7) —
368
+ // flipped from 'deferred' to 'reference_draft_pending'. This flip only
369
+ // unlocks DRAFT GENERATION for `improve_existing_employee`-sourced
370
+ // candidates (a real `AgentLearningDraft` row can now be materialized;
371
+ // `upgrade_autonomy`/`downgrade_autonomy` stay deferred via the
372
+ // generator's own R3 sub-gate, not via posture) — PUBLISH remains
373
+ // blocked independently until Phase 4 registers `AgentPublicationAdapter`
374
+ // (dispatch gates on `registry.get()`, not this posture value).
375
+ agent: 'reference_draft_pending',
376
+ // model-routing-learning-publication-v1 Phase 4 (requirements.md R7) —
377
+ // flipped from 'deferred' to 'llm_patch'. Pre-conditions (R1-R6) all
378
+ // shipped in Phases 1-3; `ModelRoutingPublicationAdapter` (Phase 4) is
379
+ // registered and real. See this const's doc comment above for the
380
+ // targetArtifactId caveat shared with guardrail/tool_permission/
381
+ // approval_policy/sop.
382
+ model_routing: 'llm_patch',
383
+ agent_version: 'deferred',
384
+ };
385
+ function getAiWorkforceLearningContentPosture(targetArtifactType) {
386
+ return exports.AI_WORKFORCE_TARGET_ARTIFACT_CONTENT_POSTURE[targetArtifactType];
387
+ }
388
+ /**
389
+ * learning-content-generation-v1 R3/R4 — closed set of terminal
390
+ * `content_status` values a candidate's generated-content lifecycle can
391
+ * reach, plus the one non-terminal starting value. Exactly 4 terminal
392
+ * states per design.md §5.5 — do not add a 5th without updating the
393
+ * migration/entity/GraphQL object type together.
394
+ */
395
+ exports.AI_WORKFORCE_LEARNING_CONTENT_STATUSES = [
396
+ 'not_generated',
397
+ 'generated',
398
+ 'insufficient_evidence',
399
+ 'validation_failed',
400
+ 'generation_failed',
401
+ ];
402
+ /**
403
+ * learning-content-generation-v2 Phase 2 — persisted Goal-to-Agent blueprint
404
+ * lifecycle. These rows are draft planning artifacts only; none of these
405
+ * statuses may be interpreted as "active employee created" or "published".
406
+ */
407
+ exports.AI_WORKFORCE_GOAL_TO_AGENT_BLUEPRINT_STATUSES = [
408
+ 'draft',
409
+ 'insufficient_evidence',
410
+ 'validation_failed',
411
+ ];
412
+ /**
413
+ * learning-content-generation-v2 Phase 3 — Hiring Marketplace candidate
414
+ * read-model contract. This is a query/view contract only: a marketplace
415
+ * candidate is not an active employee and does not by itself publish any
416
+ * owner configuration.
417
+ */
418
+ exports.AI_WORKFORCE_HIRING_MARKETPLACE_SOURCE_TYPES = [
419
+ 'behavior_candidate',
420
+ 'goal_blueprint',
421
+ 'advisor_recommendation',
422
+ ];
423
+ exports.AI_WORKFORCE_HIRING_MARKETPLACE_CANDIDATE_TYPES = [
424
+ 'employee_template',
425
+ 'goal_to_agent_blueprint',
426
+ ];
427
+ exports.AI_WORKFORCE_HIRING_MARKETPLACE_RELEASE_READINESS = [
428
+ 'needs_tests',
429
+ 'needs_approval',
430
+ 'ready_for_draft',
431
+ 'blocked',
432
+ ];
433
+ exports.AI_WORKFORCE_REDACTED_VALUE = '[REDACTED]';
434
+ /** Regex the tool-permission owner service enforces on every entry of
435
+ * `allowedTools`/`blockedTools` (`STABLE_TOOL_NAME` in
436
+ * `tool-permission-learning-publication-owner.service.ts`). Exported so the
437
+ * shared validator and any front-end input validation use the exact same
438
+ * pattern rather than a hand-copied approximation. */
439
+ exports.AI_WORKFORCE_STABLE_TOOL_NAME_PATTERN = /^[A-Za-z0-9:._/-]+$/;
440
+ /** Regex the employee-template owner service enforces on `templateKey`
441
+ * (`TEMPLATE_KEY` in `employee-template-learning-publication-owner.service.ts`).
442
+ * Exported so the generator's slugify step and the shared validator use the
443
+ * exact same pattern. */
444
+ exports.AI_WORKFORCE_TEMPLATE_KEY_PATTERN = /^[a-z][a-z0-9_-]{2,127}$/;
445
+ exports.AI_WORKFORCE_LEARNING_STATUS_TRANSITIONS = {
446
+ captured: ['redaction_pending', 'ineligible'],
447
+ redaction_pending: ['redacted', 'ineligible'],
448
+ redacted: ['eligible', 'ineligible'],
449
+ ineligible: [],
450
+ eligible: ['signal_extracted'],
451
+ signal_extracted: ['pattern_generated', 'recommendation_generated'],
452
+ pattern_generated: ['recommendation_generated'],
453
+ recommendation_generated: ['draft_created', 'rejected'],
454
+ draft_created: ['tests_required', 'approval_required'],
455
+ tests_required: ['simulation_running', 'approval_required'],
456
+ simulation_running: ['simulation_failed', 'approval_required', 'ready_to_publish'],
457
+ simulation_failed: ['draft_created', 'rejected'],
458
+ approval_required: ['approved', 'rejected'],
459
+ approved: ['ready_to_publish'],
460
+ rejected: [],
461
+ ready_to_publish: ['published'],
462
+ published: ['rolled_back'],
463
+ rolled_back: [],
464
+ };
465
+ function canTransitionAiWorkforceLearningStatus(from, to) {
466
+ return exports.AI_WORKFORCE_LEARNING_STATUS_TRANSITIONS[from].includes(to);
467
+ }
468
+ function getAiWorkforceLearningReadinessIssues(event) {
469
+ const issues = [];
470
+ if (!event.learningEligible) {
471
+ issues.push('learning_not_eligible');
472
+ }
473
+ if (event.redactionStatus !== 'redacted' && event.redactionStatus !== 'not_required') {
474
+ issues.push('redaction_not_complete');
475
+ }
476
+ return issues;
477
+ }
478
+ function isAiWorkforceBehaviorEventLearningReady(event) {
479
+ return getAiWorkforceLearningReadinessIssues(event).length === 0;
480
+ }
481
+ function createRedactedAiWorkforceBehaviorEventSample(overrides = {}) {
482
+ return {
483
+ id: 'bev_001',
484
+ tenantId: 'tenant_001',
485
+ employeeId: 'agent_refund_specialist',
486
+ agentId: 'agent_refund_specialist',
487
+ workflowId: null,
488
+ executionId: 'exec_123',
489
+ spanId: 'span_001',
490
+ correlationId: 'corr_001',
491
+ eventType: 'human_edit_applied',
492
+ eventSource: 'agent_runtime',
493
+ userId: 'user_reviewer_001',
494
+ department: 'support',
495
+ channel: 'web',
496
+ businessObjectType: 'Case',
497
+ businessObjectId: 'case_001',
498
+ riskLevel: 'L1',
499
+ inputSnapshot: exports.AI_WORKFORCE_REDACTED_VALUE,
500
+ outputSnapshot: 'Refund approved. Customer should receive funds in 5-7 days.',
501
+ contextSnapshot: { customerEmail: exports.AI_WORKFORCE_REDACTED_VALUE },
502
+ toolCalls: [],
503
+ knowledgeRefs: [],
504
+ approvals: [],
505
+ humanEdits: [
506
+ {
507
+ before: 'Refund approved. Customer should receive funds in 5-7 days.',
508
+ after: 'Refund approved under Refund Policy Section 3.2. Customer should receive funds in 5-7 days.',
509
+ changedFields: ['response.body'],
510
+ reason: 'policy_citation_added',
511
+ improvedOutcome: true,
512
+ },
513
+ ],
514
+ finalOutcome: { status: 'completed', outcomeVerified: true },
515
+ feedback: { rating: 'up', qualityScore: 0.94 },
516
+ labels: ['corrected_by_human', 'outcome_verified'],
517
+ redactionStatus: 'redacted',
518
+ piiDetected: true,
519
+ learningEligible: true,
520
+ createdAt: '2026-07-01T00:00:00.000Z',
521
+ ...overrides,
522
+ };
523
+ }
524
+ function isPlainObject(value) {
525
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
526
+ }
527
+ function isNonEmptyString(value) {
528
+ return typeof value === 'string' && value.trim().length > 0;
529
+ }
530
+ const STABLE_RISK_LEVELS = new Set(exports.AI_WORKFORCE_RISK_LEVELS);
531
+ // ---------------------------------------------------------------------
532
+ // guardrail — mirrors GuardrailLearningPublicationOwnerService.normalizeCandidateRulePatch()
533
+ // ---------------------------------------------------------------------
534
+ function validateLearningGuardrailRuleCandidatePatch(raw) {
535
+ const errors = [];
536
+ if (!isPlainObject(raw)) {
537
+ return { valid: false, errors: ['candidateRulePatch must be an object'] };
538
+ }
539
+ const data = {};
540
+ if (raw.name !== undefined && raw.name !== null) {
541
+ if (!isNonEmptyString(raw.name)) {
542
+ errors.push('name must be a non-empty string');
543
+ }
544
+ else {
545
+ data.name = raw.name.trim();
546
+ }
547
+ }
548
+ if (raw.description !== undefined) {
549
+ if (raw.description === null) {
550
+ data.description = null;
551
+ }
552
+ else if (typeof raw.description !== 'string') {
553
+ errors.push('description must be a string');
554
+ }
555
+ else {
556
+ data.description = raw.description.trim();
557
+ }
558
+ }
559
+ if (raw.isActive !== undefined && raw.isActive !== null) {
560
+ if (typeof raw.isActive !== 'boolean') {
561
+ errors.push('isActive must be a boolean');
562
+ }
563
+ else {
564
+ data.isActive = raw.isActive;
565
+ }
566
+ }
567
+ if (raw.priority !== undefined && raw.priority !== null) {
568
+ if (!Number.isInteger(raw.priority) || raw.priority <= 0) {
569
+ errors.push('priority must be a positive integer');
570
+ }
571
+ else {
572
+ data.priority = raw.priority;
573
+ }
574
+ }
575
+ if (raw.conditions !== undefined && raw.conditions !== null) {
576
+ if (!isPlainObject(raw.conditions)) {
577
+ errors.push('conditions must be an object');
578
+ }
579
+ else {
580
+ data.conditions = raw.conditions;
581
+ }
582
+ }
583
+ if (raw.riskLevel !== undefined && raw.riskLevel !== null) {
584
+ if (typeof raw.riskLevel !== 'string' || !STABLE_RISK_LEVELS.has(raw.riskLevel)) {
585
+ errors.push('riskLevel must be one of L0, L1, L2, L3, L4');
586
+ }
587
+ else {
588
+ data.riskLevel = raw.riskLevel;
589
+ }
590
+ }
591
+ if (raw.action !== undefined && raw.action !== null) {
592
+ if (!isPlainObject(raw.action)) {
593
+ errors.push('action must be an object');
594
+ }
595
+ else {
596
+ data.action = raw.action;
597
+ }
598
+ }
599
+ if (errors.length === 0 && Object.keys(data).length === 0) {
600
+ errors.push('candidateRulePatch must change at least one rule field');
601
+ }
602
+ return errors.length > 0 ? { valid: false, errors } : { valid: true, data };
603
+ }
604
+ // ---------------------------------------------------------------------
605
+ // knowledge — mirrors KnowledgeLearningPublicationOwnerService.normalizeCandidateSourcePatch()
606
+ // ---------------------------------------------------------------------
607
+ const KNOWLEDGE_ACCESS_LEVELS = new Set(['public', 'private', 'org_subtree']);
608
+ function validateLearningKnowledgeSourceCandidatePatch(raw) {
609
+ const errors = [];
610
+ if (!isPlainObject(raw)) {
611
+ return { valid: false, errors: ['candidateSourcePatch must be an object'] };
612
+ }
613
+ if (!isNonEmptyString(raw.content)) {
614
+ errors.push('content is required and must be a non-empty string');
615
+ }
616
+ if (raw.title !== undefined && raw.title !== null && !isNonEmptyString(raw.title)) {
617
+ errors.push('title must be a non-empty string when provided');
618
+ }
619
+ const data = {
620
+ content: isNonEmptyString(raw.content) ? raw.content.trim() : '',
621
+ };
622
+ if (raw.title !== undefined) {
623
+ data.title = raw.title === null ? null : isNonEmptyString(raw.title) ? raw.title.trim() : null;
624
+ }
625
+ if (raw.sourceType !== undefined) {
626
+ if (raw.sourceType !== null && !isNonEmptyString(raw.sourceType)) {
627
+ errors.push('sourceType must be a non-empty string when provided');
628
+ }
629
+ else {
630
+ data.sourceType = raw.sourceType === null ? null : raw.sourceType.trim();
631
+ }
632
+ }
633
+ if (raw.sourceObject !== undefined) {
634
+ if (raw.sourceObject !== null && !isNonEmptyString(raw.sourceObject)) {
635
+ errors.push('sourceObject must be a non-empty string when provided');
636
+ }
637
+ else {
638
+ data.sourceObject = raw.sourceObject === null ? null : raw.sourceObject.trim();
639
+ }
640
+ }
641
+ if (raw.accessLevel !== undefined) {
642
+ if (raw.accessLevel !== null && !KNOWLEDGE_ACCESS_LEVELS.has(raw.accessLevel)) {
643
+ errors.push('accessLevel must be one of public, private, org_subtree');
644
+ }
645
+ else {
646
+ data.accessLevel = raw.accessLevel;
647
+ }
648
+ }
649
+ if (raw.orgNodeId !== undefined) {
650
+ if (raw.orgNodeId !== null && !isNonEmptyString(raw.orgNodeId)) {
651
+ errors.push('orgNodeId must be a non-empty string when provided');
652
+ }
653
+ else {
654
+ data.orgNodeId = raw.orgNodeId === null ? null : raw.orgNodeId.trim();
655
+ }
656
+ }
657
+ if (raw.metadata !== undefined) {
658
+ if (raw.metadata !== null && !isPlainObject(raw.metadata)) {
659
+ errors.push('metadata must be an object when provided');
660
+ }
661
+ else {
662
+ data.metadata = raw.metadata;
663
+ }
664
+ }
665
+ return errors.length > 0 ? { valid: false, errors } : { valid: true, data };
666
+ }
667
+ // ---------------------------------------------------------------------
668
+ // tool_permission — mirrors ToolPermissionLearningPublicationOwnerService.normalizeCandidatePermissionConfig()
669
+ // ---------------------------------------------------------------------
670
+ function normalizeToolNameArray(value, fieldName, errors) {
671
+ if (!Array.isArray(value)) {
672
+ errors.push(`${fieldName} must be an array`);
673
+ return [];
674
+ }
675
+ const normalized = [];
676
+ for (const item of value) {
677
+ if (typeof item !== 'string') {
678
+ errors.push(`${fieldName} must contain only tool name strings`);
679
+ continue;
680
+ }
681
+ const toolName = item.trim();
682
+ if (!exports.AI_WORKFORCE_STABLE_TOOL_NAME_PATTERN.test(toolName)) {
683
+ errors.push(`${fieldName} contains invalid tool name "${toolName}"`);
684
+ continue;
685
+ }
686
+ if (!normalized.includes(toolName)) {
687
+ normalized.push(toolName);
688
+ }
689
+ }
690
+ return normalized;
691
+ }
692
+ function normalizeOptionalPositiveInt(value, fieldName, errors) {
693
+ if (value === undefined || value === null)
694
+ return null;
695
+ if (!Number.isInteger(value) || value <= 0) {
696
+ errors.push(`${fieldName} must be a positive integer`);
697
+ return null;
698
+ }
699
+ return value;
700
+ }
701
+ function validateLearningToolPermissionCandidateConfig(raw) {
702
+ const errors = [];
703
+ if (!isPlainObject(raw)) {
704
+ return { valid: false, errors: ['candidatePermissionConfig must be an object'] };
705
+ }
706
+ const allowedTools = normalizeToolNameArray(raw.allowedTools, 'allowedTools', errors);
707
+ const blockedTools = normalizeToolNameArray(raw.blockedTools, 'blockedTools', errors);
708
+ const blockedSet = new Set(blockedTools);
709
+ for (const allowedTool of allowedTools) {
710
+ if (blockedSet.has(allowedTool)) {
711
+ errors.push(`tool "${allowedTool}" cannot appear in both allowedTools and blockedTools`);
712
+ }
713
+ }
714
+ const maxQueriesPerMinute = normalizeOptionalPositiveInt(raw.maxQueriesPerMinute, 'maxQueriesPerMinute', errors);
715
+ const maxWritesPerMinute = normalizeOptionalPositiveInt(raw.maxWritesPerMinute, 'maxWritesPerMinute', errors);
716
+ const maxBatchSize = normalizeOptionalPositiveInt(raw.maxBatchSize, 'maxBatchSize', errors);
717
+ if (errors.length > 0) {
718
+ return { valid: false, errors };
719
+ }
720
+ return {
721
+ valid: true,
722
+ data: {
723
+ allowedTools,
724
+ blockedTools,
725
+ maxQueriesPerMinute,
726
+ maxWritesPerMinute,
727
+ maxBatchSize,
728
+ },
729
+ };
730
+ }
731
+ // ---------------------------------------------------------------------
732
+ // approval_policy — mirrors ApprovalPolicyLearningPublicationOwnerService.normalizeCandidatePolicyPatch()
733
+ // ---------------------------------------------------------------------
734
+ function validateLearningApprovalPolicyCandidatePatch(raw) {
735
+ const errors = [];
736
+ if (!isPlainObject(raw)) {
737
+ return { valid: false, errors: ['candidatePolicyPatch must be an object'] };
738
+ }
739
+ const data = {};
740
+ if (raw.name !== undefined && raw.name !== null) {
741
+ if (!isNonEmptyString(raw.name)) {
742
+ errors.push('name must be a non-empty string');
743
+ }
744
+ else {
745
+ data.name = raw.name.trim();
746
+ }
747
+ }
748
+ if (raw.description !== undefined) {
749
+ if (raw.description !== null && typeof raw.description !== 'string') {
750
+ errors.push('description must be a string');
751
+ }
752
+ else {
753
+ data.description = raw.description;
754
+ }
755
+ }
756
+ if (raw.entryCondition !== undefined) {
757
+ if (raw.entryCondition !== null && typeof raw.entryCondition !== 'string') {
758
+ errors.push('entryCondition must be a string');
759
+ }
760
+ else {
761
+ data.entryCondition = raw.entryCondition;
762
+ }
763
+ }
764
+ if (raw.steps !== undefined && raw.steps !== null) {
765
+ if (!Array.isArray(raw.steps) || raw.steps.length === 0) {
766
+ errors.push('steps must be a non-empty array when provided');
767
+ }
768
+ else {
769
+ const normalizedSteps = [];
770
+ raw.steps.forEach((step, index) => {
771
+ if (!isPlainObject(step)) {
772
+ errors.push(`steps[${index}] must be an object`);
773
+ return;
774
+ }
775
+ if (!isNonEmptyString(step.id))
776
+ errors.push(`steps[${index}].id is required`);
777
+ if (!isNonEmptyString(step.name))
778
+ errors.push(`steps[${index}].name is required`);
779
+ if (!isNonEmptyString(step.approverType)) {
780
+ errors.push(`steps[${index}].approverType is required`);
781
+ }
782
+ if (!isNonEmptyString(step.approverName)) {
783
+ errors.push(`steps[${index}].approverName is required`);
784
+ }
785
+ normalizedSteps.push({
786
+ ...step,
787
+ id: String(step.id ?? '').trim(),
788
+ name: String(step.name ?? '').trim(),
789
+ approverType: String(step.approverType ?? '').trim(),
790
+ approverName: String(step.approverName ?? '').trim(),
791
+ });
792
+ });
793
+ if (errors.length === 0) {
794
+ data.steps = normalizedSteps;
795
+ }
796
+ }
797
+ }
798
+ if (raw.riskAssessmentConfig !== undefined) {
799
+ if (raw.riskAssessmentConfig !== null && !isPlainObject(raw.riskAssessmentConfig)) {
800
+ errors.push('riskAssessmentConfig must be an object when provided');
801
+ }
802
+ else {
803
+ data.riskAssessmentConfig = raw.riskAssessmentConfig;
804
+ }
805
+ }
806
+ if (raw.finalApprovalAction !== undefined) {
807
+ if (raw.finalApprovalAction !== null && typeof raw.finalApprovalAction !== 'string') {
808
+ errors.push('finalApprovalAction must be a string');
809
+ }
810
+ else {
811
+ data.finalApprovalAction = raw.finalApprovalAction;
812
+ }
813
+ }
814
+ if (raw.finalRejectionAction !== undefined) {
815
+ if (raw.finalRejectionAction !== null && typeof raw.finalRejectionAction !== 'string') {
816
+ errors.push('finalRejectionAction must be a string');
817
+ }
818
+ else {
819
+ data.finalRejectionAction = raw.finalRejectionAction;
820
+ }
821
+ }
822
+ if (errors.length === 0 && Object.keys(data).length === 0) {
823
+ errors.push('candidatePolicyPatch must change at least one approval-policy field');
824
+ }
825
+ return errors.length > 0 ? { valid: false, errors } : { valid: true, data };
826
+ }
827
+ // ---------------------------------------------------------------------
828
+ // employee_template — mirrors EmployeeTemplateLearningPublicationOwnerService.normalizeCandidateTemplate()
829
+ //
830
+ // NOTE: `templateKey` IS part of the wire contract (the owner service
831
+ // requires it), but the *generator service* (Task 4) is responsible for
832
+ // constructing it from `roleName` rather than accepting it from the LLM —
833
+ // this validator still checks the regex because the adapter re-validates
834
+ // the fully-constructed payload (LLM fields + constructed fields) before
835
+ // dispatch, per requirements.md R4.3 ("adapter 在分发时用同一 validator 二
836
+ // 次校验").
837
+ // ---------------------------------------------------------------------
838
+ function validateLearningEmployeeTemplateCandidatePatch(raw) {
839
+ const errors = [];
840
+ if (!isPlainObject(raw)) {
841
+ return { valid: false, errors: ['candidateTemplate must be an object'] };
842
+ }
843
+ if (!isNonEmptyString(raw.templateKey)) {
844
+ errors.push('templateKey is required');
845
+ }
846
+ else if (!exports.AI_WORKFORCE_TEMPLATE_KEY_PATTERN.test(raw.templateKey)) {
847
+ errors.push('templateKey must match /^[a-z][a-z0-9_-]{2,127}$/');
848
+ }
849
+ if (!isNonEmptyString(raw.title))
850
+ errors.push('title is required');
851
+ if (!isNonEmptyString(raw.roleName))
852
+ errors.push('roleName is required');
853
+ if (!isNonEmptyString(raw.mission))
854
+ errors.push('mission is required');
855
+ if (!isPlainObject(raw.blueprint))
856
+ errors.push('blueprint is required and must be an object');
857
+ if (errors.length > 0) {
858
+ return { valid: false, errors };
859
+ }
860
+ return {
861
+ valid: true,
862
+ data: {
863
+ templateKey: raw.templateKey.trim(),
864
+ title: raw.title.trim(),
865
+ roleName: raw.roleName.trim(),
866
+ mission: raw.mission.trim(),
867
+ blueprint: raw.blueprint,
868
+ },
869
+ };
870
+ }
871
+ // ---------------------------------------------------------------------
872
+ // sop — mirrors SopLearningPublicationOwnerService.normalizeCandidateDocumentPatch()
873
+ // ---------------------------------------------------------------------
874
+ function validateLearningSopDocumentCandidatePatch(raw) {
875
+ const errors = [];
876
+ if (!isPlainObject(raw)) {
877
+ return { valid: false, errors: ['candidateDocumentPatch must be an object'] };
878
+ }
879
+ const data = {};
880
+ if (raw.title !== undefined && raw.title !== null) {
881
+ if (!isNonEmptyString(raw.title)) {
882
+ errors.push('title must be a non-empty string');
883
+ }
884
+ else {
885
+ data.title = raw.title.trim();
886
+ }
887
+ }
888
+ if (raw.category !== undefined) {
889
+ if (raw.category !== null && typeof raw.category !== 'string') {
890
+ errors.push('category must be a string');
891
+ }
892
+ else {
893
+ data.category = raw.category;
894
+ }
895
+ }
896
+ if (raw.applicableObjects !== undefined) {
897
+ if (raw.applicableObjects === null) {
898
+ data.applicableObjects = [];
899
+ }
900
+ else if (!Array.isArray(raw.applicableObjects)) {
901
+ errors.push('applicableObjects must be an array');
902
+ }
903
+ else {
904
+ const normalized = [];
905
+ raw.applicableObjects.forEach((value, index) => {
906
+ if (!isNonEmptyString(value)) {
907
+ errors.push(`applicableObjects[${index}] must be a non-empty string`);
908
+ }
909
+ else {
910
+ normalized.push(value.trim());
911
+ }
912
+ });
913
+ if (errors.length === 0)
914
+ data.applicableObjects = normalized;
915
+ }
916
+ }
917
+ if (raw.steps !== undefined && raw.steps !== null) {
918
+ if (!Array.isArray(raw.steps)) {
919
+ errors.push('steps must be an array');
920
+ }
921
+ else if (raw.steps.some((step) => !isPlainObject(step))) {
922
+ errors.push('steps must contain only objects');
923
+ }
924
+ else {
925
+ data.steps = raw.steps;
926
+ }
927
+ }
928
+ if (errors.length === 0 && Object.keys(data).length === 0) {
929
+ errors.push('candidateDocumentPatch must change at least one SOP field');
930
+ }
931
+ return errors.length > 0 ? { valid: false, errors } : { valid: true, data };
932
+ }
933
+ // ---------------------------------------------------------------------
934
+ // Phase 4 (R5) — reference-type draft content validators.
935
+ //
936
+ // These validate the LLM's FULL drafted definition BEFORE the generator
937
+ // calls the target module's real creation path (`FlowService.createVersion`
938
+ // + `saveVersion`; `PromptStrategyService.create`) — a structural pre-check
939
+ // so an obviously-malformed LLM output never reaches those services at all.
940
+ // `FlowService.saveVersion()`'s own `validateGraph()` remains the
941
+ // authoritative graph-correctness check (START/END reachability, decision
942
+ // branch coverage, etc.) — this validator only mirrors the minimal
943
+ // structural shape `saveVersion()` requires before it will even attempt
944
+ // that deeper validation (a definition missing `nodes`/`edges` arrays, or
945
+ // containing a node without an `id`, would otherwise reach
946
+ // `normalizeFlowVersionDefinition()` and produce confusing downstream
947
+ // errors rather than an honest `validation_failed` here).
948
+ // ---------------------------------------------------------------------
949
+ // mirrors FlowService's own FLOW_NODE_TYPES set (flow.service.ts)
950
+ const KNOWN_FLOW_NODE_TYPES = new Set([
951
+ 'START',
952
+ 'END',
953
+ 'ACTION',
954
+ 'APPROVAL',
955
+ 'DECISION',
956
+ 'LOOP',
957
+ 'WAIT',
958
+ 'SUBFLOW',
959
+ 'SCREEN',
960
+ 'AGENT',
961
+ ]);
962
+ function validateLearningWorkflowDraftDefinition(raw) {
963
+ const errors = [];
964
+ if (!isPlainObject(raw)) {
965
+ return { valid: false, errors: ['workflow draft definition must be an object'] };
966
+ }
967
+ if (raw.version !== undefined && typeof raw.version !== 'string') {
968
+ errors.push('version must be a string when provided');
969
+ }
970
+ if (!Array.isArray(raw.nodes) || raw.nodes.length === 0) {
971
+ errors.push('nodes must be a non-empty array');
972
+ }
973
+ if (!Array.isArray(raw.edges)) {
974
+ errors.push('edges must be an array');
975
+ }
976
+ const nodes = [];
977
+ if (Array.isArray(raw.nodes)) {
978
+ const seenIds = new Set();
979
+ raw.nodes.forEach((node, index) => {
980
+ if (!isPlainObject(node)) {
981
+ errors.push(`nodes[${index}] must be an object`);
982
+ return;
983
+ }
984
+ if (!isNonEmptyString(node.id)) {
985
+ errors.push(`nodes[${index}].id is required`);
986
+ return;
987
+ }
988
+ if (seenIds.has(node.id)) {
989
+ errors.push(`nodes[${index}].id "${node.id}" is duplicated`);
990
+ }
991
+ seenIds.add(node.id);
992
+ if (!isNonEmptyString(node.type)) {
993
+ errors.push(`nodes[${index}].type is required`);
994
+ }
995
+ else if (!KNOWN_FLOW_NODE_TYPES.has(node.type.toUpperCase())) {
996
+ errors.push(`nodes[${index}].type "${node.type}" is not a known flow node type`);
997
+ }
998
+ if (!isNonEmptyString(node.name)) {
999
+ errors.push(`nodes[${index}].name is required`);
1000
+ }
1001
+ if (node.settings !== undefined && node.settings !== null && !isPlainObject(node.settings)) {
1002
+ errors.push(`nodes[${index}].settings must be an object when provided`);
1003
+ }
1004
+ nodes.push({
1005
+ id: String(node.id),
1006
+ type: String(node.type ?? '').toUpperCase(),
1007
+ name: String(node.name ?? ''),
1008
+ position: isPlainObject(node.position)
1009
+ ? { x: Number(node.position.x) || 0, y: Number(node.position.y) || 0 }
1010
+ : null,
1011
+ settings: isPlainObject(node.settings) ? node.settings : {},
1012
+ });
1013
+ });
1014
+ if (nodes.length > 0) {
1015
+ if (!nodes.some((node) => node.type === 'START')) {
1016
+ errors.push('nodes must include exactly one START node');
1017
+ }
1018
+ if (!nodes.some((node) => node.type === 'END')) {
1019
+ errors.push('nodes must include at least one END node');
1020
+ }
1021
+ }
1022
+ }
1023
+ const edges = [];
1024
+ if (Array.isArray(raw.edges)) {
1025
+ const nodeIds = new Set(nodes.map((node) => node.id));
1026
+ raw.edges.forEach((edge, index) => {
1027
+ if (!isPlainObject(edge)) {
1028
+ errors.push(`edges[${index}] must be an object`);
1029
+ return;
1030
+ }
1031
+ if (!isNonEmptyString(edge.id)) {
1032
+ errors.push(`edges[${index}].id is required`);
1033
+ }
1034
+ if (!isNonEmptyString(edge.source)) {
1035
+ errors.push(`edges[${index}].source is required`);
1036
+ }
1037
+ else if (nodeIds.size > 0 && !nodeIds.has(edge.source)) {
1038
+ errors.push(`edges[${index}].source "${edge.source}" does not match any node id`);
1039
+ }
1040
+ if (!isNonEmptyString(edge.target)) {
1041
+ errors.push(`edges[${index}].target is required`);
1042
+ }
1043
+ else if (nodeIds.size > 0 && !nodeIds.has(edge.target)) {
1044
+ errors.push(`edges[${index}].target "${edge.target}" does not match any node id`);
1045
+ }
1046
+ edges.push({
1047
+ id: String(edge.id ?? `edge-${index}`),
1048
+ source: String(edge.source ?? ''),
1049
+ target: String(edge.target ?? ''),
1050
+ sourceHandle: isNonEmptyString(edge.sourceHandle) ? edge.sourceHandle : null,
1051
+ targetHandle: isNonEmptyString(edge.targetHandle) ? edge.targetHandle : null,
1052
+ label: isNonEmptyString(edge.label) ? edge.label : null,
1053
+ });
1054
+ });
1055
+ }
1056
+ if (raw.trigger !== undefined && raw.trigger !== null && !isPlainObject(raw.trigger)) {
1057
+ errors.push('trigger must be an object when provided');
1058
+ }
1059
+ if (errors.length > 0) {
1060
+ return { valid: false, errors };
1061
+ }
1062
+ return {
1063
+ valid: true,
1064
+ data: {
1065
+ version: typeof raw.version === 'string' ? raw.version : '1',
1066
+ nodes,
1067
+ edges,
1068
+ trigger: isPlainObject(raw.trigger) ? raw.trigger : null,
1069
+ },
1070
+ };
1071
+ }
1072
+ // ---------------------------------------------------------------------
1073
+ // prompt_policy — mirrors CreatePromptStrategyInput
1074
+ // (`ai-service/prompt-strategy.service.ts`), minus `workspaceId` (always
1075
+ // supplied by the generator from the caller's context, never LLM output).
1076
+ // `PromptStrategyService.create()` itself only requires a non-empty,
1077
+ // trimmed `name` — this validator enforces nothing stricter than that.
1078
+ // ---------------------------------------------------------------------
1079
+ function validateLearningPromptPolicyDraftContent(raw) {
1080
+ const errors = [];
1081
+ if (!isPlainObject(raw)) {
1082
+ return { valid: false, errors: ['prompt policy draft content must be an object'] };
1083
+ }
1084
+ if (!isNonEmptyString(raw.name)) {
1085
+ errors.push('name is required and must be a non-empty string');
1086
+ }
1087
+ if (raw.description !== undefined && raw.description !== null && typeof raw.description !== 'string') {
1088
+ errors.push('description must be a string when provided');
1089
+ }
1090
+ if (raw.industry !== undefined && raw.industry !== null && typeof raw.industry !== 'string') {
1091
+ errors.push('industry must be a string when provided');
1092
+ }
1093
+ if (raw.templateOverrides !== undefined &&
1094
+ raw.templateOverrides !== null &&
1095
+ !isPlainObject(raw.templateOverrides)) {
1096
+ errors.push('templateOverrides must be an object when provided');
1097
+ }
1098
+ if (errors.length > 0) {
1099
+ return { valid: false, errors };
1100
+ }
1101
+ return {
1102
+ valid: true,
1103
+ data: {
1104
+ name: raw.name.trim(),
1105
+ description: isNonEmptyString(raw.description) ? raw.description.trim() : null,
1106
+ industry: isNonEmptyString(raw.industry) ? raw.industry.trim() : null,
1107
+ templateOverrides: isPlainObject(raw.templateOverrides) ? raw.templateOverrides : null,
1108
+ },
1109
+ };
1110
+ }
1111
+ const MODEL_ROUTING_MODEL_POLICY_WHITELISTED_KEYS = new Set([
1112
+ 'defaultModelByCapability',
1113
+ 'defaultModelByScenario',
1114
+ ]);
1115
+ function normalizeModelIdentifierMap(value, fieldName, errors) {
1116
+ if (value === undefined)
1117
+ return undefined;
1118
+ if (value === null || !isPlainObject(value)) {
1119
+ errors.push(`${fieldName} must be an object`);
1120
+ return undefined;
1121
+ }
1122
+ const normalized = {};
1123
+ let sawError = false;
1124
+ for (const [key, entryValue] of Object.entries(value)) {
1125
+ if (!isNonEmptyString(key)) {
1126
+ errors.push(`${fieldName} keys must be non-empty strings`);
1127
+ sawError = true;
1128
+ continue;
1129
+ }
1130
+ if (!isNonEmptyString(entryValue)) {
1131
+ errors.push(`${fieldName}.${key} must be a non-empty string`);
1132
+ sawError = true;
1133
+ continue;
1134
+ }
1135
+ normalized[key.trim()] = entryValue.trim();
1136
+ }
1137
+ return sawError ? undefined : normalized;
1138
+ }
1139
+ /**
1140
+ * mirrors the v1 whitelist described in the block comment above — takes the
1141
+ * LLM's raw (already `JSON.parse`d) candidate patch and either narrows it
1142
+ * to exactly `{ modelPolicy: { defaultModelByCapability?, defaultModelByScenario? } }`
1143
+ * or reports every whitelist violation / shape error found. Never throws
1144
+ * (same discriminated-union contract as every other validator in this
1145
+ * file).
1146
+ */
1147
+ function validateLearningModelRoutingCandidatePatch(raw) {
1148
+ const errors = [];
1149
+ if (!isPlainObject(raw)) {
1150
+ return { valid: false, errors: ['candidatePatch must be an object'] };
1151
+ }
1152
+ const unknownTopLevelKeys = Object.keys(raw).filter((key) => key !== 'modelPolicy');
1153
+ if (unknownTopLevelKeys.length > 0) {
1154
+ errors.push(`candidatePatch contains fields outside the v1 whitelist: ${unknownTopLevelKeys.join(', ')}. ` +
1155
+ 'Only modelPolicy.defaultModelByCapability/defaultModelByScenario may be set by learning.');
1156
+ }
1157
+ if (raw.modelPolicy === undefined || raw.modelPolicy === null) {
1158
+ errors.push('modelPolicy is required');
1159
+ return { valid: false, errors };
1160
+ }
1161
+ if (!isPlainObject(raw.modelPolicy)) {
1162
+ errors.push('modelPolicy must be an object');
1163
+ return { valid: false, errors };
1164
+ }
1165
+ const unknownModelPolicyKeys = Object.keys(raw.modelPolicy).filter((key) => !MODEL_ROUTING_MODEL_POLICY_WHITELISTED_KEYS.has(key));
1166
+ if (unknownModelPolicyKeys.length > 0) {
1167
+ errors.push(`modelPolicy contains fields outside the v1 whitelist: ${unknownModelPolicyKeys.join(', ')}. ` +
1168
+ 'Only defaultModelByCapability/defaultModelByScenario may be set by learning.');
1169
+ }
1170
+ const defaultModelByCapability = normalizeModelIdentifierMap(raw.modelPolicy.defaultModelByCapability, 'modelPolicy.defaultModelByCapability', errors);
1171
+ const defaultModelByScenario = normalizeModelIdentifierMap(raw.modelPolicy.defaultModelByScenario, 'modelPolicy.defaultModelByScenario', errors);
1172
+ if (errors.length === 0 &&
1173
+ (defaultModelByCapability === undefined || Object.keys(defaultModelByCapability).length === 0) &&
1174
+ (defaultModelByScenario === undefined || Object.keys(defaultModelByScenario).length === 0)) {
1175
+ errors.push('modelPolicy must set at least one of defaultModelByCapability or defaultModelByScenario');
1176
+ }
1177
+ if (errors.length > 0) {
1178
+ return { valid: false, errors };
1179
+ }
1180
+ const modelPolicy = {};
1181
+ if (defaultModelByCapability !== undefined && Object.keys(defaultModelByCapability).length > 0) {
1182
+ modelPolicy.defaultModelByCapability = defaultModelByCapability;
1183
+ }
1184
+ if (defaultModelByScenario !== undefined && Object.keys(defaultModelByScenario).length > 0) {
1185
+ modelPolicy.defaultModelByScenario = defaultModelByScenario;
1186
+ }
1187
+ return { valid: true, data: { modelPolicy } };
1188
+ }
1189
+ /**
1190
+ * Body-only whitelist validator — narrows the LLM's raw (already
1191
+ * `JSON.parse`d) output to exactly `{ template: string }` or reports every
1192
+ * whitelist violation / shape error found. Never throws (same
1193
+ * discriminated-union contract as every other validator in this file).
1194
+ * The body is intentionally NOT trimmed — leading/trailing whitespace can
1195
+ * be meaningful in a prompt template; only the "effectively empty" check
1196
+ * uses a trimmed view.
1197
+ */
1198
+ function validateLearningPromptTemplateCandidatePatch(raw) {
1199
+ const errors = [];
1200
+ if (!isPlainObject(raw)) {
1201
+ return { valid: false, errors: ['candidatePatch must be an object'] };
1202
+ }
1203
+ const unknownKeys = Object.keys(raw).filter((key) => key !== 'template');
1204
+ if (unknownKeys.length > 0) {
1205
+ errors.push(`candidatePatch contains fields outside the v1 whitelist: ${unknownKeys.join(', ')}. ` +
1206
+ 'Only the template body may be set by learning (Q8 signed: body-level edits only).');
1207
+ }
1208
+ if (typeof raw.template !== 'string' || raw.template.trim().length === 0) {
1209
+ errors.push('template is required and must be a non-empty string');
1210
+ }
1211
+ if (errors.length > 0) {
1212
+ return { valid: false, errors };
1213
+ }
1214
+ return { valid: true, data: { template: raw.template } };
1215
+ }
1216
+ const AGENT_CANDIDATE_PATCH_WHITELISTED_KEYS = new Set([
1217
+ 'persona',
1218
+ 'systemInstructions',
1219
+ 'identityPolicy',
1220
+ ]);
1221
+ /**
1222
+ * Three-field whitelist validator — narrows the LLM's raw (already
1223
+ * `JSON.parse`d) output to a subset of `{ persona?, systemInstructions?,
1224
+ * identityPolicy? }` (each, when present, a non-empty string) or reports
1225
+ * every whitelist violation / shape error found. Never throws (same
1226
+ * discriminated-union contract as every other validator in this file).
1227
+ * Bodies are intentionally NOT trimmed for the same reason
1228
+ * `validateLearningPromptTemplateCandidatePatch` does not trim `template` —
1229
+ * leading/trailing whitespace can be meaningful in prompt-adjacent text;
1230
+ * only the "effectively empty" check uses a trimmed view.
1231
+ */
1232
+ function validateLearningAgentCandidatePatch(raw) {
1233
+ const errors = [];
1234
+ if (!isPlainObject(raw)) {
1235
+ return { valid: false, errors: ['candidatePatch must be an object'] };
1236
+ }
1237
+ const unknownKeys = Object.keys(raw).filter((key) => !AGENT_CANDIDATE_PATCH_WHITELISTED_KEYS.has(key));
1238
+ if (unknownKeys.length > 0) {
1239
+ errors.push(`candidatePatch contains fields outside the v1 whitelist: ${unknownKeys.join(', ')}. ` +
1240
+ 'Only persona/systemInstructions/identityPolicy may be set by learning (Q10 signed: three free-text fields only).');
1241
+ }
1242
+ const data = {};
1243
+ for (const key of ['persona', 'systemInstructions', 'identityPolicy']) {
1244
+ const value = raw[key];
1245
+ if (value === undefined)
1246
+ continue;
1247
+ if (typeof value !== 'string' || value.trim().length === 0) {
1248
+ errors.push(`${key} must be a non-empty string when provided`);
1249
+ continue;
1250
+ }
1251
+ data[key] = value;
1252
+ }
1253
+ if (errors.length === 0 && Object.keys(data).length === 0) {
1254
+ errors.push('candidatePatch must set at least one of persona, systemInstructions, identityPolicy');
1255
+ }
1256
+ if (errors.length > 0) {
1257
+ return { valid: false, errors };
1258
+ }
1259
+ return { valid: true, data };
1260
+ }
1261
+ //# sourceMappingURL=index.js.map