@hoknie/aip 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +13 -0
- package/README.md +74 -2
- package/dist/app/agents.js +20 -0
- package/dist/app/agents.js.map +1 -0
- package/dist/app/application.js +205 -0
- package/dist/app/application.js.map +1 -0
- package/dist/app/daemon.js +71 -0
- package/dist/app/daemon.js.map +1 -0
- package/dist/app/index.js +5 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/lifecycle.js +34 -0
- package/dist/app/lifecycle.js.map +1 -0
- package/dist/app/maintenance.js +27 -0
- package/dist/app/maintenance.js.map +1 -0
- package/dist/app/timings.js +24 -0
- package/dist/app/timings.js.map +1 -0
- package/dist/app/wiring.js +58 -0
- package/dist/app/wiring.js.map +1 -0
- package/dist/cli/main.js +31 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/feature/agents/clients/agy/events.js +36 -0
- package/dist/feature/agents/clients/agy/events.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-commands.js +29 -0
- package/dist/feature/agents/clients/agy/guard-commands.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-paths.js +36 -0
- package/dist/feature/agents/clients/agy/guard-paths.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard.js +77 -0
- package/dist/feature/agents/clients/agy/guard.js.map +1 -0
- package/dist/feature/agents/clients/agy/hooks.js +46 -0
- package/dist/feature/agents/clients/agy/hooks.js.map +1 -0
- package/dist/feature/agents/clients/agy/index.js +5 -0
- package/dist/feature/agents/clients/agy/index.js.map +1 -0
- package/dist/feature/agents/clients/agy/parser.js +63 -0
- package/dist/feature/agents/clients/agy/parser.js.map +1 -0
- package/dist/feature/agents/clients/agy/permissions.js +40 -0
- package/dist/feature/agents/clients/agy/permissions.js.map +1 -0
- package/dist/feature/agents/clients/agy/runtime.js +115 -0
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -0
- package/dist/feature/agents/clients/agy/transcript.js +65 -0
- package/dist/feature/agents/clients/agy/transcript.js.map +1 -0
- package/dist/feature/agents/clients/claude/index.js +6 -0
- package/dist/feature/agents/clients/claude/index.js.map +1 -0
- package/dist/feature/agents/clients/claude/models.js +8 -0
- package/dist/feature/agents/clients/claude/models.js.map +1 -0
- package/dist/feature/agents/clients/claude/parser.js +229 -0
- package/dist/feature/agents/clients/claude/parser.js.map +1 -0
- package/dist/feature/agents/clients/claude/permissions.js +70 -0
- package/dist/feature/agents/clients/claude/permissions.js.map +1 -0
- package/dist/feature/agents/clients/claude/runtime.js +118 -0
- package/dist/feature/agents/clients/claude/runtime.js.map +1 -0
- package/dist/feature/agents/clients/claude/transcript.js +105 -0
- package/dist/feature/agents/clients/claude/transcript.js.map +1 -0
- package/dist/feature/agents/clients/naming/index.js +2 -0
- package/dist/feature/agents/clients/naming/index.js.map +1 -0
- package/dist/feature/agents/clients/naming/naming.js +15 -0
- package/dist/feature/agents/clients/naming/naming.js.map +1 -0
- package/dist/feature/agents/clients/opencode/index.js +5 -0
- package/dist/feature/agents/clients/opencode/index.js.map +1 -0
- package/dist/feature/agents/clients/opencode/models.js +38 -0
- package/dist/feature/agents/clients/opencode/models.js.map +1 -0
- package/dist/feature/agents/clients/opencode/parser.js +84 -0
- package/dist/feature/agents/clients/opencode/parser.js.map +1 -0
- package/dist/feature/agents/clients/opencode/runtime.js +131 -0
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -0
- package/dist/feature/agents/clients/opencode/transcript.js +77 -0
- package/dist/feature/agents/clients/opencode/transcript.js.map +1 -0
- package/dist/feature/agents/ports/command.js +2 -0
- package/dist/feature/agents/ports/command.js.map +1 -0
- package/dist/feature/agents/ports/index.js +2 -0
- package/dist/feature/agents/ports/index.js.map +1 -0
- package/dist/feature/agents/ports/naming.js +2 -0
- package/dist/feature/agents/ports/naming.js.map +1 -0
- package/dist/feature/agents/ports/runtime-factory.js +2 -0
- package/dist/feature/agents/ports/runtime-factory.js.map +1 -0
- package/dist/feature/agents/services/agents.js +79 -0
- package/dist/feature/agents/services/agents.js.map +1 -0
- package/dist/feature/agents/services/catalog.js +117 -0
- package/dist/feature/agents/services/catalog.js.map +1 -0
- package/dist/feature/agents/services/create.js +5 -0
- package/dist/feature/agents/services/create.js.map +1 -0
- package/dist/feature/agents/services/index.js +7 -0
- package/dist/feature/agents/services/index.js.map +1 -0
- package/dist/feature/agents/services/logs.js +69 -0
- package/dist/feature/agents/services/logs.js.map +1 -0
- package/dist/feature/agents/services/skills.js +17 -0
- package/dist/feature/agents/services/skills.js.map +1 -0
- package/dist/feature/agents/services/supervisor.js +160 -0
- package/dist/feature/agents/services/supervisor.js.map +1 -0
- package/dist/feature/agents/types/catalog.js +2 -0
- package/dist/feature/agents/types/catalog.js.map +1 -0
- package/dist/feature/agents/types/index.js +13 -0
- package/dist/feature/agents/types/index.js.map +1 -0
- package/dist/feature/agents/types/message.js +49 -0
- package/dist/feature/agents/types/message.js.map +1 -0
- package/dist/feature/agents/types/models.js +2 -0
- package/dist/feature/agents/types/models.js.map +1 -0
- package/dist/feature/agents/types/naming.js +4 -0
- package/dist/feature/agents/types/naming.js.map +1 -0
- package/dist/feature/agents/types/permissions.js +235 -0
- package/dist/feature/agents/types/permissions.js.map +1 -0
- package/dist/feature/agents/types/run-naming.js +66 -0
- package/dist/feature/agents/types/run-naming.js.map +1 -0
- package/dist/feature/agents/types/runtime.js +18 -0
- package/dist/feature/agents/types/runtime.js.map +1 -0
- package/dist/feature/agents/types/step-input.js +2 -0
- package/dist/feature/agents/types/step-input.js.map +1 -0
- package/dist/feature/agents/types/transcript-parts.js +62 -0
- package/dist/feature/agents/types/transcript-parts.js.map +1 -0
- package/dist/feature/agents/types/transcript.js +8 -0
- package/dist/feature/agents/types/transcript.js.map +1 -0
- package/dist/feature/agents/types/usage.js +14 -0
- package/dist/feature/agents/types/usage.js.map +1 -0
- package/dist/feature/agents/types/worker-tools.js +22 -0
- package/dist/feature/agents/types/worker-tools.js.map +1 -0
- package/dist/feature/artifacts/ports/index.js +2 -0
- package/dist/feature/artifacts/ports/index.js.map +1 -0
- package/dist/feature/artifacts/ports/publish.js +2 -0
- package/dist/feature/artifacts/ports/publish.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js +84 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifacts.js +85 -0
- package/dist/feature/artifacts/repositories/artifacts.js.map +1 -0
- package/dist/feature/artifacts/repositories/index.js +3 -0
- package/dist/feature/artifacts/repositories/index.js.map +1 -0
- package/dist/feature/artifacts/services/artifacts.js +105 -0
- package/dist/feature/artifacts/services/artifacts.js.map +1 -0
- package/dist/feature/artifacts/services/create.js +14 -0
- package/dist/feature/artifacts/services/create.js.map +1 -0
- package/dist/feature/artifacts/services/files.js +42 -0
- package/dist/feature/artifacts/services/files.js.map +1 -0
- package/dist/feature/artifacts/services/index.js +3 -0
- package/dist/feature/artifacts/services/index.js.map +1 -0
- package/dist/feature/artifacts/types/artifacts.js +36 -0
- package/dist/feature/artifacts/types/artifacts.js.map +1 -0
- package/dist/feature/artifacts/types/index.js +2 -0
- package/dist/feature/artifacts/types/index.js.map +1 -0
- package/dist/feature/artifacts/types/views.js +2 -0
- package/dist/feature/artifacts/types/views.js.map +1 -0
- package/dist/feature/compose/services/create.js +11 -0
- package/dist/feature/compose/services/create.js.map +1 -0
- package/dist/feature/compose/services/index.js +5 -0
- package/dist/feature/compose/services/index.js.map +1 -0
- package/dist/feature/compose/services/repository-edit.js +20 -0
- package/dist/feature/compose/services/repository-edit.js.map +1 -0
- package/dist/feature/compose/services/repository-move.js +35 -0
- package/dist/feature/compose/services/repository-move.js.map +1 -0
- package/dist/feature/compose/services/repository-removal.js +38 -0
- package/dist/feature/compose/services/repository-removal.js.map +1 -0
- package/dist/feature/delivery/ports/index.js +2 -0
- package/dist/feature/delivery/ports/index.js.map +1 -0
- package/dist/feature/delivery/ports/publish.js +2 -0
- package/dist/feature/delivery/ports/publish.js.map +1 -0
- package/dist/feature/delivery/repositories/index.js +3 -0
- package/dist/feature/delivery/repositories/index.js.map +1 -0
- package/dist/feature/delivery/repositories/patch-storage.js +76 -0
- package/dist/feature/delivery/repositories/patch-storage.js.map +1 -0
- package/dist/feature/delivery/repositories/patches.js +28 -0
- package/dist/feature/delivery/repositories/patches.js.map +1 -0
- package/dist/feature/delivery/services/create.js +21 -0
- package/dist/feature/delivery/services/create.js.map +1 -0
- package/dist/feature/delivery/services/deliver.js +67 -0
- package/dist/feature/delivery/services/deliver.js.map +1 -0
- package/dist/feature/delivery/services/diffs.js +153 -0
- package/dist/feature/delivery/services/diffs.js.map +1 -0
- package/dist/feature/delivery/services/index.js +5 -0
- package/dist/feature/delivery/services/index.js.map +1 -0
- package/dist/feature/delivery/services/patches.js +96 -0
- package/dist/feature/delivery/services/patches.js.map +1 -0
- package/dist/feature/delivery/types/index.js +3 -0
- package/dist/feature/delivery/types/index.js.map +1 -0
- package/dist/feature/delivery/types/outcomes.js +2 -0
- package/dist/feature/delivery/types/outcomes.js.map +1 -0
- package/dist/feature/delivery/types/spec-change.js +18 -0
- package/dist/feature/delivery/types/spec-change.js.map +1 -0
- package/dist/feature/network/ports/changed.js +2 -0
- package/dist/feature/network/ports/changed.js.map +1 -0
- package/dist/feature/network/ports/index.js +2 -0
- package/dist/feature/network/ports/index.js.map +1 -0
- package/dist/feature/network/services/create.js +5 -0
- package/dist/feature/network/services/create.js.map +1 -0
- package/dist/feature/network/services/index.js +3 -0
- package/dist/feature/network/services/index.js.map +1 -0
- package/dist/feature/network/services/monitor.js +140 -0
- package/dist/feature/network/services/monitor.js.map +1 -0
- package/dist/feature/network/types/index.js +4 -0
- package/dist/feature/network/types/index.js.map +1 -0
- package/dist/feature/network/types/network.js +8 -0
- package/dist/feature/network/types/network.js.map +1 -0
- package/dist/feature/network/types/proxy.js +95 -0
- package/dist/feature/network/types/proxy.js.map +1 -0
- package/dist/feature/network/types/state.js +36 -0
- package/dist/feature/network/types/state.js.map +1 -0
- package/dist/feature/observers/ports/index.js +2 -0
- package/dist/feature/observers/ports/index.js.map +1 -0
- package/dist/feature/observers/ports/publish.js +2 -0
- package/dist/feature/observers/ports/publish.js.map +1 -0
- package/dist/feature/observers/repositories/index.js +2 -0
- package/dist/feature/observers/repositories/index.js.map +1 -0
- package/dist/feature/observers/repositories/observers.js +34 -0
- package/dist/feature/observers/repositories/observers.js.map +1 -0
- package/dist/feature/observers/services/create.js +11 -0
- package/dist/feature/observers/services/create.js.map +1 -0
- package/dist/feature/observers/services/history.js +76 -0
- package/dist/feature/observers/services/history.js.map +1 -0
- package/dist/feature/observers/services/index.js +5 -0
- package/dist/feature/observers/services/index.js.map +1 -0
- package/dist/feature/observers/services/observers.js +188 -0
- package/dist/feature/observers/services/observers.js.map +1 -0
- package/dist/feature/observers/services/settings-check.js +87 -0
- package/dist/feature/observers/services/settings-check.js.map +1 -0
- package/dist/feature/observers/types/actions.js +2 -0
- package/dist/feature/observers/types/actions.js.map +1 -0
- package/dist/feature/observers/types/index.js +4 -0
- package/dist/feature/observers/types/index.js.map +1 -0
- package/dist/feature/observers/types/plan-repairs.js +116 -0
- package/dist/feature/observers/types/plan-repairs.js.map +1 -0
- package/dist/feature/observers/types/settings.js +12 -0
- package/dist/feature/observers/types/settings.js.map +1 -0
- package/dist/feature/processes/ports/index.js +2 -0
- package/dist/feature/processes/ports/index.js.map +1 -0
- package/dist/feature/processes/ports/publish.js +2 -0
- package/dist/feature/processes/ports/publish.js.map +1 -0
- package/dist/feature/processes/services/create.js +5 -0
- package/dist/feature/processes/services/create.js.map +1 -0
- package/dist/feature/processes/services/index.js +4 -0
- package/dist/feature/processes/services/index.js.map +1 -0
- package/dist/feature/processes/services/processes.js +131 -0
- package/dist/feature/processes/services/processes.js.map +1 -0
- package/dist/feature/processes/services/tree.js +98 -0
- package/dist/feature/processes/services/tree.js.map +1 -0
- package/dist/feature/processes/types/background.js +2 -0
- package/dist/feature/processes/types/background.js.map +1 -0
- package/dist/feature/processes/types/index.js +2 -0
- package/dist/feature/processes/types/index.js.map +1 -0
- package/dist/feature/queue/ports/index.js +2 -0
- package/dist/feature/queue/ports/index.js.map +1 -0
- package/dist/feature/queue/ports/observe.js +2 -0
- package/dist/feature/queue/ports/observe.js.map +1 -0
- package/dist/feature/queue/ports/publish.js +2 -0
- package/dist/feature/queue/ports/publish.js.map +1 -0
- package/dist/feature/queue/ports/repair-policy.js +2 -0
- package/dist/feature/queue/ports/repair-policy.js.map +1 -0
- package/dist/feature/queue/repositories/index.js +2 -0
- package/dist/feature/queue/repositories/index.js.map +1 -0
- package/dist/feature/queue/repositories/queues.js +100 -0
- package/dist/feature/queue/repositories/queues.js.map +1 -0
- package/dist/feature/queue/services/advance.js +214 -0
- package/dist/feature/queue/services/advance.js.map +1 -0
- package/dist/feature/queue/services/control.js +169 -0
- package/dist/feature/queue/services/control.js.map +1 -0
- package/dist/feature/queue/services/create.js +26 -0
- package/dist/feature/queue/services/create.js.map +1 -0
- package/dist/feature/queue/services/edit.js +126 -0
- package/dist/feature/queue/services/edit.js.map +1 -0
- package/dist/feature/queue/services/index.js +8 -0
- package/dist/feature/queue/services/index.js.map +1 -0
- package/dist/feature/queue/services/items.js +173 -0
- package/dist/feature/queue/services/items.js.map +1 -0
- package/dist/feature/queue/services/store.js +61 -0
- package/dist/feature/queue/services/store.js.map +1 -0
- package/dist/feature/queue/services/task-tags.js +103 -0
- package/dist/feature/queue/services/task-tags.js.map +1 -0
- package/dist/feature/queue/types/advance.js +198 -0
- package/dist/feature/queue/types/advance.js.map +1 -0
- package/dist/feature/queue/types/dependencies.js +98 -0
- package/dist/feature/queue/types/dependencies.js.map +1 -0
- package/dist/feature/queue/types/edit.js +180 -0
- package/dist/feature/queue/types/edit.js.map +1 -0
- package/dist/feature/queue/types/ids.js +7 -0
- package/dist/feature/queue/types/ids.js.map +1 -0
- package/dist/feature/queue/types/index.js +10 -0
- package/dist/feature/queue/types/index.js.map +1 -0
- package/dist/feature/queue/types/items.js +46 -0
- package/dist/feature/queue/types/items.js.map +1 -0
- package/dist/feature/queue/types/limit-hits.js +50 -0
- package/dist/feature/queue/types/limit-hits.js.map +1 -0
- package/dist/feature/queue/types/requests.js +2 -0
- package/dist/feature/queue/types/requests.js.map +1 -0
- package/dist/feature/queue/types/returns.js +197 -0
- package/dist/feature/queue/types/returns.js.map +1 -0
- package/dist/feature/queue/types/settings.js +117 -0
- package/dist/feature/queue/types/settings.js.map +1 -0
- package/dist/feature/repos/ports/index.js +2 -0
- package/dist/feature/repos/ports/index.js.map +1 -0
- package/dist/feature/repos/ports/publish.js +2 -0
- package/dist/feature/repos/ports/publish.js.map +1 -0
- package/dist/feature/repos/repositories/index.js +2 -0
- package/dist/feature/repos/repositories/index.js.map +1 -0
- package/dist/feature/repos/repositories/known.js +41 -0
- package/dist/feature/repos/repositories/known.js.map +1 -0
- package/dist/feature/repos/services/create.js +13 -0
- package/dist/feature/repos/services/create.js.map +1 -0
- package/dist/feature/repos/services/index.js +4 -0
- package/dist/feature/repos/services/index.js.map +1 -0
- package/dist/feature/repos/services/projects.js +50 -0
- package/dist/feature/repos/services/projects.js.map +1 -0
- package/dist/feature/repos/services/registry.js +138 -0
- package/dist/feature/repos/services/registry.js.map +1 -0
- package/dist/feature/repos/types/index.js +2 -0
- package/dist/feature/repos/types/index.js.map +1 -0
- package/dist/feature/repos/types/project.js +80 -0
- package/dist/feature/repos/types/project.js.map +1 -0
- package/dist/feature/repos/types/registry.js +2 -0
- package/dist/feature/repos/types/registry.js.map +1 -0
- package/dist/feature/runs/machine/answers.js +112 -0
- package/dist/feature/runs/machine/answers.js.map +1 -0
- package/dist/feature/runs/machine/delivery-checks.js +91 -0
- package/dist/feature/runs/machine/delivery-checks.js.map +1 -0
- package/dist/feature/runs/machine/delivery-flow.js +211 -0
- package/dist/feature/runs/machine/delivery-flow.js.map +1 -0
- package/dist/feature/runs/machine/events.js +2 -0
- package/dist/feature/runs/machine/events.js.map +1 -0
- package/dist/feature/runs/machine/exits.js +229 -0
- package/dist/feature/runs/machine/exits.js.map +1 -0
- package/dist/feature/runs/machine/index.js +7 -0
- package/dist/feature/runs/machine/index.js.map +1 -0
- package/dist/feature/runs/machine/plan.js +133 -0
- package/dist/feature/runs/machine/plan.js.map +1 -0
- package/dist/feature/runs/machine/repair.js +158 -0
- package/dist/feature/runs/machine/repair.js.map +1 -0
- package/dist/feature/runs/machine/run-control.js +276 -0
- package/dist/feature/runs/machine/run-control.js.map +1 -0
- package/dist/feature/runs/machine/scheduler.js +126 -0
- package/dist/feature/runs/machine/scheduler.js.map +1 -0
- package/dist/feature/runs/machine/steps.js +275 -0
- package/dist/feature/runs/machine/steps.js.map +1 -0
- package/dist/feature/runs/machine/texts.js +69 -0
- package/dist/feature/runs/machine/texts.js.map +1 -0
- package/dist/feature/runs/machine/transition.js +117 -0
- package/dist/feature/runs/machine/transition.js.map +1 -0
- package/dist/feature/runs/ports/agent-exit.js +2 -0
- package/dist/feature/runs/ports/agent-exit.js.map +1 -0
- package/dist/feature/runs/ports/diff.js +2 -0
- package/dist/feature/runs/ports/diff.js.map +1 -0
- package/dist/feature/runs/ports/index.js +2 -0
- package/dist/feature/runs/ports/index.js.map +1 -0
- package/dist/feature/runs/ports/observe.js +2 -0
- package/dist/feature/runs/ports/observe.js.map +1 -0
- package/dist/feature/runs/ports/publish.js +2 -0
- package/dist/feature/runs/ports/publish.js.map +1 -0
- package/dist/feature/runs/ports/queue-advance.js +2 -0
- package/dist/feature/runs/ports/queue-advance.js.map +1 -0
- package/dist/feature/runs/repositories/attempt-history.js +116 -0
- package/dist/feature/runs/repositories/attempt-history.js.map +1 -0
- package/dist/feature/runs/repositories/finished-runs.js +46 -0
- package/dist/feature/runs/repositories/finished-runs.js.map +1 -0
- package/dist/feature/runs/repositories/index.js +4 -0
- package/dist/feature/runs/repositories/index.js.map +1 -0
- package/dist/feature/runs/repositories/rows.js +110 -0
- package/dist/feature/runs/repositories/rows.js.map +1 -0
- package/dist/feature/runs/repositories/runs.js +76 -0
- package/dist/feature/runs/repositories/runs.js.map +1 -0
- package/dist/feature/runs/repositories/write.js +31 -0
- package/dist/feature/runs/repositories/write.js.map +1 -0
- package/dist/feature/runs/services/archive.js +17 -0
- package/dist/feature/runs/services/archive.js.map +1 -0
- package/dist/feature/runs/services/attempt-history.js +11 -0
- package/dist/feature/runs/services/attempt-history.js.map +1 -0
- package/dist/feature/runs/services/create.js +44 -0
- package/dist/feature/runs/services/create.js.map +1 -0
- package/dist/feature/runs/services/effects/actions.js +151 -0
- package/dist/feature/runs/services/effects/actions.js.map +1 -0
- package/dist/feature/runs/services/effects/attempts.js +219 -0
- package/dist/feature/runs/services/effects/attempts.js.map +1 -0
- package/dist/feature/runs/services/effects/context.js +7 -0
- package/dist/feature/runs/services/effects/context.js.map +1 -0
- package/dist/feature/runs/services/effects/effects.js +82 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -0
- package/dist/feature/runs/services/effects/git.js +168 -0
- package/dist/feature/runs/services/effects/git.js.map +1 -0
- package/dist/feature/runs/services/effects/naming.js +65 -0
- package/dist/feature/runs/services/effects/naming.js.map +1 -0
- package/dist/feature/runs/services/effects/outside.js +83 -0
- package/dist/feature/runs/services/effects/outside.js.map +1 -0
- package/dist/feature/runs/services/effects/proxy.js +5 -0
- package/dist/feature/runs/services/effects/proxy.js.map +1 -0
- package/dist/feature/runs/services/effects/running.js +76 -0
- package/dist/feature/runs/services/effects/running.js.map +1 -0
- package/dist/feature/runs/services/effects/usage.js +61 -0
- package/dist/feature/runs/services/effects/usage.js.map +1 -0
- package/dist/feature/runs/services/effects/worktrees.js +49 -0
- package/dist/feature/runs/services/effects/worktrees.js.map +1 -0
- package/dist/feature/runs/services/engine.js +172 -0
- package/dist/feature/runs/services/engine.js.map +1 -0
- package/dist/feature/runs/services/index.js +15 -0
- package/dist/feature/runs/services/index.js.map +1 -0
- package/dist/feature/runs/services/occupancy.js +62 -0
- package/dist/feature/runs/services/occupancy.js.map +1 -0
- package/dist/feature/runs/services/progress.js +42 -0
- package/dist/feature/runs/services/progress.js.map +1 -0
- package/dist/feature/runs/services/reads.js +93 -0
- package/dist/feature/runs/services/reads.js.map +1 -0
- package/dist/feature/runs/services/recovery.js +17 -0
- package/dist/feature/runs/services/recovery.js.map +1 -0
- package/dist/feature/runs/services/refresh.js +29 -0
- package/dist/feature/runs/services/refresh.js.map +1 -0
- package/dist/feature/runs/services/requests.js +88 -0
- package/dist/feature/runs/services/requests.js.map +1 -0
- package/dist/feature/runs/services/states.js +112 -0
- package/dist/feature/runs/services/states.js.map +1 -0
- package/dist/feature/runs/services/summary.js +38 -0
- package/dist/feature/runs/services/summary.js.map +1 -0
- package/dist/feature/runs/types/attempt.js +106 -0
- package/dist/feature/runs/types/attempt.js.map +1 -0
- package/dist/feature/runs/types/constants.js +45 -0
- package/dist/feature/runs/types/constants.js.map +1 -0
- package/dist/feature/runs/types/create.js +177 -0
- package/dist/feature/runs/types/create.js.map +1 -0
- package/dist/feature/runs/types/group.js +152 -0
- package/dist/feature/runs/types/group.js.map +1 -0
- package/dist/feature/runs/types/history/attempt-history.js +16 -0
- package/dist/feature/runs/types/history/attempt-history.js.map +1 -0
- package/dist/feature/runs/types/index.js +15 -0
- package/dist/feature/runs/types/index.js.map +1 -0
- package/dist/feature/runs/types/input.js +90 -0
- package/dist/feature/runs/types/input.js.map +1 -0
- package/dist/feature/runs/types/limits.js +163 -0
- package/dist/feature/runs/types/limits.js.map +1 -0
- package/dist/feature/runs/types/problems.js +74 -0
- package/dist/feature/runs/types/problems.js.map +1 -0
- package/dist/feature/runs/types/run.js +162 -0
- package/dist/feature/runs/types/run.js.map +1 -0
- package/dist/feature/runs/types/skip.js +110 -0
- package/dist/feature/runs/types/skip.js.map +1 -0
- package/dist/feature/runs/types/stage-status.js +156 -0
- package/dist/feature/runs/types/stage-status.js.map +1 -0
- package/dist/feature/runs/types/stages.js +158 -0
- package/dist/feature/runs/types/stages.js.map +1 -0
- package/dist/feature/runs/types/topology.js +165 -0
- package/dist/feature/runs/types/topology.js.map +1 -0
- package/dist/feature/stats/repositories/index.js +4 -0
- package/dist/feature/stats/repositories/index.js.map +1 -0
- package/dist/feature/stats/repositories/meta.js +19 -0
- package/dist/feature/stats/repositories/meta.js.map +1 -0
- package/dist/feature/stats/repositories/records.js +46 -0
- package/dist/feature/stats/repositories/records.js.map +1 -0
- package/dist/feature/stats/repositories/report.js +105 -0
- package/dist/feature/stats/repositories/report.js.map +1 -0
- package/dist/feature/stats/services/create.js +44 -0
- package/dist/feature/stats/services/create.js.map +1 -0
- package/dist/feature/stats/services/index.js +4 -0
- package/dist/feature/stats/services/index.js.map +1 -0
- package/dist/feature/stats/services/ledger.js +137 -0
- package/dist/feature/stats/services/ledger.js.map +1 -0
- package/dist/feature/stats/services/report.js +56 -0
- package/dist/feature/stats/services/report.js.map +1 -0
- package/dist/feature/stats/types/aggregate.js +179 -0
- package/dist/feature/stats/types/aggregate.js.map +1 -0
- package/dist/feature/stats/types/capture.js +79 -0
- package/dist/feature/stats/types/capture.js.map +1 -0
- package/dist/feature/stats/types/index.js +6 -0
- package/dist/feature/stats/types/index.js.map +1 -0
- package/dist/feature/stats/types/records.js +5 -0
- package/dist/feature/stats/types/records.js.map +1 -0
- package/dist/feature/stats/types/report.js +25 -0
- package/dist/feature/stats/types/report.js.map +1 -0
- package/dist/feature/stats/types/settings.js +2 -0
- package/dist/feature/stats/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/repositories/config-files.js +141 -0
- package/dist/feature/swarm-config/repositories/config-files.js.map +1 -0
- package/dist/feature/swarm-config/services/assemble.js +212 -0
- package/dist/feature/swarm-config/services/assemble.js.map +1 -0
- package/dist/feature/swarm-config/services/create.js +5 -0
- package/dist/feature/swarm-config/services/create.js.map +1 -0
- package/dist/feature/swarm-config/services/discover.js +19 -0
- package/dist/feature/swarm-config/services/discover.js.map +1 -0
- package/dist/feature/swarm-config/services/index.js +10 -0
- package/dist/feature/swarm-config/services/index.js.map +1 -0
- package/dist/feature/swarm-config/services/load.js +101 -0
- package/dist/feature/swarm-config/services/load.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/stats.js +28 -0
- package/dist/feature/swarm-config/services/sections/stats.js.map +1 -0
- package/dist/feature/swarm-config/services/settings.js +72 -0
- package/dist/feature/swarm-config/services/settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-actions.js +125 -0
- package/dist/feature/swarm-config/services/validate-actions.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-context.js +91 -0
- package/dist/feature/swarm-config/services/validate-context.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js +170 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js +214 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-settings.js +242 -0
- package/dist/feature/swarm-config/services/validate-settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-specialists.js +152 -0
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -0
- package/dist/feature/swarm-config/services/validate.js +189 -0
- package/dist/feature/swarm-config/services/validate.js.map +1 -0
- package/dist/feature/swarm-config/types/action.js +20 -0
- package/dist/feature/swarm-config/types/action.js.map +1 -0
- package/dist/feature/swarm-config/types/chain.js +2 -0
- package/dist/feature/swarm-config/types/chain.js.map +1 -0
- package/dist/feature/swarm-config/types/duration.js +17 -0
- package/dist/feature/swarm-config/types/duration.js.map +1 -0
- package/dist/feature/swarm-config/types/errors.js +57 -0
- package/dist/feature/swarm-config/types/errors.js.map +1 -0
- package/dist/feature/swarm-config/types/index.js +13 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -0
- package/dist/feature/swarm-config/types/levels.js +16 -0
- package/dist/feature/swarm-config/types/levels.js.map +1 -0
- package/dist/feature/swarm-config/types/lookups.js +53 -0
- package/dist/feature/swarm-config/types/lookups.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +46 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -0
- package/dist/feature/swarm-config/types/pipeline.js +5 -0
- package/dist/feature/swarm-config/types/pipeline.js.map +1 -0
- package/dist/feature/swarm-config/types/prompt.js +33 -0
- package/dist/feature/swarm-config/types/prompt.js.map +1 -0
- package/dist/feature/swarm-config/types/settings.js +146 -0
- package/dist/feature/swarm-config/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/types/specialist.js +38 -0
- package/dist/feature/swarm-config/types/specialist.js.map +1 -0
- package/dist/feature/swarm-config/types/tag-names.js +43 -0
- package/dist/feature/swarm-config/types/tag-names.js.map +1 -0
- package/dist/feature/swarm-edit/ports/config-changed.js +2 -0
- package/dist/feature/swarm-edit/ports/config-changed.js.map +1 -0
- package/dist/feature/swarm-edit/ports/index.js +2 -0
- package/dist/feature/swarm-edit/ports/index.js.map +1 -0
- package/dist/feature/swarm-edit/repositories/documents.js +144 -0
- package/dist/feature/swarm-edit/repositories/documents.js.map +1 -0
- package/dist/feature/swarm-edit/services/config-edits.js +129 -0
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -0
- package/dist/feature/swarm-edit/services/create.js +7 -0
- package/dist/feature/swarm-edit/services/create.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-settings.js +172 -0
- package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-view.js +144 -0
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -0
- package/dist/feature/swarm-edit/services/index.js +12 -0
- package/dist/feature/swarm-edit/services/index.js.map +1 -0
- package/dist/feature/swarm-edit/services/levels.js +30 -0
- package/dist/feature/swarm-edit/services/levels.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-edit.js +217 -0
- package/dist/feature/swarm-edit/services/plan-edit.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-settings.js +200 -0
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/references.js +85 -0
- package/dist/feature/swarm-edit/services/references.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-config.js +128 -0
- package/dist/feature/swarm-edit/services/shared-config.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js +72 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js +70 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js.map +1 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js +215 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js.map +1 -0
- package/dist/feature/swarm-edit/types/editor.js +27 -0
- package/dist/feature/swarm-edit/types/editor.js.map +1 -0
- package/dist/feature/swarm-edit/types/index.js +7 -0
- package/dist/feature/swarm-edit/types/index.js.map +1 -0
- package/dist/feature/swarm-edit/types/setting-fields.js +76 -0
- package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -0
- package/dist/feature/swarm-edit/types/shared.js +2 -0
- package/dist/feature/swarm-edit/types/shared.js.map +1 -0
- package/dist/feature/swarm-edit/types/stages.js +69 -0
- package/dist/feature/swarm-edit/types/stages.js.map +1 -0
- package/dist/feature/swarm-edit/types/tag-folders.js +2 -0
- package/dist/feature/swarm-edit/types/tag-folders.js.map +1 -0
- package/dist/feature/swarm-edit/types/views.js +2 -0
- package/dist/feature/swarm-edit/types/views.js.map +1 -0
- package/dist/feature/tags/ports/index.js +2 -0
- package/dist/feature/tags/ports/index.js.map +1 -0
- package/dist/feature/tags/ports/publish.js +2 -0
- package/dist/feature/tags/ports/publish.js.map +1 -0
- package/dist/feature/tags/repositories/index.js +2 -0
- package/dist/feature/tags/repositories/index.js.map +1 -0
- package/dist/feature/tags/repositories/tags.js +36 -0
- package/dist/feature/tags/repositories/tags.js.map +1 -0
- package/dist/feature/tags/services/catalog.js +73 -0
- package/dist/feature/tags/services/catalog.js.map +1 -0
- package/dist/feature/tags/services/create.js +7 -0
- package/dist/feature/tags/services/create.js.map +1 -0
- package/dist/feature/tags/services/index.js +3 -0
- package/dist/feature/tags/services/index.js.map +1 -0
- package/dist/feature/tags/types/ids.js +7 -0
- package/dist/feature/tags/types/ids.js.map +1 -0
- package/dist/feature/tags/types/index.js +3 -0
- package/dist/feature/tags/types/index.js.map +1 -0
- package/dist/feature/tags/types/tags.js +184 -0
- package/dist/feature/tags/types/tags.js.map +1 -0
- package/dist/platform/build/fingerprint.js +36 -0
- package/dist/platform/build/fingerprint.js.map +1 -0
- package/dist/platform/build/index.js +3 -0
- package/dist/platform/build/index.js.map +1 -0
- package/dist/platform/build/locations.js +16 -0
- package/dist/platform/build/locations.js.map +1 -0
- package/dist/platform/errors/app-error.js +39 -0
- package/dist/platform/errors/app-error.js.map +1 -0
- package/dist/platform/errors/index.js +2 -0
- package/dist/platform/errors/index.js.map +1 -0
- package/dist/platform/git/delivery.js +284 -0
- package/dist/platform/git/delivery.js.map +1 -0
- package/dist/platform/git/index.js +4 -0
- package/dist/platform/git/index.js.map +1 -0
- package/dist/platform/git/runner.js +65 -0
- package/dist/platform/git/runner.js.map +1 -0
- package/dist/platform/git/workspace.js +366 -0
- package/dist/platform/git/workspace.js.map +1 -0
- package/dist/platform/network/index.js +4 -0
- package/dist/platform/network/index.js.map +1 -0
- package/dist/platform/network/interfaces.js +7 -0
- package/dist/platform/network/interfaces.js.map +1 -0
- package/dist/platform/network/probe.js +128 -0
- package/dist/platform/network/probe.js.map +1 -0
- package/dist/platform/network/tunnel.js +87 -0
- package/dist/platform/network/tunnel.js.map +1 -0
- package/dist/platform/paths/index.js +2 -0
- package/dist/platform/paths/index.js.map +1 -0
- package/dist/platform/paths/paths.js +39 -0
- package/dist/platform/paths/paths.js.map +1 -0
- package/dist/platform/process/command.js +23 -0
- package/dist/platform/process/command.js.map +1 -0
- package/dist/platform/process/index.js +4 -0
- package/dist/platform/process/index.js.map +1 -0
- package/dist/platform/process/ps.js +42 -0
- package/dist/platform/process/ps.js.map +1 -0
- package/dist/platform/process/which.js +21 -0
- package/dist/platform/process/which.js.map +1 -0
- package/dist/platform/sqlite/database.js +36 -0
- package/dist/platform/sqlite/database.js.map +1 -0
- package/dist/platform/sqlite/index.js +4 -0
- package/dist/platform/sqlite/index.js.map +1 -0
- package/dist/platform/sqlite/migrations.js +299 -0
- package/dist/platform/sqlite/migrations.js.map +1 -0
- package/dist/platform/sqlite/rows.js +13 -0
- package/dist/platform/sqlite/rows.js.map +1 -0
- package/dist/platform/sqlite/stats-migration.js +42 -0
- package/dist/platform/sqlite/stats-migration.js.map +1 -0
- package/dist/presentation/cli/commands/daemon.js +216 -0
- package/dist/presentation/cli/commands/daemon.js.map +1 -0
- package/dist/presentation/cli/commands/group.js +88 -0
- package/dist/presentation/cli/commands/group.js.map +1 -0
- package/dist/presentation/cli/commands/mcp.js +44 -0
- package/dist/presentation/cli/commands/mcp.js.map +1 -0
- package/dist/presentation/cli/commands/queue-edit.js +155 -0
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -0
- package/dist/presentation/cli/commands/queue.js +222 -0
- package/dist/presentation/cli/commands/queue.js.map +1 -0
- package/dist/presentation/cli/commands/repositories.js +129 -0
- package/dist/presentation/cli/commands/repositories.js.map +1 -0
- package/dist/presentation/cli/commands/run-delivery.js +116 -0
- package/dist/presentation/cli/commands/run-delivery.js.map +1 -0
- package/dist/presentation/cli/commands/run.js +156 -0
- package/dist/presentation/cli/commands/run.js.map +1 -0
- package/dist/presentation/cli/commands/setup.js +97 -0
- package/dist/presentation/cli/commands/setup.js.map +1 -0
- package/dist/presentation/cli/commands/stats.js +41 -0
- package/dist/presentation/cli/commands/stats.js.map +1 -0
- package/dist/presentation/cli/commands/tag.js +92 -0
- package/dist/presentation/cli/commands/tag.js.map +1 -0
- package/dist/presentation/cli/commands/web.js +100 -0
- package/dist/presentation/cli/commands/web.js.map +1 -0
- package/dist/presentation/cli/context.js +49 -0
- package/dist/presentation/cli/context.js.map +1 -0
- package/dist/presentation/cli/help.js +49 -0
- package/dist/presentation/cli/help.js.map +1 -0
- package/dist/presentation/cli/io.js +13 -0
- package/dist/presentation/cli/io.js.map +1 -0
- package/dist/presentation/cli/local/clean.js +72 -0
- package/dist/presentation/cli/local/clean.js.map +1 -0
- package/dist/presentation/cli/local/config-check.js +225 -0
- package/dist/presentation/cli/local/config-check.js.map +1 -0
- package/dist/presentation/cli/local/init.js +44 -0
- package/dist/presentation/cli/local/init.js.map +1 -0
- package/dist/presentation/cli/options.js +34 -0
- package/dist/presentation/cli/options.js.map +1 -0
- package/dist/presentation/cli/probe.js +12 -0
- package/dist/presentation/cli/probe.js.map +1 -0
- package/dist/presentation/cli/program.js +78 -0
- package/dist/presentation/cli/program.js.map +1 -0
- package/dist/presentation/cli/setup/actions.js +206 -0
- package/dist/presentation/cli/setup/actions.js.map +1 -0
- package/dist/presentation/cli/setup/command.js +80 -0
- package/dist/presentation/cli/setup/command.js.map +1 -0
- package/dist/presentation/cli/setup/host.js +20 -0
- package/dist/presentation/cli/setup/host.js.map +1 -0
- package/dist/presentation/cli/setup/index.js +5 -0
- package/dist/presentation/cli/setup/index.js.map +1 -0
- package/dist/presentation/cli/setup/run.js +63 -0
- package/dist/presentation/cli/setup/run.js.map +1 -0
- package/dist/presentation/cli/setup/system.js +53 -0
- package/dist/presentation/cli/setup/system.js.map +1 -0
- package/dist/presentation/cli/setup/types.js +3 -0
- package/dist/presentation/cli/setup/types.js.map +1 -0
- package/dist/presentation/cli/watch.js +24 -0
- package/dist/presentation/cli/watch.js.map +1 -0
- package/dist/presentation/cli/web-control.js +172 -0
- package/dist/presentation/cli/web-control.js.map +1 -0
- package/dist/presentation/format/groups.js +99 -0
- package/dist/presentation/format/groups.js.map +1 -0
- package/dist/presentation/format/index.js +8 -0
- package/dist/presentation/format/index.js.map +1 -0
- package/dist/presentation/format/queue.js +109 -0
- package/dist/presentation/format/queue.js.map +1 -0
- package/dist/presentation/format/runs.js +209 -0
- package/dist/presentation/format/runs.js.map +1 -0
- package/dist/presentation/format/stats.js +79 -0
- package/dist/presentation/format/stats.js.map +1 -0
- package/dist/presentation/format/style.js +81 -0
- package/dist/presentation/format/style.js.map +1 -0
- package/dist/presentation/format/table.js +62 -0
- package/dist/presentation/format/table.js.map +1 -0
- package/dist/presentation/format/tags.js +26 -0
- package/dist/presentation/format/tags.js.map +1 -0
- package/dist/presentation/ipc/client/autostart.js +171 -0
- package/dist/presentation/ipc/client/autostart.js.map +1 -0
- package/dist/presentation/ipc/client/client.js +83 -0
- package/dist/presentation/ipc/client/client.js.map +1 -0
- package/dist/presentation/ipc/client/index.js +4 -0
- package/dist/presentation/ipc/client/index.js.map +1 -0
- package/dist/presentation/ipc/client/repository-argument.js +13 -0
- package/dist/presentation/ipc/client/repository-argument.js.map +1 -0
- package/dist/presentation/ipc/contract/agents.js +97 -0
- package/dist/presentation/ipc/contract/agents.js.map +1 -0
- package/dist/presentation/ipc/contract/artifacts.js +27 -0
- package/dist/presentation/ipc/contract/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/config.js +145 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -0
- package/dist/presentation/ipc/contract/envelope.js +100 -0
- package/dist/presentation/ipc/contract/envelope.js.map +1 -0
- package/dist/presentation/ipc/contract/groups.js +57 -0
- package/dist/presentation/ipc/contract/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/index.js +15 -0
- package/dist/presentation/ipc/contract/index.js.map +1 -0
- package/dist/presentation/ipc/contract/observers/history.js +26 -0
- package/dist/presentation/ipc/contract/observers/history.js.map +1 -0
- package/dist/presentation/ipc/contract/observers.js +16 -0
- package/dist/presentation/ipc/contract/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/panel.js +64 -0
- package/dist/presentation/ipc/contract/panel.js.map +1 -0
- package/dist/presentation/ipc/contract/processes.js +9 -0
- package/dist/presentation/ipc/contract/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/queue.js +115 -0
- package/dist/presentation/ipc/contract/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/repositories.js +33 -0
- package/dist/presentation/ipc/contract/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js +2 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/config.js +2 -0
- package/dist/presentation/ipc/contract/responses/config.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/groups.js +2 -0
- package/dist/presentation/ipc/contract/responses/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/index.js +12 -0
- package/dist/presentation/ipc/contract/responses/index.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js +2 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observers.js +2 -0
- package/dist/presentation/ipc/contract/responses/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/processes.js +2 -0
- package/dist/presentation/ipc/contract/responses/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/queue.js +2 -0
- package/dist/presentation/ipc/contract/responses/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/repositories.js +2 -0
- package/dist/presentation/ipc/contract/responses/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/runs.js +2 -0
- package/dist/presentation/ipc/contract/responses/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/stats.js +67 -0
- package/dist/presentation/ipc/contract/responses/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/tags.js +2 -0
- package/dist/presentation/ipc/contract/responses/tags.js.map +1 -0
- package/dist/presentation/ipc/contract/runs.js +118 -0
- package/dist/presentation/ipc/contract/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/stats/stats.js +20 -0
- package/dist/presentation/ipc/contract/stats/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/tags.js +40 -0
- package/dist/presentation/ipc/contract/tags.js.map +1 -0
- package/dist/presentation/ipc/handlers/config.js +39 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -0
- package/dist/presentation/ipc/handlers/groups.js +22 -0
- package/dist/presentation/ipc/handlers/groups.js.map +1 -0
- package/dist/presentation/ipc/handlers/index.js +2 -0
- package/dist/presentation/ipc/handlers/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/observers.js +14 -0
- package/dist/presentation/ipc/handlers/observers.js.map +1 -0
- package/dist/presentation/ipc/handlers/queue.js +36 -0
- package/dist/presentation/ipc/handlers/queue.js.map +1 -0
- package/dist/presentation/ipc/handlers/repositories.js +26 -0
- package/dist/presentation/ipc/handlers/repositories.js.map +1 -0
- package/dist/presentation/ipc/handlers/runs.js +55 -0
- package/dist/presentation/ipc/handlers/runs.js.map +1 -0
- package/dist/presentation/ipc/handlers/stats.js +17 -0
- package/dist/presentation/ipc/handlers/stats.js.map +1 -0
- package/dist/presentation/ipc/handlers/system.js +40 -0
- package/dist/presentation/ipc/handlers/system.js.map +1 -0
- package/dist/presentation/ipc/handlers/table.js +25 -0
- package/dist/presentation/ipc/handlers/table.js.map +1 -0
- package/dist/presentation/ipc/handlers/types.js +2 -0
- package/dist/presentation/ipc/handlers/types.js.map +1 -0
- package/dist/presentation/ipc/publisher.js +176 -0
- package/dist/presentation/ipc/publisher.js.map +1 -0
- package/dist/presentation/ipc/server.js +164 -0
- package/dist/presentation/ipc/server.js.map +1 -0
- package/dist/presentation/ipc/services.js +2 -0
- package/dist/presentation/ipc/services.js.map +1 -0
- package/dist/presentation/ipc/snapshots.js +60 -0
- package/dist/presentation/ipc/snapshots.js.map +1 -0
- package/dist/presentation/ipc/views/catalog.js +9 -0
- package/dist/presentation/ipc/views/catalog.js.map +1 -0
- package/dist/presentation/ipc/views/groups.js +112 -0
- package/dist/presentation/ipc/views/groups.js.map +1 -0
- package/dist/presentation/ipc/views/index.js +11 -0
- package/dist/presentation/ipc/views/index.js.map +1 -0
- package/dist/presentation/ipc/views/observer-history.js +26 -0
- package/dist/presentation/ipc/views/observer-history.js.map +1 -0
- package/dist/presentation/ipc/views/observers.js +16 -0
- package/dist/presentation/ipc/views/observers.js.map +1 -0
- package/dist/presentation/ipc/views/queue.js +155 -0
- package/dist/presentation/ipc/views/queue.js.map +1 -0
- package/dist/presentation/ipc/views/repositories.js +34 -0
- package/dist/presentation/ipc/views/repositories.js.map +1 -0
- package/dist/presentation/ipc/views/rows.js +117 -0
- package/dist/presentation/ipc/views/rows.js.map +1 -0
- package/dist/presentation/ipc/views/run-stages.js +66 -0
- package/dist/presentation/ipc/views/run-stages.js.map +1 -0
- package/dist/presentation/ipc/views/runs.js +201 -0
- package/dist/presentation/ipc/views/runs.js.map +1 -0
- package/dist/presentation/ipc/views/stats.js +5 -0
- package/dist/presentation/ipc/views/stats.js.map +1 -0
- package/dist/presentation/ipc/views/tags.js +19 -0
- package/dist/presentation/ipc/views/tags.js.map +1 -0
- package/dist/presentation/mcp/host-kit.js +67 -0
- package/dist/presentation/mcp/host-kit.js.map +1 -0
- package/dist/presentation/mcp/host-queue-control.js +135 -0
- package/dist/presentation/mcp/host-queue-control.js.map +1 -0
- package/dist/presentation/mcp/host-queue.js +124 -0
- package/dist/presentation/mcp/host-queue.js.map +1 -0
- package/dist/presentation/mcp/host-runs.js +173 -0
- package/dist/presentation/mcp/host-runs.js.map +1 -0
- package/dist/presentation/mcp/host.js +34 -0
- package/dist/presentation/mcp/host.js.map +1 -0
- package/dist/presentation/mcp/index.js +3 -0
- package/dist/presentation/mcp/index.js.map +1 -0
- package/dist/presentation/mcp/tools.js +19 -0
- package/dist/presentation/mcp/tools.js.map +1 -0
- package/dist/presentation/mcp/worker-extra.js +144 -0
- package/dist/presentation/mcp/worker-extra.js.map +1 -0
- package/dist/presentation/mcp/worker-read.js +45 -0
- package/dist/presentation/mcp/worker-read.js.map +1 -0
- package/dist/presentation/mcp/worker-tools.js +107 -0
- package/dist/presentation/mcp/worker-tools.js.map +1 -0
- package/dist/presentation/mcp/worker.js +14 -0
- package/dist/presentation/mcp/worker.js.map +1 -0
- package/dist/presentation/web/errors.js +60 -0
- package/dist/presentation/web/errors.js.map +1 -0
- package/dist/presentation/web/http.js +130 -0
- package/dist/presentation/web/http.js.map +1 -0
- package/dist/presentation/web/hub.js +168 -0
- package/dist/presentation/web/hub.js.map +1 -0
- package/dist/presentation/web/index.js +7 -0
- package/dist/presentation/web/index.js.map +1 -0
- package/dist/presentation/web/options.js +7 -0
- package/dist/presentation/web/options.js.map +1 -0
- package/dist/presentation/web/pages.js +44 -0
- package/dist/presentation/web/pages.js.map +1 -0
- package/dist/presentation/web/panel/daemon-panel.js +207 -0
- package/dist/presentation/web/panel/daemon-panel.js.map +1 -0
- package/dist/presentation/web/panel/default-repository.js +14 -0
- package/dist/presentation/web/panel/default-repository.js.map +1 -0
- package/dist/presentation/web/panel/directories.js +48 -0
- package/dist/presentation/web/panel/directories.js.map +1 -0
- package/dist/presentation/web/panel/open.js +12 -0
- package/dist/presentation/web/panel/open.js.map +1 -0
- package/dist/presentation/web/panel/standby.js +119 -0
- package/dist/presentation/web/panel/standby.js.map +1 -0
- package/dist/presentation/web/panel/state.js +69 -0
- package/dist/presentation/web/panel/state.js.map +1 -0
- package/dist/presentation/web/panel/system.js +67 -0
- package/dist/presentation/web/panel/system.js.map +1 -0
- package/dist/presentation/web/request.js +150 -0
- package/dist/presentation/web/request.js.map +1 -0
- package/dist/presentation/web/routes/config.js +171 -0
- package/dist/presentation/web/routes/config.js.map +1 -0
- package/dist/presentation/web/routes/downloads.js +65 -0
- package/dist/presentation/web/routes/downloads.js.map +1 -0
- package/dist/presentation/web/routes/groups.js +85 -0
- package/dist/presentation/web/routes/groups.js.map +1 -0
- package/dist/presentation/web/routes/observers/history.js +19 -0
- package/dist/presentation/web/routes/observers/history.js.map +1 -0
- package/dist/presentation/web/routes/processes.js +21 -0
- package/dist/presentation/web/routes/processes.js.map +1 -0
- package/dist/presentation/web/routes/queue.js +80 -0
- package/dist/presentation/web/routes/queue.js.map +1 -0
- package/dist/presentation/web/routes/repositories.js +66 -0
- package/dist/presentation/web/routes/repositories.js.map +1 -0
- package/dist/presentation/web/routes/runs.js +76 -0
- package/dist/presentation/web/routes/runs.js.map +1 -0
- package/dist/presentation/web/routes/settings.js +74 -0
- package/dist/presentation/web/routes/settings.js.map +1 -0
- package/dist/presentation/web/routes/specialists.js +74 -0
- package/dist/presentation/web/routes/specialists.js.map +1 -0
- package/dist/presentation/web/routes/stats/stats.js +22 -0
- package/dist/presentation/web/routes/stats/stats.js.map +1 -0
- package/dist/presentation/web/routes/system.js +96 -0
- package/dist/presentation/web/routes/system.js.map +1 -0
- package/dist/presentation/web/routes/tags.js +46 -0
- package/dist/presentation/web/routes/tags.js.map +1 -0
- package/dist/presentation/web/routes/types.js +2 -0
- package/dist/presentation/web/routes/types.js.map +1 -0
- package/dist/presentation/web/server.js +187 -0
- package/dist/presentation/web/server.js.map +1 -0
- package/dist/web/assets/FilterColumn-BCMp-JO4.js +1 -0
- package/dist/web/assets/SharedPipelinesGroup-DJRGFtzx.js +1 -0
- package/dist/web/assets/badge-C_7kALlW.js +1 -0
- package/dist/web/assets/card-C9eXOVuF.js +1 -0
- package/dist/web/assets/deliveryModes-funlvXVC.js +1 -0
- package/dist/web/assets/empty-ACC2KkXk.js +41 -0
- package/dist/web/assets/index-CsVQUXJH.js +21 -0
- package/dist/web/assets/index-Ds1nt_qm.css +2 -0
- package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/assets/locales-fB1w2oER.js +1 -0
- package/dist/web/assets/pipelines-DLioOiRN.css +1 -0
- package/dist/web/assets/pipelines-DQglwIkL.js +10 -0
- package/dist/web/assets/queue-CAuAo--6.js +16 -0
- package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/web/assets/select-BSqaxwh1.js +1 -0
- package/dist/web/assets/settingFields-DVg9TQK2.js +1 -0
- package/dist/web/assets/settings-6eHKYbS7.js +2 -0
- package/dist/web/assets/skeleton-CfLYGtNX.js +1 -0
- package/dist/web/assets/specialists-Durm0DgK.js +1 -0
- package/dist/web/assets/stats-67akPa3A.js +1 -0
- package/dist/web/assets/topology-DQu3su19.js +1 -0
- package/dist/web/assets/trash-ChYI9ms1.js +1 -0
- package/dist/web/assets/useListDrag-0GPS1X83.js +1 -0
- package/dist/web/assets/vendor-markdown-DwXfjc7L.js +32 -0
- package/dist/web/assets/vendor-react-C1iE8mnY.js +9 -0
- package/dist/web/index.html +22 -0
- package/integrations/claude-code/.claude-plugin/plugin.json +19 -0
- package/integrations/claude-code/commands/apply.md +6 -0
- package/integrations/claude-code/commands/panel.md +6 -0
- package/integrations/claude-code/commands/run.md +6 -0
- package/integrations/claude-code/commands/status.md +6 -0
- package/integrations/claude-code/commands/web.md +6 -0
- package/integrations/claude-code/hooks/aip.ts +365 -0
- package/integrations/claude-code/hooks/feed.ts +923 -0
- package/integrations/claude-code/hooks/hooks.json +1 -0
- package/integrations/claude-code/hooks/pane.ts +396 -0
- package/integrations/claude-code/hooks/register.tsx +156 -0
- package/integrations/claude-code/hooks/theme.ts +59 -0
- package/integrations/claude-code/hooks/transcript.tsx +44 -0
- package/integrations/claude-code/hooks/view.tsx +378 -0
- package/integrations/claude-code/hooks/web.ts +162 -0
- package/integrations/claude-code/tsconfig.json +18 -0
- package/integrations/claude-code/types/index.d.ts +89 -0
- package/package.json +70 -4
- package/templates/aip/pipelines/feature.yaml +4 -0
- package/templates/aip/settings.yaml +10 -0
- package/templates/aip/specialists/coder.yaml +4 -0
- package/templates/aip/specialists/reviewer.yaml +5 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { observerHistoryView } from '../views/observer-history.js';
|
|
2
|
+
/** The settings of the observers and the actions of an observer on its run. */
|
|
3
|
+
export const observerHandlers = {
|
|
4
|
+
observers_history: async (params, { services }) => observerHistoryView(services.history.page(params)),
|
|
5
|
+
observers: async (_params, { snapshots }) => snapshots.observers(),
|
|
6
|
+
observers_set: (params, { services, snapshots }) => services.runs.engine.serial(async () => {
|
|
7
|
+
const result = await services.observers.set(params.settings);
|
|
8
|
+
return result.ok
|
|
9
|
+
? { ok: true, view: snapshots.observers() }
|
|
10
|
+
: { ok: false, reason: 'invalid', errors: result.errors };
|
|
11
|
+
}),
|
|
12
|
+
repair_action: (params, { services }) => services.observers.repairAction(params),
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=observers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observers.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/observers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAChD,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE;IAClE,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAA+B,EAAE,CAC9E,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;QACrC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC,EAAE;YACd,CAAC,CAAC,EAAE,EAAE,EAAE,IAAa,EAAE,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE;YACpD,CAAC,CAAC,EAAE,EAAE,EAAE,KAAc,EAAE,MAAM,EAAE,SAAkB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAChF,CAAC,CAAC;IACJ,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC;CACjD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Runs `work` in the queue of the daemon, as every request of the queue does. */
|
|
2
|
+
function serial(context, work) {
|
|
3
|
+
return context.services.runs.engine.serial(work);
|
|
4
|
+
}
|
|
5
|
+
/** The queue of tasks of a repository and the runs it holds. */
|
|
6
|
+
export const queueHandlers = {
|
|
7
|
+
run: (params, context) => serial(context, async () => {
|
|
8
|
+
const queued = await context.services.queue.items.enqueue(params);
|
|
9
|
+
return { ...queued, queue: context.snapshots.queue(queued.queue) };
|
|
10
|
+
}),
|
|
11
|
+
queue: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.control.queueOf(params.repository))),
|
|
12
|
+
queue_add: (params, context) => serial(context, async () => {
|
|
13
|
+
const { queue, item } = await context.services.queue.items.add(params);
|
|
14
|
+
return { ...context.snapshots.queue(queue), item };
|
|
15
|
+
}),
|
|
16
|
+
queue_edit: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.edit.edit(params))),
|
|
17
|
+
queue_remove: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.items.remove(params))),
|
|
18
|
+
queue_start: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.control.start(params))),
|
|
19
|
+
queue_pause: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.control.pause(params))),
|
|
20
|
+
queue_settings: (params, context) => serial(context, async () => context.snapshots.queue(await context.services.queue.control.settings(params))),
|
|
21
|
+
queue_run_now: (params, context) => serial(context, () => context.services.queue.control.runNow(params)),
|
|
22
|
+
queue_return: async (params, context) => {
|
|
23
|
+
const { queue, item } = await context.services.queue.control.returnRun(params);
|
|
24
|
+
return { ...context.snapshots.queue(queue), item };
|
|
25
|
+
},
|
|
26
|
+
run_pause: async (params, context) => {
|
|
27
|
+
const { queue, item } = await context.services.queue.control.pauseRun(params);
|
|
28
|
+
return { ...context.snapshots.queue(queue), item };
|
|
29
|
+
},
|
|
30
|
+
queue_dismiss: async (params, context) => context.snapshots.queue(await context.services.queue.control.dismiss(params)),
|
|
31
|
+
worker_queue_add: async (params, context) => {
|
|
32
|
+
const { queue, item } = await context.services.queue.items.workerAdd(params);
|
|
33
|
+
return { ...context.snapshots.queue(queue), item };
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/queue.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,SAAS,MAAM,CAAI,OAAmB,EAAE,IAAsB;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CACvB,MAAM,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;QACzB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClE,OAAO,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACrE,CAAC,CAAC;IACJ,KAAK,EAAE,CAA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AAO,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;IACD,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CACvC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAC1C,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC7E,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;CAC8B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { catalogView } from '../views/index.js';
|
|
2
|
+
/** The registry of repositories and the tag catalogs. */
|
|
3
|
+
export const repositoryHandlers = {
|
|
4
|
+
repositories: async (_params, { snapshots }) => snapshots.repositories(),
|
|
5
|
+
repository_add: ({ path, ...attributes }, { services, snapshots }) => services.runs.engine.serial(async () => {
|
|
6
|
+
await services.projects.add(path, attributes);
|
|
7
|
+
return snapshots.repositories();
|
|
8
|
+
}),
|
|
9
|
+
repository_update: ({ path, ...changes }, { services, snapshots }) => services.runs.engine.serial(async () => {
|
|
10
|
+
await services.compose.repositoryEdit.update(path, changes);
|
|
11
|
+
return snapshots.repositories();
|
|
12
|
+
}),
|
|
13
|
+
repository_move: (params, { services, snapshots }) => services.runs.engine.serial(async () => {
|
|
14
|
+
await services.compose.repositoryMove.move(params.path, params.to);
|
|
15
|
+
return snapshots.repositories();
|
|
16
|
+
}),
|
|
17
|
+
repository_remove: (params, { services, snapshots }) => services.runs.engine.serial(async () => {
|
|
18
|
+
await services.compose.repositoryRemoval.remove(params.path);
|
|
19
|
+
return snapshots.repositories();
|
|
20
|
+
}),
|
|
21
|
+
tags: async (params, { services }) => catalogView(await services.tags.catalogFor(params.repository)),
|
|
22
|
+
tag_add: (params, { services }) => services.runs.engine.serial(async () => catalogView(services.tags.of(await services.tags.add(params)))),
|
|
23
|
+
tag_edit: (params, { services }) => services.runs.engine.serial(async () => catalogView(services.tags.of(await services.tags.edit(params)))),
|
|
24
|
+
tag_remove: (params, { services }) => services.runs.engine.serial(async () => catalogView(services.tags.of(await services.queue.taskTags.remove(params)))),
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=repositories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/repositories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,yDAAyD;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE;IACxE,cAAc,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CACnE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;QACrC,MAAM,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC,YAAY,EAAE,CAAC;IAClC,CAAC,CAAC;IACJ,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CACnE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KA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AC,CAC/D;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CACrC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAChE;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACnC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CACrC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAC5E;CAC4B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { currentPermissions } from '../../../feature/runs/services/index.js';
|
|
2
|
+
/** Applies an event to the run and answers with its view. */
|
|
3
|
+
async function event(context, runId, build) {
|
|
4
|
+
return context.snapshots.run(await context.services.runs.requests.event(runId, build));
|
|
5
|
+
}
|
|
6
|
+
/** The runs: their status and what a person or a specialist does with them. */
|
|
7
|
+
export const runHandlers = {
|
|
8
|
+
status: async (params, { services, snapshots }) => {
|
|
9
|
+
const now = services.now();
|
|
10
|
+
if (params.runId)
|
|
11
|
+
return snapshots.run(services.runs.states.get(params.runId), now);
|
|
12
|
+
return snapshots.recentRuns(now);
|
|
13
|
+
},
|
|
14
|
+
finished_runs: async (params, { services, snapshots }) => {
|
|
15
|
+
const now = services.now();
|
|
16
|
+
const page = services.runs.states.page(params.limit, params.before, params.repository);
|
|
17
|
+
return { runs: page.runs.map((state) => snapshots.run(state, now)), next: page.next };
|
|
18
|
+
},
|
|
19
|
+
cancel: (params, context) => event(context, params.runId, { kind: 'cancel', group: params.group ?? null }),
|
|
20
|
+
run_skip: (params, context) => event(context, params.runId, { kind: 'step_skip', step: params.step, skip: params.skip }),
|
|
21
|
+
run_observer: (params, context) => event(context, params.runId, { kind: 'repair_allowed', allowed: params.enabled }),
|
|
22
|
+
answer: (params, context) => event(context, params.runId, (state) => ({
|
|
23
|
+
kind: 'answer',
|
|
24
|
+
group: params.group,
|
|
25
|
+
answer: params.answer,
|
|
26
|
+
permissions: currentPermissions(context.services.config, state),
|
|
27
|
+
})),
|
|
28
|
+
message: (params, context) => event(context, params.runId, {
|
|
29
|
+
kind: 'message',
|
|
30
|
+
group: params.group,
|
|
31
|
+
seq: params.seq,
|
|
32
|
+
text: params.text,
|
|
33
|
+
}),
|
|
34
|
+
report: (params, { services }) => services.runs.requests.workerEvent(params.token, (key) => ({
|
|
35
|
+
kind: 'report',
|
|
36
|
+
group: key.group,
|
|
37
|
+
seq: key.seq,
|
|
38
|
+
report: {
|
|
39
|
+
verdict: params.verdict,
|
|
40
|
+
summary: params.summary,
|
|
41
|
+
feedback: params.feedback ?? null,
|
|
42
|
+
questions: params.questions ?? null,
|
|
43
|
+
...(params.human_only === true ? { humanOnly: true } : {}),
|
|
44
|
+
},
|
|
45
|
+
})),
|
|
46
|
+
split: (params, { services }) => services.runs.requests.workerEvent(params.token, (key) => ({
|
|
47
|
+
kind: 'split_proposed',
|
|
48
|
+
seq: key.seq,
|
|
49
|
+
groups: params.groups,
|
|
50
|
+
})),
|
|
51
|
+
retry: async (params, { services, snapshots }) => snapshots.run(await services.queue.control.retry(params)),
|
|
52
|
+
run_title: (params, { services, snapshots }) => services.runs.engine.serial(async () => snapshots.run(await services.runs.requests.setTitle(params.runId, params.title))),
|
|
53
|
+
run_tags: (params, { services, snapshots }) => services.runs.engine.serial(async () => snapshots.run(await services.queue.taskTags.runTags(params))),
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","s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MAAM,CAAC,KAAK,IAAI,EAAE,CACrC,SAAS,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CACjF;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAC5C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CACrC,SAAS,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAC7D;CAC4B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { statsView } from '../views/stats.js';
|
|
2
|
+
/** The usage statistics: the report and the clearing of a project. */
|
|
3
|
+
export const statsHandlers = {
|
|
4
|
+
stats_report: async (params, { services }) => statsView(await services.stats.report.report({
|
|
5
|
+
...(params.since === undefined ? {} : { since: params.since }),
|
|
6
|
+
...(params.until === undefined ? {} : { until: params.until }),
|
|
7
|
+
...(params.repository === undefined ? {} : { repository: params.repository }),
|
|
8
|
+
})),
|
|
9
|
+
stats_clear: async (params, { services }) => {
|
|
10
|
+
// A project that left the registry may still have records: its path stands as written.
|
|
11
|
+
const repository = await services.registry
|
|
12
|
+
.resolve(params.repository)
|
|
13
|
+
.catch(() => params.repository);
|
|
14
|
+
return { removed: services.stats.ledger.clear(repository) };
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,sEAAsE;AACtE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC3C,SAAS,CACP,MAAM,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;QACjC,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;KAC9E,CAAC,CACH;IACH,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAA2B,EAAE;QACnE,uFAAuF;QACvF,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,QAAQ;aACvC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;aAC1B,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;IAC9D,CAAC;CAC8B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
2
|
+
const NO_PANEL = 'this daemon serves no web panel';
|
|
3
|
+
/** The daemon itself: liveness, stopping, subscriptions and the panel inside it. */
|
|
4
|
+
export const systemHandlers = {
|
|
5
|
+
ping: async (_params, { services, build }) => ({
|
|
6
|
+
pong: true,
|
|
7
|
+
pid: process.pid,
|
|
8
|
+
build,
|
|
9
|
+
busy: services.runs.engine.busy(),
|
|
10
|
+
network: services.network.status(),
|
|
11
|
+
}),
|
|
12
|
+
network_status: async (_params, { services }) => services.network.status(),
|
|
13
|
+
shutdown: async () => ({ stopping: true }),
|
|
14
|
+
// After the work already queued, so the check and the stop are one step.
|
|
15
|
+
shutdown_idle: (_params, { services }) => {
|
|
16
|
+
const { engine } = services.runs;
|
|
17
|
+
return engine.serial(() => {
|
|
18
|
+
if (engine.stopping || engine.busy())
|
|
19
|
+
return Promise.resolve({ stopping: false });
|
|
20
|
+
// Stopping now keeps the scheduler from starting an agent before the daemon closes.
|
|
21
|
+
engine.halt();
|
|
22
|
+
return Promise.resolve({ stopping: true });
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
subscribe: () => Promise.reject(rejected('subscribe is served on its own connection')),
|
|
26
|
+
web_status: async (_params, { panel }) => panel?.status() ?? {
|
|
27
|
+
running: false,
|
|
28
|
+
host: null,
|
|
29
|
+
port: null,
|
|
30
|
+
auth: null,
|
|
31
|
+
url: null,
|
|
32
|
+
reason: NO_PANEL,
|
|
33
|
+
stopped: false,
|
|
34
|
+
},
|
|
35
|
+
web_start: (params, { panel }) => panel ? panel.start(params) : Promise.reject(rejected(NO_PANEL)),
|
|
36
|
+
web_stop: (_params, { panel }) => (panel ? panel.stop() : Promise.reject(rejected(NO_PANEL))),
|
|
37
|
+
processes: (_params, { services }) => services.processes.list(),
|
|
38
|
+
process_kill: (params, { services }) => services.processes.kill(params.pid),
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAK7D,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEnD,oFAAoF;AACpF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5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,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,IAAI;QACT,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,KAAK;KACf;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7F,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE;IAC/D,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;CAC5C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { configHandlers } from './config.js';
|
|
2
|
+
import { groupHandlers } from './groups.js';
|
|
3
|
+
import { observerHandlers } from './observers.js';
|
|
4
|
+
import { queueHandlers } from './queue.js';
|
|
5
|
+
import { repositoryHandlers } from './repositories.js';
|
|
6
|
+
import { runHandlers } from './runs.js';
|
|
7
|
+
import { statsHandlers } from './stats.js';
|
|
8
|
+
import { systemHandlers } from './system.js';
|
|
9
|
+
/** Every method of the daemon and its handler. */
|
|
10
|
+
export const handlers = {
|
|
11
|
+
...systemHandlers,
|
|
12
|
+
...repositoryHandlers,
|
|
13
|
+
...observerHandlers,
|
|
14
|
+
...configHandlers,
|
|
15
|
+
...runHandlers,
|
|
16
|
+
...groupHandlers,
|
|
17
|
+
...queueHandlers,
|
|
18
|
+
...statsHandlers,
|
|
19
|
+
};
|
|
20
|
+
/** Answers a request with the handler of its method. */
|
|
21
|
+
export function handle(request, context) {
|
|
22
|
+
const handler = handlers[request.method];
|
|
23
|
+
return handler(request.params, context);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/table.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,kDAAkD;AAClD,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC,GAAG,cAAc;IACjB,GAAG,kBAAkB;IACrB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,WAAW;IACd,GAAG,aAAa;IAChB,GAAG,aAAa;IAChB,GAAG,aAAa;CACjB,CAAC;AAEF,wDAAwD;AACxD,MAAM,UAAU,MAAM,CAAC,OAAgB,EAAE,OAAmB;IAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAoB,CAAC;IAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,MAAe,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/presentation/ipc/handlers/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,176 @@
|
|
|
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
|
+
network: { changed: () => this.send('network', { network: this.services.network.status() }) },
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A new subscriber gets the snapshot of the runs, queues, repositories and tags, then the last
|
|
81
|
+
* list of background processes, then every event. Returns the function that unsubscribes.
|
|
82
|
+
*/
|
|
83
|
+
subscribe(send) {
|
|
84
|
+
this.seq += 1;
|
|
85
|
+
const runs = this.snapshots.recentRuns();
|
|
86
|
+
const queues = this.snapshots.activeQueues();
|
|
87
|
+
const repositories = this.snapshots.repositories();
|
|
88
|
+
this.repositoriesJson = JSON.stringify(repositories);
|
|
89
|
+
const tags = catalogView(this.services.tags.all());
|
|
90
|
+
send(JSON.stringify({ event: 'snapshot', seq: this.seq, runs, queues, repositories, tags }));
|
|
91
|
+
const processes = this.services.processes.lastSent();
|
|
92
|
+
if (processes !== null) {
|
|
93
|
+
this.seq += 1;
|
|
94
|
+
send(JSON.stringify({ event: 'processes', seq: this.seq, processes }));
|
|
95
|
+
}
|
|
96
|
+
this.subscribers.add(send);
|
|
97
|
+
this.services.processes.watch();
|
|
98
|
+
return () => {
|
|
99
|
+
this.subscribers.delete(send);
|
|
100
|
+
if (this.subscribers.size === 0)
|
|
101
|
+
this.services.processes.unwatch();
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** The `run` event. */
|
|
105
|
+
run(state) {
|
|
106
|
+
if (this.subscribers.size === 0)
|
|
107
|
+
return;
|
|
108
|
+
this.send('run', { run: this.snapshots.run(state) });
|
|
109
|
+
}
|
|
110
|
+
/** Sends the `queue` event and remembers which runs subscribers have seen. */
|
|
111
|
+
queue(queue) {
|
|
112
|
+
const view = this.snapshots.queue(queue);
|
|
113
|
+
this.queueRuns.set(queue.repository, queueSignature(view));
|
|
114
|
+
this.send('queue', { queue: view });
|
|
115
|
+
this.repositories();
|
|
116
|
+
this.returned(queue);
|
|
117
|
+
}
|
|
118
|
+
/** Sends the queue when it looks different to the subscribers. */
|
|
119
|
+
queueChecked(queue) {
|
|
120
|
+
const seen = this.queueRuns.get(queue.repository);
|
|
121
|
+
if (seen !== queueSignature(this.snapshots.queue(queue)))
|
|
122
|
+
this.queue(queue);
|
|
123
|
+
}
|
|
124
|
+
/** Publishes the registry when its counters or entries differ from what subscribers last saw. */
|
|
125
|
+
repositories() {
|
|
126
|
+
if (this.subscribers.size === 0)
|
|
127
|
+
return;
|
|
128
|
+
const repositories = this.snapshots.repositories();
|
|
129
|
+
const text = JSON.stringify(repositories);
|
|
130
|
+
if (text === this.repositoriesJson)
|
|
131
|
+
return;
|
|
132
|
+
this.repositoriesJson = text;
|
|
133
|
+
this.send('repositories', { repositories });
|
|
134
|
+
}
|
|
135
|
+
/** Publishes the observers when they look different from what subscribers last saw. */
|
|
136
|
+
observers() {
|
|
137
|
+
if (this.subscribers.size === 0)
|
|
138
|
+
return;
|
|
139
|
+
const view = this.snapshots.observers();
|
|
140
|
+
const text = JSON.stringify(view);
|
|
141
|
+
if (text === this.observersJson)
|
|
142
|
+
return;
|
|
143
|
+
this.observersJson = text;
|
|
144
|
+
this.send('observers', { observers: view });
|
|
145
|
+
}
|
|
146
|
+
/** Publishes all tags after a change of the catalog of the repository. */
|
|
147
|
+
tags(repository) {
|
|
148
|
+
this.send('tags', { repository, tags: catalogView(this.services.tags.all()) });
|
|
149
|
+
}
|
|
150
|
+
/** Sends a `run` event to every run whose return item appeared, changed or went away. */
|
|
151
|
+
returned(queue) {
|
|
152
|
+
const before = this.returnItems.get(queue.repository) ?? new Map();
|
|
153
|
+
const after = new Map();
|
|
154
|
+
for (const item of queue.items)
|
|
155
|
+
if (item.run !== null)
|
|
156
|
+
after.set(item.run, item.id);
|
|
157
|
+
this.returnItems.set(queue.repository, after);
|
|
158
|
+
for (const run of new Set([...before.keys(), ...after.keys()])) {
|
|
159
|
+
if (before.get(run) === after.get(run))
|
|
160
|
+
continue;
|
|
161
|
+
const state = this.services.runs.states.lookup(run);
|
|
162
|
+
if (state)
|
|
163
|
+
this.run(state);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/** One event with the next number; nothing is counted without subscribers. */
|
|
167
|
+
send(event, payload) {
|
|
168
|
+
if (this.subscribers.size === 0)
|
|
169
|
+
return;
|
|
170
|
+
this.seq += 1;
|
|
171
|
+
const line = JSON.stringify({ event, seq: this.seq, ...payload });
|
|
172
|
+
for (const send of this.subscribers)
|
|
173
|
+
send(line);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=publisher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../../src/presentation/ipc/publisher.ts"],"names":[],"mapp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;QACxC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAClE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { 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":"","s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