vgxness 1.20.4 → 1.20.6
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/dist/adapters/claude/agent-renderer.js +82 -0
- package/dist/{mcp → adapters/claude/install}/claude-code-agent-config.js +64 -9
- package/dist/{mcp → adapters/claude/install}/claude-code-config.js +28 -6
- package/dist/{mcp → adapters/claude/install}/claude-code-project-memory.js +35 -5
- package/dist/{mcp → adapters/claude/install}/claude-code-scope.js +12 -3
- package/dist/{mcp → adapters/claude/install}/claude-code-user-config.js +26 -5
- package/dist/{mcp → adapters/claude/install}/claude-code-user-memory.js +47 -7
- package/dist/{mcp → adapters/claude/install}/client-install-claude-code-contract.js +45 -8
- package/dist/{mcp → adapters/claude/install}/client-install-claude-code.js +98 -14
- package/dist/adapters/json/agent-renderer.js +104 -0
- package/dist/adapters/opencode/agent-renderer.js +113 -0
- package/dist/{mcp → adapters/opencode/install}/client-install-opencode-contract.js +2 -2
- package/dist/{mcp → adapters/opencode/install}/client-install-opencode.js +1 -1
- package/dist/{mcp → adapters/opencode/install}/opencode-default-agent-config.js +2 -2
- package/dist/{mcp → adapters/opencode/install}/opencode-handoff-preview.js +60 -7
- package/dist/{mcp → adapters/opencode/install}/opencode-visibility.js +1 -1
- package/dist/adapters/provider-renderer.js +6 -0
- package/dist/agents/agent-activation-service.js +1 -263
- package/dist/agents/agent-lookup-contexts.js +1 -28
- package/dist/agents/agent-registry-service.js +1 -81
- package/dist/agents/agent-resolver.js +1 -287
- package/dist/agents/agent-seed-service.js +1 -157
- package/dist/agents/agent-seed-upgrade-service.js +1 -231
- package/dist/agents/agent-selector-resolver.js +1 -28
- package/dist/agents/boot-upgrade.js +1 -59
- package/dist/agents/canonical-agent-manifest.js +1 -245
- package/dist/agents/canonical-agent-projection.js +1 -236
- package/dist/agents/manager-profile-overlay-service.js +1 -60
- package/dist/agents/profile-model-routing.js +1 -30
- package/dist/agents/renderers/claude-renderer.js +1 -82
- package/dist/agents/renderers/index.js +1 -14
- package/dist/agents/renderers/json-renderer.js +1 -104
- package/dist/agents/renderers/opencode-renderer.js +1 -113
- package/dist/agents/renderers/provider-adapter.js +1 -6
- package/dist/agents/repositories/agent-seed-history.js +1 -128
- package/dist/agents/repositories/agents.js +1 -200
- package/dist/agents/repositories/manager-profile-overlays.js +1 -90
- package/dist/agents/schema.js +1 -1
- package/dist/application/agents/agent-activation-service.js +261 -0
- package/dist/application/agents/agent-lookup-contexts.js +28 -0
- package/dist/application/agents/agent-registry-service.js +81 -0
- package/dist/application/agents/agent-resolver.js +287 -0
- package/dist/application/agents/agent-seed-service.js +157 -0
- package/dist/application/agents/agent-seed-upgrade-service.js +231 -0
- package/dist/application/agents/agent-selector-resolver.js +28 -0
- package/dist/application/agents/boot-upgrade.js +59 -0
- package/dist/application/agents/canonical-agent-projection.js +236 -0
- package/dist/application/agents/manager-profile-overlay-service.js +68 -0
- package/dist/application/agents/profile-model-routing.js +30 -0
- package/dist/application/agents/renderers/claude-renderer.js +1 -0
- package/dist/application/agents/renderers/index.js +14 -0
- package/dist/application/agents/renderers/json-renderer.js +1 -0
- package/dist/application/agents/renderers/opencode-renderer.js +1 -0
- package/dist/application/agents/renderers/provider-adapter.js +1 -0
- package/dist/application/memory/active-work-preview.js +75 -0
- package/dist/application/memory/agent-memory-capture-service.js +498 -0
- package/dist/application/memory/import/dry-run-planner.js +58 -0
- package/dist/application/memory/import/index.js +3 -0
- package/dist/application/memory/import/observation-writer.js +226 -0
- package/dist/application/memory/import/package.js +179 -0
- package/dist/application/memory/memory-service.js +202 -0
- package/dist/application/memory/search.js +11 -0
- package/dist/{mcp → application/provider-setup}/provider-change-plan.js +74 -13
- package/dist/{mcp → application/provider-setup}/provider-doctor.js +201 -31
- package/dist/{mcp → application/provider-setup}/provider-health-types.js +1 -1
- package/dist/{mcp → application/provider-setup}/provider-status.js +170 -33
- package/dist/application/runs/execution-planning.js +180 -0
- package/dist/application/runs/operation-execution.js +1 -0
- package/dist/application/runs/operation-retry.js +129 -0
- package/dist/application/runs/resume-after-approval-result.js +88 -0
- package/dist/application/runs/run-insights.js +270 -0
- package/dist/application/runs/run-service.js +1480 -0
- package/dist/application/runs/run-snapshot-export-service.js +31 -0
- package/dist/application/runs/sandbox-process-execution.js +244 -0
- package/dist/application/runs/sandbox-worktree-planning.js +59 -0
- package/dist/application/runs/task-scoped-command-grant-service.js +224 -0
- package/dist/application/sdd/artifact-portability-service.js +137 -0
- package/dist/application/sdd/cockpit-read-model.js +195 -0
- package/dist/application/sdd/sdd-continuation-plan.js +265 -0
- package/dist/application/sdd/sdd-workflow-service.js +892 -0
- package/dist/application/skills/boot-seed.js +42 -0
- package/dist/application/skills/personal-skills.js +41 -0
- package/dist/application/skills/skill-export-service.js +34 -0
- package/dist/application/skills/skill-index-service.js +126 -0
- package/dist/application/skills/skill-payload.js +186 -0
- package/dist/application/skills/skill-registry-service.js +648 -0
- package/dist/application/skills/skill-resolver.js +368 -0
- package/dist/application/skills/skill-seed-service.js +242 -0
- package/dist/application/skills/skill-status-service.js +147 -0
- package/dist/cli/bun-bin.js +0 -0
- package/dist/cli/cli-flags.js +1 -387
- package/dist/cli/cli-help.js +1 -173
- package/dist/cli/cli-helpers.js +1 -77
- package/dist/cli/cli-types.js +1 -1
- package/dist/cli/commands/agent-skill-dispatcher.js +1 -700
- package/dist/cli/commands/index.js +1 -9
- package/dist/cli/commands/interactive-entrypoint-dispatcher.js +1 -14
- package/dist/cli/commands/mcp-dispatcher.js +1 -232
- package/dist/cli/commands/memory-sdd-dispatcher.js +1 -367
- package/dist/cli/commands/run-permission-dispatcher.js +1 -455
- package/dist/cli/commands/setup-dispatcher.js +1 -496
- package/dist/cli/commands/status-dispatcher.js +1 -130
- package/dist/cli/commands/verification-dispatcher.js +1 -47
- package/dist/cli/commands/workflow-dispatcher.js +1 -566
- package/dist/cli/dispatcher.js +1 -247
- package/dist/cli/doctor-renderer.js +1 -26
- package/dist/cli/home-tui-app.js +1 -411
- package/dist/cli/home-tui-controller.js +1 -314
- package/dist/cli/mcp-start-path.js +1 -21
- package/dist/cli/product-resume-renderer.js +1 -32
- package/dist/cli/product-status-renderer.js +1 -81
- package/dist/cli/sdd-renderer.js +1 -247
- package/dist/cli/setup-plan-renderer.js +1 -79
- package/dist/cli/setup-status-renderer.js +1 -50
- package/dist/cli/setup-tui-app.js +1 -130
- package/dist/cli/setup-tui-controller.js +1 -89
- package/dist/cli/tui/focus-reducer.js +1 -0
- package/dist/cli/tui/focus-types.js +1 -0
- package/dist/cli/tui/ink/app-shell.js +1 -0
- package/dist/cli/tui/ink/components.js +1 -38
- package/dist/cli/tui/ink/help-overlay.js +1 -0
- package/dist/cli/tui/ink/state-components.js +1 -0
- package/dist/cli/tui/ink/theme.js +1 -36
- package/dist/cli/tui/key-intents.js +1 -0
- package/dist/cli/tui/keymap.js +1 -20
- package/dist/cli/tui/navigation.js +1 -10
- package/dist/cli/tui/screen-registry.js +1 -0
- package/dist/cli/tui/terminal-capabilities.js +1 -12
- package/dist/cli/tui/tui-types.js +1 -1
- package/dist/cli/tui/visual/badges.js +1 -19
- package/dist/cli/tui/visual/footer.js +1 -27
- package/dist/cli/tui/visual/index.js +1 -3
- package/dist/cli/tui/visual/viewport.js +1 -11
- package/dist/cli/tui-render-helpers.js +1 -200
- package/dist/cli/verification-plan-renderer.js +1 -25
- package/dist/cli/verification-report-renderer.js +1 -19
- package/dist/domain/agents/canonical-agent-manifest.js +355 -0
- package/dist/domain/agents/schema.js +1 -0
- package/dist/domain/memory/active-work-topics.js +64 -0
- package/dist/domain/memory/memory-capture-schema.js +1 -0
- package/dist/domain/memory/schema.js +1 -0
- package/dist/domain/runs/schema.js +5 -0
- package/dist/domain/sdd/cockpit-types.js +1 -0
- package/dist/domain/sdd/schema.js +111 -0
- package/dist/domain/skills/schema.js +1 -0
- package/dist/governance/risk-classifier.js +2 -0
- package/dist/interfaces/cli/bun-bin.js +46 -0
- package/dist/interfaces/cli/cli-flags.js +391 -0
- package/dist/interfaces/cli/cli-help.js +173 -0
- package/dist/interfaces/cli/cli-helpers.js +77 -0
- package/dist/interfaces/cli/cli-types.js +1 -0
- package/dist/interfaces/cli/commands/agent-skill-dispatcher.js +700 -0
- package/dist/interfaces/cli/commands/index.js +9 -0
- package/dist/interfaces/cli/commands/interactive-entrypoint-dispatcher.js +14 -0
- package/dist/interfaces/cli/commands/mcp-dispatcher.js +252 -0
- package/dist/interfaces/cli/commands/memory-sdd-dispatcher.js +367 -0
- package/dist/interfaces/cli/commands/run-permission-dispatcher.js +460 -0
- package/dist/interfaces/cli/commands/setup-dispatcher.js +496 -0
- package/dist/interfaces/cli/commands/status-dispatcher.js +130 -0
- package/dist/interfaces/cli/commands/verification-dispatcher.js +47 -0
- package/dist/interfaces/cli/commands/workflow-dispatcher.js +566 -0
- package/dist/interfaces/cli/dispatcher.js +247 -0
- package/dist/interfaces/cli/doctor-renderer.js +26 -0
- package/dist/interfaces/cli/home-tui-app.js +462 -0
- package/dist/interfaces/cli/home-tui-controller.js +341 -0
- package/dist/interfaces/cli/index.js +27 -0
- package/dist/interfaces/cli/mcp-start-path.js +21 -0
- package/dist/interfaces/cli/product-resume-renderer.js +32 -0
- package/dist/interfaces/cli/product-status-renderer.js +81 -0
- package/dist/interfaces/cli/sdd-renderer.js +247 -0
- package/dist/interfaces/cli/setup-plan-renderer.js +79 -0
- package/dist/interfaces/cli/setup-status-renderer.js +50 -0
- package/dist/interfaces/cli/setup-tui-app.js +135 -0
- package/dist/interfaces/cli/setup-tui-controller.js +89 -0
- package/dist/interfaces/cli/tui/focus-reducer.js +60 -0
- package/dist/interfaces/cli/tui/focus-types.js +10 -0
- package/dist/interfaces/cli/tui/ink/app-shell.js +16 -0
- package/dist/interfaces/cli/tui/ink/components.js +38 -0
- package/dist/interfaces/cli/tui/ink/help-overlay.js +6 -0
- package/dist/interfaces/cli/tui/ink/state-components.js +22 -0
- package/dist/interfaces/cli/tui/ink/theme.js +36 -0
- package/dist/interfaces/cli/tui/key-intents.js +33 -0
- package/dist/interfaces/cli/tui/keymap.js +20 -0
- package/dist/interfaces/cli/tui/navigation.js +10 -0
- package/dist/interfaces/cli/tui/screen-registry.js +43 -0
- package/dist/interfaces/cli/tui/terminal-capabilities.js +12 -0
- package/dist/interfaces/cli/tui/tui-types.js +1 -0
- package/dist/interfaces/cli/tui/visual/badges.js +19 -0
- package/dist/interfaces/cli/tui/visual/footer.js +27 -0
- package/dist/interfaces/cli/tui/visual/index.js +3 -0
- package/dist/interfaces/cli/tui/visual/viewport.js +11 -0
- package/dist/interfaces/cli/tui-render-helpers.js +200 -0
- package/dist/interfaces/cli/verification-plan-renderer.js +25 -0
- package/dist/interfaces/cli/verification-report-renderer.js +19 -0
- package/dist/interfaces/mcp/contracts/agents.js +1 -0
- package/dist/interfaces/mcp/contracts/context.js +1 -0
- package/dist/interfaces/mcp/contracts/governance.js +1 -0
- package/dist/interfaces/mcp/contracts/index.js +1 -0
- package/dist/interfaces/mcp/contracts/memory.js +1 -0
- package/dist/interfaces/mcp/contracts/providers.js +1 -0
- package/dist/interfaces/mcp/contracts/runs.js +1 -0
- package/dist/interfaces/mcp/contracts/sdd.js +1 -0
- package/dist/interfaces/mcp/contracts/sessions.js +1 -0
- package/dist/interfaces/mcp/contracts/skills.js +1 -0
- package/dist/interfaces/mcp/contracts/verification.js +1 -0
- package/dist/interfaces/mcp/control-plane/handlers/agents.js +38 -0
- package/dist/interfaces/mcp/control-plane/handlers/context.js +12 -0
- package/dist/interfaces/mcp/control-plane/handlers/memory.js +95 -0
- package/dist/interfaces/mcp/control-plane/handlers/providers.js +19 -0
- package/dist/interfaces/mcp/control-plane/handlers/runs.js +134 -0
- package/dist/interfaces/mcp/control-plane/handlers/sdd.js +225 -0
- package/dist/interfaces/mcp/control-plane/handlers/sessions.js +39 -0
- package/dist/interfaces/mcp/control-plane/handlers/skills.js +82 -0
- package/dist/interfaces/mcp/control-plane/handlers/verification.js +11 -0
- package/dist/interfaces/mcp/control-plane/types.js +1 -0
- package/dist/interfaces/mcp/control-plane.js +235 -0
- package/dist/interfaces/mcp/schema.js +174 -0
- package/dist/interfaces/mcp/schemas/common.js +121 -0
- package/dist/interfaces/mcp/schemas/inputs/agents.js +69 -0
- package/dist/interfaces/mcp/schemas/inputs/context.js +32 -0
- package/dist/interfaces/mcp/schemas/inputs/governance.js +23 -0
- package/dist/interfaces/mcp/schemas/inputs/index.js +10 -0
- package/dist/interfaces/mcp/schemas/inputs/memory.js +50 -0
- package/dist/interfaces/mcp/schemas/inputs/providers.js +35 -0
- package/dist/interfaces/mcp/schemas/inputs/runs.js +146 -0
- package/dist/interfaces/mcp/schemas/inputs/sdd.js +102 -0
- package/dist/interfaces/mcp/schemas/inputs/sessions.js +32 -0
- package/dist/interfaces/mcp/schemas/inputs/skills.js +231 -0
- package/dist/interfaces/mcp/schemas/inputs/verification.js +9 -0
- package/dist/interfaces/mcp/schemas/outputs/index.js +2 -0
- package/dist/interfaces/mcp/schemas/outputs/providers.js +28 -0
- package/dist/interfaces/mcp/schemas/outputs/sdd.js +166 -0
- package/dist/interfaces/mcp/stdio-server.js +116 -0
- package/dist/interfaces/mcp/validation/agents.js +189 -0
- package/dist/interfaces/mcp/validation/common.js +415 -0
- package/dist/interfaces/mcp/validation/governance.js +50 -0
- package/dist/interfaces/mcp/validation/memory.js +133 -0
- package/dist/interfaces/mcp/validation/providers.js +94 -0
- package/dist/interfaces/mcp/validation/runs.js +514 -0
- package/dist/interfaces/mcp/validation/sdd.js +247 -0
- package/dist/interfaces/mcp/validation/sessions.js +51 -0
- package/dist/interfaces/mcp/validation/skills.js +685 -0
- package/dist/interfaces/mcp/validation/verification.js +24 -0
- package/dist/interfaces/mcp/validation.js +149 -0
- package/dist/mcp/control-plane-snapshot-service.js +65 -2
- package/dist/mcp/control-plane.js +1 -646
- package/dist/mcp/doctor.js +1 -1
- package/dist/mcp/index.js +17 -17
- package/dist/mcp/schema.js +1 -1072
- package/dist/mcp/stdio-server.js +1 -116
- package/dist/mcp/validation.js +1 -2239
- package/dist/memory/active-work-preview.js +1 -75
- package/dist/memory/active-work-topics.js +1 -64
- package/dist/memory/agent-memory-capture-service.js +1 -497
- package/dist/memory/import/dry-run-planner.js +1 -58
- package/dist/memory/import/index.js +1 -3
- package/dist/memory/import/observation-writer.js +1 -226
- package/dist/memory/import/package.js +1 -179
- package/dist/memory/memory-capture-schema.js +1 -1
- package/dist/memory/memory-service.js +1 -201
- package/dist/memory/repositories/artifacts.js +1 -67
- package/dist/memory/repositories/observations.js +1 -217
- package/dist/memory/repositories/sessions.js +1 -125
- package/dist/memory/repositories/traces.js +1 -78
- package/dist/memory/schema.js +1 -1
- package/dist/memory/search.js +1 -11
- package/dist/memory/sqlite/database.js +1 -228
- package/dist/memory/storage-paths.js +1 -72
- package/dist/payload/context-budget-policy.js +10 -0
- package/dist/payload/context-budget-service.js +26 -0
- package/dist/payload/payload-diagnostics.js +50 -0
- package/dist/permissions/explicit-request-authorization.js +126 -0
- package/dist/permissions/policy-evaluator.js +54 -14
- package/dist/runs/execution-planning.js +1 -178
- package/dist/runs/operation-execution.js +1 -1
- package/dist/runs/operation-retry.js +1 -129
- package/dist/runs/repositories/runs.js +1 -676
- package/dist/runs/repositories/task-scoped-command-grants.js +1 -462
- package/dist/runs/resume-after-approval-result.js +1 -84
- package/dist/runs/run-insights.js +1 -270
- package/dist/runs/run-service.js +1 -1439
- package/dist/runs/run-snapshot-export-service.js +1 -31
- package/dist/runs/sandbox-process-execution.js +1 -240
- package/dist/runs/sandbox-worktree-planning.js +1 -59
- package/dist/runs/schema.js +1 -5
- package/dist/runs/task-scoped-command-grant-service.js +1 -216
- package/dist/sdd/artifact-portability-service.js +1 -137
- package/dist/sdd/cockpit-read-model.js +1 -195
- package/dist/sdd/cockpit-types.js +1 -1
- package/dist/sdd/schema.js +1 -111
- package/dist/sdd/sdd-continuation-plan.js +1 -265
- package/dist/sdd/sdd-workflow-service.js +1 -822
- package/dist/setup/providers/claude-setup-adapter.js +11 -4
- package/dist/setup/providers/opencode-setup-adapter.js +10 -7
- package/dist/setup/setup-plan.js +20 -7
- package/dist/skills/boot-seed.js +1 -42
- package/dist/skills/personal-skills.js +1 -41
- package/dist/skills/repositories/skill-evaluation-requests.js +1 -190
- package/dist/skills/repositories/skill-evaluation-scenarios.js +1 -305
- package/dist/skills/repositories/skill-improvement-proposals.js +1 -355
- package/dist/skills/repositories/skills.js +1 -1077
- package/dist/skills/schema.js +1 -1
- package/dist/skills/skill-export-service.js +1 -34
- package/dist/skills/skill-index-service.js +1 -126
- package/dist/skills/skill-payload.js +1 -186
- package/dist/skills/skill-registry-service.js +1 -644
- package/dist/skills/skill-resolver.js +1 -368
- package/dist/skills/skill-seed-service.js +1 -242
- package/dist/skills/skill-status-service.js +1 -147
- package/dist/storage/agents/repositories/agent-seed-history.js +128 -0
- package/dist/storage/agents/repositories/agents.js +200 -0
- package/dist/storage/agents/repositories/manager-profile-overlays.js +90 -0
- package/dist/storage/memory/repositories/artifacts.js +67 -0
- package/dist/storage/memory/repositories/observations.js +217 -0
- package/dist/storage/memory/repositories/sessions.js +125 -0
- package/dist/storage/memory/repositories/traces.js +78 -0
- package/dist/storage/memory/sqlite/database.js +228 -0
- package/dist/storage/memory/storage-paths.js +72 -0
- package/dist/storage/runs/repositories/runs.js +676 -0
- package/dist/storage/runs/repositories/task-scoped-command-grants.js +464 -0
- package/dist/storage/skills/repositories/skill-evaluation-requests.js +190 -0
- package/dist/storage/skills/repositories/skill-evaluation-scenarios.js +305 -0
- package/dist/storage/skills/repositories/skill-improvement-proposals.js +355 -0
- package/dist/storage/skills/repositories/skills.js +1084 -0
- package/docs/architecture.md +2 -2
- package/docs/glossary.md +1 -1
- package/docs/mcp.md +1 -1
- package/docs/module-boundaries.md +114 -0
- package/docs/prd.md +1 -1
- package/docs/project-health-audit-v1.10.x.md +1 -1
- package/docs/providers.md +2 -2
- package/docs/safety.md +3 -3
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/apply-progress.md +122 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/archive-report.md +61 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/design.md +66 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/proposal.md +79 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/spec.md +67 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/tasks.md +63 -0
- package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/verify-report.md +71 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/apply-progress.md +68 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/archive-report.md +61 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/design.md +43 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/proposal.md +61 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/spec.md +31 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/tasks.md +27 -0
- package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/verify-report.md +58 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/apply-progress.md +65 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/archive-report.md +53 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/design.md +64 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/proposal.md +62 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/spec.md +51 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/tasks.md +50 -0
- package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/verify-report.md +66 -0
- package/docs/storage.md +2 -2
- package/package.json +2 -2
- /package/dist/{mcp → adapters/claude/install}/claude-code-cli.js +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/001_initial.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/002_observation_revisions.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/003_agent_registry.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/004_run_runtime.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/005_run_approvals.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/006_run_operation_attempts.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/007_abandoned_operation_attempts.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/008_run_execution_plan_events.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/009_multiple_operation_attempts.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/010_skill_registry.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/011_skill_usage_resolution_outcomes.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/012_skill_improvement_proposals.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/013_skill_evaluation_scenarios.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/014_manager_profile_overlays.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/015_artifact_metadata.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/016_agent_seed_history.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/017_intent_signal_skill_targets.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/018_skill_system_v2.sql +0 -0
- /package/dist/{memory → storage/memory}/sqlite/migrations/019_task_scoped_command_grants.sql +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { asRecord, contextCockpitLevels, copyOptionalLimitedStrings, copyOptionalStrings, inputRecord, payloadModes, readChange, readNonEmptyString, readOptionalContextCockpitChange, readOptionalExplicitChange, readOptionalNonEmptyString, readOptionalOneOf, readPhase, readRequiredOneOf, validationFailure, } from './common.js';
|
|
2
|
+
export function validateSddStatusInput(input, tool) {
|
|
3
|
+
const record = inputRecord(input, tool, ['project', 'change']);
|
|
4
|
+
if (!record.ok)
|
|
5
|
+
return record;
|
|
6
|
+
return readProjectAndChange(record.value, tool);
|
|
7
|
+
}
|
|
8
|
+
export function validateSddNextInput(input, tool) {
|
|
9
|
+
const record = inputRecord(input, tool, ['project', 'change']);
|
|
10
|
+
if (!record.ok)
|
|
11
|
+
return record;
|
|
12
|
+
return readProjectAndChange(record.value, tool);
|
|
13
|
+
}
|
|
14
|
+
export function validateSddCockpitInput(input, tool) {
|
|
15
|
+
const record = inputRecord(input, tool, ['project', 'change']);
|
|
16
|
+
if (!record.ok)
|
|
17
|
+
return record;
|
|
18
|
+
return readProjectAndChange(record.value, tool);
|
|
19
|
+
}
|
|
20
|
+
export function validateSddContinueInput(input, tool) {
|
|
21
|
+
const record = inputRecord(input, tool, ['project', 'change', 'payloadMode']);
|
|
22
|
+
if (!record.ok)
|
|
23
|
+
return record;
|
|
24
|
+
const base = readProjectAndChange(record.value, tool);
|
|
25
|
+
if (!base.ok)
|
|
26
|
+
return base;
|
|
27
|
+
const payloadMode = readOptionalOneOf(record.value, 'payloadMode', payloadModes, tool);
|
|
28
|
+
if (!payloadMode.ok)
|
|
29
|
+
return payloadMode;
|
|
30
|
+
const result = { ...base.value };
|
|
31
|
+
if (payloadMode.value !== undefined)
|
|
32
|
+
result.payloadMode = payloadMode.value;
|
|
33
|
+
return { ok: true, value: result };
|
|
34
|
+
}
|
|
35
|
+
export function validateContextCockpitInput(input, tool) {
|
|
36
|
+
const record = inputRecord(input, tool, ['project', 'change', 'directory', 'limit', 'level']);
|
|
37
|
+
if (!record.ok)
|
|
38
|
+
return record;
|
|
39
|
+
const project = readNonEmptyString(record.value, 'project', tool);
|
|
40
|
+
if (!project.ok)
|
|
41
|
+
return project;
|
|
42
|
+
const result = { project: project.value };
|
|
43
|
+
const change = readOptionalContextCockpitChange(record.value, tool);
|
|
44
|
+
if (!change.ok)
|
|
45
|
+
return change;
|
|
46
|
+
if (change.value !== undefined)
|
|
47
|
+
result.change = change.value;
|
|
48
|
+
const directory = readOptionalNonEmptyString(record.value, 'directory', tool);
|
|
49
|
+
if (!directory.ok)
|
|
50
|
+
return directory;
|
|
51
|
+
if (directory.value !== undefined)
|
|
52
|
+
result.directory = directory.value;
|
|
53
|
+
if (record.value.limit !== undefined) {
|
|
54
|
+
if (typeof record.value.limit !== 'number' || !Number.isSafeInteger(record.value.limit) || record.value.limit < 1 || record.value.limit > 100)
|
|
55
|
+
return validationFailure('limit must be an integer between 1 and 100', tool);
|
|
56
|
+
result.limit = record.value.limit;
|
|
57
|
+
}
|
|
58
|
+
const level = readOptionalOneOf(record.value, 'level', contextCockpitLevels, tool);
|
|
59
|
+
if (!level.ok)
|
|
60
|
+
return level;
|
|
61
|
+
if (level.value !== undefined)
|
|
62
|
+
result.level = level.value;
|
|
63
|
+
return { ok: true, value: result };
|
|
64
|
+
}
|
|
65
|
+
export function validateResumeContextInput(input, tool) {
|
|
66
|
+
const record = inputRecord(input, tool, ['project', 'directory', 'workspaceRoot', 'userPrompt', 'explicitChange', 'limit', 'payloadMode']);
|
|
67
|
+
if (!record.ok)
|
|
68
|
+
return record;
|
|
69
|
+
const project = readNonEmptyString(record.value, 'project', tool);
|
|
70
|
+
if (!project.ok)
|
|
71
|
+
return project;
|
|
72
|
+
const result = { project: project.value };
|
|
73
|
+
const directory = readOptionalNonEmptyString(record.value, 'directory', tool);
|
|
74
|
+
if (!directory.ok)
|
|
75
|
+
return directory;
|
|
76
|
+
if (directory.value !== undefined)
|
|
77
|
+
result.directory = directory.value;
|
|
78
|
+
const workspaceRoot = readOptionalNonEmptyString(record.value, 'workspaceRoot', tool);
|
|
79
|
+
if (!workspaceRoot.ok)
|
|
80
|
+
return workspaceRoot;
|
|
81
|
+
if (workspaceRoot.value !== undefined)
|
|
82
|
+
result.workspaceRoot = workspaceRoot.value;
|
|
83
|
+
if (record.value.userPrompt !== undefined) {
|
|
84
|
+
if (typeof record.value.userPrompt !== 'string')
|
|
85
|
+
return validationFailure('userPrompt must be a string', tool);
|
|
86
|
+
result.userPrompt = record.value.userPrompt;
|
|
87
|
+
}
|
|
88
|
+
const explicitChange = readOptionalExplicitChange(record.value, tool);
|
|
89
|
+
if (!explicitChange.ok)
|
|
90
|
+
return explicitChange;
|
|
91
|
+
if (explicitChange.value !== undefined)
|
|
92
|
+
result.explicitChange = explicitChange.value;
|
|
93
|
+
if (record.value.limit !== undefined) {
|
|
94
|
+
if (typeof record.value.limit !== 'number' || !Number.isSafeInteger(record.value.limit) || record.value.limit < 1 || record.value.limit > 25)
|
|
95
|
+
return validationFailure('limit must be an integer between 1 and 25', tool);
|
|
96
|
+
result.limit = record.value.limit;
|
|
97
|
+
}
|
|
98
|
+
const payloadMode = readOptionalOneOf(record.value, 'payloadMode', payloadModes, tool);
|
|
99
|
+
if (!payloadMode.ok)
|
|
100
|
+
return payloadMode;
|
|
101
|
+
result.payloadMode = payloadMode.value ?? 'compact';
|
|
102
|
+
return { ok: true, value: result };
|
|
103
|
+
}
|
|
104
|
+
export function readProjectAndChange(record, tool) {
|
|
105
|
+
const project = readNonEmptyString(record, 'project', tool);
|
|
106
|
+
if (!project.ok)
|
|
107
|
+
return project;
|
|
108
|
+
const change = readChange(record, tool);
|
|
109
|
+
if (!change.ok)
|
|
110
|
+
return change;
|
|
111
|
+
return { ok: true, value: { project: project.value, change: change.value } };
|
|
112
|
+
}
|
|
113
|
+
export function validateSddReadyInput(input, tool) {
|
|
114
|
+
const record = inputRecord(input, tool, ['project', 'change', 'phase', 'runId', 'agentId']);
|
|
115
|
+
if (!record.ok)
|
|
116
|
+
return record;
|
|
117
|
+
const base = readProjectAndChange(record.value, tool);
|
|
118
|
+
if (!base.ok)
|
|
119
|
+
return base;
|
|
120
|
+
const phase = readPhase(record.value, tool);
|
|
121
|
+
if (!phase.ok)
|
|
122
|
+
return phase;
|
|
123
|
+
const result = { ...base.value, phase: phase.value };
|
|
124
|
+
const copied = copyOptionalStrings(result, record.value, tool, ['runId', 'agentId']);
|
|
125
|
+
if (!copied.ok)
|
|
126
|
+
return copied;
|
|
127
|
+
return { ok: true, value: result };
|
|
128
|
+
}
|
|
129
|
+
export function validateSddGetReadinessInput(input, tool) {
|
|
130
|
+
return validateSddReadyInput(input, tool);
|
|
131
|
+
}
|
|
132
|
+
export function validateSddSaveArtifactInput(input, tool) {
|
|
133
|
+
const record = inputRecord(input, tool, ['project', 'change', 'phase', 'content', 'kind']);
|
|
134
|
+
if (!record.ok)
|
|
135
|
+
return record;
|
|
136
|
+
const base = readProjectAndChange(record.value, tool);
|
|
137
|
+
if (!base.ok)
|
|
138
|
+
return base;
|
|
139
|
+
const phase = readPhase(record.value, tool);
|
|
140
|
+
if (!phase.ok)
|
|
141
|
+
return phase;
|
|
142
|
+
const content = readNonEmptyString(record.value, 'content', tool);
|
|
143
|
+
if (!content.ok)
|
|
144
|
+
return content;
|
|
145
|
+
return { ok: true, value: { ...base.value, phase: phase.value, content: content.value } };
|
|
146
|
+
}
|
|
147
|
+
export function validateSddAcceptArtifactInput(input, tool) {
|
|
148
|
+
const record = inputRecord(input, tool, ['project', 'change', 'phase', 'acceptedBy', 'acceptedAt', 'note', 'runId', 'agentId']);
|
|
149
|
+
if (!record.ok)
|
|
150
|
+
return record;
|
|
151
|
+
const base = readProjectAndChange(record.value, tool);
|
|
152
|
+
if (!base.ok)
|
|
153
|
+
return base;
|
|
154
|
+
const phase = readPhase(record.value, tool);
|
|
155
|
+
if (!phase.ok)
|
|
156
|
+
return phase;
|
|
157
|
+
const acceptedByRecord = asRecord(record.value.acceptedBy, tool, 'acceptedBy is required');
|
|
158
|
+
if (!acceptedByRecord.ok)
|
|
159
|
+
return acceptedByRecord;
|
|
160
|
+
const acceptedByExtra = Object.keys(acceptedByRecord.value).find((key) => !['type', 'id', 'displayName'].includes(key));
|
|
161
|
+
if (acceptedByExtra !== undefined)
|
|
162
|
+
return validationFailure(`Unexpected field: acceptedBy.${acceptedByExtra}`, tool);
|
|
163
|
+
const type = readRequiredOneOf(acceptedByRecord.value, 'type', ['human'], tool);
|
|
164
|
+
if (!type.ok)
|
|
165
|
+
return type;
|
|
166
|
+
const id = readNonEmptyString(acceptedByRecord.value, 'id', tool);
|
|
167
|
+
if (!id.ok)
|
|
168
|
+
return id;
|
|
169
|
+
const displayName = readOptionalNonEmptyString(acceptedByRecord.value, 'displayName', tool);
|
|
170
|
+
if (!displayName.ok)
|
|
171
|
+
return displayName;
|
|
172
|
+
const acceptedBy = { type: type.value, id: id.value };
|
|
173
|
+
if (displayName.value !== undefined)
|
|
174
|
+
acceptedBy.displayName = displayName.value;
|
|
175
|
+
const result = { ...base.value, phase: phase.value, acceptedBy };
|
|
176
|
+
const copied = copyOptionalLimitedStrings(result, record.value, tool, ['acceptedAt', 'note', 'runId', 'agentId'], undefined);
|
|
177
|
+
if (!copied.ok)
|
|
178
|
+
return copied;
|
|
179
|
+
return { ok: true, value: result };
|
|
180
|
+
}
|
|
181
|
+
export function validateSddReopenArtifactInput(input, tool) {
|
|
182
|
+
const record = inputRecord(input, tool, ['project', 'change', 'phase', 'reopenedBy', 'reopenedAt', 'note', 'runId', 'agentId']);
|
|
183
|
+
if (!record.ok)
|
|
184
|
+
return record;
|
|
185
|
+
const base = readProjectAndChange(record.value, tool);
|
|
186
|
+
if (!base.ok)
|
|
187
|
+
return base;
|
|
188
|
+
const phase = readPhase(record.value, tool);
|
|
189
|
+
if (!phase.ok)
|
|
190
|
+
return phase;
|
|
191
|
+
const reopenedByRecord = asRecord(record.value.reopenedBy, tool, 'reopenedBy is required');
|
|
192
|
+
if (!reopenedByRecord.ok)
|
|
193
|
+
return reopenedByRecord;
|
|
194
|
+
const reopenedByExtra = Object.keys(reopenedByRecord.value).find((key) => !['type', 'id', 'displayName'].includes(key));
|
|
195
|
+
if (reopenedByExtra !== undefined)
|
|
196
|
+
return validationFailure(`Unexpected field: reopenedBy.${reopenedByExtra}`, tool);
|
|
197
|
+
const type = readRequiredOneOf(reopenedByRecord.value, 'type', ['human'], tool);
|
|
198
|
+
if (!type.ok)
|
|
199
|
+
return type;
|
|
200
|
+
const id = readNonEmptyString(reopenedByRecord.value, 'id', tool);
|
|
201
|
+
if (!id.ok)
|
|
202
|
+
return id;
|
|
203
|
+
const displayName = readOptionalNonEmptyString(reopenedByRecord.value, 'displayName', tool);
|
|
204
|
+
if (!displayName.ok)
|
|
205
|
+
return displayName;
|
|
206
|
+
const reopenedBy = { type: type.value, id: id.value };
|
|
207
|
+
if (displayName.value !== undefined)
|
|
208
|
+
reopenedBy.displayName = displayName.value;
|
|
209
|
+
const result = { ...base.value, phase: phase.value, reopenedBy };
|
|
210
|
+
const copied = copyOptionalLimitedStrings(result, record.value, tool, ['reopenedAt', 'note', 'runId', 'agentId'], undefined);
|
|
211
|
+
if (!copied.ok)
|
|
212
|
+
return copied;
|
|
213
|
+
return { ok: true, value: result };
|
|
214
|
+
}
|
|
215
|
+
export function validateSddGetArtifactInput(input, tool) {
|
|
216
|
+
const record = inputRecord(input, tool, ['project', 'change', 'phase', 'payloadMode', 'kind']);
|
|
217
|
+
if (!record.ok)
|
|
218
|
+
return record;
|
|
219
|
+
const base = readProjectAndChange(record.value, tool);
|
|
220
|
+
if (!base.ok)
|
|
221
|
+
return base;
|
|
222
|
+
const phase = readPhase(record.value, tool);
|
|
223
|
+
if (!phase.ok)
|
|
224
|
+
return phase;
|
|
225
|
+
const payloadMode = readOptionalOneOf(record.value, 'payloadMode', payloadModes, tool);
|
|
226
|
+
if (!payloadMode.ok)
|
|
227
|
+
return payloadMode;
|
|
228
|
+
const result = { ...base.value, phase: phase.value };
|
|
229
|
+
if (payloadMode.value !== undefined)
|
|
230
|
+
result.payloadMode = payloadMode.value;
|
|
231
|
+
return { ok: true, value: result };
|
|
232
|
+
}
|
|
233
|
+
export function validateSddListArtifactsInput(input, tool) {
|
|
234
|
+
const record = inputRecord(input, tool, ['project', 'change', 'payloadMode']);
|
|
235
|
+
if (!record.ok)
|
|
236
|
+
return record;
|
|
237
|
+
const base = readProjectAndChange(record.value, tool);
|
|
238
|
+
if (!base.ok)
|
|
239
|
+
return base;
|
|
240
|
+
const payloadMode = readOptionalOneOf(record.value, 'payloadMode', payloadModes, tool);
|
|
241
|
+
if (!payloadMode.ok)
|
|
242
|
+
return payloadMode;
|
|
243
|
+
const result = { ...base.value };
|
|
244
|
+
if (payloadMode.value !== undefined)
|
|
245
|
+
result.payloadMode = payloadMode.value;
|
|
246
|
+
return { ok: true, value: result };
|
|
247
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { activityKinds, copyOptionalStrings, copyRequiredStrings, inputRecord, readNonEmptyString, readRequiredOneOf } from './common.js';
|
|
2
|
+
export function validateSessionStartInput(input, tool) {
|
|
3
|
+
const record = inputRecord(input, tool, ['id', 'project', 'directory']);
|
|
4
|
+
if (!record.ok)
|
|
5
|
+
return record;
|
|
6
|
+
const project = readNonEmptyString(record.value, 'project', tool);
|
|
7
|
+
if (!project.ok)
|
|
8
|
+
return project;
|
|
9
|
+
const result = { project: project.value };
|
|
10
|
+
const copied = copyOptionalStrings(result, record.value, tool, ['id', 'directory']);
|
|
11
|
+
if (!copied.ok)
|
|
12
|
+
return copied;
|
|
13
|
+
return { ok: true, value: result };
|
|
14
|
+
}
|
|
15
|
+
export function validateSessionAppendActivityInput(input, tool) {
|
|
16
|
+
const record = inputRecord(input, tool, ['sessionId', 'actor', 'kind', 'payloadJson']);
|
|
17
|
+
if (!record.ok)
|
|
18
|
+
return record;
|
|
19
|
+
const result = {};
|
|
20
|
+
const copied = copyRequiredStrings(result, record.value, tool, ['sessionId', 'actor', 'payloadJson']);
|
|
21
|
+
if (!copied.ok)
|
|
22
|
+
return copied;
|
|
23
|
+
const kind = readRequiredOneOf(record.value, 'kind', activityKinds, tool);
|
|
24
|
+
if (!kind.ok)
|
|
25
|
+
return kind;
|
|
26
|
+
result.kind = kind.value;
|
|
27
|
+
return { ok: true, value: result };
|
|
28
|
+
}
|
|
29
|
+
export function validateSessionCloseInput(input, tool) {
|
|
30
|
+
const record = inputRecord(input, tool, ['sessionId', 'actor', 'summary']);
|
|
31
|
+
if (!record.ok)
|
|
32
|
+
return record;
|
|
33
|
+
const result = {};
|
|
34
|
+
const copied = copyRequiredStrings(result, record.value, tool, ['sessionId', 'actor', 'summary']);
|
|
35
|
+
if (!copied.ok)
|
|
36
|
+
return copied;
|
|
37
|
+
return { ok: true, value: result };
|
|
38
|
+
}
|
|
39
|
+
export function validateSessionRestoreInput(input, tool) {
|
|
40
|
+
const record = inputRecord(input, tool, ['project', 'directory']);
|
|
41
|
+
if (!record.ok)
|
|
42
|
+
return record;
|
|
43
|
+
const project = readNonEmptyString(record.value, 'project', tool);
|
|
44
|
+
if (!project.ok)
|
|
45
|
+
return project;
|
|
46
|
+
const result = { project: project.value };
|
|
47
|
+
const copied = copyOptionalStrings(result, record.value, tool, ['directory']);
|
|
48
|
+
if (!copied.ok)
|
|
49
|
+
return copied;
|
|
50
|
+
return { ok: true, value: result };
|
|
51
|
+
}
|