@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.
- package/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
- package/.sdd/skills/curated/devtrack-api/SKILL.md +170 -31
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
- 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 +372 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +294 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +5 -5
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
- package/LICENSE +1 -1
- package/README.md +399 -53
- package/bin/codesdd.js +3 -2
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- 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 +320 -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 +489 -28
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +158 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +11 -22
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +107 -15
- 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 +19 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +180 -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 +200 -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 +20 -1
- package/dist/core/config-schema.js +70 -2
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +57 -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/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -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 +44 -0
- package/dist/core/sdd/check.js +62 -24
- 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 +53 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +182 -16
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +370 -0
- package/dist/core/sdd/deepagent-contracts.js +235 -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 +3 -3
- package/dist/core/sdd/default-bootstrap-files.js +50 -10
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +288 -8
- package/dist/core/sdd/devtrack-api-appliance.d.ts +91 -0
- package/dist/core/sdd/devtrack-api-appliance.js +280 -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 +54 -20
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- 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/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -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/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -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/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +108 -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 +507 -44
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +95 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +119 -0
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +357 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +330 -0
- package/dist/core/sdd/parallel-feat-automation.js +424 -0
- package/dist/core/sdd/plugin-broker.d.ts +777 -0
- package/dist/core/sdd/plugin-broker.js +492 -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 +139 -0
- package/dist/core/sdd/plugin-cli.js +265 -0
- package/dist/core/sdd/plugin-evidence.d.ts +348 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +232 -0
- package/dist/core/sdd/plugin-manifest.js +225 -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 +447 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -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 +620 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/release-readiness.d.ts +19 -0
- package/dist/core/sdd/release-readiness.js +472 -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/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +97 -0
- package/dist/core/sdd/services/agent-run.service.js +261 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +341 -25
- 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 +105 -0
- package/dist/core/sdd/services/finalize.service.js +499 -38
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- 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/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- 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 +23 -0
- package/dist/core/sdd/state.js +313 -66
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +55 -55
- package/dist/core/sdd/types.d.ts +60 -19
- package/dist/core/sdd/types.js +21 -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/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +670 -19
- package/dist/core/sdd/workspace-schemas.js +285 -5
- 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/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- 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 +34 -21
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +280 -3
- 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 +701 -5
- 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/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -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 +645 -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 +637 -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 +304 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +259 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -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 +678 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -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 +729 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +954 -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 +1337 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- package/schemas/sdd/workspace-catalog.schema.json +13232 -35
- 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,63 @@
|
|
|
1
|
+
export type DeepAgentsExecutionMode = 'read-only' | 'plan' | 'validate' | 'apply-sandbox' | 'apply-approved';
|
|
2
|
+
export type DeepAgentsTrustTier = 'local-dev' | 'experimental' | 'enterprise-approved' | 'blocked';
|
|
3
|
+
export interface DeepAgentsPermissionContext {
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
mode: DeepAgentsExecutionMode;
|
|
6
|
+
trustTier: DeepAgentsTrustTier;
|
|
7
|
+
writeScope: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface DeepAgentsStateBackend {
|
|
10
|
+
get(key: string): Promise<string | undefined>;
|
|
11
|
+
set(key: string, value: string): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface DeepAgentsStoreBackend {
|
|
14
|
+
get(key: string): Promise<string | undefined>;
|
|
15
|
+
set(key: string, value: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export interface DeepAgentsFilesystemBackend {
|
|
18
|
+
readFile(absolutePath: string): Promise<string>;
|
|
19
|
+
writeFile(absolutePath: string, content: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export interface DeepAgentsAccessDecision {
|
|
22
|
+
allowed: boolean;
|
|
23
|
+
code?: 'PATH_TRAVERSAL_BLOCKED' | 'OUTSIDE_PROJECT_ROOT' | 'WRITE_MODE_FORBIDDEN' | 'TRUST_TIER_BLOCKED' | 'SECRET_PATH_BLOCKED' | 'STATE_WRITE_FORBIDDEN' | 'FORBIDDEN_WRITE_PATH' | 'OUTSIDE_WRITE_SCOPE';
|
|
24
|
+
message?: string;
|
|
25
|
+
relativePath?: string;
|
|
26
|
+
absolutePath?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class DeepAgentsSandboxViolationError extends Error {
|
|
29
|
+
readonly decision: DeepAgentsAccessDecision;
|
|
30
|
+
constructor(decision: DeepAgentsAccessDecision);
|
|
31
|
+
}
|
|
32
|
+
export declare class InMemoryStateBackend implements DeepAgentsStateBackend {
|
|
33
|
+
private readonly values;
|
|
34
|
+
get(key: string): Promise<string | undefined>;
|
|
35
|
+
set(key: string, value: string): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export declare class InMemoryStoreBackend implements DeepAgentsStoreBackend {
|
|
38
|
+
private readonly values;
|
|
39
|
+
get(key: string): Promise<string | undefined>;
|
|
40
|
+
set(key: string, value: string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export declare class VirtualFilesystemBackend implements DeepAgentsFilesystemBackend {
|
|
43
|
+
private readonly files;
|
|
44
|
+
readFile(absolutePath: string): Promise<string>;
|
|
45
|
+
writeFile(absolutePath: string, content: string): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare class DeepAgentsSandboxBackend {
|
|
48
|
+
private readonly context;
|
|
49
|
+
private readonly filesystem;
|
|
50
|
+
readonly stateBackend: DeepAgentsStateBackend;
|
|
51
|
+
readonly storeBackend: DeepAgentsStoreBackend;
|
|
52
|
+
private readonly projectRoot;
|
|
53
|
+
private readonly mode;
|
|
54
|
+
private readonly trustTier;
|
|
55
|
+
private readonly writeScope;
|
|
56
|
+
constructor(context: DeepAgentsPermissionContext, filesystem: DeepAgentsFilesystemBackend, stateBackend: DeepAgentsStateBackend, storeBackend: DeepAgentsStoreBackend);
|
|
57
|
+
authorizeRead(relativePath: string): DeepAgentsAccessDecision;
|
|
58
|
+
authorizeWrite(relativePath: string): DeepAgentsAccessDecision;
|
|
59
|
+
readFile(relativePath: string): Promise<string>;
|
|
60
|
+
writeFile(relativePath: string, content: string): Promise<void>;
|
|
61
|
+
private evaluatePath;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
const WINDOWS_ABSOLUTE_PATH_PATTERN = /^[A-Za-z]:[\\/]/;
|
|
3
|
+
const FORBIDDEN_WRITE_PREFIXES = ['.sdd/state', '.git', 'node_modules'];
|
|
4
|
+
const SECRET_SEGMENTS = [
|
|
5
|
+
'.env',
|
|
6
|
+
'secret',
|
|
7
|
+
'secrets',
|
|
8
|
+
'credential',
|
|
9
|
+
'credentials',
|
|
10
|
+
'token',
|
|
11
|
+
'.aws',
|
|
12
|
+
'.ssh',
|
|
13
|
+
'id_rsa',
|
|
14
|
+
'pem',
|
|
15
|
+
'key',
|
|
16
|
+
];
|
|
17
|
+
const SECRET_SUFFIXES = ['.pem', '.key', '.p12', '.env'];
|
|
18
|
+
export class DeepAgentsSandboxViolationError extends Error {
|
|
19
|
+
decision;
|
|
20
|
+
constructor(decision) {
|
|
21
|
+
super(decision.message ?? 'Sandbox policy violation.');
|
|
22
|
+
this.name = 'DeepAgentsSandboxViolationError';
|
|
23
|
+
this.decision = decision;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class InMemoryStateBackend {
|
|
27
|
+
values = new Map();
|
|
28
|
+
async get(key) {
|
|
29
|
+
return this.values.get(key);
|
|
30
|
+
}
|
|
31
|
+
async set(key, value) {
|
|
32
|
+
this.values.set(key, value);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class InMemoryStoreBackend {
|
|
36
|
+
values = new Map();
|
|
37
|
+
async get(key) {
|
|
38
|
+
return this.values.get(key);
|
|
39
|
+
}
|
|
40
|
+
async set(key, value) {
|
|
41
|
+
this.values.set(key, value);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class VirtualFilesystemBackend {
|
|
45
|
+
files = new Map();
|
|
46
|
+
async readFile(absolutePath) {
|
|
47
|
+
const value = this.files.get(absolutePath);
|
|
48
|
+
if (typeof value !== 'string') {
|
|
49
|
+
throw new Error(`Virtual file not found: ${absolutePath}`);
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
async writeFile(absolutePath, content) {
|
|
54
|
+
this.files.set(absolutePath, content);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class DeepAgentsSandboxBackend {
|
|
58
|
+
context;
|
|
59
|
+
filesystem;
|
|
60
|
+
stateBackend;
|
|
61
|
+
storeBackend;
|
|
62
|
+
projectRoot;
|
|
63
|
+
mode;
|
|
64
|
+
trustTier;
|
|
65
|
+
writeScope;
|
|
66
|
+
constructor(context, filesystem, stateBackend, storeBackend) {
|
|
67
|
+
this.context = context;
|
|
68
|
+
this.filesystem = filesystem;
|
|
69
|
+
this.stateBackend = stateBackend;
|
|
70
|
+
this.storeBackend = storeBackend;
|
|
71
|
+
this.projectRoot = path.resolve(context.projectRoot);
|
|
72
|
+
this.mode = context.mode;
|
|
73
|
+
this.trustTier = context.trustTier;
|
|
74
|
+
this.writeScope = context.writeScope.map((scope) => normalizeScope(scope)).filter((scope) => !!scope);
|
|
75
|
+
}
|
|
76
|
+
authorizeRead(relativePath) {
|
|
77
|
+
return this.evaluatePath(relativePath, 'read');
|
|
78
|
+
}
|
|
79
|
+
authorizeWrite(relativePath) {
|
|
80
|
+
return this.evaluatePath(relativePath, 'write');
|
|
81
|
+
}
|
|
82
|
+
async readFile(relativePath) {
|
|
83
|
+
const decision = this.authorizeRead(relativePath);
|
|
84
|
+
if (!decision.allowed) {
|
|
85
|
+
throw new DeepAgentsSandboxViolationError(decision);
|
|
86
|
+
}
|
|
87
|
+
return this.filesystem.readFile(decision.absolutePath);
|
|
88
|
+
}
|
|
89
|
+
async writeFile(relativePath, content) {
|
|
90
|
+
const decision = this.authorizeWrite(relativePath);
|
|
91
|
+
if (!decision.allowed) {
|
|
92
|
+
throw new DeepAgentsSandboxViolationError(decision);
|
|
93
|
+
}
|
|
94
|
+
await this.filesystem.writeFile(decision.absolutePath, content);
|
|
95
|
+
}
|
|
96
|
+
evaluatePath(relativePath, operation) {
|
|
97
|
+
const normalizedRelativePath = normalizeScope(relativePath);
|
|
98
|
+
if (!normalizedRelativePath) {
|
|
99
|
+
return denied('PATH_TRAVERSAL_BLOCKED', `Path ${relativePath} is not a safe project-relative path.`);
|
|
100
|
+
}
|
|
101
|
+
const absolutePath = path.resolve(this.projectRoot, normalizedRelativePath);
|
|
102
|
+
if (!isWithinRoot(absolutePath, this.projectRoot)) {
|
|
103
|
+
return denied('OUTSIDE_PROJECT_ROOT', `Path ${relativePath} resolves outside project root.`, normalizedRelativePath);
|
|
104
|
+
}
|
|
105
|
+
if (isSecretPath(normalizedRelativePath)) {
|
|
106
|
+
return denied('SECRET_PATH_BLOCKED', `Path ${relativePath} was blocked by secret-path policy.`, normalizedRelativePath);
|
|
107
|
+
}
|
|
108
|
+
if (operation === 'write') {
|
|
109
|
+
if (this.mode !== 'apply-sandbox' && this.mode !== 'apply-approved') {
|
|
110
|
+
return denied('WRITE_MODE_FORBIDDEN', `Mode ${this.mode} does not allow filesystem writes.`, normalizedRelativePath);
|
|
111
|
+
}
|
|
112
|
+
if (this.trustTier === 'blocked') {
|
|
113
|
+
return denied('TRUST_TIER_BLOCKED', 'Blocked trust tier cannot perform writes.', normalizedRelativePath);
|
|
114
|
+
}
|
|
115
|
+
if (isProtectedStatePath(normalizedRelativePath)) {
|
|
116
|
+
return denied('STATE_WRITE_FORBIDDEN', `Path ${relativePath} cannot mutate canonical state files.`, normalizedRelativePath);
|
|
117
|
+
}
|
|
118
|
+
if (isWithinPrefixes(normalizedRelativePath, FORBIDDEN_WRITE_PREFIXES)) {
|
|
119
|
+
return denied('FORBIDDEN_WRITE_PATH', `Path ${relativePath} is forbidden by sandbox write boundaries.`, normalizedRelativePath);
|
|
120
|
+
}
|
|
121
|
+
if (!isWithinWriteScope(normalizedRelativePath, this.writeScope)) {
|
|
122
|
+
return denied('OUTSIDE_WRITE_SCOPE', `Path ${relativePath} is outside approved write scope for this operation.`, normalizedRelativePath);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
allowed: true,
|
|
127
|
+
relativePath: normalizedRelativePath,
|
|
128
|
+
absolutePath,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function denied(code, message, relativePath) {
|
|
133
|
+
return {
|
|
134
|
+
allowed: false,
|
|
135
|
+
code,
|
|
136
|
+
message,
|
|
137
|
+
relativePath,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function normalizeScope(value) {
|
|
141
|
+
const normalized = value.replace(/\\/gu, '/').replace(/^\.\//u, '');
|
|
142
|
+
if (!normalized || normalized === '.' || normalized.startsWith('/') || WINDOWS_ABSOLUTE_PATH_PATTERN.test(normalized)) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
const segments = normalized.split('/').filter(Boolean);
|
|
146
|
+
if (segments.some((segment) => segment === '..')) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return segments.join('/');
|
|
150
|
+
}
|
|
151
|
+
function isWithinWriteScope(value, scopes) {
|
|
152
|
+
if (scopes.length === 0) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return scopes.some((scope) => value === scope || value.startsWith(`${scope}/`));
|
|
156
|
+
}
|
|
157
|
+
function isWithinRoot(realPath, root) {
|
|
158
|
+
const relative = path.relative(root, realPath);
|
|
159
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
160
|
+
}
|
|
161
|
+
function isProtectedStatePath(relativePath) {
|
|
162
|
+
return relativePath === '.sdd/state' || relativePath.startsWith('.sdd/state/');
|
|
163
|
+
}
|
|
164
|
+
function isWithinPrefixes(relativePath, prefixes) {
|
|
165
|
+
return prefixes.some((prefix) => relativePath === prefix || relativePath.startsWith(`${prefix}/`));
|
|
166
|
+
}
|
|
167
|
+
function isSecretPath(relativePath) {
|
|
168
|
+
const lower = relativePath.toLowerCase();
|
|
169
|
+
if (SECRET_SUFFIXES.some((suffix) => lower.endsWith(suffix))) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
return lower.split('/').some((segment) => SECRET_SEGMENTS.some((token) => segment.includes(token)));
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CreateDeepAgentParams } from 'deepagents';
|
|
2
|
+
import { type CodeSddMcpToolName, type McpProviderId, type McpRuntimeInvocation, type McpRuntimePolicyGate, type McpRuntimeRiskTier, type McpRuntimeStateAccess } from '../services/mcp-runtime.service.js';
|
|
3
|
+
import type { SddStores } from '../store/sdd-stores.js';
|
|
4
|
+
export type DeepAgentsCodeSddToolName = 'codesdd_next' | 'codesdd_context' | 'codesdd_query' | 'codesdd_read' | 'codesdd_start' | 'codesdd_plugin_inspect' | 'codesdd_plugin_plan' | 'codesdd_plugin_apply_sandbox' | 'codesdd_quality_evidence' | 'codesdd_adr' | 'codesdd_check' | 'codesdd_diagnose' | 'codesdd_finalize_intent' | 'codesdd_frontend_impact' | 'codesdd_skill_prompt';
|
|
5
|
+
export type DeepAgentsCodeSddToolSafetyClass = 'read-diagnostic' | 'intent-mutation';
|
|
6
|
+
export type DeepAgentsCodeSddToolProfile = DeepAgentsCodeSddToolSafetyClass | 'all';
|
|
7
|
+
export interface DeepAgentsCodeSddToolDescriptor {
|
|
8
|
+
name: DeepAgentsCodeSddToolName;
|
|
9
|
+
canonical_tool: CodeSddMcpToolName;
|
|
10
|
+
safety_class: DeepAgentsCodeSddToolSafetyClass;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
input_schema: Record<string, unknown>;
|
|
14
|
+
output_schema: Record<string, unknown>;
|
|
15
|
+
state_access: McpRuntimeStateAccess;
|
|
16
|
+
policy_gate: McpRuntimePolicyGate;
|
|
17
|
+
risk_tier: McpRuntimeRiskTier;
|
|
18
|
+
requires_human_approval: boolean;
|
|
19
|
+
evidence_behavior: string;
|
|
20
|
+
hitl_requirement: string;
|
|
21
|
+
result_contract: 'mcp-runtime-invocation/v1' | 'intent-envelope/v1';
|
|
22
|
+
reads: string[];
|
|
23
|
+
writes: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface DeepAgentsCodeSddToolWrapper extends DeepAgentsCodeSddToolDescriptor {
|
|
26
|
+
invoke(args: Record<string, unknown>, options?: DeepAgentsCodeSddToolInvokeOptions): Promise<McpRuntimeInvocation>;
|
|
27
|
+
}
|
|
28
|
+
export interface DeepAgentsCodeSddToolInvokeOptions {
|
|
29
|
+
provider?: Extract<McpProviderId, 'deepagents'>;
|
|
30
|
+
}
|
|
31
|
+
export interface DeepAgentsCodeSddToolCatalogOptions {
|
|
32
|
+
profile?: DeepAgentsCodeSddToolProfile;
|
|
33
|
+
}
|
|
34
|
+
export type DeepAgentsCodeSddRuntimeTool = NonNullable<CreateDeepAgentParams['tools']>[number];
|
|
35
|
+
export declare function listCodeSddDeepAgentsToolDescriptors(options?: DeepAgentsCodeSddToolCatalogOptions): DeepAgentsCodeSddToolDescriptor[];
|
|
36
|
+
export declare function createCodeSddDeepAgentsToolWrappers(stores: SddStores, projectRoot: string, options?: DeepAgentsCodeSddToolCatalogOptions): DeepAgentsCodeSddToolWrapper[];
|
|
37
|
+
export declare function createCodeSddDeepAgentsRuntimeTools(stores: SddStores, projectRoot: string, options?: DeepAgentsCodeSddToolCatalogOptions): DeepAgentsCodeSddRuntimeTool[];
|
|
38
|
+
export declare function findCodeSddDeepAgentsToolDescriptor(name: DeepAgentsCodeSddToolName, options?: DeepAgentsCodeSddToolCatalogOptions): DeepAgentsCodeSddToolDescriptor | undefined;
|
|
39
|
+
//# sourceMappingURL=codesdd-tools.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { tool } from '@langchain/core/tools';
|
|
2
|
+
import { MCP_RUNTIME_TOOL_REGISTRY, McpRuntimeService, } from '../services/mcp-runtime.service.js';
|
|
3
|
+
const DEEPAGENTS_TOOL_NAME_MAP = {
|
|
4
|
+
'codesdd.next': 'codesdd_next',
|
|
5
|
+
'codesdd.context': 'codesdd_context',
|
|
6
|
+
'codesdd.query': 'codesdd_query',
|
|
7
|
+
'codesdd.read': 'codesdd_read',
|
|
8
|
+
'codesdd.start': 'codesdd_start',
|
|
9
|
+
'codesdd.plugin.inspect': 'codesdd_plugin_inspect',
|
|
10
|
+
'codesdd.plugin.plan': 'codesdd_plugin_plan',
|
|
11
|
+
'codesdd.plugin.apply_sandbox': 'codesdd_plugin_apply_sandbox',
|
|
12
|
+
'codesdd.quality.evidence': 'codesdd_quality_evidence',
|
|
13
|
+
'codesdd.adr': 'codesdd_adr',
|
|
14
|
+
'codesdd.check': 'codesdd_check',
|
|
15
|
+
'codesdd.diagnose': 'codesdd_diagnose',
|
|
16
|
+
'codesdd.finalize_intent': 'codesdd_finalize_intent',
|
|
17
|
+
'codesdd.frontend_impact': 'codesdd_frontend_impact',
|
|
18
|
+
'codesdd.skill_prompt': 'codesdd_skill_prompt',
|
|
19
|
+
};
|
|
20
|
+
export function listCodeSddDeepAgentsToolDescriptors(options = {}) {
|
|
21
|
+
const profile = options.profile ?? 'all';
|
|
22
|
+
return MCP_RUNTIME_TOOL_REGISTRY.map((entry) => {
|
|
23
|
+
const safetyClass = classifyToolSafety(entry.implementation.state_access, entry.governance.gate);
|
|
24
|
+
const resultContract = entry.governance.gate === 'intent-only' ? 'intent-envelope/v1' : 'mcp-runtime-invocation/v1';
|
|
25
|
+
return {
|
|
26
|
+
name: DEEPAGENTS_TOOL_NAME_MAP[entry.canonical_name],
|
|
27
|
+
canonical_tool: entry.canonical_name,
|
|
28
|
+
safety_class: safetyClass,
|
|
29
|
+
title: entry.title,
|
|
30
|
+
description: entry.description,
|
|
31
|
+
input_schema: entry.input_schema,
|
|
32
|
+
output_schema: entry.output_schema,
|
|
33
|
+
state_access: entry.implementation.state_access,
|
|
34
|
+
policy_gate: entry.governance.gate,
|
|
35
|
+
risk_tier: entry.governance.risk_tier,
|
|
36
|
+
requires_human_approval: entry.governance.gate === 'intent-only' || entry.governance.risk_tier === 'critical',
|
|
37
|
+
evidence_behavior: entry.governance.evidence_behavior,
|
|
38
|
+
hitl_requirement: entry.governance.hitl_rule,
|
|
39
|
+
result_contract: resultContract,
|
|
40
|
+
reads: [...entry.implementation.reads],
|
|
41
|
+
writes: [...entry.implementation.writes],
|
|
42
|
+
};
|
|
43
|
+
}).filter((descriptor) => profile === 'all' || descriptor.safety_class === profile);
|
|
44
|
+
}
|
|
45
|
+
export function createCodeSddDeepAgentsToolWrappers(stores, projectRoot, options = {}) {
|
|
46
|
+
const runtime = new McpRuntimeService(stores);
|
|
47
|
+
return listCodeSddDeepAgentsToolDescriptors(options).map((descriptor) => ({
|
|
48
|
+
...descriptor,
|
|
49
|
+
async invoke(args, options) {
|
|
50
|
+
return runtime.invoke(projectRoot, {
|
|
51
|
+
provider: options?.provider ?? 'deepagents',
|
|
52
|
+
tool: descriptor.canonical_tool,
|
|
53
|
+
args,
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
export function createCodeSddDeepAgentsRuntimeTools(stores, projectRoot, options = {}) {
|
|
59
|
+
return createCodeSddDeepAgentsToolWrappers(stores, projectRoot, options).map((wrapper) => tool(async (input) => {
|
|
60
|
+
const invocation = await wrapper.invoke(input);
|
|
61
|
+
return JSON.stringify(invocation);
|
|
62
|
+
}, {
|
|
63
|
+
name: wrapper.name,
|
|
64
|
+
description: [
|
|
65
|
+
wrapper.description,
|
|
66
|
+
`State access: ${wrapper.state_access}.`,
|
|
67
|
+
`Policy gate: ${wrapper.policy_gate}.`,
|
|
68
|
+
`Risk tier: ${wrapper.risk_tier}.`,
|
|
69
|
+
`HITL: ${wrapper.hitl_requirement}.`,
|
|
70
|
+
].join(' '),
|
|
71
|
+
schema: wrapper.input_schema,
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
export function findCodeSddDeepAgentsToolDescriptor(name, options = {}) {
|
|
75
|
+
return listCodeSddDeepAgentsToolDescriptors(options).find((descriptor) => descriptor.name === name);
|
|
76
|
+
}
|
|
77
|
+
function classifyToolSafety(stateAccess, gate) {
|
|
78
|
+
if (stateAccess === 'read-write' || gate === 'intent-only') {
|
|
79
|
+
return 'intent-mutation';
|
|
80
|
+
}
|
|
81
|
+
return 'read-diagnostic';
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=codesdd-tools.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { deepagentDecisionEvidenceSchema, deepagentQualityEvidenceSchema, deepagentRunEvidenceSchema, deepagentRunPlanSchema, deepagentSubagentEvidenceSchema, deepagentToolCallEvidenceSchema } from '../deepagent-contracts.js';
|
|
3
|
+
import type { McpRuntimeInvocation } from '../services/mcp-runtime.service.js';
|
|
4
|
+
import type { DeepAgentsCodeSddToolDescriptor } from './codesdd-tools.js';
|
|
5
|
+
import type { DeepAgentsRuntimeAdapterEnvelope } from './runtime-factory.js';
|
|
6
|
+
export type DeepAgentRunEvidence = z.infer<typeof deepagentRunEvidenceSchema>;
|
|
7
|
+
export type DeepAgentRunPlan = z.infer<typeof deepagentRunPlanSchema>;
|
|
8
|
+
export type DeepAgentToolCallEvidence = z.infer<typeof deepagentToolCallEvidenceSchema>;
|
|
9
|
+
export type DeepAgentSubagentEvidence = z.infer<typeof deepagentSubagentEvidenceSchema>;
|
|
10
|
+
export type DeepAgentDecisionEvidence = z.infer<typeof deepagentDecisionEvidenceSchema>;
|
|
11
|
+
export type DeepAgentQualityEvidence = z.infer<typeof deepagentQualityEvidenceSchema>;
|
|
12
|
+
export interface DeepAgentsToolCallEvidenceInput {
|
|
13
|
+
toolName: string;
|
|
14
|
+
input: unknown;
|
|
15
|
+
output: unknown;
|
|
16
|
+
stateAccessClass: DeepAgentToolCallEvidence['state_access_class'];
|
|
17
|
+
policyGate: string;
|
|
18
|
+
hitlDecision?: DeepAgentToolCallEvidence['hitl_decision'];
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
result?: DeepAgentToolCallEvidence['result'];
|
|
21
|
+
}
|
|
22
|
+
export interface DeepAgentsSubagentEvidenceInput {
|
|
23
|
+
subagentName: string;
|
|
24
|
+
promptPurpose: string;
|
|
25
|
+
toolsUsed?: string[];
|
|
26
|
+
skillsUsed?: string[];
|
|
27
|
+
inputs?: Record<string, unknown>;
|
|
28
|
+
structuredOutput?: Record<string, unknown>;
|
|
29
|
+
confidence?: number;
|
|
30
|
+
risks?: DeepAgentSubagentEvidence['risks'];
|
|
31
|
+
}
|
|
32
|
+
export interface DeepAgentsDecisionEvidenceInput {
|
|
33
|
+
decisionPoint: string;
|
|
34
|
+
alternatives: string[];
|
|
35
|
+
selectedOption: string;
|
|
36
|
+
adrRequired: boolean;
|
|
37
|
+
rationale: string;
|
|
38
|
+
approvals?: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface DeepAgentsQualityEvidenceInput {
|
|
41
|
+
matrix: DeepAgentQualityEvidence['matrix'];
|
|
42
|
+
}
|
|
43
|
+
export interface DeepAgentsRunEvidenceInput {
|
|
44
|
+
adapter: DeepAgentsRuntimeAdapterEnvelope;
|
|
45
|
+
status?: DeepAgentRunEvidence['status'];
|
|
46
|
+
planRef?: string;
|
|
47
|
+
artifacts?: string[];
|
|
48
|
+
validations?: string[];
|
|
49
|
+
decisions?: DeepAgentDecisionEvidence[];
|
|
50
|
+
risks?: DeepAgentRunEvidence['risks'];
|
|
51
|
+
finalizeIntent?: boolean;
|
|
52
|
+
modelMetadata?: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
export interface DeepAgentsRunPlanInput {
|
|
55
|
+
adapter: DeepAgentsRuntimeAdapterEnvelope;
|
|
56
|
+
tacticalSteps?: DeepAgentRunPlan['tactical_steps'];
|
|
57
|
+
subagentRouting?: DeepAgentRunPlan['subagent_routing'];
|
|
58
|
+
requiredApprovals?: string[];
|
|
59
|
+
expectedToolCalls?: string[];
|
|
60
|
+
writeManifestPreview?: string[];
|
|
61
|
+
validationMatrix?: DeepAgentRunPlan['validation_matrix'];
|
|
62
|
+
residualRisks?: DeepAgentRunPlan['residual_risks'];
|
|
63
|
+
}
|
|
64
|
+
export interface DeepAgentsMappedEvidence {
|
|
65
|
+
plan: DeepAgentRunPlan;
|
|
66
|
+
run: DeepAgentRunEvidence;
|
|
67
|
+
tool_calls: DeepAgentToolCallEvidence[];
|
|
68
|
+
subagents: DeepAgentSubagentEvidence[];
|
|
69
|
+
quality?: DeepAgentQualityEvidence;
|
|
70
|
+
}
|
|
71
|
+
export declare function mapDeepAgentsRunPlan(input: DeepAgentsRunPlanInput): DeepAgentRunPlan;
|
|
72
|
+
export declare function mapDeepAgentsRunEvidence(input: DeepAgentsRunEvidenceInput): DeepAgentRunEvidence;
|
|
73
|
+
export declare function mapDeepAgentsToolCallEvidence(input: DeepAgentsToolCallEvidenceInput): DeepAgentToolCallEvidence;
|
|
74
|
+
export declare function mapMcpInvocationToDeepAgentsToolCallEvidence(invocation: McpRuntimeInvocation, descriptor: DeepAgentsCodeSddToolDescriptor, input: unknown, durationMs?: number): DeepAgentToolCallEvidence;
|
|
75
|
+
export declare function mapDeepAgentsSubagentEvidence(input: DeepAgentsSubagentEvidenceInput): DeepAgentSubagentEvidence;
|
|
76
|
+
export declare function mapDeepAgentsDecisionEvidence(input: DeepAgentsDecisionEvidenceInput): DeepAgentDecisionEvidence;
|
|
77
|
+
export declare function mapDeepAgentsQualityEvidence(input: DeepAgentsQualityEvidenceInput): DeepAgentQualityEvidence;
|
|
78
|
+
export declare function mapDeepAgentsEvidenceBundle(input: {
|
|
79
|
+
plan: DeepAgentsRunPlanInput;
|
|
80
|
+
run?: Omit<DeepAgentsRunEvidenceInput, 'adapter'>;
|
|
81
|
+
toolCalls?: DeepAgentsToolCallEvidenceInput[];
|
|
82
|
+
subagents?: DeepAgentsSubagentEvidenceInput[];
|
|
83
|
+
quality?: DeepAgentsQualityEvidenceInput;
|
|
84
|
+
}): DeepAgentsMappedEvidence;
|
|
85
|
+
export declare function stableEvidenceHash(value: unknown): string;
|
|
86
|
+
//# sourceMappingURL=evidence-mapper.d.ts.map
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { deepagentDecisionEvidenceSchema, deepagentQualityEvidenceSchema, deepagentRunEvidenceSchema, deepagentRunPlanSchema, deepagentSubagentEvidenceSchema, deepagentToolCallEvidenceSchema, } from '../deepagent-contracts.js';
|
|
3
|
+
export function mapDeepAgentsRunPlan(input) {
|
|
4
|
+
const adapter = input.adapter;
|
|
5
|
+
return deepagentRunPlanSchema.parse({
|
|
6
|
+
schema_version: 1,
|
|
7
|
+
contract: 'deepagent-run-plan/v1',
|
|
8
|
+
run_id: adapter.run_id,
|
|
9
|
+
feature_ref: adapter.feature_ref,
|
|
10
|
+
mode: adapter.mode,
|
|
11
|
+
tactical_steps: input.tacticalSteps && input.tacticalSteps.length > 0
|
|
12
|
+
? input.tacticalSteps
|
|
13
|
+
: [
|
|
14
|
+
{
|
|
15
|
+
id: `${adapter.feature_ref}-STEP-001`,
|
|
16
|
+
title: 'Execute governed DeepAgents runtime step',
|
|
17
|
+
objective: `Run ${adapter.mode} mode under CodeSDD policy gates.`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
subagent_routing: input.subagentRouting ?? [],
|
|
21
|
+
required_approvals: input.requiredApprovals ?? adapter.policy.hitl.required_operations,
|
|
22
|
+
expected_tool_calls: input.expectedToolCalls ?? [],
|
|
23
|
+
write_manifest_preview: input.writeManifestPreview ??
|
|
24
|
+
adapter.policy.writes
|
|
25
|
+
.map((write) => write.relativePath)
|
|
26
|
+
.filter((relativePath) => Boolean(relativePath)),
|
|
27
|
+
validation_matrix: input.validationMatrix ?? [],
|
|
28
|
+
residual_risks: input.residualRisks ?? risksFromReasons(adapter.reasons),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export function mapDeepAgentsRunEvidence(input) {
|
|
32
|
+
const adapter = input.adapter;
|
|
33
|
+
const status = input.status ?? (adapter.status === 'ready' ? 'completed' : 'blocked');
|
|
34
|
+
return deepagentRunEvidenceSchema.parse({
|
|
35
|
+
schema_version: 1,
|
|
36
|
+
contract: 'deepagent-run-evidence/v1',
|
|
37
|
+
run_id: adapter.run_id,
|
|
38
|
+
feature_ref: adapter.feature_ref,
|
|
39
|
+
mode: adapter.mode,
|
|
40
|
+
status,
|
|
41
|
+
model_metadata: {
|
|
42
|
+
runtime: adapter.runtime,
|
|
43
|
+
readiness_status: adapter.readiness.status,
|
|
44
|
+
credential_present: adapter.readiness.credentialPresent,
|
|
45
|
+
policy_status: adapter.policy.status,
|
|
46
|
+
...input.modelMetadata,
|
|
47
|
+
},
|
|
48
|
+
config_fingerprint: adapter.config_fingerprint,
|
|
49
|
+
plan_ref: input.planRef ?? `${adapter.run_id}:plan`,
|
|
50
|
+
artifacts: input.artifacts ?? [],
|
|
51
|
+
validations: input.validations ?? [],
|
|
52
|
+
decisions: input.decisions ?? [],
|
|
53
|
+
risks: input.risks ?? risksFromReasons([...adapter.reasons, ...adapter.policy.reasons]),
|
|
54
|
+
finalize_intent: input.finalizeIntent ?? false,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function mapDeepAgentsToolCallEvidence(input) {
|
|
58
|
+
return deepagentToolCallEvidenceSchema.parse({
|
|
59
|
+
schema_version: 1,
|
|
60
|
+
contract: 'deepagent-tool-call-evidence/v1',
|
|
61
|
+
tool_name: input.toolName,
|
|
62
|
+
input_hash: stableEvidenceHash(input.input),
|
|
63
|
+
output_hash: stableEvidenceHash(input.output),
|
|
64
|
+
state_access_class: input.stateAccessClass,
|
|
65
|
+
policy_gate: input.policyGate,
|
|
66
|
+
hitl_decision: input.hitlDecision ?? 'none',
|
|
67
|
+
duration_ms: input.durationMs ?? 0,
|
|
68
|
+
result: input.result ?? 'ok',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function mapMcpInvocationToDeepAgentsToolCallEvidence(invocation, descriptor, input, durationMs = 0) {
|
|
72
|
+
return mapDeepAgentsToolCallEvidence({
|
|
73
|
+
toolName: descriptor.name,
|
|
74
|
+
input,
|
|
75
|
+
output: invocation.result,
|
|
76
|
+
stateAccessClass: descriptor.state_access === 'read' ? 'read' : 'write',
|
|
77
|
+
policyGate: descriptor.policy_gate,
|
|
78
|
+
hitlDecision: descriptor.requires_human_approval ? 'respond' : 'none',
|
|
79
|
+
durationMs,
|
|
80
|
+
result: 'ok',
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function mapDeepAgentsSubagentEvidence(input) {
|
|
84
|
+
return deepagentSubagentEvidenceSchema.parse({
|
|
85
|
+
schema_version: 1,
|
|
86
|
+
contract: 'deepagent-subagent-evidence/v1',
|
|
87
|
+
subagent_name: input.subagentName,
|
|
88
|
+
prompt_purpose: input.promptPurpose,
|
|
89
|
+
tools_used: input.toolsUsed ?? [],
|
|
90
|
+
skills_used: input.skillsUsed ?? [],
|
|
91
|
+
inputs: input.inputs ?? {},
|
|
92
|
+
structured_output: input.structuredOutput ?? {},
|
|
93
|
+
confidence: input.confidence ?? 1,
|
|
94
|
+
risks: input.risks ?? [],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export function mapDeepAgentsDecisionEvidence(input) {
|
|
98
|
+
return deepagentDecisionEvidenceSchema.parse({
|
|
99
|
+
schema_version: 1,
|
|
100
|
+
contract: 'deepagent-decision-evidence/v1',
|
|
101
|
+
decision_point: input.decisionPoint,
|
|
102
|
+
alternatives: input.alternatives,
|
|
103
|
+
selected_option: input.selectedOption,
|
|
104
|
+
adr_required: input.adrRequired,
|
|
105
|
+
rationale: input.rationale,
|
|
106
|
+
approvals: input.approvals ?? [],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export function mapDeepAgentsQualityEvidence(input) {
|
|
110
|
+
return deepagentQualityEvidenceSchema.parse({
|
|
111
|
+
schema_version: 1,
|
|
112
|
+
contract: 'deepagent-quality-evidence/v1',
|
|
113
|
+
matrix: input.matrix,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function mapDeepAgentsEvidenceBundle(input) {
|
|
117
|
+
const plan = mapDeepAgentsRunPlan(input.plan);
|
|
118
|
+
const decisions = input.run?.decisions ?? [];
|
|
119
|
+
return {
|
|
120
|
+
plan,
|
|
121
|
+
run: mapDeepAgentsRunEvidence({
|
|
122
|
+
adapter: input.plan.adapter,
|
|
123
|
+
planRef: `${plan.run_id}:plan`,
|
|
124
|
+
decisions,
|
|
125
|
+
...input.run,
|
|
126
|
+
}),
|
|
127
|
+
tool_calls: (input.toolCalls ?? []).map(mapDeepAgentsToolCallEvidence),
|
|
128
|
+
subagents: (input.subagents ?? []).map(mapDeepAgentsSubagentEvidence),
|
|
129
|
+
quality: input.quality ? mapDeepAgentsQualityEvidence(input.quality) : undefined,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export function stableEvidenceHash(value) {
|
|
133
|
+
const sanitized = sanitizeSensitiveValue(value);
|
|
134
|
+
return createHash('sha256').update(JSON.stringify(normalizeForHash(sanitized))).digest('hex');
|
|
135
|
+
}
|
|
136
|
+
function risksFromReasons(reasons) {
|
|
137
|
+
return reasons
|
|
138
|
+
.filter((reason) => reason.trim().length > 0)
|
|
139
|
+
.map((reason, index) => ({
|
|
140
|
+
id: `deepagents-risk-${index + 1}`,
|
|
141
|
+
severity: 'medium',
|
|
142
|
+
summary: reason,
|
|
143
|
+
mitigation: 'Review CodeSDD policy evidence before promoting execution.',
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
function normalizeForHash(value) {
|
|
147
|
+
if (Array.isArray(value)) {
|
|
148
|
+
return value.map((entry) => normalizeForHash(entry));
|
|
149
|
+
}
|
|
150
|
+
if (!value || typeof value !== 'object') {
|
|
151
|
+
return value;
|
|
152
|
+
}
|
|
153
|
+
const entries = Object.entries(value)
|
|
154
|
+
.filter(([, entryValue]) => typeof entryValue !== 'undefined')
|
|
155
|
+
.sort(([left], [right]) => left.localeCompare(right));
|
|
156
|
+
const normalized = {};
|
|
157
|
+
for (const [key, entryValue] of entries) {
|
|
158
|
+
normalized[key] = normalizeForHash(entryValue);
|
|
159
|
+
}
|
|
160
|
+
return normalized;
|
|
161
|
+
}
|
|
162
|
+
const SENSITIVE_KEY_TOKENS = ['key', 'secret', 'token', 'password', 'credential', 'private', 'auth'];
|
|
163
|
+
function sanitizeSensitiveValue(value) {
|
|
164
|
+
if (Array.isArray(value)) {
|
|
165
|
+
return value.map((entry) => sanitizeSensitiveValue(entry));
|
|
166
|
+
}
|
|
167
|
+
if (!value || typeof value !== 'object') {
|
|
168
|
+
return value;
|
|
169
|
+
}
|
|
170
|
+
const sanitized = {};
|
|
171
|
+
for (const [key, entryValue] of Object.entries(value)) {
|
|
172
|
+
const normalizedKey = key.toLowerCase();
|
|
173
|
+
const sensitive = SENSITIVE_KEY_TOKENS.some((token) => normalizedKey.includes(token));
|
|
174
|
+
sanitized[key] = sensitive ? '[REDACTED]' : sanitizeSensitiveValue(entryValue);
|
|
175
|
+
}
|
|
176
|
+
return sanitized;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=evidence-mapper.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { BaseLanguageModel } from '@langchain/core/language_models/base';
|
|
2
|
+
export type DeepAgentsModelProviderId = 'anthropic' | 'azure-ai' | 'azure-openai' | 'baseten' | 'cohere' | 'fireworks' | 'google' | 'google-genai' | 'grok' | 'kimi' | 'moonshot' | 'openai' | 'openai-compatible' | 'openrouter' | 'xai';
|
|
3
|
+
export interface DeepAgentsModelRef {
|
|
4
|
+
raw: string;
|
|
5
|
+
provider: string;
|
|
6
|
+
model: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DeepAgentsModelProviderProfile {
|
|
9
|
+
provider: DeepAgentsModelProviderId;
|
|
10
|
+
aliases: string[];
|
|
11
|
+
credentialEnvCandidates: string[];
|
|
12
|
+
endpointEnvCandidates: string[];
|
|
13
|
+
defaultDomains: string[];
|
|
14
|
+
defaultBaseUrl?: string;
|
|
15
|
+
endpointRequired: boolean;
|
|
16
|
+
materialization: 'pass-through' | 'azure-openai' | 'openai-compatible';
|
|
17
|
+
}
|
|
18
|
+
export interface DeepAgentsCredentialResolution {
|
|
19
|
+
candidates: string[];
|
|
20
|
+
credentialEnv?: string;
|
|
21
|
+
credentialPresent: boolean;
|
|
22
|
+
overrideUsed: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DeepAgentsEndpointResolution {
|
|
25
|
+
candidates: string[];
|
|
26
|
+
endpointEnv?: string;
|
|
27
|
+
endpointPresent: boolean;
|
|
28
|
+
endpointValid: boolean;
|
|
29
|
+
endpointDomain?: string;
|
|
30
|
+
endpointRequired: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface DeepAgentsProviderResolution {
|
|
33
|
+
modelRef?: DeepAgentsModelRef;
|
|
34
|
+
profile?: DeepAgentsModelProviderProfile;
|
|
35
|
+
credential: DeepAgentsCredentialResolution;
|
|
36
|
+
endpoint: DeepAgentsEndpointResolution;
|
|
37
|
+
deploymentName?: string;
|
|
38
|
+
defaultDomains: string[];
|
|
39
|
+
reasons: string[];
|
|
40
|
+
}
|
|
41
|
+
export type DeepAgentsOpenAiRuntimeModule = {
|
|
42
|
+
ChatOpenAI: new (fields?: Record<string, unknown>) => BaseLanguageModel;
|
|
43
|
+
AzureChatOpenAI: new (fields?: Record<string, unknown>) => BaseLanguageModel;
|
|
44
|
+
};
|
|
45
|
+
export type DeepAgentsOpenAiImporter = () => Promise<DeepAgentsOpenAiRuntimeModule>;
|
|
46
|
+
export declare const DEEPAGENTS_MODEL_PROVIDER_PROFILES: DeepAgentsModelProviderProfile[];
|
|
47
|
+
export declare function parseDeepAgentsModelRef(model?: string): DeepAgentsModelRef | undefined;
|
|
48
|
+
export declare function resolveDeepAgentsModelProvider(model: string | undefined, env?: NodeJS.ProcessEnv): DeepAgentsProviderResolution;
|
|
49
|
+
export declare function requiredCredentialEnvForModel(model: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
50
|
+
export declare function inferNetworkDomainsForModel(model: string | undefined, env?: NodeJS.ProcessEnv): string[];
|
|
51
|
+
export declare function materializeDeepAgentsModel(model: string | undefined, env?: NodeJS.ProcessEnv, importer?: DeepAgentsOpenAiImporter): Promise<BaseLanguageModel | string | undefined>;
|
|
52
|
+
export declare function findDeepAgentsModelProviderProfile(provider: string): DeepAgentsModelProviderProfile | undefined;
|
|
53
|
+
//# sourceMappingURL=model-provider.d.ts.map
|