@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,230 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
const POLICY_VERSION = 'v1';
|
|
3
|
+
export function classifyBacklogSyncConflict(input) {
|
|
4
|
+
const canonical = normalizeCanonical(input.canonical);
|
|
5
|
+
const sourceOfTruth = input.source_of_truth ?? 'codesdd';
|
|
6
|
+
const canonicalFingerprint = fingerprintBacklogSyncFields(canonical);
|
|
7
|
+
const decisions = [
|
|
8
|
+
{
|
|
9
|
+
code: 'source-of-truth.codesdd',
|
|
10
|
+
severity: 'info',
|
|
11
|
+
message: 'CodeSDD canonical state is authoritative for backlog sync decisions.',
|
|
12
|
+
source_of_truth: 'codesdd',
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
if (sourceOfTruth !== 'codesdd') {
|
|
16
|
+
decisions.push({
|
|
17
|
+
code: 'source-of-truth.unsupported',
|
|
18
|
+
severity: 'error',
|
|
19
|
+
message: 'Backlog sync only supports CodeSDD as the source of truth.',
|
|
20
|
+
source_of_truth: 'codesdd',
|
|
21
|
+
external_value: sourceOfTruth,
|
|
22
|
+
});
|
|
23
|
+
return buildResult('manual-review', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
24
|
+
}
|
|
25
|
+
if (!input.external) {
|
|
26
|
+
decisions.push({
|
|
27
|
+
code: 'external.missing',
|
|
28
|
+
severity: 'info',
|
|
29
|
+
message: 'No external work item is linked; create a provider item from canonical CodeSDD state.',
|
|
30
|
+
source_of_truth: 'codesdd',
|
|
31
|
+
});
|
|
32
|
+
return buildResult('create', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
33
|
+
}
|
|
34
|
+
const external = normalizeExternal(input.external);
|
|
35
|
+
if (external.provider !== input.provider) {
|
|
36
|
+
decisions.push({
|
|
37
|
+
code: 'provider.mismatch',
|
|
38
|
+
severity: 'error',
|
|
39
|
+
message: 'External work item belongs to a different provider than the sync request.',
|
|
40
|
+
source_of_truth: 'codesdd',
|
|
41
|
+
canonical_value: input.provider,
|
|
42
|
+
external_value: external.provider,
|
|
43
|
+
});
|
|
44
|
+
return buildResult('manual-review', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
45
|
+
}
|
|
46
|
+
if (external.canonical_ref && external.canonical_ref !== canonical.ref) {
|
|
47
|
+
decisions.push({
|
|
48
|
+
code: 'canonical-ref.mismatch',
|
|
49
|
+
severity: 'error',
|
|
50
|
+
message: 'External work item points at a different CodeSDD reference.',
|
|
51
|
+
field: 'canonical_ref',
|
|
52
|
+
source_of_truth: 'codesdd',
|
|
53
|
+
canonical_value: canonical.ref,
|
|
54
|
+
external_value: external.canonical_ref,
|
|
55
|
+
});
|
|
56
|
+
return buildResult('manual-review', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
57
|
+
}
|
|
58
|
+
const diffs = diffSyncFields(canonical, external);
|
|
59
|
+
for (const diff of diffs) {
|
|
60
|
+
decisions.push({
|
|
61
|
+
code: 'field.diff',
|
|
62
|
+
severity: 'warning',
|
|
63
|
+
message: `External field ${diff.field} differs from canonical CodeSDD state.`,
|
|
64
|
+
field: diff.field,
|
|
65
|
+
source_of_truth: 'codesdd',
|
|
66
|
+
canonical_value: diff.canonical_value,
|
|
67
|
+
external_value: diff.external_value,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (diffs.length === 0 && external.codesdd_fingerprint === canonicalFingerprint) {
|
|
71
|
+
decisions.push({
|
|
72
|
+
code: 'sync.clean',
|
|
73
|
+
severity: 'info',
|
|
74
|
+
message: 'External work item already matches the canonical CodeSDD fingerprint.',
|
|
75
|
+
source_of_truth: 'codesdd',
|
|
76
|
+
});
|
|
77
|
+
return buildResult('none', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
78
|
+
}
|
|
79
|
+
if (diffs.length === 0 && !external.codesdd_fingerprint) {
|
|
80
|
+
decisions.push({
|
|
81
|
+
code: 'sync.equivalent-without-fingerprint',
|
|
82
|
+
severity: 'info',
|
|
83
|
+
message: 'External work item fields match canonical state, but provider fingerprint metadata is absent.',
|
|
84
|
+
source_of_truth: 'codesdd',
|
|
85
|
+
});
|
|
86
|
+
return buildResult('update', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
87
|
+
}
|
|
88
|
+
const lastSyncedAt = latestDate(canonical.last_synced_at, external.last_synced_at);
|
|
89
|
+
const canonicalChanged = changedAfter(canonical.updated_at, lastSyncedAt);
|
|
90
|
+
const externalChanged = changedAfter(external.updated_at, lastSyncedAt);
|
|
91
|
+
if (diffs.length > 0 && canonicalChanged && externalChanged) {
|
|
92
|
+
decisions.push({
|
|
93
|
+
code: 'drift.concurrent',
|
|
94
|
+
severity: 'error',
|
|
95
|
+
message: 'Both canonical and external items changed after the last sync; manual review is required.',
|
|
96
|
+
source_of_truth: 'codesdd',
|
|
97
|
+
});
|
|
98
|
+
return buildResult('manual-review', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
99
|
+
}
|
|
100
|
+
if (diffs.length > 0 && canonicalChanged) {
|
|
101
|
+
decisions.push({
|
|
102
|
+
code: 'canonical.drift',
|
|
103
|
+
severity: 'warning',
|
|
104
|
+
message: 'Canonical CodeSDD state changed after the last sync; push canonical state to the provider.',
|
|
105
|
+
source_of_truth: 'codesdd',
|
|
106
|
+
});
|
|
107
|
+
return buildResult('canonical-drift', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
108
|
+
}
|
|
109
|
+
if (diffs.length > 0 && externalChanged) {
|
|
110
|
+
decisions.push({
|
|
111
|
+
code: 'external.stale',
|
|
112
|
+
severity: 'warning',
|
|
113
|
+
message: 'External work item drifted from CodeSDD; overwrite from canonical state unless reviewed.',
|
|
114
|
+
source_of_truth: 'codesdd',
|
|
115
|
+
});
|
|
116
|
+
return buildResult('stale-external', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
117
|
+
}
|
|
118
|
+
decisions.push({
|
|
119
|
+
code: 'sync.update-required',
|
|
120
|
+
severity: 'warning',
|
|
121
|
+
message: 'External work item differs from canonical CodeSDD state and should be updated.',
|
|
122
|
+
source_of_truth: 'codesdd',
|
|
123
|
+
});
|
|
124
|
+
return buildResult('update', input.provider, canonical.ref, canonicalFingerprint, decisions);
|
|
125
|
+
}
|
|
126
|
+
export function buildBacklogSyncIdempotencyKey(input) {
|
|
127
|
+
return ['codesdd-backlog-sync', POLICY_VERSION, input.provider, input.canonical_ref, input.operation].join(':');
|
|
128
|
+
}
|
|
129
|
+
export function fingerprintBacklogSyncFields(fields) {
|
|
130
|
+
return `sha256:${createHash('sha256').update(stableStringify(normalizeFieldSet(fields))).digest('hex')}`;
|
|
131
|
+
}
|
|
132
|
+
function buildResult(classification, provider, canonicalRef, canonicalFingerprint, decisions) {
|
|
133
|
+
const operation = operationForClassification(classification);
|
|
134
|
+
return {
|
|
135
|
+
classification,
|
|
136
|
+
operation,
|
|
137
|
+
idempotency_key: buildBacklogSyncIdempotencyKey({ provider, canonical_ref: canonicalRef, operation }),
|
|
138
|
+
canonical_fingerprint: canonicalFingerprint,
|
|
139
|
+
decisions,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function operationForClassification(classification) {
|
|
143
|
+
if (classification === 'none')
|
|
144
|
+
return 'noop';
|
|
145
|
+
if (classification === 'create')
|
|
146
|
+
return 'create';
|
|
147
|
+
if (classification === 'manual-review')
|
|
148
|
+
return 'manual-review';
|
|
149
|
+
return 'update';
|
|
150
|
+
}
|
|
151
|
+
function normalizeCanonical(item) {
|
|
152
|
+
return {
|
|
153
|
+
...item,
|
|
154
|
+
...normalizeFieldSet(item),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function normalizeExternal(item) {
|
|
158
|
+
return {
|
|
159
|
+
...item,
|
|
160
|
+
title: normalizeString(item.title),
|
|
161
|
+
status: normalizeString(item.status),
|
|
162
|
+
parent_ref: normalizeOptionalString(item.parent_ref),
|
|
163
|
+
labels: normalizeLabels(item.labels),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function normalizeFieldSet(fields) {
|
|
167
|
+
return {
|
|
168
|
+
title: normalizeString(fields.title),
|
|
169
|
+
status: normalizeString(fields.status),
|
|
170
|
+
parent_ref: normalizeOptionalString(fields.parent_ref) ?? '',
|
|
171
|
+
labels: normalizeLabels(fields.labels),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function normalizeString(value) {
|
|
175
|
+
return (value ?? '').trim();
|
|
176
|
+
}
|
|
177
|
+
function normalizeOptionalString(value) {
|
|
178
|
+
const normalized = normalizeString(value);
|
|
179
|
+
return normalized.length > 0 ? normalized : undefined;
|
|
180
|
+
}
|
|
181
|
+
function normalizeLabels(labels) {
|
|
182
|
+
return Array.from(new Set((labels ?? []).map((label) => label.trim()).filter(Boolean))).sort((left, right) => left.localeCompare(right));
|
|
183
|
+
}
|
|
184
|
+
function diffSyncFields(canonical, external) {
|
|
185
|
+
const canonicalFields = normalizeFieldSet(canonical);
|
|
186
|
+
const externalFields = normalizeFieldSet({
|
|
187
|
+
title: external.title ?? '',
|
|
188
|
+
status: external.status ?? '',
|
|
189
|
+
parent_ref: external.parent_ref,
|
|
190
|
+
labels: external.labels,
|
|
191
|
+
});
|
|
192
|
+
const diffs = [];
|
|
193
|
+
for (const field of ['title', 'status', 'parent_ref']) {
|
|
194
|
+
if (canonicalFields[field] !== externalFields[field]) {
|
|
195
|
+
diffs.push({ field, canonical_value: canonicalFields[field], external_value: externalFields[field] });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (stableStringify(canonicalFields.labels) !== stableStringify(externalFields.labels)) {
|
|
199
|
+
diffs.push({ field: 'labels', canonical_value: canonicalFields.labels, external_value: externalFields.labels });
|
|
200
|
+
}
|
|
201
|
+
return diffs;
|
|
202
|
+
}
|
|
203
|
+
function latestDate(left, right) {
|
|
204
|
+
if (!left)
|
|
205
|
+
return right;
|
|
206
|
+
if (!right)
|
|
207
|
+
return left;
|
|
208
|
+
return Date.parse(left) >= Date.parse(right) ? left : right;
|
|
209
|
+
}
|
|
210
|
+
function changedAfter(candidate, baseline) {
|
|
211
|
+
if (!candidate || !baseline)
|
|
212
|
+
return false;
|
|
213
|
+
const candidateTime = Date.parse(candidate);
|
|
214
|
+
const baselineTime = Date.parse(baseline);
|
|
215
|
+
return Number.isFinite(candidateTime) && Number.isFinite(baselineTime) && candidateTime > baselineTime;
|
|
216
|
+
}
|
|
217
|
+
function stableStringify(value) {
|
|
218
|
+
if (Array.isArray(value)) {
|
|
219
|
+
return `[${value.map(stableStringify).join(',')}]`;
|
|
220
|
+
}
|
|
221
|
+
if (value && typeof value === 'object') {
|
|
222
|
+
const entries = Object.entries(value)
|
|
223
|
+
.filter(([, item]) => item !== undefined)
|
|
224
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
225
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${stableStringify(item)}`);
|
|
226
|
+
return `{${entries.join(',')}}`;
|
|
227
|
+
}
|
|
228
|
+
return JSON.stringify(value);
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=backlog-conflict-policy.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BacklogProjectionPlan, type BacklogProviderContract, type BacklogProviderContractInput, type CanonicalBacklogItem } from './backlog-provider-contract.js';
|
|
2
|
+
export declare function builtInAzureDevOpsBacklogContract(): BacklogProviderContract;
|
|
3
|
+
export declare function buildAzureDevOpsBacklogProjectionPlan(input: {
|
|
4
|
+
items: CanonicalBacklogItem[];
|
|
5
|
+
created_at?: string;
|
|
6
|
+
contract?: BacklogProviderContractInput;
|
|
7
|
+
}): BacklogProjectionPlan;
|
|
8
|
+
//# sourceMappingURL=backlog-projection.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { backlogProjectionPlanSchema, buildBacklogProjectionItem, createBacklogProviderContract, } from './backlog-provider-contract.js';
|
|
2
|
+
const AZURE_DEVOPS_EXTERNAL_TYPES = {
|
|
3
|
+
epic: 'Epic',
|
|
4
|
+
feature: 'User Story',
|
|
5
|
+
};
|
|
6
|
+
export function builtInAzureDevOpsBacklogContract() {
|
|
7
|
+
return createBacklogProviderContract({
|
|
8
|
+
schema_version: 1,
|
|
9
|
+
provider: 'azure-devops',
|
|
10
|
+
adapter_id: 'azure-devops',
|
|
11
|
+
label: 'Azure DevOps Boards',
|
|
12
|
+
status: 'experimental',
|
|
13
|
+
auth: {
|
|
14
|
+
mode: 'pat',
|
|
15
|
+
required_env: ['AZURE_DEVOPS_EXT_PAT'],
|
|
16
|
+
secret_fields: ['AZURE_DEVOPS_EXT_PAT'],
|
|
17
|
+
},
|
|
18
|
+
capabilities: [
|
|
19
|
+
{
|
|
20
|
+
operation: 'create',
|
|
21
|
+
entity_kinds: ['epic', 'feature'],
|
|
22
|
+
dry_run: true,
|
|
23
|
+
apply: false,
|
|
24
|
+
idempotent: true,
|
|
25
|
+
required_fields: ['System.Title', 'System.State', 'Custom.CodeSDDRef'],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
operation: 'link',
|
|
29
|
+
entity_kinds: ['epic', 'feature'],
|
|
30
|
+
dry_run: true,
|
|
31
|
+
apply: false,
|
|
32
|
+
idempotent: true,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
mapping: {
|
|
36
|
+
external_project_field: 'System.TeamProject',
|
|
37
|
+
external_id_field: 'System.Id',
|
|
38
|
+
external_url_field: 'System.Url',
|
|
39
|
+
canonical_ref_field: 'Custom.CodeSDDRef',
|
|
40
|
+
parent_ref_field: 'Custom.CodeSDDParentRef',
|
|
41
|
+
entity_type_field: 'Custom.CodeSDDEntityType',
|
|
42
|
+
title_field: 'System.Title',
|
|
43
|
+
status_field: 'System.State',
|
|
44
|
+
},
|
|
45
|
+
canonical_state_boundary: {
|
|
46
|
+
source_of_truth: 'codesdd',
|
|
47
|
+
state_paths: ['.sdd/state/*.yaml'],
|
|
48
|
+
external_state_authoritative: false,
|
|
49
|
+
hidden_state_allowed: false,
|
|
50
|
+
},
|
|
51
|
+
governance: {
|
|
52
|
+
owner: 'platform-architecture',
|
|
53
|
+
sync_requires_dry_run: true,
|
|
54
|
+
mutation_requires_approval: true,
|
|
55
|
+
audit_event: 'codesdd.backlog.projection',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export function buildAzureDevOpsBacklogProjectionPlan(input) {
|
|
60
|
+
const contract = input.contract
|
|
61
|
+
? createBacklogProviderContract(input.contract)
|
|
62
|
+
: builtInAzureDevOpsBacklogContract();
|
|
63
|
+
if (contract.provider !== 'azure-devops') {
|
|
64
|
+
throw new Error(`Azure DevOps projection planner requires provider azure-devops, received ${contract.provider}.`);
|
|
65
|
+
}
|
|
66
|
+
const projectedItems = input.items.map((item) => {
|
|
67
|
+
const externalType = AZURE_DEVOPS_EXTERNAL_TYPES[item.kind];
|
|
68
|
+
if (!externalType) {
|
|
69
|
+
throw new Error(`Azure DevOps projection planner supports only epic and feature items, received ${item.kind}.`);
|
|
70
|
+
}
|
|
71
|
+
return buildBacklogProjectionItem({
|
|
72
|
+
contract,
|
|
73
|
+
item,
|
|
74
|
+
external_type: externalType,
|
|
75
|
+
operation: 'create',
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
return backlogProjectionPlanSchema.parse({
|
|
79
|
+
schema_version: 1,
|
|
80
|
+
created_at: input.created_at ?? new Date().toISOString(),
|
|
81
|
+
provider: 'azure-devops',
|
|
82
|
+
mode: 'dry-run',
|
|
83
|
+
direction: 'push',
|
|
84
|
+
source_of_truth: 'codesdd',
|
|
85
|
+
items: projectedItems,
|
|
86
|
+
warnings: [],
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=backlog-projection.js.map
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const backlogProviderIdSchema: z.ZodEnum<{
|
|
3
|
+
generic: "generic";
|
|
4
|
+
"azure-devops": "azure-devops";
|
|
5
|
+
jira: "jira";
|
|
6
|
+
trello: "trello";
|
|
7
|
+
confluence: "confluence";
|
|
8
|
+
asana: "asana";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const backlogEntityKindSchema: z.ZodEnum<{
|
|
11
|
+
epic: "epic";
|
|
12
|
+
feature: "feature";
|
|
13
|
+
insight: "insight";
|
|
14
|
+
debate: "debate";
|
|
15
|
+
task: "task";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const backlogProviderOperationSchema: z.ZodEnum<{
|
|
18
|
+
link: "link";
|
|
19
|
+
update: "update";
|
|
20
|
+
create: "create";
|
|
21
|
+
query: "query";
|
|
22
|
+
}>;
|
|
23
|
+
export declare const backlogProjectionModeSchema: z.ZodEnum<{
|
|
24
|
+
apply: "apply";
|
|
25
|
+
"dry-run": "dry-run";
|
|
26
|
+
}>;
|
|
27
|
+
export declare const backlogProjectionDirectionSchema: z.ZodEnum<{
|
|
28
|
+
push: "push";
|
|
29
|
+
pull: "pull";
|
|
30
|
+
bidirectional: "bidirectional";
|
|
31
|
+
}>;
|
|
32
|
+
export declare const backlogAuthModeSchema: z.ZodEnum<{
|
|
33
|
+
none: "none";
|
|
34
|
+
pat: "pat";
|
|
35
|
+
oauth: "oauth";
|
|
36
|
+
"managed-identity": "managed-identity";
|
|
37
|
+
"app-installation": "app-installation";
|
|
38
|
+
}>;
|
|
39
|
+
export declare const backlogProviderCapabilitySchema: z.ZodObject<{
|
|
40
|
+
operation: z.ZodEnum<{
|
|
41
|
+
link: "link";
|
|
42
|
+
update: "update";
|
|
43
|
+
create: "create";
|
|
44
|
+
query: "query";
|
|
45
|
+
}>;
|
|
46
|
+
entity_kinds: z.ZodArray<z.ZodEnum<{
|
|
47
|
+
epic: "epic";
|
|
48
|
+
feature: "feature";
|
|
49
|
+
insight: "insight";
|
|
50
|
+
debate: "debate";
|
|
51
|
+
task: "task";
|
|
52
|
+
}>>;
|
|
53
|
+
dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
+
apply: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
+
idempotent: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
required_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export declare const backlogProviderContractSchema: z.ZodObject<{
|
|
59
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
60
|
+
provider: z.ZodEnum<{
|
|
61
|
+
generic: "generic";
|
|
62
|
+
"azure-devops": "azure-devops";
|
|
63
|
+
jira: "jira";
|
|
64
|
+
trello: "trello";
|
|
65
|
+
confluence: "confluence";
|
|
66
|
+
asana: "asana";
|
|
67
|
+
}>;
|
|
68
|
+
adapter_id: z.ZodString;
|
|
69
|
+
label: z.ZodString;
|
|
70
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
71
|
+
experimental: "experimental";
|
|
72
|
+
disabled: "disabled";
|
|
73
|
+
active: "active";
|
|
74
|
+
}>>;
|
|
75
|
+
auth: z.ZodObject<{
|
|
76
|
+
mode: z.ZodEnum<{
|
|
77
|
+
none: "none";
|
|
78
|
+
pat: "pat";
|
|
79
|
+
oauth: "oauth";
|
|
80
|
+
"managed-identity": "managed-identity";
|
|
81
|
+
"app-installation": "app-installation";
|
|
82
|
+
}>;
|
|
83
|
+
required_env: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
84
|
+
secret_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
87
|
+
operation: z.ZodEnum<{
|
|
88
|
+
link: "link";
|
|
89
|
+
update: "update";
|
|
90
|
+
create: "create";
|
|
91
|
+
query: "query";
|
|
92
|
+
}>;
|
|
93
|
+
entity_kinds: z.ZodArray<z.ZodEnum<{
|
|
94
|
+
epic: "epic";
|
|
95
|
+
feature: "feature";
|
|
96
|
+
insight: "insight";
|
|
97
|
+
debate: "debate";
|
|
98
|
+
task: "task";
|
|
99
|
+
}>>;
|
|
100
|
+
dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
101
|
+
apply: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
+
idempotent: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
+
required_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
mapping: z.ZodObject<{
|
|
106
|
+
external_project_field: z.ZodOptional<z.ZodString>;
|
|
107
|
+
external_id_field: z.ZodString;
|
|
108
|
+
external_url_field: z.ZodOptional<z.ZodString>;
|
|
109
|
+
canonical_ref_field: z.ZodString;
|
|
110
|
+
parent_ref_field: z.ZodOptional<z.ZodString>;
|
|
111
|
+
entity_type_field: z.ZodString;
|
|
112
|
+
title_field: z.ZodString;
|
|
113
|
+
status_field: z.ZodString;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
canonical_state_boundary: z.ZodObject<{
|
|
116
|
+
source_of_truth: z.ZodLiteral<"codesdd">;
|
|
117
|
+
state_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
118
|
+
external_state_authoritative: z.ZodLiteral<false>;
|
|
119
|
+
hidden_state_allowed: z.ZodLiteral<false>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
governance: z.ZodObject<{
|
|
122
|
+
owner: z.ZodString;
|
|
123
|
+
sync_requires_dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
124
|
+
mutation_requires_approval: z.ZodDefault<z.ZodBoolean>;
|
|
125
|
+
audit_event: z.ZodDefault<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
export declare const canonicalBacklogItemSchema: z.ZodObject<{
|
|
129
|
+
ref: z.ZodString;
|
|
130
|
+
kind: z.ZodEnum<{
|
|
131
|
+
epic: "epic";
|
|
132
|
+
feature: "feature";
|
|
133
|
+
insight: "insight";
|
|
134
|
+
debate: "debate";
|
|
135
|
+
}>;
|
|
136
|
+
title: z.ZodString;
|
|
137
|
+
status: z.ZodString;
|
|
138
|
+
parent_ref: z.ZodOptional<z.ZodString>;
|
|
139
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
140
|
+
url: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export declare const backlogProjectionItemSchema: z.ZodObject<{
|
|
143
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
144
|
+
provider: z.ZodEnum<{
|
|
145
|
+
generic: "generic";
|
|
146
|
+
"azure-devops": "azure-devops";
|
|
147
|
+
jira: "jira";
|
|
148
|
+
trello: "trello";
|
|
149
|
+
confluence: "confluence";
|
|
150
|
+
asana: "asana";
|
|
151
|
+
}>;
|
|
152
|
+
canonical_ref: z.ZodString;
|
|
153
|
+
entity_kind: z.ZodEnum<{
|
|
154
|
+
epic: "epic";
|
|
155
|
+
feature: "feature";
|
|
156
|
+
insight: "insight";
|
|
157
|
+
debate: "debate";
|
|
158
|
+
task: "task";
|
|
159
|
+
}>;
|
|
160
|
+
operation: z.ZodEnum<{
|
|
161
|
+
link: "link";
|
|
162
|
+
update: "update";
|
|
163
|
+
create: "create";
|
|
164
|
+
noop: "noop";
|
|
165
|
+
}>;
|
|
166
|
+
idempotency_key: z.ZodString;
|
|
167
|
+
external_type: z.ZodString;
|
|
168
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
169
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
170
|
+
rel: z.ZodEnum<{
|
|
171
|
+
canonical: "canonical";
|
|
172
|
+
parent: "parent";
|
|
173
|
+
trace: "trace";
|
|
174
|
+
}>;
|
|
175
|
+
target_ref: z.ZodString;
|
|
176
|
+
}, z.core.$strip>>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export declare const backlogProjectionPlanSchema: z.ZodObject<{
|
|
179
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
180
|
+
created_at: z.ZodString;
|
|
181
|
+
provider: z.ZodEnum<{
|
|
182
|
+
generic: "generic";
|
|
183
|
+
"azure-devops": "azure-devops";
|
|
184
|
+
jira: "jira";
|
|
185
|
+
trello: "trello";
|
|
186
|
+
confluence: "confluence";
|
|
187
|
+
asana: "asana";
|
|
188
|
+
}>;
|
|
189
|
+
mode: z.ZodEnum<{
|
|
190
|
+
apply: "apply";
|
|
191
|
+
"dry-run": "dry-run";
|
|
192
|
+
}>;
|
|
193
|
+
direction: z.ZodEnum<{
|
|
194
|
+
push: "push";
|
|
195
|
+
pull: "pull";
|
|
196
|
+
bidirectional: "bidirectional";
|
|
197
|
+
}>;
|
|
198
|
+
source_of_truth: z.ZodLiteral<"codesdd">;
|
|
199
|
+
items: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
200
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
201
|
+
provider: z.ZodEnum<{
|
|
202
|
+
generic: "generic";
|
|
203
|
+
"azure-devops": "azure-devops";
|
|
204
|
+
jira: "jira";
|
|
205
|
+
trello: "trello";
|
|
206
|
+
confluence: "confluence";
|
|
207
|
+
asana: "asana";
|
|
208
|
+
}>;
|
|
209
|
+
canonical_ref: z.ZodString;
|
|
210
|
+
entity_kind: z.ZodEnum<{
|
|
211
|
+
epic: "epic";
|
|
212
|
+
feature: "feature";
|
|
213
|
+
insight: "insight";
|
|
214
|
+
debate: "debate";
|
|
215
|
+
task: "task";
|
|
216
|
+
}>;
|
|
217
|
+
operation: z.ZodEnum<{
|
|
218
|
+
link: "link";
|
|
219
|
+
update: "update";
|
|
220
|
+
create: "create";
|
|
221
|
+
noop: "noop";
|
|
222
|
+
}>;
|
|
223
|
+
idempotency_key: z.ZodString;
|
|
224
|
+
external_type: z.ZodString;
|
|
225
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
226
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
227
|
+
rel: z.ZodEnum<{
|
|
228
|
+
canonical: "canonical";
|
|
229
|
+
parent: "parent";
|
|
230
|
+
trace: "trace";
|
|
231
|
+
}>;
|
|
232
|
+
target_ref: z.ZodString;
|
|
233
|
+
}, z.core.$strip>>>;
|
|
234
|
+
}, z.core.$strip>>>;
|
|
235
|
+
warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
export type BacklogProviderId = z.infer<typeof backlogProviderIdSchema>;
|
|
238
|
+
export type BacklogEntityKind = z.infer<typeof backlogEntityKindSchema>;
|
|
239
|
+
export type BacklogProviderCapability = z.infer<typeof backlogProviderCapabilitySchema>;
|
|
240
|
+
export type BacklogProviderContract = z.infer<typeof backlogProviderContractSchema>;
|
|
241
|
+
export type BacklogProviderContractInput = z.input<typeof backlogProviderContractSchema>;
|
|
242
|
+
export type CanonicalBacklogItem = z.infer<typeof canonicalBacklogItemSchema>;
|
|
243
|
+
export type BacklogProjectionItem = z.infer<typeof backlogProjectionItemSchema>;
|
|
244
|
+
export type BacklogProjectionPlan = z.infer<typeof backlogProjectionPlanSchema>;
|
|
245
|
+
export declare function createBacklogProviderContract(input: BacklogProviderContractInput): BacklogProviderContract;
|
|
246
|
+
export declare function buildBacklogProjectionItem(input: {
|
|
247
|
+
contract: BacklogProviderContractInput;
|
|
248
|
+
item: CanonicalBacklogItem;
|
|
249
|
+
external_type: string;
|
|
250
|
+
operation?: BacklogProjectionItem['operation'];
|
|
251
|
+
}): BacklogProjectionItem;
|
|
252
|
+
//# sourceMappingURL=backlog-provider-contract.d.ts.map
|