@hoknie/aip 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +13 -0
- package/README.md +74 -2
- package/dist/app/agents.js +20 -0
- package/dist/app/agents.js.map +1 -0
- package/dist/app/application.js +205 -0
- package/dist/app/application.js.map +1 -0
- package/dist/app/daemon.js +71 -0
- package/dist/app/daemon.js.map +1 -0
- package/dist/app/index.js +5 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/lifecycle.js +34 -0
- package/dist/app/lifecycle.js.map +1 -0
- package/dist/app/maintenance.js +27 -0
- package/dist/app/maintenance.js.map +1 -0
- package/dist/app/timings.js +24 -0
- package/dist/app/timings.js.map +1 -0
- package/dist/app/wiring.js +58 -0
- package/dist/app/wiring.js.map +1 -0
- package/dist/cli/main.js +31 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/feature/agents/clients/agy/events.js +36 -0
- package/dist/feature/agents/clients/agy/events.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-commands.js +29 -0
- package/dist/feature/agents/clients/agy/guard-commands.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard-paths.js +36 -0
- package/dist/feature/agents/clients/agy/guard-paths.js.map +1 -0
- package/dist/feature/agents/clients/agy/guard.js +77 -0
- package/dist/feature/agents/clients/agy/guard.js.map +1 -0
- package/dist/feature/agents/clients/agy/hooks.js +46 -0
- package/dist/feature/agents/clients/agy/hooks.js.map +1 -0
- package/dist/feature/agents/clients/agy/index.js +5 -0
- package/dist/feature/agents/clients/agy/index.js.map +1 -0
- package/dist/feature/agents/clients/agy/parser.js +63 -0
- package/dist/feature/agents/clients/agy/parser.js.map +1 -0
- package/dist/feature/agents/clients/agy/permissions.js +40 -0
- package/dist/feature/agents/clients/agy/permissions.js.map +1 -0
- package/dist/feature/agents/clients/agy/runtime.js +115 -0
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -0
- package/dist/feature/agents/clients/agy/transcript.js +65 -0
- package/dist/feature/agents/clients/agy/transcript.js.map +1 -0
- package/dist/feature/agents/clients/claude/index.js +6 -0
- package/dist/feature/agents/clients/claude/index.js.map +1 -0
- package/dist/feature/agents/clients/claude/models.js +8 -0
- package/dist/feature/agents/clients/claude/models.js.map +1 -0
- package/dist/feature/agents/clients/claude/parser.js +229 -0
- package/dist/feature/agents/clients/claude/parser.js.map +1 -0
- package/dist/feature/agents/clients/claude/permissions.js +70 -0
- package/dist/feature/agents/clients/claude/permissions.js.map +1 -0
- package/dist/feature/agents/clients/claude/runtime.js +118 -0
- package/dist/feature/agents/clients/claude/runtime.js.map +1 -0
- package/dist/feature/agents/clients/claude/transcript.js +105 -0
- package/dist/feature/agents/clients/claude/transcript.js.map +1 -0
- package/dist/feature/agents/clients/naming/index.js +2 -0
- package/dist/feature/agents/clients/naming/index.js.map +1 -0
- package/dist/feature/agents/clients/naming/naming.js +15 -0
- package/dist/feature/agents/clients/naming/naming.js.map +1 -0
- package/dist/feature/agents/clients/opencode/index.js +5 -0
- package/dist/feature/agents/clients/opencode/index.js.map +1 -0
- package/dist/feature/agents/clients/opencode/models.js +38 -0
- package/dist/feature/agents/clients/opencode/models.js.map +1 -0
- package/dist/feature/agents/clients/opencode/parser.js +84 -0
- package/dist/feature/agents/clients/opencode/parser.js.map +1 -0
- package/dist/feature/agents/clients/opencode/runtime.js +131 -0
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -0
- package/dist/feature/agents/clients/opencode/transcript.js +77 -0
- package/dist/feature/agents/clients/opencode/transcript.js.map +1 -0
- package/dist/feature/agents/ports/command.js +2 -0
- package/dist/feature/agents/ports/command.js.map +1 -0
- package/dist/feature/agents/ports/index.js +2 -0
- package/dist/feature/agents/ports/index.js.map +1 -0
- package/dist/feature/agents/ports/naming.js +2 -0
- package/dist/feature/agents/ports/naming.js.map +1 -0
- package/dist/feature/agents/ports/runtime-factory.js +2 -0
- package/dist/feature/agents/ports/runtime-factory.js.map +1 -0
- package/dist/feature/agents/services/agents.js +79 -0
- package/dist/feature/agents/services/agents.js.map +1 -0
- package/dist/feature/agents/services/catalog.js +117 -0
- package/dist/feature/agents/services/catalog.js.map +1 -0
- package/dist/feature/agents/services/create.js +5 -0
- package/dist/feature/agents/services/create.js.map +1 -0
- package/dist/feature/agents/services/index.js +7 -0
- package/dist/feature/agents/services/index.js.map +1 -0
- package/dist/feature/agents/services/logs.js +69 -0
- package/dist/feature/agents/services/logs.js.map +1 -0
- package/dist/feature/agents/services/skills.js +17 -0
- package/dist/feature/agents/services/skills.js.map +1 -0
- package/dist/feature/agents/services/supervisor.js +160 -0
- package/dist/feature/agents/services/supervisor.js.map +1 -0
- package/dist/feature/agents/types/catalog.js +2 -0
- package/dist/feature/agents/types/catalog.js.map +1 -0
- package/dist/feature/agents/types/index.js +13 -0
- package/dist/feature/agents/types/index.js.map +1 -0
- package/dist/feature/agents/types/message.js +49 -0
- package/dist/feature/agents/types/message.js.map +1 -0
- package/dist/feature/agents/types/models.js +2 -0
- package/dist/feature/agents/types/models.js.map +1 -0
- package/dist/feature/agents/types/naming.js +4 -0
- package/dist/feature/agents/types/naming.js.map +1 -0
- package/dist/feature/agents/types/permissions.js +235 -0
- package/dist/feature/agents/types/permissions.js.map +1 -0
- package/dist/feature/agents/types/run-naming.js +66 -0
- package/dist/feature/agents/types/run-naming.js.map +1 -0
- package/dist/feature/agents/types/runtime.js +18 -0
- package/dist/feature/agents/types/runtime.js.map +1 -0
- package/dist/feature/agents/types/step-input.js +2 -0
- package/dist/feature/agents/types/step-input.js.map +1 -0
- package/dist/feature/agents/types/transcript-parts.js +62 -0
- package/dist/feature/agents/types/transcript-parts.js.map +1 -0
- package/dist/feature/agents/types/transcript.js +8 -0
- package/dist/feature/agents/types/transcript.js.map +1 -0
- package/dist/feature/agents/types/usage.js +14 -0
- package/dist/feature/agents/types/usage.js.map +1 -0
- package/dist/feature/agents/types/worker-tools.js +22 -0
- package/dist/feature/agents/types/worker-tools.js.map +1 -0
- package/dist/feature/artifacts/ports/index.js +2 -0
- package/dist/feature/artifacts/ports/index.js.map +1 -0
- package/dist/feature/artifacts/ports/publish.js +2 -0
- package/dist/feature/artifacts/ports/publish.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js +84 -0
- package/dist/feature/artifacts/repositories/artifact-storage.js.map +1 -0
- package/dist/feature/artifacts/repositories/artifacts.js +85 -0
- package/dist/feature/artifacts/repositories/artifacts.js.map +1 -0
- package/dist/feature/artifacts/repositories/index.js +3 -0
- package/dist/feature/artifacts/repositories/index.js.map +1 -0
- package/dist/feature/artifacts/services/artifacts.js +105 -0
- package/dist/feature/artifacts/services/artifacts.js.map +1 -0
- package/dist/feature/artifacts/services/create.js +14 -0
- package/dist/feature/artifacts/services/create.js.map +1 -0
- package/dist/feature/artifacts/services/files.js +42 -0
- package/dist/feature/artifacts/services/files.js.map +1 -0
- package/dist/feature/artifacts/services/index.js +3 -0
- package/dist/feature/artifacts/services/index.js.map +1 -0
- package/dist/feature/artifacts/types/artifacts.js +36 -0
- package/dist/feature/artifacts/types/artifacts.js.map +1 -0
- package/dist/feature/artifacts/types/index.js +2 -0
- package/dist/feature/artifacts/types/index.js.map +1 -0
- package/dist/feature/artifacts/types/views.js +2 -0
- package/dist/feature/artifacts/types/views.js.map +1 -0
- package/dist/feature/compose/services/create.js +11 -0
- package/dist/feature/compose/services/create.js.map +1 -0
- package/dist/feature/compose/services/index.js +5 -0
- package/dist/feature/compose/services/index.js.map +1 -0
- package/dist/feature/compose/services/repository-edit.js +20 -0
- package/dist/feature/compose/services/repository-edit.js.map +1 -0
- package/dist/feature/compose/services/repository-move.js +35 -0
- package/dist/feature/compose/services/repository-move.js.map +1 -0
- package/dist/feature/compose/services/repository-removal.js +38 -0
- package/dist/feature/compose/services/repository-removal.js.map +1 -0
- package/dist/feature/delivery/ports/index.js +2 -0
- package/dist/feature/delivery/ports/index.js.map +1 -0
- package/dist/feature/delivery/ports/publish.js +2 -0
- package/dist/feature/delivery/ports/publish.js.map +1 -0
- package/dist/feature/delivery/repositories/index.js +3 -0
- package/dist/feature/delivery/repositories/index.js.map +1 -0
- package/dist/feature/delivery/repositories/patch-storage.js +76 -0
- package/dist/feature/delivery/repositories/patch-storage.js.map +1 -0
- package/dist/feature/delivery/repositories/patches.js +28 -0
- package/dist/feature/delivery/repositories/patches.js.map +1 -0
- package/dist/feature/delivery/services/create.js +21 -0
- package/dist/feature/delivery/services/create.js.map +1 -0
- package/dist/feature/delivery/services/deliver.js +67 -0
- package/dist/feature/delivery/services/deliver.js.map +1 -0
- package/dist/feature/delivery/services/diffs.js +153 -0
- package/dist/feature/delivery/services/diffs.js.map +1 -0
- package/dist/feature/delivery/services/index.js +5 -0
- package/dist/feature/delivery/services/index.js.map +1 -0
- package/dist/feature/delivery/services/patches.js +96 -0
- package/dist/feature/delivery/services/patches.js.map +1 -0
- package/dist/feature/delivery/types/index.js +3 -0
- package/dist/feature/delivery/types/index.js.map +1 -0
- package/dist/feature/delivery/types/outcomes.js +2 -0
- package/dist/feature/delivery/types/outcomes.js.map +1 -0
- package/dist/feature/delivery/types/spec-change.js +18 -0
- package/dist/feature/delivery/types/spec-change.js.map +1 -0
- package/dist/feature/network/ports/changed.js +2 -0
- package/dist/feature/network/ports/changed.js.map +1 -0
- package/dist/feature/network/ports/index.js +2 -0
- package/dist/feature/network/ports/index.js.map +1 -0
- package/dist/feature/network/services/create.js +5 -0
- package/dist/feature/network/services/create.js.map +1 -0
- package/dist/feature/network/services/index.js +3 -0
- package/dist/feature/network/services/index.js.map +1 -0
- package/dist/feature/network/services/monitor.js +140 -0
- package/dist/feature/network/services/monitor.js.map +1 -0
- package/dist/feature/network/types/index.js +4 -0
- package/dist/feature/network/types/index.js.map +1 -0
- package/dist/feature/network/types/network.js +8 -0
- package/dist/feature/network/types/network.js.map +1 -0
- package/dist/feature/network/types/proxy.js +95 -0
- package/dist/feature/network/types/proxy.js.map +1 -0
- package/dist/feature/network/types/state.js +36 -0
- package/dist/feature/network/types/state.js.map +1 -0
- package/dist/feature/observers/ports/index.js +2 -0
- package/dist/feature/observers/ports/index.js.map +1 -0
- package/dist/feature/observers/ports/publish.js +2 -0
- package/dist/feature/observers/ports/publish.js.map +1 -0
- package/dist/feature/observers/repositories/index.js +2 -0
- package/dist/feature/observers/repositories/index.js.map +1 -0
- package/dist/feature/observers/repositories/observers.js +34 -0
- package/dist/feature/observers/repositories/observers.js.map +1 -0
- package/dist/feature/observers/services/create.js +11 -0
- package/dist/feature/observers/services/create.js.map +1 -0
- package/dist/feature/observers/services/history.js +76 -0
- package/dist/feature/observers/services/history.js.map +1 -0
- package/dist/feature/observers/services/index.js +5 -0
- package/dist/feature/observers/services/index.js.map +1 -0
- package/dist/feature/observers/services/observers.js +188 -0
- package/dist/feature/observers/services/observers.js.map +1 -0
- package/dist/feature/observers/services/settings-check.js +87 -0
- package/dist/feature/observers/services/settings-check.js.map +1 -0
- package/dist/feature/observers/types/actions.js +2 -0
- package/dist/feature/observers/types/actions.js.map +1 -0
- package/dist/feature/observers/types/index.js +4 -0
- package/dist/feature/observers/types/index.js.map +1 -0
- package/dist/feature/observers/types/plan-repairs.js +116 -0
- package/dist/feature/observers/types/plan-repairs.js.map +1 -0
- package/dist/feature/observers/types/settings.js +12 -0
- package/dist/feature/observers/types/settings.js.map +1 -0
- package/dist/feature/processes/ports/index.js +2 -0
- package/dist/feature/processes/ports/index.js.map +1 -0
- package/dist/feature/processes/ports/publish.js +2 -0
- package/dist/feature/processes/ports/publish.js.map +1 -0
- package/dist/feature/processes/services/create.js +5 -0
- package/dist/feature/processes/services/create.js.map +1 -0
- package/dist/feature/processes/services/index.js +4 -0
- package/dist/feature/processes/services/index.js.map +1 -0
- package/dist/feature/processes/services/processes.js +131 -0
- package/dist/feature/processes/services/processes.js.map +1 -0
- package/dist/feature/processes/services/tree.js +98 -0
- package/dist/feature/processes/services/tree.js.map +1 -0
- package/dist/feature/processes/types/background.js +2 -0
- package/dist/feature/processes/types/background.js.map +1 -0
- package/dist/feature/processes/types/index.js +2 -0
- package/dist/feature/processes/types/index.js.map +1 -0
- package/dist/feature/queue/ports/index.js +2 -0
- package/dist/feature/queue/ports/index.js.map +1 -0
- package/dist/feature/queue/ports/observe.js +2 -0
- package/dist/feature/queue/ports/observe.js.map +1 -0
- package/dist/feature/queue/ports/publish.js +2 -0
- package/dist/feature/queue/ports/publish.js.map +1 -0
- package/dist/feature/queue/ports/repair-policy.js +2 -0
- package/dist/feature/queue/ports/repair-policy.js.map +1 -0
- package/dist/feature/queue/repositories/index.js +2 -0
- package/dist/feature/queue/repositories/index.js.map +1 -0
- package/dist/feature/queue/repositories/queues.js +100 -0
- package/dist/feature/queue/repositories/queues.js.map +1 -0
- package/dist/feature/queue/services/advance.js +214 -0
- package/dist/feature/queue/services/advance.js.map +1 -0
- package/dist/feature/queue/services/control.js +169 -0
- package/dist/feature/queue/services/control.js.map +1 -0
- package/dist/feature/queue/services/create.js +26 -0
- package/dist/feature/queue/services/create.js.map +1 -0
- package/dist/feature/queue/services/edit.js +126 -0
- package/dist/feature/queue/services/edit.js.map +1 -0
- package/dist/feature/queue/services/index.js +8 -0
- package/dist/feature/queue/services/index.js.map +1 -0
- package/dist/feature/queue/services/items.js +173 -0
- package/dist/feature/queue/services/items.js.map +1 -0
- package/dist/feature/queue/services/store.js +61 -0
- package/dist/feature/queue/services/store.js.map +1 -0
- package/dist/feature/queue/services/task-tags.js +103 -0
- package/dist/feature/queue/services/task-tags.js.map +1 -0
- package/dist/feature/queue/types/advance.js +198 -0
- package/dist/feature/queue/types/advance.js.map +1 -0
- package/dist/feature/queue/types/dependencies.js +98 -0
- package/dist/feature/queue/types/dependencies.js.map +1 -0
- package/dist/feature/queue/types/edit.js +180 -0
- package/dist/feature/queue/types/edit.js.map +1 -0
- package/dist/feature/queue/types/ids.js +7 -0
- package/dist/feature/queue/types/ids.js.map +1 -0
- package/dist/feature/queue/types/index.js +10 -0
- package/dist/feature/queue/types/index.js.map +1 -0
- package/dist/feature/queue/types/items.js +46 -0
- package/dist/feature/queue/types/items.js.map +1 -0
- package/dist/feature/queue/types/limit-hits.js +50 -0
- package/dist/feature/queue/types/limit-hits.js.map +1 -0
- package/dist/feature/queue/types/requests.js +2 -0
- package/dist/feature/queue/types/requests.js.map +1 -0
- package/dist/feature/queue/types/returns.js +197 -0
- package/dist/feature/queue/types/returns.js.map +1 -0
- package/dist/feature/queue/types/settings.js +117 -0
- package/dist/feature/queue/types/settings.js.map +1 -0
- package/dist/feature/repos/ports/index.js +2 -0
- package/dist/feature/repos/ports/index.js.map +1 -0
- package/dist/feature/repos/ports/publish.js +2 -0
- package/dist/feature/repos/ports/publish.js.map +1 -0
- package/dist/feature/repos/repositories/index.js +2 -0
- package/dist/feature/repos/repositories/index.js.map +1 -0
- package/dist/feature/repos/repositories/known.js +41 -0
- package/dist/feature/repos/repositories/known.js.map +1 -0
- package/dist/feature/repos/services/create.js +13 -0
- package/dist/feature/repos/services/create.js.map +1 -0
- package/dist/feature/repos/services/index.js +4 -0
- package/dist/feature/repos/services/index.js.map +1 -0
- package/dist/feature/repos/services/projects.js +50 -0
- package/dist/feature/repos/services/projects.js.map +1 -0
- package/dist/feature/repos/services/registry.js +138 -0
- package/dist/feature/repos/services/registry.js.map +1 -0
- package/dist/feature/repos/types/index.js +2 -0
- package/dist/feature/repos/types/index.js.map +1 -0
- package/dist/feature/repos/types/project.js +80 -0
- package/dist/feature/repos/types/project.js.map +1 -0
- package/dist/feature/repos/types/registry.js +2 -0
- package/dist/feature/repos/types/registry.js.map +1 -0
- package/dist/feature/runs/machine/answers.js +112 -0
- package/dist/feature/runs/machine/answers.js.map +1 -0
- package/dist/feature/runs/machine/delivery-checks.js +91 -0
- package/dist/feature/runs/machine/delivery-checks.js.map +1 -0
- package/dist/feature/runs/machine/delivery-flow.js +211 -0
- package/dist/feature/runs/machine/delivery-flow.js.map +1 -0
- package/dist/feature/runs/machine/events.js +2 -0
- package/dist/feature/runs/machine/events.js.map +1 -0
- package/dist/feature/runs/machine/exits.js +229 -0
- package/dist/feature/runs/machine/exits.js.map +1 -0
- package/dist/feature/runs/machine/index.js +7 -0
- package/dist/feature/runs/machine/index.js.map +1 -0
- package/dist/feature/runs/machine/plan.js +133 -0
- package/dist/feature/runs/machine/plan.js.map +1 -0
- package/dist/feature/runs/machine/repair.js +158 -0
- package/dist/feature/runs/machine/repair.js.map +1 -0
- package/dist/feature/runs/machine/run-control.js +276 -0
- package/dist/feature/runs/machine/run-control.js.map +1 -0
- package/dist/feature/runs/machine/scheduler.js +126 -0
- package/dist/feature/runs/machine/scheduler.js.map +1 -0
- package/dist/feature/runs/machine/steps.js +275 -0
- package/dist/feature/runs/machine/steps.js.map +1 -0
- package/dist/feature/runs/machine/texts.js +69 -0
- package/dist/feature/runs/machine/texts.js.map +1 -0
- package/dist/feature/runs/machine/transition.js +117 -0
- package/dist/feature/runs/machine/transition.js.map +1 -0
- package/dist/feature/runs/ports/agent-exit.js +2 -0
- package/dist/feature/runs/ports/agent-exit.js.map +1 -0
- package/dist/feature/runs/ports/diff.js +2 -0
- package/dist/feature/runs/ports/diff.js.map +1 -0
- package/dist/feature/runs/ports/index.js +2 -0
- package/dist/feature/runs/ports/index.js.map +1 -0
- package/dist/feature/runs/ports/observe.js +2 -0
- package/dist/feature/runs/ports/observe.js.map +1 -0
- package/dist/feature/runs/ports/publish.js +2 -0
- package/dist/feature/runs/ports/publish.js.map +1 -0
- package/dist/feature/runs/ports/queue-advance.js +2 -0
- package/dist/feature/runs/ports/queue-advance.js.map +1 -0
- package/dist/feature/runs/repositories/attempt-history.js +116 -0
- package/dist/feature/runs/repositories/attempt-history.js.map +1 -0
- package/dist/feature/runs/repositories/finished-runs.js +46 -0
- package/dist/feature/runs/repositories/finished-runs.js.map +1 -0
- package/dist/feature/runs/repositories/index.js +4 -0
- package/dist/feature/runs/repositories/index.js.map +1 -0
- package/dist/feature/runs/repositories/rows.js +110 -0
- package/dist/feature/runs/repositories/rows.js.map +1 -0
- package/dist/feature/runs/repositories/runs.js +76 -0
- package/dist/feature/runs/repositories/runs.js.map +1 -0
- package/dist/feature/runs/repositories/write.js +31 -0
- package/dist/feature/runs/repositories/write.js.map +1 -0
- package/dist/feature/runs/services/archive.js +17 -0
- package/dist/feature/runs/services/archive.js.map +1 -0
- package/dist/feature/runs/services/attempt-history.js +11 -0
- package/dist/feature/runs/services/attempt-history.js.map +1 -0
- package/dist/feature/runs/services/create.js +44 -0
- package/dist/feature/runs/services/create.js.map +1 -0
- package/dist/feature/runs/services/effects/actions.js +151 -0
- package/dist/feature/runs/services/effects/actions.js.map +1 -0
- package/dist/feature/runs/services/effects/attempts.js +219 -0
- package/dist/feature/runs/services/effects/attempts.js.map +1 -0
- package/dist/feature/runs/services/effects/context.js +7 -0
- package/dist/feature/runs/services/effects/context.js.map +1 -0
- package/dist/feature/runs/services/effects/effects.js +82 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -0
- package/dist/feature/runs/services/effects/git.js +168 -0
- package/dist/feature/runs/services/effects/git.js.map +1 -0
- package/dist/feature/runs/services/effects/naming.js +65 -0
- package/dist/feature/runs/services/effects/naming.js.map +1 -0
- package/dist/feature/runs/services/effects/outside.js +83 -0
- package/dist/feature/runs/services/effects/outside.js.map +1 -0
- package/dist/feature/runs/services/effects/proxy.js +5 -0
- package/dist/feature/runs/services/effects/proxy.js.map +1 -0
- package/dist/feature/runs/services/effects/running.js +76 -0
- package/dist/feature/runs/services/effects/running.js.map +1 -0
- package/dist/feature/runs/services/effects/usage.js +61 -0
- package/dist/feature/runs/services/effects/usage.js.map +1 -0
- package/dist/feature/runs/services/effects/worktrees.js +49 -0
- package/dist/feature/runs/services/effects/worktrees.js.map +1 -0
- package/dist/feature/runs/services/engine.js +172 -0
- package/dist/feature/runs/services/engine.js.map +1 -0
- package/dist/feature/runs/services/index.js +15 -0
- package/dist/feature/runs/services/index.js.map +1 -0
- package/dist/feature/runs/services/occupancy.js +62 -0
- package/dist/feature/runs/services/occupancy.js.map +1 -0
- package/dist/feature/runs/services/progress.js +42 -0
- package/dist/feature/runs/services/progress.js.map +1 -0
- package/dist/feature/runs/services/reads.js +93 -0
- package/dist/feature/runs/services/reads.js.map +1 -0
- package/dist/feature/runs/services/recovery.js +17 -0
- package/dist/feature/runs/services/recovery.js.map +1 -0
- package/dist/feature/runs/services/refresh.js +29 -0
- package/dist/feature/runs/services/refresh.js.map +1 -0
- package/dist/feature/runs/services/requests.js +88 -0
- package/dist/feature/runs/services/requests.js.map +1 -0
- package/dist/feature/runs/services/states.js +112 -0
- package/dist/feature/runs/services/states.js.map +1 -0
- package/dist/feature/runs/services/summary.js +38 -0
- package/dist/feature/runs/services/summary.js.map +1 -0
- package/dist/feature/runs/types/attempt.js +106 -0
- package/dist/feature/runs/types/attempt.js.map +1 -0
- package/dist/feature/runs/types/constants.js +45 -0
- package/dist/feature/runs/types/constants.js.map +1 -0
- package/dist/feature/runs/types/create.js +177 -0
- package/dist/feature/runs/types/create.js.map +1 -0
- package/dist/feature/runs/types/group.js +152 -0
- package/dist/feature/runs/types/group.js.map +1 -0
- package/dist/feature/runs/types/history/attempt-history.js +16 -0
- package/dist/feature/runs/types/history/attempt-history.js.map +1 -0
- package/dist/feature/runs/types/index.js +15 -0
- package/dist/feature/runs/types/index.js.map +1 -0
- package/dist/feature/runs/types/input.js +90 -0
- package/dist/feature/runs/types/input.js.map +1 -0
- package/dist/feature/runs/types/limits.js +163 -0
- package/dist/feature/runs/types/limits.js.map +1 -0
- package/dist/feature/runs/types/problems.js +74 -0
- package/dist/feature/runs/types/problems.js.map +1 -0
- package/dist/feature/runs/types/run.js +162 -0
- package/dist/feature/runs/types/run.js.map +1 -0
- package/dist/feature/runs/types/skip.js +110 -0
- package/dist/feature/runs/types/skip.js.map +1 -0
- package/dist/feature/runs/types/stage-status.js +156 -0
- package/dist/feature/runs/types/stage-status.js.map +1 -0
- package/dist/feature/runs/types/stages.js +158 -0
- package/dist/feature/runs/types/stages.js.map +1 -0
- package/dist/feature/runs/types/topology.js +165 -0
- package/dist/feature/runs/types/topology.js.map +1 -0
- package/dist/feature/stats/repositories/index.js +4 -0
- package/dist/feature/stats/repositories/index.js.map +1 -0
- package/dist/feature/stats/repositories/meta.js +19 -0
- package/dist/feature/stats/repositories/meta.js.map +1 -0
- package/dist/feature/stats/repositories/records.js +46 -0
- package/dist/feature/stats/repositories/records.js.map +1 -0
- package/dist/feature/stats/repositories/report.js +105 -0
- package/dist/feature/stats/repositories/report.js.map +1 -0
- package/dist/feature/stats/services/create.js +44 -0
- package/dist/feature/stats/services/create.js.map +1 -0
- package/dist/feature/stats/services/index.js +4 -0
- package/dist/feature/stats/services/index.js.map +1 -0
- package/dist/feature/stats/services/ledger.js +137 -0
- package/dist/feature/stats/services/ledger.js.map +1 -0
- package/dist/feature/stats/services/report.js +56 -0
- package/dist/feature/stats/services/report.js.map +1 -0
- package/dist/feature/stats/types/aggregate.js +179 -0
- package/dist/feature/stats/types/aggregate.js.map +1 -0
- package/dist/feature/stats/types/capture.js +79 -0
- package/dist/feature/stats/types/capture.js.map +1 -0
- package/dist/feature/stats/types/index.js +6 -0
- package/dist/feature/stats/types/index.js.map +1 -0
- package/dist/feature/stats/types/records.js +5 -0
- package/dist/feature/stats/types/records.js.map +1 -0
- package/dist/feature/stats/types/report.js +25 -0
- package/dist/feature/stats/types/report.js.map +1 -0
- package/dist/feature/stats/types/settings.js +2 -0
- package/dist/feature/stats/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/repositories/config-files.js +141 -0
- package/dist/feature/swarm-config/repositories/config-files.js.map +1 -0
- package/dist/feature/swarm-config/services/assemble.js +212 -0
- package/dist/feature/swarm-config/services/assemble.js.map +1 -0
- package/dist/feature/swarm-config/services/create.js +5 -0
- package/dist/feature/swarm-config/services/create.js.map +1 -0
- package/dist/feature/swarm-config/services/discover.js +19 -0
- package/dist/feature/swarm-config/services/discover.js.map +1 -0
- package/dist/feature/swarm-config/services/index.js +10 -0
- package/dist/feature/swarm-config/services/index.js.map +1 -0
- package/dist/feature/swarm-config/services/load.js +101 -0
- package/dist/feature/swarm-config/services/load.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/stats.js +28 -0
- package/dist/feature/swarm-config/services/sections/stats.js.map +1 -0
- package/dist/feature/swarm-config/services/settings.js +72 -0
- package/dist/feature/swarm-config/services/settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-actions.js +125 -0
- package/dist/feature/swarm-config/services/validate-actions.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-context.js +91 -0
- package/dist/feature/swarm-config/services/validate-context.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js +170 -0
- package/dist/feature/swarm-config/services/validate-pipelines.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js +214 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-settings.js +242 -0
- package/dist/feature/swarm-config/services/validate-settings.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-specialists.js +152 -0
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -0
- package/dist/feature/swarm-config/services/validate.js +189 -0
- package/dist/feature/swarm-config/services/validate.js.map +1 -0
- package/dist/feature/swarm-config/types/action.js +20 -0
- package/dist/feature/swarm-config/types/action.js.map +1 -0
- package/dist/feature/swarm-config/types/chain.js +2 -0
- package/dist/feature/swarm-config/types/chain.js.map +1 -0
- package/dist/feature/swarm-config/types/duration.js +17 -0
- package/dist/feature/swarm-config/types/duration.js.map +1 -0
- package/dist/feature/swarm-config/types/errors.js +57 -0
- package/dist/feature/swarm-config/types/errors.js.map +1 -0
- package/dist/feature/swarm-config/types/index.js +13 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -0
- package/dist/feature/swarm-config/types/levels.js +16 -0
- package/dist/feature/swarm-config/types/levels.js.map +1 -0
- package/dist/feature/swarm-config/types/lookups.js +53 -0
- package/dist/feature/swarm-config/types/lookups.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +46 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -0
- package/dist/feature/swarm-config/types/pipeline.js +5 -0
- package/dist/feature/swarm-config/types/pipeline.js.map +1 -0
- package/dist/feature/swarm-config/types/prompt.js +33 -0
- package/dist/feature/swarm-config/types/prompt.js.map +1 -0
- package/dist/feature/swarm-config/types/settings.js +146 -0
- package/dist/feature/swarm-config/types/settings.js.map +1 -0
- package/dist/feature/swarm-config/types/specialist.js +38 -0
- package/dist/feature/swarm-config/types/specialist.js.map +1 -0
- package/dist/feature/swarm-config/types/tag-names.js +43 -0
- package/dist/feature/swarm-config/types/tag-names.js.map +1 -0
- package/dist/feature/swarm-edit/ports/config-changed.js +2 -0
- package/dist/feature/swarm-edit/ports/config-changed.js.map +1 -0
- package/dist/feature/swarm-edit/ports/index.js +2 -0
- package/dist/feature/swarm-edit/ports/index.js.map +1 -0
- package/dist/feature/swarm-edit/repositories/documents.js +144 -0
- package/dist/feature/swarm-edit/repositories/documents.js.map +1 -0
- package/dist/feature/swarm-edit/services/config-edits.js +129 -0
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -0
- package/dist/feature/swarm-edit/services/create.js +7 -0
- package/dist/feature/swarm-edit/services/create.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-settings.js +172 -0
- package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/editor-view.js +144 -0
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -0
- package/dist/feature/swarm-edit/services/index.js +12 -0
- package/dist/feature/swarm-edit/services/index.js.map +1 -0
- package/dist/feature/swarm-edit/services/levels.js +30 -0
- package/dist/feature/swarm-edit/services/levels.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-edit.js +217 -0
- package/dist/feature/swarm-edit/services/plan-edit.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-settings.js +200 -0
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/references.js +85 -0
- package/dist/feature/swarm-edit/services/references.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-config.js +128 -0
- package/dist/feature/swarm-edit/services/shared-config.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js +72 -0
- package/dist/feature/swarm-edit/services/shared-pipelines.js.map +1 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js +70 -0
- package/dist/feature/swarm-edit/services/shared-specialists.js.map +1 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js +215 -0
- package/dist/feature/swarm-edit/services/specialist-tags.js.map +1 -0
- package/dist/feature/swarm-edit/types/editor.js +27 -0
- package/dist/feature/swarm-edit/types/editor.js.map +1 -0
- package/dist/feature/swarm-edit/types/index.js +7 -0
- package/dist/feature/swarm-edit/types/index.js.map +1 -0
- package/dist/feature/swarm-edit/types/setting-fields.js +76 -0
- package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -0
- package/dist/feature/swarm-edit/types/shared.js +2 -0
- package/dist/feature/swarm-edit/types/shared.js.map +1 -0
- package/dist/feature/swarm-edit/types/stages.js +69 -0
- package/dist/feature/swarm-edit/types/stages.js.map +1 -0
- package/dist/feature/swarm-edit/types/tag-folders.js +2 -0
- package/dist/feature/swarm-edit/types/tag-folders.js.map +1 -0
- package/dist/feature/swarm-edit/types/views.js +2 -0
- package/dist/feature/swarm-edit/types/views.js.map +1 -0
- package/dist/feature/tags/ports/index.js +2 -0
- package/dist/feature/tags/ports/index.js.map +1 -0
- package/dist/feature/tags/ports/publish.js +2 -0
- package/dist/feature/tags/ports/publish.js.map +1 -0
- package/dist/feature/tags/repositories/index.js +2 -0
- package/dist/feature/tags/repositories/index.js.map +1 -0
- package/dist/feature/tags/repositories/tags.js +36 -0
- package/dist/feature/tags/repositories/tags.js.map +1 -0
- package/dist/feature/tags/services/catalog.js +73 -0
- package/dist/feature/tags/services/catalog.js.map +1 -0
- package/dist/feature/tags/services/create.js +7 -0
- package/dist/feature/tags/services/create.js.map +1 -0
- package/dist/feature/tags/services/index.js +3 -0
- package/dist/feature/tags/services/index.js.map +1 -0
- package/dist/feature/tags/types/ids.js +7 -0
- package/dist/feature/tags/types/ids.js.map +1 -0
- package/dist/feature/tags/types/index.js +3 -0
- package/dist/feature/tags/types/index.js.map +1 -0
- package/dist/feature/tags/types/tags.js +184 -0
- package/dist/feature/tags/types/tags.js.map +1 -0
- package/dist/platform/build/fingerprint.js +36 -0
- package/dist/platform/build/fingerprint.js.map +1 -0
- package/dist/platform/build/index.js +3 -0
- package/dist/platform/build/index.js.map +1 -0
- package/dist/platform/build/locations.js +16 -0
- package/dist/platform/build/locations.js.map +1 -0
- package/dist/platform/errors/app-error.js +39 -0
- package/dist/platform/errors/app-error.js.map +1 -0
- package/dist/platform/errors/index.js +2 -0
- package/dist/platform/errors/index.js.map +1 -0
- package/dist/platform/git/delivery.js +284 -0
- package/dist/platform/git/delivery.js.map +1 -0
- package/dist/platform/git/index.js +4 -0
- package/dist/platform/git/index.js.map +1 -0
- package/dist/platform/git/runner.js +65 -0
- package/dist/platform/git/runner.js.map +1 -0
- package/dist/platform/git/workspace.js +366 -0
- package/dist/platform/git/workspace.js.map +1 -0
- package/dist/platform/network/index.js +4 -0
- package/dist/platform/network/index.js.map +1 -0
- package/dist/platform/network/interfaces.js +7 -0
- package/dist/platform/network/interfaces.js.map +1 -0
- package/dist/platform/network/probe.js +128 -0
- package/dist/platform/network/probe.js.map +1 -0
- package/dist/platform/network/tunnel.js +87 -0
- package/dist/platform/network/tunnel.js.map +1 -0
- package/dist/platform/paths/index.js +2 -0
- package/dist/platform/paths/index.js.map +1 -0
- package/dist/platform/paths/paths.js +39 -0
- package/dist/platform/paths/paths.js.map +1 -0
- package/dist/platform/process/command.js +23 -0
- package/dist/platform/process/command.js.map +1 -0
- package/dist/platform/process/index.js +4 -0
- package/dist/platform/process/index.js.map +1 -0
- package/dist/platform/process/ps.js +42 -0
- package/dist/platform/process/ps.js.map +1 -0
- package/dist/platform/process/which.js +21 -0
- package/dist/platform/process/which.js.map +1 -0
- package/dist/platform/sqlite/database.js +36 -0
- package/dist/platform/sqlite/database.js.map +1 -0
- package/dist/platform/sqlite/index.js +4 -0
- package/dist/platform/sqlite/index.js.map +1 -0
- package/dist/platform/sqlite/migrations.js +299 -0
- package/dist/platform/sqlite/migrations.js.map +1 -0
- package/dist/platform/sqlite/rows.js +13 -0
- package/dist/platform/sqlite/rows.js.map +1 -0
- package/dist/platform/sqlite/stats-migration.js +42 -0
- package/dist/platform/sqlite/stats-migration.js.map +1 -0
- package/dist/presentation/cli/commands/daemon.js +216 -0
- package/dist/presentation/cli/commands/daemon.js.map +1 -0
- package/dist/presentation/cli/commands/group.js +88 -0
- package/dist/presentation/cli/commands/group.js.map +1 -0
- package/dist/presentation/cli/commands/mcp.js +44 -0
- package/dist/presentation/cli/commands/mcp.js.map +1 -0
- package/dist/presentation/cli/commands/queue-edit.js +155 -0
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -0
- package/dist/presentation/cli/commands/queue.js +222 -0
- package/dist/presentation/cli/commands/queue.js.map +1 -0
- package/dist/presentation/cli/commands/repositories.js +129 -0
- package/dist/presentation/cli/commands/repositories.js.map +1 -0
- package/dist/presentation/cli/commands/run-delivery.js +116 -0
- package/dist/presentation/cli/commands/run-delivery.js.map +1 -0
- package/dist/presentation/cli/commands/run.js +156 -0
- package/dist/presentation/cli/commands/run.js.map +1 -0
- package/dist/presentation/cli/commands/setup.js +97 -0
- package/dist/presentation/cli/commands/setup.js.map +1 -0
- package/dist/presentation/cli/commands/stats.js +41 -0
- package/dist/presentation/cli/commands/stats.js.map +1 -0
- package/dist/presentation/cli/commands/tag.js +92 -0
- package/dist/presentation/cli/commands/tag.js.map +1 -0
- package/dist/presentation/cli/commands/web.js +100 -0
- package/dist/presentation/cli/commands/web.js.map +1 -0
- package/dist/presentation/cli/context.js +49 -0
- package/dist/presentation/cli/context.js.map +1 -0
- package/dist/presentation/cli/help.js +49 -0
- package/dist/presentation/cli/help.js.map +1 -0
- package/dist/presentation/cli/io.js +13 -0
- package/dist/presentation/cli/io.js.map +1 -0
- package/dist/presentation/cli/local/clean.js +72 -0
- package/dist/presentation/cli/local/clean.js.map +1 -0
- package/dist/presentation/cli/local/config-check.js +225 -0
- package/dist/presentation/cli/local/config-check.js.map +1 -0
- package/dist/presentation/cli/local/init.js +44 -0
- package/dist/presentation/cli/local/init.js.map +1 -0
- package/dist/presentation/cli/options.js +34 -0
- package/dist/presentation/cli/options.js.map +1 -0
- package/dist/presentation/cli/probe.js +12 -0
- package/dist/presentation/cli/probe.js.map +1 -0
- package/dist/presentation/cli/program.js +78 -0
- package/dist/presentation/cli/program.js.map +1 -0
- package/dist/presentation/cli/setup/actions.js +206 -0
- package/dist/presentation/cli/setup/actions.js.map +1 -0
- package/dist/presentation/cli/setup/command.js +80 -0
- package/dist/presentation/cli/setup/command.js.map +1 -0
- package/dist/presentation/cli/setup/host.js +20 -0
- package/dist/presentation/cli/setup/host.js.map +1 -0
- package/dist/presentation/cli/setup/index.js +5 -0
- package/dist/presentation/cli/setup/index.js.map +1 -0
- package/dist/presentation/cli/setup/run.js +63 -0
- package/dist/presentation/cli/setup/run.js.map +1 -0
- package/dist/presentation/cli/setup/system.js +53 -0
- package/dist/presentation/cli/setup/system.js.map +1 -0
- package/dist/presentation/cli/setup/types.js +3 -0
- package/dist/presentation/cli/setup/types.js.map +1 -0
- package/dist/presentation/cli/watch.js +24 -0
- package/dist/presentation/cli/watch.js.map +1 -0
- package/dist/presentation/cli/web-control.js +172 -0
- package/dist/presentation/cli/web-control.js.map +1 -0
- package/dist/presentation/format/groups.js +99 -0
- package/dist/presentation/format/groups.js.map +1 -0
- package/dist/presentation/format/index.js +8 -0
- package/dist/presentation/format/index.js.map +1 -0
- package/dist/presentation/format/queue.js +109 -0
- package/dist/presentation/format/queue.js.map +1 -0
- package/dist/presentation/format/runs.js +209 -0
- package/dist/presentation/format/runs.js.map +1 -0
- package/dist/presentation/format/stats.js +79 -0
- package/dist/presentation/format/stats.js.map +1 -0
- package/dist/presentation/format/style.js +81 -0
- package/dist/presentation/format/style.js.map +1 -0
- package/dist/presentation/format/table.js +62 -0
- package/dist/presentation/format/table.js.map +1 -0
- package/dist/presentation/format/tags.js +26 -0
- package/dist/presentation/format/tags.js.map +1 -0
- package/dist/presentation/ipc/client/autostart.js +171 -0
- package/dist/presentation/ipc/client/autostart.js.map +1 -0
- package/dist/presentation/ipc/client/client.js +83 -0
- package/dist/presentation/ipc/client/client.js.map +1 -0
- package/dist/presentation/ipc/client/index.js +4 -0
- package/dist/presentation/ipc/client/index.js.map +1 -0
- package/dist/presentation/ipc/client/repository-argument.js +13 -0
- package/dist/presentation/ipc/client/repository-argument.js.map +1 -0
- package/dist/presentation/ipc/contract/agents.js +97 -0
- package/dist/presentation/ipc/contract/agents.js.map +1 -0
- package/dist/presentation/ipc/contract/artifacts.js +27 -0
- package/dist/presentation/ipc/contract/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/config.js +145 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -0
- package/dist/presentation/ipc/contract/envelope.js +100 -0
- package/dist/presentation/ipc/contract/envelope.js.map +1 -0
- package/dist/presentation/ipc/contract/groups.js +57 -0
- package/dist/presentation/ipc/contract/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/index.js +15 -0
- package/dist/presentation/ipc/contract/index.js.map +1 -0
- package/dist/presentation/ipc/contract/observers/history.js +26 -0
- package/dist/presentation/ipc/contract/observers/history.js.map +1 -0
- package/dist/presentation/ipc/contract/observers.js +16 -0
- package/dist/presentation/ipc/contract/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/panel.js +64 -0
- package/dist/presentation/ipc/contract/panel.js.map +1 -0
- package/dist/presentation/ipc/contract/processes.js +9 -0
- package/dist/presentation/ipc/contract/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/queue.js +115 -0
- package/dist/presentation/ipc/contract/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/repositories.js +33 -0
- package/dist/presentation/ipc/contract/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js +2 -0
- package/dist/presentation/ipc/contract/responses/artifacts.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/config.js +2 -0
- package/dist/presentation/ipc/contract/responses/config.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/groups.js +2 -0
- package/dist/presentation/ipc/contract/responses/groups.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/index.js +12 -0
- package/dist/presentation/ipc/contract/responses/index.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js +2 -0
- package/dist/presentation/ipc/contract/responses/observer-history.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/observers.js +2 -0
- package/dist/presentation/ipc/contract/responses/observers.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/processes.js +2 -0
- package/dist/presentation/ipc/contract/responses/processes.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/queue.js +2 -0
- package/dist/presentation/ipc/contract/responses/queue.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/repositories.js +2 -0
- package/dist/presentation/ipc/contract/responses/repositories.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/runs.js +2 -0
- package/dist/presentation/ipc/contract/responses/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/stats.js +67 -0
- package/dist/presentation/ipc/contract/responses/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/responses/tags.js +2 -0
- package/dist/presentation/ipc/contract/responses/tags.js.map +1 -0
- package/dist/presentation/ipc/contract/runs.js +118 -0
- package/dist/presentation/ipc/contract/runs.js.map +1 -0
- package/dist/presentation/ipc/contract/stats/stats.js +20 -0
- package/dist/presentation/ipc/contract/stats/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/tags.js +40 -0
- package/dist/presentation/ipc/contract/tags.js.map +1 -0
- package/dist/presentation/ipc/handlers/config.js +39 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -0
- package/dist/presentation/ipc/handlers/groups.js +22 -0
- package/dist/presentation/ipc/handlers/groups.js.map +1 -0
- package/dist/presentation/ipc/handlers/index.js +2 -0
- package/dist/presentation/ipc/handlers/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/observers.js +14 -0
- package/dist/presentation/ipc/handlers/observers.js.map +1 -0
- package/dist/presentation/ipc/handlers/queue.js +36 -0
- package/dist/presentation/ipc/handlers/queue.js.map +1 -0
- package/dist/presentation/ipc/handlers/repositories.js +26 -0
- package/dist/presentation/ipc/handlers/repositories.js.map +1 -0
- package/dist/presentation/ipc/handlers/runs.js +55 -0
- package/dist/presentation/ipc/handlers/runs.js.map +1 -0
- package/dist/presentation/ipc/handlers/stats.js +17 -0
- package/dist/presentation/ipc/handlers/stats.js.map +1 -0
- package/dist/presentation/ipc/handlers/system.js +40 -0
- package/dist/presentation/ipc/handlers/system.js.map +1 -0
- package/dist/presentation/ipc/handlers/table.js +25 -0
- package/dist/presentation/ipc/handlers/table.js.map +1 -0
- package/dist/presentation/ipc/handlers/types.js +2 -0
- package/dist/presentation/ipc/handlers/types.js.map +1 -0
- package/dist/presentation/ipc/publisher.js +176 -0
- package/dist/presentation/ipc/publisher.js.map +1 -0
- package/dist/presentation/ipc/server.js +164 -0
- package/dist/presentation/ipc/server.js.map +1 -0
- package/dist/presentation/ipc/services.js +2 -0
- package/dist/presentation/ipc/services.js.map +1 -0
- package/dist/presentation/ipc/snapshots.js +60 -0
- package/dist/presentation/ipc/snapshots.js.map +1 -0
- package/dist/presentation/ipc/views/catalog.js +9 -0
- package/dist/presentation/ipc/views/catalog.js.map +1 -0
- package/dist/presentation/ipc/views/groups.js +112 -0
- package/dist/presentation/ipc/views/groups.js.map +1 -0
- package/dist/presentation/ipc/views/index.js +11 -0
- package/dist/presentation/ipc/views/index.js.map +1 -0
- package/dist/presentation/ipc/views/observer-history.js +26 -0
- package/dist/presentation/ipc/views/observer-history.js.map +1 -0
- package/dist/presentation/ipc/views/observers.js +16 -0
- package/dist/presentation/ipc/views/observers.js.map +1 -0
- package/dist/presentation/ipc/views/queue.js +155 -0
- package/dist/presentation/ipc/views/queue.js.map +1 -0
- package/dist/presentation/ipc/views/repositories.js +34 -0
- package/dist/presentation/ipc/views/repositories.js.map +1 -0
- package/dist/presentation/ipc/views/rows.js +117 -0
- package/dist/presentation/ipc/views/rows.js.map +1 -0
- package/dist/presentation/ipc/views/run-stages.js +66 -0
- package/dist/presentation/ipc/views/run-stages.js.map +1 -0
- package/dist/presentation/ipc/views/runs.js +201 -0
- package/dist/presentation/ipc/views/runs.js.map +1 -0
- package/dist/presentation/ipc/views/stats.js +5 -0
- package/dist/presentation/ipc/views/stats.js.map +1 -0
- package/dist/presentation/ipc/views/tags.js +19 -0
- package/dist/presentation/ipc/views/tags.js.map +1 -0
- package/dist/presentation/mcp/host-kit.js +67 -0
- package/dist/presentation/mcp/host-kit.js.map +1 -0
- package/dist/presentation/mcp/host-queue-control.js +135 -0
- package/dist/presentation/mcp/host-queue-control.js.map +1 -0
- package/dist/presentation/mcp/host-queue.js +124 -0
- package/dist/presentation/mcp/host-queue.js.map +1 -0
- package/dist/presentation/mcp/host-runs.js +173 -0
- package/dist/presentation/mcp/host-runs.js.map +1 -0
- package/dist/presentation/mcp/host.js +34 -0
- package/dist/presentation/mcp/host.js.map +1 -0
- package/dist/presentation/mcp/index.js +3 -0
- package/dist/presentation/mcp/index.js.map +1 -0
- package/dist/presentation/mcp/tools.js +19 -0
- package/dist/presentation/mcp/tools.js.map +1 -0
- package/dist/presentation/mcp/worker-extra.js +144 -0
- package/dist/presentation/mcp/worker-extra.js.map +1 -0
- package/dist/presentation/mcp/worker-read.js +45 -0
- package/dist/presentation/mcp/worker-read.js.map +1 -0
- package/dist/presentation/mcp/worker-tools.js +107 -0
- package/dist/presentation/mcp/worker-tools.js.map +1 -0
- package/dist/presentation/mcp/worker.js +14 -0
- package/dist/presentation/mcp/worker.js.map +1 -0
- package/dist/presentation/web/errors.js +60 -0
- package/dist/presentation/web/errors.js.map +1 -0
- package/dist/presentation/web/http.js +130 -0
- package/dist/presentation/web/http.js.map +1 -0
- package/dist/presentation/web/hub.js +168 -0
- package/dist/presentation/web/hub.js.map +1 -0
- package/dist/presentation/web/index.js +7 -0
- package/dist/presentation/web/index.js.map +1 -0
- package/dist/presentation/web/options.js +7 -0
- package/dist/presentation/web/options.js.map +1 -0
- package/dist/presentation/web/pages.js +44 -0
- package/dist/presentation/web/pages.js.map +1 -0
- package/dist/presentation/web/panel/daemon-panel.js +207 -0
- package/dist/presentation/web/panel/daemon-panel.js.map +1 -0
- package/dist/presentation/web/panel/default-repository.js +14 -0
- package/dist/presentation/web/panel/default-repository.js.map +1 -0
- package/dist/presentation/web/panel/directories.js +48 -0
- package/dist/presentation/web/panel/directories.js.map +1 -0
- package/dist/presentation/web/panel/open.js +12 -0
- package/dist/presentation/web/panel/open.js.map +1 -0
- package/dist/presentation/web/panel/standby.js +119 -0
- package/dist/presentation/web/panel/standby.js.map +1 -0
- package/dist/presentation/web/panel/state.js +69 -0
- package/dist/presentation/web/panel/state.js.map +1 -0
- package/dist/presentation/web/panel/system.js +67 -0
- package/dist/presentation/web/panel/system.js.map +1 -0
- package/dist/presentation/web/request.js +150 -0
- package/dist/presentation/web/request.js.map +1 -0
- package/dist/presentation/web/routes/config.js +171 -0
- package/dist/presentation/web/routes/config.js.map +1 -0
- package/dist/presentation/web/routes/downloads.js +65 -0
- package/dist/presentation/web/routes/downloads.js.map +1 -0
- package/dist/presentation/web/routes/groups.js +85 -0
- package/dist/presentation/web/routes/groups.js.map +1 -0
- package/dist/presentation/web/routes/observers/history.js +19 -0
- package/dist/presentation/web/routes/observers/history.js.map +1 -0
- package/dist/presentation/web/routes/processes.js +21 -0
- package/dist/presentation/web/routes/processes.js.map +1 -0
- package/dist/presentation/web/routes/queue.js +80 -0
- package/dist/presentation/web/routes/queue.js.map +1 -0
- package/dist/presentation/web/routes/repositories.js +66 -0
- package/dist/presentation/web/routes/repositories.js.map +1 -0
- package/dist/presentation/web/routes/runs.js +76 -0
- package/dist/presentation/web/routes/runs.js.map +1 -0
- package/dist/presentation/web/routes/settings.js +74 -0
- package/dist/presentation/web/routes/settings.js.map +1 -0
- package/dist/presentation/web/routes/specialists.js +74 -0
- package/dist/presentation/web/routes/specialists.js.map +1 -0
- package/dist/presentation/web/routes/stats/stats.js +22 -0
- package/dist/presentation/web/routes/stats/stats.js.map +1 -0
- package/dist/presentation/web/routes/system.js +96 -0
- package/dist/presentation/web/routes/system.js.map +1 -0
- package/dist/presentation/web/routes/tags.js +46 -0
- package/dist/presentation/web/routes/tags.js.map +1 -0
- package/dist/presentation/web/routes/types.js +2 -0
- package/dist/presentation/web/routes/types.js.map +1 -0
- package/dist/presentation/web/server.js +187 -0
- package/dist/presentation/web/server.js.map +1 -0
- package/dist/web/assets/FilterColumn-BCMp-JO4.js +1 -0
- package/dist/web/assets/SharedPipelinesGroup-DJRGFtzx.js +1 -0
- package/dist/web/assets/badge-C_7kALlW.js +1 -0
- package/dist/web/assets/card-C9eXOVuF.js +1 -0
- package/dist/web/assets/deliveryModes-funlvXVC.js +1 -0
- package/dist/web/assets/empty-ACC2KkXk.js +41 -0
- package/dist/web/assets/index-CsVQUXJH.js +21 -0
- package/dist/web/assets/index-Ds1nt_qm.css +2 -0
- package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/assets/locales-fB1w2oER.js +1 -0
- package/dist/web/assets/pipelines-DLioOiRN.css +1 -0
- package/dist/web/assets/pipelines-DQglwIkL.js +10 -0
- package/dist/web/assets/queue-CAuAo--6.js +16 -0
- package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/web/assets/select-BSqaxwh1.js +1 -0
- package/dist/web/assets/settingFields-DVg9TQK2.js +1 -0
- package/dist/web/assets/settings-6eHKYbS7.js +2 -0
- package/dist/web/assets/skeleton-CfLYGtNX.js +1 -0
- package/dist/web/assets/specialists-Durm0DgK.js +1 -0
- package/dist/web/assets/stats-67akPa3A.js +1 -0
- package/dist/web/assets/topology-DQu3su19.js +1 -0
- package/dist/web/assets/trash-ChYI9ms1.js +1 -0
- package/dist/web/assets/useListDrag-0GPS1X83.js +1 -0
- package/dist/web/assets/vendor-markdown-DwXfjc7L.js +32 -0
- package/dist/web/assets/vendor-react-C1iE8mnY.js +9 -0
- package/dist/web/index.html +22 -0
- package/integrations/claude-code/.claude-plugin/plugin.json +19 -0
- package/integrations/claude-code/commands/apply.md +6 -0
- package/integrations/claude-code/commands/panel.md +6 -0
- package/integrations/claude-code/commands/run.md +6 -0
- package/integrations/claude-code/commands/status.md +6 -0
- package/integrations/claude-code/commands/web.md +6 -0
- package/integrations/claude-code/hooks/aip.ts +365 -0
- package/integrations/claude-code/hooks/feed.ts +923 -0
- package/integrations/claude-code/hooks/hooks.json +1 -0
- package/integrations/claude-code/hooks/pane.ts +396 -0
- package/integrations/claude-code/hooks/register.tsx +156 -0
- package/integrations/claude-code/hooks/theme.ts +59 -0
- package/integrations/claude-code/hooks/transcript.tsx +44 -0
- package/integrations/claude-code/hooks/view.tsx +378 -0
- package/integrations/claude-code/hooks/web.ts +162 -0
- package/integrations/claude-code/tsconfig.json +18 -0
- package/integrations/claude-code/types/index.d.ts +89 -0
- package/package.json +70 -4
- package/templates/aip/pipelines/feature.yaml +4 -0
- package/templates/aip/settings.yaml +10 -0
- package/templates/aip/specialists/coder.yaml +4 -0
- package/templates/aip/specialists/reviewer.yaml +5 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
2
|
+
import { ConfigEditError, } from '../types/index.js';
|
|
3
|
+
import { sharedPipelineUsage } from './shared-pipelines.js';
|
|
4
|
+
import { sharedSpecialistUsage } from './shared-specialists.js';
|
|
5
|
+
import { commitEdits, planImport, planTagRemove, planTagRename, planTagsSet, tagFolder, } from './specialist-tags.js';
|
|
6
|
+
/** A plan of the editor; its own errors become a refusal of the request. */
|
|
7
|
+
function planned(plan) {
|
|
8
|
+
try {
|
|
9
|
+
return plan();
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
if (error instanceof ConfigEditError)
|
|
13
|
+
throw rejected(error.message);
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** The shared specialists and pipelines, their tags and their import between repositories. */
|
|
18
|
+
export class SharedConfigService {
|
|
19
|
+
dependencies;
|
|
20
|
+
constructor(dependencies) {
|
|
21
|
+
this.dependencies = dependencies;
|
|
22
|
+
}
|
|
23
|
+
/** The shared specialists with the repositories of the registry that need them. */
|
|
24
|
+
specialists() {
|
|
25
|
+
return sharedSpecialistUsage(this.shared(), this.projects(this.dependencies.registry.paths()));
|
|
26
|
+
}
|
|
27
|
+
/** The shared pipelines with the repositories of the registry that need them. */
|
|
28
|
+
pipelines() {
|
|
29
|
+
return sharedPipelineUsage(this.shared(), this.projects(this.dependencies.registry.paths()));
|
|
30
|
+
}
|
|
31
|
+
/** References to a shared specialist from the registry and the requesting repository. */
|
|
32
|
+
specialistUsageOf(repository, slug) {
|
|
33
|
+
const usage = sharedSpecialistUsage(this.shared(), this.projects(this.with(repository)), slug);
|
|
34
|
+
return (usage.specialists[0]?.projects ?? []).flatMap((project) => project.references.map((reference) => ({ ...reference, repository: project.repository })));
|
|
35
|
+
}
|
|
36
|
+
/** References to a shared pipeline from the registry and the requesting repository. */
|
|
37
|
+
pipelineUsageOf(repository, id) {
|
|
38
|
+
const usage = sharedPipelineUsage(this.shared(), this.projects(this.with(repository)), id);
|
|
39
|
+
return (usage.pipelines[0]?.projects ?? []).flatMap((project) => project.references.map((reference) => ({ ...reference, repository: project.repository })));
|
|
40
|
+
}
|
|
41
|
+
/** The shared level, then one folder per repository of the registry. */
|
|
42
|
+
specialistTags() {
|
|
43
|
+
const repositories = [null, ...this.dependencies.registry.paths()];
|
|
44
|
+
return { folders: repositories.map((repository) => this.tagFolder(repository)) };
|
|
45
|
+
}
|
|
46
|
+
setTags(repository, slug, tags, revision) {
|
|
47
|
+
return this.tagEdit(repository, (paths, level) => planTagsSet(paths, level, slug, tags, revision));
|
|
48
|
+
}
|
|
49
|
+
renameTag(repository, from, to) {
|
|
50
|
+
return this.tagEdit(repository, (paths, level) => planTagRename(paths, level, from, to));
|
|
51
|
+
}
|
|
52
|
+
removeTag(repository, tag) {
|
|
53
|
+
return this.tagEdit(repository, (paths, level) => planTagRemove(paths, level, tag));
|
|
54
|
+
}
|
|
55
|
+
importSpecialists(params) {
|
|
56
|
+
const plan = this.importPlan(params.repository, params.source, params.slugs, 'specialist');
|
|
57
|
+
if (!plan.ok)
|
|
58
|
+
return plan;
|
|
59
|
+
commitEdits(plan.edits);
|
|
60
|
+
this.dependencies.changed.configChanged(this.dependencies.registry.pathOf(params.repository));
|
|
61
|
+
return { ok: true, imported: [...new Set(params.slugs)] };
|
|
62
|
+
}
|
|
63
|
+
importPipelines(params) {
|
|
64
|
+
const plan = this.importPlan(params.repository, params.source, params.ids, 'pipeline');
|
|
65
|
+
if (!plan.ok) {
|
|
66
|
+
return plan.reason === 'conflict'
|
|
67
|
+
? {
|
|
68
|
+
ok: false,
|
|
69
|
+
reason: 'conflict',
|
|
70
|
+
message: plan.message,
|
|
71
|
+
...(plan.slugs ? { ids: plan.slugs } : {}),
|
|
72
|
+
}
|
|
73
|
+
: plan;
|
|
74
|
+
}
|
|
75
|
+
commitEdits(plan.edits);
|
|
76
|
+
this.dependencies.changed.configChanged(this.dependencies.registry.pathOf(params.repository));
|
|
77
|
+
return { ok: true, imported: [...new Set(params.ids)] };
|
|
78
|
+
}
|
|
79
|
+
shared() {
|
|
80
|
+
return this.dependencies.config.pathsOf('/');
|
|
81
|
+
}
|
|
82
|
+
projects(roots) {
|
|
83
|
+
return roots.map((root) => ({
|
|
84
|
+
repository: root,
|
|
85
|
+
paths: this.dependencies.config.pathsOf(root),
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
/** The registry with the requesting repository, which may not be in it yet. */
|
|
89
|
+
with(repository) {
|
|
90
|
+
const roots = new Set(this.dependencies.registry.paths());
|
|
91
|
+
roots.add(repository);
|
|
92
|
+
return [...roots];
|
|
93
|
+
}
|
|
94
|
+
tagFolder(repository) {
|
|
95
|
+
const paths = this.dependencies.config.pathsOf(repository ?? '/');
|
|
96
|
+
return { repository, ...tagFolder(paths, repository === null ? 'global' : 'project') };
|
|
97
|
+
}
|
|
98
|
+
/** Plans and writes without an await between them, so two edits never interleave. */
|
|
99
|
+
tagEdit(reference, plan) {
|
|
100
|
+
const repository = reference === null ? null : this.dependencies.registry.pathOf(reference);
|
|
101
|
+
if (repository !== null && !this.dependencies.registry.has(repository)) {
|
|
102
|
+
throw rejected(`unknown repository ${repository}`);
|
|
103
|
+
}
|
|
104
|
+
const level = repository === null ? 'global' : 'project';
|
|
105
|
+
const result = planned(() => plan(this.dependencies.config.pathsOf(repository ?? '/'), level));
|
|
106
|
+
if (!result.ok)
|
|
107
|
+
return result;
|
|
108
|
+
commitEdits(result.edits);
|
|
109
|
+
if (repository !== null)
|
|
110
|
+
this.dependencies.changed.configChanged(repository);
|
|
111
|
+
return { ok: true, folder: this.tagFolder(repository) };
|
|
112
|
+
}
|
|
113
|
+
importPlan(target, from, ids, kind) {
|
|
114
|
+
const repository = this.dependencies.registry.pathOf(target);
|
|
115
|
+
const source = this.dependencies.registry.pathOf(from);
|
|
116
|
+
for (const path of [repository, source]) {
|
|
117
|
+
if (!this.dependencies.registry.has(path))
|
|
118
|
+
throw rejected(`unknown repository ${path}`);
|
|
119
|
+
}
|
|
120
|
+
if (repository === source)
|
|
121
|
+
throw rejected('the source must be another repository');
|
|
122
|
+
const { config } = this.dependencies;
|
|
123
|
+
return planned(() => kind === 'specialist'
|
|
124
|
+
? planImport(config.pathsOf(repository), config.pathsOf(source), ids)
|
|
125
|
+
: planImport(config.pathsOf(repository), config.pathsOf(source), ids, 'pipeline'));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=shared-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-config.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/shared-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAK7D,OAAO,EACL,eAAe,GAUhB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,GACV,MAAM,sBAAsB,CAAC;AAQ9B,4EAA4E;AAC5E,SAAS,OAAO,CAAI,IAAa;IAC/B,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,eAAe;YAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,8FAA8F;AAC9F,MAAM,OAAO,mBAAmB;IACb,YAAY,CAA2B;IAExD,YAAY,YAAsC;QAChD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,mFAAmF;IACnF,WAAW;QACT,OAAO,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CA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AAY;YACnB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;YACrE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,CACpF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { assembleLevel, readLevel } from '../../swarm-config/services/index.js';
|
|
2
|
+
import { isMapping, mergeConfigs, tagsOf, } from '../../swarm-config/types/index.js';
|
|
3
|
+
import { revisionOf } from '../repositories/documents.js';
|
|
4
|
+
import { pipelineReferences, stemOf } from './references.js';
|
|
5
|
+
import {} from '../types/shared.js';
|
|
6
|
+
function projectHas(level, id) {
|
|
7
|
+
const pipelines = isMapping(level.tree) && isMapping(level.tree.swarm) ? level.tree.swarm : {};
|
|
8
|
+
const map = isMapping(pipelines.pipelines) ? pipelines.pipelines : {};
|
|
9
|
+
return Object.hasOwn(map, id);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The shared pipelines in id order with the repositories that use them. A shared pipeline is
|
|
13
|
+
* used by a repository without a project file of that id when its merged configuration refers to it.
|
|
14
|
+
* Works on files that read as YAML, so a configuration that fails validation still gives references.
|
|
15
|
+
*/
|
|
16
|
+
export function sharedPipelineUsage(global, projects, only) {
|
|
17
|
+
const files = readLevel(global.global, { tolerant: true });
|
|
18
|
+
const globalLevel = assembleLevel(files);
|
|
19
|
+
const levels = projects.map((project) => ({
|
|
20
|
+
repository: project.repository,
|
|
21
|
+
level: assembleLevel(readLevel(project.paths.project, { tolerant: true })),
|
|
22
|
+
}));
|
|
23
|
+
const entries = new Map();
|
|
24
|
+
const directory = `${global.global.directory}/pipelines`;
|
|
25
|
+
for (const source of files.pipelines) {
|
|
26
|
+
const id = stemOf(source.path);
|
|
27
|
+
const raw = isMapping(source.value) ? source.value : {};
|
|
28
|
+
entries.set(id, {
|
|
29
|
+
id,
|
|
30
|
+
name: typeof raw.name === 'string' ? raw.name : null,
|
|
31
|
+
tags: tagsOf(raw),
|
|
32
|
+
file: source.path,
|
|
33
|
+
revision: revisionOf(source.text),
|
|
34
|
+
global: [],
|
|
35
|
+
projects: [],
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const marker = 'swarm.pipelines.';
|
|
39
|
+
for (const problem of files.problems) {
|
|
40
|
+
if (!problem.path.startsWith(marker))
|
|
41
|
+
continue;
|
|
42
|
+
const id = problem.path.slice(marker.length);
|
|
43
|
+
entries.set(id, {
|
|
44
|
+
id,
|
|
45
|
+
name: null,
|
|
46
|
+
tags: [],
|
|
47
|
+
file: problem.file ?? `${directory}/${id}.yaml`,
|
|
48
|
+
revision: null,
|
|
49
|
+
error: problem.message,
|
|
50
|
+
global: [],
|
|
51
|
+
projects: [],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const result = [];
|
|
55
|
+
for (const entry of [...entries.values()].sort((a, b) => (a.id < b.id ? -1 : 1))) {
|
|
56
|
+
if (only !== undefined && entry.id !== only)
|
|
57
|
+
continue;
|
|
58
|
+
if (entry.error === undefined) {
|
|
59
|
+
entry.global = pipelineReferences(globalLevel.tree, entry.id);
|
|
60
|
+
for (const { repository, level } of levels) {
|
|
61
|
+
if (projectHas(level, entry.id))
|
|
62
|
+
continue;
|
|
63
|
+
const references = pipelineReferences(mergeConfigs(globalLevel.tree, level.tree), entry.id);
|
|
64
|
+
if (references.length > 0)
|
|
65
|
+
entry.projects.push({ repository, references });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
result.push(entry);
|
|
69
|
+
}
|
|
70
|
+
return { directory, pipelines: result };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=shared-pipelines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-pip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AE,SAAS,EAAE,MAAM,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { assembleLevel, readLevel } from '../../swarm-config/services/index.js';
|
|
2
|
+
import { isMapping, mergeConfigs, } from '../../swarm-config/types/index.js';
|
|
3
|
+
import { revisionOf } from '../repositories/documents.js';
|
|
4
|
+
import { specialistReferences, stemOf } from './references.js';
|
|
5
|
+
import {} from '../types/shared.js';
|
|
6
|
+
function projectHas(level, slug) {
|
|
7
|
+
const specialists = isMapping(level.tree) && isMapping(level.tree.swarm) ? level.tree.swarm : {};
|
|
8
|
+
const map = isMapping(specialists.specialists) ? specialists.specialists : {};
|
|
9
|
+
return Object.hasOwn(map, slug);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The shared specialists in slug order with the repositories that use them. A shared specialist is
|
|
13
|
+
* used by a repository without a project file of that slug when its merged configuration refers to it.
|
|
14
|
+
* Works on files that read as YAML, so a configuration that fails validation still gives references.
|
|
15
|
+
*/
|
|
16
|
+
export function sharedSpecialistUsage(global, projects, only) {
|
|
17
|
+
const files = readLevel(global.global, { tolerant: true });
|
|
18
|
+
const globalLevel = assembleLevel(files);
|
|
19
|
+
const levels = projects.map((project) => ({
|
|
20
|
+
repository: project.repository,
|
|
21
|
+
level: assembleLevel(readLevel(project.paths.project, { tolerant: true })),
|
|
22
|
+
}));
|
|
23
|
+
const entries = new Map();
|
|
24
|
+
const directory = `${global.global.directory}/specialists`;
|
|
25
|
+
for (const source of files.specialists) {
|
|
26
|
+
const slug = stemOf(source.path);
|
|
27
|
+
const raw = isMapping(source.value) ? source.value : {};
|
|
28
|
+
entries.set(slug, {
|
|
29
|
+
slug,
|
|
30
|
+
name: typeof raw.name === 'string' ? raw.name : null,
|
|
31
|
+
file: source.path,
|
|
32
|
+
revision: revisionOf(source.text),
|
|
33
|
+
global: [],
|
|
34
|
+
projects: [],
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const marker = 'swarm.specialists.';
|
|
38
|
+
for (const problem of files.problems) {
|
|
39
|
+
if (!problem.path.startsWith(marker))
|
|
40
|
+
continue;
|
|
41
|
+
const slug = problem.path.slice(marker.length);
|
|
42
|
+
entries.set(slug, {
|
|
43
|
+
slug,
|
|
44
|
+
name: null,
|
|
45
|
+
file: problem.file ?? `${directory}/${slug}.yaml`,
|
|
46
|
+
revision: null,
|
|
47
|
+
error: problem.message,
|
|
48
|
+
global: [],
|
|
49
|
+
projects: [],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const result = [];
|
|
53
|
+
for (const entry of [...entries.values()].sort((a, b) => (a.slug < b.slug ? -1 : 1))) {
|
|
54
|
+
if (only !== undefined && entry.slug !== only)
|
|
55
|
+
continue;
|
|
56
|
+
if (entry.error === undefined) {
|
|
57
|
+
entry.global = specialistReferences(globalLevel.tree, entry.slug);
|
|
58
|
+
for (const { repository, level } of levels) {
|
|
59
|
+
if (projectHas(level, entry.slug))
|
|
60
|
+
continue;
|
|
61
|
+
const references = specialistReferences(mergeConfigs(globalLevel.tree, level.tree), entry.slug);
|
|
62
|
+
if (references.length > 0)
|
|
63
|
+
entry.projects.push({ repository, references });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
result.push(entry);
|
|
67
|
+
}
|
|
68
|
+
return { directory, specialists: result };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=shared-specialists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-specialists.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/shared-specialists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAEL,SAAS,EAET,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,iBAAiB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,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrF,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;YAAE,SAAS;QACxD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,KAAK,CAAC,MAAM,GAAG,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAClE,KAAK,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;gBAC3C,IAAI,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;oBAAE,SAAS;gBAC5C,MAAM,UAAU,GAAG,oBAAoB,CACrC,YAAY,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAC1C,KAAK,CAAC,IAAI,CACX,CAAC;gBACF,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;oBAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { dirname } from 'node:path';
|
|
2
|
+
import { parseYaml, readLevel } from '../../swarm-config/services/index.js';
|
|
3
|
+
import { isMapping, isValidSlug, sameTag, tagNameProblem, tagsOf, uniqueTags, } from '../../swarm-config/types/index.js';
|
|
4
|
+
import { commitEdit, editDocument, entryFile, readText, revisionOf, } from '../repositories/documents.js';
|
|
5
|
+
import { draftProjectFiles } from './plan-edit.js';
|
|
6
|
+
import { stemOf } from './references.js';
|
|
7
|
+
import { ConfigEditError } from '../types/editor.js';
|
|
8
|
+
import {} from '../types/tag-folders.js';
|
|
9
|
+
/** Trimmed tags without repeats; throws `ConfigEditError` for a name that is not allowed. */
|
|
10
|
+
export function normalizeTags(names) {
|
|
11
|
+
for (const name of names) {
|
|
12
|
+
const problem = tagNameProblem(name);
|
|
13
|
+
if (problem !== null) {
|
|
14
|
+
throw new ConfigEditError(`tag ${JSON.stringify(name)} ${problem}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return uniqueTags(names);
|
|
18
|
+
}
|
|
19
|
+
/** The specialists of a level in slug order; one unreadable file does not hide the others. */
|
|
20
|
+
export function tagFolder(paths, level) {
|
|
21
|
+
const levelPaths = paths[level];
|
|
22
|
+
const files = readLevel(levelPaths, { tolerant: true });
|
|
23
|
+
const byStem = new Map();
|
|
24
|
+
for (const source of files.specialists) {
|
|
25
|
+
const slug = stemOf(source.path);
|
|
26
|
+
const raw = isMapping(source.value) ? source.value : {};
|
|
27
|
+
byStem.set(slug, {
|
|
28
|
+
slug,
|
|
29
|
+
name: typeof raw.name === 'string' ? raw.name : null,
|
|
30
|
+
tags: tagsOf(raw),
|
|
31
|
+
revision: revisionOf(source.text),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const marker = 'swarm.specialists.';
|
|
35
|
+
for (const problem of files.problems) {
|
|
36
|
+
if (!problem.path.startsWith(marker))
|
|
37
|
+
continue;
|
|
38
|
+
const slug = problem.path.slice(marker.length);
|
|
39
|
+
byStem.set(slug, { slug, name: null, tags: [], revision: null, error: problem.message });
|
|
40
|
+
}
|
|
41
|
+
const specialists = [...byStem.values()].sort((left, right) => left.slug < right.slug ? -1 : left.slug > right.slug ? 1 : 0);
|
|
42
|
+
return { directory: `${levelPaths.directory}/specialists`, specialists };
|
|
43
|
+
}
|
|
44
|
+
function invalid(slug, file, message, kind = 'specialist') {
|
|
45
|
+
const section = kind === 'pipeline' ? 'pipelines' : 'specialists';
|
|
46
|
+
return {
|
|
47
|
+
ok: false,
|
|
48
|
+
reason: 'invalid',
|
|
49
|
+
errors: [
|
|
50
|
+
{ file, path: `swarm.${section}.${slug}${kind === 'pipeline' ? '' : '.tags'}`, message },
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** The text of a file with `tags` replaced; an empty list removes the key. */
|
|
55
|
+
function withTags(file, current, tags) {
|
|
56
|
+
const parsed = parseYaml(current, file);
|
|
57
|
+
const value = isMapping(parsed) ? { ...parsed } : {};
|
|
58
|
+
if (tags.length === 0)
|
|
59
|
+
delete value.tags;
|
|
60
|
+
else
|
|
61
|
+
value.tags = tags;
|
|
62
|
+
return editDocument(current, value);
|
|
63
|
+
}
|
|
64
|
+
/** Sets the whole list of tags of one specialist; nothing else in the file changes. */
|
|
65
|
+
export function planTagsSet(paths, level, slug, tags, revision) {
|
|
66
|
+
let file;
|
|
67
|
+
try {
|
|
68
|
+
file = entryFile(paths, 'specialist', slug, level);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (!(error instanceof ConfigEditError))
|
|
72
|
+
throw error;
|
|
73
|
+
return invalid(slug, '', error.message);
|
|
74
|
+
}
|
|
75
|
+
const current = readText(file);
|
|
76
|
+
if (current === undefined) {
|
|
77
|
+
return { ok: false, reason: 'conflict', message: `${file} does not exist any more` };
|
|
78
|
+
}
|
|
79
|
+
if (revisionOf(current) !== revision) {
|
|
80
|
+
return { ok: false, reason: 'conflict', message: `${file} was changed after it was read` };
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
const normalized = normalizeTags(tags);
|
|
84
|
+
const text = withTags(file, current, normalized);
|
|
85
|
+
return { ok: true, edits: [{ file, text, revision: revisionOf(text) }] };
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (!(error instanceof ConfigEditError) && !(error instanceof Error))
|
|
89
|
+
throw error;
|
|
90
|
+
return invalid(slug, file, error.message);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** Changes the tag in every specialist of the level that has it; `change` gets the tags of one file. */
|
|
94
|
+
function planTagChange(paths, level, tag, change) {
|
|
95
|
+
const folder = tagFolder(paths, level);
|
|
96
|
+
const edits = [];
|
|
97
|
+
for (const entry of folder.specialists) {
|
|
98
|
+
if (entry.error !== undefined || !entry.tags.some((name) => sameTag(name, tag)))
|
|
99
|
+
continue;
|
|
100
|
+
if (!isValidSlug(entry.slug))
|
|
101
|
+
continue;
|
|
102
|
+
const file = entryFile(paths, 'specialist', entry.slug, level);
|
|
103
|
+
const current = readText(file);
|
|
104
|
+
if (current === undefined || revisionOf(current) !== entry.revision) {
|
|
105
|
+
return { ok: false, reason: 'conflict', message: `${file} was changed after it was read` };
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
const text = withTags(file, current, change(entry.tags));
|
|
109
|
+
edits.push({ file, text, revision: revisionOf(text) });
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (!(error instanceof Error))
|
|
113
|
+
throw error;
|
|
114
|
+
return invalid(entry.slug, file, error.message);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (edits.length === 0) {
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
reason: 'invalid',
|
|
121
|
+
errors: [
|
|
122
|
+
{ file: folder.directory, path: 'tags', message: `unknown specialist tag \`${tag}\`` },
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return { ok: true, edits };
|
|
127
|
+
}
|
|
128
|
+
/** Renames a tag in all specialists of a level; a specialist that already has `to` just loses `from`. */
|
|
129
|
+
export function planTagRename(paths, level, from, to) {
|
|
130
|
+
const problem = tagNameProblem(to);
|
|
131
|
+
if (problem !== null) {
|
|
132
|
+
return {
|
|
133
|
+
ok: false,
|
|
134
|
+
reason: 'invalid',
|
|
135
|
+
errors: [{ file: '', path: 'tags', message: `tag ${JSON.stringify(to)} ${problem}` }],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const target = to.trim();
|
|
139
|
+
return planTagChange(paths, level, from, (tags) => uniqueTags(tags.map((name) => (sameTag(name, from) ? target : name))));
|
|
140
|
+
}
|
|
141
|
+
/** Removes a tag from all specialists of a level. */
|
|
142
|
+
export function planTagRemove(paths, level, tag) {
|
|
143
|
+
return planTagChange(paths, level, tag, (tags) => tags.filter((name) => !sameTag(name, tag)));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Copies project specialist files of `source` into the project of `target` byte for byte.
|
|
147
|
+
* All or nothing: a missing source file, a taken slug or a new configuration error refuses all.
|
|
148
|
+
*/
|
|
149
|
+
export function planImport(target, source, slugs, kind = 'specialist') {
|
|
150
|
+
const unique = [...new Set(slugs)];
|
|
151
|
+
const label = dirname(source.project.directory);
|
|
152
|
+
const copies = [];
|
|
153
|
+
for (const slug of unique) {
|
|
154
|
+
if (!isValidSlug(slug))
|
|
155
|
+
return invalid(slug, '', 'slug is not valid', kind);
|
|
156
|
+
const text = readText(entryFile(source, kind, slug, 'project'));
|
|
157
|
+
if (text === undefined) {
|
|
158
|
+
return invalid(slug, '', `${kind} \`${slug}\` is not defined in ${label}`, kind);
|
|
159
|
+
}
|
|
160
|
+
copies.push({ slug, file: entryFile(target, kind, slug, 'project'), text });
|
|
161
|
+
}
|
|
162
|
+
const taken = copies.filter((copy) => readText(copy.file) !== undefined).map((c) => c.slug);
|
|
163
|
+
if (taken.length > 0) {
|
|
164
|
+
return {
|
|
165
|
+
ok: false,
|
|
166
|
+
reason: 'conflict',
|
|
167
|
+
message: `already defined in the project: ${taken.join(', ')}`,
|
|
168
|
+
slugs: taken,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
const errors = draftProjectFiles(target, copies.map((copy) => ({ kind, id: copy.slug, ...copy })));
|
|
172
|
+
if (errors.length > 0)
|
|
173
|
+
return { ok: false, reason: 'invalid', errors };
|
|
174
|
+
return {
|
|
175
|
+
ok: true,
|
|
176
|
+
edits: copies.map((copy) => ({
|
|
177
|
+
file: copy.file,
|
|
178
|
+
text: copy.text,
|
|
179
|
+
revision: revisionOf(copy.text),
|
|
180
|
+
})),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
/** Writes the files one by one; when a write fails, the files already written get their old text back. */
|
|
184
|
+
export function commitEdits(edits) {
|
|
185
|
+
const done = [];
|
|
186
|
+
try {
|
|
187
|
+
for (const edit of edits) {
|
|
188
|
+
const before = readText(edit.file);
|
|
189
|
+
commitEdit({ ok: true, file: edit.file, text: edit.text, revision: edit.revision });
|
|
190
|
+
done.push({ file: edit.file, before });
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
for (const entry of done.reverse()) {
|
|
195
|
+
try {
|
|
196
|
+
if (entry.before === undefined) {
|
|
197
|
+
commitEdit({ ok: true, file: entry.file, text: null, revision: null });
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
commitEdit({
|
|
201
|
+
ok: true,
|
|
202
|
+
file: entry.file,
|
|
203
|
+
text: entry.before,
|
|
204
|
+
revision: revisionOf(entry.before),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
// the file is left as it is
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=specialist-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specialist-tags.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/services/specialist-tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAEL,SAAS,EACT,WAAW,EACX,OAAO,EACP,cAAc,EACd,MAAM,EACN,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,U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AC;QACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;YACnC,IAAI,CAAC;gBACH,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;oBAC/B,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;gBACzE,CAAC;qBAAM,CAAC;oBACN,UAAU,CAAC;wBACT,EAAE,EAAE,IAAI;wBACR,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,IAAI,EAAE,KAAK,CAAC,MAAM;wBAClB,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;qBACnC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,4BAA4B;YAC9B,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AppError } from '../../../platform/errors/index.js';
|
|
2
|
+
import { ACTIONS_DIR, CHAINS_DIR, PIPELINES_DIR, SPECIALISTS_DIR, } from '../../swarm-config/types/index.js';
|
|
3
|
+
import { field } from './setting-fields.js';
|
|
4
|
+
export const KIND_DIRECTORY = {
|
|
5
|
+
specialist: SPECIALISTS_DIR,
|
|
6
|
+
pipeline: PIPELINES_DIR,
|
|
7
|
+
action: ACTIONS_DIR,
|
|
8
|
+
chain: CHAINS_DIR,
|
|
9
|
+
};
|
|
10
|
+
/** Key of the section of the configuration tree (`swarm.<section>.<id>`) that holds the kind. */
|
|
11
|
+
export const KIND_SECTION = {
|
|
12
|
+
specialist: 'specialists',
|
|
13
|
+
pipeline: 'pipelines',
|
|
14
|
+
action: 'actions',
|
|
15
|
+
chain: 'chains',
|
|
16
|
+
};
|
|
17
|
+
/** Thrown for a request that is wrong by itself, before any file is looked at. */
|
|
18
|
+
export class ConfigEditError extends AppError {
|
|
19
|
+
constructor(message) {
|
|
20
|
+
super('invalid', message, { code: 'config.edit' });
|
|
21
|
+
this.name = 'ConfigEditError';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export function key(error) {
|
|
25
|
+
return `${error.path}\u0000${error.message}`;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/types/editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EACL,WAAW,EACX,UAAU,EAEV,aAAa,EACb,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GAA0E;IACjG,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,QAAQ;CAChB,CAAC;AAOF,kFAAkF;AAClF,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,YAAY,OAAe;QACzB,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AA+LD,MAAM,UAAU,GAAG,CAAC,KAAiB;IACnC,OAAO,GAAG,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/feature/swarm-edit/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|