@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,150 @@
|
|
|
1
|
+
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { launchProcess } from '../../../agents/services/index.js';
|
|
3
|
+
import { timesPath } from '../../../agents/services/index.js';
|
|
4
|
+
import { attemptDirectory } from '../../../../platform/git/index.js';
|
|
5
|
+
import { actionGroupsOf, actionOf, actionPointOf, findGroup, isRepairGroup, parseActionSlug, } from '../../types/index.js';
|
|
6
|
+
import { ensureGroupWorktree, logPath, resetRunTree, workspaceOf } from './worktrees.js';
|
|
7
|
+
/** The output of a command is only logged: it has no usage, session or denials. */
|
|
8
|
+
const QUIET = {
|
|
9
|
+
push() { },
|
|
10
|
+
usage: () => null,
|
|
11
|
+
outcome: () => ({ sessionId: null, usage: null, error: null, denials: [] }),
|
|
12
|
+
};
|
|
13
|
+
/** The environment of a command action. */
|
|
14
|
+
function actionEnvironment(state, group) {
|
|
15
|
+
const ref = parseActionSlug(group.slug);
|
|
16
|
+
const { run } = state;
|
|
17
|
+
const environment = {
|
|
18
|
+
AIP_RUN_ID: run.id,
|
|
19
|
+
AIP_RUN_TITLE: run.title ?? '',
|
|
20
|
+
AIP_PIPELINE: run.pipeline,
|
|
21
|
+
// The name before the term was unified; scripts in user repositories still read it.
|
|
22
|
+
AIP_WORKFLOW: run.pipeline,
|
|
23
|
+
AIP_STAGE: ref?.point ?? '',
|
|
24
|
+
AIP_ACTION: ref?.id ?? '',
|
|
25
|
+
AIP_REPOSITORY: run.repository,
|
|
26
|
+
};
|
|
27
|
+
if (ref?.point === 'after_delivery') {
|
|
28
|
+
const delivered = state.groups.filter((candidate) => candidate.status === 'merged' && candidate.delivery.state === 'applied');
|
|
29
|
+
const last = [...delivered]
|
|
30
|
+
.filter((candidate) => candidate.delivery.message)
|
|
31
|
+
.sort((left, right) => (right.delivery.finishedAt ?? 0) - (left.delivery.finishedAt ?? 0))[0];
|
|
32
|
+
environment.AIP_DELIVERY_MODE = run.config.delivery.mode;
|
|
33
|
+
environment.AIP_COMMIT_MESSAGE = last?.delivery.message ?? '';
|
|
34
|
+
environment.AIP_CHANGED_FILES = [
|
|
35
|
+
...new Set(delivered.flatMap((candidate) => candidate.delivery.files)),
|
|
36
|
+
].join('\n');
|
|
37
|
+
}
|
|
38
|
+
return environment;
|
|
39
|
+
}
|
|
40
|
+
/** Where a command action runs: the tree of the run, or the repository of the user after delivery. */
|
|
41
|
+
async function actionDirectory(state, group) {
|
|
42
|
+
if (actionPointOf(group) === 'after_delivery')
|
|
43
|
+
return state.run.repository;
|
|
44
|
+
return ensureGroupWorktree(state, group);
|
|
45
|
+
}
|
|
46
|
+
/** The command actions of a pipeline and what their trees must not keep. */
|
|
47
|
+
export class ActionRunner {
|
|
48
|
+
dependencies;
|
|
49
|
+
running;
|
|
50
|
+
constructor(dependencies, running) {
|
|
51
|
+
this.dependencies = dependencies;
|
|
52
|
+
this.running = running;
|
|
53
|
+
}
|
|
54
|
+
/** The command of an action before delivery must not change the result: drop what it wrote. */
|
|
55
|
+
async discardChanges(state, group) {
|
|
56
|
+
// A repair works on a copy of the ref of the run: what it leaves there is dropped. The tree of
|
|
57
|
+
// a delivery repair is the resolver's and is kept for the delivery.
|
|
58
|
+
const repairCopy = isRepairGroup(group) && !state.run.pendingDelivery?.repair;
|
|
59
|
+
if (actionPointOf(group) !== 'before_delivery' && !repairCopy)
|
|
60
|
+
return;
|
|
61
|
+
try {
|
|
62
|
+
await resetRunTree(state, await ensureGroupWorktree(state, group));
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// The tree may be gone with a cleaned run; there is nothing to drop then.
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A merge goes on the ref of the run, never on what a check left in the tree: a stopped check
|
|
70
|
+
* may still be working there, and one cut off by a restart never dropped its changes.
|
|
71
|
+
*/
|
|
72
|
+
async settleChecks(state, tree) {
|
|
73
|
+
const checks = actionGroupsOf(state, 'before_delivery');
|
|
74
|
+
if (checks.length === 0)
|
|
75
|
+
return;
|
|
76
|
+
const exits = checks.flatMap((group) => group.attempts.map((attempt) => this.running.process({ run: state.run.id, group: group.slug, seq: attempt.seq })?.exited));
|
|
77
|
+
// The process itself: its exit handler waits in the same queue as this merge.
|
|
78
|
+
await Promise.allSettled(exits);
|
|
79
|
+
await resetRunTree(state, tree);
|
|
80
|
+
}
|
|
81
|
+
async run(state, slug, seq) {
|
|
82
|
+
const group = findGroup(state, slug);
|
|
83
|
+
const attempt = group?.attempts.find((candidate) => candidate.seq === seq);
|
|
84
|
+
const action = group ? actionOf(state.run, group) : undefined;
|
|
85
|
+
if (!group || !attempt || !action || action.run === null)
|
|
86
|
+
return;
|
|
87
|
+
const { context } = this.dependencies;
|
|
88
|
+
const finish = async (outcome) => {
|
|
89
|
+
await this.discardChanges(state, group);
|
|
90
|
+
await context.apply(state, { kind: 'action_finished', group: slug, seq, outcome });
|
|
91
|
+
};
|
|
92
|
+
let directory;
|
|
93
|
+
try {
|
|
94
|
+
// Leftovers of an interrupted check must not reach this one.
|
|
95
|
+
await this.discardChanges(state, group);
|
|
96
|
+
directory = await actionDirectory(state, group);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
await finish({ kind: 'spawn', message: error.message });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this.launch(state, group, seq, action, directory, finish);
|
|
103
|
+
}
|
|
104
|
+
launch(state, group, seq, action, directory, finish) {
|
|
105
|
+
const { context, environment, graceMs, timings, agentExit } = this.dependencies;
|
|
106
|
+
const key = { run: state.run.id, group: group.slug, seq };
|
|
107
|
+
const log = logPath(state, group.slug, seq);
|
|
108
|
+
mkdirSync(attemptDirectory(workspaceOf(state), state.run.id, group.slug, seq), {
|
|
109
|
+
recursive: true,
|
|
110
|
+
});
|
|
111
|
+
appendFileSync(log, `[aip] $ ${action.run}\n`);
|
|
112
|
+
const process = launchProcess({
|
|
113
|
+
command: '/bin/sh',
|
|
114
|
+
args: ['-c', action.run ?? ''],
|
|
115
|
+
env: actionEnvironment(state, group),
|
|
116
|
+
files: [],
|
|
117
|
+
sessionId: null,
|
|
118
|
+
}, {
|
|
119
|
+
cwd: directory,
|
|
120
|
+
logPath: log,
|
|
121
|
+
parser: QUIET,
|
|
122
|
+
environment,
|
|
123
|
+
graceMs,
|
|
124
|
+
drainMs: timings.drainMs,
|
|
125
|
+
timesPath: timesPath(log),
|
|
126
|
+
});
|
|
127
|
+
let timedOut = false;
|
|
128
|
+
const timer = setTimeout(() => {
|
|
129
|
+
timedOut = true;
|
|
130
|
+
process.stop();
|
|
131
|
+
}, action.timeoutSeconds * timings.timeoutUnitMs);
|
|
132
|
+
this.running.add(key, process, timer);
|
|
133
|
+
void process.exited.then((exit) => {
|
|
134
|
+
clearTimeout(timer);
|
|
135
|
+
this.running.remove(key);
|
|
136
|
+
if (process.pid !== undefined)
|
|
137
|
+
agentExit.agentGone({ pid: process.pid, ...key });
|
|
138
|
+
// A stopping daemon leaves the attempt running: the next start marks it interrupted.
|
|
139
|
+
if (context.stopping)
|
|
140
|
+
return undefined;
|
|
141
|
+
const outcome = exit.spawnError
|
|
142
|
+
? { kind: 'spawn', message: exit.spawnError }
|
|
143
|
+
: timedOut
|
|
144
|
+
? { kind: 'timeout' }
|
|
145
|
+
: { kind: 'exit', code: exit.code ?? 1 };
|
|
146
|
+
return context.serial(() => finish(outcome));
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../../src/feature/runs/services/effects/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EA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,MAAM,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACtC,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YAChC,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;gBAAE,SAAS,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;YACjF,qFAAqF;YACrF,IAAI,OAAO,CAAC,QAAQ;gBAAE,OAAO,SAAS,CAAC;YACvC,MAAM,OAAO,GAAkB,IAAI,CAAC,UAAU;gBAC5C,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;gBAC7C,CAAC,CAAC,QAAQ;oBACR,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE;oBACrB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YAC7C,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { launchProcess, missingSkills, timesPath, } from '../../../agents/services/index.js';
|
|
5
|
+
import { modelIdProblem } from '../../../swarm-config/types/index.js';
|
|
6
|
+
import { attemptDirectory } from '../../../../platform/git/index.js';
|
|
7
|
+
import { findExecutable } from '../../../../platform/process/index.js';
|
|
8
|
+
import { SPLIT_GROUP, findGroup, isRepairGroup, specialistOfStep, } from '../../types/index.js';
|
|
9
|
+
import { ensureGroupWorktree, logPath, workspaceOf } from './worktrees.js';
|
|
10
|
+
/** Starts the agent of an attempt and turns its exit into an event of the run. */
|
|
11
|
+
export class AttemptStarter {
|
|
12
|
+
dependencies;
|
|
13
|
+
parts;
|
|
14
|
+
constructor(dependencies, parts) {
|
|
15
|
+
this.dependencies = dependencies;
|
|
16
|
+
this.parts = parts;
|
|
17
|
+
}
|
|
18
|
+
async start(state, slug, seq) {
|
|
19
|
+
const prepared = await this.prepare(state, slug, seq);
|
|
20
|
+
if (prepared === null)
|
|
21
|
+
return;
|
|
22
|
+
const { group, key, specialist, runtime, worktree } = prepared;
|
|
23
|
+
const directory = attemptDirectory(workspaceOf(state), state.run.id, slug, seq);
|
|
24
|
+
const log = logPath(state, slug, seq);
|
|
25
|
+
mkdirSync(directory, { recursive: true });
|
|
26
|
+
for (const skill of missingSkills(specialist.skills, runtime.skillDirectories(worktree, homedir()))) {
|
|
27
|
+
appendFileSync(log, `[aip] warning: skill not found: ${skill}\n`);
|
|
28
|
+
}
|
|
29
|
+
const token = this.parts.running.issueToken(key);
|
|
30
|
+
await this.parts.outside.begin(state, key);
|
|
31
|
+
const process = this.launch(prepared, directory, token);
|
|
32
|
+
const timer = setTimeout(() => {
|
|
33
|
+
if (this.dependencies.context.stopping)
|
|
34
|
+
return;
|
|
35
|
+
const { context } = this.dependencies;
|
|
36
|
+
void context.serial(() => context.apply(state, { kind: 'timed_out', group: slug, seq }));
|
|
37
|
+
}, specialist.timeoutSeconds * this.dependencies.timings.timeoutUnitMs);
|
|
38
|
+
this.parts.running.add(key, process, timer);
|
|
39
|
+
void process.exited.then((exit) => {
|
|
40
|
+
clearTimeout(timer);
|
|
41
|
+
this.parts.usage.drop(key);
|
|
42
|
+
this.parts.running.remove(key);
|
|
43
|
+
if (process.pid !== undefined) {
|
|
44
|
+
this.dependencies.agentExit.agentGone({ pid: process.pid, ...key });
|
|
45
|
+
}
|
|
46
|
+
this.parts.running.dropToken(token);
|
|
47
|
+
if (this.dependencies.context.stopping)
|
|
48
|
+
return undefined;
|
|
49
|
+
return this.dependencies.context.serial(() => this.exited(state, group, key, exit));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** The runtime, the tree and the specialist of the attempt; null when it cannot start. */
|
|
53
|
+
async prepare(state, slug, seq) {
|
|
54
|
+
const group = findGroup(state, slug);
|
|
55
|
+
const attempt = group?.attempts.find((candidate) => candidate.seq === seq);
|
|
56
|
+
if (!group || !attempt || attempt.runtime === 'command')
|
|
57
|
+
return null;
|
|
58
|
+
const key = { run: state.run.id, group: slug, seq };
|
|
59
|
+
const modelProblem = modelIdProblem(attempt.runtime, attempt.model);
|
|
60
|
+
if (modelProblem) {
|
|
61
|
+
await this.fail(state, key, {
|
|
62
|
+
kind: 'spawn',
|
|
63
|
+
message: `attempt ${seq} for ${attempt.specialist}: ${modelProblem}`,
|
|
64
|
+
});
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const { config, agents, environment } = this.dependencies;
|
|
68
|
+
const settings = config.runtimeSettings(state.run.repository);
|
|
69
|
+
if (typeof settings === 'string') {
|
|
70
|
+
await this.fail(state, key, { kind: 'spawn', message: settings });
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const runtime = agents.runtimeFor(attempt.runtime, settings);
|
|
74
|
+
if (!findExecutable(runtime.executable, environment.PATH)) {
|
|
75
|
+
await this.fail(state, key, { kind: 'runtime_not_found', runtime: attempt.runtime });
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
let worktree;
|
|
79
|
+
try {
|
|
80
|
+
worktree = await ensureGroupWorktree(state, group);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
await this.fail(state, key, { kind: 'git', message: error.message });
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
// Leftovers of an interrupted check must not reach this one.
|
|
87
|
+
await this.parts.actions.discardChanges(state, group);
|
|
88
|
+
// The observer works from the snapshot of its profile, which is not in the configuration.
|
|
89
|
+
const specialist = specialistOfStep(state.run, group, attempt.specialist);
|
|
90
|
+
if (!specialist) {
|
|
91
|
+
if (isRepairGroup(group)) {
|
|
92
|
+
await this.fail(state, key, { kind: 'spawn', message: 'the observer has no profile' });
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
return { state, group, attempt, key, runtime, worktree, specialist };
|
|
97
|
+
}
|
|
98
|
+
launch(prepared, directory, token) {
|
|
99
|
+
const { state, group, attempt, key, runtime, worktree, specialist } = prepared;
|
|
100
|
+
const { context, entry, socket, environment, graceMs, timings } = this.dependencies;
|
|
101
|
+
const effectiveSpecialist = {
|
|
102
|
+
...specialist,
|
|
103
|
+
runtime: attempt.runtime,
|
|
104
|
+
model: attempt.model,
|
|
105
|
+
...(attempt.variant !== undefined ? { variant: attempt.variant } : {}),
|
|
106
|
+
...(attempt.reasoningEffort !== undefined
|
|
107
|
+
? { reasoningEffort: attempt.reasoningEffort }
|
|
108
|
+
: {}),
|
|
109
|
+
};
|
|
110
|
+
const launch = runtime.buildLaunch({
|
|
111
|
+
specialist: effectiveSpecialist,
|
|
112
|
+
input: attempt.input,
|
|
113
|
+
worktree,
|
|
114
|
+
attemptDirectory: directory,
|
|
115
|
+
workerCommand: [
|
|
116
|
+
...entry,
|
|
117
|
+
'mcp',
|
|
118
|
+
'--worker',
|
|
119
|
+
token,
|
|
120
|
+
'--socket',
|
|
121
|
+
socket,
|
|
122
|
+
...(group.slug === SPLIT_GROUP ? ['--split'] : []),
|
|
123
|
+
...(specialist.queue === true ? ['--queue'] : []),
|
|
124
|
+
...(isRepairGroup(group) ? ['--repair'] : []),
|
|
125
|
+
],
|
|
126
|
+
sessionId: randomUUID(),
|
|
127
|
+
resumeSession: attempt.resumeSession,
|
|
128
|
+
claudeEditMode: state.run.config.claude.editMode,
|
|
129
|
+
claudeMcp: state.run.config.claude.mcp,
|
|
130
|
+
claudeSettings: state.run.config.claude.settings,
|
|
131
|
+
});
|
|
132
|
+
if (launch.sessionId)
|
|
133
|
+
attempt.sessionId = launch.sessionId;
|
|
134
|
+
context.save(state);
|
|
135
|
+
const log = logPath(state, group.slug, key.seq);
|
|
136
|
+
return launchProcess(launch, {
|
|
137
|
+
cwd: worktree,
|
|
138
|
+
logPath: log,
|
|
139
|
+
parser: runtime.createParser(),
|
|
140
|
+
environment,
|
|
141
|
+
graceMs,
|
|
142
|
+
drainMs: timings.drainMs,
|
|
143
|
+
timesPath: timesPath(log),
|
|
144
|
+
onUsage: (usage) => this.parts.usage.report(state, key, usage),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/** The exit of the agent as an event: its session, usage, failure and changes outside. */
|
|
148
|
+
async exited(state, group, key, exit) {
|
|
149
|
+
await this.parts.actions.discardChanges(state, group);
|
|
150
|
+
const outsideChanges = await this.parts.outside.finish(state, key);
|
|
151
|
+
await this.dependencies.context.apply(state, {
|
|
152
|
+
kind: 'attempt_exited',
|
|
153
|
+
group: key.group,
|
|
154
|
+
seq: key.seq,
|
|
155
|
+
exit: {
|
|
156
|
+
sessionId: exit.outcome.sessionId,
|
|
157
|
+
usage: exit.outcome.usage,
|
|
158
|
+
failure: exit.spawnError
|
|
159
|
+
? { kind: 'spawn', message: exit.spawnError }
|
|
160
|
+
: exit.outcome.usageLimit
|
|
161
|
+
? { kind: 'usage_limit', resetsAt: exit.outcome.usageLimit.resetsAt }
|
|
162
|
+
: null,
|
|
163
|
+
outsideChanges,
|
|
164
|
+
denials: exit.outcome.denials,
|
|
165
|
+
onLimit: this.dependencies.queue.onLimitOf(state.run.repository),
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
async fail(state, key, failure) {
|
|
170
|
+
this.parts.outside.forget(key);
|
|
171
|
+
await this.dependencies.context.apply(state, {
|
|
172
|
+
kind: 'attempt_exited',
|
|
173
|
+
group: key.group,
|
|
174
|
+
seq: key.seq,
|
|
175
|
+
exit: { sessionId: null, usage: null, failure, outsideChanges: [] },
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=attempts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attempts.js","sourceRoot":"","sources":["../../../../../src/feature/runs/services/effects/attempts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,GAGV,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAmB,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,gBAAgB,GAIjB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqB3E,kFAAkF;AAClF,MAAM,OAAO,cAAc;IACR,YAAY,CAAqB;IACjC,KAAK,CAAe;IAErC,YAAY,YAAgC,EAAE,KAAmB;QAC/D,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAe,EAAE,IAAY,EAAE,GAAW;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QACt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state at most once per interval. */
|
|
3
|
+
export const USAGE_INTERVAL_MS = 1_000;
|
|
4
|
+
export function keyOf(key) {
|
|
5
|
+
return `${key.run}/${key.group}/${key.seq}`;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/feature/runs/services/effects/context.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAsCvC,MAAM,UAAU,KAAK,CAAC,GAAe;IACnC,OAAO,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ActionRunner } from './actions.js';
|
|
2
|
+
import { AttemptStarter } from './attempts.js';
|
|
3
|
+
import { GitEffects } from './git.js';
|
|
4
|
+
import { nameRun } from './naming.js';
|
|
5
|
+
import { OutsideChanges } from './outside.js';
|
|
6
|
+
import { RunningAgents } from './running.js';
|
|
7
|
+
import { UsageBuffers } from './usage.js';
|
|
8
|
+
import { logPath, worktreePath } from './worktrees.js';
|
|
9
|
+
/** Carries out the effects of the machine: agents, command actions, git and the delivery. */
|
|
10
|
+
export class RunEffects {
|
|
11
|
+
dependencies;
|
|
12
|
+
running = new RunningAgents();
|
|
13
|
+
usage;
|
|
14
|
+
actions;
|
|
15
|
+
attempts;
|
|
16
|
+
git;
|
|
17
|
+
constructor(dependencies) {
|
|
18
|
+
this.dependencies = dependencies;
|
|
19
|
+
const outside = new OutsideChanges();
|
|
20
|
+
this.usage = new UsageBuffers(dependencies.context, () => dependencies.timings.usageIntervalMs);
|
|
21
|
+
this.actions = new ActionRunner(dependencies, this.running);
|
|
22
|
+
this.attempts = new AttemptStarter(dependencies, {
|
|
23
|
+
running: this.running,
|
|
24
|
+
usage: this.usage,
|
|
25
|
+
outside,
|
|
26
|
+
actions: this.actions,
|
|
27
|
+
});
|
|
28
|
+
this.git = new GitEffects(dependencies, this.actions, outside);
|
|
29
|
+
}
|
|
30
|
+
async perform(state, effects) {
|
|
31
|
+
for (const effect of effects)
|
|
32
|
+
await this.performOne(state, effect);
|
|
33
|
+
}
|
|
34
|
+
busy() {
|
|
35
|
+
return this.running.busy();
|
|
36
|
+
}
|
|
37
|
+
async stopAll() {
|
|
38
|
+
this.usage.clear();
|
|
39
|
+
await this.running.stopAll();
|
|
40
|
+
}
|
|
41
|
+
/** Agents that run now: running attempts and the naming of runs. */
|
|
42
|
+
agentRoots() {
|
|
43
|
+
return this.running.roots();
|
|
44
|
+
}
|
|
45
|
+
/** The attempt a worker MCP server reports for, while it runs. */
|
|
46
|
+
attemptFor(token) {
|
|
47
|
+
return this.running.attemptFor(token);
|
|
48
|
+
}
|
|
49
|
+
worktreePath(state, group) {
|
|
50
|
+
return worktreePath(state, group);
|
|
51
|
+
}
|
|
52
|
+
logPath(state, group, seq) {
|
|
53
|
+
return logPath(state, group, seq);
|
|
54
|
+
}
|
|
55
|
+
/** Asks a cheap model for the title and the name of a run, in the background. */
|
|
56
|
+
nameRun(state) {
|
|
57
|
+
return nameRun(this.dependencies, this.running, state);
|
|
58
|
+
}
|
|
59
|
+
async performOne(state, effect) {
|
|
60
|
+
switch (effect.kind) {
|
|
61
|
+
case 'start_attempt':
|
|
62
|
+
return this.attempts.start(state, effect.group, effect.seq);
|
|
63
|
+
case 'stop_attempt':
|
|
64
|
+
return this.running.stop({ run: effect.run, group: effect.group, seq: effect.seq });
|
|
65
|
+
case 'run_action':
|
|
66
|
+
return this.actions.run(state, effect.group, effect.seq);
|
|
67
|
+
case 'commit':
|
|
68
|
+
return this.git.commit(state, effect.group, effect.stepId, effect.summary);
|
|
69
|
+
case 'merge':
|
|
70
|
+
return this.git.merge(state, effect.group, effect.updateOnConflict);
|
|
71
|
+
case 'deliver':
|
|
72
|
+
return this.git.deliver(state, effect.groups, effect.force, effect.message);
|
|
73
|
+
case 'cleanup':
|
|
74
|
+
return this.git.cleanup(state);
|
|
75
|
+
case 'prepare_resolve':
|
|
76
|
+
return this.git.prepareResolve(state, effect.groups);
|
|
77
|
+
case 'finish_resolve':
|
|
78
|
+
return this.git.finishResolve(state, effect.message, effect.conflicts);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../../../src/feature/runs/services/effects/effects.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,OAAO,UAAU;IACJ,YAAY,CAAqB;IACjC,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;IAC9B,KAAK,CAAe;IACpB,OAAO,CAAe;IACtB,QAAQ,CAAiB;IACzB,GAAG,CAAa;IAEjC,YAAY,YAAgC;QAC1C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,MAAM,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,Y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CAAC,KAAK,CAAC,CAAC;YACjC,KAAK,iBAAiB;gBACpB,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YACvD,KAAK,gBAAgB;gBACnB,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { cleanRun, commitAll, commitMessage, commitResolve, deliver, filesWithMarkers, git, mergeBranch, prepareResolve, runWorktreeRoot, updateFromBranch, } from '../../../../platform/git/index.js';
|
|
2
|
+
import { RESOLVE_GROUP, SPLIT_GROUP, actionPointOf, deliveryBranch, findGroup, groupRef, runRef, } from '../../types/index.js';
|
|
3
|
+
import { ensureGroupWorktree, resolveWorktree, workspaceOf, worktreePath } from './worktrees.js';
|
|
4
|
+
function groupChanges(state, slugs) {
|
|
5
|
+
return state.groups
|
|
6
|
+
.filter((group) => slugs.includes(group.slug) && group.mergeCommit !== null)
|
|
7
|
+
.sort((left, right) => (left.mergeSeq ?? 0) - (right.mergeSeq ?? 0))
|
|
8
|
+
.map((group) => ({
|
|
9
|
+
group: group.slug,
|
|
10
|
+
from: `${group.mergeCommit}^1`,
|
|
11
|
+
to: group.mergeCommit,
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
function resolveBaseRef(state) {
|
|
15
|
+
return `refs/aip/${state.run.id}/resolve-base`;
|
|
16
|
+
}
|
|
17
|
+
/** The effects of a run on git: commits of steps, merges of groups, delivery and cleanup. */
|
|
18
|
+
export class GitEffects {
|
|
19
|
+
dependencies;
|
|
20
|
+
actions;
|
|
21
|
+
outside;
|
|
22
|
+
constructor(dependencies, actions, outside) {
|
|
23
|
+
this.dependencies = dependencies;
|
|
24
|
+
this.actions = actions;
|
|
25
|
+
this.outside = outside;
|
|
26
|
+
}
|
|
27
|
+
async commit(state, slug, stepId, summary) {
|
|
28
|
+
const group = findGroup(state, slug);
|
|
29
|
+
if (!group)
|
|
30
|
+
return;
|
|
31
|
+
try {
|
|
32
|
+
// The actions around the split change the tree of the run itself, which the groups start from.
|
|
33
|
+
const actionPoint = actionPointOf(group);
|
|
34
|
+
await commitAll(worktreePath(state, group), commitMessage(slug, stepId, summary), actionPoint === undefined ? groupRef(state.run, slug) : runRef(state.run), state.run.config.workspace.include);
|
|
35
|
+
if (actionPoint === undefined)
|
|
36
|
+
void this.dependencies.diff.refreshDiff(state, slug);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
await this.dependencies.context.apply(state, {
|
|
40
|
+
kind: 'commit_failed',
|
|
41
|
+
group: slug,
|
|
42
|
+
message: error.message,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async merge(state, slug, updateOnConflict) {
|
|
47
|
+
const group = findGroup(state, slug);
|
|
48
|
+
if (!group)
|
|
49
|
+
return;
|
|
50
|
+
let outcome;
|
|
51
|
+
try {
|
|
52
|
+
const runTree = await ensureGroupWorktree(state, { ...group, slug: SPLIT_GROUP });
|
|
53
|
+
await this.actions.settleChecks(state, runTree);
|
|
54
|
+
const source = groupRef(state.run, slug);
|
|
55
|
+
const target = runRef(state.run);
|
|
56
|
+
const message = `aip: merge ${slug}`;
|
|
57
|
+
const first = await mergeBranch(runTree, source, message, target);
|
|
58
|
+
if (first.kind === 'merged' || !updateOnConflict)
|
|
59
|
+
outcome = first;
|
|
60
|
+
else {
|
|
61
|
+
const updated = await updateFromBranch(worktreePath(state, group), target, source);
|
|
62
|
+
if (updated.kind === 'conflict')
|
|
63
|
+
outcome = { kind: 'conflict_updated', files: updated.files };
|
|
64
|
+
else
|
|
65
|
+
outcome = await mergeBranch(runTree, source, message, target);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
outcome = { kind: 'failed', message: error.message };
|
|
70
|
+
}
|
|
71
|
+
await this.dependencies.context.apply(state, { kind: 'merge_finished', group: slug, outcome });
|
|
72
|
+
void this.dependencies.diff.refreshDiff(state, slug);
|
|
73
|
+
if (outcome.kind === 'merged')
|
|
74
|
+
void this.dependencies.diff.savePatch(state);
|
|
75
|
+
}
|
|
76
|
+
async prepareResolve(state, slugs) {
|
|
77
|
+
try {
|
|
78
|
+
const prepared = await prepareResolve({
|
|
79
|
+
repository: state.run.repository,
|
|
80
|
+
worktree: resolveWorktree(state),
|
|
81
|
+
changes: groupChanges(state, slugs),
|
|
82
|
+
include: state.run.config.workspace.include,
|
|
83
|
+
baseRef: resolveBaseRef(state),
|
|
84
|
+
});
|
|
85
|
+
await this.dependencies.context.apply(state, {
|
|
86
|
+
kind: 'resolve_prepared',
|
|
87
|
+
conflicts: prepared.conflicts,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
const message = `could not prepare the resolver: ${error.message}`;
|
|
92
|
+
await this.dependencies.context.apply(state, {
|
|
93
|
+
kind: 'delivery_finished',
|
|
94
|
+
result: { kind: 'failed', message },
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async finishResolve(state, message, conflicts) {
|
|
99
|
+
let result;
|
|
100
|
+
try {
|
|
101
|
+
const worktree = resolveWorktree(state);
|
|
102
|
+
const left = filesWithMarkers(worktree, conflicts);
|
|
103
|
+
if (left.length > 0) {
|
|
104
|
+
result = { kind: 'failed', message: `conflict markers remain in: ${left.join(', ')}` };
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const { repository } = state.run;
|
|
108
|
+
const { include } = state.run.config.workspace;
|
|
109
|
+
const base = await git(repository, 'rev-parse', resolveBaseRef(state));
|
|
110
|
+
const resolved = await commitResolve(worktree, base, include);
|
|
111
|
+
result = await deliver({
|
|
112
|
+
repository,
|
|
113
|
+
changes: [{ group: RESOLVE_GROUP, from: base, to: resolved }],
|
|
114
|
+
mode: state.run.config.delivery.mode,
|
|
115
|
+
force: false,
|
|
116
|
+
message,
|
|
117
|
+
branch: deliveryBranch(state.run),
|
|
118
|
+
runRef: runRef(state.run),
|
|
119
|
+
include,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
result = { kind: 'failed', message: error.message };
|
|
125
|
+
}
|
|
126
|
+
await this.outside.accept(state, result);
|
|
127
|
+
await this.dependencies.context.apply(state, { kind: 'delivery_finished', result });
|
|
128
|
+
}
|
|
129
|
+
async deliver(state, slugs, force, message) {
|
|
130
|
+
let result;
|
|
131
|
+
try {
|
|
132
|
+
result = await deliver({
|
|
133
|
+
repository: state.run.repository,
|
|
134
|
+
changes: groupChanges(state, slugs),
|
|
135
|
+
mode: state.run.config.delivery.mode,
|
|
136
|
+
force,
|
|
137
|
+
message,
|
|
138
|
+
branch: deliveryBranch(state.run),
|
|
139
|
+
runRef: runRef(state.run),
|
|
140
|
+
include: state.run.config.workspace.include,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
result = { kind: 'failed', message: error.message };
|
|
145
|
+
}
|
|
146
|
+
await this.outside.accept(state, result);
|
|
147
|
+
await this.dependencies.context.apply(state, { kind: 'delivery_finished', result });
|
|
148
|
+
}
|
|
149
|
+
async cleanup(state) {
|
|
150
|
+
// The refs the patch is built from go away with the cleanup.
|
|
151
|
+
await this.dependencies.diff.savePatch(state);
|
|
152
|
+
try {
|
|
153
|
+
await cleanRun({
|
|
154
|
+
repository: state.run.repository,
|
|
155
|
+
root: runWorktreeRoot(workspaceOf(state), state.run.id),
|
|
156
|
+
runBranch: deliveryBranch(state.run),
|
|
157
|
+
groupBranches: [],
|
|
158
|
+
refPrefix: `refs/aip/${state.run.id}/`,
|
|
159
|
+
all: false,
|
|
160
|
+
active: false,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=git.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../../src/feature/runs/services/effects/git.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,GAAG,EACH,WAAW,EACX,cAAc,EACd,eAAe,EACf,gBAAgB,GAEjB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,SAAS,EACT,QAAQ,EACR,MAAM,GAEP,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEjG,SAAS,YAAY,CAAC,KAAe,EAAE,KAAe;IACpD,OAAO,KAAK,CAAC,MAAM;SAChB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC;SAC3E,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;SACnE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACf,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,IAAI,EAAE,GAAG,KAAK,CAAC,WAAW,IAAI;QAC9B,EAAE,EAAE,KAAK,CAAC,WAAqB;KAChC,CAAC,CAAC,CAAC;AACR,CAAC;AAED,SAAS,cAAc,CAAC,KAAe;IACrC,OAAO,YAAY,KAAK,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC;AACjD,CAAC;AAED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