@devtrack-solution/codesdd 1.2.2 → 1.2.3
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.
- package/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
- package/.sdd/skills/curated/devtrack-api/SKILL.md +160 -28
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +1 -1
- package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +8 -7
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +93 -0
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +317 -0
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +295 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +4 -4
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/LICENSE +1 -1
- package/README.md +243 -51
- package/bin/codesdd.js +3 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +11 -558
- package/dist/cli/program.d.ts +14 -0
- package/dist/cli/program.js +645 -0
- package/dist/commands/change.js +5 -5
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.js +9 -2
- package/dist/commands/config.js +159 -20
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/schema.d.ts +63 -0
- package/dist/commands/schema.js +12 -12
- package/dist/commands/sdd/backlog.d.ts +3 -0
- package/dist/commands/sdd/backlog.js +54 -0
- package/dist/commands/sdd/execution.js +147 -16
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +153 -0
- package/dist/commands/sdd/shared.js +2 -23
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +69 -12
- package/dist/commands/spec.js +9 -9
- package/dist/commands/validate.js +6 -6
- package/dist/commands/workflow/instructions.js +6 -6
- package/dist/commands/workflow/new-change.js +3 -3
- package/dist/commands/workflow/shared.d.ts +1 -1
- package/dist/commands/workflow/shared.js +4 -4
- package/dist/core/archive.js +15 -5
- package/dist/core/artifact-graph/instruction-loader.d.ts +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +3 -3
- package/dist/core/artifact-graph/resolver.d.ts +4 -4
- package/dist/core/artifact-graph/resolver.js +6 -6
- package/dist/core/branding.js +3 -3
- package/dist/core/cli/command-matrix.js +10 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +171 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +1 -1
- package/dist/core/command-generation/adapters/costrict.js +2 -2
- package/dist/core/command-generation/types.d.ts +1 -1
- package/dist/core/completions/command-registry.d.ts +1 -1
- package/dist/core/completions/command-registry.js +155 -12
- package/dist/core/completions/completion-provider.d.ts +14 -1
- package/dist/core/completions/completion-provider.js +29 -1
- package/dist/core/completions/generators/bash-generator.d.ts +1 -1
- package/dist/core/completions/generators/bash-generator.js +20 -12
- package/dist/core/completions/generators/fish-generator.d.ts +9 -1
- package/dist/core/completions/generators/fish-generator.js +39 -25
- package/dist/core/completions/generators/powershell-generator.d.ts +1 -1
- package/dist/core/completions/generators/powershell-generator.js +21 -11
- package/dist/core/completions/generators/zsh-generator.d.ts +3 -6
- package/dist/core/completions/generators/zsh-generator.js +21 -42
- package/dist/core/completions/installers/bash-installer.js +6 -6
- package/dist/core/completions/installers/fish-installer.js +1 -1
- package/dist/core/completions/installers/powershell-installer.js +14 -14
- package/dist/core/completions/installers/zsh-installer.d.ts +7 -1
- package/dist/core/completions/installers/zsh-installer.js +36 -8
- package/dist/core/completions/templates/bash-templates.d.ts +1 -1
- package/dist/core/completions/templates/bash-templates.js +12 -6
- package/dist/core/completions/templates/fish-templates.d.ts +2 -2
- package/dist/core/completions/templates/fish-templates.js +20 -9
- package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
- package/dist/core/completions/templates/powershell-templates.js +13 -4
- package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
- package/dist/core/completions/templates/zsh-templates.js +18 -9
- package/dist/core/config-schema.d.ts +3 -1
- package/dist/core/config-schema.js +26 -1
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +41 -12
- package/dist/core/global-config.js +344 -27
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/init.d.ts +6 -1
- package/dist/core/init.js +99 -77
- package/dist/core/legacy-cleanup.d.ts +17 -17
- package/dist/core/legacy-cleanup.js +96 -79
- package/dist/core/list.js +18 -4
- package/dist/core/migration.d.ts +3 -1
- package/dist/core/migration.js +7 -8
- package/dist/core/parsers/change-parser.js +1 -1
- package/dist/core/parsers/markdown-parser.js +2 -2
- package/dist/core/profile-sync-drift.d.ts +1 -1
- package/dist/core/profile-sync-drift.js +13 -13
- package/dist/core/project-config.d.ts +4 -4
- package/dist/core/project-config.js +11 -11
- package/dist/core/schemas/change.schema.d.ts +1 -1
- package/dist/core/schemas/change.schema.js +1 -1
- package/dist/core/schemas/spec.schema.d.ts +1 -1
- package/dist/core/schemas/spec.schema.js +1 -1
- package/dist/core/sdd/adr.js +23 -1
- package/dist/core/sdd/agent-binding.d.ts +346 -0
- package/dist/core/sdd/agent-binding.js +343 -0
- package/dist/core/sdd/backlog-cli.d.ts +16 -0
- package/dist/core/sdd/backlog-cli.js +146 -0
- package/dist/core/sdd/backlog-conflict-policy.d.ts +58 -0
- package/dist/core/sdd/backlog-conflict-policy.js +230 -0
- package/dist/core/sdd/backlog-projection.d.ts +8 -0
- package/dist/core/sdd/backlog-projection.js +89 -0
- package/dist/core/sdd/backlog-provider-contract.d.ts +252 -0
- package/dist/core/sdd/backlog-provider-contract.js +158 -0
- package/dist/core/sdd/bootstrap.js +2 -2
- package/dist/core/sdd/check.d.ts +42 -0
- package/dist/core/sdd/check.js +22 -22
- package/dist/core/sdd/contract.d.ts +13 -0
- package/dist/core/sdd/contract.js +36 -0
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +38 -0
- package/dist/core/sdd/coordination/coordination-adapters.js +139 -1
- package/dist/core/sdd/deepagent-contracts.d.ts +276 -0
- package/dist/core/sdd/deepagent-contracts.js +173 -0
- package/dist/core/sdd/deepagents/adr-governor.d.ts +2 -0
- package/dist/core/sdd/deepagents/adr-governor.js +30 -0
- package/dist/core/sdd/deepagents/backend.d.ts +63 -0
- package/dist/core/sdd/deepagents/backend.js +174 -0
- package/dist/core/sdd/deepagents/codesdd-tools.d.ts +39 -0
- package/dist/core/sdd/deepagents/codesdd-tools.js +83 -0
- package/dist/core/sdd/deepagents/evidence-mapper.d.ts +86 -0
- package/dist/core/sdd/deepagents/evidence-mapper.js +178 -0
- package/dist/core/sdd/deepagents/model-provider.d.ts +53 -0
- package/dist/core/sdd/deepagents/model-provider.js +379 -0
- package/dist/core/sdd/deepagents/policy-enforcement.d.ts +30 -0
- package/dist/core/sdd/deepagents/policy-enforcement.js +90 -0
- package/dist/core/sdd/deepagents/policy.d.ts +75 -0
- package/dist/core/sdd/deepagents/policy.js +358 -0
- package/dist/core/sdd/deepagents/quality-witness.d.ts +3 -0
- package/dist/core/sdd/deepagents/quality-witness.js +77 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +75 -0
- package/dist/core/sdd/deepagents/reversa-subagents.js +182 -0
- package/dist/core/sdd/deepagents/runtime-factory.d.ts +90 -0
- package/dist/core/sdd/deepagents/runtime-factory.js +231 -0
- package/dist/core/sdd/deepagents/runtime-loader.d.ts +16 -0
- package/dist/core/sdd/deepagents/runtime-loader.js +65 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +36 -2
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +181 -5
- package/dist/core/sdd/devtrack-api-appliance.d.ts +84 -0
- package/dist/core/sdd/devtrack-api-appliance.js +257 -0
- package/dist/core/sdd/devtrack-api-architecture.d.ts +31 -0
- package/dist/core/sdd/devtrack-api-architecture.js +608 -0
- package/dist/core/sdd/devtrack-api-import-boundary.d.ts +19 -0
- package/dist/core/sdd/devtrack-api-import-boundary.js +32 -0
- package/dist/core/sdd/diagnose.d.ts +59 -0
- package/dist/core/sdd/diagnose.js +37 -37
- package/dist/core/sdd/docs-sync.js +33 -5
- package/dist/core/sdd/domain/post-active-validation.d.ts +7 -0
- package/dist/core/sdd/domain/post-active-validation.js +61 -0
- package/dist/core/sdd/domain/transition-engine.js +1 -0
- package/dist/core/sdd/entity-reference.d.ts +5 -0
- package/dist/core/sdd/entity-reference.js +22 -0
- package/dist/core/sdd/governance-backfill.d.ts +31 -0
- package/dist/core/sdd/governance-backfill.js +359 -0
- package/dist/core/sdd/governance-parser.d.ts +21 -0
- package/dist/core/sdd/governance-parser.js +91 -0
- package/dist/core/sdd/governance-schemas.d.ts +245 -0
- package/dist/core/sdd/governance-schemas.js +143 -0
- package/dist/core/sdd/{import-openspec.d.ts → import-legacy-spec.d.ts} +7 -7
- package/dist/core/sdd/{import-openspec.js → import-legacy-spec.js} +21 -29
- package/dist/core/sdd/init.d.ts +3 -0
- package/dist/core/sdd/init.js +6 -3
- package/dist/core/sdd/json-schema.js +100 -6
- package/dist/core/sdd/knowledge-graph.d.ts +45 -0
- package/dist/core/sdd/knowledge-graph.js +288 -0
- package/dist/core/sdd/legacy-operations.js +431 -43
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +56 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +362 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +152 -0
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +558 -0
- package/dist/core/sdd/plugin-broker.js +482 -0
- package/dist/core/sdd/plugin-certification.d.ts +79 -0
- package/dist/core/sdd/plugin-certification.js +453 -0
- package/dist/core/sdd/plugin-cli.d.ts +109 -0
- package/dist/core/sdd/plugin-cli.js +198 -0
- package/dist/core/sdd/plugin-evidence.d.ts +275 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +164 -0
- package/dist/core/sdd/plugin-manifest.js +215 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +88 -0
- package/dist/core/sdd/plugin-policy-pack.js +236 -0
- package/dist/core/sdd/plugin-policy.d.ts +68 -0
- package/dist/core/sdd/plugin-policy.js +212 -0
- package/dist/core/sdd/plugin-registry.d.ts +311 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +151 -0
- package/dist/core/sdd/plugin-skill-binding.js +339 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.d.ts +28 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.js +167 -0
- package/dist/core/sdd/quality-evidence-renderer.d.ts +65 -0
- package/dist/core/sdd/quality-evidence-renderer.js +218 -0
- package/dist/core/sdd/quality-scenario-runner.d.ts +42 -0
- package/dist/core/sdd/quality-scenario-runner.js +613 -0
- package/dist/core/sdd/quality-validation.d.ts +547 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/resolve-project-root.d.ts +2 -2
- package/dist/core/sdd/resolve-project-root.js +11 -5
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/services/agent-run.service.d.ts +65 -0
- package/dist/core/sdd/services/agent-run.service.js +189 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/context.service.js +18 -16
- package/dist/core/sdd/services/debate.service.js +15 -2
- package/dist/core/sdd/services/feature-lint.service.d.ts +22 -0
- package/dist/core/sdd/services/feature-lint.service.js +105 -5
- package/dist/core/sdd/services/finalize.service.d.ts +80 -0
- package/dist/core/sdd/services/finalize.service.js +323 -24
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.d.ts +17 -0
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.js +38 -0
- package/dist/core/sdd/services/governance-control-plane.service.d.ts +66 -0
- package/dist/core/sdd/services/governance-control-plane.service.js +134 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/legacy-capability.service.d.ts +10 -7
- package/dist/core/sdd/services/legacy-capability.service.js +38 -21
- package/dist/core/sdd/services/mcp-runtime.service.d.ts +123 -8
- package/dist/core/sdd/services/mcp-runtime.service.js +1085 -33
- package/dist/core/sdd/services/onboard.service.js +2 -1
- package/dist/core/sdd/services/rebuild.service.js +6 -1
- package/dist/core/sdd/services/skills-sync.service.d.ts +17 -5
- package/dist/core/sdd/services/skills-sync.service.js +55 -2
- package/dist/core/sdd/services/start.service.js +6 -4
- package/dist/core/sdd/skill-bundles-curation-schema.d.ts +66 -0
- package/dist/core/sdd/skill-bundles-curation-schema.js +52 -0
- package/dist/core/sdd/skill-evidence.d.ts +19 -0
- package/dist/core/sdd/skill-evidence.js +38 -0
- package/dist/core/sdd/skill-policy-pool.d.ts +46 -0
- package/dist/core/sdd/skill-policy-pool.js +185 -0
- package/dist/core/sdd/state.d.ts +22 -0
- package/dist/core/sdd/state.js +66 -41
- package/dist/core/sdd/structural-health.d.ts +42 -42
- package/dist/core/sdd/types.d.ts +33 -7
- package/dist/core/sdd/types.js +17 -0
- package/dist/core/sdd/upgrade-to-codesdd.d.ts +45 -0
- package/dist/core/sdd/upgrade-to-codesdd.js +179 -0
- package/dist/core/sdd/workspace-schemas.d.ts +285 -14
- package/dist/core/sdd/workspace-schemas.js +148 -0
- package/dist/core/sdd/write-manifest.js +22 -4
- package/dist/core/shared/skill-generation.d.ts +1 -1
- package/dist/core/shared/skill-generation.js +15 -15
- package/dist/core/shared/tool-detection.d.ts +3 -3
- package/dist/core/shared/tool-detection.js +14 -14
- package/dist/core/specs-apply.js +6 -6
- package/dist/core/templates/index.d.ts +1 -1
- package/dist/core/templates/index.js +1 -1
- package/dist/core/templates/workflows/apply-change.js +14 -14
- package/dist/core/templates/workflows/archive-change.js +32 -32
- package/dist/core/templates/workflows/bulk-archive-change.js +25 -25
- package/dist/core/templates/workflows/continue-change.js +12 -12
- package/dist/core/templates/workflows/explore.js +29 -29
- package/dist/core/templates/workflows/feedback.js +6 -6
- package/dist/core/templates/workflows/ff-change.js +24 -24
- package/dist/core/templates/workflows/new-change.js +20 -20
- package/dist/core/templates/workflows/onboard.js +33 -33
- package/dist/core/templates/workflows/propose.js +23 -23
- package/dist/core/templates/workflows/sdd.js +8 -8
- package/dist/core/templates/workflows/sync-specs.js +19 -19
- package/dist/core/templates/workflows/verify-change.js +17 -17
- package/dist/core/update.d.ts +2 -2
- package/dist/core/update.js +16 -15
- package/dist/core/validation/constants.d.ts +1 -1
- package/dist/core/validation/constants.js +1 -1
- package/dist/core/view.js +11 -11
- package/dist/telemetry/config.d.ts +2 -1
- package/dist/telemetry/config.js +17 -8
- package/dist/telemetry/index.d.ts +10 -2
- package/dist/telemetry/index.js +40 -7
- package/dist/ui/ascii-patterns.d.ts +2 -2
- package/dist/ui/ascii-patterns.js +2 -2
- package/dist/ui/welcome-screen.js +2 -2
- package/dist/utils/change-metadata.d.ts +4 -4
- package/dist/utils/change-metadata.js +6 -6
- package/dist/utils/change-utils.d.ts +3 -3
- package/dist/utils/change-utils.js +5 -5
- package/dist/utils/file-system.js +1 -1
- package/dist/utils/interactive.js +1 -1
- package/dist/utils/item-discovery.js +4 -4
- package/dist/utils/legacy-spec-compat.d.ts +2 -0
- package/dist/utils/legacy-spec-compat.js +2 -0
- package/dist/utils/shell-detection.d.ts +1 -0
- package/dist/utils/shell-detection.js +16 -0
- package/package.json +27 -17
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +73 -1
- package/schemas/sdd/3-tasks.schema.json +73 -1
- package/schemas/sdd/4-changelog.schema.json +1 -1
- package/schemas/sdd/5-quality.schema.json +442 -2
- package/schemas/sdd/adr.schema.json +148 -0
- package/schemas/sdd/agent-binding-adapter.schema.json +210 -0
- package/schemas/sdd/agent-binding-resolution.schema.json +338 -0
- package/schemas/sdd/backlog-projection-plan.schema.json +180 -0
- package/schemas/sdd/backlog-provider-contract.schema.json +260 -0
- package/schemas/sdd/codesdd-plugin.schema.json +474 -0
- package/schemas/sdd/debate.schema.json +244 -0
- package/schemas/sdd/deepagent-decision-evidence.schema.json +58 -0
- package/schemas/sdd/deepagent-env-contract.schema.json +143 -0
- package/schemas/sdd/deepagent-quality-evidence.schema.json +108 -0
- package/schemas/sdd/deepagent-run-evidence.schema.json +192 -0
- package/schemas/sdd/deepagent-run-plan.schema.json +197 -0
- package/schemas/sdd/deepagent-run-request.schema.json +321 -0
- package/schemas/sdd/deepagent-subagent-evidence.schema.json +110 -0
- package/schemas/sdd/deepagent-tool-call-evidence.schema.json +78 -0
- package/schemas/sdd/discarded.schema.json +127 -0
- package/schemas/sdd/epic.schema.json +147 -0
- package/schemas/sdd/insight.schema.json +136 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +215 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +150 -0
- package/schemas/sdd/plugin-compliance-index.schema.json +136 -0
- package/schemas/sdd/plugin-dry-run-plan.schema.json +260 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +569 -0
- package/schemas/sdd/plugin-policy-evaluation.schema.json +92 -0
- package/schemas/sdd/plugin-policy-pack-evaluation.schema.json +94 -0
- package/schemas/sdd/plugin-policy-pack.schema.json +196 -0
- package/schemas/sdd/plugin-registry.schema.json +558 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +845 -0
- package/schemas/sdd/plugin-skill-binding-resolution.schema.json +305 -0
- package/schemas/sdd/plugin-skill-binding.schema.json +88 -0
- package/schemas/sdd/plugin-validation-manifest.schema.json +123 -0
- package/schemas/sdd/quality-architecture-schema.schema.json +216 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +1228 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/workspace-catalog.schema.json +9841 -22
- package/schemas/spec-driven/schema.yaml +4 -4
- package/schemas/spec-driven/templates/proposal.md +1 -1
- package/dist/utils/openspec-compat.d.ts +0 -2
- 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,109 @@
|
|
|
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
|
+
type PluginInvocationMode = 'dry-run' | 'apply' | 'rollback';
|
|
5
|
+
export interface PluginCliInspectResult {
|
|
6
|
+
schema_version: 1;
|
|
7
|
+
manifest_path: string;
|
|
8
|
+
plugin_ref: {
|
|
9
|
+
id: string;
|
|
10
|
+
version: string;
|
|
11
|
+
};
|
|
12
|
+
contract_version: number;
|
|
13
|
+
technology: PluginManifest['technology'];
|
|
14
|
+
capabilities: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
supports_dry_run: boolean;
|
|
17
|
+
supports_apply: boolean;
|
|
18
|
+
supports_rollback: boolean;
|
|
19
|
+
write_scope: string[];
|
|
20
|
+
approval: string;
|
|
21
|
+
risk_tier: string;
|
|
22
|
+
}>;
|
|
23
|
+
execution: Pick<PluginManifest['execution'], 'command' | 'args' | 'timeout_seconds' | 'network' | 'process_spawn'>;
|
|
24
|
+
governance: Pick<PluginManifest['governance'], 'owner' | 'trust_tier' | 'risk_tier' | 'policy_packs'>;
|
|
25
|
+
validation: PluginManifest['validation'];
|
|
26
|
+
compression: PluginManifest['compression'];
|
|
27
|
+
}
|
|
28
|
+
export interface PluginCliPlanOptions {
|
|
29
|
+
feature_ref: string;
|
|
30
|
+
capability: string;
|
|
31
|
+
mode?: PluginInvocationMode;
|
|
32
|
+
skill_ref?: string;
|
|
33
|
+
inputs?: Record<string, unknown>;
|
|
34
|
+
requested_write_scope?: string[];
|
|
35
|
+
approval_grants?: string[];
|
|
36
|
+
operation_id?: string;
|
|
37
|
+
source_checksum?: string;
|
|
38
|
+
planned_writes?: string[];
|
|
39
|
+
requested_env?: string[];
|
|
40
|
+
network_domains?: string[];
|
|
41
|
+
process_spawn_requested?: boolean;
|
|
42
|
+
technology?: {
|
|
43
|
+
language?: string;
|
|
44
|
+
framework?: string;
|
|
45
|
+
};
|
|
46
|
+
created_at?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PluginCliPlanResult {
|
|
49
|
+
schema_version: 1;
|
|
50
|
+
manifest_path: string;
|
|
51
|
+
plan: PluginRuntimeInvocationPlan;
|
|
52
|
+
workcell_runner: PluginCliWorkcellRunner;
|
|
53
|
+
}
|
|
54
|
+
export interface PluginCliWorkcellRunner {
|
|
55
|
+
schema_version: 1;
|
|
56
|
+
status: PluginRuntimeInvocationPlan['status'];
|
|
57
|
+
parameterization: {
|
|
58
|
+
owner: 'llm';
|
|
59
|
+
source: 'runtime-plan-request';
|
|
60
|
+
feature_ref: string;
|
|
61
|
+
capability: string;
|
|
62
|
+
};
|
|
63
|
+
execution: {
|
|
64
|
+
owner: 'plugin-cli';
|
|
65
|
+
mode: 'dry-run' | 'apply' | 'rollback';
|
|
66
|
+
command: {
|
|
67
|
+
executable: string;
|
|
68
|
+
args: string[];
|
|
69
|
+
working_directory: string;
|
|
70
|
+
};
|
|
71
|
+
compression: {
|
|
72
|
+
mode: 'pretooluse';
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
engine: PluginManifest['compression']['engine'];
|
|
75
|
+
tee: PluginManifest['compression']['tee'];
|
|
76
|
+
max_output_tokens: number;
|
|
77
|
+
exclude_commands: string[];
|
|
78
|
+
applied: boolean;
|
|
79
|
+
wrapped_command: {
|
|
80
|
+
executable: string;
|
|
81
|
+
args: string[];
|
|
82
|
+
} | null;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
evidence: {
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
rollback: {
|
|
89
|
+
supported: boolean;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export interface DevTrackApiScaffoldDryRunCliOptions {
|
|
93
|
+
feature_ref: string;
|
|
94
|
+
project_name: string;
|
|
95
|
+
package_name?: string;
|
|
96
|
+
operation_id?: string;
|
|
97
|
+
requested_write_scope?: string[];
|
|
98
|
+
created_at?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface DevTrackApiScaffoldDryRunCliResult {
|
|
101
|
+
schema_version: 1;
|
|
102
|
+
manifest_path: string;
|
|
103
|
+
plan: DevTrackApiScaffoldDryRunPlan;
|
|
104
|
+
}
|
|
105
|
+
export declare function inspectPluginManifestFromFile(manifestPath: string): Promise<PluginCliInspectResult>;
|
|
106
|
+
export declare function planPluginInvocationFromFile(manifestPath: string, options: PluginCliPlanOptions): Promise<PluginCliPlanResult>;
|
|
107
|
+
export declare function planDevTrackApiScaffoldDryRunFromFile(manifestPath: string, options: DevTrackApiScaffoldDryRunCliOptions): Promise<DevTrackApiScaffoldDryRunCliResult>;
|
|
108
|
+
export {};
|
|
109
|
+
//# sourceMappingURL=plugin-cli.d.ts.map
|