@hoknie/aip 0.0.0-stage → 0.1.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 +18 -0
- package/dist/app/agents.js.map +1 -0
- package/dist/app/application.js +173 -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 +30 -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 +23 -0
- package/dist/app/timings.js.map +1 -0
- package/dist/app/wiring.js +57 -0
- package/dist/app/wiring.js.map +1 -0
- package/dist/cli/clean.js +71 -0
- package/dist/cli/clean.js.map +1 -0
- package/dist/cli/commands.js +963 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/config-check.js +173 -0
- package/dist/cli/config-check.js.map +1 -0
- package/dist/cli/daemon.js +199 -0
- package/dist/cli/daemon.js.map +1 -0
- package/dist/cli/help.js +50 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/init.js +43 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/io.js +13 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/main.js +31 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/probe.js +12 -0
- package/dist/cli/probe.js.map +1 -0
- package/dist/cli/program.js +48 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/setup.js +406 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/version.js +6 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli/watch.js +24 -0
- package/dist/cli/watch.js.map +1 -0
- package/dist/cli/web/daemon-panel.js +185 -0
- package/dist/cli/web/daemon-panel.js.map +1 -0
- package/dist/cli/web/default-repository.js +12 -0
- package/dist/cli/web/default-repository.js.map +1 -0
- package/dist/cli/web/errors.js +60 -0
- package/dist/cli/web/errors.js.map +1 -0
- package/dist/cli/web/open.js +12 -0
- package/dist/cli/web/open.js.map +1 -0
- package/dist/cli/web/page.js +465 -0
- package/dist/cli/web/page.js.map +1 -0
- package/dist/cli/web/server.js +1191 -0
- package/dist/cli/web/server.js.map +1 -0
- package/dist/cli/web/standby.js +119 -0
- package/dist/cli/web/standby.js.map +1 -0
- package/dist/cli/web/state.js +69 -0
- package/dist/cli/web/state.js.map +1 -0
- package/dist/cli/web/system.js +66 -0
- package/dist/cli/web/system.js.map +1 -0
- package/dist/cli/web-control.js +173 -0
- package/dist/cli/web-control.js.map +1 -0
- package/dist/config/discover.js +25 -0
- package/dist/config/discover.js.map +1 -0
- package/dist/config/duration.js +17 -0
- package/dist/config/duration.js.map +1 -0
- package/dist/config/edit.js +966 -0
- package/dist/config/edit.js.map +1 -0
- package/dist/config/errors.js +29 -0
- package/dist/config/errors.js.map +1 -0
- package/dist/config/index.js +14 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/load.js +412 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/merge.js +45 -0
- package/dist/config/merge.js.map +1 -0
- package/dist/config/model.js +171 -0
- package/dist/config/model.js.map +1 -0
- package/dist/config/paths.js +31 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/prompt.js +33 -0
- package/dist/config/prompt.js.map +1 -0
- package/dist/config/shared-pipelines.js +71 -0
- package/dist/config/shared-pipelines.js.map +1 -0
- package/dist/config/shared-specialists.js +68 -0
- package/dist/config/shared-specialists.js.map +1 -0
- package/dist/config/shared-workflows.js +71 -0
- package/dist/config/shared-workflows.js.map +1 -0
- package/dist/config/specialist-tags.js +214 -0
- package/dist/config/specialist-tags.js.map +1 -0
- package/dist/config/tag-names.js +43 -0
- package/dist/config/tag-names.js.map +1 -0
- package/dist/config/validate.js +872 -0
- package/dist/config/validate.js.map +1 -0
- package/dist/core/artifacts.js +37 -0
- package/dist/core/artifacts.js.map +1 -0
- package/dist/core/create.js +75 -0
- package/dist/core/create.js.map +1 -0
- package/dist/core/delivery.js +366 -0
- package/dist/core/delivery.js.map +1 -0
- package/dist/core/errors.js +7 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/ids.js +99 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/index.js +21 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/input.js +45 -0
- package/dist/core/input.js.map +1 -0
- package/dist/core/machine.js +1021 -0
- package/dist/core/machine.js.map +1 -0
- package/dist/core/model.js +460 -0
- package/dist/core/model.js.map +1 -0
- package/dist/core/observer.js +193 -0
- package/dist/core/observer.js.map +1 -0
- package/dist/core/occupancy.js +63 -0
- package/dist/core/occupancy.js.map +1 -0
- package/dist/core/permissions.js +222 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/plan.js +99 -0
- package/dist/core/plan.js.map +1 -0
- package/dist/core/progress.js +43 -0
- package/dist/core/progress.js.map +1 -0
- package/dist/core/questions.js +19 -0
- package/dist/core/questions.js.map +1 -0
- package/dist/core/queue.js +859 -0
- package/dist/core/queue.js.map +1 -0
- package/dist/core/retryable.js +8 -0
- package/dist/core/retryable.js.map +1 -0
- package/dist/core/scheduler.js +160 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/skip.js +109 -0
- package/dist/core/skip.js.map +1 -0
- package/dist/core/stages.js +304 -0
- package/dist/core/stages.js.map +1 -0
- package/dist/core/summary.js +35 -0
- package/dist/core/summary.js.map +1 -0
- package/dist/core/tags.js +184 -0
- package/dist/core/tags.js.map +1 -0
- package/dist/core/topology.js +162 -0
- package/dist/core/topology.js.map +1 -0
- package/dist/daemon/artifacts.js +84 -0
- package/dist/daemon/artifacts.js.map +1 -0
- package/dist/daemon/daemon.js +1442 -0
- package/dist/daemon/daemon.js.map +1 -0
- package/dist/daemon/executor.js +749 -0
- package/dist/daemon/executor.js.map +1 -0
- package/dist/daemon/helpers.js +38 -0
- package/dist/daemon/helpers.js.map +1 -0
- package/dist/daemon/index.js +4 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/logs.js +69 -0
- package/dist/daemon/logs.js.map +1 -0
- package/dist/daemon/observers.js +93 -0
- package/dist/daemon/observers.js.map +1 -0
- package/dist/daemon/patches.js +76 -0
- package/dist/daemon/patches.js.map +1 -0
- package/dist/daemon/ports.js +2 -0
- package/dist/daemon/ports.js.map +1 -0
- package/dist/daemon/processes.js +98 -0
- package/dist/daemon/processes.js.map +1 -0
- package/dist/daemon/repositories.js +2 -0
- package/dist/daemon/repositories.js.map +1 -0
- package/dist/daemon/server.js +164 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/daemon/supervisor.js +140 -0
- package/dist/daemon/supervisor.js.map +1 -0
- package/dist/daemon/timings.js +23 -0
- package/dist/daemon/timings.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 +114 -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 +5 -0
- package/dist/feature/agents/clients/claude/index.js.map +1 -0
- package/dist/feature/agents/clients/claude/parser.js +221 -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 +116 -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 +4 -0
- package/dist/feature/agents/clients/opencode/index.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 +129 -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/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 +38 -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 +12 -0
- package/dist/feature/agents/types/index.js.map +1 -0
- package/dist/feature/agents/types/message.js +48 -0
- package/dist/feature/agents/types/message.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 +20 -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/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 +28 -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 +178 -0
- package/dist/feature/observers/services/observers.js.map +1 -0
- package/dist/feature/observers/services/settings-check.js +93 -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 +109 -0
- package/dist/feature/observers/types/plan-repairs.js.map +1 -0
- package/dist/feature/observers/types/settings.js +13 -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 +153 -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 +183 -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 +182 -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 +207 -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 +111 -0
- package/dist/feature/runs/machine/plan.js.map +1 -0
- package/dist/feature/runs/machine/repair.js +155 -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 +119 -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 +113 -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 +42 -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 +43 -0
- package/dist/feature/runs/services/create.js.map +1 -0
- package/dist/feature/runs/services/effects/actions.js +150 -0
- package/dist/feature/runs/services/effects/actions.js.map +1 -0
- package/dist/feature/runs/services/effects/attempts.js +179 -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 +62 -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/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 +163 -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 +54 -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 +102 -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 +57 -0
- package/dist/feature/runs/types/input.js.map +1 -0
- package/dist/feature/runs/types/limits.js +151 -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/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 +9 -0
- package/dist/feature/swarm-config/services/index.js.map +1 -0
- package/dist/feature/swarm-config/services/load.js +86 -0
- package/dist/feature/swarm-config/services/load.js.map +1 -0
- package/dist/feature/swarm-config/services/settings.js +50 -0
- package/dist/feature/swarm-config/services/settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-actions.js +117 -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 +212 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-settings.js +177 -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 +174 -0
- package/dist/feature/swarm-config/services/validate.js.map +1 -0
- package/dist/feature/swarm-config/types/action.js +11 -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 +116 -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 +116 -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 +143 -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 +198 -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 +64 -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/git/delivery.js +284 -0
- package/dist/git/delivery.js.map +1 -0
- package/dist/git/index.js +4 -0
- package/dist/git/index.js.map +1 -0
- package/dist/git/runner.js +60 -0
- package/dist/git/runner.js.map +1 -0
- package/dist/git/workspace.js +366 -0
- package/dist/git/workspace.js.map +1 -0
- package/dist/mcp/host.js +401 -0
- package/dist/mcp/host.js.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/tools.js +19 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/version.js +5 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/mcp/worker.js +230 -0
- package/dist/mcp/worker.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/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/index.js +3 -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 +297 -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/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/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 +207 -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 +76 -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 +7 -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 +202 -0
- package/dist/presentation/format/runs.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 +79 -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 +141 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -0
- package/dist/presentation/ipc/contract/envelope.js +97 -0
- package/dist/presentation/ipc/contract/envelope.js.map +1 -0
- package/dist/presentation/ipc/contract/groups.js +48 -0
- package/dist/presentation/ipc/contract/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/index.js +14 -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 +53 -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 +11 -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/tags.js +2 -0
- package/dist/presentation/ipc/contract/responses/tags.js.map +1 -0
- package/dist/presentation/ipc/contract/runs.js +112 -0
- package/dist/presentation/ipc/contract/runs.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 +38 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -0
- package/dist/presentation/ipc/handlers/groups.js +14 -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/system.js +38 -0
- package/dist/presentation/ipc/handlers/system.js.map +1 -0
- package/dist/presentation/ipc/handlers/table.js +23 -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 +175 -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 +10 -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 +151 -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/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-tools.js +107 -0
- package/dist/presentation/mcp/worker-tools.js.map +1 -0
- package/dist/presentation/mcp/worker.js +12 -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 +164 -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 +66 -0
- package/dist/presentation/web/panel/system.js.map +1 -0
- package/dist/presentation/web/request.js +123 -0
- package/dist/presentation/web/request.js.map +1 -0
- package/dist/presentation/web/routes/config.js +166 -0
- package/dist/presentation/web/routes/config.js.map +1 -0
- package/dist/presentation/web/routes/directories.js +60 -0
- package/dist/presentation/web/routes/directories.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/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 +185 -0
- package/dist/presentation/web/server.js.map +1 -0
- package/dist/protocol/autostart.js +171 -0
- package/dist/protocol/autostart.js.map +1 -0
- package/dist/protocol/build.js +38 -0
- package/dist/protocol/build.js.map +1 -0
- package/dist/protocol/catalog.js +18 -0
- package/dist/protocol/catalog.js.map +1 -0
- package/dist/protocol/client.js +83 -0
- package/dist/protocol/client.js.map +1 -0
- package/dist/protocol/format.js +477 -0
- package/dist/protocol/format.js.map +1 -0
- package/dist/protocol/index.js +11 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/messages.js +598 -0
- package/dist/protocol/messages.js.map +1 -0
- package/dist/protocol/style.js +81 -0
- package/dist/protocol/style.js.map +1 -0
- package/dist/protocol/transcript.js +49 -0
- package/dist/protocol/transcript.js.map +1 -0
- package/dist/protocol/views.js +696 -0
- package/dist/protocol/views.js.map +1 -0
- package/dist/runtime/catalog.js +117 -0
- package/dist/runtime/catalog.js.map +1 -0
- package/dist/runtime/claude.js +399 -0
- package/dist/runtime/claude.js.map +1 -0
- package/dist/runtime/index.js +34 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/message.js +48 -0
- package/dist/runtime/message.js.map +1 -0
- package/dist/runtime/naming.js +69 -0
- package/dist/runtime/naming.js.map +1 -0
- package/dist/runtime/opencode.js +189 -0
- package/dist/runtime/opencode.js.map +1 -0
- package/dist/runtime/skills.js +17 -0
- package/dist/runtime/skills.js.map +1 -0
- package/dist/runtime/transcript.js +227 -0
- package/dist/runtime/transcript.js.map +1 -0
- package/dist/runtime/types.js +12 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/which.js +21 -0
- package/dist/runtime/which.js.map +1 -0
- package/dist/store/index.js +3 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/schema.js +286 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/store.js +491 -0
- package/dist/store/store.js.map +1 -0
- package/dist/web/assets/EntryList-CnfGgjEY.js +1 -0
- package/dist/web/assets/FilePath-C0X8-keS.js +1 -0
- package/dist/web/assets/SettingsForm-BcyBWJbn.js +1 -0
- package/dist/web/assets/SharedPipelinesGroup-a368-IQ0.js +1 -0
- package/dist/web/assets/card-DkikoTxR.js +1 -0
- package/dist/web/assets/deliveryModes-funlvXVC.js +1 -0
- package/dist/web/assets/index-B-oJ93zH.js +22 -0
- package/dist/web/assets/index-BZE36gYR.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-DtRrxYzg.js +1 -0
- package/dist/web/assets/pipelines-D48ggDNe.js +1 -0
- package/dist/web/assets/queue-D8_RY4IY.js +16 -0
- package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/web/assets/select-J4oIrmYh.js +1 -0
- package/dist/web/assets/settings-B0-0Vaia.js +2 -0
- package/dist/web/assets/skeleton-CCKCQF5n.js +1 -0
- package/dist/web/assets/specialists-DH8tyluO.js +1 -0
- package/dist/web/assets/switch-CWFAgxG1.js +41 -0
- package/dist/web/assets/topology-CNQ28AB2.js +7 -0
- package/dist/web/assets/topology-DLioOiRN.css +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 +21 -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,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The prompt of a specialist with the task in place of `%s`, then `additional` (the text of the
|
|
3
|
+
* step) as its own paragraph, taken literally.
|
|
4
|
+
*/
|
|
5
|
+
export function buildPrompt(prompt, task, additional = null) {
|
|
6
|
+
const base = substitute(prompt, task);
|
|
7
|
+
const extra = additional?.trim();
|
|
8
|
+
return extra ? `${base.trimEnd()}\n\n${extra}` : base;
|
|
9
|
+
}
|
|
10
|
+
function substitute(prompt, task) {
|
|
11
|
+
if (prompt === null)
|
|
12
|
+
return task;
|
|
13
|
+
let output = '';
|
|
14
|
+
let substituted = false;
|
|
15
|
+
for (let index = 0; index < prompt.length; index += 1) {
|
|
16
|
+
const character = prompt[index];
|
|
17
|
+
const next = prompt[index + 1];
|
|
18
|
+
if (character === '%' && next === '%') {
|
|
19
|
+
output += '%';
|
|
20
|
+
index += 1;
|
|
21
|
+
}
|
|
22
|
+
else if (character === '%' && next === 's') {
|
|
23
|
+
output += task;
|
|
24
|
+
substituted = true;
|
|
25
|
+
index += 1;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
output += character;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return substituted ? output : `${output.trimEnd()}\n\n${task}`;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/types/prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,MAAqB,EACrB,IAAY,EACZ,UAAU,GAAkB,IAAI;IAEhC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,UAAU,EAAE,IAAI,EAAE,CAAC;IACjC,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC;AAED,SAAS,UAAU,CAAC,MAAqB,EAAE,IAAY;IACrD,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC/B,IAAI,SAAS,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,CAAC;YACd,KAAK,IAAI,CAAC,CAAC;QACb,CAAC;aAAM,IAAI,SAAS,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YAC7C,MAAM,IAAI,IAAI,CAAC;YACf,WAAW,GAAG,IAAI,CAAC;YACnB,KAAK,IAAI,CAAC,CAAC;QACb,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,SAAS,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {} from './action.js';
|
|
2
|
+
import {} from './chain.js';
|
|
3
|
+
import {} from './pipeline.js';
|
|
4
|
+
import {} from './specialist.js';
|
|
5
|
+
export const OUTSIDE_CHANGES = ['warn', 'stop', 'off'];
|
|
6
|
+
export const CLAUDE_EDIT_MODES = ['allowlist', 'accept_edits', 'auto'];
|
|
7
|
+
export const CLAUDE_MCP_MODES = ['isolated', 'inherit'];
|
|
8
|
+
/** Whether a specialist reads the user's own Claude Code settings (hooks, plugins, rules). */
|
|
9
|
+
export const CLAUDE_SETTINGS_SOURCES = ['isolated', 'inherit'];
|
|
10
|
+
export const DELIVERY_MODES = ['worktree', 'commit', 'branch'];
|
|
11
|
+
export const DEFAULT_COMMIT_MESSAGE = '{title}\n\n{groups}';
|
|
12
|
+
export const DEFAULT_MAX = 3;
|
|
13
|
+
export const DEFAULT_WORKSPACE_DIR = '.aip';
|
|
14
|
+
export const MAX_RANGE = [1, 32];
|
|
15
|
+
export const WORKSPACE_BASES = ['working_tree', 'head'];
|
|
16
|
+
export const WEB_AUTH_MODES = ['token', 'none'];
|
|
17
|
+
/** Addresses the web panel may listen on: loopback only. */
|
|
18
|
+
export const WEB_HOSTS = ['127.0.0.1', 'localhost', '::1'];
|
|
19
|
+
export const DEFAULT_WEB_PORT = 7341;
|
|
20
|
+
export function defaultWeb() {
|
|
21
|
+
return { autostart: true, auth: 'token', port: DEFAULT_WEB_PORT, host: '127.0.0.1' };
|
|
22
|
+
}
|
|
23
|
+
export function defaultRuntimes() {
|
|
24
|
+
return {
|
|
25
|
+
claude: { command: 'claude', args: [], env: {} },
|
|
26
|
+
opencode: { command: 'opencode', args: [], env: {} },
|
|
27
|
+
agy: { command: 'agy', args: [], env: {} },
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export function defaultNaming() {
|
|
31
|
+
return { enabled: true, runtime: 'claude', model: 'haiku' };
|
|
32
|
+
}
|
|
33
|
+
export function defaultWorkspace() {
|
|
34
|
+
return { base: 'working_tree', include: [] };
|
|
35
|
+
}
|
|
36
|
+
export function defaultDelivery() {
|
|
37
|
+
return {
|
|
38
|
+
mode: 'worktree',
|
|
39
|
+
auto: true,
|
|
40
|
+
keep: false,
|
|
41
|
+
commitMessage: DEFAULT_COMMIT_MESSAGE,
|
|
42
|
+
messageSpecialist: null,
|
|
43
|
+
resolver: null,
|
|
44
|
+
resolverRounds: 1,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function normalizedSplit(split) {
|
|
48
|
+
if (!split)
|
|
49
|
+
return split ?? null;
|
|
50
|
+
const { workflow, ...rest } = split;
|
|
51
|
+
return workflow === undefined ? split : { ...rest, pipeline: rest.pipeline ?? workflow };
|
|
52
|
+
}
|
|
53
|
+
/** Fills settings added after a run was stored, so older runs keep working. */
|
|
54
|
+
export function withConfigDefaults(config) {
|
|
55
|
+
const stored = config;
|
|
56
|
+
// Runs stored before these settings existed started from HEAD and were delivered by hand.
|
|
57
|
+
const workspace = { base: 'head', include: [], ...stored.workspace };
|
|
58
|
+
const delivery = { ...defaultDelivery(), auto: false, ...stored.delivery };
|
|
59
|
+
const naming = { ...defaultNaming(), ...stored.naming };
|
|
60
|
+
const web = { ...defaultWeb(), ...stored.web };
|
|
61
|
+
const defaults = defaultRuntimes();
|
|
62
|
+
const runtimes = {
|
|
63
|
+
claude: { ...defaults.claude, ...stored.runtimes?.claude },
|
|
64
|
+
opencode: { ...defaults.opencode, ...stored.runtimes?.opencode },
|
|
65
|
+
agy: { ...defaults.agy, ...stored.runtimes?.agy },
|
|
66
|
+
};
|
|
67
|
+
const specialists = stored.specialists.map((specialist) => ({
|
|
68
|
+
...specialist,
|
|
69
|
+
max: specialist.max ?? null,
|
|
70
|
+
level: specialist.level ?? 'project',
|
|
71
|
+
}));
|
|
72
|
+
// Runs stored before `claude.settings` existed take the default: no user settings.
|
|
73
|
+
const claude = {
|
|
74
|
+
...stored.claude,
|
|
75
|
+
settings: stored.claude.settings ?? 'isolated',
|
|
76
|
+
};
|
|
77
|
+
// Runs stored before `human_review` existed have no such steps.
|
|
78
|
+
const pipelines = (stored.pipelines ?? stored.workflows ?? []).map((pipeline) => ({
|
|
79
|
+
...pipeline,
|
|
80
|
+
// Snapshots of older builds name the pipeline of a split `workflow`.
|
|
81
|
+
split: normalizedSplit(pipeline.split),
|
|
82
|
+
steps: pipeline.steps.map((step) => ({
|
|
83
|
+
...step,
|
|
84
|
+
humanReview: step.humanReview ?? false,
|
|
85
|
+
})),
|
|
86
|
+
}));
|
|
87
|
+
const chains = (stored.chains ?? []).map((chain) => ({
|
|
88
|
+
...chain,
|
|
89
|
+
level: chain.level ?? 'project',
|
|
90
|
+
enabled: chain.enabled ?? true,
|
|
91
|
+
runtimes: (chain.runtimes ?? []).map((item) => ({
|
|
92
|
+
...item,
|
|
93
|
+
enabled: item.enabled ?? true,
|
|
94
|
+
model: item.model ?? null,
|
|
95
|
+
})),
|
|
96
|
+
}));
|
|
97
|
+
// Runs stored before pipeline actions existed have none.
|
|
98
|
+
const actions = stored.actions ?? [];
|
|
99
|
+
const stages = stored.stages ?? {};
|
|
100
|
+
const { workflows: _old, ...current } = stored;
|
|
101
|
+
return {
|
|
102
|
+
...current,
|
|
103
|
+
workspace,
|
|
104
|
+
delivery,
|
|
105
|
+
naming,
|
|
106
|
+
web,
|
|
107
|
+
runtimes,
|
|
108
|
+
specialists,
|
|
109
|
+
chains,
|
|
110
|
+
claude,
|
|
111
|
+
pipelines,
|
|
112
|
+
actions,
|
|
113
|
+
stages,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/types/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAqB,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAwC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAgD,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAIhE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAU,CAAC;AAIhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,U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AI;YACP,WAAW,EAAG,IAAsB,CAAC,WAAW,IAAI,KAAK;SAC1D,CAAC,CAAC;KACJ,CAAC,CAAC,CAAC;IACJ,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnD,GAAG,KAAK;QACR,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,SAAS;QAC/B,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,IAAI;QAC9B,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9C,GAAG,IAAI;YACP,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI;SAC1B,CAAC,CAAC;KACJ,CAAC,CAAC,CAAC;IACJ,yDAAyD;IACzD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IACnC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,GAAG,OAAO;QACV,SAAS;QACT,QAAQ;QACR,MAAM;QACN,GAAG;QACH,QAAQ;QACR,WAAW;QACX,MAAM;QACN,MAAM;QACN,SAAS;QACT,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const RUNTIMES = ['claude', 'opencode', 'agy'];
|
|
2
|
+
/** Returns a diagnostic for an explicitly configured OpenCode model without modifying it. */
|
|
3
|
+
export function modelIdProblem(runtime, model) {
|
|
4
|
+
if (runtime !== 'opencode' || model === null)
|
|
5
|
+
return null;
|
|
6
|
+
const separator = model.indexOf('/');
|
|
7
|
+
if (separator <= 0 || separator === model.length - 1 || /\s/.test(model)) {
|
|
8
|
+
return `OpenCode model "${model}" must use provider/model format, for example openai/gpt-6.1-sol`;
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
/** OpenCode names a variant only together with a model (`provider/model#variant`). */
|
|
13
|
+
export function variantProblem(runtime, model, variant) {
|
|
14
|
+
if (runtime !== 'opencode' || !variant || model)
|
|
15
|
+
return null;
|
|
16
|
+
return 'needs a model: OpenCode takes a variant only as provider/model#variant';
|
|
17
|
+
}
|
|
18
|
+
export const REASONING_EFFORTS = [
|
|
19
|
+
'none',
|
|
20
|
+
'minimal',
|
|
21
|
+
'low',
|
|
22
|
+
'medium',
|
|
23
|
+
'high',
|
|
24
|
+
'xhigh',
|
|
25
|
+
'max',
|
|
26
|
+
];
|
|
27
|
+
export const PERMISSIONS = ['read', 'edit', 'full'];
|
|
28
|
+
export const DEFAULT_TIMEOUT_SECONDS = 30 * 60;
|
|
29
|
+
export function defaultDefaults() {
|
|
30
|
+
return {
|
|
31
|
+
runtime: 'claude',
|
|
32
|
+
permissions: 'edit',
|
|
33
|
+
timeoutSeconds: DEFAULT_TIMEOUT_SECONDS,
|
|
34
|
+
allowCommands: [],
|
|
35
|
+
tools: [],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=specialist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specialist.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/types/specialist.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAU,CAAC;AAI/D,6FAA6F;AAC7F,MAAM,UAAU,cAAc,CAAC,OAAyB,EAAE,KAAoB;IAC5E,IAAI,OAAO,KAAK,UAAU,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1D,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,SAAS,IAAI,CAAC,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzE,OAAO,mBAAmB,KAAK,kEAAkE,CAAC;IACpG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,cAAc,CAC5B,OAAyB,EACzB,KAAoB,EACpB,OAA2B;IAE3B,IAAI,OAAO,KAAK,UAAU,IAAI,CAAC,OAAO,IAAI,KAAK;QAAE,OAAO,IAAI,CAAC;IAC7D,OAAO,wEAAwE,CAAC;AAClF,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,SAAS;IACT,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC;AAIX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAI7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,CAAC;AAkD/C,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,WAAW,EAAE,MAAM;QACnB,cAAc,EAAE,uBAAuB;QACvC,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Longest name of a specialist tag, in characters. */
|
|
2
|
+
export const TAG_NAME_MAX = 30;
|
|
3
|
+
/** Why the name cannot be a specialist tag, or null. Surrounding spaces are not part of the name. */
|
|
4
|
+
export function tagNameProblem(value) {
|
|
5
|
+
if (typeof value !== 'string')
|
|
6
|
+
return 'must be a string';
|
|
7
|
+
const name = value.trim();
|
|
8
|
+
if (name === '')
|
|
9
|
+
return 'must not be empty';
|
|
10
|
+
if (name.includes('\n') || name.includes('\r'))
|
|
11
|
+
return 'must not contain a line break';
|
|
12
|
+
if ([...name].length > TAG_NAME_MAX)
|
|
13
|
+
return `must be at most ${TAG_NAME_MAX} characters`;
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/** Trimmed names without repeats (case-insensitive, also for Cyrillic); the first spelling stays. */
|
|
17
|
+
export function uniqueTags(names) {
|
|
18
|
+
const seen = new Set();
|
|
19
|
+
const result = [];
|
|
20
|
+
for (const raw of names) {
|
|
21
|
+
const name = raw.trim();
|
|
22
|
+
const key = name.toLocaleLowerCase();
|
|
23
|
+
if (seen.has(key))
|
|
24
|
+
continue;
|
|
25
|
+
seen.add(key);
|
|
26
|
+
result.push(name);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
/** Whether two tag names are the same tag. */
|
|
31
|
+
export function sameTag(left, right) {
|
|
32
|
+
return left.trim().toLocaleLowerCase() === right.trim().toLocaleLowerCase();
|
|
33
|
+
}
|
|
34
|
+
/** The tags a parsed file has; empty when `tags` is missing or not valid. */
|
|
35
|
+
export function tagsOf(raw) {
|
|
36
|
+
const list = typeof raw === 'object' && raw !== null ? raw.tags : undefined;
|
|
37
|
+
if (!Array.isArray(list))
|
|
38
|
+
return [];
|
|
39
|
+
if (list.some((item) => tagNameProblem(item) !== null))
|
|
40
|
+
return [];
|
|
41
|
+
return uniqueTags(list);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=tag-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-names.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/types/tag-names.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,qGAAqG;AACrG,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,kBAA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AC,CAAC,SAAS,CAAC;IACzF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAClE,OAAO,UAAU,CAAC,IAAgB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-changed.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/ports/config-changed.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/ports/index.ts"],"names":[],"mappings":""}
|
|
@@ -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,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC/E,OAAO,EAEL,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,iBAAiB,GAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EACL,eAAe,EAIf,cAAc,GAEf,MAAM,oBAAoB,CAAC;AAE5B,4EAA4E;AAC5E,MAAM,UAAU,UAAU,CAAC,IAAwB;IACjD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CACvB,KAAkB,EAClB,IAAe,EACf,EAAU,EACV,KAAK,GAAe,SAAS;IAE7B,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAAE,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AAI,EAAE,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACzF,IAAI,CAAC;QACH,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC;YACH,UAAU,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACP,sBAAsB;QACxB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
2
|
+
import { pipelineTopologies, pipelineTopology } from '../../runs/types/index.js';
|
|
3
|
+
import { ConfigLoadError, configLoadErrors } 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
|
+
/** Check and write run without an await between them, so two edits never interleave. */
|
|
44
|
+
async edit(path, edit) {
|
|
45
|
+
const { config, registry, shared, changed } = this.dependencies;
|
|
46
|
+
const repository = await registry.rootOf(path);
|
|
47
|
+
const plan = planned(() => planEdit(config.pathsOf(repository), edit));
|
|
48
|
+
if (!plan.ok)
|
|
49
|
+
return plan;
|
|
50
|
+
if ((edit.kind === 'specialist' || edit.kind === 'pipeline') &&
|
|
51
|
+
edit.value === null &&
|
|
52
|
+
edit.level === 'global') {
|
|
53
|
+
const references = edit.kind === 'specialist'
|
|
54
|
+
? shared.specialistUsageOf(repository, edit.id)
|
|
55
|
+
: shared.pipelineUsageOf(repository, edit.id);
|
|
56
|
+
if (references.length > 0)
|
|
57
|
+
return { ok: false, reason: 'invalid', errors: [], references };
|
|
58
|
+
}
|
|
59
|
+
const result = { ok: true, ...commitEdit(plan) };
|
|
60
|
+
changed.configChanged(repository);
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
async settings(params) {
|
|
64
|
+
const { config, registry, changed } = this.dependencies;
|
|
65
|
+
const repository = await registry.rootOf(params.repository);
|
|
66
|
+
const plan = planned(() => planSettings(config.pathsOf(repository), {
|
|
67
|
+
values: params.values,
|
|
68
|
+
revision: params.revision,
|
|
69
|
+
level: params.level,
|
|
70
|
+
}));
|
|
71
|
+
if (!plan.ok)
|
|
72
|
+
return plan;
|
|
73
|
+
const result = { ok: true, ...commitEdit(plan) };
|
|
74
|
+
changed.configChanged(repository);
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
/** The graph of a pipeline as it would be with the draft value. */
|
|
78
|
+
async preview(params) {
|
|
79
|
+
const repository = await this.dependencies.registry.rootOf(params.repository);
|
|
80
|
+
const { config, errors } = draftConfig(this.dependencies.config.pathsOf(repository), {
|
|
81
|
+
kind: params.kind,
|
|
82
|
+
id: params.id,
|
|
83
|
+
value: params.value,
|
|
84
|
+
level: params.level ?? 'project',
|
|
85
|
+
});
|
|
86
|
+
return { topology: config ? pipelineTopology(config, params.id) : null, errors };
|
|
87
|
+
}
|
|
88
|
+
async pipelines(path) {
|
|
89
|
+
const repository = await this.dependencies.registry.rootOf(path);
|
|
90
|
+
try {
|
|
91
|
+
const config = this.dependencies.config.load(repository);
|
|
92
|
+
return { repository, pipelines: pipelineTopologies(config), errors: [] };
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
if (!(error instanceof ConfigLoadError))
|
|
96
|
+
throw error;
|
|
97
|
+
return { repository, pipelines: [], errors: configLoadErrors(error) };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/** The built-in stages of the pipeline with their tasks and the settings that apply. */
|
|
101
|
+
async systemStages(path) {
|
|
102
|
+
const repository = await this.dependencies.registry.rootOf(path);
|
|
103
|
+
const paths = this.dependencies.config.pathsOf(repository);
|
|
104
|
+
try {
|
|
105
|
+
const config = this.dependencies.config.load(repository);
|
|
106
|
+
const settings = new Map(editorView(paths).settings.map((setting) => [setting.path, setting]));
|
|
107
|
+
return { repository, stages: systemStagesOf(config, settings), errors: [] };
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
if (!(error instanceof ConfigLoadError))
|
|
111
|
+
throw error;
|
|
112
|
+
return { repository, stages: [], errors: configLoadErrors(error) };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//# 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,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAEtF,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,YAA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ared-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"}
|