@devtrack-solution/codesdd 1.2.2 → 1.2.4-rc3

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 (413) hide show
  1. package/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
  2. package/.sdd/skills/curated/devtrack-api/SKILL.md +170 -31
  3. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
  8. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
  9. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
  10. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
  11. package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +8 -7
  12. package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +93 -0
  13. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +372 -0
  14. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
  15. package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
  16. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +294 -0
  17. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +5 -5
  18. package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
  19. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
  20. package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
  21. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
  22. package/LICENSE +1 -1
  23. package/README.md +399 -53
  24. package/bin/codesdd.js +3 -2
  25. package/dist/applications/sdd/index.d.ts +16 -0
  26. package/dist/applications/sdd/index.js +16 -0
  27. package/dist/cli/index.d.ts +2 -2
  28. package/dist/cli/index.js +11 -558
  29. package/dist/cli/program.d.ts +14 -0
  30. package/dist/cli/program.js +645 -0
  31. package/dist/commands/change.js +5 -5
  32. package/dist/commands/completion.d.ts +1 -1
  33. package/dist/commands/completion.js +9 -2
  34. package/dist/commands/config.js +320 -20
  35. package/dist/commands/feedback.js +1 -1
  36. package/dist/commands/schema.d.ts +63 -0
  37. package/dist/commands/schema.js +12 -12
  38. package/dist/commands/sdd/backlog.d.ts +3 -0
  39. package/dist/commands/sdd/backlog.js +54 -0
  40. package/dist/commands/sdd/execution.js +489 -28
  41. package/dist/commands/sdd/plugin.d.ts +3 -0
  42. package/dist/commands/sdd/plugin.js +158 -0
  43. package/dist/commands/sdd/shared.d.ts +1 -0
  44. package/dist/commands/sdd/shared.js +11 -22
  45. package/dist/commands/sdd/skills.js +7 -0
  46. package/dist/commands/sdd.js +107 -15
  47. package/dist/commands/spec.js +9 -9
  48. package/dist/commands/validate.js +6 -6
  49. package/dist/commands/workflow/instructions.js +6 -6
  50. package/dist/commands/workflow/new-change.js +3 -3
  51. package/dist/commands/workflow/shared.d.ts +1 -1
  52. package/dist/commands/workflow/shared.js +4 -4
  53. package/dist/core/archive.js +15 -5
  54. package/dist/core/artifact-graph/instruction-loader.d.ts +1 -1
  55. package/dist/core/artifact-graph/instruction-loader.js +3 -3
  56. package/dist/core/artifact-graph/resolver.d.ts +4 -4
  57. package/dist/core/artifact-graph/resolver.js +6 -6
  58. package/dist/core/branding.js +3 -3
  59. package/dist/core/cli/command-matrix.js +19 -1
  60. package/dist/core/cli-command-quality.d.ts +27 -0
  61. package/dist/core/cli-command-quality.js +180 -0
  62. package/dist/core/command-generation/adapters/costrict.d.ts +1 -1
  63. package/dist/core/command-generation/adapters/costrict.js +2 -2
  64. package/dist/core/command-generation/types.d.ts +1 -1
  65. package/dist/core/completions/command-registry.d.ts +1 -1
  66. package/dist/core/completions/command-registry.js +200 -12
  67. package/dist/core/completions/completion-provider.d.ts +14 -1
  68. package/dist/core/completions/completion-provider.js +29 -1
  69. package/dist/core/completions/generators/bash-generator.d.ts +1 -1
  70. package/dist/core/completions/generators/bash-generator.js +20 -12
  71. package/dist/core/completions/generators/fish-generator.d.ts +9 -1
  72. package/dist/core/completions/generators/fish-generator.js +39 -25
  73. package/dist/core/completions/generators/powershell-generator.d.ts +1 -1
  74. package/dist/core/completions/generators/powershell-generator.js +21 -11
  75. package/dist/core/completions/generators/zsh-generator.d.ts +3 -6
  76. package/dist/core/completions/generators/zsh-generator.js +21 -42
  77. package/dist/core/completions/installers/bash-installer.js +6 -6
  78. package/dist/core/completions/installers/fish-installer.js +1 -1
  79. package/dist/core/completions/installers/powershell-installer.js +14 -14
  80. package/dist/core/completions/installers/zsh-installer.d.ts +7 -1
  81. package/dist/core/completions/installers/zsh-installer.js +36 -8
  82. package/dist/core/completions/templates/bash-templates.d.ts +1 -1
  83. package/dist/core/completions/templates/bash-templates.js +12 -6
  84. package/dist/core/completions/templates/fish-templates.d.ts +2 -2
  85. package/dist/core/completions/templates/fish-templates.js +20 -9
  86. package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
  87. package/dist/core/completions/templates/powershell-templates.js +13 -4
  88. package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
  89. package/dist/core/completions/templates/zsh-templates.js +18 -9
  90. package/dist/core/config-schema.d.ts +20 -1
  91. package/dist/core/config-schema.js +70 -2
  92. package/dist/core/config.d.ts +3 -3
  93. package/dist/core/config.js +4 -4
  94. package/dist/core/global-config.d.ts +57 -12
  95. package/dist/core/global-config.js +344 -27
  96. package/dist/core/index.d.ts +1 -1
  97. package/dist/core/index.js +2 -2
  98. package/dist/core/init.d.ts +6 -1
  99. package/dist/core/init.js +99 -77
  100. package/dist/core/legacy-cleanup.d.ts +17 -17
  101. package/dist/core/legacy-cleanup.js +96 -79
  102. package/dist/core/list.js +18 -4
  103. package/dist/core/migration.d.ts +3 -1
  104. package/dist/core/migration.js +7 -8
  105. package/dist/core/parsers/change-parser.js +1 -1
  106. package/dist/core/parsers/markdown-parser.js +2 -2
  107. package/dist/core/profile-sync-drift.d.ts +1 -1
  108. package/dist/core/profile-sync-drift.js +13 -13
  109. package/dist/core/project-config.d.ts +4 -4
  110. package/dist/core/project-config.js +11 -11
  111. package/dist/core/schemas/change.schema.d.ts +1 -1
  112. package/dist/core/schemas/change.schema.js +1 -1
  113. package/dist/core/schemas/spec.schema.d.ts +1 -1
  114. package/dist/core/schemas/spec.schema.js +1 -1
  115. package/dist/core/sdd/adr.js +23 -1
  116. package/dist/core/sdd/agent-binding.d.ts +346 -0
  117. package/dist/core/sdd/agent-binding.js +343 -0
  118. package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
  119. package/dist/core/sdd/agent-runtime-contract.js +200 -0
  120. package/dist/core/sdd/backlog-cli.d.ts +16 -0
  121. package/dist/core/sdd/backlog-cli.js +146 -0
  122. package/dist/core/sdd/backlog-conflict-policy.d.ts +58 -0
  123. package/dist/core/sdd/backlog-conflict-policy.js +230 -0
  124. package/dist/core/sdd/backlog-projection.d.ts +8 -0
  125. package/dist/core/sdd/backlog-projection.js +89 -0
  126. package/dist/core/sdd/backlog-provider-contract.d.ts +252 -0
  127. package/dist/core/sdd/backlog-provider-contract.js +158 -0
  128. package/dist/core/sdd/bootstrap.js +2 -2
  129. package/dist/core/sdd/check.d.ts +44 -0
  130. package/dist/core/sdd/check.js +62 -24
  131. package/dist/core/sdd/contract.d.ts +13 -0
  132. package/dist/core/sdd/contract.js +36 -0
  133. package/dist/core/sdd/coordination/coordination-adapters.d.ts +53 -8
  134. package/dist/core/sdd/coordination/coordination-adapters.js +182 -16
  135. package/dist/core/sdd/coordination/index.d.ts +1 -0
  136. package/dist/core/sdd/coordination/index.js +1 -0
  137. package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
  138. package/dist/core/sdd/coordination/redis-runtime.js +698 -0
  139. package/dist/core/sdd/deepagent-contracts.d.ts +370 -0
  140. package/dist/core/sdd/deepagent-contracts.js +235 -0
  141. package/dist/core/sdd/deepagents/adr-governor.d.ts +2 -0
  142. package/dist/core/sdd/deepagents/adr-governor.js +30 -0
  143. package/dist/core/sdd/deepagents/backend.d.ts +63 -0
  144. package/dist/core/sdd/deepagents/backend.js +174 -0
  145. package/dist/core/sdd/deepagents/codesdd-tools.d.ts +39 -0
  146. package/dist/core/sdd/deepagents/codesdd-tools.js +83 -0
  147. package/dist/core/sdd/deepagents/evidence-mapper.d.ts +86 -0
  148. package/dist/core/sdd/deepagents/evidence-mapper.js +178 -0
  149. package/dist/core/sdd/deepagents/model-provider.d.ts +53 -0
  150. package/dist/core/sdd/deepagents/model-provider.js +379 -0
  151. package/dist/core/sdd/deepagents/policy-enforcement.d.ts +30 -0
  152. package/dist/core/sdd/deepagents/policy-enforcement.js +90 -0
  153. package/dist/core/sdd/deepagents/policy.d.ts +75 -0
  154. package/dist/core/sdd/deepagents/policy.js +358 -0
  155. package/dist/core/sdd/deepagents/quality-witness.d.ts +3 -0
  156. package/dist/core/sdd/deepagents/quality-witness.js +77 -0
  157. package/dist/core/sdd/deepagents/reversa-subagents.d.ts +75 -0
  158. package/dist/core/sdd/deepagents/reversa-subagents.js +182 -0
  159. package/dist/core/sdd/deepagents/runtime-factory.d.ts +90 -0
  160. package/dist/core/sdd/deepagents/runtime-factory.js +231 -0
  161. package/dist/core/sdd/deepagents/runtime-loader.d.ts +16 -0
  162. package/dist/core/sdd/deepagents/runtime-loader.js +65 -0
  163. package/dist/core/sdd/default-bootstrap-files.d.ts +3 -3
  164. package/dist/core/sdd/default-bootstrap-files.js +50 -10
  165. package/dist/core/sdd/default-skills.d.ts +30 -0
  166. package/dist/core/sdd/default-skills.js +288 -8
  167. package/dist/core/sdd/devtrack-api-appliance.d.ts +91 -0
  168. package/dist/core/sdd/devtrack-api-appliance.js +280 -0
  169. package/dist/core/sdd/devtrack-api-architecture.d.ts +31 -0
  170. package/dist/core/sdd/devtrack-api-architecture.js +608 -0
  171. package/dist/core/sdd/devtrack-api-import-boundary.d.ts +19 -0
  172. package/dist/core/sdd/devtrack-api-import-boundary.js +32 -0
  173. package/dist/core/sdd/diagnose.d.ts +59 -0
  174. package/dist/core/sdd/diagnose.js +37 -37
  175. package/dist/core/sdd/docs-sync.js +54 -20
  176. package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
  177. package/dist/core/sdd/domain/capability-diff.js +200 -0
  178. package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
  179. package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
  180. package/dist/core/sdd/domain/post-active-validation.d.ts +7 -0
  181. package/dist/core/sdd/domain/post-active-validation.js +61 -0
  182. package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
  183. package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
  184. package/dist/core/sdd/domain/transition-engine.js +1 -0
  185. package/dist/core/sdd/entity-reference.d.ts +5 -0
  186. package/dist/core/sdd/entity-reference.js +22 -0
  187. package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
  188. package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
  189. package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
  190. package/dist/core/sdd/foundation-layer-manifest.js +117 -0
  191. package/dist/core/sdd/governance-backfill.d.ts +31 -0
  192. package/dist/core/sdd/governance-backfill.js +359 -0
  193. package/dist/core/sdd/governance-parser.d.ts +21 -0
  194. package/dist/core/sdd/governance-parser.js +91 -0
  195. package/dist/core/sdd/governance-schemas.d.ts +245 -0
  196. package/dist/core/sdd/governance-schemas.js +143 -0
  197. package/dist/core/sdd/{import-openspec.d.ts → import-legacy-spec.d.ts} +7 -7
  198. package/dist/core/sdd/{import-openspec.js → import-legacy-spec.js} +21 -29
  199. package/dist/core/sdd/init.d.ts +3 -0
  200. package/dist/core/sdd/init.js +6 -3
  201. package/dist/core/sdd/intent-guard.d.ts +22 -0
  202. package/dist/core/sdd/intent-guard.js +67 -0
  203. package/dist/core/sdd/json-schema.js +108 -6
  204. package/dist/core/sdd/knowledge-graph.d.ts +45 -0
  205. package/dist/core/sdd/knowledge-graph.js +288 -0
  206. package/dist/core/sdd/legacy-operations.js +507 -44
  207. package/dist/core/sdd/lenses.d.ts +1 -0
  208. package/dist/core/sdd/lenses.js +29 -1
  209. package/dist/core/sdd/migrate-workspace.js +95 -2
  210. package/dist/core/sdd/migrate.d.ts +1 -1
  211. package/dist/core/sdd/migrate.js +36 -2
  212. package/dist/core/sdd/package-security-gates.d.ts +21 -0
  213. package/dist/core/sdd/package-security-gates.js +119 -0
  214. package/dist/core/sdd/package-structure-gate.d.ts +83 -0
  215. package/dist/core/sdd/package-structure-gate.js +357 -0
  216. package/dist/core/sdd/parallel-feat-automation.d.ts +330 -0
  217. package/dist/core/sdd/parallel-feat-automation.js +424 -0
  218. package/dist/core/sdd/plugin-broker.d.ts +777 -0
  219. package/dist/core/sdd/plugin-broker.js +492 -0
  220. package/dist/core/sdd/plugin-certification.d.ts +79 -0
  221. package/dist/core/sdd/plugin-certification.js +453 -0
  222. package/dist/core/sdd/plugin-cli.d.ts +139 -0
  223. package/dist/core/sdd/plugin-cli.js +265 -0
  224. package/dist/core/sdd/plugin-evidence.d.ts +348 -0
  225. package/dist/core/sdd/plugin-evidence.js +307 -0
  226. package/dist/core/sdd/plugin-manifest.d.ts +232 -0
  227. package/dist/core/sdd/plugin-manifest.js +225 -0
  228. package/dist/core/sdd/plugin-policy-pack.d.ts +88 -0
  229. package/dist/core/sdd/plugin-policy-pack.js +236 -0
  230. package/dist/core/sdd/plugin-policy.d.ts +68 -0
  231. package/dist/core/sdd/plugin-policy.js +212 -0
  232. package/dist/core/sdd/plugin-registry.d.ts +447 -0
  233. package/dist/core/sdd/plugin-registry.js +138 -0
  234. package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
  235. package/dist/core/sdd/plugin-sdk-contract.js +268 -0
  236. package/dist/core/sdd/plugin-skill-binding.d.ts +151 -0
  237. package/dist/core/sdd/plugin-skill-binding.js +339 -0
  238. package/dist/core/sdd/quality-artifact-manifest-validator.d.ts +28 -0
  239. package/dist/core/sdd/quality-artifact-manifest-validator.js +167 -0
  240. package/dist/core/sdd/quality-evidence-renderer.d.ts +65 -0
  241. package/dist/core/sdd/quality-evidence-renderer.js +218 -0
  242. package/dist/core/sdd/quality-scenario-runner.d.ts +42 -0
  243. package/dist/core/sdd/quality-scenario-runner.js +613 -0
  244. package/dist/core/sdd/quality-validation.d.ts +620 -0
  245. package/dist/core/sdd/quality-validation.js +239 -0
  246. package/dist/core/sdd/release-readiness.d.ts +19 -0
  247. package/dist/core/sdd/release-readiness.js +472 -0
  248. package/dist/core/sdd/resolve-project-root.d.ts +2 -2
  249. package/dist/core/sdd/resolve-project-root.js +11 -5
  250. package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
  251. package/dist/core/sdd/runtime-boundary-contract.js +90 -0
  252. package/dist/core/sdd/sanitize.d.ts +30 -1
  253. package/dist/core/sdd/sanitize.js +23 -23
  254. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
  255. package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
  256. package/dist/core/sdd/services/agent-run.service.d.ts +97 -0
  257. package/dist/core/sdd/services/agent-run.service.js +261 -0
  258. package/dist/core/sdd/services/breakdown.service.js +2 -1
  259. package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
  260. package/dist/core/sdd/services/capability-diff.service.js +26 -0
  261. package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
  262. package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
  263. package/dist/core/sdd/services/context.service.d.ts +43 -340
  264. package/dist/core/sdd/services/context.service.js +341 -25
  265. package/dist/core/sdd/services/debate.service.js +15 -2
  266. package/dist/core/sdd/services/feature-lint.service.d.ts +22 -0
  267. package/dist/core/sdd/services/feature-lint.service.js +105 -5
  268. package/dist/core/sdd/services/finalize.service.d.ts +105 -0
  269. package/dist/core/sdd/services/finalize.service.js +499 -38
  270. package/dist/core/sdd/services/frontend-gap.service.js +22 -7
  271. package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
  272. package/dist/core/sdd/services/governance-control-plane-runtime-adapters.d.ts +17 -0
  273. package/dist/core/sdd/services/governance-control-plane-runtime-adapters.js +38 -0
  274. package/dist/core/sdd/services/governance-control-plane.service.d.ts +66 -0
  275. package/dist/core/sdd/services/governance-control-plane.service.js +134 -0
  276. package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
  277. package/dist/core/sdd/services/legacy-capability.service.d.ts +10 -7
  278. package/dist/core/sdd/services/legacy-capability.service.js +38 -21
  279. package/dist/core/sdd/services/mcp-runtime.service.d.ts +123 -8
  280. package/dist/core/sdd/services/mcp-runtime.service.js +1085 -33
  281. package/dist/core/sdd/services/onboard.service.js +2 -1
  282. package/dist/core/sdd/services/rebuild.service.js +6 -1
  283. package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
  284. package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
  285. package/dist/core/sdd/services/skills-sync.service.d.ts +17 -5
  286. package/dist/core/sdd/services/skills-sync.service.js +55 -2
  287. package/dist/core/sdd/services/start.service.js +6 -4
  288. package/dist/core/sdd/skill-bundles-curation-schema.d.ts +66 -0
  289. package/dist/core/sdd/skill-bundles-curation-schema.js +52 -0
  290. package/dist/core/sdd/skill-evidence.d.ts +19 -0
  291. package/dist/core/sdd/skill-evidence.js +38 -0
  292. package/dist/core/sdd/skill-policy-pool.d.ts +46 -0
  293. package/dist/core/sdd/skill-policy-pool.js +185 -0
  294. package/dist/core/sdd/state.d.ts +23 -0
  295. package/dist/core/sdd/state.js +313 -66
  296. package/dist/core/sdd/store/sdd-stores.js +2 -2
  297. package/dist/core/sdd/structural-health.d.ts +55 -55
  298. package/dist/core/sdd/types.d.ts +60 -19
  299. package/dist/core/sdd/types.js +21 -0
  300. package/dist/core/sdd/upgrade-to-codesdd.d.ts +45 -0
  301. package/dist/core/sdd/upgrade-to-codesdd.js +179 -0
  302. package/dist/core/sdd/views.js +17 -0
  303. package/dist/core/sdd/workspace-schemas.d.ts +670 -19
  304. package/dist/core/sdd/workspace-schemas.js +285 -5
  305. package/dist/core/sdd/write-manifest.js +22 -4
  306. package/dist/core/shared/skill-generation.d.ts +1 -1
  307. package/dist/core/shared/skill-generation.js +15 -15
  308. package/dist/core/shared/tool-detection.d.ts +3 -3
  309. package/dist/core/shared/tool-detection.js +14 -14
  310. package/dist/core/specs-apply.js +6 -6
  311. package/dist/core/templates/index.d.ts +1 -1
  312. package/dist/core/templates/index.js +1 -1
  313. package/dist/core/templates/workflows/apply-change.js +14 -14
  314. package/dist/core/templates/workflows/archive-change.js +32 -32
  315. package/dist/core/templates/workflows/bulk-archive-change.js +25 -25
  316. package/dist/core/templates/workflows/continue-change.js +12 -12
  317. package/dist/core/templates/workflows/explore.js +29 -29
  318. package/dist/core/templates/workflows/feedback.js +6 -6
  319. package/dist/core/templates/workflows/ff-change.js +24 -24
  320. package/dist/core/templates/workflows/new-change.js +20 -20
  321. package/dist/core/templates/workflows/onboard.js +33 -33
  322. package/dist/core/templates/workflows/propose.js +23 -23
  323. package/dist/core/templates/workflows/sdd.js +8 -8
  324. package/dist/core/templates/workflows/sync-specs.js +19 -19
  325. package/dist/core/templates/workflows/verify-change.js +17 -17
  326. package/dist/core/update.d.ts +2 -2
  327. package/dist/core/update.js +16 -15
  328. package/dist/core/validation/constants.d.ts +1 -1
  329. package/dist/core/validation/constants.js +1 -1
  330. package/dist/core/view.js +11 -11
  331. package/dist/domains/sdd/index.d.ts +6 -0
  332. package/dist/domains/sdd/index.js +6 -0
  333. package/dist/infrastructures/sdd/index.d.ts +7 -0
  334. package/dist/infrastructures/sdd/index.js +6 -0
  335. package/dist/presentations/cli/sdd/index.d.ts +3 -0
  336. package/dist/presentations/cli/sdd/index.js +3 -0
  337. package/dist/shared/sdd/index.d.ts +3 -0
  338. package/dist/shared/sdd/index.js +2 -0
  339. package/dist/telemetry/config.d.ts +2 -1
  340. package/dist/telemetry/config.js +17 -8
  341. package/dist/telemetry/index.d.ts +10 -2
  342. package/dist/telemetry/index.js +40 -7
  343. package/dist/ui/ascii-patterns.d.ts +2 -2
  344. package/dist/ui/ascii-patterns.js +2 -2
  345. package/dist/ui/welcome-screen.js +2 -2
  346. package/dist/utils/change-metadata.d.ts +4 -4
  347. package/dist/utils/change-metadata.js +6 -6
  348. package/dist/utils/change-utils.d.ts +3 -3
  349. package/dist/utils/change-utils.js +5 -5
  350. package/dist/utils/file-system.js +1 -1
  351. package/dist/utils/interactive.js +1 -1
  352. package/dist/utils/item-discovery.js +4 -4
  353. package/dist/utils/legacy-spec-compat.d.ts +2 -0
  354. package/dist/utils/legacy-spec-compat.js +2 -0
  355. package/dist/utils/shell-detection.d.ts +1 -0
  356. package/dist/utils/shell-detection.js +16 -0
  357. package/package.json +34 -21
  358. package/schemas/sdd/1-spec.schema.json +1 -1
  359. package/schemas/sdd/2-plan.schema.json +280 -3
  360. package/schemas/sdd/3-tasks.schema.json +73 -1
  361. package/schemas/sdd/4-changelog.schema.json +1 -1
  362. package/schemas/sdd/5-quality.schema.json +701 -5
  363. package/schemas/sdd/adr.schema.json +148 -0
  364. package/schemas/sdd/agent-binding-adapter.schema.json +210 -0
  365. package/schemas/sdd/agent-binding-resolution.schema.json +338 -0
  366. package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
  367. package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
  368. package/schemas/sdd/backlog-projection-plan.schema.json +180 -0
  369. package/schemas/sdd/backlog-provider-contract.schema.json +260 -0
  370. package/schemas/sdd/codesdd-plugin.schema.json +645 -0
  371. package/schemas/sdd/debate.schema.json +244 -0
  372. package/schemas/sdd/deepagent-decision-evidence.schema.json +58 -0
  373. package/schemas/sdd/deepagent-env-contract.schema.json +143 -0
  374. package/schemas/sdd/deepagent-quality-evidence.schema.json +108 -0
  375. package/schemas/sdd/deepagent-run-evidence.schema.json +192 -0
  376. package/schemas/sdd/deepagent-run-plan.schema.json +197 -0
  377. package/schemas/sdd/deepagent-run-request.schema.json +637 -0
  378. package/schemas/sdd/deepagent-subagent-evidence.schema.json +110 -0
  379. package/schemas/sdd/deepagent-tool-call-evidence.schema.json +78 -0
  380. package/schemas/sdd/discarded.schema.json +127 -0
  381. package/schemas/sdd/epic.schema.json +147 -0
  382. package/schemas/sdd/insight.schema.json +136 -0
  383. package/schemas/sdd/parallel-feat-automation-plan.schema.json +304 -0
  384. package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
  385. package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
  386. package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
  387. package/schemas/sdd/plugin-artifact-manifest.schema.json +259 -0
  388. package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
  389. package/schemas/sdd/plugin-compliance-index.schema.json +136 -0
  390. package/schemas/sdd/plugin-dry-run-plan.schema.json +260 -0
  391. package/schemas/sdd/plugin-evidence-manifest.schema.json +678 -0
  392. package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
  393. package/schemas/sdd/plugin-package-governance.schema.json +74 -0
  394. package/schemas/sdd/plugin-policy-evaluation.schema.json +92 -0
  395. package/schemas/sdd/plugin-policy-pack-evaluation.schema.json +94 -0
  396. package/schemas/sdd/plugin-policy-pack.schema.json +196 -0
  397. package/schemas/sdd/plugin-registry.schema.json +729 -0
  398. package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
  399. package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +954 -0
  400. package/schemas/sdd/plugin-skill-binding-resolution.schema.json +305 -0
  401. package/schemas/sdd/plugin-skill-binding.schema.json +88 -0
  402. package/schemas/sdd/plugin-validation-manifest.schema.json +123 -0
  403. package/schemas/sdd/quality-architecture-schema.schema.json +216 -0
  404. package/schemas/sdd/quality-evidence-bundle.schema.json +1337 -0
  405. package/schemas/sdd/quality-run.schema.json +197 -0
  406. package/schemas/sdd/quality-scenario.schema.json +252 -0
  407. package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
  408. package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
  409. package/schemas/sdd/workspace-catalog.schema.json +13232 -35
  410. package/schemas/spec-driven/schema.yaml +4 -4
  411. package/schemas/spec-driven/templates/proposal.md +1 -1
  412. package/dist/utils/openspec-compat.d.ts +0 -2
  413. package/dist/utils/openspec-compat.js +0 -2
@@ -0,0 +1,453 @@
1
+ import { z } from 'zod';
2
+ import { buildPluginDryRunExecutionPlan, buildPluginRuntimeInvocationPlan, } from './plugin-broker.js';
3
+ import { pluginManifestSchema, } from './plugin-manifest.js';
4
+ import { createPluginRegistryState, } from './plugin-registry.js';
5
+ export const pluginCertificationLevelSchema = z.union([z.literal(0), z.literal(1), z.literal(2)]);
6
+ export const pluginCertificationAchievedLevelSchema = z.union([
7
+ z.literal(-1),
8
+ z.literal(0),
9
+ z.literal(1),
10
+ z.literal(2),
11
+ ]);
12
+ export const pluginCertificationCriterionSchema = z.object({
13
+ id: z.string().min(1),
14
+ level: pluginCertificationLevelSchema,
15
+ status: z.enum(['passed', 'warning', 'failed']),
16
+ evidence: z.string().min(1),
17
+ remediation: z.string().min(1),
18
+ issue_codes: z.array(z.string().min(1)).default([]),
19
+ });
20
+ export const pluginCertificationResultSchema = z.object({
21
+ schema_version: z.literal(1),
22
+ generated_at: z.string().datetime(),
23
+ feature_ref: z.string().regex(/^FEAT-\d{4}$/),
24
+ plugin_ref: z.object({
25
+ id: z.string().min(1),
26
+ version: z.string().min(1),
27
+ }),
28
+ capability: z.string().min(1),
29
+ stack: z.object({
30
+ language: z.string().min(1).optional(),
31
+ framework: z.string().min(1).optional(),
32
+ }).default({}),
33
+ requested_level: pluginCertificationLevelSchema,
34
+ achieved_level: pluginCertificationAchievedLevelSchema,
35
+ status: z.enum(['certified', 'warning', 'failed']),
36
+ warning_only: z.literal(true),
37
+ blocking: z.literal(false),
38
+ dry_run_plan: z.unknown().optional(),
39
+ apply_readiness_plan: z.unknown().optional(),
40
+ criteria: z.array(pluginCertificationCriterionSchema).min(1),
41
+ visualization_markdown: z.string().min(1),
42
+ });
43
+ export function buildPluginCertification(input) {
44
+ const requestedLevel = input.requestedLevel ?? 2;
45
+ const generatedAt = normalizeTimestamp(input.generatedAt);
46
+ const criteria = [];
47
+ const manifestParse = pluginManifestSchema.safeParse(input.manifest);
48
+ const pluginRef = resolvePluginRef(input.manifest);
49
+ const stack = resolveStack(input.manifest, input.technology);
50
+ if (!manifestParse.success) {
51
+ criteria.push(criterion({
52
+ id: 'L0_MANIFEST_SCHEMA_VALID',
53
+ level: 0,
54
+ status: 'failed',
55
+ evidence: manifestParse.error.issues
56
+ .map((issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`)
57
+ .join('; '),
58
+ remediation: 'Fix the plugin manifest so it satisfies the CodeSDD plugin manifest schema.',
59
+ issueCodes: ['PLUGIN_CERT_MANIFEST_INVALID'],
60
+ }));
61
+ return finalizeResult({
62
+ generatedAt,
63
+ featureRef: input.featureRef,
64
+ pluginRef,
65
+ capability: input.capability,
66
+ stack,
67
+ requestedLevel,
68
+ criteria,
69
+ });
70
+ }
71
+ const manifest = manifestParse.data;
72
+ const capability = manifest.capabilities.find((candidate) => candidate.name === input.capability);
73
+ criteria.push(...levelZeroCriteria(manifest, input.capability, capability));
74
+ if (requestedLevel >= 1 && capability) {
75
+ const dryRunProof = buildDryRunProof(manifest, capability, input, generatedAt);
76
+ criteria.push(dryRunProof.criterion);
77
+ if (requestedLevel >= 2) {
78
+ const applyReadiness = buildApplyReadinessProof(manifest, capability, input, generatedAt);
79
+ criteria.push(applyReadiness.criterion);
80
+ return finalizeResult({
81
+ generatedAt,
82
+ featureRef: input.featureRef,
83
+ pluginRef: {
84
+ id: manifest.id,
85
+ version: manifest.version,
86
+ },
87
+ capability: input.capability,
88
+ stack,
89
+ requestedLevel,
90
+ dryRunPlan: dryRunProof.plan,
91
+ applyReadinessPlan: applyReadiness.plan,
92
+ criteria,
93
+ });
94
+ }
95
+ return finalizeResult({
96
+ generatedAt,
97
+ featureRef: input.featureRef,
98
+ pluginRef: {
99
+ id: manifest.id,
100
+ version: manifest.version,
101
+ },
102
+ capability: input.capability,
103
+ stack,
104
+ requestedLevel,
105
+ dryRunPlan: dryRunProof.plan,
106
+ criteria,
107
+ });
108
+ }
109
+ return finalizeResult({
110
+ generatedAt,
111
+ featureRef: input.featureRef,
112
+ pluginRef: {
113
+ id: manifest.id,
114
+ version: manifest.version,
115
+ },
116
+ capability: input.capability,
117
+ stack,
118
+ requestedLevel,
119
+ criteria,
120
+ });
121
+ }
122
+ export function renderPluginCertificationMatrix(result) {
123
+ const rows = result.criteria.map((criterionResult) => [
124
+ String(criterionResult.level),
125
+ criterionResult.id,
126
+ criterionResult.status,
127
+ criterionResult.issue_codes.length > 0 ? criterionResult.issue_codes.join(', ') : '-',
128
+ criterionResult.evidence,
129
+ criterionResult.remediation,
130
+ ]);
131
+ return [
132
+ '# Plugin Certification Matrix',
133
+ '',
134
+ `- Plugin: \`${result.plugin_ref.id}@${result.plugin_ref.version}\``,
135
+ `- Capability: \`${result.capability}\``,
136
+ `- Requested level: \`${result.requested_level}\``,
137
+ `- Achieved level: \`${result.achieved_level}\``,
138
+ `- Status: \`${result.status}\``,
139
+ '- Warning-only: yes',
140
+ '- Blocking: no',
141
+ '',
142
+ '| Level | Criterion | Status | Issue Codes | Evidence | Remediation |',
143
+ '| --- | --- | --- | --- | --- | --- |',
144
+ ...rows.map((row) => `| ${row.map(escapeCell).join(' | ')} |`),
145
+ '',
146
+ ].join('\n');
147
+ }
148
+ function levelZeroCriteria(manifest, capabilityName, capability) {
149
+ const criteria = [
150
+ criterion({
151
+ id: 'L0_MANIFEST_SCHEMA_VALID',
152
+ level: 0,
153
+ status: 'passed',
154
+ evidence: `${manifest.id}@${manifest.version} satisfies the plugin manifest schema.`,
155
+ remediation: 'Keep the manifest schema-valid as capabilities evolve.',
156
+ }),
157
+ ];
158
+ if (!capability) {
159
+ criteria.push(criterion({
160
+ id: 'L0_CAPABILITY_DECLARED',
161
+ level: 0,
162
+ status: 'failed',
163
+ evidence: `Capability ${capabilityName} is not declared by ${manifest.id}@${manifest.version}.`,
164
+ remediation: 'Declare the capability in the plugin manifest or certify an advertised capability.',
165
+ issueCodes: ['PLUGIN_CERT_CAPABILITY_MISSING'],
166
+ }));
167
+ return criteria;
168
+ }
169
+ criteria.push(criterion({
170
+ id: 'L0_CAPABILITY_DECLARED',
171
+ level: 0,
172
+ status: 'passed',
173
+ evidence: `Capability ${capability.name} is declared by ${manifest.id}@${manifest.version}.`,
174
+ remediation: 'Keep the certified capability name stable or recertify after renaming.',
175
+ }), criterion({
176
+ id: 'L0_DRY_RUN_SUPPORTED',
177
+ level: 0,
178
+ status: capability.supports_dry_run ? 'passed' : 'failed',
179
+ evidence: capability.supports_dry_run
180
+ ? `${capability.name} declares dry-run support.`
181
+ : `${capability.name} does not declare dry-run support.`,
182
+ remediation: 'Level 0 certification requires dry-run support for safe enterprise inspection.',
183
+ issueCodes: capability.supports_dry_run ? [] : ['PLUGIN_CERT_DRY_RUN_UNSUPPORTED'],
184
+ }), criterion({
185
+ id: 'L0_CAPABILITY_DETERMINISTIC',
186
+ level: 0,
187
+ status: capability.deterministic ? 'passed' : 'failed',
188
+ evidence: capability.deterministic
189
+ ? `${capability.name} declares deterministic behavior.`
190
+ : `${capability.name} does not declare deterministic behavior.`,
191
+ remediation: 'Declare deterministic behavior only after the same input can reproduce the same normalized plan.',
192
+ issueCodes: capability.deterministic ? [] : ['PLUGIN_CERT_NON_DETERMINISTIC'],
193
+ }), criterion({
194
+ id: 'L0_CAPABILITY_IDEMPOTENT',
195
+ level: 0,
196
+ status: capability.idempotent ? 'passed' : 'failed',
197
+ evidence: capability.idempotent
198
+ ? `${capability.name} declares idempotent behavior.`
199
+ : `${capability.name} does not declare idempotent behavior.`,
200
+ remediation: 'Make repeated dry-run/apply requests safe or restrict the capability before certification.',
201
+ issueCodes: capability.idempotent ? [] : ['PLUGIN_CERT_NON_IDEMPOTENT'],
202
+ }));
203
+ return criteria;
204
+ }
205
+ function buildDryRunProof(manifest, capability, input, generatedAt) {
206
+ try {
207
+ const registry = createPluginRegistryState([
208
+ {
209
+ manifest,
210
+ source: input.registrySource ?? defaultRegistrySource(manifest),
211
+ registered_at: generatedAt,
212
+ },
213
+ ], generatedAt);
214
+ const request = {
215
+ feature_ref: input.featureRef,
216
+ capability: capability.name,
217
+ skill_ref: input.skillRef,
218
+ inputs: input.inputs ?? {},
219
+ technology: input.technology,
220
+ requested_write_scope: input.requestedWriteScope ?? [],
221
+ require_apply: false,
222
+ created_at: generatedAt,
223
+ };
224
+ const first = buildPluginDryRunExecutionPlan(registry, request);
225
+ const second = buildPluginDryRunExecutionPlan(registry, request);
226
+ if (first.status !== 'planned') {
227
+ return {
228
+ plan: first,
229
+ criterion: criterion({
230
+ id: 'L1_DRY_RUN_PLAN_RESOLVED',
231
+ level: 1,
232
+ status: 'failed',
233
+ evidence: first.reasons.join('; ') || 'Dry-run plan was unresolved.',
234
+ remediation: 'Ensure the registry can resolve the capability and requested write scope.',
235
+ issueCodes: ['PLUGIN_CERT_DRY_RUN_UNRESOLVED'],
236
+ }),
237
+ };
238
+ }
239
+ const deterministic = stableJson(normalizeDryRunPlan(first)) === stableJson(normalizeDryRunPlan(second));
240
+ return {
241
+ plan: first,
242
+ criterion: criterion({
243
+ id: 'L1_DRY_RUN_DETERMINISTIC',
244
+ level: 1,
245
+ status: deterministic ? 'passed' : 'failed',
246
+ evidence: deterministic
247
+ ? `Two dry-run plans for ${capability.name} produced the same normalized envelope and artifact plan.`
248
+ : `Two dry-run plans for ${capability.name} diverged after normalization.`,
249
+ remediation: 'Remove undeclared nondeterminism from the dry-run plan or declare it in a later scenario-level exception.',
250
+ issueCodes: deterministic ? [] : ['PLUGIN_CERT_DRY_RUN_NON_DETERMINISTIC'],
251
+ }),
252
+ };
253
+ }
254
+ catch (error) {
255
+ return {
256
+ criterion: criterion({
257
+ id: 'L1_DRY_RUN_DETERMINISTIC',
258
+ level: 1,
259
+ status: 'failed',
260
+ evidence: `Dry-run certification could not be evaluated: ${String(error)}`,
261
+ remediation: 'Fix dry-run planning inputs before certifying Level 1.',
262
+ issueCodes: ['PLUGIN_CERT_DRY_RUN_EXCEPTION'],
263
+ }),
264
+ };
265
+ }
266
+ }
267
+ function buildApplyReadinessProof(manifest, capability, input, generatedAt) {
268
+ try {
269
+ const registry = createPluginRegistryState([
270
+ {
271
+ manifest,
272
+ source: input.registrySource ?? defaultRegistrySource(manifest),
273
+ registered_at: generatedAt,
274
+ },
275
+ ], generatedAt);
276
+ const approvalGrants = input.approvalGrants ?? defaultApprovalGrants(capability);
277
+ const plan = buildPluginRuntimeInvocationPlan(registry, {
278
+ feature_ref: input.featureRef,
279
+ capability: capability.name,
280
+ skill_ref: input.skillRef,
281
+ inputs: input.inputs ?? {},
282
+ technology: input.technology,
283
+ requested_write_scope: input.requestedWriteScope ?? capability.write_scope,
284
+ require_apply: true,
285
+ created_at: generatedAt,
286
+ mode: 'apply',
287
+ approval_grants: approvalGrants,
288
+ source_checksum: input.sourceChecksum ?? manifest.supply_chain.checksum,
289
+ planned_writes: input.plannedWrites ?? capability.write_scope,
290
+ requested_env: [],
291
+ network_domains: [],
292
+ process_spawn_requested: false,
293
+ filesystem_checks: [],
294
+ });
295
+ if (plan.status !== 'ready') {
296
+ return {
297
+ plan,
298
+ criterion: criterion({
299
+ id: 'L2_APPLY_SANDBOX_READINESS',
300
+ level: 2,
301
+ status: 'failed',
302
+ evidence: plan.reasons.join('; ') || 'Apply readiness plan was not ready.',
303
+ remediation: 'Resolve apply support, approval, checksum, write-scope, or policy issues before Level 2 certification.',
304
+ issueCodes: ['PLUGIN_CERT_APPLY_READINESS_BLOCKED'],
305
+ }),
306
+ };
307
+ }
308
+ const warning = plan.policy?.decision === 'warn';
309
+ return {
310
+ plan,
311
+ criterion: criterion({
312
+ id: 'L2_APPLY_SANDBOX_READINESS',
313
+ level: 2,
314
+ status: warning ? 'warning' : 'passed',
315
+ evidence: warning
316
+ ? `Apply readiness plan is ready with warning policy decision: ${plan.reasons.join('; ')}`
317
+ : `Apply readiness plan is ready for sandboxed execution without spawning plugin code.`,
318
+ remediation: warning
319
+ ? 'Review warning policy issues before promoting this certification to a hard release gate.'
320
+ : 'Keep apply execution outside CodeSDD core until a runtime adapter is explicitly approved.',
321
+ issueCodes: warning ? (plan.policy?.issues.map((issue) => issue.code) ?? ['PLUGIN_CERT_APPLY_POLICY_WARNING']) : [],
322
+ }),
323
+ };
324
+ }
325
+ catch (error) {
326
+ return {
327
+ criterion: criterion({
328
+ id: 'L2_APPLY_SANDBOX_READINESS',
329
+ level: 2,
330
+ status: 'failed',
331
+ evidence: `Apply readiness certification could not be evaluated: ${String(error)}`,
332
+ remediation: 'Fix runtime planning inputs before certifying Level 2.',
333
+ issueCodes: ['PLUGIN_CERT_APPLY_READINESS_EXCEPTION'],
334
+ }),
335
+ };
336
+ }
337
+ }
338
+ function finalizeResult(input) {
339
+ const relevantCriteria = input.criteria.filter((criterionResult) => criterionResult.level <= input.requestedLevel);
340
+ const achievedLevel = computeAchievedLevel(input.requestedLevel, relevantCriteria);
341
+ const status = relevantCriteria.some((criterionResult) => criterionResult.status === 'failed')
342
+ ? 'failed'
343
+ : relevantCriteria.some((criterionResult) => criterionResult.status === 'warning')
344
+ ? 'warning'
345
+ : 'certified';
346
+ const base = {
347
+ schema_version: 1,
348
+ generated_at: input.generatedAt,
349
+ feature_ref: input.featureRef,
350
+ plugin_ref: input.pluginRef,
351
+ capability: input.capability,
352
+ stack: input.stack,
353
+ requested_level: input.requestedLevel,
354
+ achieved_level: achievedLevel,
355
+ status,
356
+ warning_only: true,
357
+ blocking: false,
358
+ dry_run_plan: input.dryRunPlan,
359
+ apply_readiness_plan: input.applyReadinessPlan,
360
+ criteria: relevantCriteria,
361
+ };
362
+ return pluginCertificationResultSchema.parse({
363
+ ...base,
364
+ visualization_markdown: renderPluginCertificationMatrix(base),
365
+ });
366
+ }
367
+ function computeAchievedLevel(requestedLevel, criteria) {
368
+ let achieved = -1;
369
+ for (let level = 0; level <= requestedLevel; level += 1) {
370
+ const levelCriteria = criteria.filter((criterionResult) => criterionResult.level === level);
371
+ if (levelCriteria.length === 0 || levelCriteria.some((criterionResult) => criterionResult.status === 'failed')) {
372
+ break;
373
+ }
374
+ achieved = level;
375
+ }
376
+ return achieved;
377
+ }
378
+ function criterion(input) {
379
+ return pluginCertificationCriterionSchema.parse({
380
+ id: input.id,
381
+ level: input.level,
382
+ status: input.status,
383
+ evidence: input.evidence,
384
+ remediation: input.remediation,
385
+ issue_codes: input.issueCodes ?? [],
386
+ });
387
+ }
388
+ function normalizeDryRunPlan(plan) {
389
+ return {
390
+ status: plan.status,
391
+ reasons: plan.reasons,
392
+ envelope: plan.envelope,
393
+ artifact_plan: plan.artifact_plan,
394
+ };
395
+ }
396
+ function defaultRegistrySource(manifest) {
397
+ return {
398
+ type: 'workspace',
399
+ uri: `.sdd/plugins/${manifest.id}/codesdd-plugin.yaml`,
400
+ checksum: manifest.supply_chain.checksum,
401
+ };
402
+ }
403
+ function defaultApprovalGrants(capability) {
404
+ return capability.approval === 'none' ? [] : [capability.approval];
405
+ }
406
+ function resolvePluginRef(value) {
407
+ const record = asRecord(value);
408
+ return {
409
+ id: readString(record, 'id') ?? 'unknown-plugin',
410
+ version: readString(record, 'version') ?? 'unknown-version',
411
+ };
412
+ }
413
+ function resolveStack(value, fallback) {
414
+ const technology = asRecord(asRecord(value)?.technology);
415
+ return {
416
+ language: readString(technology, 'language') ?? fallback?.language,
417
+ framework: readString(technology, 'framework') ?? fallback?.framework,
418
+ };
419
+ }
420
+ function normalizeTimestamp(value) {
421
+ if (value instanceof Date) {
422
+ return value.toISOString();
423
+ }
424
+ return value ?? new Date().toISOString();
425
+ }
426
+ function stableJson(value) {
427
+ return JSON.stringify(sortJson(value));
428
+ }
429
+ function sortJson(value) {
430
+ if (Array.isArray(value)) {
431
+ return value.map(sortJson);
432
+ }
433
+ const record = asRecord(value);
434
+ if (!record) {
435
+ return value;
436
+ }
437
+ return Object.fromEntries(Object.keys(record)
438
+ .sort()
439
+ .map((key) => [key, sortJson(record[key])]));
440
+ }
441
+ function asRecord(value) {
442
+ return typeof value === 'object' && value !== null && !Array.isArray(value)
443
+ ? value
444
+ : undefined;
445
+ }
446
+ function readString(record, key) {
447
+ const value = record?.[key];
448
+ return typeof value === 'string' ? value : undefined;
449
+ }
450
+ function escapeCell(value) {
451
+ return value.replace(/\|/gu, '\\|').replace(/\n/gu, '<br>');
452
+ }
453
+ //# sourceMappingURL=plugin-certification.js.map
@@ -0,0 +1,139 @@
1
+ import { type DevTrackApiScaffoldDryRunPlan } from './devtrack-api-appliance.js';
2
+ import { type PluginRuntimeInvocationPlan } from './plugin-broker.js';
3
+ import { type PluginManifest } from './plugin-manifest.js';
4
+ import { type CodesddStorageBoundaryClassification } from './runtime-boundary-contract.js';
5
+ type PluginInvocationMode = 'dry-run' | 'apply' | 'rollback';
6
+ export interface PluginCliInspectResult {
7
+ schema_version: 1;
8
+ manifest_path: string;
9
+ plugin_ref: {
10
+ id: string;
11
+ version: string;
12
+ };
13
+ contract_version: number;
14
+ technology: PluginManifest['technology'];
15
+ capabilities: Array<{
16
+ name: string;
17
+ supports_dry_run: boolean;
18
+ supports_apply: boolean;
19
+ supports_rollback: boolean;
20
+ write_scope: string[];
21
+ approval: string;
22
+ risk_tier: string;
23
+ }>;
24
+ execution: Pick<PluginManifest['execution'], 'command' | 'args' | 'timeout_seconds' | 'network' | 'process_spawn'>;
25
+ governance: Pick<PluginManifest['governance'], 'owner' | 'trust_tier' | 'risk_tier' | 'policy_packs'>;
26
+ validation: PluginManifest['validation'];
27
+ compression: PluginManifest['compression'];
28
+ }
29
+ export interface PluginCliPlanOptions {
30
+ feature_ref: string;
31
+ capability: string;
32
+ mode?: PluginInvocationMode;
33
+ skill_ref?: string;
34
+ inputs?: Record<string, unknown>;
35
+ requested_write_scope?: string[];
36
+ approval_grants?: string[];
37
+ operation_id?: string;
38
+ source_checksum?: string;
39
+ planned_writes?: string[];
40
+ requested_env?: string[];
41
+ network_domains?: string[];
42
+ process_spawn_requested?: boolean;
43
+ project_root?: string;
44
+ technology?: {
45
+ language?: string;
46
+ framework?: string;
47
+ };
48
+ created_at?: string;
49
+ }
50
+ export interface PluginCliPlanResult {
51
+ schema_version: 1;
52
+ manifest_path: string;
53
+ plan: PluginRuntimeInvocationPlan;
54
+ workcell_runner: PluginCliWorkcellRunner;
55
+ }
56
+ export interface PluginCliWorkcellRunner {
57
+ schema_version: 1;
58
+ status: PluginRuntimeInvocationPlan['status'];
59
+ parameterization: {
60
+ owner: 'llm';
61
+ source: 'runtime-plan-request';
62
+ feature_ref: string;
63
+ capability: string;
64
+ };
65
+ execution: {
66
+ owner: 'plugin-cli';
67
+ mode: 'dry-run' | 'apply' | 'rollback';
68
+ command: {
69
+ executable: string;
70
+ args: string[];
71
+ working_directory: string;
72
+ };
73
+ compression: {
74
+ mode: 'pretooluse';
75
+ enabled: boolean;
76
+ engine: PluginManifest['compression']['engine'];
77
+ tee: PluginManifest['compression']['tee'];
78
+ max_output_tokens: number;
79
+ exclude_commands: string[];
80
+ applied: boolean;
81
+ wrapped_command: {
82
+ executable: string;
83
+ args: string[];
84
+ } | null;
85
+ };
86
+ };
87
+ evidence: {
88
+ required: string[];
89
+ };
90
+ rollback: {
91
+ supported: boolean;
92
+ };
93
+ standalone: {
94
+ schema_version: 1;
95
+ status: 'ready' | 'blocked';
96
+ package_governance: {
97
+ status: 'passed' | 'blocked';
98
+ package_name?: string;
99
+ sdk_package?: string;
100
+ versioning?: string;
101
+ registry?: string;
102
+ issues: string[];
103
+ };
104
+ language_runtime: {
105
+ bridge?: string;
106
+ input_transport?: string;
107
+ output_transport?: string;
108
+ command?: string;
109
+ };
110
+ storage_boundary: {
111
+ status: 'passed' | 'blocked';
112
+ project_root: string;
113
+ classifications: CodesddStorageBoundaryClassification[];
114
+ findings: Array<{
115
+ path: string;
116
+ boundary: string;
117
+ message: string;
118
+ }>;
119
+ };
120
+ };
121
+ }
122
+ export interface DevTrackApiScaffoldDryRunCliOptions {
123
+ feature_ref: string;
124
+ project_name: string;
125
+ package_name?: string;
126
+ operation_id?: string;
127
+ requested_write_scope?: string[];
128
+ created_at?: string;
129
+ }
130
+ export interface DevTrackApiScaffoldDryRunCliResult {
131
+ schema_version: 1;
132
+ manifest_path: string;
133
+ plan: DevTrackApiScaffoldDryRunPlan;
134
+ }
135
+ export declare function inspectPluginManifestFromFile(manifestPath: string): Promise<PluginCliInspectResult>;
136
+ export declare function planPluginInvocationFromFile(manifestPath: string, options: PluginCliPlanOptions): Promise<PluginCliPlanResult>;
137
+ export declare function planDevTrackApiScaffoldDryRunFromFile(manifestPath: string, options: DevTrackApiScaffoldDryRunCliOptions): Promise<DevTrackApiScaffoldDryRunCliResult>;
138
+ export {};
139
+ //# sourceMappingURL=plugin-cli.d.ts.map