@hoknie/aip 0.1.0 → 0.2.1
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/dist/app/agents.js +2 -0
- package/dist/app/agents.js.map +1 -1
- package/dist/app/application.js +41 -3
- package/dist/app/application.js.map +1 -1
- package/dist/app/lifecycle.js +5 -1
- package/dist/app/lifecycle.js.map +1 -1
- package/dist/app/timings.js +1 -0
- package/dist/app/timings.js.map +1 -1
- package/dist/app/wiring.js +1 -0
- package/dist/app/wiring.js.map +1 -1
- package/dist/cli/main.js +0 -0
- package/dist/feature/agents/clients/agy/guard.js +26 -8
- package/dist/feature/agents/clients/agy/guard.js.map +1 -1
- package/dist/feature/agents/clients/agy/permissions.js +9 -1
- package/dist/feature/agents/clients/agy/permissions.js.map +1 -1
- package/dist/feature/agents/clients/agy/runtime.js +8 -1
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -1
- package/dist/feature/agents/clients/claude/index.js +1 -0
- package/dist/feature/agents/clients/claude/index.js.map +1 -1
- 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 +8 -0
- package/dist/feature/agents/clients/claude/parser.js.map +1 -1
- package/dist/feature/agents/clients/claude/runtime.js +2 -0
- package/dist/feature/agents/clients/claude/runtime.js.map +1 -1
- package/dist/feature/agents/clients/opencode/index.js +1 -0
- package/dist/feature/agents/clients/opencode/index.js.map +1 -1
- 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/runtime.js +14 -1
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -1
- package/dist/feature/agents/ports/command.js +2 -0
- package/dist/feature/agents/ports/command.js.map +1 -0
- package/dist/feature/agents/services/agents.js +42 -1
- package/dist/feature/agents/services/agents.js.map +1 -1
- package/dist/feature/agents/services/catalog.js +1 -1
- package/dist/feature/agents/services/catalog.js.map +1 -1
- package/dist/feature/agents/types/index.js +2 -0
- package/dist/feature/agents/types/index.js.map +1 -1
- package/dist/feature/agents/types/mcp/env.js +54 -0
- package/dist/feature/agents/types/mcp/env.js.map +1 -0
- package/dist/feature/agents/types/message.js +1 -0
- package/dist/feature/agents/types/message.js.map +1 -1
- package/dist/feature/agents/types/models.js +2 -0
- package/dist/feature/agents/types/models.js.map +1 -0
- package/dist/feature/agents/types/runtime.js.map +1 -1
- package/dist/feature/agents/types/worker-tools.js +2 -0
- package/dist/feature/agents/types/worker-tools.js.map +1 -1
- 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/repositories/observers.js +7 -1
- package/dist/feature/observers/repositories/observers.js.map +1 -1
- package/dist/feature/observers/services/observers.js +33 -5
- package/dist/feature/observers/services/observers.js.map +1 -1
- package/dist/feature/observers/services/settings-check.js +1 -7
- package/dist/feature/observers/services/settings-check.js.map +1 -1
- package/dist/feature/observers/types/plan-repairs.js +48 -16
- package/dist/feature/observers/types/plan-repairs.js.map +1 -1
- package/dist/feature/observers/types/settings.js +0 -1
- package/dist/feature/observers/types/settings.js.map +1 -1
- package/dist/feature/queue/repositories/queues.js +28 -4
- package/dist/feature/queue/repositories/queues.js.map +1 -1
- package/dist/feature/queue/services/control.js +46 -8
- package/dist/feature/queue/services/control.js.map +1 -1
- package/dist/feature/queue/services/store.js +4 -0
- package/dist/feature/queue/services/store.js.map +1 -1
- package/dist/feature/queue/services/task-tags.js +4 -1
- package/dist/feature/queue/services/task-tags.js.map +1 -1
- package/dist/feature/queue/types/advance.js +29 -12
- package/dist/feature/queue/types/advance.js.map +1 -1
- package/dist/feature/queue/types/filter.js +36 -0
- package/dist/feature/queue/types/filter.js.map +1 -0
- package/dist/feature/queue/types/index.js +1 -0
- package/dist/feature/queue/types/index.js.map +1 -1
- package/dist/feature/queue/types/items.js +1 -0
- package/dist/feature/queue/types/items.js.map +1 -1
- package/dist/feature/queue/types/returns.js +18 -3
- package/dist/feature/queue/types/returns.js.map +1 -1
- package/dist/feature/queue/types/settings.js +14 -3
- package/dist/feature/queue/types/settings.js.map +1 -1
- package/dist/feature/runs/machine/exits.js +23 -1
- package/dist/feature/runs/machine/exits.js.map +1 -1
- package/dist/feature/runs/machine/plan.js +38 -16
- package/dist/feature/runs/machine/plan.js.map +1 -1
- package/dist/feature/runs/machine/repair.js +10 -3
- package/dist/feature/runs/machine/repair.js.map +1 -1
- package/dist/feature/runs/machine/scheduler.js +10 -3
- package/dist/feature/runs/machine/scheduler.js.map +1 -1
- package/dist/feature/runs/machine/steps.js +11 -11
- package/dist/feature/runs/machine/steps.js.map +1 -1
- package/dist/feature/runs/machine/transition.js +16 -2
- package/dist/feature/runs/machine/transition.js.map +1 -1
- package/dist/feature/runs/repositories/finished-runs.js +14 -10
- package/dist/feature/runs/repositories/finished-runs.js.map +1 -1
- package/dist/feature/runs/repositories/write.js +1 -1
- package/dist/feature/runs/repositories/write.js.map +1 -1
- package/dist/feature/runs/services/create.js +1 -0
- package/dist/feature/runs/services/create.js.map +1 -1
- package/dist/feature/runs/services/effects/actions.js +3 -2
- package/dist/feature/runs/services/effects/actions.js.map +1 -1
- package/dist/feature/runs/services/effects/attempts.js +61 -13
- package/dist/feature/runs/services/effects/attempts.js.map +1 -1
- package/dist/feature/runs/services/effects/context.js.map +1 -1
- package/dist/feature/runs/services/effects/effects.js +5 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -1
- package/dist/feature/runs/services/effects/naming.js +4 -1
- package/dist/feature/runs/services/effects/naming.js.map +1 -1
- 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/runtime-check.js +20 -0
- package/dist/feature/runs/services/effects/runtime-check.js.map +1 -0
- package/dist/feature/runs/services/engine.js +14 -5
- package/dist/feature/runs/services/engine.js.map +1 -1
- package/dist/feature/runs/services/index.js.map +1 -1
- package/dist/feature/runs/services/reads.js +40 -1
- package/dist/feature/runs/services/reads.js.map +1 -1
- package/dist/feature/runs/services/requests.js +7 -1
- package/dist/feature/runs/services/requests.js.map +1 -1
- package/dist/feature/runs/services/states.js +2 -2
- package/dist/feature/runs/services/states.js.map +1 -1
- package/dist/feature/runs/types/attempt.js +8 -0
- package/dist/feature/runs/types/attempt.js.map +1 -1
- package/dist/feature/runs/types/group.js.map +1 -1
- package/dist/feature/runs/types/input.js +33 -0
- package/dist/feature/runs/types/input.js.map +1 -1
- package/dist/feature/runs/types/limits.js +13 -1
- package/dist/feature/runs/types/limits.js.map +1 -1
- 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/services/assemble.js +1 -1
- package/dist/feature/swarm-config/services/assemble.js.map +1 -1
- package/dist/feature/swarm-config/services/index.js +4 -2
- package/dist/feature/swarm-config/services/index.js.map +1 -1
- package/dist/feature/swarm-config/services/load.js +17 -2
- package/dist/feature/swarm-config/services/load.js.map +1 -1
- package/dist/feature/swarm-config/services/sections/mcp-servers.js +128 -0
- package/dist/feature/swarm-config/services/sections/mcp-servers.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 +23 -1
- package/dist/feature/swarm-config/services/settings.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-actions.js +9 -1
- package/dist/feature/swarm-config/services/validate-actions.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-runtimes.js +3 -51
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-settings.js +65 -0
- package/dist/feature/swarm-config/services/validate-settings.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-specialists.js +5 -4
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -1
- package/dist/feature/swarm-config/services/validate.js +24 -8
- package/dist/feature/swarm-config/services/validate.js.map +1 -1
- package/dist/feature/swarm-config/types/action.js +9 -0
- package/dist/feature/swarm-config/types/action.js.map +1 -1
- package/dist/feature/swarm-config/types/index.js +1 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -1
- package/dist/feature/swarm-config/types/mcp/reference.js +40 -0
- package/dist/feature/swarm-config/types/mcp/reference.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +1 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -1
- package/dist/feature/swarm-config/types/settings.js +37 -5
- package/dist/feature/swarm-config/types/settings.js.map +1 -1
- package/dist/feature/swarm-config/types/specialist.js.map +1 -1
- package/dist/feature/swarm-edit/services/config-edits.js +26 -1
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -1
- package/dist/feature/swarm-edit/services/editor-settings.js +36 -7
- package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -1
- package/dist/feature/swarm-edit/services/editor-view.js +2 -0
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -1
- package/dist/feature/swarm-edit/services/index.js +1 -0
- package/dist/feature/swarm-edit/services/index.js.map +1 -1
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js +51 -0
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js.map +1 -0
- package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js +93 -0
- package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-settings.js +3 -1
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -1
- package/dist/feature/swarm-edit/types/editor.js.map +1 -1
- package/dist/feature/swarm-edit/types/setting-fields.js +12 -0
- package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -1
- package/dist/platform/git/delivery.js +1 -1
- package/dist/platform/git/delivery.js.map +1 -1
- 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/process/command.js +23 -0
- package/dist/platform/process/command.js.map +1 -0
- package/dist/platform/process/index.js +1 -0
- package/dist/platform/process/index.js.map +1 -1
- package/dist/platform/sqlite/migrations.js +3 -0
- package/dist/platform/sqlite/migrations.js.map +1 -1
- package/dist/platform/sqlite/stats-migration.js +42 -0
- package/dist/platform/sqlite/stats-migration.js.map +1 -0
- package/dist/presentation/cli/commands/queue-edit.js +23 -1
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -1
- package/dist/presentation/cli/commands/stats.js +41 -0
- package/dist/presentation/cli/commands/stats.js.map +1 -0
- package/dist/presentation/cli/help.js +1 -1
- package/dist/presentation/cli/help.js.map +1 -1
- package/dist/presentation/cli/local/config-check.js +23 -5
- package/dist/presentation/cli/local/config-check.js.map +1 -1
- package/dist/presentation/cli/program.js +2 -0
- package/dist/presentation/cli/program.js.map +1 -1
- package/dist/presentation/format/index.js +1 -0
- package/dist/presentation/format/index.js.map +1 -1
- package/dist/presentation/format/queue.js +15 -2
- package/dist/presentation/format/queue.js.map +1 -1
- package/dist/presentation/format/runs.js +8 -1
- package/dist/presentation/format/runs.js.map +1 -1
- package/dist/presentation/format/stats.js +79 -0
- package/dist/presentation/format/stats.js.map +1 -0
- package/dist/presentation/ipc/contract/agents.js +18 -0
- package/dist/presentation/ipc/contract/agents.js.map +1 -1
- package/dist/presentation/ipc/contract/config.js +26 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -1
- package/dist/presentation/ipc/contract/envelope.js +4 -1
- package/dist/presentation/ipc/contract/envelope.js.map +1 -1
- package/dist/presentation/ipc/contract/groups.js +9 -0
- package/dist/presentation/ipc/contract/groups.js.map +1 -1
- package/dist/presentation/ipc/contract/index.js +1 -0
- package/dist/presentation/ipc/contract/index.js.map +1 -1
- package/dist/presentation/ipc/contract/panel.js +11 -0
- package/dist/presentation/ipc/contract/panel.js.map +1 -1
- package/dist/presentation/ipc/contract/queue.js +11 -1
- package/dist/presentation/ipc/contract/queue.js.map +1 -1
- package/dist/presentation/ipc/contract/responses/index.js +1 -0
- package/dist/presentation/ipc/contract/responses/index.js.map +1 -1
- 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/runs.js +10 -0
- package/dist/presentation/ipc/contract/runs.js.map +1 -1
- 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/handlers/config.js +7 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -1
- package/dist/presentation/ipc/handlers/groups.js +8 -0
- package/dist/presentation/ipc/handlers/groups.js.map +1 -1
- package/dist/presentation/ipc/handlers/runs.js +2 -1
- package/dist/presentation/ipc/handlers/runs.js.map +1 -1
- 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 +2 -0
- package/dist/presentation/ipc/handlers/system.js.map +1 -1
- package/dist/presentation/ipc/handlers/table.js +2 -0
- package/dist/presentation/ipc/handlers/table.js.map +1 -1
- package/dist/presentation/ipc/publisher.js +1 -0
- package/dist/presentation/ipc/publisher.js.map +1 -1
- package/dist/presentation/ipc/snapshots.js +2 -2
- package/dist/presentation/ipc/snapshots.js.map +1 -1
- package/dist/presentation/ipc/views/catalog.js +3 -3
- package/dist/presentation/ipc/views/catalog.js.map +1 -1
- package/dist/presentation/ipc/views/index.js +1 -0
- package/dist/presentation/ipc/views/index.js.map +1 -1
- package/dist/presentation/ipc/views/observers.js +2 -2
- package/dist/presentation/ipc/views/observers.js.map +1 -1
- package/dist/presentation/ipc/views/queue.js +9 -2
- package/dist/presentation/ipc/views/queue.js.map +1 -1
- package/dist/presentation/ipc/views/runs.js +3 -4
- package/dist/presentation/ipc/views/runs.js.map +1 -1
- package/dist/presentation/ipc/views/stats.js +5 -0
- package/dist/presentation/ipc/views/stats.js.map +1 -0
- package/dist/presentation/mcp/host-queue-control.js +11 -2
- package/dist/presentation/mcp/host-queue-control.js.map +1 -1
- package/dist/presentation/mcp/worker-extra.js +2 -2
- package/dist/presentation/mcp/worker-extra.js.map +1 -1
- package/dist/presentation/mcp/worker-read.js +45 -0
- package/dist/presentation/mcp/worker-read.js.map +1 -0
- package/dist/presentation/mcp/worker.js +2 -0
- package/dist/presentation/mcp/worker.js.map +1 -1
- package/dist/presentation/web/hub.js +4 -0
- package/dist/presentation/web/hub.js.map +1 -1
- package/dist/presentation/web/panel/directories.js +1 -1
- package/dist/presentation/web/panel/directories.js.map +1 -1
- package/dist/presentation/web/panel/system.js +1 -0
- package/dist/presentation/web/panel/system.js.map +1 -1
- package/dist/presentation/web/request.js +28 -1
- package/dist/presentation/web/request.js.map +1 -1
- package/dist/presentation/web/routes/catalog/mcp-servers.js +50 -0
- package/dist/presentation/web/routes/catalog/mcp-servers.js.map +1 -0
- package/dist/presentation/web/routes/config.js +5 -0
- package/dist/presentation/web/routes/config.js.map +1 -1
- package/dist/presentation/web/routes/runs.js +5 -0
- package/dist/presentation/web/routes/runs.js.map +1 -1
- 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/server.js +5 -1
- package/dist/presentation/web/server.js.map +1 -1
- package/dist/web/assets/FilterColumn-BrQWIM5F.js +1 -0
- package/dist/web/assets/SharedPipelinesGroup-WFngQrqI.js +1 -0
- package/dist/web/assets/badge-B_khFsd6.js +1 -0
- package/dist/web/assets/{card-DkikoTxR.js → card-COXjnc-y.js} +1 -1
- package/dist/web/assets/empty-Eb-EZDPX.js +41 -0
- package/dist/web/assets/index-DEXoIe2a.js +21 -0
- package/dist/web/assets/index-DMlIe0VD.css +2 -0
- package/dist/web/assets/locales-BlBJo1PR.js +1 -0
- package/dist/web/assets/pipelines-B3cdeex_.js +10 -0
- package/dist/web/assets/queue-HMUImu0E.js +16 -0
- package/dist/web/assets/select-MHus_Unr.js +1 -0
- package/dist/web/assets/settingFields-DVg9TQK2.js +1 -0
- package/dist/web/assets/settings-CpeEsUXX.js +6 -0
- package/dist/web/assets/skeleton-CWY1nRvW.js +1 -0
- package/dist/web/assets/specialists-BkLXuqUd.js +1 -0
- package/dist/web/assets/stats-DRg_5vll.js +1 -0
- package/dist/web/assets/topology-DGTNdDHf.js +1 -0
- package/dist/web/assets/trash-CFJeuRuc.js +1 -0
- package/dist/web/assets/useListDrag-B7Wlt2u9.js +1 -0
- package/dist/web/index.html +7 -6
- package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/dist/cli/clean.js +0 -71
- package/dist/cli/clean.js.map +0 -1
- package/dist/cli/commands.js +0 -963
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/config-check.js +0 -173
- package/dist/cli/config-check.js.map +0 -1
- package/dist/cli/daemon.js +0 -199
- package/dist/cli/daemon.js.map +0 -1
- package/dist/cli/help.js +0 -50
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/init.js +0 -43
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/io.js +0 -13
- package/dist/cli/io.js.map +0 -1
- package/dist/cli/probe.js +0 -12
- package/dist/cli/probe.js.map +0 -1
- package/dist/cli/program.js +0 -48
- package/dist/cli/program.js.map +0 -1
- package/dist/cli/setup.js +0 -406
- package/dist/cli/setup.js.map +0 -1
- package/dist/cli/version.js +0 -6
- package/dist/cli/version.js.map +0 -1
- package/dist/cli/watch.js +0 -24
- package/dist/cli/watch.js.map +0 -1
- package/dist/cli/web/daemon-panel.js +0 -185
- package/dist/cli/web/daemon-panel.js.map +0 -1
- package/dist/cli/web/default-repository.js +0 -12
- package/dist/cli/web/default-repository.js.map +0 -1
- package/dist/cli/web/errors.js +0 -60
- package/dist/cli/web/errors.js.map +0 -1
- package/dist/cli/web/open.js +0 -12
- package/dist/cli/web/open.js.map +0 -1
- package/dist/cli/web/page.js +0 -465
- package/dist/cli/web/page.js.map +0 -1
- package/dist/cli/web/server.js +0 -1191
- package/dist/cli/web/server.js.map +0 -1
- package/dist/cli/web/standby.js +0 -119
- package/dist/cli/web/standby.js.map +0 -1
- package/dist/cli/web/state.js +0 -69
- package/dist/cli/web/state.js.map +0 -1
- package/dist/cli/web/system.js +0 -66
- package/dist/cli/web/system.js.map +0 -1
- package/dist/cli/web-control.js +0 -173
- package/dist/cli/web-control.js.map +0 -1
- package/dist/config/discover.js +0 -25
- package/dist/config/discover.js.map +0 -1
- package/dist/config/duration.js +0 -17
- package/dist/config/duration.js.map +0 -1
- package/dist/config/edit.js +0 -966
- package/dist/config/edit.js.map +0 -1
- package/dist/config/errors.js +0 -29
- package/dist/config/errors.js.map +0 -1
- package/dist/config/index.js +0 -14
- package/dist/config/index.js.map +0 -1
- package/dist/config/load.js +0 -412
- package/dist/config/load.js.map +0 -1
- package/dist/config/merge.js +0 -45
- package/dist/config/merge.js.map +0 -1
- package/dist/config/model.js +0 -171
- package/dist/config/model.js.map +0 -1
- package/dist/config/paths.js +0 -31
- package/dist/config/paths.js.map +0 -1
- package/dist/config/prompt.js +0 -33
- package/dist/config/prompt.js.map +0 -1
- package/dist/config/shared-pipelines.js +0 -71
- package/dist/config/shared-pipelines.js.map +0 -1
- package/dist/config/shared-specialists.js +0 -68
- package/dist/config/shared-specialists.js.map +0 -1
- package/dist/config/shared-workflows.js +0 -71
- package/dist/config/shared-workflows.js.map +0 -1
- package/dist/config/specialist-tags.js +0 -214
- package/dist/config/specialist-tags.js.map +0 -1
- package/dist/config/tag-names.js +0 -43
- package/dist/config/tag-names.js.map +0 -1
- package/dist/config/validate.js +0 -872
- package/dist/config/validate.js.map +0 -1
- package/dist/core/artifacts.js +0 -37
- package/dist/core/artifacts.js.map +0 -1
- package/dist/core/create.js +0 -75
- package/dist/core/create.js.map +0 -1
- package/dist/core/delivery.js +0 -366
- package/dist/core/delivery.js.map +0 -1
- package/dist/core/errors.js +0 -7
- package/dist/core/errors.js.map +0 -1
- package/dist/core/ids.js +0 -99
- package/dist/core/ids.js.map +0 -1
- package/dist/core/index.js +0 -21
- package/dist/core/index.js.map +0 -1
- package/dist/core/input.js +0 -45
- package/dist/core/input.js.map +0 -1
- package/dist/core/machine.js +0 -1021
- package/dist/core/machine.js.map +0 -1
- package/dist/core/model.js +0 -460
- package/dist/core/model.js.map +0 -1
- package/dist/core/observer.js +0 -193
- package/dist/core/observer.js.map +0 -1
- package/dist/core/occupancy.js +0 -63
- package/dist/core/occupancy.js.map +0 -1
- package/dist/core/permissions.js +0 -222
- package/dist/core/permissions.js.map +0 -1
- package/dist/core/plan.js +0 -99
- package/dist/core/plan.js.map +0 -1
- package/dist/core/progress.js +0 -43
- package/dist/core/progress.js.map +0 -1
- package/dist/core/questions.js +0 -19
- package/dist/core/questions.js.map +0 -1
- package/dist/core/queue.js +0 -859
- package/dist/core/queue.js.map +0 -1
- package/dist/core/retryable.js +0 -8
- package/dist/core/retryable.js.map +0 -1
- package/dist/core/scheduler.js +0 -160
- package/dist/core/scheduler.js.map +0 -1
- package/dist/core/skip.js +0 -109
- package/dist/core/skip.js.map +0 -1
- package/dist/core/stages.js +0 -304
- package/dist/core/stages.js.map +0 -1
- package/dist/core/summary.js +0 -35
- package/dist/core/summary.js.map +0 -1
- package/dist/core/tags.js +0 -184
- package/dist/core/tags.js.map +0 -1
- package/dist/core/topology.js +0 -162
- package/dist/core/topology.js.map +0 -1
- package/dist/daemon/artifacts.js +0 -84
- package/dist/daemon/artifacts.js.map +0 -1
- package/dist/daemon/daemon.js +0 -1442
- package/dist/daemon/daemon.js.map +0 -1
- package/dist/daemon/executor.js +0 -749
- package/dist/daemon/executor.js.map +0 -1
- package/dist/daemon/helpers.js +0 -38
- package/dist/daemon/helpers.js.map +0 -1
- package/dist/daemon/index.js +0 -4
- package/dist/daemon/index.js.map +0 -1
- package/dist/daemon/logs.js +0 -69
- package/dist/daemon/logs.js.map +0 -1
- package/dist/daemon/observers.js +0 -93
- package/dist/daemon/observers.js.map +0 -1
- package/dist/daemon/patches.js +0 -76
- package/dist/daemon/patches.js.map +0 -1
- package/dist/daemon/ports.js +0 -2
- package/dist/daemon/ports.js.map +0 -1
- package/dist/daemon/processes.js +0 -98
- package/dist/daemon/processes.js.map +0 -1
- package/dist/daemon/repositories.js +0 -2
- package/dist/daemon/repositories.js.map +0 -1
- package/dist/daemon/server.js +0 -164
- package/dist/daemon/server.js.map +0 -1
- package/dist/daemon/supervisor.js +0 -140
- package/dist/daemon/supervisor.js.map +0 -1
- package/dist/daemon/timings.js +0 -23
- package/dist/daemon/timings.js.map +0 -1
- package/dist/git/delivery.js +0 -284
- package/dist/git/delivery.js.map +0 -1
- package/dist/git/index.js +0 -4
- package/dist/git/index.js.map +0 -1
- package/dist/git/runner.js +0 -60
- package/dist/git/runner.js.map +0 -1
- package/dist/git/workspace.js +0 -366
- package/dist/git/workspace.js.map +0 -1
- package/dist/mcp/host.js +0 -401
- package/dist/mcp/host.js.map +0 -1
- package/dist/mcp/index.js +0 -3
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/tools.js +0 -19
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/version.js +0 -5
- package/dist/mcp/version.js.map +0 -1
- package/dist/mcp/worker.js +0 -230
- package/dist/mcp/worker.js.map +0 -1
- package/dist/presentation/web/routes/directories.js +0 -60
- package/dist/presentation/web/routes/directories.js.map +0 -1
- package/dist/protocol/autostart.js +0 -171
- package/dist/protocol/autostart.js.map +0 -1
- package/dist/protocol/build.js +0 -38
- package/dist/protocol/build.js.map +0 -1
- package/dist/protocol/catalog.js +0 -18
- package/dist/protocol/catalog.js.map +0 -1
- package/dist/protocol/client.js +0 -83
- package/dist/protocol/client.js.map +0 -1
- package/dist/protocol/format.js +0 -477
- package/dist/protocol/format.js.map +0 -1
- package/dist/protocol/index.js +0 -11
- package/dist/protocol/index.js.map +0 -1
- package/dist/protocol/messages.js +0 -598
- package/dist/protocol/messages.js.map +0 -1
- package/dist/protocol/style.js +0 -81
- package/dist/protocol/style.js.map +0 -1
- package/dist/protocol/transcript.js +0 -49
- package/dist/protocol/transcript.js.map +0 -1
- package/dist/protocol/views.js +0 -696
- package/dist/protocol/views.js.map +0 -1
- package/dist/runtime/catalog.js +0 -117
- package/dist/runtime/catalog.js.map +0 -1
- package/dist/runtime/claude.js +0 -399
- package/dist/runtime/claude.js.map +0 -1
- package/dist/runtime/index.js +0 -34
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/message.js +0 -48
- package/dist/runtime/message.js.map +0 -1
- package/dist/runtime/naming.js +0 -69
- package/dist/runtime/naming.js.map +0 -1
- package/dist/runtime/opencode.js +0 -189
- package/dist/runtime/opencode.js.map +0 -1
- package/dist/runtime/skills.js +0 -17
- package/dist/runtime/skills.js.map +0 -1
- package/dist/runtime/transcript.js +0 -227
- package/dist/runtime/transcript.js.map +0 -1
- package/dist/runtime/types.js +0 -12
- package/dist/runtime/types.js.map +0 -1
- package/dist/runtime/which.js +0 -21
- package/dist/runtime/which.js.map +0 -1
- package/dist/store/index.js +0 -3
- package/dist/store/index.js.map +0 -1
- package/dist/store/schema.js +0 -286
- package/dist/store/schema.js.map +0 -1
- package/dist/store/store.js +0 -491
- package/dist/store/store.js.map +0 -1
- package/dist/web/assets/EntryList-CnfGgjEY.js +0 -1
- package/dist/web/assets/FilePath-C0X8-keS.js +0 -1
- package/dist/web/assets/SettingsForm-BcyBWJbn.js +0 -1
- package/dist/web/assets/SharedPipelinesGroup-a368-IQ0.js +0 -1
- package/dist/web/assets/index-B-oJ93zH.js +0 -22
- package/dist/web/assets/index-BZE36gYR.css +0 -2
- package/dist/web/assets/locales-DtRrxYzg.js +0 -1
- package/dist/web/assets/pipelines-D48ggDNe.js +0 -1
- package/dist/web/assets/queue-D8_RY4IY.js +0 -16
- package/dist/web/assets/select-J4oIrmYh.js +0 -1
- package/dist/web/assets/settings-B0-0Vaia.js +0 -2
- package/dist/web/assets/skeleton-CCKCQF5n.js +0 -1
- package/dist/web/assets/specialists-DH8tyluO.js +0 -1
- package/dist/web/assets/switch-CWFAgxG1.js +0 -41
- package/dist/web/assets/topology-CNQ28AB2.js +0 -7
- /package/dist/web/assets/{topology-DLioOiRN.css → pipelines-DLioOiRN.css} +0 -0
package/dist/cli/web/page.js
DELETED
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
const STYLE = String.raw `
|
|
2
|
-
:root {
|
|
3
|
-
color-scheme: light dark;
|
|
4
|
-
--bg: #f5f6f8; --panel: #ffffff; --panel-2: #eef0f4; --text: #1b1f27; --muted: #667085;
|
|
5
|
-
--line: #dfe3ea; --accent: #4f46e5; --accent-text: #ffffff;
|
|
6
|
-
--ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7;
|
|
7
|
-
--err: #b91c1c; --err-bg: #fee2e2; --run: #1d4ed8; --run-bg: #dbeafe;
|
|
8
|
-
--mute-bg: #e5e7eb; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
|
|
9
|
-
}
|
|
10
|
-
@media (prefers-color-scheme: dark) {
|
|
11
|
-
:root {
|
|
12
|
-
--bg: #0f1218; --panel: #171b23; --panel-2: #1f2430; --text: #e6e9ef; --muted: #98a2b3;
|
|
13
|
-
--line: #2a303c; --accent: #818cf8; --accent-text: #0f1218;
|
|
14
|
-
--ok: #4ade80; --ok-bg: #12301f; --warn: #fbbf24; --warn-bg: #36290c;
|
|
15
|
-
--err: #f87171; --err-bg: #3a1618; --run: #60a5fa; --run-bg: #14263f;
|
|
16
|
-
--mute-bg: #262b36; --shadow: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
* { box-sizing: border-box; }
|
|
20
|
-
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
21
|
-
code, .mono, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
|
|
22
|
-
header { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
|
|
23
|
-
header h1 { font-size: 16px; margin: 0; letter-spacing: .2px; }
|
|
24
|
-
header h1 span { color: var(--accent); }
|
|
25
|
-
.spacer { flex: 1; }
|
|
26
|
-
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
|
|
27
|
-
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
|
|
28
|
-
.conn.live i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
|
|
29
|
-
.conn.reconnecting i, .conn.polling i { background: var(--warn); }
|
|
30
|
-
.layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 53px); }
|
|
31
|
-
aside { border-right: 1px solid var(--line); padding: 14px; background: var(--panel); overflow-y: auto; }
|
|
32
|
-
main { padding: 20px; min-width: 0; }
|
|
33
|
-
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 4px 6px; }
|
|
34
|
-
.run-item { display: block; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; color: inherit; text-decoration: none; cursor: pointer; margin-bottom: 4px; }
|
|
35
|
-
.run-item:hover { background: var(--panel-2); }
|
|
36
|
-
.run-item.active { background: var(--panel-2); border-color: var(--accent); }
|
|
37
|
-
.run-item .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
|
|
38
|
-
.run-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
|
|
39
|
-
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--mute-bg); color: var(--muted); }
|
|
40
|
-
.badge.running, .badge.merging, .badge.queued { background: var(--run-bg); color: var(--run); }
|
|
41
|
-
.badge.needs_human, .badge.conflict, .badge.apply_failed { background: var(--warn-bg); color: var(--warn); }
|
|
42
|
-
.badge.failed { background: var(--err-bg); color: var(--err); }
|
|
43
|
-
.badge.merged, .badge.applied, .badge.done, .badge.delivered { background: var(--ok-bg); color: var(--ok); }
|
|
44
|
-
.badge.running::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; animation: pulse 1.2s infinite; }
|
|
45
|
-
@keyframes pulse { 50% { opacity: .25; } }
|
|
46
|
-
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
|
|
47
|
-
.run-head h2 { margin: 0 0 4px; font-size: 20px; }
|
|
48
|
-
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
|
|
49
|
-
.meta b { color: var(--text); font-weight: 600; }
|
|
50
|
-
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
|
|
51
|
-
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; }
|
|
52
|
-
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
|
|
53
|
-
button.btn { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
|
|
54
|
-
button.btn:hover { background: var(--panel-2); }
|
|
55
|
-
button.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
|
|
56
|
-
button.btn.danger { color: var(--err); }
|
|
57
|
-
button.btn:disabled { opacity: .5; cursor: default; }
|
|
58
|
-
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
|
|
59
|
-
.group { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
|
|
60
|
-
.group:hover, .group.active { border-color: var(--accent); }
|
|
61
|
-
.group.attention { border-left: 4px solid var(--warn); }
|
|
62
|
-
.group.bad { border-left: 4px solid var(--err); }
|
|
63
|
-
.group .title { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
|
|
64
|
-
.group .line { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
|
|
65
|
-
.question { background: var(--warn-bg); color: var(--text); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
|
|
66
|
-
.reason { background: var(--err-bg); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
|
|
67
|
-
.answer { display: flex; gap: 6px; }
|
|
68
|
-
.answer textarea { flex: 1; font: inherit; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 8px; resize: vertical; min-height: 36px; }
|
|
69
|
-
.panel { margin-top: 18px; }
|
|
70
|
-
.panel h3 { margin: 0 0 8px; }
|
|
71
|
-
.timeline { list-style: none; margin: 10px 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
|
|
72
|
-
.timeline li { position: relative; margin-bottom: 12px; padding-left: 12px; }
|
|
73
|
-
.timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
|
|
74
|
-
.timeline .head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
|
|
75
|
-
.timeline .body { color: var(--muted); white-space: pre-wrap; margin-top: 3px; }
|
|
76
|
-
pre.log { background: #0b0e13; color: #d6dbe4; padding: 12px; border-radius: 10px; max-height: 420px; overflow: auto; font-size: 12px; margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
|
|
77
|
-
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
|
|
78
|
-
.empty code { background: var(--panel-2); padding: 3px 8px; border-radius: 6px; color: var(--text); }
|
|
79
|
-
.warn { color: var(--warn); }
|
|
80
|
-
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; }
|
|
81
|
-
.toast.error { background: var(--err); color: #fff; }
|
|
82
|
-
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); max-width: 460px; }
|
|
83
|
-
dialog::backdrop { background: rgba(0,0,0,.45); }
|
|
84
|
-
dialog ul { padding-left: 18px; margin: 8px 0; }
|
|
85
|
-
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
|
|
86
|
-
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } aside { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; } }
|
|
87
|
-
`;
|
|
88
|
-
const SCRIPT = String.raw `
|
|
89
|
-
(function () {
|
|
90
|
-
'use strict';
|
|
91
|
-
var state = { runs: {}, runId: null, slug: null, filter: 'all', conn: 'reconnecting', detail: null, drafts: {} };
|
|
92
|
-
var $ = function (id) { return document.getElementById(id); };
|
|
93
|
-
var ATTENTION = { needs_human: 1, conflict: 1 };
|
|
94
|
-
|
|
95
|
-
function h(tag, attrs, children) {
|
|
96
|
-
var el = document.createElement(tag);
|
|
97
|
-
if (attrs) for (var k in attrs) {
|
|
98
|
-
var v = attrs[k];
|
|
99
|
-
if (v === null || v === undefined || v === false) continue;
|
|
100
|
-
if (k === 'class') el.className = v;
|
|
101
|
-
else if (k.slice(0, 2) === 'on') el.addEventListener(k.slice(2), v);
|
|
102
|
-
else el.setAttribute(k, v === true ? '' : v);
|
|
103
|
-
}
|
|
104
|
-
[].concat(children === undefined ? [] : children).forEach(function (c) {
|
|
105
|
-
if (c === null || c === undefined || c === false) return;
|
|
106
|
-
el.appendChild(typeof c === 'object' ? c : document.createTextNode(String(c)));
|
|
107
|
-
});
|
|
108
|
-
return el;
|
|
109
|
-
}
|
|
110
|
-
function badge(text) { return h('span', { class: 'badge ' + text }, String(text).replace('_', ' ')); }
|
|
111
|
-
function secs(ms) {
|
|
112
|
-
var s = Math.max(0, Math.round(ms / 1000));
|
|
113
|
-
if (s < 60) return s + 's';
|
|
114
|
-
var m = Math.floor(s / 60);
|
|
115
|
-
if (m < 60) return m + 'm ' + (s % 60) + 's';
|
|
116
|
-
return Math.floor(m / 60) + 'h ' + (m % 60) + 'm';
|
|
117
|
-
}
|
|
118
|
-
function usage(u) {
|
|
119
|
-
if (!u) return '—';
|
|
120
|
-
var t = u.inputTokens + u.outputTokens;
|
|
121
|
-
var tokens = t >= 1000 ? (t / 1000).toFixed(1) + 'k tok' : t + ' tok';
|
|
122
|
-
return u.costUsd === null ? tokens : tokens + ' · $' + u.costUsd.toFixed(2);
|
|
123
|
-
}
|
|
124
|
-
function runDuration(run) { return secs((run.finishedAt || Date.now()) - run.createdAt); }
|
|
125
|
-
|
|
126
|
-
function toast(text, error) {
|
|
127
|
-
var el = h('div', { class: 'toast' + (error ? ' error' : ''), role: 'status' }, text);
|
|
128
|
-
document.body.appendChild(el);
|
|
129
|
-
setTimeout(function () { el.remove(); }, error ? 7000 : 3000);
|
|
130
|
-
}
|
|
131
|
-
function api(method, path, body) {
|
|
132
|
-
var options = { method: method, headers: {} };
|
|
133
|
-
if (body !== undefined) { options.headers['content-type'] = 'application/json'; options.body = JSON.stringify(body); }
|
|
134
|
-
return fetch(path, options).then(function (r) {
|
|
135
|
-
return r.json().then(function (data) {
|
|
136
|
-
if (!r.ok) throw new Error(data.error || ('HTTP ' + r.status));
|
|
137
|
-
return data;
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
function act(label, path, body) {
|
|
142
|
-
return api('POST', path, body).then(function (data) { toast(label + ': ok'); refreshDetail(); return data; })
|
|
143
|
-
.catch(function (e) { toast(label + ': ' + e.message, true); });
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function sortedRuns() {
|
|
147
|
-
return Object.keys(state.runs).map(function (k) { return state.runs[k]; })
|
|
148
|
-
.sort(function (a, b) { return b.createdAt - a.createdAt; });
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function renderConn() {
|
|
152
|
-
var el = $('conn');
|
|
153
|
-
el.className = 'conn ' + state.conn;
|
|
154
|
-
$('conn-text').textContent = { live: 'live', reconnecting: 'reconnecting…', polling: 'polling' }[state.conn];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function renderSidebar() {
|
|
158
|
-
var box = $('runs');
|
|
159
|
-
box.textContent = '';
|
|
160
|
-
var runs = sortedRuns();
|
|
161
|
-
var groups = [['Active', runs.filter(function (r) { return !r.finished; })], ['Finished', runs.filter(function (r) { return r.finished; })]];
|
|
162
|
-
groups.forEach(function (g) {
|
|
163
|
-
if (!g[1].length) return;
|
|
164
|
-
box.appendChild(h('div', { class: 'section-title' }, g[0]));
|
|
165
|
-
g[1].forEach(function (run) {
|
|
166
|
-
var needs = run.groups.some(function (x) { return x.status === 'needs_human'; });
|
|
167
|
-
box.appendChild(h('a', {
|
|
168
|
-
class: 'run-item' + (run.id === state.runId ? ' active' : ''),
|
|
169
|
-
href: '#' + run.id,
|
|
170
|
-
}, [
|
|
171
|
-
h('div', { class: 'top' }, [h('span', null, run.workflow), needs ? badge('needs_human') : null]),
|
|
172
|
-
h('div', { class: 'sub' }, [h('span', { class: 'mono' }, run.id), h('span', null, usage(run.usage))]),
|
|
173
|
-
h('div', { class: 'sub' }, [h('span', null, run.counts || '—'), h('span', null, runDuration(run))]),
|
|
174
|
-
]));
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function groupCard(run, g) {
|
|
180
|
-
var cls = 'card group' + (ATTENTION[g.status] ? ' attention' : '') + (g.status === 'failed' ? ' bad' : '') + (g.slug === state.slug ? ' active' : '');
|
|
181
|
-
var children = [
|
|
182
|
-
h('div', { class: 'title' }, [h('span', null, g.title), badge(g.status)]),
|
|
183
|
-
h('div', { class: 'line' }, [
|
|
184
|
-
h('span', { class: 'mono' }, g.slug),
|
|
185
|
-
g.step ? h('span', null, g.step + (g.round !== null ? ' · round ' + g.round : '')) : null,
|
|
186
|
-
h('span', null, secs(g.durationMs)),
|
|
187
|
-
g.status === 'merged' ? h('span', null, 'delivery: ' + g.delivery) : null,
|
|
188
|
-
g.warnings ? h('span', { class: 'warn' }, '⚠ ' + g.warnings) : null,
|
|
189
|
-
]),
|
|
190
|
-
];
|
|
191
|
-
if (g.question) children.push(h('div', { class: 'question' }, g.question));
|
|
192
|
-
if (g.reason) children.push(h('div', { class: 'reason' }, g.reason));
|
|
193
|
-
if (g.status === 'needs_human' && g.question) {
|
|
194
|
-
var draftKey = run.id + '/' + g.slug;
|
|
195
|
-
var area = h('textarea', { id: 'draft-' + draftKey, placeholder: 'Your answer…', rows: '2' });
|
|
196
|
-
area.value = state.drafts[draftKey] || '';
|
|
197
|
-
area.addEventListener('input', function () { state.drafts[draftKey] = area.value; });
|
|
198
|
-
area.addEventListener('click', function (e) { e.stopPropagation(); });
|
|
199
|
-
children.push(h('div', { class: 'answer' }, [area, h('button', { class: 'btn primary', onclick: function (e) {
|
|
200
|
-
e.stopPropagation();
|
|
201
|
-
if (!area.value.trim()) return;
|
|
202
|
-
var sent = area.value;
|
|
203
|
-
act('answer', base(run.id, g.slug) + '/answer', { answer: sent }).then(function (ok) { if (ok) delete state.drafts[draftKey]; });
|
|
204
|
-
} }, 'Send')]));
|
|
205
|
-
}
|
|
206
|
-
var actions = [];
|
|
207
|
-
if (g.status === 'failed' || g.status === 'conflict')
|
|
208
|
-
actions.push(h('button', { class: 'btn', onclick: function (e) { e.stopPropagation(); act('retry', base(run.id, g.slug) + '/retry', {}); } }, 'Retry'));
|
|
209
|
-
if (!{ merged: 1, failed: 1, cancelled: 1 }[g.status])
|
|
210
|
-
actions.push(h('button', { class: 'btn danger', onclick: function (e) { e.stopPropagation(); act('cancel', base(run.id, g.slug) + '/cancel', {}); } }, 'Cancel'));
|
|
211
|
-
if (actions.length) children.push(h('div', { class: 'answer' }, actions));
|
|
212
|
-
return h('div', { class: cls, onclick: function () { location.hash = run.id + '/' + g.slug; } }, children);
|
|
213
|
-
}
|
|
214
|
-
function base(runId, slug) { return '/api/runs/' + encodeURIComponent(runId) + '/groups/' + encodeURIComponent(slug); }
|
|
215
|
-
|
|
216
|
-
function renderRun() {
|
|
217
|
-
var main = $('main');
|
|
218
|
-
var run = state.runs[state.runId];
|
|
219
|
-
main.textContent = '';
|
|
220
|
-
if (!sortedRuns().length) {
|
|
221
|
-
main.appendChild(h('div', { class: 'empty' }, [h('h2', null, 'No runs yet'), h('p', null, ['Start one from a repository: ', h('code', null, 'aip run <workflow> --task "…"')])]));
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (!run) { main.appendChild(h('div', { class: 'empty' }, 'Select a run on the left.')); return; }
|
|
225
|
-
var finished = run.finished;
|
|
226
|
-
main.appendChild(h('div', { class: 'card run-head' }, [
|
|
227
|
-
h('h2', null, [run.workflow + ' ', badge(finished ? 'done' : 'running')]),
|
|
228
|
-
h('div', { class: 'meta' }, [
|
|
229
|
-
h('span', null, ['id ', h('b', { class: 'mono' }, run.id)]),
|
|
230
|
-
h('span', null, ['branch ', h('b', { class: 'mono' }, run.branch)]),
|
|
231
|
-
h('span', null, ['repo ', h('b', { class: 'mono' }, run.repository)]),
|
|
232
|
-
h('span', null, ['time ', h('b', { id: 'timer' }, runDuration(run))]),
|
|
233
|
-
h('span', null, ['usage ', h('b', null, usage(run.usage))]),
|
|
234
|
-
h('span', null, ['groups ', h('b', null, run.counts || '—')]),
|
|
235
|
-
h('span', null, ['delivery ', h('b', null, run.delivery.applied + ' applied · ' + run.delivery.merged + ' ready' + (run.delivery.failed ? ' · ' + run.delivery.failed + ' failed' : '') + (run.delivery.inProgress ? ' · in progress' : ''))]),
|
|
236
|
-
]),
|
|
237
|
-
run.dirtyWarning ? h('p', { class: 'warn' }, '⚠ The working tree had uncommitted changes when the run started.') : null,
|
|
238
|
-
run.split ? h('p', null, ['Split step: ', badge(run.split.status), run.split.question ? ' ' + run.split.question : '', run.split.reason ? ' ' + run.split.reason : '']) : null,
|
|
239
|
-
]));
|
|
240
|
-
|
|
241
|
-
var bar = h('div', { class: 'toolbar' });
|
|
242
|
-
['all', 'running', 'needs_human', 'conflict', 'failed', 'merged', 'cancelled'].forEach(function (f) {
|
|
243
|
-
bar.appendChild(h('button', { class: 'chip' + (state.filter === f ? ' on' : ''), onclick: function () { state.filter = f; renderRun(); } }, f.replace('_', ' ')));
|
|
244
|
-
});
|
|
245
|
-
bar.appendChild(h('span', { class: 'spacer' }));
|
|
246
|
-
var ready = run.delivery.merged > run.delivery.applied || run.delivery.failed > 0;
|
|
247
|
-
bar.appendChild(h('button', { class: 'btn primary', disabled: !ready, onclick: function () { doApply(run, false); } }, 'Apply merged'));
|
|
248
|
-
bar.appendChild(h('button', { class: 'btn', disabled: !ready, onclick: function () { doApply(run, true); } }, 'Apply --force…'));
|
|
249
|
-
if (!finished) bar.appendChild(h('button', { class: 'btn danger', onclick: function () { if (confirm('Cancel the whole run?')) act('cancel run', '/api/runs/' + encodeURIComponent(run.id) + '/cancel', {}); } }, 'Cancel run'));
|
|
250
|
-
main.appendChild(bar);
|
|
251
|
-
|
|
252
|
-
var rank = function (g) { return g.status === 'needs_human' ? 0 : g.status === 'conflict' || g.status === 'failed' ? 1 : 2; };
|
|
253
|
-
var list = run.groups.filter(function (g) { return state.filter === 'all' || g.status === state.filter; })
|
|
254
|
-
.sort(function (a, b) { return rank(a) - rank(b); });
|
|
255
|
-
var grid = h('div', { class: 'grid' });
|
|
256
|
-
list.forEach(function (g) { grid.appendChild(groupCard(run, g)); });
|
|
257
|
-
if (!list.length) grid.appendChild(h('div', { class: 'empty' }, 'No groups with this status.'));
|
|
258
|
-
main.appendChild(grid);
|
|
259
|
-
main.appendChild(h('div', { id: 'detail', class: 'panel' }));
|
|
260
|
-
renderDetail();
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
function doApply(run, force) {
|
|
264
|
-
var path = '/api/runs/' + encodeURIComponent(run.id) + '/apply';
|
|
265
|
-
if (!force) { act('apply', path, {}); return; }
|
|
266
|
-
var files = [], reasons = [];
|
|
267
|
-
Promise.all(run.groups.filter(function (g) { return g.status === 'merged' && g.delivery === 'apply_failed'; }).map(function (g) {
|
|
268
|
-
return api('GET', base(run.id, g.slug) + '?tail=1').then(function (v) {
|
|
269
|
-
if (v.delivery.reason) reasons.push(g.slug + ': ' + v.delivery.reason);
|
|
270
|
-
files = files.concat(v.delivery.files || []);
|
|
271
|
-
});
|
|
272
|
-
})).catch(function () {}).then(function () {
|
|
273
|
-
var dlg = h('dialog', null, [
|
|
274
|
-
h('h3', null, 'Apply with --force?'),
|
|
275
|
-
h('p', null, 'Conflict markers will be left in your working tree.'),
|
|
276
|
-
reasons.length ? h('p', { class: 'reason' }, reasons.join('\n')) : null,
|
|
277
|
-
files.length ? h('ul', { class: 'mono' }, files.filter(function (f, i) { return files.indexOf(f) === i; }).map(function (f) { return h('li', null, f); })) : null,
|
|
278
|
-
h('div', { class: 'dialog-actions' }, [
|
|
279
|
-
h('button', { class: 'btn', onclick: function () { dlg.close(); dlg.remove(); } }, 'Cancel'),
|
|
280
|
-
h('button', { class: 'btn danger', onclick: function () { dlg.close(); dlg.remove(); act('apply --force', path, { force: true }); } }, 'Apply anyway'),
|
|
281
|
-
]),
|
|
282
|
-
]);
|
|
283
|
-
document.body.appendChild(dlg);
|
|
284
|
-
dlg.showModal();
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function renderDetail() {
|
|
289
|
-
var box = $('detail');
|
|
290
|
-
if (!box) return;
|
|
291
|
-
captureLog();
|
|
292
|
-
box.textContent = '';
|
|
293
|
-
var d = state.detail;
|
|
294
|
-
if (!state.slug || !d || d.slug !== state.slug || d.runId !== state.runId) return;
|
|
295
|
-
var card = h('div', { class: 'card' }, [
|
|
296
|
-
h('h3', null, [d.title + ' ', badge(d.status)]),
|
|
297
|
-
h('div', { class: 'meta' }, [
|
|
298
|
-
h('span', null, ['task ', h('b', null, d.task)]),
|
|
299
|
-
h('span', null, ['branch ', h('b', { class: 'mono' }, d.branch)]),
|
|
300
|
-
h('span', null, ['usage ', h('b', null, usage(d.usage))]),
|
|
301
|
-
h('span', null, ['delivery ', h('b', null, d.delivery.state)]),
|
|
302
|
-
]),
|
|
303
|
-
d.warnings.length ? h('ul', { class: 'warn' }, d.warnings.map(function (w) { return h('li', null, w); })) : null,
|
|
304
|
-
d.conflictFiles.length ? h('div', { class: 'reason' }, 'Conflicts: ' + d.conflictFiles.join(', ')) : null,
|
|
305
|
-
h('ol', { class: 'timeline' }, d.attempts.map(function (a) {
|
|
306
|
-
return h('li', null, [
|
|
307
|
-
h('div', { class: 'head' }, [
|
|
308
|
-
h('b', null, '#' + a.seq + ' ' + a.stepId + ' · round ' + a.round),
|
|
309
|
-
h('span', null, a.specialist),
|
|
310
|
-
h('span', { class: 'mono' }, a.runtime + (a.model ? ' ' + a.model : '')),
|
|
311
|
-
badge(a.verdict || a.status),
|
|
312
|
-
h('span', null, secs(a.durationMs) + ' · ' + usage(a.usage)),
|
|
313
|
-
]),
|
|
314
|
-
a.summary ? h('div', { class: 'body' }, a.summary) : null,
|
|
315
|
-
a.feedback ? h('div', { class: 'body' }, 'Feedback: ' + a.feedback) : null,
|
|
316
|
-
a.reason ? h('div', { class: 'reason' }, a.reason) : null,
|
|
317
|
-
]);
|
|
318
|
-
})),
|
|
319
|
-
h('b', null, 'Log' + (d.log ? ' (tail)' : '')),
|
|
320
|
-
h('pre', { class: 'log', id: 'log', 'data-key': state.runId + '/' + state.slug }, d.log ? d.log.lines.join('\n') : 'No log yet.'),
|
|
321
|
-
]);
|
|
322
|
-
box.appendChild(card);
|
|
323
|
-
var log = $('log');
|
|
324
|
-
var view = state.logView;
|
|
325
|
-
if (view && view.key === state.runId + '/' + state.slug && !view.bottom) log.scrollTop = view.top;
|
|
326
|
-
else log.scrollTop = log.scrollHeight;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
function captureLog() {
|
|
330
|
-
var el = $('log');
|
|
331
|
-
if (!el) return;
|
|
332
|
-
state.logView = {
|
|
333
|
-
key: el.getAttribute('data-key'),
|
|
334
|
-
top: el.scrollTop,
|
|
335
|
-
bottom: el.scrollTop + el.clientHeight >= el.scrollHeight - 4,
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
var detailTimer = null;
|
|
340
|
-
function refreshDetail() {
|
|
341
|
-
clearTimeout(detailTimer);
|
|
342
|
-
if (!state.runId || !state.slug) return;
|
|
343
|
-
var runId = state.runId, slug = state.slug;
|
|
344
|
-
detailTimer = setTimeout(function () {
|
|
345
|
-
api('GET', base(runId, slug) + '?tail=200').then(function (d) {
|
|
346
|
-
if (runId !== state.runId || slug !== state.slug) return;
|
|
347
|
-
state.detail = d;
|
|
348
|
-
renderDetail();
|
|
349
|
-
}).catch(function () {});
|
|
350
|
-
}, 150);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
var known = {};
|
|
354
|
-
function notify(run) {
|
|
355
|
-
run.groups.forEach(function (g) {
|
|
356
|
-
var key = run.id + '/' + g.slug;
|
|
357
|
-
var before = known[key];
|
|
358
|
-
known[key] = g.status;
|
|
359
|
-
if (before === undefined || before === g.status) return;
|
|
360
|
-
if (g.status !== 'needs_human' && g.status !== 'failed') return;
|
|
361
|
-
toast(g.title + ': ' + g.status.replace('_', ' '), g.status === 'failed');
|
|
362
|
-
if (window.Notification && Notification.permission === 'granted' && document.hidden)
|
|
363
|
-
new Notification('aip: ' + g.title, { body: g.status.replace('_', ' ') });
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function applyRoute() {
|
|
368
|
-
var parts = location.hash.slice(1).split('/');
|
|
369
|
-
state.runId = parts[0] ? decodeURIComponent(parts[0]) : null;
|
|
370
|
-
state.slug = parts[1] ? decodeURIComponent(parts[1]) : null;
|
|
371
|
-
if (!state.runId) { var first = sortedRuns()[0]; if (first) { state.runId = first.id; } }
|
|
372
|
-
state.detail = null;
|
|
373
|
-
state.logView = null;
|
|
374
|
-
render();
|
|
375
|
-
refreshDetail();
|
|
376
|
-
}
|
|
377
|
-
function render() {
|
|
378
|
-
renderConn(); renderSidebar();
|
|
379
|
-
var active = document.activeElement;
|
|
380
|
-
var focusId = active && active.tagName === 'TEXTAREA' ? active.id : null;
|
|
381
|
-
var start = focusId ? active.selectionStart : 0, end = focusId ? active.selectionEnd : 0;
|
|
382
|
-
captureLog();
|
|
383
|
-
renderRun();
|
|
384
|
-
if (focusId) {
|
|
385
|
-
var again = document.getElementById(focusId);
|
|
386
|
-
if (again) { again.focus(); again.setSelectionRange(start, end); }
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function onEvent(event) {
|
|
391
|
-
if (event.event === 'snapshot') {
|
|
392
|
-
state.runs = {};
|
|
393
|
-
event.runs.forEach(function (r) { state.runs[r.id] = r; notify(r); });
|
|
394
|
-
if (!state.runId) { var first = sortedRuns()[0]; if (first) state.runId = first.id; }
|
|
395
|
-
} else {
|
|
396
|
-
state.runs[event.run.id] = event.run;
|
|
397
|
-
notify(event.run);
|
|
398
|
-
}
|
|
399
|
-
render();
|
|
400
|
-
if (event.event === 'snapshot' || (event.run && event.run.id === state.runId)) refreshDetail();
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
var source = null, pollTimer = null;
|
|
404
|
-
function poll() {
|
|
405
|
-
api('GET', '/api/runs').then(function (runs) {
|
|
406
|
-
state.runs = {};
|
|
407
|
-
runs.forEach(function (r) { state.runs[r.id] = r; notify(r); });
|
|
408
|
-
render();
|
|
409
|
-
}).catch(function () {});
|
|
410
|
-
}
|
|
411
|
-
function connect() {
|
|
412
|
-
source = new EventSource('/api/events');
|
|
413
|
-
source.onopen = function () { state.conn = 'live'; clearInterval(pollTimer); pollTimer = null; renderConn(); };
|
|
414
|
-
source.onmessage = function (m) { try { onEvent(JSON.parse(m.data)); } catch (e) {} };
|
|
415
|
-
source.onerror = function () {
|
|
416
|
-
state.conn = 'reconnecting'; renderConn();
|
|
417
|
-
if (!pollTimer) pollTimer = setInterval(function () { state.conn = 'polling'; renderConn(); poll(); }, 2000);
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
$('notify').addEventListener('click', function () {
|
|
422
|
-
if (window.Notification) Notification.requestPermission().then(function (p) { toast('Notifications: ' + p); });
|
|
423
|
-
});
|
|
424
|
-
window.addEventListener('hashchange', applyRoute);
|
|
425
|
-
var ticks = 0;
|
|
426
|
-
setInterval(function () {
|
|
427
|
-
var run = state.runs[state.runId];
|
|
428
|
-
var timer = $('timer');
|
|
429
|
-
if (run && timer && !run.finished) timer.textContent = runDuration(run);
|
|
430
|
-
if (++ticks % 3 === 0) {
|
|
431
|
-
var g = state.detail;
|
|
432
|
-
if (g && (g.status === 'running' || g.status === 'merging')) refreshDetail();
|
|
433
|
-
}
|
|
434
|
-
}, 1000);
|
|
435
|
-
render();
|
|
436
|
-
connect();
|
|
437
|
-
applyRoute();
|
|
438
|
-
})();
|
|
439
|
-
`;
|
|
440
|
-
export function renderPage() {
|
|
441
|
-
return `<!doctype html>
|
|
442
|
-
<html lang="en">
|
|
443
|
-
<head>
|
|
444
|
-
<meta charset="utf-8">
|
|
445
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
446
|
-
<title>aip · runs</title>
|
|
447
|
-
<style>${STYLE}</style>
|
|
448
|
-
</head>
|
|
449
|
-
<body>
|
|
450
|
-
<header>
|
|
451
|
-
<h1>aip <span>web</span></h1>
|
|
452
|
-
<span class="spacer"></span>
|
|
453
|
-
<span id="conn" class="conn reconnecting"><i></i><span id="conn-text">reconnecting…</span></span>
|
|
454
|
-
<button id="notify" class="btn" type="button">Notify me</button>
|
|
455
|
-
</header>
|
|
456
|
-
<div class="layout">
|
|
457
|
-
<aside id="runs" aria-label="Runs"></aside>
|
|
458
|
-
<main id="main"></main>
|
|
459
|
-
</div>
|
|
460
|
-
<script>${SCRIPT}</script>
|
|
461
|
-
</body>
|
|
462
|
-
</html>
|
|
463
|
-
`;
|
|
464
|
-
}
|
|
465
|
-
//# sourceMappingURL=page.js.map
|
package/dist/cli/web/page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/cli/web/page.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFvB,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+VxB,CAAC;AAEF,MAAM,UAAU,UAAU;IACxB,OAAO;;;;;;SAMA,KAAK;;;;;;;;;;;;;UAaJ,MAAM;;;CAGf,CAAC;AACF,CAAC"}
|