@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,175 @@
|
|
|
1
|
+
import { catalogView } from './views/index.js';
|
|
2
|
+
/** What subscribers of the `queue` event see: runs that occupy places and readiness of the items. */
|
|
3
|
+
function queueSignature(view) {
|
|
4
|
+
return JSON.stringify({
|
|
5
|
+
runs: view.runs,
|
|
6
|
+
skipped: view.skipped,
|
|
7
|
+
autoDeliver: view.autoDeliver,
|
|
8
|
+
deliveryMode: view.deliveryMode,
|
|
9
|
+
items: view.items.map((item) => [item.id, item.readiness, item.after, item.postponed]),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/** The subscribers of the daemon and the one counter of the events they get. */
|
|
13
|
+
export class Publisher {
|
|
14
|
+
services;
|
|
15
|
+
snapshots;
|
|
16
|
+
subscribers = new Set();
|
|
17
|
+
seq = 0;
|
|
18
|
+
/** The signature of each queue as subscribers last saw it. */
|
|
19
|
+
queueRuns = new Map();
|
|
20
|
+
/** Per repository: return item of each returned run, as subscribers last saw it. */
|
|
21
|
+
returnItems = new Map();
|
|
22
|
+
repositoriesJson = '';
|
|
23
|
+
observersJson = '';
|
|
24
|
+
constructor(services, snapshots) {
|
|
25
|
+
this.services = services;
|
|
26
|
+
this.snapshots = snapshots;
|
|
27
|
+
}
|
|
28
|
+
/** The ports of the features, each a view of this publisher. */
|
|
29
|
+
ports() {
|
|
30
|
+
const runChanged = (state) => this.run(state);
|
|
31
|
+
return {
|
|
32
|
+
runs: {
|
|
33
|
+
runSaved: (state) => {
|
|
34
|
+
this.run(state);
|
|
35
|
+
this.repositories();
|
|
36
|
+
},
|
|
37
|
+
waitsChanged: (states, repositories) => {
|
|
38
|
+
for (const state of states)
|
|
39
|
+
this.run(state);
|
|
40
|
+
for (const repository of repositories) {
|
|
41
|
+
const queue = this.services.queue.store.get(repository);
|
|
42
|
+
if (queue)
|
|
43
|
+
this.queueChecked(queue);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
queue: {
|
|
48
|
+
queueSaved: (queue) => this.queue(queue),
|
|
49
|
+
queueChecked: (queue) => this.queueChecked(queue),
|
|
50
|
+
},
|
|
51
|
+
repos: { repositoriesChanged: () => this.repositories() },
|
|
52
|
+
tags: { tagsChanged: (repository) => this.tags(repository) },
|
|
53
|
+
// Configuration may change `delivery.auto`, which the queue view shows.
|
|
54
|
+
config: {
|
|
55
|
+
configChanged: (repository) => {
|
|
56
|
+
const queue = this.services.queue.store.get(repository);
|
|
57
|
+
if (queue)
|
|
58
|
+
this.queue(queue);
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
processes: {
|
|
62
|
+
hasSubscribers: () => this.subscribers.size > 0,
|
|
63
|
+
processesChanged: (payload) => this.send('processes', payload),
|
|
64
|
+
},
|
|
65
|
+
observers: {
|
|
66
|
+
incident: (state, incident) => this.send('incident', {
|
|
67
|
+
runId: state.run.id,
|
|
68
|
+
repository: state.run.repository,
|
|
69
|
+
incident,
|
|
70
|
+
}),
|
|
71
|
+
observersChanged: () => this.observers(),
|
|
72
|
+
runChanged,
|
|
73
|
+
},
|
|
74
|
+
delivery: { runChanged },
|
|
75
|
+
artifacts: { runChanged },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A new subscriber gets the snapshot of the runs, queues, repositories and tags, then the last
|
|
80
|
+
* list of background processes, then every event. Returns the function that unsubscribes.
|
|
81
|
+
*/
|
|
82
|
+
subscribe(send) {
|
|
83
|
+
this.seq += 1;
|
|
84
|
+
const runs = this.snapshots.recentRuns();
|
|
85
|
+
const queues = this.snapshots.activeQueues();
|
|
86
|
+
const repositories = this.snapshots.repositories();
|
|
87
|
+
this.repositoriesJson = JSON.stringify(repositories);
|
|
88
|
+
const tags = catalogView(this.services.tags.all());
|
|
89
|
+
send(JSON.stringify({ event: 'snapshot', seq: this.seq, runs, queues, repositories, tags }));
|
|
90
|
+
const processes = this.services.processes.lastSent();
|
|
91
|
+
if (processes !== null) {
|
|
92
|
+
this.seq += 1;
|
|
93
|
+
send(JSON.stringify({ event: 'processes', seq: this.seq, processes }));
|
|
94
|
+
}
|
|
95
|
+
this.subscribers.add(send);
|
|
96
|
+
this.services.processes.watch();
|
|
97
|
+
return () => {
|
|
98
|
+
this.subscribers.delete(send);
|
|
99
|
+
if (this.subscribers.size === 0)
|
|
100
|
+
this.services.processes.unwatch();
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** The `run` event. */
|
|
104
|
+
run(state) {
|
|
105
|
+
if (this.subscribers.size === 0)
|
|
106
|
+
return;
|
|
107
|
+
this.send('run', { run: this.snapshots.run(state) });
|
|
108
|
+
}
|
|
109
|
+
/** Sends the `queue` event and remembers which runs subscribers have seen. */
|
|
110
|
+
queue(queue) {
|
|
111
|
+
const view = this.snapshots.queue(queue);
|
|
112
|
+
this.queueRuns.set(queue.repository, queueSignature(view));
|
|
113
|
+
this.send('queue', { queue: view });
|
|
114
|
+
this.repositories();
|
|
115
|
+
this.returned(queue);
|
|
116
|
+
}
|
|
117
|
+
/** Sends the queue when it looks different to the subscribers. */
|
|
118
|
+
queueChecked(queue) {
|
|
119
|
+
const seen = this.queueRuns.get(queue.repository);
|
|
120
|
+
if (seen !== queueSignature(this.snapshots.queue(queue)))
|
|
121
|
+
this.queue(queue);
|
|
122
|
+
}
|
|
123
|
+
/** Publishes the registry when its counters or entries differ from what subscribers last saw. */
|
|
124
|
+
repositories() {
|
|
125
|
+
if (this.subscribers.size === 0)
|
|
126
|
+
return;
|
|
127
|
+
const repositories = this.snapshots.repositories();
|
|
128
|
+
const text = JSON.stringify(repositories);
|
|
129
|
+
if (text === this.repositoriesJson)
|
|
130
|
+
return;
|
|
131
|
+
this.repositoriesJson = text;
|
|
132
|
+
this.send('repositories', { repositories });
|
|
133
|
+
}
|
|
134
|
+
/** Publishes the observers when they look different from what subscribers last saw. */
|
|
135
|
+
observers() {
|
|
136
|
+
if (this.subscribers.size === 0)
|
|
137
|
+
return;
|
|
138
|
+
const view = this.snapshots.observers();
|
|
139
|
+
const text = JSON.stringify(view);
|
|
140
|
+
if (text === this.observersJson)
|
|
141
|
+
return;
|
|
142
|
+
this.observersJson = text;
|
|
143
|
+
this.send('observers', { observers: view });
|
|
144
|
+
}
|
|
145
|
+
/** Publishes all tags after a change of the catalog of the repository. */
|
|
146
|
+
tags(repository) {
|
|
147
|
+
this.send('tags', { repository, tags: catalogView(this.services.tags.all()) });
|
|
148
|
+
}
|
|
149
|
+
/** Sends a `run` event to every run whose return item appeared, changed or went away. */
|
|
150
|
+
returned(queue) {
|
|
151
|
+
const before = this.returnItems.get(queue.repository) ?? new Map();
|
|
152
|
+
const after = new Map();
|
|
153
|
+
for (const item of queue.items)
|
|
154
|
+
if (item.run !== null)
|
|
155
|
+
after.set(item.run, item.id);
|
|
156
|
+
this.returnItems.set(queue.repository, after);
|
|
157
|
+
for (const run of new Set([...before.keys(), ...after.keys()])) {
|
|
158
|
+
if (before.get(run) === after.get(run))
|
|
159
|
+
continue;
|
|
160
|
+
const state = this.services.runs.states.lookup(run);
|
|
161
|
+
if (state)
|
|
162
|
+
this.run(state);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/** One event with the next number; nothing is counted without subscribers. */
|
|
166
|
+
send(event, payload) {
|
|
167
|
+
if (this.subscribers.size === 0)
|
|
168
|
+
return;
|
|
169
|
+
this.seq += 1;
|
|
170
|
+
const line = JSON.stringify({ event, seq: this.seq, ...payload });
|
|
171
|
+
for (const send of this.subscribers)
|
|
172
|
+
send(line);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=publisher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../../src/presentation/ipc/publisher.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qGAAqG;AACrG,SAAS,cAAc,CAAC,IAAe;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB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{ errorMessage } from '../../platform/errors/index.js';
|
|
2
|
+
import { chmodSync, existsSync, readFileSync, renameSync, rmSync, statSync, } from 'node:fs';
|
|
3
|
+
import { createServer } from 'node:net';
|
|
4
|
+
import { parseRequest } from './contract/index.js';
|
|
5
|
+
const SUBSCRIBER_BUFFER_LIMIT = 4 * 1024 * 1024;
|
|
6
|
+
/** How often the daemon checks that its socket file and its lock are still in place. */
|
|
7
|
+
export const SOCKET_CHECK_MS = 5_000;
|
|
8
|
+
/** The file at `path` is the socket the daemon listens on (not removed, not replaced). */
|
|
9
|
+
function sameFile(path, own) {
|
|
10
|
+
try {
|
|
11
|
+
const current = statSync(path);
|
|
12
|
+
return current.dev === own.dev && current.ino === own.ino;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** The lock at `path` holds the pid of this process. */
|
|
19
|
+
function ownLock(path) {
|
|
20
|
+
try {
|
|
21
|
+
return readFileSync(path, 'utf8').trim() === String(process.pid);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function answer(daemon, line) {
|
|
28
|
+
const parsed = parseRequest(line);
|
|
29
|
+
if ('error' in parsed)
|
|
30
|
+
return { id: parsed.id, ok: false, error: parsed.error };
|
|
31
|
+
try {
|
|
32
|
+
return { id: parsed.id, ok: true, result: await daemon.handle(parsed.request) };
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return { id: parsed.id, ok: false, error: errorMessage(error) };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Sends events to a subscribed connection; a connection that falls behind is dropped. */
|
|
39
|
+
function subscribeConnection(serving, connection) {
|
|
40
|
+
const unsubscribe = serving.daemon.subscribe((event) => {
|
|
41
|
+
if (connection.destroyed)
|
|
42
|
+
return;
|
|
43
|
+
if (connection.writableLength > SUBSCRIBER_BUFFER_LIMIT) {
|
|
44
|
+
connection.destroy();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
connection.write(`${event}\n`);
|
|
48
|
+
});
|
|
49
|
+
serving.subscriptions.add(connection);
|
|
50
|
+
connection.once('close', () => {
|
|
51
|
+
unsubscribe();
|
|
52
|
+
serving.subscriptions.delete(connection);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function handleLine(serving, connection, line, close) {
|
|
56
|
+
const parsed = parseRequest(line);
|
|
57
|
+
if ('request' in parsed && parsed.request.method === 'subscribe') {
|
|
58
|
+
subscribeConnection(serving, connection);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
void answer(serving.daemon, line).then((response) => {
|
|
62
|
+
if (!connection.destroyed)
|
|
63
|
+
connection.write(`${JSON.stringify(response)}\n`);
|
|
64
|
+
if (response.ok && response.result?.stopping)
|
|
65
|
+
close();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function handleConnection(serving, connection, close) {
|
|
69
|
+
connection.setEncoding('utf8');
|
|
70
|
+
let buffer = '';
|
|
71
|
+
connection.on('data', (chunk) => {
|
|
72
|
+
buffer += chunk;
|
|
73
|
+
let end = buffer.indexOf('\n');
|
|
74
|
+
while (end !== -1) {
|
|
75
|
+
const line = buffer.slice(0, end);
|
|
76
|
+
buffer = buffer.slice(end + 1);
|
|
77
|
+
handleLine(serving, connection, line, close);
|
|
78
|
+
end = buffer.indexOf('\n');
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
connection.on('error', () => undefined);
|
|
82
|
+
}
|
|
83
|
+
async function shutdown(serving) {
|
|
84
|
+
const { daemon, server, lockPath, own } = serving;
|
|
85
|
+
if (serving.socketCheck)
|
|
86
|
+
clearInterval(serving.socketCheck);
|
|
87
|
+
for (const connection of serving.subscriptions)
|
|
88
|
+
connection.destroy();
|
|
89
|
+
// Closing a listening Unix socket unlinks its path, whatever file is there now: a file put in
|
|
90
|
+
// place of the socket by someone else is moved aside for the close and then put back.
|
|
91
|
+
const foreign = own !== null && existsSync(daemon.socket) && !sameFile(daemon.socket, own);
|
|
92
|
+
const aside = `${daemon.socket}.${process.pid}.keep`;
|
|
93
|
+
if (foreign)
|
|
94
|
+
renameSync(daemon.socket, aside);
|
|
95
|
+
await new Promise((resolve) => server.close(() => resolve()));
|
|
96
|
+
if (foreign)
|
|
97
|
+
renameSync(aside, daemon.socket);
|
|
98
|
+
await daemon.stop();
|
|
99
|
+
if (own && sameFile(daemon.socket, own))
|
|
100
|
+
rmSync(daemon.socket, { force: true });
|
|
101
|
+
if (existsSync(lockPath) && readFileSync(lockPath, 'utf8').trim() === String(process.pid)) {
|
|
102
|
+
rmSync(lockPath, { force: true });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Without its socket nobody can reach the daemon; without its lock the next client starts
|
|
107
|
+
* another one. Either is gone when the state directory is removed (the socket may live in the
|
|
108
|
+
* temporary directory, see `socketPath`): the daemon then stops by itself.
|
|
109
|
+
*/
|
|
110
|
+
function watchSocket(serving, socketStat, intervalMs, close) {
|
|
111
|
+
const { daemon, lockPath } = serving;
|
|
112
|
+
serving.socketCheck = setInterval(() => {
|
|
113
|
+
if (serving.closing)
|
|
114
|
+
return;
|
|
115
|
+
const lost = !sameFile(daemon.socket, socketStat)
|
|
116
|
+
? `socket ${daemon.socket}`
|
|
117
|
+
: !ownLock(lockPath)
|
|
118
|
+
? `lock ${lockPath}`
|
|
119
|
+
: null;
|
|
120
|
+
if (lost === null)
|
|
121
|
+
return;
|
|
122
|
+
process.stderr.write(`aip daemon: ${lost} is gone; stopping\n`);
|
|
123
|
+
close();
|
|
124
|
+
}, intervalMs);
|
|
125
|
+
serving.socketCheck.unref();
|
|
126
|
+
}
|
|
127
|
+
/** Listens on the socket of the daemon and starts it; the caller holds the lock. */
|
|
128
|
+
export async function serveDaemon(daemon, options) {
|
|
129
|
+
rmSync(daemon.socket, { force: true });
|
|
130
|
+
let resolveClosed = () => undefined;
|
|
131
|
+
const closed = new Promise((resolve) => {
|
|
132
|
+
resolveClosed = resolve;
|
|
133
|
+
});
|
|
134
|
+
const serving = {
|
|
135
|
+
daemon,
|
|
136
|
+
server: createServer((connection) => handleConnection(serving, connection, () => void close())),
|
|
137
|
+
lockPath: options.lockPath,
|
|
138
|
+
subscriptions: new Set(),
|
|
139
|
+
own: null,
|
|
140
|
+
socketCheck: null,
|
|
141
|
+
closing: null,
|
|
142
|
+
};
|
|
143
|
+
const close = () => {
|
|
144
|
+
serving.closing ??= shutdown(serving).then(resolveClosed);
|
|
145
|
+
return serving.closing;
|
|
146
|
+
};
|
|
147
|
+
try {
|
|
148
|
+
await new Promise((resolve, reject) => {
|
|
149
|
+
serving.server.once('error', reject);
|
|
150
|
+
serving.server.listen(daemon.socket, () => resolve());
|
|
151
|
+
});
|
|
152
|
+
chmodSync(daemon.socket, 0o600);
|
|
153
|
+
const socketStat = statSync(daemon.socket);
|
|
154
|
+
serving.own = socketStat;
|
|
155
|
+
await daemon.start();
|
|
156
|
+
watchSocket(serving, socketStat, options.socketCheckMs ?? SOCKET_CHECK_MS, () => void close());
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
serving.server.close();
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
return { close, closed };
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/presentation/ipc/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,MAAM,EACN,QAAQ,GAET,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAA4B,MAAM,UAAU,CAAC;AAElE,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;AAYhF,MAAM,uBAAuB,G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1D,OAAO,OAAO,CAAC,OAAO,CAAC;IACzB,CAAC,CAAC;IACF,IAAI,CAAC;QACH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACrC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAChC,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,GAAG,UAAU,CAAC;QACzB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,aAAa,IAAI,eAAe,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/presentation/ipc/services.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { returnItemOf, canReturn } from '../../feature/queue/types/index.js';
|
|
2
|
+
import { retryableGroups } from '../../feature/runs/types/index.js';
|
|
3
|
+
import { groupView, observersView, queueView, repositoryViews, runView, withQueue, } from './views/index.js';
|
|
4
|
+
/** The form of the answers and events: reads of several features turned into views. */
|
|
5
|
+
export class Snapshots {
|
|
6
|
+
services;
|
|
7
|
+
constructor(services) {
|
|
8
|
+
this.services = services;
|
|
9
|
+
}
|
|
10
|
+
/** The view of a run; missing diff statistics are computed in the background. */
|
|
11
|
+
run(state, now = this.services.now()) {
|
|
12
|
+
const { delivery, tags, runs, artifacts, observers, queue } = this.services;
|
|
13
|
+
delivery.diffs.ensure(state);
|
|
14
|
+
const view = runView(state, now, (slug) => delivery.diffs.diffOf(state.run.id, slug), tags.of(state.run.repository), runs.engine.waitOf, artifacts.counts(state.run.id), observers.settings());
|
|
15
|
+
const own = queue.store.get(state.run.repository);
|
|
16
|
+
const item = own ? returnItemOf(own, state.run.id) : null;
|
|
17
|
+
return withQueue({ ...view, returnable: this.returnable(state) }, item?.id ?? null);
|
|
18
|
+
}
|
|
19
|
+
/** The recent runs, the latest first. */
|
|
20
|
+
recentRuns(now = this.services.now()) {
|
|
21
|
+
return this.services.runs.states.recent().map((state) => this.run(state, now));
|
|
22
|
+
}
|
|
23
|
+
queue(queue) {
|
|
24
|
+
const { config, tags, runs } = this.services;
|
|
25
|
+
const delivery = config.delivery(queue.repository);
|
|
26
|
+
return queueView(queue, (id) => runs.states.lookup(id), delivery.auto, tags.of(queue.repository), delivery.mode, runs.engine.waitOf, delivery.names);
|
|
27
|
+
}
|
|
28
|
+
/** The queues a new subscriber needs: those with items, places, a stop or running. */
|
|
29
|
+
activeQueues() {
|
|
30
|
+
return this.services.queue.store
|
|
31
|
+
.all()
|
|
32
|
+
.filter((queue) => queue.items.length > 0 ||
|
|
33
|
+
queue.status === 'running' ||
|
|
34
|
+
queue.runs.length > 0 ||
|
|
35
|
+
queue.stop !== null)
|
|
36
|
+
.map((queue) => this.queue(queue));
|
|
37
|
+
}
|
|
38
|
+
/** The observers as the settings page shows them. */
|
|
39
|
+
observers() {
|
|
40
|
+
return observersView(this.services.observers.settings(), this.services.runs.states.all());
|
|
41
|
+
}
|
|
42
|
+
repositories() {
|
|
43
|
+
const { registry, runs, queue, config } = this.services;
|
|
44
|
+
return repositoryViews(registry.entries(), runs.states.all(), queue.store.all(), config.home());
|
|
45
|
+
}
|
|
46
|
+
group(details) {
|
|
47
|
+
const { state, group, worktree, log } = details;
|
|
48
|
+
const { delivery, runs, now } = this.services;
|
|
49
|
+
delivery.diffs.ensure(state);
|
|
50
|
+
return groupView(state, group, worktree, log, now(), delivery.diffs.diffOf(state.run.id, group.slug), runs.engine.waitOf);
|
|
51
|
+
}
|
|
52
|
+
/** Whether `queue_return` would take the run: something to retry, and not in its queue yet. */
|
|
53
|
+
returnable(state) {
|
|
54
|
+
const queue = this.services.queue.store.get(state.run.repository);
|
|
55
|
+
if (!queue)
|
|
56
|
+
return retryableGroups(state).length > 0;
|
|
57
|
+
return canReturn(queue, state);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=snapshots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../../src/presentation/ipc/snapshots.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AASpE,OAAO,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,OAAO,EACP,SAAS,GACV,MAAM,kBAAkB,CAAC;AAE1B,uFAAuF;AACvF,MAAM,OAAO,SAAS;IACH,QAAQ,CAAiB;IAE1C,YAAY,QAAwB;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,iFAAiF;IACjF,GAAG,CAAC,KAAe,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;QAC5C,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC5E,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,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AClG,CAAC;IAED,KAAK,CAAC,OAKL;QACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QAChD,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9C,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,SAAS,CACd,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,EAAE,EACL,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,EAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CACnB,CAAC;IACJ,CAAC;IAED,+FAA+F;IACvF,UAAU,CAAC,KAAe;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClE,IAAI,CAAC,KAAK;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACrD,OAAO,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The catalog sorted by repository, then by name ignoring case. */
|
|
2
|
+
export function catalogView(catalog) {
|
|
3
|
+
return [...catalog]
|
|
4
|
+
.sort((a, b) => a.repository.localeCompare(b.repository) ||
|
|
5
|
+
a.name.toLocaleLowerCase('und').localeCompare(b.name.toLocaleLowerCase('und')) ||
|
|
6
|
+
a.id.localeCompare(b.id))
|
|
7
|
+
.map(({ id, repository, name, color, task }) => ({ id, repository, name, color, task }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/views/catalog.ts"],"names":[],"mappings":"AAGA,oEAAoE;AACpE,MAAM,UAAU,WAAW,CAAC,OAAuB;IACjD,OAAO,CAAC,GAAG,OAAO,CAAC;SAChB,IAAI,CACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;QACxC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAC3B;SACA,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { suggestPatterns } from '../../../feature/agents/types/index.js';
|
|
2
|
+
import { actionPointOf, attemptStepLabel, attemptVerdict, describeFailReason, groupRef, groupUsage, isServiceGroup, isSplitGroup, } from '../../../feature/runs/types/index.js';
|
|
3
|
+
import { NO_WAITS, displayStatus, duration, groupHold, groupLimitUntil, legacyOutsideChanges, serviceStatus, } from './rows.js';
|
|
4
|
+
/**
|
|
5
|
+
* The answer given to the question of an attempt: a decision that records the number of the
|
|
6
|
+
* asking attempt belongs to that attempt; decisions without a number (older runs) are matched
|
|
7
|
+
* by order — the N-th one of a step to the N-th needs_human attempt of that step not claimed
|
|
8
|
+
* by a numbered decision.
|
|
9
|
+
*/
|
|
10
|
+
function attemptDecision(group, attempt) {
|
|
11
|
+
const numbered = group.decisions.find((d) => d.attemptSeq === attempt.seq);
|
|
12
|
+
if (numbered) {
|
|
13
|
+
return { question: numbered.question, answer: numbered.answer, by: numbered.by };
|
|
14
|
+
}
|
|
15
|
+
if (attempt.status !== 'finished' || attempt.report?.verdict !== 'needs_human')
|
|
16
|
+
return null;
|
|
17
|
+
const claimed = new Set(group.decisions.map((d) => d.attemptSeq));
|
|
18
|
+
const asked = group.attempts.filter((candidate) => candidate.stepId === attempt.stepId &&
|
|
19
|
+
candidate.status === 'finished' &&
|
|
20
|
+
candidate.report?.verdict === 'needs_human' &&
|
|
21
|
+
!claimed.has(candidate.seq));
|
|
22
|
+
const decision = group.decisions.filter((d) => d.stepId === attempt.stepId && d.attemptSeq === undefined)[asked.indexOf(attempt)];
|
|
23
|
+
return decision
|
|
24
|
+
? { question: decision.question, answer: decision.answer, by: decision.by }
|
|
25
|
+
: null;
|
|
26
|
+
}
|
|
27
|
+
export function attemptView(state, group, attempt, now, allowCommands = []) {
|
|
28
|
+
return {
|
|
29
|
+
seq: attempt.seq,
|
|
30
|
+
stepId: attempt.stepId,
|
|
31
|
+
stepName: attemptStepLabel(state, group, attempt),
|
|
32
|
+
round: attempt.round,
|
|
33
|
+
specialist: attempt.specialist,
|
|
34
|
+
runtime: attempt.runtime,
|
|
35
|
+
model: attempt.model,
|
|
36
|
+
status: attempt.status,
|
|
37
|
+
verdict: attemptVerdict(attempt),
|
|
38
|
+
summary: attempt.report?.summary ?? null,
|
|
39
|
+
feedback: attempt.report?.feedback ?? null,
|
|
40
|
+
decision: attemptDecision(group, attempt),
|
|
41
|
+
reason: attempt.reason ? describeFailReason(attempt.reason) : null,
|
|
42
|
+
startedAt: attempt.startedAt,
|
|
43
|
+
durationMs: duration(attempt.startedAt, attempt.finishedAt, now),
|
|
44
|
+
usage: attempt.usage,
|
|
45
|
+
denials: attempt.denials.map((denial) => ({
|
|
46
|
+
tool: denial.tool,
|
|
47
|
+
command: denial.command,
|
|
48
|
+
suggestions: denial.command === null ? [] : suggestPatterns(denial.command, allowCommands),
|
|
49
|
+
})),
|
|
50
|
+
outsideChanges: [...attempt.outsideChanges],
|
|
51
|
+
message: attempt.input.message ? { ...attempt.input.message } : null,
|
|
52
|
+
interrupting: attempt.status === 'running' &&
|
|
53
|
+
(attempt.reason?.kind === 'message' || attempt.reason?.kind === 'paused'),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function allowCommandsOf(state, specialist) {
|
|
57
|
+
return (state.run.config.specialists.find((candidate) => candidate.slug === specialist)
|
|
58
|
+
?.allowCommands ?? []);
|
|
59
|
+
}
|
|
60
|
+
export function permissionHints(attempts) {
|
|
61
|
+
const hints = new Set();
|
|
62
|
+
for (const attempt of attempts) {
|
|
63
|
+
for (const denial of attempt.denials) {
|
|
64
|
+
for (const suggestion of denial.suggestions) {
|
|
65
|
+
if (suggestion.pattern !== null)
|
|
66
|
+
hints.add(suggestion.pattern);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return [...hints];
|
|
71
|
+
}
|
|
72
|
+
export function groupView(state, group, worktree, log, now, diff = null, waits = NO_WAITS) {
|
|
73
|
+
const wait = group.status === 'queued' ? waits(state.run.id, group.slug) : null;
|
|
74
|
+
const legacy = legacyOutsideChanges(group);
|
|
75
|
+
const attempts = group.attempts.map((attempt) => {
|
|
76
|
+
const view = attemptView(state, group, attempt, now, allowCommandsOf(state, attempt.specialist));
|
|
77
|
+
const restored = legacy.outside.get(attempt.seq);
|
|
78
|
+
return restored ? { ...view, outsideChanges: restored } : view;
|
|
79
|
+
});
|
|
80
|
+
return {
|
|
81
|
+
runId: state.run.id,
|
|
82
|
+
slug: group.slug,
|
|
83
|
+
title: group.title,
|
|
84
|
+
task: group.task,
|
|
85
|
+
status: displayStatus(isServiceGroup(group) ? serviceStatus(group) : group.status, wait, groupHold(state, group)),
|
|
86
|
+
wait: groupHold(state, group) === null ? wait : null,
|
|
87
|
+
branch: isSplitGroup(group) || actionPointOf(group) !== undefined
|
|
88
|
+
? state.run.branch
|
|
89
|
+
: groupRef(state.run, group.slug),
|
|
90
|
+
worktree,
|
|
91
|
+
question: group.question,
|
|
92
|
+
questions: group.questions,
|
|
93
|
+
humanOnly: group.humanOnly,
|
|
94
|
+
decisions: group.decisions.map((decision) => ({ ...decision })),
|
|
95
|
+
reason: group.reason,
|
|
96
|
+
limitUntil: groupLimitUntil(group),
|
|
97
|
+
warnings: legacy.warnings,
|
|
98
|
+
conflictFiles: [...group.conflictFiles],
|
|
99
|
+
delivery: {
|
|
100
|
+
...group.delivery,
|
|
101
|
+
files: [...group.delivery.files],
|
|
102
|
+
conflicts: [...group.delivery.conflicts],
|
|
103
|
+
userEdits: [...group.delivery.userEdits],
|
|
104
|
+
},
|
|
105
|
+
usage: groupUsage(group),
|
|
106
|
+
diff,
|
|
107
|
+
attempts,
|
|
108
|
+
permissionHints: permissionHints(attempts),
|
|
109
|
+
log,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/views/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAIL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,GACb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB;;;;;GAKG;AACH,SAAS,eAAe,CAAC,KAAY,EAAE,OAAgB;IACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;I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AC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC;QACrC,QAAQ;QACR,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;QAC/D,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,eAAe,CAAC,KAAK,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,aAAa,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;QACvC,QAAQ,EAAE;YACR,GAAG,KAAK,CAAC,QAAQ;YACjB,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;YAChC,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;YACxC,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;SACzC;QACD,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;QACxB,IAAI;QACJ,QAAQ;QACR,eAAe,EAAE,eAAe,CAAC,QAAQ,CAAC;QAC1C,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { catalogView } from './catalog.js';
|
|
2
|
+
export { attemptView, groupView } from './groups.js';
|
|
3
|
+
export { pickSpecChange } from '../../../feature/delivery/types/index.js';
|
|
4
|
+
export { observersView } from './observers.js';
|
|
5
|
+
export { queueView } from './queue.js';
|
|
6
|
+
export { displayPath, repositoryViews } from './repositories.js';
|
|
7
|
+
export { deliveryStage, runView, withQueue, clockStoppedAt } from './runs.js';
|
|
8
|
+
export { displayStatus, groupLimitUntil, groupRow, systemGroups, systemRow, legacyOutsideChanges, } from './rows.js';
|
|
9
|
+
export { tagViews } from './tags.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function observerHistoryView(value) {
|
|
2
|
+
return {
|
|
3
|
+
items: value.items.map(({ id, runId, runNumber, runTitle, repository, attemptSeq, runtime, model, startedAt, finishedAt, status, verdict, result, failureKind, usage, }) => ({
|
|
4
|
+
id,
|
|
5
|
+
runId,
|
|
6
|
+
runNumber,
|
|
7
|
+
runTitle,
|
|
8
|
+
repository,
|
|
9
|
+
attemptSeq,
|
|
10
|
+
runtime,
|
|
11
|
+
model,
|
|
12
|
+
startedAt,
|
|
13
|
+
finishedAt,
|
|
14
|
+
status,
|
|
15
|
+
verdict,
|
|
16
|
+
result,
|
|
17
|
+
failureKind,
|
|
18
|
+
usage,
|
|
19
|
+
})),
|
|
20
|
+
nextCursor: value.nextCursor,
|
|
21
|
+
limit: value.limit,
|
|
22
|
+
projects: value.projects,
|
|
23
|
+
asOf: value.asOf,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=observer-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observer-history.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/views/observer-history.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,mBAAmB,CAAC,KAA0B;IAC5D,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CACpB,CAAC,EACC,EAAE,EACF,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,GACN,EAAE,EAAE,CAAC,CAAC;YACL,EAAE;YACF,KAAK;YACL,SAAS;YACT,QAAQ;YACR,UAAU;YACV,UAAU;YACV,OAAO;YACP,KAAK;YACL,SAAS;YACT,UAAU;YACV,MAAM;YACN,OAAO;YACP,MAAM;YACN,WAAW;YACX,KAAK;SACN,CAAC,CACH;QACD,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { repairActive } from './runs.js';
|
|
2
|
+
export function observersView(settings, states) {
|
|
3
|
+
const running = [];
|
|
4
|
+
let waiting = 0;
|
|
5
|
+
for (const state of states) {
|
|
6
|
+
const { incident } = state.run.repair;
|
|
7
|
+
if (incident !== null) {
|
|
8
|
+
running.push({ runId: state.run.id, repository: state.run.repository, incident });
|
|
9
|
+
}
|
|
10
|
+
else if (repairActive(state, settings)) {
|
|
11
|
+
waiting += 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return { settings, workers: { running, waiting } };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=observers.js.map
|