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
package/dist/skills/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '../domain/skills/schema.js';
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
index;
|
|
3
|
-
constructor(index) {
|
|
4
|
-
this.index = index;
|
|
5
|
-
}
|
|
6
|
-
export(input) {
|
|
7
|
-
const indexed = this.index.getIndex(input);
|
|
8
|
-
if (!indexed.ok)
|
|
9
|
-
return indexed;
|
|
10
|
-
return {
|
|
11
|
-
ok: true,
|
|
12
|
-
value: {
|
|
13
|
-
kind: 'vgxness.skills-export',
|
|
14
|
-
version: 1,
|
|
15
|
-
project: indexed.value.project,
|
|
16
|
-
scope: indexed.value.scope,
|
|
17
|
-
totals: indexed.value.totals,
|
|
18
|
-
skills: indexed.value.skills,
|
|
19
|
-
diagnostics: indexed.value.diagnostics,
|
|
20
|
-
safety: {
|
|
21
|
-
readOnly: true,
|
|
22
|
-
providerConfigWrites: false,
|
|
23
|
-
opencodeWrites: false,
|
|
24
|
-
claudeWrites: false,
|
|
25
|
-
nativeSkillFileWrites: false,
|
|
26
|
-
urlFetches: false,
|
|
27
|
-
usageRecords: false,
|
|
28
|
-
seedLoaded: false,
|
|
29
|
-
bootUpgradeSideEffects: false,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
export * from '../application/skills/skill-export-service.js';
|
|
@@ -1,126 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export class SkillIndexService {
|
|
3
|
-
registry;
|
|
4
|
-
constructor(registry) {
|
|
5
|
-
this.registry = registry;
|
|
6
|
-
}
|
|
7
|
-
getIndex(input) {
|
|
8
|
-
const listed = this.listSkills(input);
|
|
9
|
-
if (!listed.ok)
|
|
10
|
-
return listed;
|
|
11
|
-
const skills = [];
|
|
12
|
-
for (const summary of [...listed.value].sort(compareSkillSummariesById)) {
|
|
13
|
-
const details = this.registry.getSkillDetails(summary.id);
|
|
14
|
-
if (!details.ok)
|
|
15
|
-
return details;
|
|
16
|
-
skills.push(indexSkill(details.value));
|
|
17
|
-
}
|
|
18
|
-
const active = skills.filter((skill) => skill.status === 'active').length;
|
|
19
|
-
return {
|
|
20
|
-
ok: true,
|
|
21
|
-
value: {
|
|
22
|
-
project: input.project,
|
|
23
|
-
scope: input.scope,
|
|
24
|
-
totals: {
|
|
25
|
-
skills: skills.length,
|
|
26
|
-
active,
|
|
27
|
-
inactive: skills.length - active,
|
|
28
|
-
previewOnly: skills.length,
|
|
29
|
-
},
|
|
30
|
-
skills,
|
|
31
|
-
diagnostics: topLevelDiagnostics(),
|
|
32
|
-
safety: {
|
|
33
|
-
readOnly: true,
|
|
34
|
-
providerConfigWrites: false,
|
|
35
|
-
opencodeWrites: false,
|
|
36
|
-
nativeSkillFileWrites: false,
|
|
37
|
-
urlFetches: false,
|
|
38
|
-
usageRecords: false,
|
|
39
|
-
opencodeStartupRefresh: false,
|
|
40
|
-
opencodePluginRefresh: false,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
listSkills(input) {
|
|
46
|
-
const skills = [];
|
|
47
|
-
for (const context of skillIndexContexts(input.project, input.scope)) {
|
|
48
|
-
const listed = this.registry.listSkills({ project: context.project, scope: context.scope });
|
|
49
|
-
if (!listed.ok)
|
|
50
|
-
return listed;
|
|
51
|
-
skills.push(...listed.value);
|
|
52
|
-
}
|
|
53
|
-
return { ok: true, value: dedupeSkillSummariesByName(skills) };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function indexSkill(details) {
|
|
57
|
-
const currentVersion = details.currentVersion;
|
|
58
|
-
const status = currentVersion?.status ?? (details.currentVersionId === undefined ? 'missing-current-version' : 'missing-current-version-record');
|
|
59
|
-
return {
|
|
60
|
-
id: details.id,
|
|
61
|
-
name: details.name,
|
|
62
|
-
activeVersion: currentVersion?.status === 'active' ? currentVersion.version : null,
|
|
63
|
-
status,
|
|
64
|
-
sourceKind: currentVersion?.source.kind ?? null,
|
|
65
|
-
attachments: {
|
|
66
|
-
count: details.attachments.length,
|
|
67
|
-
kinds: [...new Set(details.attachments.map((attachment) => attachment.targetType))].sort(),
|
|
68
|
-
},
|
|
69
|
-
safety: {
|
|
70
|
-
providerNativeInstall: 'unsupported',
|
|
71
|
-
opencodeLoading: 'preview-only',
|
|
72
|
-
writesProviderConfig: false,
|
|
73
|
-
},
|
|
74
|
-
diagnostics: skillDiagnostics(details.name, status),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function topLevelDiagnostics() {
|
|
78
|
-
return [
|
|
79
|
-
{
|
|
80
|
-
code: 'SKILL_PROVIDER_NATIVE_UNSUPPORTED',
|
|
81
|
-
severity: 'info',
|
|
82
|
-
message: 'Native provider skill installation is unsupported by the skills index command.',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
code: 'SKILL_PROVIDER_PREVIEW_ONLY',
|
|
86
|
-
severity: 'info',
|
|
87
|
-
message: 'OpenCode skill loading is preview-only; no startup or plugin refresh is attempted.',
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
function skillDiagnostics(skill, status) {
|
|
92
|
-
const diagnostics = [
|
|
93
|
-
{
|
|
94
|
-
code: 'SKILL_PROVIDER_NATIVE_UNSUPPORTED',
|
|
95
|
-
severity: 'info',
|
|
96
|
-
skill,
|
|
97
|
-
message: 'Native provider skill installation is unsupported for this skill index record.',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
code: 'SKILL_PROVIDER_PREVIEW_ONLY',
|
|
101
|
-
severity: 'info',
|
|
102
|
-
skill,
|
|
103
|
-
message: 'OpenCode loading is preview-only for this skill index record.',
|
|
104
|
-
},
|
|
105
|
-
];
|
|
106
|
-
if (status === 'missing-current-version' || status === 'missing-current-version-record') {
|
|
107
|
-
diagnostics.push({
|
|
108
|
-
code: 'SKILL_CURRENT_VERSION_MISSING',
|
|
109
|
-
severity: 'warning',
|
|
110
|
-
skill,
|
|
111
|
-
message: status === 'missing-current-version' ? 'Skill has no current version selected.' : 'Skill current version record is missing.',
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
else if (status !== 'active') {
|
|
115
|
-
diagnostics.push({
|
|
116
|
-
code: 'SKILL_INACTIVE',
|
|
117
|
-
severity: 'warning',
|
|
118
|
-
skill,
|
|
119
|
-
message: `Skill current version is ${status}, not active.`,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
return diagnostics;
|
|
123
|
-
}
|
|
124
|
-
function compareSkillSummariesById(a, b) {
|
|
125
|
-
return a.id.localeCompare(b.id);
|
|
126
|
-
}
|
|
1
|
+
export * from '../application/skills/skill-index-service.js';
|
|
@@ -1,186 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { readFileSync, realpathSync, statSync } from 'node:fs';
|
|
3
|
-
import { isAbsolute, relative, resolve } from 'node:path';
|
|
4
|
-
const defaultMaxSourceBytes = 64 * 1024;
|
|
5
|
-
export function buildSkillInjectionPayload(resolution, options = {}) {
|
|
6
|
-
const workspaceRoot = options.workspaceRoot !== undefined ? safeRealpath(options.workspaceRoot) : undefined;
|
|
7
|
-
if (options.workspaceRoot !== undefined && workspaceRoot === undefined)
|
|
8
|
-
return validationFailure(`Workspace root is unavailable: ${options.workspaceRoot}`);
|
|
9
|
-
const maxSourceBytes = options.maxSourceBytes ?? defaultMaxSourceBytes;
|
|
10
|
-
const mode = options.mode ?? 'compact';
|
|
11
|
-
const items = resolution.skills.map((skill, index) => toPayloadItem(skill, index, workspaceRoot, maxSourceBytes, mode));
|
|
12
|
-
const skillDiagnostics = payloadDiagnostics(resolution.skillDiagnostics, items);
|
|
13
|
-
return {
|
|
14
|
-
ok: true,
|
|
15
|
-
value: {
|
|
16
|
-
version: 1,
|
|
17
|
-
providerAgnostic: true,
|
|
18
|
-
context: resolution.context,
|
|
19
|
-
items,
|
|
20
|
-
skipped: resolution.skipped,
|
|
21
|
-
skillDiagnostics,
|
|
22
|
-
warnings: [
|
|
23
|
-
'Skill payload v1 is injection-ready data only; it does not mutate provider configuration or fetch URL sources.',
|
|
24
|
-
...(mode === 'compact' ? ['Skill payload uses compact mode by default; request mode=verbose for full inline/path content when safe.'] : []),
|
|
25
|
-
...(resolution.warnings ?? []),
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function payloadDiagnostics(base, items) {
|
|
31
|
-
const diagnostics = [...base.diagnostics];
|
|
32
|
-
const itemByName = new Map(items.map((item) => [item.identity.name, item]));
|
|
33
|
-
const skills = base.skills.map((status) => {
|
|
34
|
-
if (!status.included)
|
|
35
|
-
return status;
|
|
36
|
-
const item = itemByName.get(status.name);
|
|
37
|
-
if (item === undefined)
|
|
38
|
-
return status;
|
|
39
|
-
if (item.content.status === 'available')
|
|
40
|
-
return { ...status, payloadState: 'ready' };
|
|
41
|
-
diagnostics.push({
|
|
42
|
-
code: 'SKILL_PAYLOAD_UNAVAILABLE',
|
|
43
|
-
severity: 'warning',
|
|
44
|
-
skill: status.name,
|
|
45
|
-
message: `Skill ${status.name} resolved from the registry, but preview content is unavailable: ${item.content.unavailableReason ?? 'unknown'}.`,
|
|
46
|
-
details: {
|
|
47
|
-
registryState: status.registryState,
|
|
48
|
-
payloadState: 'unavailable',
|
|
49
|
-
providerState: status.providerState,
|
|
50
|
-
unavailableReason: item.content.unavailableReason ?? 'unknown',
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
return { ...status, payloadState: 'unavailable', reason: item.content.unavailableReason ?? 'content_unavailable' };
|
|
54
|
-
});
|
|
55
|
-
return {
|
|
56
|
-
...base,
|
|
57
|
-
skills,
|
|
58
|
-
diagnostics,
|
|
59
|
-
summary: {
|
|
60
|
-
declared: skills.length,
|
|
61
|
-
resolved: skills.filter((skill) => skill.included).length,
|
|
62
|
-
skipped: skills.filter((skill) => !skill.included).length,
|
|
63
|
-
warnings: diagnostics.filter((diagnostic) => diagnostic.severity === 'warning').length,
|
|
64
|
-
errors: diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function toPayloadItem(skill, index, workspaceRoot, maxSourceBytes, mode) {
|
|
69
|
-
const loaded = loadContent(skill, workspaceRoot, maxSourceBytes, mode);
|
|
70
|
-
return {
|
|
71
|
-
identity: {
|
|
72
|
-
skillId: skill.skillId,
|
|
73
|
-
name: skill.name,
|
|
74
|
-
description: skill.description,
|
|
75
|
-
versionId: skill.versionId,
|
|
76
|
-
version: skill.version,
|
|
77
|
-
},
|
|
78
|
-
source: {
|
|
79
|
-
kind: skill.source.kind,
|
|
80
|
-
...(skill.source.path !== undefined ? { path: skill.source.path } : {}),
|
|
81
|
-
...(skill.source.url !== undefined ? { url: skill.source.url } : {}),
|
|
82
|
-
},
|
|
83
|
-
content: loaded,
|
|
84
|
-
attachmentReasons: skill.attachmentSources,
|
|
85
|
-
ordering: {
|
|
86
|
-
index,
|
|
87
|
-
dedupeKey: skill.skillId,
|
|
88
|
-
attachmentSourceCount: skill.attachmentSources.length,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function loadContent(skill, workspaceRoot, maxSourceBytes, mode) {
|
|
93
|
-
if (skill.source.kind === 'inline') {
|
|
94
|
-
if (skill.content !== undefined)
|
|
95
|
-
return inlineContentPayload(skill.content, skill.summary, inlineRef(skill), maxSourceBytes, mode);
|
|
96
|
-
if (skill.summary !== undefined)
|
|
97
|
-
return inlineContentPayload(skill.summary, skill.summary, inlineRef(skill), maxSourceBytes, mode);
|
|
98
|
-
return { status: 'unavailable', unavailableReason: 'inline_content_missing' };
|
|
99
|
-
}
|
|
100
|
-
if (skill.source.kind === 'url')
|
|
101
|
-
return { status: 'unavailable', unavailableReason: 'url_fetch_disabled' };
|
|
102
|
-
if (workspaceRoot === undefined)
|
|
103
|
-
return { status: 'unavailable', unavailableReason: 'workspace_root_required' };
|
|
104
|
-
if (skill.source.path === undefined || !skill.source.path.trim())
|
|
105
|
-
return { status: 'unavailable', unavailableReason: 'path_missing' };
|
|
106
|
-
const requested = isAbsolute(skill.source.path) ? skill.source.path : resolve(workspaceRoot, skill.source.path);
|
|
107
|
-
if (!isWithinRoot(requested, workspaceRoot))
|
|
108
|
-
return { status: 'unavailable', unavailableReason: 'path_outside_workspace' };
|
|
109
|
-
const real = safeRealpath(requested);
|
|
110
|
-
if (real === undefined)
|
|
111
|
-
return { status: 'unavailable', unavailableReason: 'path_not_found' };
|
|
112
|
-
if (!isWithinRoot(real, workspaceRoot))
|
|
113
|
-
return { status: 'unavailable', unavailableReason: 'path_outside_workspace' };
|
|
114
|
-
try {
|
|
115
|
-
const stats = statSync(real);
|
|
116
|
-
if (!stats.isFile())
|
|
117
|
-
return { status: 'unavailable', unavailableReason: 'path_not_file' };
|
|
118
|
-
if (mode === 'compact')
|
|
119
|
-
return compactPathContent(skill, stats.size);
|
|
120
|
-
if (stats.size > maxSourceBytes)
|
|
121
|
-
return { status: 'unavailable', unavailableReason: 'path_too_large', byteSize: stats.size, ref: skill.source.path };
|
|
122
|
-
return contentPayload(readFileSync(real, 'utf8'), skill.summary, skill.source.path, mode, stats.size);
|
|
123
|
-
}
|
|
124
|
-
catch {
|
|
125
|
-
return { status: 'unavailable', unavailableReason: 'path_read_failed' };
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
function inlineContentPayload(value, summary, ref, maxSourceBytes, mode) {
|
|
129
|
-
const byteSize = Buffer.byteLength(value, 'utf8');
|
|
130
|
-
if (mode === 'verbose' && byteSize > maxSourceBytes) {
|
|
131
|
-
return { status: 'unavailable', unavailableReason: 'inline_too_large', byteSize, ...(ref === undefined ? {} : { ref }) };
|
|
132
|
-
}
|
|
133
|
-
return contentPayload(value, summary, ref, mode, byteSize);
|
|
134
|
-
}
|
|
135
|
-
function compactPathContent(skill, byteSize) {
|
|
136
|
-
const metadataHash = stringMetadata(skill.sourceMetadata.sha256) ?? stringMetadata(skill.sourceMetadata.hash) ?? stringMetadata(skill.sourceMetadata.contentHash);
|
|
137
|
-
const metadataSummary = skill.summary ?? stringMetadata(skill.sourceMetadata.summary);
|
|
138
|
-
return {
|
|
139
|
-
status: 'available',
|
|
140
|
-
contentAvailable: true,
|
|
141
|
-
byteSize,
|
|
142
|
-
...(metadataHash === undefined ? {} : { hash: metadataHash }),
|
|
143
|
-
summary: summarize(metadataSummary ?? `Path skill source available at ${skill.source.path ?? 'unknown path'} (${byteSize} bytes).`),
|
|
144
|
-
...(skill.source.path === undefined ? {} : { ref: skill.source.path }),
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function contentPayload(value, summary, ref, mode, byteSize = Buffer.byteLength(value, 'utf8')) {
|
|
148
|
-
if (mode === 'verbose')
|
|
149
|
-
return { status: 'available', value, byteSize, hash: sha256(value), ...(ref === undefined ? {} : { ref }) };
|
|
150
|
-
return {
|
|
151
|
-
status: 'available',
|
|
152
|
-
contentAvailable: true,
|
|
153
|
-
byteSize,
|
|
154
|
-
hash: sha256(value),
|
|
155
|
-
summary: summarize(summary ?? value),
|
|
156
|
-
...(ref === undefined ? {} : { ref }),
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function inlineRef(skill) {
|
|
160
|
-
return `skill:${skill.name}@${skill.version}`;
|
|
161
|
-
}
|
|
162
|
-
function sha256(value) {
|
|
163
|
-
return createHash('sha256').update(value).digest('hex');
|
|
164
|
-
}
|
|
165
|
-
function summarize(value) {
|
|
166
|
-
const normalized = value.replace(/\s+/g, ' ').trim();
|
|
167
|
-
return normalized.length <= 240 ? normalized : `${normalized.slice(0, 237)}...`;
|
|
168
|
-
}
|
|
169
|
-
function stringMetadata(value) {
|
|
170
|
-
return typeof value === 'string' && value.trim().length > 0 ? value : undefined;
|
|
171
|
-
}
|
|
172
|
-
function safeRealpath(path) {
|
|
173
|
-
try {
|
|
174
|
-
return realpathSync(path);
|
|
175
|
-
}
|
|
176
|
-
catch {
|
|
177
|
-
return undefined;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function isWithinRoot(path, root) {
|
|
181
|
-
const relation = relative(root, path);
|
|
182
|
-
return relation === '' || (!relation.startsWith('..') && !isAbsolute(relation));
|
|
183
|
-
}
|
|
184
|
-
function validationFailure(message) {
|
|
185
|
-
return { ok: false, error: { code: 'validation_failed', message } };
|
|
186
|
-
}
|
|
1
|
+
export * from '../application/skills/skill-payload.js';
|