@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,491 @@
|
|
|
1
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
import { DELIVERY_MODES, withConfigDefaults, } from '../feature/swarm-config/types/index.js';
|
|
3
|
+
import { MESSAGE_GROUP, ON_LIMIT_MODES, RUN_HOLDS, REPAIR_GROUP, RESOLVE_GROUP, emptyRepair, SPLIT_GROUP, allGroups, isActionGroup, pendingDelivery, } from '../feature/runs/types/index.js';
|
|
4
|
+
import { defaultObserverSettings, } from '../feature/observers/types/index.js';
|
|
5
|
+
import { transition } from '../feature/runs/machine/index.js';
|
|
6
|
+
import { migrate } from './schema.js';
|
|
7
|
+
const RECENT_FINISHED = 10;
|
|
8
|
+
function json(value) {
|
|
9
|
+
return value === null || value === undefined ? null : JSON.stringify(value);
|
|
10
|
+
}
|
|
11
|
+
function parse(value) {
|
|
12
|
+
return JSON.parse(String(value));
|
|
13
|
+
}
|
|
14
|
+
function nullable(value) {
|
|
15
|
+
return value === null ? null : parse(value);
|
|
16
|
+
}
|
|
17
|
+
function text(value) {
|
|
18
|
+
return value === null ? null : String(value);
|
|
19
|
+
}
|
|
20
|
+
function artifactRecord(row) {
|
|
21
|
+
return {
|
|
22
|
+
id: String(row.id),
|
|
23
|
+
runId: String(row.run_id),
|
|
24
|
+
group: String(row.group_slug),
|
|
25
|
+
step: String(row.step_id),
|
|
26
|
+
seq: Number(row.seq),
|
|
27
|
+
specialist: String(row.specialist),
|
|
28
|
+
title: String(row.title),
|
|
29
|
+
fileName: String(row.file_name),
|
|
30
|
+
size: Number(row.size),
|
|
31
|
+
uri: String(row.uri),
|
|
32
|
+
createdAt: Number(row.created_at),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export class Store {
|
|
36
|
+
database;
|
|
37
|
+
constructor(path) {
|
|
38
|
+
this.database = new DatabaseSync(path);
|
|
39
|
+
migrate(this.database);
|
|
40
|
+
}
|
|
41
|
+
close() {
|
|
42
|
+
this.database.close();
|
|
43
|
+
}
|
|
44
|
+
transaction(work) {
|
|
45
|
+
this.database.exec('BEGIN IMMEDIATE');
|
|
46
|
+
try {
|
|
47
|
+
const result = work();
|
|
48
|
+
this.database.exec('COMMIT');
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
this.database.exec('ROLLBACK');
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Settings of the observers; the defaults until they are saved. */
|
|
57
|
+
loadObservers() {
|
|
58
|
+
const row = this.database.prepare('SELECT settings_json FROM observers WHERE id = 1').get();
|
|
59
|
+
const defaults = defaultObserverSettings();
|
|
60
|
+
if (!row)
|
|
61
|
+
return defaults;
|
|
62
|
+
try {
|
|
63
|
+
const saved = JSON.parse(String(row.settings_json));
|
|
64
|
+
return { ...defaults, ...saved };
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return defaults;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
saveObservers(settings) {
|
|
71
|
+
this.database
|
|
72
|
+
.prepare(`INSERT INTO observers (id, settings_json, updated_at) VALUES (1, ?, ?)
|
|
73
|
+
ON CONFLICT (id) DO UPDATE SET settings_json = excluded.settings_json, updated_at = excluded.updated_at`)
|
|
74
|
+
.run(JSON.stringify(settings), Date.now());
|
|
75
|
+
}
|
|
76
|
+
saveRun(state) {
|
|
77
|
+
this.transaction(() => this.writeRun(state));
|
|
78
|
+
}
|
|
79
|
+
writeRun(state) {
|
|
80
|
+
const { run } = state;
|
|
81
|
+
this.database
|
|
82
|
+
.prepare(`INSERT INTO runs (id, repository, pipeline, base_commit, branch, ref_style, created_at, finished_at, config_json, dirty_warning, next_merge_seq, pending_delivery_json, title, name, naming_usage_json, from_queue, tags_json, queue_item, skipped_steps_json, number, hold, repair_json)
|
|
83
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
84
|
+
ON CONFLICT (id) DO UPDATE SET finished_at = excluded.finished_at, next_merge_seq = excluded.next_merge_seq, pending_delivery_json = excluded.pending_delivery_json, title = excluded.title, name = excluded.name, naming_usage_json = excluded.naming_usage_json, tags_json = excluded.tags_json, skipped_steps_json = excluded.skipped_steps_json, hold = excluded.hold, repair_json = excluded.repair_json`)
|
|
85
|
+
.run(run.id, run.repository, run.pipeline, run.baseCommit, run.branch, run.refStyle, run.createdAt, run.finishedAt, JSON.stringify(run.config), run.dirtyWarning ? 1 : 0, run.nextMergeSeq, json(run.pendingDelivery), run.title, run.name, json(run.namingUsage), run.fromQueue ? 1 : 0, JSON.stringify(run.tags), run.queueItem, JSON.stringify(run.skippedSteps), run.number, run.hold, JSON.stringify(run.repair));
|
|
86
|
+
const groupStatement = this.database.prepare(`INSERT OR REPLACE INTO groups (run_id, slug, position, title, task, status, pending_json, rejections_json, question, reason, warnings_json, decisions_json, conflict_files_json, merge_seq, merge_in_flight, update_on_conflict, merge_commit, delivery_json, questions_json, human_only)
|
|
87
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
88
|
+
const attemptStatement = this.database.prepare(`INSERT OR REPLACE INTO attempts (run_id, group_slug, seq, step_id, step_index, round, specialist, runtime, model, status, input_json, resume_session, session_id, report_json, reason_json, started_at, finished_at, usage_json, proposal_json, denials_json, outside_changes_json)
|
|
89
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
90
|
+
for (const group of allGroups(state)) {
|
|
91
|
+
groupStatement.run(run.id, group.slug, group.position, group.title, group.task, group.status, json(group.pending), JSON.stringify(group.rejections), group.question, group.reason, JSON.stringify(group.warnings), JSON.stringify(group.decisions), JSON.stringify(group.conflictFiles), group.mergeSeq, group.mergeInFlight ? 1 : 0, group.updateOnConflict ? 1 : 0, group.mergeCommit, JSON.stringify(group.delivery), json(group.questions), group.humanOnly);
|
|
92
|
+
for (const attempt of group.attempts) {
|
|
93
|
+
attemptStatement.run(run.id, group.slug, attempt.seq, attempt.stepId, attempt.stepIndex, attempt.round, attempt.specialist, attempt.runtime, attempt.model, attempt.status, JSON.stringify(attempt.input), attempt.resumeSession, attempt.sessionId, json(attempt.report), json(attempt.reason), attempt.startedAt, attempt.finishedAt, json(attempt.usage), json(attempt.proposal), JSON.stringify(attempt.denials), JSON.stringify(attempt.outsideChanges));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
runPatch(runId) {
|
|
98
|
+
const row = this.database.prepare('SELECT * FROM run_patches WHERE run_id = ?').get(runId);
|
|
99
|
+
return row
|
|
100
|
+
? {
|
|
101
|
+
uri: String(row.uri),
|
|
102
|
+
commit: String(row.commit_id),
|
|
103
|
+
size: Number(row.size),
|
|
104
|
+
createdAt: Number(row.created_at),
|
|
105
|
+
}
|
|
106
|
+
: null;
|
|
107
|
+
}
|
|
108
|
+
setRunPatch(runId, record) {
|
|
109
|
+
this.database
|
|
110
|
+
.prepare(`INSERT INTO run_patches (run_id, uri, commit_id, size, created_at) VALUES (?, ?, ?, ?, ?)
|
|
111
|
+
ON CONFLICT (run_id) DO UPDATE SET uri = excluded.uri, commit_id = excluded.commit_id,
|
|
112
|
+
size = excluded.size, created_at = excluded.created_at`)
|
|
113
|
+
.run(runId, record.uri, record.commit, record.size, record.createdAt);
|
|
114
|
+
}
|
|
115
|
+
runPatchIds() {
|
|
116
|
+
return this.database.prepare('SELECT run_id FROM run_patches').all().map((row) => String(row.run_id));
|
|
117
|
+
}
|
|
118
|
+
/** The artifact the same attempt already published under that file name, if any. */
|
|
119
|
+
findArtifact(runId, group, seq, fileName) {
|
|
120
|
+
const row = this.database
|
|
121
|
+
.prepare('SELECT * FROM artifacts WHERE run_id = ? AND group_slug = ? AND seq = ? AND file_name = ?')
|
|
122
|
+
.get(runId, group, seq, fileName);
|
|
123
|
+
return row ? artifactRecord(row) : null;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Records an artifact; the same attempt publishing the same file name again replaces the
|
|
127
|
+
* earlier record (its `id` stays). Returns the stored record and the URI it replaced.
|
|
128
|
+
*/
|
|
129
|
+
addArtifact(record) {
|
|
130
|
+
return this.transaction(() => {
|
|
131
|
+
const before = this.findArtifact(record.runId, record.group, record.seq, record.fileName);
|
|
132
|
+
this.database
|
|
133
|
+
.prepare(`INSERT INTO artifacts (id, run_id, group_slug, step_id, seq, specialist, title, file_name, size, uri, created_at)
|
|
134
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
135
|
+
ON CONFLICT (run_id, group_slug, seq, file_name) DO UPDATE SET
|
|
136
|
+
title = excluded.title, size = excluded.size, uri = excluded.uri,
|
|
137
|
+
created_at = excluded.created_at, specialist = excluded.specialist,
|
|
138
|
+
step_id = excluded.step_id`)
|
|
139
|
+
.run(record.id, record.runId, record.group, record.step, record.seq, record.specialist, record.title, record.fileName, record.size, record.uri, record.createdAt);
|
|
140
|
+
const artifact = this.findArtifact(record.runId, record.group, record.seq, record.fileName);
|
|
141
|
+
return { artifact: artifact, previousUri: before?.uri ?? null };
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** Artifacts of a group, newest first. */
|
|
145
|
+
artifacts(runId, group) {
|
|
146
|
+
return this.database
|
|
147
|
+
.prepare('SELECT * FROM artifacts WHERE run_id = ? AND group_slug = ? ORDER BY created_at DESC, rowid DESC')
|
|
148
|
+
.all(runId, group).map(artifactRecord);
|
|
149
|
+
}
|
|
150
|
+
artifact(runId, id) {
|
|
151
|
+
const row = this.database
|
|
152
|
+
.prepare('SELECT * FROM artifacts WHERE run_id = ? AND id = ?')
|
|
153
|
+
.get(runId, id);
|
|
154
|
+
return row ? artifactRecord(row) : null;
|
|
155
|
+
}
|
|
156
|
+
artifactCount(runId, group) {
|
|
157
|
+
const row = this.database
|
|
158
|
+
.prepare('SELECT COUNT(*) AS n FROM artifacts WHERE run_id = ? AND group_slug = ?')
|
|
159
|
+
.get(runId, group);
|
|
160
|
+
return Number(row.n);
|
|
161
|
+
}
|
|
162
|
+
/** Number of artifacts per group of a run. */
|
|
163
|
+
artifactCounts(runId) {
|
|
164
|
+
const rows = this.database
|
|
165
|
+
.prepare('SELECT group_slug, COUNT(*) AS n, MAX(created_at) AS at, SUM(size) AS bytes FROM artifacts WHERE run_id = ? GROUP BY group_slug')
|
|
166
|
+
.all(runId);
|
|
167
|
+
return new Map(rows.map((row) => [
|
|
168
|
+
String(row.group_slug),
|
|
169
|
+
{ count: Number(row.n), revision: Number(row.at) + Number(row.bytes) },
|
|
170
|
+
]));
|
|
171
|
+
}
|
|
172
|
+
/** URIs of all artifacts by run, for sweeping the storage. */
|
|
173
|
+
artifactUris() {
|
|
174
|
+
const uris = new Map();
|
|
175
|
+
for (const row of this.database.prepare('SELECT run_id, uri FROM artifacts').all()) {
|
|
176
|
+
const run = String(row.run_id);
|
|
177
|
+
uris.set(run, [...(uris.get(run) ?? []), String(row.uri)]);
|
|
178
|
+
}
|
|
179
|
+
return uris;
|
|
180
|
+
}
|
|
181
|
+
loadRun(id) {
|
|
182
|
+
const row = this.database.prepare('SELECT * FROM runs WHERE id = ?').get(id);
|
|
183
|
+
return row ? this.hydrate(row) : null;
|
|
184
|
+
}
|
|
185
|
+
/** The run that started from queue item `item` in the repository, if any. */
|
|
186
|
+
runOfQueueItem(repository, item) {
|
|
187
|
+
const row = this.database
|
|
188
|
+
.prepare('SELECT * FROM runs WHERE repository = ? AND queue_item = ? LIMIT 1')
|
|
189
|
+
.get(repository, item);
|
|
190
|
+
return row ? this.hydrate(row) : null;
|
|
191
|
+
}
|
|
192
|
+
activeRuns() {
|
|
193
|
+
const rows = this.database
|
|
194
|
+
.prepare('SELECT * FROM runs WHERE finished_at IS NULL ORDER BY created_at, id')
|
|
195
|
+
.all();
|
|
196
|
+
return rows.map((row) => this.hydrate(row));
|
|
197
|
+
}
|
|
198
|
+
finishedRuns() {
|
|
199
|
+
const rows = this.database
|
|
200
|
+
.prepare('SELECT * FROM runs WHERE finished_at IS NOT NULL ORDER BY finished_at DESC, id DESC')
|
|
201
|
+
.all();
|
|
202
|
+
return rows.map((row) => this.hydrate(row));
|
|
203
|
+
}
|
|
204
|
+
recentRuns(limit = RECENT_FINISHED) {
|
|
205
|
+
const finished = this.database
|
|
206
|
+
.prepare('SELECT * FROM runs WHERE finished_at IS NOT NULL ORDER BY created_at DESC, id DESC LIMIT ?')
|
|
207
|
+
.all(limit);
|
|
208
|
+
return [...this.activeRuns(), ...finished.map((row) => this.hydrate(row))];
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A page of finished runs, newest created first, strictly after the cursor `before`;
|
|
212
|
+
* `more` tells whether older finished runs remain.
|
|
213
|
+
*/
|
|
214
|
+
finishedRunsPage(limit, before) {
|
|
215
|
+
const rows = (before
|
|
216
|
+
? this.database
|
|
217
|
+
.prepare(`SELECT * FROM runs WHERE finished_at IS NOT NULL
|
|
218
|
+
AND (created_at < ? OR (created_at = ? AND id < ?))
|
|
219
|
+
ORDER BY created_at DESC, id DESC LIMIT ?`)
|
|
220
|
+
.all(before.createdAt, before.createdAt, before.id, limit + 1)
|
|
221
|
+
: this.database
|
|
222
|
+
.prepare('SELECT * FROM runs WHERE finished_at IS NOT NULL ORDER BY created_at DESC, id DESC LIMIT ?')
|
|
223
|
+
.all(limit + 1));
|
|
224
|
+
return {
|
|
225
|
+
runs: rows.slice(0, limit).map((row) => this.hydrate(row)),
|
|
226
|
+
more: rows.length > limit,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Marks what the old daemon left running as interrupted: active runs and finished runs whose
|
|
231
|
+
* delivery had not finished. The returned effects (a restarted delivery) are for the daemon.
|
|
232
|
+
*/
|
|
233
|
+
recover(now) {
|
|
234
|
+
return this.transaction(() => {
|
|
235
|
+
const delivering = this.database
|
|
236
|
+
.prepare('SELECT * FROM runs WHERE finished_at IS NOT NULL AND pending_delivery_json IS NOT NULL ORDER BY created_at, id')
|
|
237
|
+
.all();
|
|
238
|
+
const states = [...this.activeRuns(), ...delivering.map((row) => this.hydrate(row))];
|
|
239
|
+
return states.map((state) => {
|
|
240
|
+
const effects = transition(state, { kind: 'interrupted' }, now);
|
|
241
|
+
this.writeRun(state);
|
|
242
|
+
return { state, effects };
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/** Ids of the runs with an attempt that ran out of a usage limit. */
|
|
247
|
+
limitedRunIds() {
|
|
248
|
+
const rows = this.database
|
|
249
|
+
.prepare(`SELECT DISTINCT run_id FROM attempts WHERE reason_json LIKE '%"usage_limit"%' ORDER BY run_id`)
|
|
250
|
+
.all();
|
|
251
|
+
return rows.map((row) => String(row.run_id));
|
|
252
|
+
}
|
|
253
|
+
/** The largest task number of the repository among its runs and queue items; 0 when none. */
|
|
254
|
+
maxTaskNumber(repository) {
|
|
255
|
+
const row = this.database
|
|
256
|
+
.prepare(`SELECT MAX(
|
|
257
|
+
(SELECT COALESCE(MAX(number), 0) FROM runs WHERE repository = ?),
|
|
258
|
+
(SELECT COALESCE(MAX(number), 0) FROM queue_items WHERE repository = ?)
|
|
259
|
+
) AS max`)
|
|
260
|
+
.get(repository, repository);
|
|
261
|
+
return Number(row.max);
|
|
262
|
+
}
|
|
263
|
+
/** The id of the run of the repository with this task number; null when there is none. */
|
|
264
|
+
runIdByNumber(repository, number) {
|
|
265
|
+
const row = this.database
|
|
266
|
+
.prepare('SELECT id FROM runs WHERE repository = ? AND number = ?')
|
|
267
|
+
.get(repository, number);
|
|
268
|
+
return row?.id ?? null;
|
|
269
|
+
}
|
|
270
|
+
loadQueue(repository) {
|
|
271
|
+
const row = this.database
|
|
272
|
+
.prepare('SELECT * FROM queues WHERE repository = ?')
|
|
273
|
+
.get(repository);
|
|
274
|
+
return row ? this.hydrateQueue(row) : null;
|
|
275
|
+
}
|
|
276
|
+
repositories() {
|
|
277
|
+
const rows = this.database
|
|
278
|
+
.prepare('SELECT path, added_at FROM repositories ORDER BY path')
|
|
279
|
+
.all();
|
|
280
|
+
return rows.map((row) => ({ path: row.path, addedAt: row.added_at }));
|
|
281
|
+
}
|
|
282
|
+
/** Returns true when the repository was not in the registry yet. */
|
|
283
|
+
addRepository(path, now) {
|
|
284
|
+
const result = this.database
|
|
285
|
+
.prepare('INSERT OR IGNORE INTO repositories (path, added_at) VALUES (?, ?)')
|
|
286
|
+
.run(path, now);
|
|
287
|
+
return Number(result.changes) > 0;
|
|
288
|
+
}
|
|
289
|
+
removeRepository(path) {
|
|
290
|
+
this.database.prepare('DELETE FROM repositories WHERE path = ?').run(path);
|
|
291
|
+
}
|
|
292
|
+
tags() {
|
|
293
|
+
const rows = this.database
|
|
294
|
+
.prepare('SELECT id, repository, name, color, created_at, task_run, task_number FROM tags ORDER BY created_at, id')
|
|
295
|
+
.all();
|
|
296
|
+
return rows.map((row) => ({
|
|
297
|
+
id: row.id,
|
|
298
|
+
repository: row.repository,
|
|
299
|
+
name: row.name,
|
|
300
|
+
color: row.color,
|
|
301
|
+
createdAt: row.created_at,
|
|
302
|
+
task: row.task_run !== null && row.task_number !== null
|
|
303
|
+
? { run: row.task_run, number: row.task_number }
|
|
304
|
+
: null,
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
307
|
+
saveTag(tag) {
|
|
308
|
+
this.database
|
|
309
|
+
.prepare(`INSERT INTO tags (id, repository, name, color, created_at, task_run, task_number) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
310
|
+
ON CONFLICT (id) DO UPDATE SET name = excluded.name, color = excluded.color`)
|
|
311
|
+
.run(tag.id, tag.repository, tag.name, tag.color, tag.createdAt, tag.task?.run ?? null, tag.task?.number ?? null);
|
|
312
|
+
}
|
|
313
|
+
/** Deletes the tag and takes its id off every run and queue item of its repository, in one transaction. */
|
|
314
|
+
removeTag(repository, id) {
|
|
315
|
+
this.transaction(() => {
|
|
316
|
+
this.database.prepare('DELETE FROM tags WHERE id = ? AND repository = ?').run(id, repository);
|
|
317
|
+
for (const table of ['runs', 'queue_items']) {
|
|
318
|
+
this.database
|
|
319
|
+
.prepare(`UPDATE ${table} SET tags_json = (SELECT json_group_array(value) FROM json_each(tags_json) WHERE value <> ?)
|
|
320
|
+
WHERE repository = ? AND EXISTS (SELECT 1 FROM json_each(tags_json) WHERE value = ?)`)
|
|
321
|
+
.run(id, repository, id);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
queues() {
|
|
326
|
+
const rows = this.database.prepare('SELECT * FROM queues ORDER BY repository').all();
|
|
327
|
+
return rows.map((row) => this.hydrateQueue(row));
|
|
328
|
+
}
|
|
329
|
+
saveQueue(queue) {
|
|
330
|
+
this.transaction(() => {
|
|
331
|
+
this.database
|
|
332
|
+
.prepare(`INSERT INTO queues (repository, status, parallel, runs_json, acknowledged_json, stop_json, updated_at, autopilot, skip_failed, skipped_json, autopilot_answer, on_limit, next_number, priority_json, auto_answer)
|
|
333
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
334
|
+
ON CONFLICT (repository) DO UPDATE SET status = excluded.status, parallel = excluded.parallel, runs_json = excluded.runs_json, acknowledged_json = excluded.acknowledged_json, stop_json = excluded.stop_json, updated_at = excluded.updated_at, autopilot = excluded.autopilot, skip_failed = excluded.skip_failed, skipped_json = excluded.skipped_json, autopilot_answer = excluded.autopilot_answer, on_limit = excluded.on_limit, next_number = excluded.next_number, priority_json = excluded.priority_json, auto_answer = excluded.auto_answer`)
|
|
335
|
+
.run(queue.repository, queue.status, queue.parallel, JSON.stringify(queue.runs), JSON.stringify(queue.acknowledged), json(queue.stop), queue.updatedAt, queue.autopilot ? 1 : 0, queue.skipFailed ? 1 : 0, JSON.stringify(queue.skipped), queue.autopilotAnswer, queue.onLimit, queue.nextNumber, JSON.stringify(queue.priority), queue.autoAnswer ? 1 : 0);
|
|
336
|
+
this.database.prepare('DELETE FROM queue_items WHERE repository = ?').run(queue.repository);
|
|
337
|
+
const insert = this.database.prepare(`INSERT INTO queue_items (id, repository, position, pipeline, task, groups_json, title, error, created_at, auto_deliver, tags_json, skip_json, after_json, delivery_mode, run_id, postponed, number)
|
|
338
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
339
|
+
queue.items.forEach((item, position) => insert.run(item.id, queue.repository, position, item.pipeline, item.task, json(item.groups), item.title, item.error, item.createdAt, item.autoDeliver === null ? null : item.autoDeliver ? 1 : 0, JSON.stringify(item.tags), JSON.stringify(item.skip), JSON.stringify(item.after), item.deliveryMode, item.run, item.postponed ? 1 : 0, item.number));
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
hydrateQueue(row) {
|
|
343
|
+
const repository = String(row.repository);
|
|
344
|
+
const items = this.database
|
|
345
|
+
.prepare('SELECT * FROM queue_items WHERE repository = ? ORDER BY position')
|
|
346
|
+
.all(repository);
|
|
347
|
+
return {
|
|
348
|
+
repository,
|
|
349
|
+
status: String(row.status),
|
|
350
|
+
parallel: Number(row.parallel),
|
|
351
|
+
autopilot: Number(row.autopilot ?? 0) === 1,
|
|
352
|
+
autoAnswer: Number(row.auto_answer ?? 0) === 1,
|
|
353
|
+
skipFailed: Number(row.skip_failed ?? 0) === 1,
|
|
354
|
+
skipped: row.skipped_json ? parse(row.skipped_json) : [],
|
|
355
|
+
autopilotAnswer: text(row.autopilot_answer ?? null),
|
|
356
|
+
onLimit: ON_LIMIT_MODES.find((mode) => mode === row.on_limit) ?? 'wait',
|
|
357
|
+
nextNumber: Number(row.next_number ?? 1),
|
|
358
|
+
priority: row.priority_json ? parse(row.priority_json) : [],
|
|
359
|
+
items: items.map((item) => ({
|
|
360
|
+
id: String(item.id),
|
|
361
|
+
number: Number(item.number),
|
|
362
|
+
pipeline: String(item.pipeline),
|
|
363
|
+
task: text(item.task ?? null),
|
|
364
|
+
groups: nullable(item.groups_json ?? null),
|
|
365
|
+
title: text(item.title ?? null),
|
|
366
|
+
autoDeliver: item.auto_deliver === null || item.auto_deliver === undefined
|
|
367
|
+
? null
|
|
368
|
+
: Number(item.auto_deliver) === 1,
|
|
369
|
+
deliveryMode: DELIVERY_MODES.find((mode) => mode === item.delivery_mode) ?? null,
|
|
370
|
+
tags: item.tags_json ? parse(item.tags_json) : [],
|
|
371
|
+
skip: item.skip_json ? parse(item.skip_json) : [],
|
|
372
|
+
after: item.after_json ? parse(item.after_json) : [],
|
|
373
|
+
postponed: Number(item.postponed ?? 0) === 1,
|
|
374
|
+
createdAt: Number(item.created_at),
|
|
375
|
+
error: text(item.error ?? null),
|
|
376
|
+
run: text(item.run_id ?? null),
|
|
377
|
+
})),
|
|
378
|
+
runs: parse(row.runs_json ?? null),
|
|
379
|
+
acknowledged: parse(row.acknowledged_json ?? null),
|
|
380
|
+
stop: nullable(row.stop_json ?? null),
|
|
381
|
+
updatedAt: Number(row.updated_at),
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
hydrate(row) {
|
|
385
|
+
const runId = String(row.id);
|
|
386
|
+
const attemptRows = this.database
|
|
387
|
+
.prepare('SELECT * FROM attempts WHERE run_id = ? ORDER BY group_slug, seq')
|
|
388
|
+
.all(runId);
|
|
389
|
+
const groupRows = this.database
|
|
390
|
+
.prepare('SELECT * FROM groups WHERE run_id = ? ORDER BY position')
|
|
391
|
+
.all(runId);
|
|
392
|
+
const groups = groupRows.map((group) => hydrateGroup(group, attemptRows));
|
|
393
|
+
return {
|
|
394
|
+
run: {
|
|
395
|
+
id: runId,
|
|
396
|
+
repository: String(row.repository),
|
|
397
|
+
pipeline: String(row.pipeline),
|
|
398
|
+
baseCommit: String(row.base_commit),
|
|
399
|
+
branch: String(row.branch),
|
|
400
|
+
refStyle: String(row.ref_style),
|
|
401
|
+
createdAt: Number(row.created_at),
|
|
402
|
+
finishedAt: row.finished_at === null ? null : Number(row.finished_at),
|
|
403
|
+
config: withConfigDefaults(parse(row.config_json ?? null)),
|
|
404
|
+
dirtyWarning: Number(row.dirty_warning) === 1,
|
|
405
|
+
nextMergeSeq: Number(row.next_merge_seq),
|
|
406
|
+
pendingDelivery: nullable(row.pending_delivery_json ?? null),
|
|
407
|
+
title: row.title === null || row.title === undefined ? null : String(row.title),
|
|
408
|
+
name: row.name === null || row.name === undefined ? null : String(row.name),
|
|
409
|
+
namingUsage: nullable(row.naming_usage_json ?? null),
|
|
410
|
+
fromQueue: Number(row.from_queue ?? 0) === 1,
|
|
411
|
+
queueItem: text(row.queue_item ?? null),
|
|
412
|
+
number: Number(row.number ?? 0),
|
|
413
|
+
hold: RUN_HOLDS.find((hold) => hold === row.hold) ?? null,
|
|
414
|
+
tags: row.tags_json ? parse(row.tags_json) : [],
|
|
415
|
+
skippedSteps: row.skipped_steps_json ? parse(row.skipped_steps_json) : [],
|
|
416
|
+
repair: hydrateRepair(row.repair_json ?? null),
|
|
417
|
+
},
|
|
418
|
+
split: groups.find((group) => group.slug === SPLIT_GROUP) ?? null,
|
|
419
|
+
groups: groups.filter((group) => ![SPLIT_GROUP, MESSAGE_GROUP, RESOLVE_GROUP, REPAIR_GROUP].includes(group.slug) &&
|
|
420
|
+
!isActionGroup(group)),
|
|
421
|
+
message: groups.find((group) => group.slug === MESSAGE_GROUP) ?? null,
|
|
422
|
+
resolve: groups.find((group) => group.slug === RESOLVE_GROUP) ?? null,
|
|
423
|
+
repair: groups.find((group) => group.slug === REPAIR_GROUP) ?? null,
|
|
424
|
+
actions: groups.filter(isActionGroup),
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function hydrateRepair(value) {
|
|
429
|
+
if (typeof value !== 'string')
|
|
430
|
+
return emptyRepair();
|
|
431
|
+
try {
|
|
432
|
+
return { ...emptyRepair(), ...JSON.parse(value) };
|
|
433
|
+
}
|
|
434
|
+
catch {
|
|
435
|
+
return emptyRepair();
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
function hydrateGroup(group, attemptRows) {
|
|
439
|
+
return {
|
|
440
|
+
slug: String(group.slug),
|
|
441
|
+
title: String(group.title),
|
|
442
|
+
task: String(group.task),
|
|
443
|
+
position: Number(group.position),
|
|
444
|
+
status: String(group.status),
|
|
445
|
+
pending: nullable(group.pending_json ?? null),
|
|
446
|
+
rejections: parse(group.rejections_json ?? null),
|
|
447
|
+
attempts: attemptRows
|
|
448
|
+
.filter((attempt) => attempt.group_slug === group.slug)
|
|
449
|
+
.map((attempt) => hydrateAttempt(attempt)),
|
|
450
|
+
question: text(group.question ?? null),
|
|
451
|
+
questions: nullable(group.questions_json ?? null),
|
|
452
|
+
humanOnly: group.human_only === 'review' || group.human_only === 'request' ? group.human_only : null,
|
|
453
|
+
reason: text(group.reason ?? null),
|
|
454
|
+
warnings: parse(group.warnings_json ?? null),
|
|
455
|
+
decisions: parse(group.decisions_json ?? null).map(({ attemptSeq, ...decision }) => ({
|
|
456
|
+
...decision,
|
|
457
|
+
...(Number.isInteger(attemptSeq) ? { attemptSeq } : {}),
|
|
458
|
+
by: decision.by === 'autopilot' ? 'autopilot' : 'human',
|
|
459
|
+
})),
|
|
460
|
+
conflictFiles: parse(group.conflict_files_json ?? null),
|
|
461
|
+
mergeSeq: group.merge_seq === null ? null : Number(group.merge_seq),
|
|
462
|
+
mergeInFlight: Number(group.merge_in_flight) === 1,
|
|
463
|
+
updateOnConflict: Number(group.update_on_conflict) === 1,
|
|
464
|
+
mergeCommit: text(group.merge_commit ?? null),
|
|
465
|
+
delivery: { ...pendingDelivery(), ...(group.delivery_json ? parse(group.delivery_json) : {}) },
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function hydrateAttempt(row) {
|
|
469
|
+
return {
|
|
470
|
+
seq: Number(row.seq),
|
|
471
|
+
stepId: String(row.step_id),
|
|
472
|
+
stepIndex: Number(row.step_index),
|
|
473
|
+
round: Number(row.round),
|
|
474
|
+
specialist: String(row.specialist),
|
|
475
|
+
runtime: String(row.runtime),
|
|
476
|
+
model: text(row.model ?? null),
|
|
477
|
+
status: String(row.status),
|
|
478
|
+
input: parse(row.input_json ?? null),
|
|
479
|
+
resumeSession: text(row.resume_session ?? null),
|
|
480
|
+
sessionId: text(row.session_id ?? null),
|
|
481
|
+
report: nullable(row.report_json ?? null),
|
|
482
|
+
reason: nullable(row.reason_json ?? null),
|
|
483
|
+
startedAt: Number(row.started_at),
|
|
484
|
+
finishedAt: row.finished_at === null ? null : Number(row.finished_at),
|
|
485
|
+
usage: nullable(row.usage_json ?? null),
|
|
486
|
+
proposal: nullable(row.proposal_json ?? null),
|
|
487
|
+
denials: row.denials_json ? parse(row.denials_json) : [],
|
|
488
|
+
outsideChanges: row.outside_changes_json ? parse(row.outside_changes_json) : [],
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAE/D,OAAO,EACL,cAAc,EACd,kBAAkB,GAGnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAOL,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,eAAe,GAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAe,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAK3E,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAItC,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,C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AC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;QACrE,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC;QACvC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC;QAC7C,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;QACxD,cAAc,EAAE,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE;KAChF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,p as t,q as n,y as r}from"./skeleton-CCKCQF5n.js";import{i,n as a}from"./FilePath-C0X8-keS.js";import{t as o}from"./vendor-react-C1iE8mnY.js";var s=o();function c({label:e,entries:n,selected:i,onSelect:a}){return(0,s.jsx)(`ul`,{"aria-label":e,className:`flex flex-col gap-1`,children:n.map(e=>(0,s.jsx)(`li`,{children:(0,s.jsxs)(`button`,{type:`button`,"aria-current":e.id===i,className:r(`flex w-full flex-col gap-1 rounded-md border border-transparent px-2.5 py-1.5 text-left text-sm hover:bg-accent`,e.id===i&&`border-border bg-accent`),title:e.hint,onClick:()=>a(e.id),children:[(0,s.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:e.title}),e.tag||e.subtitle?(0,s.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-xs text-muted-foreground`,children:[e.tag?(0,s.jsx)(t,{variant:`outline`,children:e.tag}):null,e.subtitle?(0,s.jsx)(`span`,{className:`min-w-0 truncate`,children:e.subtitle}):null]}):null,e.extra]})},e.id))})}function l({side:e,filters:t,filtersLabel:n,children:r}){let a=i(`(min-width: 1280px)`);return(0,s.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col md:flex-row`,children:[t&&a?(0,s.jsx)(`aside`,{"aria-label":n,className:`flex w-64 shrink-0 flex-col gap-2 overflow-y-auto border-r p-3`,children:t}):null,(0,s.jsx)(`aside`,{className:`flex shrink-0 flex-col gap-2 border-b p-3 md:w-80 md:overflow-y-auto md:border-r md:border-b-0`,children:e}),(0,s.jsx)(`main`,{className:`min-w-0 flex-1 overflow-y-auto p-4`,children:r})]})}function u({errors:t}){let{t:r}=n();return t.length===0?null:(0,s.jsx)(`section`,{"aria-label":r(`runs.config.label`),children:(0,s.jsxs)(e,{variant:`destructive`,children:[(0,s.jsx)(`h3`,{className:`mb-1 font-semibold`,children:r(`runs.config.title`)}),(0,s.jsx)(`ul`,{className:`list-disc pl-4`,children:t.map(e=>(0,s.jsxs)(`li`,{children:[e.file?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{path:e.file}),`:`,` `]}):null,(0,s.jsx)(`code`,{children:e.path}),`: `,e.message]},`${e.file??``}:${e.path}:${e.message}`))})]})})}export{c as n,l as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./vendor-react-C1iE8mnY.js";import{y as r}from"./skeleton-CCKCQF5n.js";var i=e(t(),1);function a(e){let[t,n]=(0,i.useState)(()=>window.matchMedia(e).matches);return(0,i.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var o=`aip.web.`;function s(e,t){try{let n=window.localStorage.getItem(o+e);return n===null?t:JSON.parse(n)}catch{return t}}function c(e,t,n={}){let[r,a]=(0,i.useState)(()=>s(e,t)),c=n.shared===!0,l=(0,i.useRef)(t);return l.current=t,(0,i.useEffect)(()=>{if(!c)return;let t=t=>{(t.key===null||t.key===o+e)&&a(s(e,l.current))};return window.addEventListener(`storage`,t),()=>window.removeEventListener(`storage`,t)},[e,c]),[r,(0,i.useCallback)(t=>{a(t);try{window.localStorage.setItem(o+e,JSON.stringify(t))}catch{}},[e])]}var l=n(),u=`rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground`,d={line:`block w-fit min-w-0 max-w-full self-start truncate`,inline:`break-all box-decoration-clone`};function f({path:e,variant:t=`inline`,className:n}){return(0,l.jsx)(`code`,{title:e,className:r(u,d[t],n),children:e})}export{a as i,f as n,c as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./vendor-react-C1iE8mnY.js";import{h as r,n as i,q as a}from"./skeleton-CCKCQF5n.js";import{t as o}from"./card-DkikoTxR.js";import{A as s,n as c,s as l,t as u}from"./switch-CWFAgxG1.js";import{c as d,i as f,n as p,o as m,s as h,t as g}from"./select-J4oIrmYh.js";var _=e(t(),1),v={general:[{key:`runs`,paths:[`max`,`outside_changes`]},{key:`workspace`,paths:[`workspace_dir`,`workspace.base`,`workspace.include`]},{key:`naming`,paths:[`naming.enabled`,`naming.runtime`,`naming.model`]}],agents:[{key:`defaults`,paths:[`defaults.runtime`,`defaults.permissions`,`defaults.timeout`,`defaults.allow_commands`,`defaults.tools`]},{key:`claude`,paths:[`claude.edit_mode`,`claude.mcp`,`claude.settings`]}],delivery:[{key:`delivery`,paths:[`delivery.mode`,`delivery.auto`,`delivery.keep`]},{key:`message`,paths:[`delivery.commit_message`,`delivery.message_specialist`]},{key:`conflicts`,paths:[`delivery.resolver`,`delivery.resolver_rounds`]}],runtimes:[{key:`claude`,paths:[`runtimes.claude.command`,`runtimes.claude.args`,`runtimes.claude.env`]},{key:`opencode`,paths:[`runtimes.opencode.command`,`runtimes.opencode.args`,`runtimes.opencode.env`]},{key:`agy`,paths:[`runtimes.agy.command`,`runtimes.agy.args`,`runtimes.agy.env`]}],system:[{key:`panel`,paths:[`web.autostart`,`web.auth`,`web.host`,`web.port`]}]},y={message:[{key:`message`,paths:[`delivery.message_specialist`,`delivery.commit_message`,`delivery.message_prompt`]}],resolve:[{key:`conflicts`,paths:[`delivery.resolver`,`delivery.resolver_rounds`,`delivery.resolver_prompt`]}],delivery:[{key:`delivery`,paths:[`delivery.mode`,`delivery.auto`,`delivery.keep`]}]},b=new Set([`delivery.commit_message`,`delivery.message_prompt`,`delivery.resolver_prompt`]);function x(e){return e.replace(/^runtimes\.[a-z]+\./,`runtimes.`).replaceAll(`.`,`_`)}var S=/^[A-Za-z_][A-Za-z0-9_]*$/,C=(e,t)=>`${e}.${t}`,w=n();function T(e,t){return e===null?`willDelete`:t?`willAdd`:e===void 0?`hidden`:`willReplace`}function E({variable:e,draft:t,isNew:n,disabled:i,onSet:o,onUndo:c}){let{t:l}=a(),[u,d]=(0,_.useState)(!1),f=t===null,p=T(t,n);return(0,w.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,w.jsx)(`code`,{className:f?`line-through`:void 0,children:e}),(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:l(`settingsPage.env.${p}`)}),u&&!f?(0,w.jsx)(s,{type:`password`,autoComplete:`off`,className:`h-7 w-48`,"aria-label":l(`settingsPage.env.newValueOf`,{name:e}),value:t??``,onChange:t=>t.target.value===``&&!n?c(e):o(e,t.target.value)}):null,!f&&!n&&!u?(0,w.jsx)(r,{"aria-label":`${l(`settingsPage.env.replace`)} ${e}`,type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:()=>d(!0),children:l(`settingsPage.env.replace`)}):null,f?(0,w.jsx)(r,{"aria-label":`${l(`settingsPage.env.undo`)} ${e}`,type:`button`,variant:`ghost`,size:`sm`,onClick:()=>c(e),children:l(`settingsPage.env.undo`)}):(0,w.jsx)(r,{"aria-label":`${l(`settingsPage.env.delete`)} ${e}`,type:`button`,variant:`ghost`,size:`sm`,disabled:i,onClick:()=>{n?c(e):o(e,null),d(!1)},children:l(`settingsPage.env.delete`)})]})}function D({runtime:e,disabled:t,nameProblem:n,name:i,value:o,onName:c,onValue:l,onAdd:u}){let{t:d}=a();return(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(s,{className:`w-40`,"aria-label":d(`settingsPage.env.name`,{runtime:e}),placeholder:`NAME`,value:i,disabled:t,"aria-invalid":n!==null,onChange:e=>c(e.target.value)}),(0,w.jsx)(s,{type:`password`,autoComplete:`off`,className:`w-48`,"aria-label":d(`settingsPage.env.value`,{runtime:e}),value:o,disabled:t,onChange:e=>l(e.target.value)}),(0,w.jsx)(r,{type:`button`,variant:`outline`,size:`sm`,disabled:t||i===``||n!==null,onClick:u,children:d(`settingsPage.env.add`,{runtime:e})})]})}function O({runtime:e,names:t,drafts:n,error:r,disabled:i,onSet:o,onUndo:s}){let{t:c}=a(),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(``),p=Object.keys(n).filter(e=>!t.includes(e)),m=[...t,...p],h=l===``?null:S.test(l)?m.includes(l)?`taken`:null:`invalid`;return(0,w.jsxs)(`div`,{role:`group`,"aria-label":c(`settingsPage.env.label`,{runtime:e}),className:`flex flex-col gap-2`,children:[m.length===0?(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c(`settingsPage.env.empty`)}):(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:m.map(e=>(0,w.jsx)(E,{variable:e,draft:n[e],isNew:!t.includes(e),disabled:i,onSet:o,onUndo:s},e))}),(0,w.jsx)(D,{runtime:e,disabled:i,nameProblem:h,name:l,value:d,onName:u,onValue:f,onAdd:()=>{o(l,d),u(``),f(``)}}),h?(0,w.jsx)(`p`,{className:`text-xs text-destructive`,children:c(`settingsPage.env.${h}`)}):null,r?(0,w.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r}):null]})}var k=Symbol(`inherit`),A=`__none`;function j(e,t){return t===`global`&&!e.globalOnly?e.globalValue:e.value}function M(e,t){return t===`global`?e.written.global===void 0?`default`:`file`:e.written.project===void 0?e.written.global===void 0?`default`:`inherited`:`project`}function N({setting:e,id:t,shown:n,locked:r,invalid:i,specialists:o,onChange:s}){let{t:c}=a(),l=e.kind===`choice`?[...e.options??[]]:[A,...o],u=typeof n==`string`?n:e.kind===`specialist`?A:``;return(0,w.jsxs)(g,{value:u,disabled:r,onValueChange:e=>s(e===A?null:e),children:[(0,w.jsx)(m,{id:t,"aria-invalid":i,"aria-describedby":`${t}-hint`,children:(0,w.jsx)(h,{})}),(0,w.jsx)(p,{children:l.map(t=>(0,w.jsx)(f,{value:t,children:t===A?c(`settingsPage.notSet`):e.path===`delivery.mode`?c(`deliveryMode.${t}`):t},t))})]})}function P({setting:e,id:t,shown:n,locked:r,invalid:i,onChange:o}){let{t:l}=a(),u={id:t,value:typeof n==`string`?n:``,disabled:r,"aria-invalid":i,"aria-describedby":`${t}-hint`};return b.has(e.path)?(0,w.jsx)(c,{...u,rows:5,onChange:e=>o(e.target.value.trim()===``?null:e.target.value)}):(0,w.jsx)(s,{...u,type:`text`,placeholder:e.kind===`duration`?l(`settingsPage.durationPlaceholder`):void 0,onChange:e=>o(e.target.value===``?null:e.target.value)})}function F(e){let{setting:t,id:n,label:r,shown:i,locked:a,invalid:o,onChange:c}=e;switch(t.kind){case`boolean`:return(0,w.jsx)(u,{id:n,checked:i===!0,disabled:a,"aria-describedby":`${n}-hint`,onCheckedChange:c});case`choice`:case`specialist`:return(0,w.jsx)(N,{...e});case`integer`:return(0,w.jsx)(s,{id:n,type:`number`,min:t.range?.[0],max:t.range?.[1],value:typeof i==`number`?String(i):``,disabled:a,"aria-invalid":o,"aria-describedby":`${n}-hint`,onChange:e=>c(e.target.value===``?null:Number(e.target.value))});case`strings`:return(0,w.jsx)(d,{id:n,label:r,values:Array.isArray(i)?i:[],onChange:e=>c(e),disabled:a,invalid:o});default:return(0,w.jsx)(P,{...e})}}function I({source:e,canInherit:t,inheriting:n,onInherit:i,onKeep:o}){let{t:s}=a();return(0,w.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,w.jsx)(`span`,{children:s(`settingsPage.source.${e}`)}),t?(0,w.jsx)(r,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0`,onClick:i,children:s(`settingsPage.inherit`)}):null,n?(0,w.jsx)(r,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0`,onClick:o,children:s(`settingsPage.keepProject`)}):null]})}function L({setting:e,scope:t,draft:n,specialists:r,error:i,disabled:o,onChange:s,onInherit:c,onKeep:l}){let{t:u}=a(),d=x(e.path),f=`field-${e.path}`,p=n===k,m=n===void 0?j(e,t):p?e.globalValue:n,h=p?`inherited`:M(e,t),g=u(`settingsPage.field.${d}.label`),_=(0,w.jsx)(F,{setting:e,id:f,label:g,shown:m,locked:o||p,invalid:i!==null,specialists:r,onChange:s});return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,"data-testid":`setting-${e.path}`,children:[e.kind===`boolean`?(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[_,(0,w.jsx)(`label`,{htmlFor:f,className:`text-sm font-medium`,children:g})]}):(0,w.jsxs)(w.Fragment,{children:[e.kind===`strings`?null:(0,w.jsx)(`label`,{htmlFor:f,className:`text-sm font-medium`,children:g}),_]}),(0,w.jsxs)(`p`,{id:`${f}-hint`,className:`text-xs text-muted-foreground`,children:[u(`settingsPage.field.${d}.hint`),` `,(0,w.jsx)(`code`,{className:`text-xs`,children:e.path})]}),(0,w.jsx)(I,{source:h,canInherit:t===`project`&&!p&&e.written.project!==void 0,inheriting:p,onInherit:c,onKeep:l}),i?(0,w.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:i}):null]})}function R(e,t){let n=e.replace(/^swarm\./,``).replace(/\[\d+\]$/,``);if(t.has(n))return n;let r=/^(runtimes\.[a-z]+\.env)\./.exec(n);return r&&t.has(r[1])?r[1]:null}var z=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function B(e,t){let n=new Map,r=[];for(let i of e){let e=R(i.path,t);e===null?r.push(`${i.path}: ${i.message}`):n.has(e)||n.set(e,i.message)}return{fields:n,others:r}}function V(e){let t={};for(let[n,r]of Object.entries(e)){let e=r===k?null:r;t[n]=Array.isArray(e)&&e.length===0?null:e}return t}var H={conflict:null,failure:null,fields:new Map,others:[]};function U({api:e,config:t,scope:n,known:r,onSaved:i,onDirty:o}){let{t:s}=a(),[c,u]=(0,_.useState)({}),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(H),h=(0,_.useMemo)(()=>B(t.errors,r).fields,[t.errors,r]),g=Object.keys(c).length>0;(0,_.useEffect)(()=>(o(g),()=>o(!1)),[g,o]);let v=e=>p.fields.get(e)??h.get(e)??null,y=(e,t,n)=>{u(r=>{let{[e]:i,...a}=r;return t!==k&&z(t,n)?a:{...a,[e]:t}})},b=e=>u(t=>{let{[e]:n,...r}=t;return r}),x=()=>{u({}),m(H)},S=async()=>{f(!0),m(e=>({...e,conflict:null,failure:null}));try{let a=await e.writeSettings(V(c),t.settingsFiles[n].revision,n);a.ok?(x(),l(s(`settingsPage.saved`)),await i()):a.reason===`conflict`?m(e=>({...e,conflict:a.message})):m({...H,...B(a.errors,r)})}catch(e){let t=e instanceof Error?e.message:String(e);m(e=>({...e,failure:t}))}finally{f(!1)}};return{...p,drafts:c,busy:d,dirty:g,errorOf:v,change:y,clear:b,discard:x,save:S}}function W({draft:e,onReload:t}){let{t:n}=a();return(0,w.jsxs)(w.Fragment,{children:[e.conflict?(0,w.jsxs)(i,{variant:`destructive`,className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`span`,{children:n(`settingsPage.conflict`,{message:e.conflict})}),(0,w.jsx)(r,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:n(`settingsPage.reload`)})]}):null,e.failure?(0,w.jsx)(i,{variant:`destructive`,children:e.failure}):null,e.others.length>0?(0,w.jsx)(i,{variant:`destructive`,children:(0,w.jsx)(`ul`,{children:e.others.map(e=>(0,w.jsx)(`li`,{children:e},e))})}):null]})}function G({id:e,title:t,children:n}){return(0,w.jsx)(o,{children:(0,w.jsxs)(`section`,{"aria-labelledby":e,className:`flex flex-col gap-3 p-4`,children:[(0,w.jsx)(`h3`,{id:e,className:`text-sm font-semibold`,children:t}),n]})})}function K({fields:e,scope:t,specialists:n,draft:r}){return e.map(e=>e.kind===`env`?(0,w.jsx)(J,{field:e,drafts:r.drafts,error:r.errorOf(e.path),disabled:r.busy,onChange:(e,t)=>r.change(e,t,void 0),onClear:r.clear},e.path):(0,w.jsx)(L,{setting:e,scope:t,draft:r.drafts[e.path],specialists:n,error:r.errorOf(e.path),disabled:r.busy,onChange:n=>{let i=n===null||n===``||Array.isArray(n)&&n.length===0;t===`project`&&e.written.project===void 0&&i?r.clear(e.path):r.change(e.path,n,j(e,t))},onInherit:()=>r.change(e.path,k,void 0),onKeep:()=>r.clear(e.path)},e.path))}function q({api:e,config:t,scope:n,group:i,sections:o,onSaved:s,onDirty:c}){let{t:l}=a(),u=o??v[i]??[],d=(0,_.useMemo)(()=>new Map(t.settings.map(e=>[e.path,e])),[t.settings]),f=(0,_.useMemo)(()=>new Set(d.keys()),[d]),p=(0,_.useMemo)(()=>t.specialists.map(e=>e.slug),[t.specialists]),m=U({api:e,config:t,scope:n,known:f,onSaved:s,onDirty:c}),{dirty:h,busy:g}=m;return(0,w.jsxs)(`form`,{noValidate:!0,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),h&&!g&&m.save()},children:[(0,w.jsx)(`div`,{className:`@container`,children:(0,w.jsx)(`div`,{className:`grid gap-3 @3xl:grid-cols-2`,"data-testid":`settings-sections`,children:u.map(e=>{let t=e.paths.flatMap(e=>d.get(e)??[]);return t.length===0?null:(0,w.jsx)(G,{id:`section-${i}-${e.key}`,title:l(`settingsPage.section.${i}_${e.key}`),children:(0,w.jsx)(K,{fields:t,scope:n,specialists:p,draft:m})},e.key)})})}),(0,w.jsx)(W,{draft:m,onReload:()=>{m.discard(),s()}}),(0,w.jsxs)(`div`,{className:`flex gap-2`,children:[(0,w.jsx)(r,{type:`submit`,disabled:!h||g,loading:g,children:l(`settingsPage.save`)}),(0,w.jsx)(r,{type:`button`,variant:`outline`,disabled:!h||g,onClick:m.discard,children:l(`settingsPage.discard`)})]})]})}function J({field:e,drafts:t,error:n,disabled:r,onChange:i,onClear:o}){let{t:s}=a(),c=e.path.split(`.`)[1]??``,l=`${e.path}.`,u={};for(let[e,n]of Object.entries(t))e.startsWith(l)&&n!==k&&(u[e.slice(l.length)]=n);let d=Array.isArray(e.value)?e.value:[];return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,"data-testid":`setting-${e.path}`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium`,children:s(`settingsPage.field.runtimes_env.label`)}),(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[s(`settingsPage.field.runtimes_env.hint`),` `,(0,w.jsx)(`code`,{className:`text-xs`,children:e.path})]}),(0,w.jsx)(O,{runtime:c,names:d,drafts:u,error:n,disabled:r,onSet:(t,n)=>i(C(e.path,t),n),onUndo:t=>o(C(e.path,t))})]})}export{y as n,q as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,r as n,t as r}from"./EntryList-CnfGgjEY.js";import{J as i,c as a}from"./index-B-oJ93zH.js";import{h as o,q as s}from"./skeleton-CCKCQF5n.js";import{A as c,N as l,l as u,r as d,s as f}from"./switch-CWFAgxG1.js";import{n as p}from"./pipelines-D48ggDNe.js";import{i as m,t as h}from"./vendor-react-C1iE8mnY.js";import{c as g}from"./specialists-DH8tyluO.js";var _=h();function v(e){let{t}=s(),{api:n,config:r,onSelect:i,dirty:a,state:o,pipeline:c}=e,{usage:l,usageError:u,notice:d,setNotice:m,loadUsage:h,refresh:g,onDirty:v}=o;return(0,_.jsx)(p,{api:n,view:r,pipeline:c,activeRuns:0,notice:d,sharedOnly:{usage:l===null?null:l.pipelines.find(e=>e.id===c.id)??{id:c.id,name:null,tags:[],file:c.file,revision:c.revision,global:[],projects:[]},usageError:u,onUsageStale:()=>void h()},onDirty:v,onReload:g,onSaved:async()=>{a.current=!1,await g(),m(t(`pipelines.saved`)),f(t(`pipelines.savedToast`))},onDeleted:async()=>{a.current=!1,m(null);let e=c.id;await g(),f(t(`pipelines.deletedToast`,{id:e})),i(null)}},`${c.id}:${c.revision??``}`)}function y(e){let{t}=s(),{api:n,config:r,selected:a,onSelect:o,dirty:c,state:l}=e,{setNotice:u,loadUsage:m,refresh:h,onDirty:g,pipeline:y}=l;return(0,_.jsx)(_.Fragment,{children:a===`new`?(0,_.jsx)(p,{api:n,view:r,pipeline:null,activeRuns:0,notice:null,sharedOnly:{usage:null,usageError:null,onUsageStale:()=>void m()},onDirty:g,onReload:h,onSaved:async e=>{c.current=!1,await h(),u(t(`pipelines.saved`)),f(t(`pipelines.savedToast`)),o(e)},onDeleted:async()=>void 0},`new`):y?(0,_.jsx)(v,{...e,pipeline:y}):(0,_.jsx)(d,{icon:(0,_.jsx)(i,{}),title:t(`pipelines.empty`)})})}function b({state:e,selected:n}){let{t:i}=s(),{fileErrors:u,search:d,setSearch:f,shared:p,shown:m,go:h}=e;return(0,_.jsxs)(_.Fragment,{children:[u.length>0?(0,_.jsx)(r,{errors:u}):null,(0,_.jsxs)(o,{onClick:()=>void h(`new`),children:[(0,_.jsx)(l,{}),i(`pipelines.new`)]}),(0,_.jsx)(c,{type:`search`,value:d,"aria-label":i(`sharedPipelines.search`),placeholder:i(`sharedPipelines.search`),onChange:e=>f(e.target.value)}),p.length===0?(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`sharedPipelines.empty`)}):m.length===0?(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`sharedPipelines.nothing`)}):null,(0,_.jsx)(t,{label:i(`sharedPipelines.list`),selected:n,onSelect:e=>void h(e),entries:m.map(e=>({id:e.id,title:a(e.raw)??e.id,subtitle:e.id,extra:e.shared_tags.length>0?(0,_.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.shared_tags.map(e=>(0,_.jsx)(g,{name:e},e))}):void 0}))})]})}var x=e(m(),1);function S(e){let t=e.sources.global;return t?{...e,level:`global`,file:t.file,revision:t.revision,raw:t.raw,sources:{global:t}}:null}function C(e){let{api:t,config:n,selected:r,onSelect:i,onReload:o,dirty:c}=e,{t:l}=s(),d=u(),[f,p]=(0,x.useState)(null),[m,h]=(0,x.useState)(null),[g,_]=(0,x.useState)(null),[v,y]=(0,x.useState)(``),b=(0,x.useCallback)(async()=>{try{p(await t.sharedPipelines()),h(null)}catch(e){p(null),h(e.message)}},[t]);(0,x.useEffect)(()=>{b()},[b]);let C=(0,x.useMemo)(()=>n.pipelines.map(S).filter(e=>e!==null),[n]),w=f?.directory??`${n.directories.global}/pipelines`,T=n.errors.filter(e=>e.file?.startsWith(`${w}/`)),E=v.trim().toLocaleLowerCase();return{usage:f,usageError:m,notice:g,setNotice:_,search:v,setSearch:y,loadUsage:b,shared:C,fileErrors:T,shown:C.filter(e=>E===``||e.id.toLocaleLowerCase().includes(E)||(a(e.raw)??``).toLocaleLowerCase().includes(E)||e.shared_tags.some(e=>e.toLocaleLowerCase().includes(E))),pipeline:C.find(e=>e.id===r)??null,go:async e=>{e!==r&&(!c.current||await d({title:l(`settings.editor.leaveTitle`),description:l(`settings.editor.leaveDescription`),confirmLabel:l(`settings.editor.leave`),cancelLabel:l(`settings.editor.stay`),destructive:!0}))&&(c.current=!1,_(null),i(e))},refresh:async()=>{await Promise.all([o(),b()])},onDirty:e=>{c.current=e}}}function w(e){let t=C(e);return(0,_.jsx)(n,{side:(0,_.jsx)(b,{state:t,selected:e.selected}),children:(0,_.jsx)(y,{...e,state:t})})}export{w as SharedPipelinesGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as e}from"./skeleton-CCKCQF5n.js";import{t}from"./vendor-react-C1iE8mnY.js";var n=t();function r({className:t,...r}){return(0,n.jsx)(`div`,{className:e(`rounded-lg border bg-card text-card-foreground shadow-xs`,t),...r})}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[`worktree`,`commit`,`branch`];function t(t){return e.some(e=>e===t)}export{t as n,e as t};
|