@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,1021 @@
|
|
|
1
|
+
import { groupPipeline } from '../config/index.js';
|
|
2
|
+
import { advanceChecks, afterDeliveryDone, cancelDelivery, finishDelivery, finishMessage, renderCommitMessage, cleanupIfDelivered, markDelivered, requestDelivery, resolvePrepared, resolverDone, } from './delivery.js';
|
|
3
|
+
import { Rejection } from './errors.js';
|
|
4
|
+
import { closeRepair, openRepairGroup, repairTask } from './observer.js';
|
|
5
|
+
import { checkSkip, lastUnskipped, nextUnskipped, stepStates } from './skip.js';
|
|
6
|
+
import { refreshPermissions, refreshSpecialists, } from './permissions.js';
|
|
7
|
+
import { groupSlugs } from './ids.js';
|
|
8
|
+
import { retryableGroups } from './retryable.js';
|
|
9
|
+
import { enterPoint } from './stages.js';
|
|
10
|
+
import { attemptStepLabel } from './topology.js';
|
|
11
|
+
import { questionsText, reviewQuestion } from './questions.js';
|
|
12
|
+
import { addUsage, allGroups, attemptVerdict, describeFailReason, findGroup, isMessageGroup, isRepairGroup, isResolveGroup, isServiceGroup, isSplitGroup, newGroup, stepsOf, freshPending, isActionGroup, REPAIR_GROUP, actionGroupsOf, deliveryCheckActive, actionPointOf, pointClosed, pointStalled, isRunFinished, isTerminal, runPipeline, validateReport, } from './model.js';
|
|
13
|
+
export { Rejection };
|
|
14
|
+
function wrongStatus(group, action, expected) {
|
|
15
|
+
return new Rejection(`group \`${group.slug}\` is ${group.status}; ${action} needs ${expected}`);
|
|
16
|
+
}
|
|
17
|
+
function updateFinished(state, now) {
|
|
18
|
+
if (!isRunFinished(state))
|
|
19
|
+
state.run.finishedAt = null;
|
|
20
|
+
else if (state.run.finishedAt === null)
|
|
21
|
+
state.run.finishedAt = now;
|
|
22
|
+
}
|
|
23
|
+
export function transition(state, event, now) {
|
|
24
|
+
const machine = new Machine(state, now);
|
|
25
|
+
const wasFinished = state.run.finishedAt !== null;
|
|
26
|
+
const wasDone = afterDeliveryDone(state);
|
|
27
|
+
const heldBefore = state.run.hold !== null;
|
|
28
|
+
machine.apply(event);
|
|
29
|
+
machine.pipeline(wasDone);
|
|
30
|
+
machine.skipAhead();
|
|
31
|
+
machine.startNextMerge();
|
|
32
|
+
updateFinished(state, now);
|
|
33
|
+
// A pause cancelled the repair of a task with nothing to retry (a delivery incident): the pause
|
|
34
|
+
// stays, or the incident would be taken again at once. A finished task that was held before the
|
|
35
|
+
// event is such a task.
|
|
36
|
+
const keepHold = machine.pausedRepair || (wasFinished && heldBefore);
|
|
37
|
+
if (state.run.finishedAt !== null && retryableGroups(state).length === 0 && !keepHold) {
|
|
38
|
+
state.run.hold = null;
|
|
39
|
+
}
|
|
40
|
+
if (!wasFinished && state.run.finishedAt !== null && state.run.config.delivery.auto) {
|
|
41
|
+
machine.autoDeliver();
|
|
42
|
+
updateFinished(state, now);
|
|
43
|
+
}
|
|
44
|
+
if (state.run.finishedAt !== null && retryableGroups(state).length === 0 && !keepHold) {
|
|
45
|
+
state.run.hold = null;
|
|
46
|
+
}
|
|
47
|
+
return machine.effects;
|
|
48
|
+
}
|
|
49
|
+
class Machine {
|
|
50
|
+
effects = [];
|
|
51
|
+
/** The whole run was cancelled while its delivery waited for the checks: no automatic delivery follows. */
|
|
52
|
+
checksCancelled = false;
|
|
53
|
+
/** A pause ended the repair that went on. */
|
|
54
|
+
pausedRepair = false;
|
|
55
|
+
state;
|
|
56
|
+
now;
|
|
57
|
+
constructor(state, now) {
|
|
58
|
+
this.state = state;
|
|
59
|
+
this.now = now;
|
|
60
|
+
}
|
|
61
|
+
group(slug) {
|
|
62
|
+
const group = findGroup(this.state, slug);
|
|
63
|
+
if (!group)
|
|
64
|
+
throw new Rejection(`unknown group \`${slug}\``);
|
|
65
|
+
return group;
|
|
66
|
+
}
|
|
67
|
+
running(group, seq) {
|
|
68
|
+
return group.attempts.find((attempt) => attempt.seq === seq && attempt.status === 'running');
|
|
69
|
+
}
|
|
70
|
+
apply(event) {
|
|
71
|
+
switch (event.kind) {
|
|
72
|
+
case 'report':
|
|
73
|
+
return this.report(event.group, event.seq, event.report);
|
|
74
|
+
case 'split_proposed':
|
|
75
|
+
return this.proposeSplit(event.seq, event.groups);
|
|
76
|
+
case 'attempt_exited':
|
|
77
|
+
return this.exited(event.group, event.seq, event.exit);
|
|
78
|
+
case 'attempt_usage':
|
|
79
|
+
for (const update of event.updates) {
|
|
80
|
+
const group = findGroup(this.state, update.group);
|
|
81
|
+
const attempt = group ? this.running(group, update.seq) : undefined;
|
|
82
|
+
if (attempt)
|
|
83
|
+
attempt.usage = update.usage;
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
case 'timed_out':
|
|
87
|
+
return this.timedOut(event.group, event.seq);
|
|
88
|
+
case 'action_finished':
|
|
89
|
+
return this.actionFinished(event.group, event.seq, event.outcome);
|
|
90
|
+
case 'message':
|
|
91
|
+
return this.message(event.group, event.seq, event.text);
|
|
92
|
+
case 'cancel':
|
|
93
|
+
return this.cancel(event.group, event.reason);
|
|
94
|
+
case 'retry':
|
|
95
|
+
return this.retry(event.group, event.permissions, event.specialists);
|
|
96
|
+
case 'answer':
|
|
97
|
+
return this.answer(event.group, event.answer, event.by ?? 'human', event.permissions);
|
|
98
|
+
case 'merge_finished':
|
|
99
|
+
return this.mergeFinished(event.group, event.outcome);
|
|
100
|
+
case 'delivered_marked':
|
|
101
|
+
this.effects.push(...markDelivered(this.state, event.groups, this.now));
|
|
102
|
+
return;
|
|
103
|
+
case 'deliver_requested':
|
|
104
|
+
this.effects.push(...requestDelivery(this.state, {
|
|
105
|
+
groups: event.groups,
|
|
106
|
+
force: event.force,
|
|
107
|
+
files: event.files,
|
|
108
|
+
auto: false,
|
|
109
|
+
}));
|
|
110
|
+
return;
|
|
111
|
+
case 'delivery_finished':
|
|
112
|
+
this.effects.push(...finishDelivery(this.state, event.result, this.now));
|
|
113
|
+
return;
|
|
114
|
+
case 'run_named':
|
|
115
|
+
if (this.state.run.title === null && event.title !== null) {
|
|
116
|
+
this.state.run.title = event.title;
|
|
117
|
+
this.state.run.name = event.name;
|
|
118
|
+
}
|
|
119
|
+
this.state.run.namingUsage = addUsage(this.state.run.namingUsage, event.usage);
|
|
120
|
+
return;
|
|
121
|
+
case 'title_set':
|
|
122
|
+
this.state.run.title = event.title;
|
|
123
|
+
return;
|
|
124
|
+
case 'tags_set':
|
|
125
|
+
this.state.run.tags = [...event.tags];
|
|
126
|
+
return;
|
|
127
|
+
case 'step_skip':
|
|
128
|
+
return this.stepSkip(event.step, event.skip);
|
|
129
|
+
case 'resolve_prepared':
|
|
130
|
+
this.effects.push(...resolvePrepared(this.state, event.conflicts));
|
|
131
|
+
return;
|
|
132
|
+
case 'commit_failed':
|
|
133
|
+
return this.commitFailed(this.group(event.group), event.message);
|
|
134
|
+
case 'hold':
|
|
135
|
+
return this.hold(event.hold);
|
|
136
|
+
case 'interrupted':
|
|
137
|
+
return this.interrupted();
|
|
138
|
+
case 'repair_start':
|
|
139
|
+
return this.repairStart(event.incident, event.specialist);
|
|
140
|
+
case 'repair_allowed':
|
|
141
|
+
return this.repairAllowed(event.allowed);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/** The commit of a step failed. The group of an action is merged by then: it fails, and the pipeline waits. */
|
|
145
|
+
commitFailed(group, message) {
|
|
146
|
+
if (!isActionGroup(group)) {
|
|
147
|
+
this.failGroup(group, { kind: 'git', message });
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
group.status = 'failed';
|
|
151
|
+
group.reason = describeFailReason({ kind: 'git', message });
|
|
152
|
+
group.pending = freshPending(0);
|
|
153
|
+
}
|
|
154
|
+
hold(hold) {
|
|
155
|
+
if (hold !== null && this.state.run.finishedAt !== null && this.state.run.hold === null) {
|
|
156
|
+
throw new Rejection('a finished run cannot be held');
|
|
157
|
+
}
|
|
158
|
+
const pausing = hold === 'paused' && this.state.run.hold !== 'paused';
|
|
159
|
+
this.state.run.hold = hold;
|
|
160
|
+
if (!pausing)
|
|
161
|
+
return;
|
|
162
|
+
// A pause stops the running agents; their steps go on in the same session after it.
|
|
163
|
+
const groups = [
|
|
164
|
+
...actionGroupsOf(this.state, 'before_split'),
|
|
165
|
+
...(this.state.split ? [this.state.split] : []),
|
|
166
|
+
...actionGroupsOf(this.state, 'after_split'),
|
|
167
|
+
...this.state.groups,
|
|
168
|
+
];
|
|
169
|
+
for (const group of groups) {
|
|
170
|
+
for (const attempt of group.attempts) {
|
|
171
|
+
if (attempt.status !== 'running' || attempt.report !== null || attempt.reason !== null) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
// A command cannot continue after a pause; it runs to its end.
|
|
175
|
+
if (attempt.runtime === 'command')
|
|
176
|
+
continue;
|
|
177
|
+
attempt.reason = { kind: 'paused', at: this.now };
|
|
178
|
+
this.effects.push({
|
|
179
|
+
kind: 'stop_attempt',
|
|
180
|
+
run: this.state.run.id,
|
|
181
|
+
group: group.slug,
|
|
182
|
+
seq: attempt.seq,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// A repair does not continue after a pause: its incident is taken again, and it is not counted.
|
|
187
|
+
this.stopRepair({ reason: 'paused', refund: true });
|
|
188
|
+
}
|
|
189
|
+
report(slug, seq, report) {
|
|
190
|
+
const attempt = this.running(this.group(slug), seq);
|
|
191
|
+
if (!attempt)
|
|
192
|
+
throw new Rejection(`attempt ${seq} is not running`);
|
|
193
|
+
if (attempt.reason?.kind === 'message') {
|
|
194
|
+
throw new Rejection(`attempt ${seq} was interrupted by a message`);
|
|
195
|
+
}
|
|
196
|
+
const problem = validateReport(report);
|
|
197
|
+
if (problem !== null)
|
|
198
|
+
throw new Rejection(`invalid report: ${problem}`);
|
|
199
|
+
attempt.report = {
|
|
200
|
+
verdict: report.verdict,
|
|
201
|
+
summary: report.summary,
|
|
202
|
+
feedback: report.feedback?.trim()
|
|
203
|
+
? report.feedback
|
|
204
|
+
: report.questions
|
|
205
|
+
? questionsText(report.questions)
|
|
206
|
+
: null,
|
|
207
|
+
...(report.questions ? { questions: report.questions } : {}),
|
|
208
|
+
...(report.humanOnly ? { humanOnly: true } : {}),
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
proposeSplit(seq, groups) {
|
|
212
|
+
const split = this.state.split;
|
|
213
|
+
const attempt = split ? this.running(split, seq) : undefined;
|
|
214
|
+
if (!split || !attempt)
|
|
215
|
+
throw new Rejection(`attempt ${seq} is not a running split step`);
|
|
216
|
+
const maxGroups = runPipeline(this.state.run).split?.maxGroups ?? 1;
|
|
217
|
+
if (groups.length < 1 || groups.length > maxGroups) {
|
|
218
|
+
throw new Rejection(`propose from 1 to ${maxGroups} groups, got ${groups.length}`);
|
|
219
|
+
}
|
|
220
|
+
const empty = groups.findIndex((group) => group.title.trim() === '' || group.task.trim() === '');
|
|
221
|
+
if (empty !== -1)
|
|
222
|
+
throw new Rejection(`group ${empty + 1} needs a non-empty title and task`);
|
|
223
|
+
attempt.proposal = groups.map((group) => ({ title: group.title.trim(), task: group.task }));
|
|
224
|
+
}
|
|
225
|
+
exited(slug, seq, exit) {
|
|
226
|
+
const group = this.group(slug);
|
|
227
|
+
const attempt = this.running(group, seq);
|
|
228
|
+
if (!attempt) {
|
|
229
|
+
// Cancelled or timed out before the process ended: only the usage is still unknown.
|
|
230
|
+
const stopped = group.attempts.find((item) => item.seq === seq);
|
|
231
|
+
if (stopped && exit.usage !== null && stopped.finishedAt !== null)
|
|
232
|
+
stopped.usage = exit.usage;
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
attempt.finishedAt = this.now;
|
|
236
|
+
if (exit.sessionId !== null)
|
|
237
|
+
attempt.sessionId = exit.sessionId;
|
|
238
|
+
attempt.usage = exit.usage ?? attempt.usage;
|
|
239
|
+
attempt.denials = exit.denials ?? [];
|
|
240
|
+
attempt.outsideChanges = [...exit.outsideChanges];
|
|
241
|
+
if (attempt.reason?.kind === 'message') {
|
|
242
|
+
this.continueAfterMessage(group, attempt, attempt.reason);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (attempt.reason?.kind === 'paused') {
|
|
246
|
+
if (attempt.report === null) {
|
|
247
|
+
this.continueAfterPause(group, attempt);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
// The report came before the stop: the exit failure is the stop itself.
|
|
251
|
+
attempt.reason = null;
|
|
252
|
+
exit = { ...exit, failure: null };
|
|
253
|
+
}
|
|
254
|
+
// A report sent before the limit ran out counts as usual.
|
|
255
|
+
const limited = exit.failure?.kind === 'usage_limit' && attempt.report !== null;
|
|
256
|
+
const failure = limited
|
|
257
|
+
? null
|
|
258
|
+
: (exit.failure ?? (attempt.report === null ? { kind: 'no_report' } : null));
|
|
259
|
+
if (failure !== null) {
|
|
260
|
+
attempt.status = 'failed';
|
|
261
|
+
attempt.reason = failure;
|
|
262
|
+
if (failure.kind === 'usage_limit' &&
|
|
263
|
+
(exit.onLimit ?? 'wait') === 'wait' &&
|
|
264
|
+
!isRepairGroup(group)) {
|
|
265
|
+
this.waitForLimit(group, attempt);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
this.failGroup(group, failure);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
attempt.status = 'finished';
|
|
272
|
+
const report = attempt.report;
|
|
273
|
+
const point = actionPointOf(group);
|
|
274
|
+
const commitsToRun = point === 'before_split' || point === 'after_split';
|
|
275
|
+
if (report.verdict === 'done' && commitsToRun) {
|
|
276
|
+
this.effects.push({
|
|
277
|
+
kind: 'commit',
|
|
278
|
+
run: this.state.run.id,
|
|
279
|
+
group: slug,
|
|
280
|
+
stepId: attempt.stepId,
|
|
281
|
+
summary: report.summary,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
if (report.verdict !== 'needs_human' && !isServiceGroup(group)) {
|
|
285
|
+
this.effects.push({
|
|
286
|
+
kind: 'commit',
|
|
287
|
+
run: this.state.run.id,
|
|
288
|
+
group: slug,
|
|
289
|
+
stepId: attempt.stepId,
|
|
290
|
+
summary: report.summary,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
if (exit.outsideChanges.length > 0 &&
|
|
294
|
+
this.state.run.config.outsideChanges === 'stop' &&
|
|
295
|
+
!isRepairGroup(group)) {
|
|
296
|
+
const files = exit.outsideChanges.join(', ');
|
|
297
|
+
this.askHuman(group, attempt.stepIndex, `Files in your working copy changed while step ${attemptStepLabel(this.state, group, attempt)} ran: ${files}. The specialist, you or another program may have changed them; aip deliveries are not counted. Check your working copy and answer to continue.`, null);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (isRepairGroup(group))
|
|
301
|
+
this.finishRepair(group, report);
|
|
302
|
+
else if (isResolveGroup(group))
|
|
303
|
+
this.finishResolve(group, report);
|
|
304
|
+
else if (isActionGroup(group))
|
|
305
|
+
this.finishAction(group, attempt, report);
|
|
306
|
+
else if (report.verdict === 'done' && isMessageGroup(group))
|
|
307
|
+
this.finishMessage(group, report.summary);
|
|
308
|
+
else if (report.verdict === 'done' && isSplitGroup(group))
|
|
309
|
+
this.finishSplit(group, attempt);
|
|
310
|
+
else if (report.verdict === 'done')
|
|
311
|
+
this.finishStep(group, attempt, report);
|
|
312
|
+
else if (report.verdict === 'rejected')
|
|
313
|
+
this.rejected(group, attempt, report.feedback ?? '');
|
|
314
|
+
else {
|
|
315
|
+
this.askHuman(group, attempt.stepIndex, report.feedback ?? '', report.questions ?? null, report.humanOnly ? 'request' : null);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/** `done` of an ordinary step: on to the next one, or first to a review by a person. */
|
|
319
|
+
finishStep(group, attempt, report) {
|
|
320
|
+
const step = stepsOf(this.state.run, group)[attempt.stepIndex];
|
|
321
|
+
if (step?.humanReview && !attempt.input.reviewed) {
|
|
322
|
+
this.askHuman(group, attempt.stepIndex, reviewQuestion(attemptStepLabel(this.state, group, attempt), report.summary), null, 'review');
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
this.advance(group, attempt.stepIndex);
|
|
326
|
+
}
|
|
327
|
+
finishSplit(split, attempt) {
|
|
328
|
+
const proposal = attempt.proposal;
|
|
329
|
+
if (!proposal || proposal.length === 0) {
|
|
330
|
+
attempt.status = 'failed';
|
|
331
|
+
attempt.reason = { kind: 'no_groups' };
|
|
332
|
+
this.failGroup(split, { kind: 'no_groups' });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
const slugs = groupSlugs(proposal.map((group) => group.title));
|
|
336
|
+
this.state.groups = proposal.map((group, index) => newGroup(slugs[index] ?? `group-${index + 1}`, group.title, group.task, index));
|
|
337
|
+
split.status = 'merged';
|
|
338
|
+
split.pending = null;
|
|
339
|
+
// The groups wait in `queued` for the actions after the split.
|
|
340
|
+
enterPoint(this.state, 'after_split');
|
|
341
|
+
}
|
|
342
|
+
/** A specialist reported on its pipeline action. */
|
|
343
|
+
finishAction(group, attempt, report) {
|
|
344
|
+
if (report.verdict === 'done') {
|
|
345
|
+
group.status = 'merged';
|
|
346
|
+
group.pending = null;
|
|
347
|
+
group.reason = null;
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (report.verdict === 'rejected') {
|
|
351
|
+
const detail = (report.feedback ?? report.summary).trim();
|
|
352
|
+
this.restorePending(group);
|
|
353
|
+
group.status = 'failed';
|
|
354
|
+
group.reason = `reported rejected${detail ? `: ${detail.split('\n')[0]}` : ''}`;
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
this.askHuman(group, attempt.stepIndex, report.feedback ?? '', report.questions ?? null, report.humanOnly ? 'request' : null);
|
|
358
|
+
}
|
|
359
|
+
/** A command action ended; the daemon says how. */
|
|
360
|
+
actionFinished(slug, seq, outcome) {
|
|
361
|
+
const group = this.group(slug);
|
|
362
|
+
const attempt = this.running(group, seq);
|
|
363
|
+
if (!attempt)
|
|
364
|
+
return;
|
|
365
|
+
attempt.finishedAt = this.now;
|
|
366
|
+
if (outcome.kind === 'exit' && outcome.code === 0) {
|
|
367
|
+
attempt.status = 'finished';
|
|
368
|
+
attempt.report = { verdict: 'done', summary: 'exit code 0', feedback: null };
|
|
369
|
+
group.status = 'merged';
|
|
370
|
+
group.pending = null;
|
|
371
|
+
group.reason = null;
|
|
372
|
+
const point = actionPointOf(group);
|
|
373
|
+
if (point === 'before_split' || point === 'after_split') {
|
|
374
|
+
this.effects.push({
|
|
375
|
+
kind: 'commit',
|
|
376
|
+
run: this.state.run.id,
|
|
377
|
+
group: slug,
|
|
378
|
+
stepId: attempt.stepId,
|
|
379
|
+
summary: `action ${attempt.stepId}`,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
const reason = outcome.kind === 'exit'
|
|
385
|
+
? { kind: 'exit_code', code: outcome.code }
|
|
386
|
+
: outcome.kind === 'timeout'
|
|
387
|
+
? { kind: 'timeout' }
|
|
388
|
+
: { kind: 'spawn', message: outcome.message };
|
|
389
|
+
attempt.status = 'failed';
|
|
390
|
+
attempt.reason = reason;
|
|
391
|
+
this.failGroup(group, reason);
|
|
392
|
+
}
|
|
393
|
+
finishResolve(group, report) {
|
|
394
|
+
group.pending = null;
|
|
395
|
+
if (report.verdict === 'done') {
|
|
396
|
+
group.status = 'merged';
|
|
397
|
+
this.effects.push(...resolverDone(this.state));
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
const detail = (report.feedback ?? report.summary).trim();
|
|
401
|
+
group.status = 'failed';
|
|
402
|
+
group.reason = `resolver reported ${report.verdict}`;
|
|
403
|
+
this.effects.push(...finishDelivery(this.state, {
|
|
404
|
+
kind: 'failed',
|
|
405
|
+
message: `the resolver reported ${report.verdict}${detail ? `: ${detail}` : ''}`,
|
|
406
|
+
}, this.now));
|
|
407
|
+
}
|
|
408
|
+
/** The observer reported. A delivery repair is closed by the delivery that follows `done`. */
|
|
409
|
+
finishRepair(group, report) {
|
|
410
|
+
group.pending = null;
|
|
411
|
+
const incident = this.state.run.repair.incident;
|
|
412
|
+
const taken = incident ? [incident.key] : [];
|
|
413
|
+
if (report.verdict === 'done') {
|
|
414
|
+
group.status = 'merged';
|
|
415
|
+
group.reason = null;
|
|
416
|
+
if (this.state.run.pendingDelivery?.repair) {
|
|
417
|
+
this.effects.push(...resolverDone(this.state));
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
closeRepair(this.state, { taken, refund: false });
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const detail = (report.feedback ?? report.summary).trim();
|
|
424
|
+
group.status = 'failed';
|
|
425
|
+
group.reason = `observer reported ${report.verdict}${detail ? `: ${detail.split('\n')[0]}` : ''}`;
|
|
426
|
+
if (this.state.run.pendingDelivery?.repair) {
|
|
427
|
+
this.effects.push(...finishDelivery(this.state, {
|
|
428
|
+
kind: 'failed',
|
|
429
|
+
message: `the observer reported ${report.verdict}${detail ? `: ${detail}` : ''}`,
|
|
430
|
+
}, this.now));
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
closeRepair(this.state, { taken, refund: false });
|
|
434
|
+
}
|
|
435
|
+
repairStart(incident, specialist) {
|
|
436
|
+
const { run } = this.state;
|
|
437
|
+
if (run.repair.incident !== null)
|
|
438
|
+
throw new Rejection('a repair of this run is already going');
|
|
439
|
+
if (run.hold !== null)
|
|
440
|
+
throw new Rejection(`run is ${run.hold}; observers do not take it`);
|
|
441
|
+
if (incident.kind === 'delivery') {
|
|
442
|
+
if (run.pendingDelivery !== null) {
|
|
443
|
+
throw new Rejection(`a delivery of run ${run.id} is already in progress`);
|
|
444
|
+
}
|
|
445
|
+
const groups = this.state.groups.filter((group) => group.status === 'merged' && group.delivery.state === 'apply_failed');
|
|
446
|
+
if (groups.length === 0)
|
|
447
|
+
throw new Rejection('no delivery to repair');
|
|
448
|
+
run.repair.incident = incident;
|
|
449
|
+
run.repair.specialist = specialist;
|
|
450
|
+
run.repair.repairs += 1;
|
|
451
|
+
run.pendingDelivery = {
|
|
452
|
+
groups: groups.map((group) => group.slug),
|
|
453
|
+
force: false,
|
|
454
|
+
auto: false,
|
|
455
|
+
round: 1,
|
|
456
|
+
repair: true,
|
|
457
|
+
message: renderCommitMessage(run.config.delivery.commitMessage, this.state, groups),
|
|
458
|
+
};
|
|
459
|
+
this.effects.push({
|
|
460
|
+
kind: 'prepare_resolve',
|
|
461
|
+
run: run.id,
|
|
462
|
+
groups: run.pendingDelivery.groups,
|
|
463
|
+
round: 1,
|
|
464
|
+
});
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
run.repair.incident = incident;
|
|
468
|
+
run.repair.specialist = specialist;
|
|
469
|
+
run.repair.repairs += 1;
|
|
470
|
+
openRepairGroup(this.state, repairTask(this.state, incident));
|
|
471
|
+
}
|
|
472
|
+
repairAllowed(allowed) {
|
|
473
|
+
const { repair } = this.state.run;
|
|
474
|
+
if (allowed === repair.allowed)
|
|
475
|
+
return;
|
|
476
|
+
repair.allowed = allowed;
|
|
477
|
+
if (!allowed) {
|
|
478
|
+
this.stopRepair({ reason: null, refund: false });
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
// Returning the task to observers starts its count again.
|
|
482
|
+
repair.repairs = 0;
|
|
483
|
+
repair.taken = [];
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Ends the repair that goes on: the agent stops, the group is cancelled with `reason` and the
|
|
487
|
+
* incident is released. Nothing happens when no repair goes on.
|
|
488
|
+
*/
|
|
489
|
+
stopRepair(options) {
|
|
490
|
+
if (this.state.run.repair.incident === null)
|
|
491
|
+
return;
|
|
492
|
+
if (options.reason === 'paused')
|
|
493
|
+
this.pausedRepair = true;
|
|
494
|
+
const group = this.state.repair;
|
|
495
|
+
if (group && !isTerminal(group.status)) {
|
|
496
|
+
group.status = 'cancelled';
|
|
497
|
+
group.pending = null;
|
|
498
|
+
if (options.reason !== null)
|
|
499
|
+
group.reason = options.reason;
|
|
500
|
+
for (const attempt of group.attempts) {
|
|
501
|
+
if (attempt.status !== 'running')
|
|
502
|
+
continue;
|
|
503
|
+
attempt.status = 'cancelled';
|
|
504
|
+
attempt.finishedAt = this.now;
|
|
505
|
+
this.effects.push({
|
|
506
|
+
kind: 'stop_attempt',
|
|
507
|
+
run: this.state.run.id,
|
|
508
|
+
group: group.slug,
|
|
509
|
+
seq: attempt.seq,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
closeRepair(this.state, { taken: [], refund: options.refund });
|
|
514
|
+
}
|
|
515
|
+
finishMessage(group, summary) {
|
|
516
|
+
if (summary !== null) {
|
|
517
|
+
group.status = 'merged';
|
|
518
|
+
group.pending = null;
|
|
519
|
+
}
|
|
520
|
+
this.effects.push(...finishMessage(this.state, summary));
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Moves the pipeline after an event: a delivery waits for the actions before it, and the run is
|
|
524
|
+
* cleaned up once the actions after delivery are done.
|
|
525
|
+
*/
|
|
526
|
+
pipeline(wasDone) {
|
|
527
|
+
this.effects.push(...advanceChecks(this.state));
|
|
528
|
+
if (!wasDone && afterDeliveryDone(this.state) && !this.state.run.config.delivery.keep) {
|
|
529
|
+
this.effects.push({ kind: 'cleanup', run: this.state.run.id });
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
autoDeliver() {
|
|
533
|
+
// A check that failed or was cancelled stops the pipeline: only an explicit request starts it again.
|
|
534
|
+
if (this.checksCancelled || pointStalled(this.state, 'before_delivery'))
|
|
535
|
+
return;
|
|
536
|
+
if (!this.state.groups.some((group) => group.status === 'merged' && group.delivery.state === 'pending')) {
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
try {
|
|
540
|
+
this.effects.push(...requestDelivery(this.state, { groups: null, force: false, files: [], auto: true }));
|
|
541
|
+
}
|
|
542
|
+
catch (error) {
|
|
543
|
+
if (!(error instanceof Rejection))
|
|
544
|
+
throw error;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
advance(group, current) {
|
|
548
|
+
const next = current + 1;
|
|
549
|
+
if (next < stepsOf(this.state.run, group).length) {
|
|
550
|
+
group.status = 'queued';
|
|
551
|
+
group.pending = freshPending(next);
|
|
552
|
+
}
|
|
553
|
+
else {
|
|
554
|
+
this.enqueueMerge(group, false);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
rejected(group, attempt, feedback) {
|
|
558
|
+
const steps = stepsOf(this.state.run, group);
|
|
559
|
+
const onReject = steps[attempt.stepIndex]?.onReject ?? null;
|
|
560
|
+
if (onReject === null) {
|
|
561
|
+
this.askHuman(group, attempt.stepIndex, feedback, null);
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
const rounds = (group.rejections[attempt.stepId] ?? 0) + 1;
|
|
565
|
+
if (rounds > onReject.maxRounds) {
|
|
566
|
+
this.askHuman(group, attempt.stepIndex, `Step \`${attemptStepLabel(this.state, group, attempt)}\` rejected the work ${rounds} times (limit ${onReject.maxRounds}). Last feedback:\n${feedback}`, null);
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
group.rejections[attempt.stepId] = rounds;
|
|
570
|
+
group.status = 'queued';
|
|
571
|
+
group.pending = {
|
|
572
|
+
stepIndex: steps.findIndex((step) => step.id === onReject.goto),
|
|
573
|
+
feedback,
|
|
574
|
+
humanAnswer: null,
|
|
575
|
+
resume: false,
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
askHuman(group, step, question, questions, humanOnly = null) {
|
|
579
|
+
group.status = 'needs_human';
|
|
580
|
+
group.question = question;
|
|
581
|
+
group.questions = questions;
|
|
582
|
+
group.humanOnly = humanOnly;
|
|
583
|
+
group.pending = { stepIndex: step, feedback: null, humanAnswer: null, resume: true };
|
|
584
|
+
}
|
|
585
|
+
restorePending(group) {
|
|
586
|
+
const last = group.attempts.at(-1);
|
|
587
|
+
if (group.pending === null && last) {
|
|
588
|
+
group.pending = {
|
|
589
|
+
stepIndex: last.stepIndex,
|
|
590
|
+
feedback: last.input.feedback,
|
|
591
|
+
humanAnswer: last.input.humanAnswer,
|
|
592
|
+
resume: false,
|
|
593
|
+
...(last.input.reviewed ? { reviewed: true } : {}),
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
/** The group waits in `queued` for the same step; the scheduler holds it until the limit resets. */
|
|
598
|
+
waitForLimit(group, attempt) {
|
|
599
|
+
if (isTerminal(group.status))
|
|
600
|
+
return;
|
|
601
|
+
group.pending = {
|
|
602
|
+
stepIndex: attempt.stepIndex,
|
|
603
|
+
feedback: attempt.input.feedback,
|
|
604
|
+
humanAnswer: attempt.input.humanAnswer,
|
|
605
|
+
resume: attempt.sessionId !== null,
|
|
606
|
+
...(attempt.input.reviewed ? { reviewed: true } : {}),
|
|
607
|
+
};
|
|
608
|
+
group.status = 'queued';
|
|
609
|
+
group.reason = null;
|
|
610
|
+
}
|
|
611
|
+
failGroup(group, reason) {
|
|
612
|
+
if (isTerminal(group.status))
|
|
613
|
+
return;
|
|
614
|
+
this.restorePending(group);
|
|
615
|
+
group.status = 'failed';
|
|
616
|
+
group.reason = describeFailReason(reason);
|
|
617
|
+
if (isMessageGroup(group))
|
|
618
|
+
this.finishMessage(group, null);
|
|
619
|
+
if (isRepairGroup(group)) {
|
|
620
|
+
// A crash, a timeout or an interruption: the incident is taken again; a usage limit gives
|
|
621
|
+
// the repair back and does not wait.
|
|
622
|
+
group.pending = null;
|
|
623
|
+
closeRepair(this.state, { taken: [], refund: reason.kind === 'usage_limit' });
|
|
624
|
+
}
|
|
625
|
+
if (isResolveGroup(group)) {
|
|
626
|
+
group.pending = null;
|
|
627
|
+
this.effects.push(...finishDelivery(this.state, {
|
|
628
|
+
kind: 'failed',
|
|
629
|
+
message: `the resolver failed: ${describeFailReason(reason)}`,
|
|
630
|
+
}, this.now));
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
timedOut(slug, seq) {
|
|
634
|
+
const group = this.group(slug);
|
|
635
|
+
const attempt = this.running(group, seq);
|
|
636
|
+
if (!attempt || attempt.reason?.kind === 'message' || attempt.reason?.kind === 'paused') {
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
attempt.status = 'failed';
|
|
640
|
+
attempt.reason = { kind: 'timeout' };
|
|
641
|
+
attempt.finishedAt = this.now;
|
|
642
|
+
this.effects.push({ kind: 'stop_attempt', run: this.state.run.id, group: slug, seq });
|
|
643
|
+
this.failGroup(group, { kind: 'timeout' });
|
|
644
|
+
}
|
|
645
|
+
message(slug, seq, text) {
|
|
646
|
+
const group = this.group(slug);
|
|
647
|
+
const attempt = this.running(group, seq);
|
|
648
|
+
if (!attempt)
|
|
649
|
+
throw new Rejection(`attempt ${seq} is not running`);
|
|
650
|
+
if (attempt.runtime === 'command') {
|
|
651
|
+
throw new Rejection(`attempt ${seq} is a command; it takes no messages`);
|
|
652
|
+
}
|
|
653
|
+
if (attempt.report !== null)
|
|
654
|
+
throw new Rejection(`attempt ${seq} already reported`);
|
|
655
|
+
if (attempt.reason !== null) {
|
|
656
|
+
throw new Rejection(`attempt ${seq} is already being interrupted`);
|
|
657
|
+
}
|
|
658
|
+
attempt.reason = { kind: 'message', text, at: this.now };
|
|
659
|
+
this.effects.push({ kind: 'stop_attempt', run: this.state.run.id, group: slug, seq });
|
|
660
|
+
}
|
|
661
|
+
/** The attempt stopped because of a human message: the step goes on in the same session. */
|
|
662
|
+
continueAfterMessage(group, attempt, reason) {
|
|
663
|
+
attempt.status = 'cancelled';
|
|
664
|
+
attempt.finishedAt ??= this.now;
|
|
665
|
+
group.pending = {
|
|
666
|
+
...freshPending(attempt.stepIndex),
|
|
667
|
+
resume: true,
|
|
668
|
+
message: { text: reason.text, at: reason.at },
|
|
669
|
+
...(attempt.input.reviewed ? { reviewed: true } : {}),
|
|
670
|
+
};
|
|
671
|
+
group.status = 'queued';
|
|
672
|
+
}
|
|
673
|
+
/** The attempt stopped because of a pause: the step goes on in the same session. */
|
|
674
|
+
continueAfterPause(group, attempt) {
|
|
675
|
+
attempt.status = 'cancelled';
|
|
676
|
+
attempt.finishedAt ??= this.now;
|
|
677
|
+
this.waitForLimit(group, attempt);
|
|
678
|
+
}
|
|
679
|
+
cancel(only, reason) {
|
|
680
|
+
if (only === REPAIR_GROUP && this.state.repair === null) {
|
|
681
|
+
// The tree of a delivery repair is still being prepared: there is no group to cancel yet.
|
|
682
|
+
this.stopRepair({ reason: null, refund: false });
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
const groups = only === null ? allGroups(this.state) : [this.group(only)];
|
|
686
|
+
for (const group of groups) {
|
|
687
|
+
// A failed action can be cancelled by name: that releases the pipeline held by it.
|
|
688
|
+
const failedAction = only !== null && isActionGroup(group) && group.status === 'failed';
|
|
689
|
+
if (isTerminal(group.status) && !failedAction)
|
|
690
|
+
continue;
|
|
691
|
+
group.status = 'cancelled';
|
|
692
|
+
if (reason !== undefined)
|
|
693
|
+
group.reason = reason;
|
|
694
|
+
group.mergeInFlight = false;
|
|
695
|
+
if (isMessageGroup(group) || isResolveGroup(group))
|
|
696
|
+
cancelDelivery(this.state);
|
|
697
|
+
for (const attempt of group.attempts) {
|
|
698
|
+
if (attempt.status !== 'running')
|
|
699
|
+
continue;
|
|
700
|
+
attempt.status = 'cancelled';
|
|
701
|
+
attempt.finishedAt = this.now;
|
|
702
|
+
this.effects.push({
|
|
703
|
+
kind: 'stop_attempt',
|
|
704
|
+
run: this.state.run.id,
|
|
705
|
+
group: group.slug,
|
|
706
|
+
seq: attempt.seq,
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
if (only === null || only === REPAIR_GROUP) {
|
|
711
|
+
if (only === null && reason !== undefined)
|
|
712
|
+
this.state.run.repair.cancelReason = reason;
|
|
713
|
+
this.stopRepair({ reason: null, refund: false });
|
|
714
|
+
}
|
|
715
|
+
// Cancelling the whole run also cancels a delivery that waits for the checks, even when the
|
|
716
|
+
// cancelled checks do not stop the pipeline.
|
|
717
|
+
if (only === null && this.state.run.pendingDelivery?.checks) {
|
|
718
|
+
cancelDelivery(this.state);
|
|
719
|
+
this.checksCancelled = true;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
stepSkip(step, skip) {
|
|
723
|
+
const { run } = this.state;
|
|
724
|
+
const steps = groupPipeline(run.config, runPipeline(run)).steps;
|
|
725
|
+
const index = steps.findIndex((candidate) => candidate.id === step);
|
|
726
|
+
if (index === -1) {
|
|
727
|
+
throw new Rejection(`unknown step \`${step}\`; steps: ${steps.map((candidate) => candidate.id).join(', ')}`);
|
|
728
|
+
}
|
|
729
|
+
if (stepStates(this.state)[index]?.state === 'done') {
|
|
730
|
+
throw new Rejection(`step \`${step}\` is already passed by every group`);
|
|
731
|
+
}
|
|
732
|
+
const current = run.skippedSteps.includes(step);
|
|
733
|
+
if (skip === current)
|
|
734
|
+
return;
|
|
735
|
+
const wanted = skip
|
|
736
|
+
? [...run.skippedSteps, step]
|
|
737
|
+
: run.skippedSteps.filter((item) => item !== step);
|
|
738
|
+
if (skip) {
|
|
739
|
+
const error = checkSkip(run.config, run.pipeline, wanted);
|
|
740
|
+
if (error !== null)
|
|
741
|
+
throw new Rejection(error);
|
|
742
|
+
}
|
|
743
|
+
run.skippedSteps = steps.map((item) => item.id).filter((id) => wanted.includes(id));
|
|
744
|
+
if (!skip)
|
|
745
|
+
return;
|
|
746
|
+
for (const group of this.state.groups) {
|
|
747
|
+
const running = group.attempts.find((attempt) => attempt.status === 'running' && attempt.stepIndex === index);
|
|
748
|
+
if (running) {
|
|
749
|
+
running.status = 'cancelled';
|
|
750
|
+
running.reason = { kind: 'skipped' };
|
|
751
|
+
running.finishedAt = this.now;
|
|
752
|
+
this.effects.push({
|
|
753
|
+
kind: 'stop_attempt',
|
|
754
|
+
run: run.id,
|
|
755
|
+
group: group.slug,
|
|
756
|
+
seq: running.seq,
|
|
757
|
+
});
|
|
758
|
+
group.status = 'queued';
|
|
759
|
+
group.pending = {
|
|
760
|
+
stepIndex: index,
|
|
761
|
+
feedback: running.input.feedback,
|
|
762
|
+
humanAnswer: null,
|
|
763
|
+
resume: false,
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
else if (group.status === 'needs_human' && group.pending?.stepIndex === index) {
|
|
767
|
+
group.status = 'queued';
|
|
768
|
+
group.question = null;
|
|
769
|
+
group.questions = null;
|
|
770
|
+
group.humanOnly = null;
|
|
771
|
+
group.pending = { ...group.pending, humanAnswer: null, resume: false };
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
/** A queued group never waits on a skipped step: it moves on, or goes to the merge. */
|
|
776
|
+
skipAhead() {
|
|
777
|
+
const { run } = this.state;
|
|
778
|
+
if (run.skippedSteps.length === 0)
|
|
779
|
+
return;
|
|
780
|
+
for (const group of this.state.groups) {
|
|
781
|
+
if (group.status !== 'queued' || group.pending === null)
|
|
782
|
+
continue;
|
|
783
|
+
const step = stepsOf(run, group)[group.pending.stepIndex];
|
|
784
|
+
if (!step || !run.skippedSteps.includes(step.id))
|
|
785
|
+
continue;
|
|
786
|
+
const next = nextUnskipped(run, group, group.pending.stepIndex + 1);
|
|
787
|
+
if (next === null) {
|
|
788
|
+
this.enqueueMerge(group, false);
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
group.pending = {
|
|
792
|
+
stepIndex: next,
|
|
793
|
+
feedback: group.pending.feedback,
|
|
794
|
+
humanAnswer: null,
|
|
795
|
+
resume: false,
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
retry(slug, permissions, specialists) {
|
|
801
|
+
const group = this.group(slug);
|
|
802
|
+
if (group.status === 'failed' || group.status === 'cancelled')
|
|
803
|
+
this.rejectDeliveryRetry(group);
|
|
804
|
+
if (group.status === 'failed') {
|
|
805
|
+
group.status = 'queued';
|
|
806
|
+
group.reason = null;
|
|
807
|
+
}
|
|
808
|
+
else if (group.status === 'conflict') {
|
|
809
|
+
this.enqueueMerge(group, true);
|
|
810
|
+
}
|
|
811
|
+
else if (group.status === 'cancelled') {
|
|
812
|
+
this.retryCancelled(group);
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
throw wrongStatus(group, 'retry', 'failed, cancelled or conflict');
|
|
816
|
+
}
|
|
817
|
+
// After every check: a refused retry leaves the snapshot as it was.
|
|
818
|
+
if (specialists) {
|
|
819
|
+
const changes = refreshSpecialists(this.state.run.config, specialists);
|
|
820
|
+
group.warnings.push(`config refreshed: ${changes.length > 0 ? changes.join('; ') : 'no changes'}`);
|
|
821
|
+
}
|
|
822
|
+
else {
|
|
823
|
+
this.refresh(group, permissions);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
rejectDeliveryRetry(group) {
|
|
827
|
+
if (isMessageGroup(group) || isResolveGroup(group)) {
|
|
828
|
+
throw new Rejection(`group ${group.slug} is ${group.status}; delivery is retried with \`aip run apply\``);
|
|
829
|
+
}
|
|
830
|
+
if (isRepairGroup(group)) {
|
|
831
|
+
throw new Rejection(`group ${group.slug} is ${group.status}; observers take a repair again`);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
retryCancelled(group) {
|
|
835
|
+
group.reason = null;
|
|
836
|
+
if (group.question !== null) {
|
|
837
|
+
group.status = 'needs_human';
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
const last = group.attempts.at(-1);
|
|
841
|
+
if (group.pending === null &&
|
|
842
|
+
last &&
|
|
843
|
+
!isServiceGroup(group) &&
|
|
844
|
+
attemptVerdict(last) === 'done' &&
|
|
845
|
+
last.stepIndex + 1 >= stepsOf(this.state.run, group).length) {
|
|
846
|
+
this.enqueueMerge(group, false);
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
this.restorePending(group);
|
|
850
|
+
group.status = 'queued';
|
|
851
|
+
}
|
|
852
|
+
/** Takes the permissions of the current configuration into the snapshot of the run. */
|
|
853
|
+
refresh(group, permissions) {
|
|
854
|
+
if (!permissions)
|
|
855
|
+
return;
|
|
856
|
+
const error = refreshPermissions(this.state.run.config, permissions);
|
|
857
|
+
if (error !== null)
|
|
858
|
+
group.warnings.push(`permissions not refreshed: ${error}`);
|
|
859
|
+
}
|
|
860
|
+
answer(slug, answer, by, permissions) {
|
|
861
|
+
if (answer.trim() === '')
|
|
862
|
+
throw new Rejection('answer must not be empty');
|
|
863
|
+
const group = this.group(slug);
|
|
864
|
+
if (group.status !== 'needs_human')
|
|
865
|
+
throw wrongStatus(group, 'answer', 'needs_human');
|
|
866
|
+
this.refresh(group, permissions);
|
|
867
|
+
const last = group.attempts.at(-1);
|
|
868
|
+
const asking = last && last.stepIndex === group.pending?.stepIndex ? last : undefined;
|
|
869
|
+
const stepId = asking?.stepId ??
|
|
870
|
+
group.attempts.find((candidate) => candidate.stepIndex === group.pending?.stepIndex)
|
|
871
|
+
?.stepId ??
|
|
872
|
+
last?.stepId ??
|
|
873
|
+
'';
|
|
874
|
+
group.decisions.push({
|
|
875
|
+
stepId,
|
|
876
|
+
question: group.question ?? '',
|
|
877
|
+
answer,
|
|
878
|
+
by,
|
|
879
|
+
...(asking ? { attemptSeq: asking.seq } : {}),
|
|
880
|
+
});
|
|
881
|
+
group.status = 'queued';
|
|
882
|
+
group.question = null;
|
|
883
|
+
group.questions = null;
|
|
884
|
+
if (group.pending) {
|
|
885
|
+
group.pending.humanAnswer = answer;
|
|
886
|
+
if (group.humanOnly === 'review')
|
|
887
|
+
group.pending.reviewed = true;
|
|
888
|
+
}
|
|
889
|
+
group.humanOnly = null;
|
|
890
|
+
}
|
|
891
|
+
enqueueMerge(group, updateOnConflict) {
|
|
892
|
+
group.status = 'merging';
|
|
893
|
+
group.pending = null;
|
|
894
|
+
group.mergeSeq = this.state.run.nextMergeSeq;
|
|
895
|
+
this.state.run.nextMergeSeq += 1;
|
|
896
|
+
group.mergeInFlight = false;
|
|
897
|
+
group.updateOnConflict = updateOnConflict;
|
|
898
|
+
}
|
|
899
|
+
mergeFinished(slug, outcome) {
|
|
900
|
+
const group = this.group(slug);
|
|
901
|
+
if (group.status !== 'merging' || !group.mergeInFlight)
|
|
902
|
+
return;
|
|
903
|
+
group.mergeInFlight = false;
|
|
904
|
+
group.updateOnConflict = false;
|
|
905
|
+
switch (outcome.kind) {
|
|
906
|
+
case 'merged':
|
|
907
|
+
group.status = 'merged';
|
|
908
|
+
group.mergeCommit = outcome.commit;
|
|
909
|
+
group.conflictFiles = [];
|
|
910
|
+
group.reason = null;
|
|
911
|
+
break;
|
|
912
|
+
case 'conflict':
|
|
913
|
+
group.status = 'conflict';
|
|
914
|
+
group.conflictFiles = outcome.files;
|
|
915
|
+
group.reason = `merge conflict in ${outcome.files.join(', ')}`;
|
|
916
|
+
break;
|
|
917
|
+
case 'conflict_updated':
|
|
918
|
+
group.status = 'queued';
|
|
919
|
+
group.conflictFiles = outcome.files;
|
|
920
|
+
group.reason = null;
|
|
921
|
+
group.pending = {
|
|
922
|
+
stepIndex: lastUnskipped(this.state.run, group),
|
|
923
|
+
feedback: `The branch of this group was updated from the run branch and has merge conflicts in: ${outcome.files.join(', ')}. Resolve every conflict, keep the intent of both sides, and report done.`,
|
|
924
|
+
humanAnswer: null,
|
|
925
|
+
resume: false,
|
|
926
|
+
};
|
|
927
|
+
break;
|
|
928
|
+
case 'failed':
|
|
929
|
+
this.failGroup(group, { kind: 'git', message: outcome.message });
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
startNextMerge() {
|
|
934
|
+
if (this.state.groups.some((group) => group.mergeInFlight))
|
|
935
|
+
return;
|
|
936
|
+
if (deliveryCheckActive(this.state))
|
|
937
|
+
return;
|
|
938
|
+
const next = this.state.groups
|
|
939
|
+
.filter((group) => group.status === 'merging')
|
|
940
|
+
.sort((left, right) => (left.mergeSeq ?? 0) - (right.mergeSeq ?? 0))[0];
|
|
941
|
+
if (!next)
|
|
942
|
+
return;
|
|
943
|
+
next.mergeInFlight = true;
|
|
944
|
+
this.effects.push({
|
|
945
|
+
kind: 'merge',
|
|
946
|
+
run: this.state.run.id,
|
|
947
|
+
group: next.slug,
|
|
948
|
+
updateOnConflict: next.updateOnConflict,
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
interrupted() {
|
|
952
|
+
// Whatever the delivery was doing (git work, the message writer, the resolver) died with
|
|
953
|
+
// the old daemon; drop it before failing its service groups, then start it again.
|
|
954
|
+
const delivery = this.state.run.pendingDelivery;
|
|
955
|
+
this.state.run.pendingDelivery = null;
|
|
956
|
+
for (const group of allGroups(this.state)) {
|
|
957
|
+
let wasRunning = false;
|
|
958
|
+
for (const attempt of group.attempts) {
|
|
959
|
+
if (attempt.status !== 'running')
|
|
960
|
+
continue;
|
|
961
|
+
if (attempt.reason?.kind === 'message') {
|
|
962
|
+
this.continueAfterMessage(group, attempt, attempt.reason);
|
|
963
|
+
continue;
|
|
964
|
+
}
|
|
965
|
+
if (attempt.reason?.kind === 'paused') {
|
|
966
|
+
this.continueAfterPause(group, attempt);
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
attempt.status = 'failed';
|
|
970
|
+
attempt.reason = { kind: 'interrupted' };
|
|
971
|
+
attempt.finishedAt = this.now;
|
|
972
|
+
wasRunning = true;
|
|
973
|
+
}
|
|
974
|
+
group.mergeInFlight = false;
|
|
975
|
+
if (wasRunning)
|
|
976
|
+
this.failGroup(group, { kind: 'interrupted' });
|
|
977
|
+
}
|
|
978
|
+
if (delivery?.repair) {
|
|
979
|
+
// A repair delivery is not resumed: the incident is taken again.
|
|
980
|
+
const group = this.state.repair;
|
|
981
|
+
if (group && !isTerminal(group.status)) {
|
|
982
|
+
group.status = 'failed';
|
|
983
|
+
group.reason = 'interrupted';
|
|
984
|
+
group.pending = null;
|
|
985
|
+
}
|
|
986
|
+
closeRepair(this.state, { taken: [], refund: false });
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
if (delivery?.checks) {
|
|
990
|
+
if (pointStalled(this.state, 'before_delivery')) {
|
|
991
|
+
for (const group of actionGroupsOf(this.state, 'before_delivery')) {
|
|
992
|
+
if (group.status !== 'queued')
|
|
993
|
+
continue;
|
|
994
|
+
group.status = 'cancelled';
|
|
995
|
+
group.reason = 'delivery interrupted';
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
// The interrupted check may fail without stopping the pipeline: the delivery goes on
|
|
1000
|
+
// after the remaining checks, without entering the point (and running the command) again.
|
|
1001
|
+
this.state.run.pendingDelivery = delivery;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
// An interrupted action before delivery is not started again: the delivery waits for a new request.
|
|
1005
|
+
if (delivery && !delivery.checks && pointClosed(this.state, 'before_delivery')) {
|
|
1006
|
+
try {
|
|
1007
|
+
this.effects.push(...requestDelivery(this.state, {
|
|
1008
|
+
groups: delivery.groups,
|
|
1009
|
+
force: delivery.force,
|
|
1010
|
+
files: delivery.files ?? [],
|
|
1011
|
+
auto: delivery.auto,
|
|
1012
|
+
}, { resume: true }));
|
|
1013
|
+
}
|
|
1014
|
+
catch (error) {
|
|
1015
|
+
if (!(error instanceof Rejection))
|
|
1016
|
+
throw error;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
//# sourceMappingURL=machine.js.map
|