@hoknie/aip 0.0.0-stage → 0.2.0
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/.claude-plugin/marketplace.json +13 -0
- package/README.md +74 -2
- package/dist/app/agents.js +20 -0
- package/dist/app/agents.js.map +1 -0
- package/dist/app/application.js +205 -0
- package/dist/app/application.js.map +1 -0
- package/dist/app/daemon.js +71 -0
- package/dist/app/daemon.js.map +1 -0
- package/dist/app/index.js +5 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/lifecycle.js +34 -0
- package/dist/app/lifecycle.js.map +1 -0
- package/dist/app/maintenance.js +27 -0
- package/dist/app/maintenance.js.map +1 -0
- package/dist/app/timings.js +24 -0
- package/dist/app/timings.js.map +1 -0
- package/dist/app/wiring.js +58 -0
- package/dist/app/wiring.js.map +1 -0
- package/dist/cli/main.js +31 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/feature/agents/clients/agy/events.js +36 -0
- package/dist/feature/agents/clients/agy/events.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-commands.js +29 -0
- package/dist/feature/agents/clients/agy/guard-commands.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-paths.js +36 -0
- package/dist/feature/agents/clients/agy/guard-paths.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard.js +77 -0
- package/dist/feature/agents/clients/agy/guard.js.map +1 -0
- package/dist/feature/agents/clients/agy/hooks.js +46 -0
- package/dist/feature/agents/clients/agy/hooks.js.map +1 -0
- package/dist/feature/agents/clients/agy/index.js +5 -0
- package/dist/feature/agents/clients/agy/index.js.map +1 -0
- package/dist/feature/agents/clients/agy/parser.js +63 -0
- package/dist/feature/agents/clients/agy/parser.js.map +1 -0
- package/dist/feature/agents/clients/agy/permissions.js +40 -0
- package/dist/feature/agents/clients/agy/permissions.js.map +1 -0
- package/dist/feature/agents/clients/agy/runtime.js +115 -0
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -0
- package/dist/feature/agents/clients/agy/transcript.js +65 -0
- package/dist/feature/agents/clients/agy/transcript.js.map +1 -0
- package/dist/feature/agents/clients/claude/index.js +6 -0
- package/dist/feature/agents/clients/claude/index.js.map +1 -0
- package/dist/feature/agents/clients/claude/models.js +8 -0
- package/dist/feature/agents/clients/claude/models.js.map +1 -0
- package/dist/feature/agents/clients/claude/parser.js +229 -0
- package/dist/feature/agents/clients/claude/parser.js.map +1 -0
- package/dist/feature/agents/clients/claude/permissions.js +70 -0
- package/dist/feature/agents/clients/claude/permissions.js.map +1 -0
- package/dist/feature/agents/clients/claude/runtime.js +118 -0
- package/dist/feature/agents/clients/claude/runtime.js.map +1 -0
- package/dist/feature/agents/clients/claude/transcript.js +105 -0
- package/dist/feature/agents/clients/claude/transcript.js.map +1 -0
- package/dist/feature/agents/clients/naming/index.js +2 -0
- package/dist/feature/agents/clients/naming/index.js.map +1 -0
- package/dist/feature/agents/clients/naming/naming.js +15 -0
- package/dist/feature/agents/clients/naming/naming.js.map +1 -0
- package/dist/feature/agents/clients/opencode/index.js +5 -0
- package/dist/feature/agents/clients/opencode/index.js.map +1 -0
- package/dist/feature/agents/clients/opencode/models.js +38 -0
- package/dist/feature/agents/clients/opencode/models.js.map +1 -0
- package/dist/feature/agents/clients/opencode/parser.js +84 -0
- package/dist/feature/agents/clients/opencode/parser.js.map +1 -0
- package/dist/feature/agents/clients/opencode/runtime.js +131 -0
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -0
- package/dist/feature/agents/clients/opencode/transcript.js +77 -0
- package/dist/feature/agents/clients/opencode/transcript.js.map +1 -0
- package/dist/feature/agents/ports/command.js +2 -0
- package/dist/feature/agents/ports/command.js.map +1 -0
- package/dist/feature/agents/ports/index.js +2 -0
- package/dist/feature/agents/ports/index.js.map +1 -0
- package/dist/feature/agents/ports/naming.js +2 -0
- package/dist/feature/agents/ports/naming.js.map +1 -0
- package/dist/feature/agents/ports/runtime-factory.js +2 -0
- package/dist/feature/agents/ports/runtime-factory.js.map +1 -0
- package/dist/feature/agents/services/agents.js +79 -0
- package/dist/feature/agents/services/agents.js.map +1 -0
- package/dist/feature/agents/services/catalog.js +117 -0
- package/dist/feature/agents/services/catalog.js.map +1 -0
- package/dist/feature/agents/services/create.js +5 -0
- package/dist/feature/agents/services/create.js.map +1 -0
- package/dist/feature/agents/services/index.js +7 -0
- package/dist/feature/agents/services/index.js.map +1 -0
- package/dist/feature/agents/services/logs.js +69 -0
- package/dist/feature/agents/services/logs.js.map +1 -0
- package/dist/feature/agents/services/skills.js +17 -0
- package/dist/feature/agents/services/skills.js.map +1 -0
- package/dist/feature/agents/services/supervisor.js +160 -0
- package/dist/feature/agents/services/supervisor.js.map +1 -0
- package/dist/feature/agents/types/catalog.js +2 -0
- package/dist/feature/agents/types/catalog.js.map +1 -0
- package/dist/feature/agents/types/index.js +13 -0
- package/dist/feature/agents/types/index.js.map +1 -0
- package/dist/feature/agents/types/message.js +49 -0
- package/dist/feature/agents/types/message.js.map +1 -0
- package/dist/feature/agents/types/models.js +2 -0
- package/dist/feature/agents/types/models.js.map +1 -0
- package/dist/feature/agents/types/naming.js +4 -0
- package/dist/feature/agents/types/naming.js.map +1 -0
- package/dist/feature/agents/types/permissions.js +235 -0
- package/dist/feature/agents/types/permissions.js.map +1 -0
- package/dist/feature/agents/types/run-naming.js +66 -0
- package/dist/feature/agents/types/run-naming.js.map +1 -0
- package/dist/feature/agents/types/runtime.js +18 -0
- package/dist/feature/agents/types/runtime.js.map +1 -0
- package/dist/feature/agents/types/step-input.js +2 -0
- package/dist/feature/agents/types/step-input.js.map +1 -0
- package/dist/feature/agents/types/transcript-parts.js +62 -0
- package/dist/feature/agents/types/transcript-parts.js.map +1 -0
- package/dist/feature/agents/types/transcript.js +8 -0
- package/dist/feature/agents/types/transcript.js.map +1 -0
- package/dist/feature/agents/types/usage.js +14 -0
- package/dist/feature/agents/types/usage.js.map +1 -0
- package/dist/feature/agents/types/worker-tools.js +22 -0
- package/dist/feature/agents/types/worker-tools.js.map +1 -0
- package/dist/feature/artifacts/ports/index.js +2 -0
- package/dist/feature/artifacts/ports/index.js.map +1 -0
- package/dist/feature/artifacts/ports/publish.js +2 -0
- package/dist/feature/artifacts/ports/publish.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js +84 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifacts.js +85 -0
- package/dist/feature/artifacts/repositories/artifacts.js.map +1 -0
- package/dist/feature/artifacts/repositories/index.js +3 -0
- package/dist/feature/artifacts/repositories/index.js.map +1 -0
- package/dist/feature/artifacts/services/artifacts.js +105 -0
- package/dist/feature/artifacts/services/artifacts.js.map +1 -0
- package/dist/feature/artifacts/services/create.js +14 -0
- package/dist/feature/artifacts/services/create.js.map +1 -0
- package/dist/feature/artifacts/services/files.js +42 -0
- package/dist/feature/artifacts/services/files.js.map +1 -0
- package/dist/feature/artifacts/services/index.js +3 -0
- package/dist/feature/artifacts/services/index.js.map +1 -0
- package/dist/feature/artifacts/types/artifacts.js +36 -0
- package/dist/feature/artifacts/types/artifacts.js.map +1 -0
- package/dist/feature/artifacts/types/index.js +2 -0
- package/dist/feature/artifacts/types/index.js.map +1 -0
- package/dist/feature/artifacts/types/views.js +2 -0
- package/dist/feature/artifacts/types/views.js.map +1 -0
- package/dist/feature/compose/services/create.js +11 -0
- package/dist/feature/compose/services/create.js.map +1 -0
- package/dist/feature/compose/services/index.js +5 -0
- package/dist/feature/compose/services/index.js.map +1 -0
- package/dist/feature/compose/services/repository-edit.js +20 -0
- package/dist/feature/compose/services/repository-edit.js.map +1 -0
- package/dist/feature/compose/services/repository-move.js +35 -0
- package/dist/feature/compose/services/repository-move.js.map +1 -0
- package/dist/feature/compose/services/repository-removal.js +38 -0
- package/dist/feature/compose/services/repository-removal.js.map +1 -0
- package/dist/feature/delivery/ports/index.js +2 -0
- package/dist/feature/delivery/ports/index.js.map +1 -0
- package/dist/feature/delivery/ports/publish.js +2 -0
- package/dist/feature/delivery/ports/publish.js.map +1 -0
- package/dist/feature/delivery/repositories/index.js +3 -0
- package/dist/feature/delivery/repositories/index.js.map +1 -0
- package/dist/feature/delivery/repositories/patch-storage.js +76 -0
- package/dist/feature/delivery/repositories/patch-storage.js.map +1 -0
- package/dist/feature/delivery/repositories/patches.js +28 -0
- package/dist/feature/delivery/repositories/patches.js.map +1 -0
- package/dist/feature/delivery/services/create.js +21 -0
- package/dist/feature/delivery/services/create.js.map +1 -0
- package/dist/feature/delivery/services/deliver.js +67 -0
- package/dist/feature/delivery/services/deliver.js.map +1 -0
- package/dist/feature/delivery/services/diffs.js +153 -0
- package/dist/feature/delivery/services/diffs.js.map +1 -0
- package/dist/feature/delivery/services/index.js +5 -0
- package/dist/feature/delivery/services/index.js.map +1 -0
- package/dist/feature/delivery/services/patches.js +96 -0
- package/dist/feature/delivery/services/patches.js.map +1 -0
- package/dist/feature/delivery/types/index.js +3 -0
- package/dist/feature/delivery/types/index.js.map +1 -0
- package/dist/feature/delivery/types/outcomes.js +2 -0
- package/dist/feature/delivery/types/outcomes.js.map +1 -0
- package/dist/feature/delivery/types/spec-change.js +18 -0
- package/dist/feature/delivery/types/spec-change.js.map +1 -0
- package/dist/feature/network/ports/changed.js +2 -0
- package/dist/feature/network/ports/changed.js.map +1 -0
- package/dist/feature/network/ports/index.js +2 -0
- package/dist/feature/network/ports/index.js.map +1 -0
- package/dist/feature/network/services/create.js +5 -0
- package/dist/feature/network/services/create.js.map +1 -0
- package/dist/feature/network/services/index.js +3 -0
- package/dist/feature/network/services/index.js.map +1 -0
- package/dist/feature/network/services/monitor.js +140 -0
- package/dist/feature/network/services/monitor.js.map +1 -0
- package/dist/feature/network/types/index.js +4 -0
- package/dist/feature/network/types/index.js.map +1 -0
- package/dist/feature/network/types/network.js +8 -0
- package/dist/feature/network/types/network.js.map +1 -0
- package/dist/feature/network/types/proxy.js +95 -0
- package/dist/feature/network/types/proxy.js.map +1 -0
- package/dist/feature/network/types/state.js +36 -0
- package/dist/feature/network/types/state.js.map +1 -0
- package/dist/feature/observers/ports/index.js +2 -0
- package/dist/feature/observers/ports/index.js.map +1 -0
- package/dist/feature/observers/ports/publish.js +2 -0
- package/dist/feature/observers/ports/publish.js.map +1 -0
- package/dist/feature/observers/repositories/index.js +2 -0
- package/dist/feature/observers/repositories/index.js.map +1 -0
- package/dist/feature/observers/repositories/observers.js +34 -0
- package/dist/feature/observers/repositories/observers.js.map +1 -0
- package/dist/feature/observers/services/create.js +11 -0
- package/dist/feature/observers/services/create.js.map +1 -0
- package/dist/feature/observers/services/history.js +76 -0
- package/dist/feature/observers/services/history.js.map +1 -0
- package/dist/feature/observers/services/index.js +5 -0
- package/dist/feature/observers/services/index.js.map +1 -0
- package/dist/feature/observers/services/observers.js +188 -0
- package/dist/feature/observers/services/observers.js.map +1 -0
- package/dist/feature/observers/services/settings-check.js +87 -0
- package/dist/feature/observers/services/settings-check.js.map +1 -0
- package/dist/feature/observers/types/actions.js +2 -0
- package/dist/feature/observers/types/actions.js.map +1 -0
- package/dist/feature/observers/types/index.js +4 -0
- package/dist/feature/observers/types/index.js.map +1 -0
- package/dist/feature/observers/types/plan-repairs.js +116 -0
- package/dist/feature/observers/types/plan-repairs.js.map +1 -0
- package/dist/feature/observers/types/settings.js +12 -0
- package/dist/feature/observers/types/settings.js.map +1 -0
- package/dist/feature/processes/ports/index.js +2 -0
- package/dist/feature/processes/ports/index.js.map +1 -0
- package/dist/feature/processes/ports/publish.js +2 -0
- package/dist/feature/processes/ports/publish.js.map +1 -0
- package/dist/feature/processes/services/create.js +5 -0
- package/dist/feature/processes/services/create.js.map +1 -0
- package/dist/feature/processes/services/index.js +4 -0
- package/dist/feature/processes/services/index.js.map +1 -0
- package/dist/feature/processes/services/processes.js +131 -0
- package/dist/feature/processes/services/processes.js.map +1 -0
- package/dist/feature/processes/services/tree.js +98 -0
- package/dist/feature/processes/services/tree.js.map +1 -0
- package/dist/feature/processes/types/background.js +2 -0
- package/dist/feature/processes/types/background.js.map +1 -0
- package/dist/feature/processes/types/index.js +2 -0
- package/dist/feature/processes/types/index.js.map +1 -0
- package/dist/feature/queue/ports/index.js +2 -0
- package/dist/feature/queue/ports/index.js.map +1 -0
- package/dist/feature/queue/ports/observe.js +2 -0
- package/dist/feature/queue/ports/observe.js.map +1 -0
- package/dist/feature/queue/ports/publish.js +2 -0
- package/dist/feature/queue/ports/publish.js.map +1 -0
- package/dist/feature/queue/ports/repair-policy.js +2 -0
- package/dist/feature/queue/ports/repair-policy.js.map +1 -0
- package/dist/feature/queue/repositories/index.js +2 -0
- package/dist/feature/queue/repositories/index.js.map +1 -0
- package/dist/feature/queue/repositories/queues.js +100 -0
- package/dist/feature/queue/repositories/queues.js.map +1 -0
- package/dist/feature/queue/services/advance.js +214 -0
- package/dist/feature/queue/services/advance.js.map +1 -0
- package/dist/feature/queue/services/control.js +169 -0
- package/dist/feature/queue/services/control.js.map +1 -0
- package/dist/feature/queue/services/create.js +26 -0
- package/dist/feature/queue/services/create.js.map +1 -0
- package/dist/feature/queue/services/edit.js +126 -0
- package/dist/feature/queue/services/edit.js.map +1 -0
- package/dist/feature/queue/services/index.js +8 -0
- package/dist/feature/queue/services/index.js.map +1 -0
- package/dist/feature/queue/services/items.js +173 -0
- package/dist/feature/queue/services/items.js.map +1 -0
- package/dist/feature/queue/services/store.js +61 -0
- package/dist/feature/queue/services/store.js.map +1 -0
- package/dist/feature/queue/services/task-tags.js +103 -0
- package/dist/feature/queue/services/task-tags.js.map +1 -0
- package/dist/feature/queue/types/advance.js +198 -0
- package/dist/feature/queue/types/advance.js.map +1 -0
- package/dist/feature/queue/types/dependencies.js +98 -0
- package/dist/feature/queue/types/dependencies.js.map +1 -0
- package/dist/feature/queue/types/edit.js +180 -0
- package/dist/feature/queue/types/edit.js.map +1 -0
- package/dist/feature/queue/types/ids.js +7 -0
- package/dist/feature/queue/types/ids.js.map +1 -0
- package/dist/feature/queue/types/index.js +10 -0
- package/dist/feature/queue/types/index.js.map +1 -0
- package/dist/feature/queue/types/items.js +46 -0
- package/dist/feature/queue/types/items.js.map +1 -0
- package/dist/feature/queue/types/limit-hits.js +50 -0
- package/dist/feature/queue/types/limit-hits.js.map +1 -0
- package/dist/feature/queue/types/requests.js +2 -0
- package/dist/feature/queue/types/requests.js.map +1 -0
- package/dist/feature/queue/types/returns.js +197 -0
- package/dist/feature/queue/types/returns.js.map +1 -0
- package/dist/feature/queue/types/settings.js +117 -0
- package/dist/feature/queue/types/settings.js.map +1 -0
- package/dist/feature/repos/ports/index.js +2 -0
- package/dist/feature/repos/ports/index.js.map +1 -0
- package/dist/feature/repos/ports/publish.js +2 -0
- package/dist/feature/repos/ports/publish.js.map +1 -0
- package/dist/feature/repos/repositories/index.js +2 -0
- package/dist/feature/repos/repositories/index.js.map +1 -0
- package/dist/feature/repos/repositories/known.js +41 -0
- package/dist/feature/repos/repositories/known.js.map +1 -0
- package/dist/feature/repos/services/create.js +13 -0
- package/dist/feature/repos/services/create.js.map +1 -0
- package/dist/feature/repos/services/index.js +4 -0
- package/dist/feature/repos/services/index.js.map +1 -0
- package/dist/feature/repos/services/projects.js +50 -0
- package/dist/feature/repos/services/projects.js.map +1 -0
- package/dist/feature/repos/services/registry.js +138 -0
- package/dist/feature/repos/services/registry.js.map +1 -0
- package/dist/feature/repos/types/index.js +2 -0
- package/dist/feature/repos/types/index.js.map +1 -0
- package/dist/feature/repos/types/project.js +80 -0
- package/dist/feature/repos/types/project.js.map +1 -0
- package/dist/feature/repos/types/registry.js +2 -0
- package/dist/feature/repos/types/registry.js.map +1 -0
- package/dist/feature/runs/machine/answers.js +112 -0
- package/dist/feature/runs/machine/answers.js.map +1 -0
- package/dist/feature/runs/machine/delivery-checks.js +91 -0
- package/dist/feature/runs/machine/delivery-checks.js.map +1 -0
- package/dist/feature/runs/machine/delivery-flow.js +211 -0
- package/dist/feature/runs/machine/delivery-flow.js.map +1 -0
- package/dist/feature/runs/machine/events.js +2 -0
- package/dist/feature/runs/machine/events.js.map +1 -0
- package/dist/feature/runs/machine/exits.js +229 -0
- package/dist/feature/runs/machine/exits.js.map +1 -0
- package/dist/feature/runs/machine/index.js +7 -0
- package/dist/feature/runs/machine/index.js.map +1 -0
- package/dist/feature/runs/machine/plan.js +133 -0
- package/dist/feature/runs/machine/plan.js.map +1 -0
- package/dist/feature/runs/machine/repair.js +158 -0
- package/dist/feature/runs/machine/repair.js.map +1 -0
- package/dist/feature/runs/machine/run-control.js +276 -0
- package/dist/feature/runs/machine/run-control.js.map +1 -0
- package/dist/feature/runs/machine/scheduler.js +126 -0
- package/dist/feature/runs/machine/scheduler.js.map +1 -0
- package/dist/feature/runs/machine/steps.js +275 -0
- package/dist/feature/runs/machine/steps.js.map +1 -0
- package/dist/feature/runs/machine/texts.js +69 -0
- package/dist/feature/runs/machine/texts.js.map +1 -0
- package/dist/feature/runs/machine/transition.js +117 -0
- package/dist/feature/runs/machine/transition.js.map +1 -0
- package/dist/feature/runs/ports/agent-exit.js +2 -0
- package/dist/feature/runs/ports/agent-exit.js.map +1 -0
- package/dist/feature/runs/ports/diff.js +2 -0
- package/dist/feature/runs/ports/diff.js.map +1 -0
- package/dist/feature/runs/ports/index.js +2 -0
- package/dist/feature/runs/ports/index.js.map +1 -0
- package/dist/feature/runs/ports/observe.js +2 -0
- package/dist/feature/runs/ports/observe.js.map +1 -0
- package/dist/feature/runs/ports/publish.js +2 -0
- package/dist/feature/runs/ports/publish.js.map +1 -0
- package/dist/feature/runs/ports/queue-advance.js +2 -0
- package/dist/feature/runs/ports/queue-advance.js.map +1 -0
- package/dist/feature/runs/repositories/attempt-history.js +116 -0
- package/dist/feature/runs/repositories/attempt-history.js.map +1 -0
- package/dist/feature/runs/repositories/finished-runs.js +46 -0
- package/dist/feature/runs/repositories/finished-runs.js.map +1 -0
- package/dist/feature/runs/repositories/index.js +4 -0
- package/dist/feature/runs/repositories/index.js.map +1 -0
- package/dist/feature/runs/repositories/rows.js +110 -0
- package/dist/feature/runs/repositories/rows.js.map +1 -0
- package/dist/feature/runs/repositories/runs.js +76 -0
- package/dist/feature/runs/repositories/runs.js.map +1 -0
- package/dist/feature/runs/repositories/write.js +31 -0
- package/dist/feature/runs/repositories/write.js.map +1 -0
- package/dist/feature/runs/services/archive.js +17 -0
- package/dist/feature/runs/services/archive.js.map +1 -0
- package/dist/feature/runs/services/attempt-history.js +11 -0
- package/dist/feature/runs/services/attempt-history.js.map +1 -0
- package/dist/feature/runs/services/create.js +44 -0
- package/dist/feature/runs/services/create.js.map +1 -0
- package/dist/feature/runs/services/effects/actions.js +151 -0
- package/dist/feature/runs/services/effects/actions.js.map +1 -0
- package/dist/feature/runs/services/effects/attempts.js +219 -0
- package/dist/feature/runs/services/effects/attempts.js.map +1 -0
- package/dist/feature/runs/services/effects/context.js +7 -0
- package/dist/feature/runs/services/effects/context.js.map +1 -0
- package/dist/feature/runs/services/effects/effects.js +82 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -0
- package/dist/feature/runs/services/effects/git.js +168 -0
- package/dist/feature/runs/services/effects/git.js.map +1 -0
- package/dist/feature/runs/services/effects/naming.js +65 -0
- package/dist/feature/runs/services/effects/naming.js.map +1 -0
- package/dist/feature/runs/services/effects/outside.js +83 -0
- package/dist/feature/runs/services/effects/outside.js.map +1 -0
- package/dist/feature/runs/services/effects/proxy.js +5 -0
- package/dist/feature/runs/services/effects/proxy.js.map +1 -0
- package/dist/feature/runs/services/effects/running.js +76 -0
- package/dist/feature/runs/services/effects/running.js.map +1 -0
- package/dist/feature/runs/services/effects/usage.js +61 -0
- package/dist/feature/runs/services/effects/usage.js.map +1 -0
- package/dist/feature/runs/services/effects/worktrees.js +49 -0
- package/dist/feature/runs/services/effects/worktrees.js.map +1 -0
- package/dist/feature/runs/services/engine.js +172 -0
- package/dist/feature/runs/services/engine.js.map +1 -0
- package/dist/feature/runs/services/index.js +15 -0
- package/dist/feature/runs/services/index.js.map +1 -0
- package/dist/feature/runs/services/occupancy.js +62 -0
- package/dist/feature/runs/services/occupancy.js.map +1 -0
- package/dist/feature/runs/services/progress.js +42 -0
- package/dist/feature/runs/services/progress.js.map +1 -0
- package/dist/feature/runs/services/reads.js +93 -0
- package/dist/feature/runs/services/reads.js.map +1 -0
- package/dist/feature/runs/services/recovery.js +17 -0
- package/dist/feature/runs/services/recovery.js.map +1 -0
- package/dist/feature/runs/services/refresh.js +29 -0
- package/dist/feature/runs/services/refresh.js.map +1 -0
- package/dist/feature/runs/services/requests.js +88 -0
- package/dist/feature/runs/services/requests.js.map +1 -0
- package/dist/feature/runs/services/states.js +112 -0
- package/dist/feature/runs/services/states.js.map +1 -0
- package/dist/feature/runs/services/summary.js +38 -0
- package/dist/feature/runs/services/summary.js.map +1 -0
- package/dist/feature/runs/types/attempt.js +106 -0
- package/dist/feature/runs/types/attempt.js.map +1 -0
- package/dist/feature/runs/types/constants.js +45 -0
- package/dist/feature/runs/types/constants.js.map +1 -0
- package/dist/feature/runs/types/create.js +177 -0
- package/dist/feature/runs/types/create.js.map +1 -0
- package/dist/feature/runs/types/group.js +152 -0
- package/dist/feature/runs/types/group.js.map +1 -0
- package/dist/feature/runs/types/history/attempt-history.js +16 -0
- package/dist/feature/runs/types/history/attempt-history.js.map +1 -0
- package/dist/feature/runs/types/index.js +15 -0
- package/dist/feature/runs/types/index.js.map +1 -0
- package/dist/feature/runs/types/input.js +90 -0
- package/dist/feature/runs/types/input.js.map +1 -0
- package/dist/feature/runs/types/limits.js +163 -0
- package/dist/feature/runs/types/limits.js.map +1 -0
- package/dist/feature/runs/types/problems.js +74 -0
- package/dist/feature/runs/types/problems.js.map +1 -0
- package/dist/feature/runs/types/run.js +162 -0
- package/dist/feature/runs/types/run.js.map +1 -0
- package/dist/feature/runs/types/skip.js +110 -0
- package/dist/feature/runs/types/skip.js.map +1 -0
- package/dist/feature/runs/types/stage-status.js +156 -0
- package/dist/feature/runs/types/stage-status.js.map +1 -0
- package/dist/feature/runs/types/stages.js +158 -0
- package/dist/feature/runs/types/stages.js.map +1 -0
- package/dist/feature/runs/types/topology.js +165 -0
- package/dist/feature/runs/types/topology.js.map +1 -0
- package/dist/feature/stats/repositories/index.js +4 -0
- package/dist/feature/stats/repositories/index.js.map +1 -0
- package/dist/feature/stats/repositories/meta.js +19 -0
- package/dist/feature/stats/repositories/meta.js.map +1 -0
- package/dist/feature/stats/repositories/records.js +46 -0
- package/dist/feature/stats/repositories/records.js.map +1 -0
- package/dist/feature/stats/repositories/report.js +105 -0
- package/dist/feature/stats/repositories/report.js.map +1 -0
- package/dist/feature/stats/services/create.js +44 -0
- package/dist/feature/stats/services/create.js.map +1 -0
- package/dist/feature/stats/services/index.js +4 -0
- package/dist/feature/stats/services/index.js.map +1 -0
- package/dist/feature/stats/services/ledger.js +137 -0
- package/dist/feature/stats/services/ledger.js.map +1 -0
- package/dist/feature/stats/services/report.js +56 -0
- package/dist/feature/stats/services/report.js.map +1 -0
- package/dist/feature/stats/types/aggregate.js +179 -0
- package/dist/feature/stats/types/aggregate.js.map +1 -0
- package/dist/feature/stats/types/capture.js +79 -0
- package/dist/feature/stats/types/capture.js.map +1 -0
- package/dist/feature/stats/types/index.js +6 -0
- package/dist/feature/stats/types/index.js.map +1 -0
- package/dist/feature/stats/types/records.js +5 -0
- package/dist/feature/stats/types/records.js.map +1 -0
- package/dist/feature/stats/types/report.js +25 -0
- package/dist/feature/stats/types/report.js.map +1 -0
- package/dist/feature/stats/types/settings.js +2 -0
- package/dist/feature/stats/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/repositories/config-files.js +141 -0
- package/dist/feature/swarm-config/repositories/config-files.js.map +1 -0
- package/dist/feature/swarm-config/services/assemble.js +212 -0
- package/dist/feature/swarm-config/services/assemble.js.map +1 -0
- package/dist/feature/swarm-config/services/create.js +5 -0
- package/dist/feature/swarm-config/services/create.js.map +1 -0
- package/dist/feature/swarm-config/services/discover.js +19 -0
- package/dist/feature/swarm-config/services/discover.js.map +1 -0
- package/dist/feature/swarm-config/services/index.js +10 -0
- package/dist/feature/swarm-config/services/index.js.map +1 -0
- package/dist/feature/swarm-config/services/load.js +101 -0
- package/dist/feature/swarm-config/services/load.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/stats.js +28 -0
- package/dist/feature/swarm-config/services/sections/stats.js.map +1 -0
- package/dist/feature/swarm-config/services/settings.js +72 -0
- package/dist/feature/swarm-config/services/settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-actions.js +125 -0
- package/dist/feature/swarm-config/services/validate-actions.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-context.js +91 -0
- package/dist/feature/swarm-config/services/validate-context.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js +170 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js +214 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-settings.js +242 -0
- package/dist/feature/swarm-config/services/validate-settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-specialists.js +152 -0
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -0
- package/dist/feature/swarm-config/services/validate.js +189 -0
- package/dist/feature/swarm-config/services/validate.js.map +1 -0
- package/dist/feature/swarm-config/types/action.js +20 -0
- package/dist/feature/swarm-config/types/action.js.map +1 -0
- package/dist/feature/swarm-config/types/chain.js +2 -0
- package/dist/feature/swarm-config/types/chain.js.map +1 -0
- package/dist/feature/swarm-config/types/duration.js +17 -0
- package/dist/feature/swarm-config/types/duration.js.map +1 -0
- package/dist/feature/swarm-config/types/errors.js +57 -0
- package/dist/feature/swarm-config/types/errors.js.map +1 -0
- package/dist/feature/swarm-config/types/index.js +13 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -0
- package/dist/feature/swarm-config/types/levels.js +16 -0
- package/dist/feature/swarm-config/types/levels.js.map +1 -0
- package/dist/feature/swarm-config/types/lookups.js +53 -0
- package/dist/feature/swarm-config/types/lookups.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +46 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -0
- package/dist/feature/swarm-config/types/pipeline.js +5 -0
- package/dist/feature/swarm-config/types/pipeline.js.map +1 -0
- package/dist/feature/swarm-config/types/prompt.js +33 -0
- package/dist/feature/swarm-config/types/prompt.js.map +1 -0
- package/dist/feature/swarm-config/types/settings.js +146 -0
- package/dist/feature/swarm-config/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/types/specialist.js +38 -0
- package/dist/feature/swarm-config/types/specialist.js.map +1 -0
- package/dist/feature/swarm-config/types/tag-names.js +43 -0
- package/dist/feature/swarm-config/types/tag-names.js.map +1 -0
- package/dist/feature/swarm-edit/ports/config-changed.js +2 -0
- package/dist/feature/swarm-edit/ports/config-changed.js.map +1 -0
- package/dist/feature/swarm-edit/ports/index.js +2 -0
- package/dist/feature/swarm-edit/ports/index.js.map +1 -0
- package/dist/feature/swarm-edit/repositories/documents.js +144 -0
- package/dist/feature/swarm-edit/repositories/documents.js.map +1 -0
- package/dist/feature/swarm-edit/services/config-edits.js +129 -0
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -0
- package/dist/feature/swarm-edit/services/create.js +7 -0
- package/dist/feature/swarm-edit/services/create.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-settings.js +172 -0
- package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-view.js +144 -0
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -0
- package/dist/feature/swarm-edit/services/index.js +12 -0
- package/dist/feature/swarm-edit/services/index.js.map +1 -0
- package/dist/feature/swarm-edit/services/levels.js +30 -0
- package/dist/feature/swarm-edit/services/levels.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-edit.js +217 -0
- package/dist/feature/swarm-edit/services/plan-edit.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-settings.js +200 -0
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/references.js +85 -0
- package/dist/feature/swarm-edit/services/references.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-config.js +128 -0
- package/dist/feature/swarm-edit/services/shared-config.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js +72 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js +70 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js.map +1 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js +215 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js.map +1 -0
- package/dist/feature/swarm-edit/types/editor.js +27 -0
- package/dist/feature/swarm-edit/types/editor.js.map +1 -0
- package/dist/feature/swarm-edit/types/index.js +7 -0
- package/dist/feature/swarm-edit/types/index.js.map +1 -0
- package/dist/feature/swarm-edit/types/setting-fields.js +76 -0
- package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -0
- package/dist/feature/swarm-edit/types/shared.js +2 -0
- package/dist/feature/swarm-edit/types/shared.js.map +1 -0
- package/dist/feature/swarm-edit/types/stages.js +69 -0
- package/dist/feature/swarm-edit/types/stages.js.map +1 -0
- package/dist/feature/swarm-edit/types/tag-folders.js +2 -0
- package/dist/feature/swarm-edit/types/tag-folders.js.map +1 -0
- package/dist/feature/swarm-edit/types/views.js +2 -0
- package/dist/feature/swarm-edit/types/views.js.map +1 -0
- package/dist/feature/tags/ports/index.js +2 -0
- package/dist/feature/tags/ports/index.js.map +1 -0
- package/dist/feature/tags/ports/publish.js +2 -0
- package/dist/feature/tags/ports/publish.js.map +1 -0
- package/dist/feature/tags/repositories/index.js +2 -0
- package/dist/feature/tags/repositories/index.js.map +1 -0
- package/dist/feature/tags/repositories/tags.js +36 -0
- package/dist/feature/tags/repositories/tags.js.map +1 -0
- package/dist/feature/tags/services/catalog.js +73 -0
- package/dist/feature/tags/services/catalog.js.map +1 -0
- package/dist/feature/tags/services/create.js +7 -0
- package/dist/feature/tags/services/create.js.map +1 -0
- package/dist/feature/tags/services/index.js +3 -0
- package/dist/feature/tags/services/index.js.map +1 -0
- package/dist/feature/tags/types/ids.js +7 -0
- package/dist/feature/tags/types/ids.js.map +1 -0
- package/dist/feature/tags/types/index.js +3 -0
- package/dist/feature/tags/types/index.js.map +1 -0
- package/dist/feature/tags/types/tags.js +184 -0
- package/dist/feature/tags/types/tags.js.map +1 -0
- package/dist/platform/build/fingerprint.js +36 -0
- package/dist/platform/build/fingerprint.js.map +1 -0
- package/dist/platform/build/index.js +3 -0
- package/dist/platform/build/index.js.map +1 -0
- package/dist/platform/build/locations.js +16 -0
- package/dist/platform/build/locations.js.map +1 -0
- package/dist/platform/errors/app-error.js +39 -0
- package/dist/platform/errors/app-error.js.map +1 -0
- package/dist/platform/errors/index.js +2 -0
- package/dist/platform/errors/index.js.map +1 -0
- package/dist/platform/git/delivery.js +284 -0
- package/dist/platform/git/delivery.js.map +1 -0
- package/dist/platform/git/index.js +4 -0
- package/dist/platform/git/index.js.map +1 -0
- package/dist/platform/git/runner.js +65 -0
- package/dist/platform/git/runner.js.map +1 -0
- package/dist/platform/git/workspace.js +366 -0
- package/dist/platform/git/workspace.js.map +1 -0
- package/dist/platform/network/index.js +4 -0
- package/dist/platform/network/index.js.map +1 -0
- package/dist/platform/network/interfaces.js +7 -0
- package/dist/platform/network/interfaces.js.map +1 -0
- package/dist/platform/network/probe.js +128 -0
- package/dist/platform/network/probe.js.map +1 -0
- package/dist/platform/network/tunnel.js +87 -0
- package/dist/platform/network/tunnel.js.map +1 -0
- package/dist/platform/paths/index.js +2 -0
- package/dist/platform/paths/index.js.map +1 -0
- package/dist/platform/paths/paths.js +39 -0
- package/dist/platform/paths/paths.js.map +1 -0
- package/dist/platform/process/command.js +23 -0
- package/dist/platform/process/command.js.map +1 -0
- package/dist/platform/process/index.js +4 -0
- package/dist/platform/process/index.js.map +1 -0
- package/dist/platform/process/ps.js +42 -0
- package/dist/platform/process/ps.js.map +1 -0
- package/dist/platform/process/which.js +21 -0
- package/dist/platform/process/which.js.map +1 -0
- package/dist/platform/sqlite/database.js +36 -0
- package/dist/platform/sqlite/database.js.map +1 -0
- package/dist/platform/sqlite/index.js +4 -0
- package/dist/platform/sqlite/index.js.map +1 -0
- package/dist/platform/sqlite/migrations.js +299 -0
- package/dist/platform/sqlite/migrations.js.map +1 -0
- package/dist/platform/sqlite/rows.js +13 -0
- package/dist/platform/sqlite/rows.js.map +1 -0
- package/dist/platform/sqlite/stats-migration.js +42 -0
- package/dist/platform/sqlite/stats-migration.js.map +1 -0
- package/dist/presentation/cli/commands/daemon.js +216 -0
- package/dist/presentation/cli/commands/daemon.js.map +1 -0
- package/dist/presentation/cli/commands/group.js +88 -0
- package/dist/presentation/cli/commands/group.js.map +1 -0
- package/dist/presentation/cli/commands/mcp.js +44 -0
- package/dist/presentation/cli/commands/mcp.js.map +1 -0
- package/dist/presentation/cli/commands/queue-edit.js +155 -0
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -0
- package/dist/presentation/cli/commands/queue.js +222 -0
- package/dist/presentation/cli/commands/queue.js.map +1 -0
- package/dist/presentation/cli/commands/repositories.js +129 -0
- package/dist/presentation/cli/commands/repositories.js.map +1 -0
- package/dist/presentation/cli/commands/run-delivery.js +116 -0
- package/dist/presentation/cli/commands/run-delivery.js.map +1 -0
- package/dist/presentation/cli/commands/run.js +156 -0
- package/dist/presentation/cli/commands/run.js.map +1 -0
- package/dist/presentation/cli/commands/setup.js +97 -0
- package/dist/presentation/cli/commands/setup.js.map +1 -0
- package/dist/presentation/cli/commands/stats.js +41 -0
- package/dist/presentation/cli/commands/stats.js.map +1 -0
- package/dist/presentation/cli/commands/tag.js +92 -0
- package/dist/presentation/cli/commands/tag.js.map +1 -0
- package/dist/presentation/cli/commands/web.js +100 -0
- package/dist/presentation/cli/commands/web.js.map +1 -0
- package/dist/presentation/cli/context.js +49 -0
- package/dist/presentation/cli/context.js.map +1 -0
- package/dist/presentation/cli/help.js +49 -0
- package/dist/presentation/cli/help.js.map +1 -0
- package/dist/presentation/cli/io.js +13 -0
- package/dist/presentation/cli/io.js.map +1 -0
- package/dist/presentation/cli/local/clean.js +72 -0
- package/dist/presentation/cli/local/clean.js.map +1 -0
- package/dist/presentation/cli/local/config-check.js +225 -0
- package/dist/presentation/cli/local/config-check.js.map +1 -0
- package/dist/presentation/cli/local/init.js +44 -0
- package/dist/presentation/cli/local/init.js.map +1 -0
- package/dist/presentation/cli/options.js +34 -0
- package/dist/presentation/cli/options.js.map +1 -0
- package/dist/presentation/cli/probe.js +12 -0
- package/dist/presentation/cli/probe.js.map +1 -0
- package/dist/presentation/cli/program.js +78 -0
- package/dist/presentation/cli/program.js.map +1 -0
- package/dist/presentation/cli/setup/actions.js +206 -0
- package/dist/presentation/cli/setup/actions.js.map +1 -0
- package/dist/presentation/cli/setup/command.js +80 -0
- package/dist/presentation/cli/setup/command.js.map +1 -0
- package/dist/presentation/cli/setup/host.js +20 -0
- package/dist/presentation/cli/setup/host.js.map +1 -0
- package/dist/presentation/cli/setup/index.js +5 -0
- package/dist/presentation/cli/setup/index.js.map +1 -0
- package/dist/presentation/cli/setup/run.js +63 -0
- package/dist/presentation/cli/setup/run.js.map +1 -0
- package/dist/presentation/cli/setup/system.js +53 -0
- package/dist/presentation/cli/setup/system.js.map +1 -0
- package/dist/presentation/cli/setup/types.js +3 -0
- package/dist/presentation/cli/setup/types.js.map +1 -0
- package/dist/presentation/cli/watch.js +24 -0
- package/dist/presentation/cli/watch.js.map +1 -0
- package/dist/presentation/cli/web-control.js +172 -0
- package/dist/presentation/cli/web-control.js.map +1 -0
- package/dist/presentation/format/groups.js +99 -0
- package/dist/presentation/format/groups.js.map +1 -0
- package/dist/presentation/format/index.js +8 -0
- package/dist/presentation/format/index.js.map +1 -0
- package/dist/presentation/format/queue.js +109 -0
- package/dist/presentation/format/queue.js.map +1 -0
- package/dist/presentation/format/runs.js +209 -0
- package/dist/presentation/format/runs.js.map +1 -0
- package/dist/presentation/format/stats.js +79 -0
- package/dist/presentation/format/stats.js.map +1 -0
- package/dist/presentation/format/style.js +81 -0
- package/dist/presentation/format/style.js.map +1 -0
- package/dist/presentation/format/table.js +62 -0
- package/dist/presentation/format/table.js.map +1 -0
- package/dist/presentation/format/tags.js +26 -0
- package/dist/presentation/format/tags.js.map +1 -0
- package/dist/presentation/ipc/client/autostart.js +171 -0
- package/dist/presentation/ipc/client/autostart.js.map +1 -0
- package/dist/presentation/ipc/client/client.js +83 -0
- package/dist/presentation/ipc/client/client.js.map +1 -0
- package/dist/presentation/ipc/client/index.js +4 -0
- package/dist/presentation/ipc/client/index.js.map +1 -0
- package/dist/presentation/ipc/client/repository-argument.js +13 -0
- package/dist/presentation/ipc/client/repository-argument.js.map +1 -0
- package/dist/presentation/ipc/contract/agents.js +97 -0
- package/dist/presentation/ipc/contract/agents.js.map +1 -0
- package/dist/presentation/ipc/contract/artifacts.js +27 -0
- package/dist/presentation/ipc/contract/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/config.js +145 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -0
- package/dist/presentation/ipc/contract/envelope.js +100 -0
- package/dist/presentation/ipc/contract/envelope.js.map +1 -0
- package/dist/presentation/ipc/contract/groups.js +57 -0
- package/dist/presentation/ipc/contract/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/index.js +15 -0
- package/dist/presentation/ipc/contract/index.js.map +1 -0
- package/dist/presentation/ipc/contract/observers/history.js +26 -0
- package/dist/presentation/ipc/contract/observers/history.js.map +1 -0
- package/dist/presentation/ipc/contract/observers.js +16 -0
- package/dist/presentation/ipc/contract/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/panel.js +64 -0
- package/dist/presentation/ipc/contract/panel.js.map +1 -0
- package/dist/presentation/ipc/contract/processes.js +9 -0
- package/dist/presentation/ipc/contract/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/queue.js +115 -0
- package/dist/presentation/ipc/contract/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/repositories.js +33 -0
- package/dist/presentation/ipc/contract/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js +2 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/config.js +2 -0
- package/dist/presentation/ipc/contract/responses/config.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/groups.js +2 -0
- package/dist/presentation/ipc/contract/responses/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/index.js +12 -0
- package/dist/presentation/ipc/contract/responses/index.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js +2 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observers.js +2 -0
- package/dist/presentation/ipc/contract/responses/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/processes.js +2 -0
- package/dist/presentation/ipc/contract/responses/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/queue.js +2 -0
- package/dist/presentation/ipc/contract/responses/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/repositories.js +2 -0
- package/dist/presentation/ipc/contract/responses/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/runs.js +2 -0
- package/dist/presentation/ipc/contract/responses/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/stats.js +67 -0
- package/dist/presentation/ipc/contract/responses/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/tags.js +2 -0
- package/dist/presentation/ipc/contract/responses/tags.js.map +1 -0
- package/dist/presentation/ipc/contract/runs.js +118 -0
- package/dist/presentation/ipc/contract/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/stats/stats.js +20 -0
- package/dist/presentation/ipc/contract/stats/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/tags.js +40 -0
- package/dist/presentation/ipc/contract/tags.js.map +1 -0
- package/dist/presentation/ipc/handlers/config.js +39 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -0
- package/dist/presentation/ipc/handlers/groups.js +22 -0
- package/dist/presentation/ipc/handlers/groups.js.map +1 -0
- package/dist/presentation/ipc/handlers/index.js +2 -0
- package/dist/presentation/ipc/handlers/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/observers.js +14 -0
- package/dist/presentation/ipc/handlers/observers.js.map +1 -0
- package/dist/presentation/ipc/handlers/queue.js +36 -0
- package/dist/presentation/ipc/handlers/queue.js.map +1 -0
- package/dist/presentation/ipc/handlers/repositories.js +26 -0
- package/dist/presentation/ipc/handlers/repositories.js.map +1 -0
- package/dist/presentation/ipc/handlers/runs.js +55 -0
- package/dist/presentation/ipc/handlers/runs.js.map +1 -0
- package/dist/presentation/ipc/handlers/stats.js +17 -0
- package/dist/presentation/ipc/handlers/stats.js.map +1 -0
- package/dist/presentation/ipc/handlers/system.js +40 -0
- package/dist/presentation/ipc/handlers/system.js.map +1 -0
- package/dist/presentation/ipc/handlers/table.js +25 -0
- package/dist/presentation/ipc/handlers/table.js.map +1 -0
- package/dist/presentation/ipc/handlers/types.js +2 -0
- package/dist/presentation/ipc/handlers/types.js.map +1 -0
- package/dist/presentation/ipc/publisher.js +176 -0
- package/dist/presentation/ipc/publisher.js.map +1 -0
- package/dist/presentation/ipc/server.js +164 -0
- package/dist/presentation/ipc/server.js.map +1 -0
- package/dist/presentation/ipc/services.js +2 -0
- package/dist/presentation/ipc/services.js.map +1 -0
- package/dist/presentation/ipc/snapshots.js +60 -0
- package/dist/presentation/ipc/snapshots.js.map +1 -0
- package/dist/presentation/ipc/views/catalog.js +9 -0
- package/dist/presentation/ipc/views/catalog.js.map +1 -0
- package/dist/presentation/ipc/views/groups.js +112 -0
- package/dist/presentation/ipc/views/groups.js.map +1 -0
- package/dist/presentation/ipc/views/index.js +11 -0
- package/dist/presentation/ipc/views/index.js.map +1 -0
- package/dist/presentation/ipc/views/observer-history.js +26 -0
- package/dist/presentation/ipc/views/observer-history.js.map +1 -0
- package/dist/presentation/ipc/views/observers.js +16 -0
- package/dist/presentation/ipc/views/observers.js.map +1 -0
- package/dist/presentation/ipc/views/queue.js +155 -0
- package/dist/presentation/ipc/views/queue.js.map +1 -0
- package/dist/presentation/ipc/views/repositories.js +34 -0
- package/dist/presentation/ipc/views/repositories.js.map +1 -0
- package/dist/presentation/ipc/views/rows.js +117 -0
- package/dist/presentation/ipc/views/rows.js.map +1 -0
- package/dist/presentation/ipc/views/run-stages.js +66 -0
- package/dist/presentation/ipc/views/run-stages.js.map +1 -0
- package/dist/presentation/ipc/views/runs.js +201 -0
- package/dist/presentation/ipc/views/runs.js.map +1 -0
- package/dist/presentation/ipc/views/stats.js +5 -0
- package/dist/presentation/ipc/views/stats.js.map +1 -0
- package/dist/presentation/ipc/views/tags.js +19 -0
- package/dist/presentation/ipc/views/tags.js.map +1 -0
- package/dist/presentation/mcp/host-kit.js +67 -0
- package/dist/presentation/mcp/host-kit.js.map +1 -0
- package/dist/presentation/mcp/host-queue-control.js +135 -0
- package/dist/presentation/mcp/host-queue-control.js.map +1 -0
- package/dist/presentation/mcp/host-queue.js +124 -0
- package/dist/presentation/mcp/host-queue.js.map +1 -0
- package/dist/presentation/mcp/host-runs.js +173 -0
- package/dist/presentation/mcp/host-runs.js.map +1 -0
- package/dist/presentation/mcp/host.js +34 -0
- package/dist/presentation/mcp/host.js.map +1 -0
- package/dist/presentation/mcp/index.js +3 -0
- package/dist/presentation/mcp/index.js.map +1 -0
- package/dist/presentation/mcp/tools.js +19 -0
- package/dist/presentation/mcp/tools.js.map +1 -0
- package/dist/presentation/mcp/worker-extra.js +144 -0
- package/dist/presentation/mcp/worker-extra.js.map +1 -0
- package/dist/presentation/mcp/worker-read.js +45 -0
- package/dist/presentation/mcp/worker-read.js.map +1 -0
- package/dist/presentation/mcp/worker-tools.js +107 -0
- package/dist/presentation/mcp/worker-tools.js.map +1 -0
- package/dist/presentation/mcp/worker.js +14 -0
- package/dist/presentation/mcp/worker.js.map +1 -0
- package/dist/presentation/web/errors.js +60 -0
- package/dist/presentation/web/errors.js.map +1 -0
- package/dist/presentation/web/http.js +130 -0
- package/dist/presentation/web/http.js.map +1 -0
- package/dist/presentation/web/hub.js +168 -0
- package/dist/presentation/web/hub.js.map +1 -0
- package/dist/presentation/web/index.js +7 -0
- package/dist/presentation/web/index.js.map +1 -0
- package/dist/presentation/web/options.js +7 -0
- package/dist/presentation/web/options.js.map +1 -0
- package/dist/presentation/web/pages.js +44 -0
- package/dist/presentation/web/pages.js.map +1 -0
- package/dist/presentation/web/panel/daemon-panel.js +207 -0
- package/dist/presentation/web/panel/daemon-panel.js.map +1 -0
- package/dist/presentation/web/panel/default-repository.js +14 -0
- package/dist/presentation/web/panel/default-repository.js.map +1 -0
- package/dist/presentation/web/panel/directories.js +48 -0
- package/dist/presentation/web/panel/directories.js.map +1 -0
- package/dist/presentation/web/panel/open.js +12 -0
- package/dist/presentation/web/panel/open.js.map +1 -0
- package/dist/presentation/web/panel/standby.js +119 -0
- package/dist/presentation/web/panel/standby.js.map +1 -0
- package/dist/presentation/web/panel/state.js +69 -0
- package/dist/presentation/web/panel/state.js.map +1 -0
- package/dist/presentation/web/panel/system.js +67 -0
- package/dist/presentation/web/panel/system.js.map +1 -0
- package/dist/presentation/web/request.js +150 -0
- package/dist/presentation/web/request.js.map +1 -0
- package/dist/presentation/web/routes/config.js +171 -0
- package/dist/presentation/web/routes/config.js.map +1 -0
- package/dist/presentation/web/routes/downloads.js +65 -0
- package/dist/presentation/web/routes/downloads.js.map +1 -0
- package/dist/presentation/web/routes/groups.js +85 -0
- package/dist/presentation/web/routes/groups.js.map +1 -0
- package/dist/presentation/web/routes/observers/history.js +19 -0
- package/dist/presentation/web/routes/observers/history.js.map +1 -0
- package/dist/presentation/web/routes/processes.js +21 -0
- package/dist/presentation/web/routes/processes.js.map +1 -0
- package/dist/presentation/web/routes/queue.js +80 -0
- package/dist/presentation/web/routes/queue.js.map +1 -0
- package/dist/presentation/web/routes/repositories.js +66 -0
- package/dist/presentation/web/routes/repositories.js.map +1 -0
- package/dist/presentation/web/routes/runs.js +76 -0
- package/dist/presentation/web/routes/runs.js.map +1 -0
- package/dist/presentation/web/routes/settings.js +74 -0
- package/dist/presentation/web/routes/settings.js.map +1 -0
- package/dist/presentation/web/routes/specialists.js +74 -0
- package/dist/presentation/web/routes/specialists.js.map +1 -0
- package/dist/presentation/web/routes/stats/stats.js +22 -0
- package/dist/presentation/web/routes/stats/stats.js.map +1 -0
- package/dist/presentation/web/routes/system.js +96 -0
- package/dist/presentation/web/routes/system.js.map +1 -0
- package/dist/presentation/web/routes/tags.js +46 -0
- package/dist/presentation/web/routes/tags.js.map +1 -0
- package/dist/presentation/web/routes/types.js +2 -0
- package/dist/presentation/web/routes/types.js.map +1 -0
- package/dist/presentation/web/server.js +187 -0
- package/dist/presentation/web/server.js.map +1 -0
- package/dist/web/assets/FilterColumn-BCMp-JO4.js +1 -0
- package/dist/web/assets/SharedPipelinesGroup-DJRGFtzx.js +1 -0
- package/dist/web/assets/badge-C_7kALlW.js +1 -0
- package/dist/web/assets/card-C9eXOVuF.js +1 -0
- package/dist/web/assets/deliveryModes-funlvXVC.js +1 -0
- package/dist/web/assets/empty-ACC2KkXk.js +41 -0
- package/dist/web/assets/index-CsVQUXJH.js +21 -0
- package/dist/web/assets/index-Ds1nt_qm.css +2 -0
- package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/assets/locales-fB1w2oER.js +1 -0
- package/dist/web/assets/pipelines-DLioOiRN.css +1 -0
- package/dist/web/assets/pipelines-DQglwIkL.js +10 -0
- package/dist/web/assets/queue-CAuAo--6.js +16 -0
- package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/web/assets/select-BSqaxwh1.js +1 -0
- package/dist/web/assets/settingFields-DVg9TQK2.js +1 -0
- package/dist/web/assets/settings-6eHKYbS7.js +2 -0
- package/dist/web/assets/skeleton-CfLYGtNX.js +1 -0
- package/dist/web/assets/specialists-Durm0DgK.js +1 -0
- package/dist/web/assets/stats-67akPa3A.js +1 -0
- package/dist/web/assets/topology-DQu3su19.js +1 -0
- package/dist/web/assets/trash-ChYI9ms1.js +1 -0
- package/dist/web/assets/useListDrag-0GPS1X83.js +1 -0
- package/dist/web/assets/vendor-markdown-DwXfjc7L.js +32 -0
- package/dist/web/assets/vendor-react-C1iE8mnY.js +9 -0
- package/dist/web/index.html +22 -0
- package/integrations/claude-code/.claude-plugin/plugin.json +19 -0
- package/integrations/claude-code/commands/apply.md +6 -0
- package/integrations/claude-code/commands/panel.md +6 -0
- package/integrations/claude-code/commands/run.md +6 -0
- package/integrations/claude-code/commands/status.md +6 -0
- package/integrations/claude-code/commands/web.md +6 -0
- package/integrations/claude-code/hooks/aip.ts +365 -0
- package/integrations/claude-code/hooks/feed.ts +923 -0
- package/integrations/claude-code/hooks/hooks.json +1 -0
- package/integrations/claude-code/hooks/pane.ts +396 -0
- package/integrations/claude-code/hooks/register.tsx +156 -0
- package/integrations/claude-code/hooks/theme.ts +59 -0
- package/integrations/claude-code/hooks/transcript.tsx +44 -0
- package/integrations/claude-code/hooks/view.tsx +378 -0
- package/integrations/claude-code/hooks/web.ts +162 -0
- package/integrations/claude-code/tsconfig.json +18 -0
- package/integrations/claude-code/types/index.d.ts +89 -0
- package/package.json +70 -4
- package/templates/aip/pipelines/feature.yaml +4 -0
- package/templates/aip/settings.yaml +10 -0
- package/templates/aip/specialists/coder.yaml +4 -0
- package/templates/aip/specialists/reviewer.yaml +5 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync, } from 'node:fs';
|
|
3
|
+
import { basename, dirname, join, relative, resolve } from 'node:path';
|
|
4
|
+
import { Document, isMap, isScalar, parseDocument, Scalar, visit } from 'yaml';
|
|
5
|
+
import { isMapping, isValidSlug, LEGACY_PIPELINES_DIR, SETTINGS_NAME, SLUG_PATTERN_TEXT, } from '../../swarm-config/types/index.js';
|
|
6
|
+
import { key } from '../types/editor.js';
|
|
7
|
+
import { ConfigEditError, KIND_DIRECTORY, } from '../types/editor.js';
|
|
8
|
+
/** sha256 of the content of a file; null for a file that does not exist. */
|
|
9
|
+
export function revisionOf(text) {
|
|
10
|
+
return text === undefined ? null : createHash('sha256').update(text).digest('hex');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The file of an entry on a level: `specialists/<id>.yaml` (`pipelines/<id>.yaml`) in the directory of the level, or the
|
|
14
|
+
* `.yml` file when that one exists. The id must be a slug, so the path cannot leave the directory of the kind.
|
|
15
|
+
*/
|
|
16
|
+
export function entryFile(paths, kind, id, level = 'project') {
|
|
17
|
+
if (!isValidSlug(id))
|
|
18
|
+
throw new ConfigEditError(`id must match ${SLUG_PATTERN_TEXT}`);
|
|
19
|
+
let directory = resolve(paths[level].directory, KIND_DIRECTORY[kind]);
|
|
20
|
+
const yaml = join(directory, `${id}.yaml`);
|
|
21
|
+
const yml = join(directory, `${id}.yml`);
|
|
22
|
+
let file = !existsSync(yaml) && existsSync(yml) ? yml : yaml;
|
|
23
|
+
if (kind === 'pipeline' && !existsSync(yaml) && !existsSync(yml)) {
|
|
24
|
+
const legacyDirectory = resolve(paths[level].directory, LEGACY_PIPELINES_DIR);
|
|
25
|
+
const legacyYaml = join(legacyDirectory, `${id}.yaml`);
|
|
26
|
+
const legacyYml = join(legacyDirectory, `${id}.yml`);
|
|
27
|
+
if (existsSync(legacyYaml) || existsSync(legacyYml)) {
|
|
28
|
+
directory = legacyDirectory;
|
|
29
|
+
file = existsSync(legacyYaml) ? legacyYaml : legacyYml;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const inside = relative(directory, resolve(file));
|
|
33
|
+
if (inside.startsWith('..') || inside !== basename(file)) {
|
|
34
|
+
throw new ConfigEditError('the file must be inside the directory of its kind');
|
|
35
|
+
}
|
|
36
|
+
return file;
|
|
37
|
+
}
|
|
38
|
+
/** Deep equality of parsed YAML values; the order of keys of a mapping does not matter. */
|
|
39
|
+
export function sameValue(left, right) {
|
|
40
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
41
|
+
return (Array.isArray(left) &&
|
|
42
|
+
Array.isArray(right) &&
|
|
43
|
+
left.length === right.length &&
|
|
44
|
+
left.every((item, index) => sameValue(item, right[index])));
|
|
45
|
+
}
|
|
46
|
+
if (isMapping(left) && isMapping(right)) {
|
|
47
|
+
const keys = Object.keys(left);
|
|
48
|
+
return (keys.length === Object.keys(right).length &&
|
|
49
|
+
keys.every((key) => key in right && sameValue(left[key], right[key])));
|
|
50
|
+
}
|
|
51
|
+
return left === right;
|
|
52
|
+
}
|
|
53
|
+
function literalMultiline(node) {
|
|
54
|
+
visit(node, {
|
|
55
|
+
Scalar(_, scalar) {
|
|
56
|
+
if (typeof scalar.value === 'string' && scalar.value.includes('\n')) {
|
|
57
|
+
scalar.type = Scalar.BLOCK_LITERAL;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Text of a file with `value` as its content. Only the changed keys are touched, so comments, key
|
|
64
|
+
* order and the formatting of the other keys survive; keys missing from `value` are removed.
|
|
65
|
+
*/
|
|
66
|
+
export function editDocument(text, value) {
|
|
67
|
+
if (text === undefined || text.trim() === '') {
|
|
68
|
+
const fresh = new Document(value);
|
|
69
|
+
literalMultiline(fresh);
|
|
70
|
+
const body = fresh.toString({ lineWidth: 0 });
|
|
71
|
+
return Object.keys(value).length === 0 ? '{}\n' : `${text ?? ''}${body}`;
|
|
72
|
+
}
|
|
73
|
+
const document = parseDocument(text, { merge: true, uniqueKeys: true });
|
|
74
|
+
if (document.errors.length > 0) {
|
|
75
|
+
throw new ConfigEditError(`the file has a syntax error: ${document.errors[0]?.message ?? ''}`);
|
|
76
|
+
}
|
|
77
|
+
if (!isMap(document.contents))
|
|
78
|
+
document.contents = document.createNode({});
|
|
79
|
+
const current = (document.toJS({ maxAliasCount: 100 }) ?? {});
|
|
80
|
+
const map = document.contents;
|
|
81
|
+
if (!isMap(map))
|
|
82
|
+
throw new ConfigEditError('the file must contain a mapping');
|
|
83
|
+
for (const key of Object.keys(current)) {
|
|
84
|
+
if (!(key in value) && document.has(key))
|
|
85
|
+
document.delete(key);
|
|
86
|
+
}
|
|
87
|
+
for (const [key, next] of Object.entries(value)) {
|
|
88
|
+
const oldSplit = key === 'split' && isMapping(current[key]) && 'workflow' in current[key];
|
|
89
|
+
if (!oldSplit && sameValue(current[key], next))
|
|
90
|
+
continue;
|
|
91
|
+
const existing = document.get(key, true);
|
|
92
|
+
if (isScalar(existing) && (typeof next === 'string' || typeof next === 'number')) {
|
|
93
|
+
existing.value = next;
|
|
94
|
+
existing.type =
|
|
95
|
+
typeof next === 'string' && next.includes('\n') ? Scalar.BLOCK_LITERAL : undefined;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const node = document.createNode(next);
|
|
99
|
+
literalMultiline(node);
|
|
100
|
+
document.set(key, node);
|
|
101
|
+
}
|
|
102
|
+
return document.toString({ lineWidth: 0 });
|
|
103
|
+
}
|
|
104
|
+
export function readText(file) {
|
|
105
|
+
try {
|
|
106
|
+
return readFileSync(file, 'utf8');
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
if (error.code === 'ENOENT')
|
|
110
|
+
return undefined;
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** `settings.yaml` of the level, or `settings.yml` when only that one exists. */
|
|
115
|
+
export function settingsFile(paths, level = 'global') {
|
|
116
|
+
const directory = resolve(paths[level].directory);
|
|
117
|
+
const yaml = join(directory, `${SETTINGS_NAME}.yaml`);
|
|
118
|
+
const yml = join(directory, `${SETTINGS_NAME}.yml`);
|
|
119
|
+
return !existsSync(yaml) && existsSync(yml) ? yml : yaml;
|
|
120
|
+
}
|
|
121
|
+
/** Writes a plan: a temporary file next to the target, then a rename; deletion is an unlink. */
|
|
122
|
+
export function commitEdit(plan) {
|
|
123
|
+
if (plan.text === null) {
|
|
124
|
+
unlinkSync(plan.file);
|
|
125
|
+
return { file: plan.file, revision: null };
|
|
126
|
+
}
|
|
127
|
+
mkdirSync(dirname(plan.file), { recursive: true });
|
|
128
|
+
const temporary = join(dirname(plan.file), `.${basename(plan.file)}.tmp-${process.pid}`);
|
|
129
|
+
try {
|
|
130
|
+
writeFileSync(temporary, plan.text);
|
|
131
|
+
renameSync(temporary, plan.file);
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
try {
|
|
135
|
+
unlinkSync(temporary);
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// nothing was written
|
|
139
|
+
}
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
return { file: plan.file, revision: plan.revision };
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/repositories/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,aA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,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
2
|
+
import { pipelineTopologies, pipelineTopology } from '../../runs/types/index.js';
|
|
3
|
+
import { ConfigLoadError, configLoadErrors, defaultRuntimes, } from '../../swarm-config/types/index.js';
|
|
4
|
+
import { ConfigEditError, systemStagesOf, } from '../types/index.js';
|
|
5
|
+
import { commitEdit } from '../repositories/documents.js';
|
|
6
|
+
import { editorView } from './editor-view.js';
|
|
7
|
+
import { draftConfig, planEdit } from './plan-edit.js';
|
|
8
|
+
import { planSettings } from './plan-settings.js';
|
|
9
|
+
/** A plan of the editor; its own errors become a refusal of the request. */
|
|
10
|
+
function planned(plan) {
|
|
11
|
+
try {
|
|
12
|
+
return plan();
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
if (error instanceof ConfigEditError)
|
|
16
|
+
throw rejected(error.message);
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** What the configuration editor of the panel reads and writes for one repository. */
|
|
21
|
+
export class ConfigEditService {
|
|
22
|
+
dependencies;
|
|
23
|
+
constructor(dependencies) {
|
|
24
|
+
this.dependencies = dependencies;
|
|
25
|
+
}
|
|
26
|
+
async view(path) {
|
|
27
|
+
const repository = await this.dependencies.registry.rootOf(path);
|
|
28
|
+
return { repository, ...editorView(this.dependencies.config.pathsOf(repository)) };
|
|
29
|
+
}
|
|
30
|
+
/** Tools and skills a specialist of the repository can name. */
|
|
31
|
+
async catalog(path) {
|
|
32
|
+
const { config, registry, agents } = this.dependencies;
|
|
33
|
+
const repository = await registry.rootOf(path);
|
|
34
|
+
let mcpInherited = false;
|
|
35
|
+
try {
|
|
36
|
+
mcpInherited = config.load(repository).claude.mcp === 'inherit';
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
mcpInherited = false;
|
|
40
|
+
}
|
|
41
|
+
return { repository, mcpInherited, runtimes: agents.catalog(repository, config.home()) };
|
|
42
|
+
}
|
|
43
|
+
/** The models of every runtime for the repository; cached by the daemon until `refresh`. */
|
|
44
|
+
async models(path, refresh) {
|
|
45
|
+
const { config, registry, agents } = this.dependencies;
|
|
46
|
+
const repository = await registry.rootOf(path);
|
|
47
|
+
let settings = defaultRuntimes();
|
|
48
|
+
try {
|
|
49
|
+
settings = config.load(repository).runtimes;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
settings = defaultRuntimes();
|
|
53
|
+
}
|
|
54
|
+
return { repository, runtimes: await agents.models(repository, settings, refresh) };
|
|
55
|
+
}
|
|
56
|
+
/** Check and write run without an await between them, so two edits never interleave. */
|
|
57
|
+
async edit(path, edit) {
|
|
58
|
+
const { config, registry, shared, changed } = this.dependencies;
|
|
59
|
+
const repository = await registry.rootOf(path);
|
|
60
|
+
const plan = planned(() => planEdit(config.pathsOf(repository), edit));
|
|
61
|
+
if (!plan.ok)
|
|
62
|
+
return plan;
|
|
63
|
+
if ((edit.kind === 'specialist' || edit.kind === 'pipeline') &&
|
|
64
|
+
edit.value === null &&
|
|
65
|
+
edit.level === 'global') {
|
|
66
|
+
const references = edit.kind === 'specialist'
|
|
67
|
+
? shared.specialistUsageOf(repository, edit.id)
|
|
68
|
+
: shared.pipelineUsageOf(repository, edit.id);
|
|
69
|
+
if (references.length > 0)
|
|
70
|
+
return { ok: false, reason: 'invalid', errors: [], references };
|
|
71
|
+
}
|
|
72
|
+
const result = { ok: true, ...commitEdit(plan) };
|
|
73
|
+
changed.configChanged(repository);
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
async settings(params) {
|
|
77
|
+
const { config, registry, changed } = this.dependencies;
|
|
78
|
+
const repository = await registry.rootOf(params.repository);
|
|
79
|
+
const plan = planned(() => planSettings(config.pathsOf(repository), {
|
|
80
|
+
values: params.values,
|
|
81
|
+
revision: params.revision,
|
|
82
|
+
level: params.level,
|
|
83
|
+
}));
|
|
84
|
+
if (!plan.ok)
|
|
85
|
+
return plan;
|
|
86
|
+
const result = { ok: true, ...commitEdit(plan) };
|
|
87
|
+
changed.configChanged(repository);
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
/** The graph of a pipeline as it would be with the draft value. */
|
|
91
|
+
async preview(params) {
|
|
92
|
+
const repository = await this.dependencies.registry.rootOf(params.repository);
|
|
93
|
+
const { config, errors } = draftConfig(this.dependencies.config.pathsOf(repository), {
|
|
94
|
+
kind: params.kind,
|
|
95
|
+
id: params.id,
|
|
96
|
+
value: params.value,
|
|
97
|
+
level: params.level ?? 'project',
|
|
98
|
+
});
|
|
99
|
+
return { topology: config ? pipelineTopology(config, params.id) : null, errors };
|
|
100
|
+
}
|
|
101
|
+
async pipelines(path) {
|
|
102
|
+
const repository = await this.dependencies.registry.rootOf(path);
|
|
103
|
+
try {
|
|
104
|
+
const config = this.dependencies.config.load(repository);
|
|
105
|
+
return { repository, pipelines: pipelineTopologies(config), errors: [] };
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (!(error instanceof ConfigLoadError))
|
|
109
|
+
throw error;
|
|
110
|
+
return { repository, pipelines: [], errors: configLoadErrors(error) };
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/** The built-in stages of the pipeline with their tasks and the settings that apply. */
|
|
114
|
+
async systemStages(path) {
|
|
115
|
+
const repository = await this.dependencies.registry.rootOf(path);
|
|
116
|
+
const paths = this.dependencies.config.pathsOf(repository);
|
|
117
|
+
try {
|
|
118
|
+
const config = this.dependencies.config.load(repository);
|
|
119
|
+
const settings = new Map(editorView(paths).settings.map((setting) => [setting.path, setting]));
|
|
120
|
+
return { repository, stages: systemStagesOf(config, settings), errors: [] };
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
if (!(error instanceof ConfigLoadError))
|
|
124
|
+
throw error;
|
|
125
|
+
return { repository, stages: [], errors: configLoadErrors(error) };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=config-edits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-edits.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/config-edits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAI7D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEjF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,eAAe,EACf,cAAc,GASf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWlD,4EAA4E;AAC5E,SAAS,OAAO,CAAI,IAAa;IAC/B,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,eAAe;YAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,MAAM,OAAO,iBAAiB;IACX,YAAY,CAAyB;IAEtD,YAAY,YAAoC;QAC9C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY;QACrB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjE,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,YAAY,CA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AAE,CAAC;QAC9E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,eAAe,CAAC;gBAAE,MAAM,KAAK,CAAC;YACrD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QACrE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigEditService } from './config-edits.js';
|
|
2
|
+
import { SharedConfigService } from './shared-config.js';
|
|
3
|
+
export function createSwarmEditServices(dependencies) {
|
|
4
|
+
const shared = new SharedConfigService(dependencies);
|
|
5
|
+
return { edits: new ConfigEditService({ ...dependencies, shared }), shared };
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/create.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAOzD,MAAM,UAAU,uBAAuB,CAAC,YAKvC;IACC,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACrD,OAAO,EAAE,KAAK,EAAE,IAAI,iBAAiB,CAAC,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { key } from '../types/editor.js';
|
|
2
|
+
import { loadNetworkSettings, loadRuntimeSettings, loadStatsSettings, loadWebSettings, mergeOrigins, validateConfig, } from '../../swarm-config/services/index.js';
|
|
3
|
+
import { ConfigLoadError, defaultNetwork, defaultRuntimes, defaultStats, defaultWeb, formatDuration, isMapping, redactProxy, RUNTIMES, } from '../../swarm-config/types/index.js';
|
|
4
|
+
import { emptyLevel, resolution } from './levels.js';
|
|
5
|
+
import {} from '../types/editor.js';
|
|
6
|
+
import { settingFieldOf } from '../types/setting-fields.js';
|
|
7
|
+
function settingsOf(config) {
|
|
8
|
+
return [
|
|
9
|
+
['max', config.max],
|
|
10
|
+
['workspace_dir', config.workspaceDir],
|
|
11
|
+
['outside_changes', config.outsideChanges],
|
|
12
|
+
['defaults.runtime', config.defaults.runtime],
|
|
13
|
+
['defaults.permissions', config.defaults.permissions],
|
|
14
|
+
['defaults.timeout', formatDuration(config.defaults.timeoutSeconds)],
|
|
15
|
+
['defaults.allow_commands', config.defaults.allowCommands],
|
|
16
|
+
['defaults.tools', config.defaults.tools],
|
|
17
|
+
['claude.edit_mode', config.claude.editMode],
|
|
18
|
+
['claude.mcp', config.claude.mcp],
|
|
19
|
+
['claude.settings', config.claude.settings],
|
|
20
|
+
['delivery.mode', config.delivery.mode],
|
|
21
|
+
['delivery.auto', config.delivery.auto],
|
|
22
|
+
['delivery.keep', config.delivery.keep],
|
|
23
|
+
['delivery.commit_message', config.delivery.commitMessage],
|
|
24
|
+
['delivery.message_specialist', config.delivery.messageSpecialist],
|
|
25
|
+
['delivery.resolver', config.delivery.resolver],
|
|
26
|
+
['delivery.resolver_rounds', config.delivery.resolverRounds],
|
|
27
|
+
['delivery.message_prompt', config.delivery.messagePrompt ?? null],
|
|
28
|
+
['delivery.resolver_prompt', config.delivery.resolverPrompt ?? null],
|
|
29
|
+
['workspace.base', config.workspace.base],
|
|
30
|
+
['workspace.include', config.workspace.include],
|
|
31
|
+
['naming.enabled', config.naming.enabled],
|
|
32
|
+
['naming.runtime', config.naming.runtime],
|
|
33
|
+
['naming.model', config.naming.model],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* `web.*`, `network.*` and `runtimes.*` as the daemon reads them: from the global settings.yaml only. The value
|
|
38
|
+
* of `env` never leaves the config layer: only the sorted names of the variables do.
|
|
39
|
+
*/
|
|
40
|
+
function globalSectionSettings(paths, global) {
|
|
41
|
+
const file = global.settings?.path ?? null;
|
|
42
|
+
const root = isMapping(global.settings?.value) ? global.settings.value : {};
|
|
43
|
+
const has = (section, ...keys) => {
|
|
44
|
+
let node = root[section];
|
|
45
|
+
for (const key of keys) {
|
|
46
|
+
if (!isMapping(node) || !(key in node))
|
|
47
|
+
return false;
|
|
48
|
+
node = node[key];
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
};
|
|
52
|
+
const originOf = (section, ...keys) => (has(section, ...keys) ? file : null);
|
|
53
|
+
const safe = (read, fallback) => {
|
|
54
|
+
try {
|
|
55
|
+
return read();
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (error instanceof ConfigLoadError)
|
|
59
|
+
return fallback();
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const web = safe(() => loadWebSettings(paths), defaultWeb);
|
|
64
|
+
const runtimes = safe(() => loadRuntimeSettings(paths), defaultRuntimes);
|
|
65
|
+
const network = safe(() => loadNetworkSettings(paths), defaultNetwork);
|
|
66
|
+
const stats = safe(() => loadStatsSettings(paths), defaultStats);
|
|
67
|
+
return sectionValues(web, runtimes, network, stats).map(([path, value]) => ({
|
|
68
|
+
path,
|
|
69
|
+
value,
|
|
70
|
+
file: originOf(...path.split('.')),
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
/** `web.*` and `runtimes.*` values as pairs; the value of `env` is reduced to the sorted names. */
|
|
74
|
+
function sectionValues(web, runtimes, network, stats) {
|
|
75
|
+
const result = [
|
|
76
|
+
['web.autostart', web.autostart],
|
|
77
|
+
['web.auth', web.auth],
|
|
78
|
+
['web.host', web.host],
|
|
79
|
+
['web.port', web.port],
|
|
80
|
+
['network.enabled', network.enabled],
|
|
81
|
+
['network.targets', network.targets],
|
|
82
|
+
['network.interfaces', network.interfaces],
|
|
83
|
+
['network.proxy', network.proxy === null ? null : redactProxy(network.proxy)],
|
|
84
|
+
['network.interval', network.interval],
|
|
85
|
+
['network.timeout', network.timeout],
|
|
86
|
+
['stats.enabled', stats.enabled],
|
|
87
|
+
['stats.exclude', stats.exclude],
|
|
88
|
+
['stats.show_cost', stats.showCost],
|
|
89
|
+
];
|
|
90
|
+
for (const runtime of RUNTIMES) {
|
|
91
|
+
const command = runtimes[runtime];
|
|
92
|
+
result.push([`runtimes.${runtime}.enabled`, command.enabled ?? false], [`runtimes.${runtime}.command`, command.command], [`runtimes.${runtime}.args`, command.args], [`runtimes.${runtime}.env`, Object.keys(command.env).sort()]);
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
/** Settings that are not valid are shown with the defaults, the errors say what is wrong. */
|
|
97
|
+
function configOrDefaults(config) {
|
|
98
|
+
if (config)
|
|
99
|
+
return config;
|
|
100
|
+
const result = validateConfig({ swarm: {} });
|
|
101
|
+
if (!result.ok)
|
|
102
|
+
throw new Error('the empty configuration must be valid');
|
|
103
|
+
return result.config;
|
|
104
|
+
}
|
|
105
|
+
function writtenOf(source, path, kind) {
|
|
106
|
+
let node = source?.value;
|
|
107
|
+
for (const part of path.split('.')) {
|
|
108
|
+
if (!isMapping(node) || !(part in node))
|
|
109
|
+
return undefined;
|
|
110
|
+
node = node[part];
|
|
111
|
+
}
|
|
112
|
+
if (path === 'network.proxy' && typeof node === 'string')
|
|
113
|
+
return redactProxy(node);
|
|
114
|
+
return kind === 'env' && isMapping(node) ? Object.keys(node).sort() : node;
|
|
115
|
+
}
|
|
116
|
+
function globalNetwork(paths) {
|
|
117
|
+
try {
|
|
118
|
+
return loadNetworkSettings(paths);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
if (error instanceof ConfigLoadError)
|
|
122
|
+
return defaultNetwork();
|
|
123
|
+
throw error;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/** Whether the proxy URL carries a login or a password. */
|
|
127
|
+
function hasCredentials(network) {
|
|
128
|
+
return network.proxy !== null && redactProxy(network.proxy) !== network.proxy.replace(/\/$/, '');
|
|
129
|
+
}
|
|
130
|
+
export function editorSettings(paths, files, global, project) {
|
|
131
|
+
const { config } = resolution(global, project);
|
|
132
|
+
const origins = mergeOrigins(global, project);
|
|
133
|
+
const base = [
|
|
134
|
+
...settingsOf(configOrDefaults(config)).map(([path, value]) => ({
|
|
135
|
+
path,
|
|
136
|
+
value,
|
|
137
|
+
file: origins.get(`swarm.${path}`) ?? null,
|
|
138
|
+
})),
|
|
139
|
+
...globalSectionSettings(paths, files.global),
|
|
140
|
+
];
|
|
141
|
+
const defaultValues = new Map([
|
|
142
|
+
...settingsOf(configOrDefaults(null)),
|
|
143
|
+
...sectionValues(defaultWeb(), defaultRuntimes(), defaultNetwork(), defaultStats()),
|
|
144
|
+
]);
|
|
145
|
+
const proxyCredentials = hasCredentials(globalNetwork(paths));
|
|
146
|
+
const aloneConfig = resolution(global, emptyLevel()).config;
|
|
147
|
+
const globalValues = new Map(settingsOf(configOrDefaults(aloneConfig)));
|
|
148
|
+
return base.map((entry) => {
|
|
149
|
+
const setting = settingFieldOf(entry.path);
|
|
150
|
+
const written = {};
|
|
151
|
+
const inGlobal = writtenOf(files.global.settings, entry.path, setting.kind);
|
|
152
|
+
const inProject = setting.globalOnly
|
|
153
|
+
? undefined
|
|
154
|
+
: writtenOf(files.project.settings, entry.path, setting.kind);
|
|
155
|
+
if (inGlobal !== undefined)
|
|
156
|
+
written.global = inGlobal;
|
|
157
|
+
if (inProject !== undefined)
|
|
158
|
+
written.project = inProject;
|
|
159
|
+
return {
|
|
160
|
+
...entry,
|
|
161
|
+
kind: setting.kind,
|
|
162
|
+
...(setting.options ? { options: setting.options } : {}),
|
|
163
|
+
...(setting.range ? { range: setting.range } : {}),
|
|
164
|
+
globalOnly: setting.globalOnly,
|
|
165
|
+
defaultValue: defaultValues.get(entry.path),
|
|
166
|
+
globalValue: setting.globalOnly ? entry.value : globalValues.get(entry.path),
|
|
167
|
+
written,
|
|
168
|
+
...(entry.path === 'network.proxy' && proxyCredentials ? { credentials: true } : {}),
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=editor-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-settings.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/editor-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,eAAe,EAGf,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EAIT,WAAW,EAEX,QAAQ,GAIT,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAA2D,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAI5D,SAAS,UAAU,CAAC,MAAsB;IACxC,OAAO;QACL,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC;QACnB,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC;QACtC,CAAC,iBAAiB,EAAE,MAAM,CAAC,cAAc,CAAC;QAC1C,CAAC,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC7C,CAAC,sBAAsB,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC;QACrD,CAAC,kBAAkB,EAAE,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACpE,CAAC,yBAAyB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC;QAC1D,CAAC,gBAAgB,EAAE,MAAM,CAAC,QAA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O;YACL,GAAG,KAAK;YACR,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAC3C,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAC5E,OAAO;YACP,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { assembleLevel, validateConfig } from '../../swarm-config/services/index.js';
|
|
2
|
+
import { formatDuration, isMapping, mergeConfigs, tagsOf, } from '../../swarm-config/types/index.js';
|
|
3
|
+
import { revisionOf, settingsFile } from '../repositories/documents.js';
|
|
4
|
+
import { readLevels, resolution } from './levels.js';
|
|
5
|
+
import { stemOf } from './references.js';
|
|
6
|
+
import {} from '../types/editor.js';
|
|
7
|
+
import { editorSettings } from './editor-settings.js';
|
|
8
|
+
function sourceOf(source) {
|
|
9
|
+
if (!source)
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
file: source.path,
|
|
13
|
+
revision: revisionOf(source.text) ?? '',
|
|
14
|
+
raw: rawOf(source),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function sourcesFor(project, global) {
|
|
18
|
+
const result = {};
|
|
19
|
+
const p = sourceOf(project);
|
|
20
|
+
const g = sourceOf(global);
|
|
21
|
+
if (p)
|
|
22
|
+
result.project = p;
|
|
23
|
+
if (g)
|
|
24
|
+
result.global = g;
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
function valuesOf(specialist) {
|
|
28
|
+
return {
|
|
29
|
+
name: specialist.name,
|
|
30
|
+
runtime: specialist.runtime,
|
|
31
|
+
model: specialist.model,
|
|
32
|
+
variant: specialist.variant ?? null,
|
|
33
|
+
reasoning_effort: specialist.reasoningEffort ?? null,
|
|
34
|
+
permissions: specialist.permissions,
|
|
35
|
+
timeout: formatDuration(specialist.timeoutSeconds),
|
|
36
|
+
allow_commands: specialist.allowCommands,
|
|
37
|
+
tools: specialist.tools,
|
|
38
|
+
skills: specialist.skills,
|
|
39
|
+
prompt: specialist.prompt,
|
|
40
|
+
max: specialist.max,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function rawOf(source) {
|
|
44
|
+
return isMapping(source?.value) ? source.value : {};
|
|
45
|
+
}
|
|
46
|
+
const byStem = (sources) => new Map(sources.map((source) => [stemOf(source.path), source]));
|
|
47
|
+
const levelOf = (inProject, inGlobal) => inProject ? (inGlobal ? 'project_over_global' : 'project') : 'global';
|
|
48
|
+
/** The ids of a kind in both levels with the files that define each. */
|
|
49
|
+
function entriesOf(global, project) {
|
|
50
|
+
const inGlobal = byStem(global);
|
|
51
|
+
const inProject = byStem(project);
|
|
52
|
+
return [...new Set([...inGlobal.keys(), ...inProject.keys()])].sort().map((id) => {
|
|
53
|
+
const own = inProject.get(id);
|
|
54
|
+
const shared = inGlobal.get(id);
|
|
55
|
+
return {
|
|
56
|
+
id,
|
|
57
|
+
level: levelOf(own, shared),
|
|
58
|
+
source: (own ?? shared),
|
|
59
|
+
own,
|
|
60
|
+
shared,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function entryFields(entry) {
|
|
65
|
+
return {
|
|
66
|
+
file: entry.source.path,
|
|
67
|
+
revision: entry.own ? revisionOf(entry.own.text) : null,
|
|
68
|
+
raw: rawOf(entry.source),
|
|
69
|
+
sources: sourcesFor(entry.own, entry.shared),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function editorSpecialists(files, global, project) {
|
|
73
|
+
const { config } = resolution(global, project);
|
|
74
|
+
const merged = mergeConfigs(global.tree, project.tree);
|
|
75
|
+
const swarm = isMapping(merged) && isMapping(merged.swarm) ? merged.swarm : {};
|
|
76
|
+
const defaults = isMapping(swarm.defaults) ? swarm.defaults : {};
|
|
77
|
+
return entriesOf(files.global.specialists, files.project.specialists).map((entry) => {
|
|
78
|
+
const slug = entry.id;
|
|
79
|
+
let effective = null;
|
|
80
|
+
const resolved = config?.specialists.find((candidate) => candidate.slug === slug);
|
|
81
|
+
if (resolved)
|
|
82
|
+
effective = valuesOf(resolved);
|
|
83
|
+
else {
|
|
84
|
+
const alone = validateConfig({
|
|
85
|
+
swarm: { defaults, specialists: { [slug]: entry.source.value ?? null } },
|
|
86
|
+
});
|
|
87
|
+
const found = alone.ok ? alone.config.specialists[0] : undefined;
|
|
88
|
+
if (found)
|
|
89
|
+
effective = valuesOf(found);
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
slug,
|
|
93
|
+
level: entry.level,
|
|
94
|
+
...entryFields(entry),
|
|
95
|
+
effective,
|
|
96
|
+
shared_tags: tagsOf(rawOf(entry.shared)),
|
|
97
|
+
own_tags: tagsOf(rawOf(entry.own)),
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function editorPipelines(files) {
|
|
102
|
+
return entriesOf(files.global.pipelines, files.project.pipelines).map((entry) => ({
|
|
103
|
+
id: entry.id,
|
|
104
|
+
level: entry.level,
|
|
105
|
+
...entryFields(entry),
|
|
106
|
+
shared_tags: tagsOf(rawOf(entry.shared)),
|
|
107
|
+
own_tags: tagsOf(rawOf(entry.own)),
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
function editorActions(files) {
|
|
111
|
+
return entriesOf(files.global.actions, files.project.actions).map((entry) => ({
|
|
112
|
+
id: entry.id,
|
|
113
|
+
level: entry.level,
|
|
114
|
+
...entryFields(entry),
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
function editorChains(files) {
|
|
118
|
+
return entriesOf(files.global.chains, files.project.chains).map((entry) => ({
|
|
119
|
+
slug: entry.id,
|
|
120
|
+
level: entry.level,
|
|
121
|
+
...entryFields(entry),
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
/** Everything the specialists tab shows, also when the configuration does not pass validation. */
|
|
125
|
+
export function editorView(paths) {
|
|
126
|
+
const files = readLevels(paths);
|
|
127
|
+
const global = assembleLevel(files.global);
|
|
128
|
+
const project = assembleLevel(files.project);
|
|
129
|
+
const settingsView = (level) => ({
|
|
130
|
+
file: settingsFile(paths, level),
|
|
131
|
+
revision: revisionOf(files[level].settings?.text),
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
directories: { global: paths.global.directory, project: paths.project.directory },
|
|
135
|
+
settingsFiles: { global: settingsView('global'), project: settingsView('project') },
|
|
136
|
+
specialists: editorSpecialists(files, global, project),
|
|
137
|
+
chains: editorChains(files),
|
|
138
|
+
pipelines: editorPipelines(files),
|
|
139
|
+
actions: editorActions(files),
|
|
140
|
+
settings: editorSettings(paths, files, global, project),
|
|
141
|
+
errors: resolution(global, project).errors,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=editor-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-view.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/editor-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EA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