agor-live 0.18.0 → 0.19.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/cli/commands/admin/sync-unix.js +8 -7
- package/dist/cli/commands/board/add-session.js +2 -2
- package/dist/cli/commands/board/list.js +2 -2
- package/dist/cli/commands/config/index.js +1 -4
- package/dist/cli/commands/daemon/start.js +14 -21
- package/dist/cli/commands/init.d.ts +0 -7
- package/dist/cli/commands/init.js +0 -48
- package/dist/cli/commands/mcp/add.js +2 -1
- package/dist/cli/commands/mcp/list.js +2 -1
- package/dist/cli/commands/mcp/show.js +2 -1
- package/dist/cli/commands/repo/list.js +3 -3
- package/dist/cli/commands/session/list.js +4 -4
- package/dist/cli/commands/session/load-claude.js +2 -2
- package/dist/cli/commands/user/create-admin.js +4 -3
- package/dist/cli/commands/user/create.js +2 -1
- package/dist/cli/commands/user/delete.js +3 -2
- package/dist/cli/commands/user/list.js +3 -3
- package/dist/cli/commands/user/update.js +2 -1
- package/dist/cli/commands/worktree/archive.js +2 -2
- package/dist/cli/commands/worktree/env/restart.js +2 -2
- package/dist/cli/commands/worktree/env/start.js +2 -2
- package/dist/cli/commands/worktree/env/status.js +5 -5
- package/dist/cli/commands/worktree/env/stop.js +2 -2
- package/dist/cli/commands/worktree/list.js +3 -3
- package/dist/cli/commands/worktree/rm.js +2 -2
- package/dist/cli/commands/worktree/show.js +4 -4
- package/dist/cli/commands/worktree/unarchive.js +2 -2
- package/dist/cli/commands/worktree/update.js +2 -2
- package/dist/core/agentic-tool-BAtzuXc2.d.ts +160 -0
- package/dist/core/agentic-tool-vj-LbG7d.d.cts +160 -0
- package/dist/core/api/index.d.cts +11 -11
- package/dist/core/api/index.d.ts +11 -11
- package/dist/core/artifact-CwOIEAtk.d.ts +341 -0
- package/dist/core/artifact-EWpl9Fy-.d.cts +341 -0
- package/dist/core/board-DCbkV8cD.d.cts +331 -0
- package/dist/core/board-DFq6HVW2.d.ts +331 -0
- package/dist/core/board-comment-C4ff0Zm4.d.ts +140 -0
- package/dist/core/board-comment-WCxmIQN9.d.cts +140 -0
- package/dist/core/callbacks/child-completion-template.d.cts +4 -2
- package/dist/core/callbacks/child-completion-template.d.ts +4 -2
- package/dist/core/claude/index.cjs +111 -23
- package/dist/core/claude/index.d.cts +3 -3
- package/dist/core/claude/index.d.ts +3 -3
- package/dist/core/claude/index.js +112 -23
- package/dist/core/claude-cli/index.cjs +417 -0
- package/dist/core/claude-cli/index.d.cts +602 -0
- package/dist/core/claude-cli/index.d.ts +602 -0
- package/dist/core/claude-cli/index.js +368 -0
- package/dist/core/client/claude-system-suppression.cjs +59 -0
- package/dist/core/client/claude-system-suppression.d.cts +80 -0
- package/dist/core/client/claude-system-suppression.d.ts +80 -0
- package/dist/core/client/claude-system-suppression.js +32 -0
- package/dist/core/client/index.cjs +151 -8
- package/dist/core/client/index.d.cts +16 -15
- package/dist/core/client/index.d.ts +16 -15
- package/dist/core/client/index.js +145 -8
- package/dist/core/client-CCmYJ9Az.d.ts +10903 -0
- package/dist/core/client-FomwRgz2.d.cts +10903 -0
- package/dist/core/config/browser.d.cts +7 -7
- package/dist/core/config/browser.d.ts +7 -7
- package/dist/core/config/index.cjs +218 -62
- package/dist/core/config/index.d.cts +57 -27
- package/dist/core/config/index.d.ts +57 -27
- package/dist/core/config/index.js +217 -63
- package/dist/core/config-manager-BYpxBsRN.d.ts +304 -0
- package/dist/core/config-manager-PL-TtKA-.d.cts +304 -0
- package/dist/core/config-services-DXwDwzJT.d.ts +183 -0
- package/dist/core/config-services-Ps5m3_dV.d.cts +183 -0
- package/dist/core/db/index.cjs +253 -229
- package/dist/core/db/index.d.cts +197 -60
- package/dist/core/db/index.d.ts +197 -60
- package/dist/core/db/index.js +253 -230
- package/dist/core/db/session-guard.cjs +16 -3
- package/dist/core/db/session-guard.d.cts +9 -9
- package/dist/core/db/session-guard.d.ts +9 -9
- package/dist/core/db/session-guard.js +14 -3
- package/dist/core/environment/render-snapshot.d.cts +2 -2
- package/dist/core/environment/render-snapshot.d.ts +2 -2
- package/dist/core/environment/variable-resolver.d.cts +2 -2
- package/dist/core/environment/variable-resolver.d.ts +2 -2
- package/dist/core/feathers-D7hbydzb.d.cts +263 -0
- package/dist/core/feathers-I2puuu1Z.d.ts +263 -0
- package/dist/core/gateway/index.cjs +219 -24
- package/dist/core/gateway/index.d.cts +52 -12
- package/dist/core/gateway/index.d.ts +52 -12
- package/dist/core/gateway/index.js +218 -24
- package/dist/core/gateway-CM948go5.d.cts +99 -0
- package/dist/core/gateway-CmKjdtun.d.ts +99 -0
- package/dist/core/git/index.cjs +81 -6
- package/dist/core/git/index.d.cts +8 -8
- package/dist/core/git/index.d.ts +8 -8
- package/dist/core/git/index.js +82 -7
- package/dist/core/id-BU9u1F2h.d.cts +275 -0
- package/dist/core/id-BU9u1F2h.d.ts +275 -0
- package/dist/core/index.cjs +423 -312
- package/dist/core/index.d.cts +21 -21
- package/dist/core/index.d.ts +21 -21
- package/dist/core/index.js +422 -317
- package/dist/core/mcp/index.cjs +94 -10
- package/dist/core/mcp/index.d.cts +2 -2
- package/dist/core/mcp/index.d.ts +2 -2
- package/dist/core/mcp/index.js +95 -11
- package/dist/core/mcp-BoR5nOM-.d.ts +222 -0
- package/dist/core/mcp-CCfhpnmz.d.cts +222 -0
- package/dist/core/message-B1DnD42i.d.ts +309 -0
- package/dist/core/message-DcFMNTWt.d.cts +309 -0
- package/dist/core/models/index.d.cts +4 -4
- package/dist/core/models/index.d.ts +4 -4
- package/dist/core/package.json +63 -0
- package/dist/core/permissions/index.cjs +14 -1
- package/dist/core/permissions/index.d.cts +2 -2
- package/dist/core/permissions/index.d.ts +2 -2
- package/dist/core/permissions/index.js +14 -1
- package/dist/core/repo-D48v19MZ.d.ts +958 -0
- package/dist/core/repo-myh6r85d.d.cts +958 -0
- package/dist/core/resolve-config-5BgPkx51.d.ts +74 -0
- package/dist/core/resolve-config-CtAL_o01.d.cts +74 -0
- package/dist/core/sdk/index.d.cts +1 -1
- package/dist/core/sdk/index.d.ts +1 -1
- package/dist/core/seed/index.cjs +286 -181
- package/dist/core/seed/index.d.cts +1 -1
- package/dist/core/seed/index.d.ts +1 -1
- package/dist/core/seed/index.js +288 -183
- package/dist/core/session-BoT899a5.d.ts +496 -0
- package/dist/core/session-Y9HKmY1Y.d.cts +496 -0
- package/dist/core/session-guard-C6TNTcP5.d.ts +264 -0
- package/dist/core/session-guard-DLTE-uXt.d.cts +264 -0
- package/dist/core/sessions/index.cjs +25 -12
- package/dist/core/sessions/index.d.cts +12 -8
- package/dist/core/sessions/index.d.ts +12 -8
- package/dist/core/sessions/index.js +25 -12
- package/dist/core/task-0iXWL44g.d.cts +205 -0
- package/dist/core/task-Dr0E_9It.d.ts +205 -0
- package/dist/core/templates/session-context.cjs +14 -1
- package/dist/core/templates/session-context.d.cts +5 -5
- package/dist/core/templates/session-context.d.ts +5 -5
- package/dist/core/templates/session-context.js +14 -1
- package/dist/core/tools/mcp/jwt-auth.d.cts +2 -2
- package/dist/core/tools/mcp/jwt-auth.d.ts +2 -2
- package/dist/core/tools/mcp/oauth-refresh.cjs +131 -37
- package/dist/core/tools/mcp/oauth-refresh.d.cts +9 -9
- package/dist/core/tools/mcp/oauth-refresh.d.ts +9 -9
- package/dist/core/tools/mcp/oauth-refresh.js +133 -38
- package/dist/core/types/index.cjs +37 -8
- package/dist/core/types/index.d.cts +17 -17
- package/dist/core/types/index.d.ts +17 -17
- package/dist/core/types/index.js +34 -8
- package/dist/core/types-BI50q6k9.d.cts +720 -0
- package/dist/core/types-Bd3HgLsD.d.ts +720 -0
- package/dist/core/unix/index.cjs +296 -155
- package/dist/core/unix/index.d.cts +12 -12
- package/dist/core/unix/index.d.ts +12 -12
- package/dist/core/unix/index.js +302 -161
- package/dist/core/user-6FVyq5Jx.d.cts +362 -0
- package/dist/core/user-Cts5-Shs.d.ts +362 -0
- package/dist/core/utils/board-placement.d.cts +3 -3
- package/dist/core/utils/board-placement.d.ts +3 -3
- package/dist/core/utils/permission-mode-mapper.cjs +32 -24
- package/dist/core/utils/permission-mode-mapper.d.cts +29 -15
- package/dist/core/utils/permission-mode-mapper.d.ts +29 -15
- package/dist/core/utils/permission-mode-mapper.js +29 -24
- package/dist/core/utils/url.cjs +8 -9
- package/dist/core/utils/url.d.cts +1 -1
- package/dist/core/utils/url.d.ts +1 -1
- package/dist/core/utils/url.js +8 -9
- package/dist/daemon/executor-tracking.d.ts +0 -7
- package/dist/daemon/executor-tracking.js +2 -1
- package/dist/daemon/index.js +3461 -1152
- package/dist/daemon/main.js +3461 -1152
- package/dist/daemon/mcp/server.js +247 -25
- package/dist/daemon/mcp/tokens.js +3 -3
- package/dist/daemon/mcp/tool-registry.js +2 -1
- package/dist/daemon/mcp/tools/analytics.js +45 -3
- package/dist/daemon/mcp/tools/artifacts.js +45 -3
- package/dist/daemon/mcp/tools/boards.js +45 -3
- package/dist/daemon/mcp/tools/card-types.js +45 -3
- package/dist/daemon/mcp/tools/cards.js +45 -3
- package/dist/daemon/mcp/tools/environment.js +45 -3
- package/dist/daemon/mcp/tools/mcp-servers.js +45 -3
- package/dist/daemon/mcp/tools/messages.js +47 -5
- package/dist/daemon/mcp/tools/proxies.js +45 -3
- package/dist/daemon/mcp/tools/repos.js +45 -3
- package/dist/daemon/mcp/tools/search.js +47 -4
- package/dist/daemon/mcp/tools/sessions.js +59 -10
- package/dist/daemon/mcp/tools/tasks.js +45 -3
- package/dist/daemon/mcp/tools/users.js +45 -3
- package/dist/daemon/mcp/tools/widgets.d.ts +29 -0
- package/dist/daemon/mcp/tools/widgets.js +14876 -0
- package/dist/daemon/mcp/tools/worktrees.js +53 -15
- package/dist/daemon/register-hooks.js +1272 -52
- package/dist/daemon/register-routes.js +1964 -374
- package/dist/daemon/register-services.js +862 -354
- package/dist/daemon/services/artifacts.js +3 -2
- package/dist/daemon/services/check-auth.d.ts +31 -0
- package/dist/daemon/services/check-auth.js +208 -0
- package/dist/daemon/services/claude-cli-integration.d.ts +158 -0
- package/dist/daemon/services/claude-cli-integration.js +1099 -0
- package/dist/daemon/services/claude-cli-watcher.d.ts +189 -0
- package/dist/daemon/services/claude-cli-watcher.js +365 -0
- package/dist/daemon/services/copilot-models.js +3 -2
- package/dist/daemon/services/gateway.js +27 -19
- package/dist/daemon/services/github-app-setup.js +2 -1
- package/dist/daemon/services/health-monitor.js +4 -5
- package/dist/daemon/services/oauth-disconnect.js +2 -1
- package/dist/daemon/services/repos.js +85 -34
- package/dist/daemon/services/sessions.js +19 -14
- package/dist/daemon/services/tasks.js +61 -42
- package/dist/daemon/services/terminals.d.ts +61 -0
- package/dist/daemon/services/terminals.js +350 -26
- package/dist/daemon/services/user-api-keys.js +3 -6
- package/dist/daemon/services/worktree-owners.js +74 -15
- package/dist/daemon/services/worktrees.js +103 -47
- package/dist/daemon/setup/database.js +37 -4
- package/dist/daemon/setup/first-run-admin.d.ts +10 -1
- package/dist/daemon/setup/first-run-admin.js +37 -4
- package/dist/daemon/setup/index.js +45 -13
- package/dist/daemon/setup/persisted-secret.d.ts +52 -0
- package/dist/daemon/setup/persisted-secret.js +31 -0
- package/dist/daemon/setup/socketio.js +8 -9
- package/dist/daemon/startup.js +210 -21
- package/dist/daemon/utils/append-system-message.d.ts +35 -0
- package/dist/daemon/utils/append-system-message.js +36 -0
- package/dist/daemon/utils/build-initial-user-message.d.ts +47 -0
- package/dist/daemon/utils/build-initial-user-message.js +30 -0
- package/dist/daemon/utils/build-resolved-config-slice.d.ts +34 -0
- package/dist/daemon/utils/build-resolved-config-slice.js +37 -0
- package/dist/daemon/utils/git-impersonation.d.ts +39 -6
- package/dist/daemon/utils/git-impersonation.js +6 -7
- package/dist/daemon/utils/git-shell-capture.d.ts +3 -1
- package/dist/daemon/utils/git-shell-capture.js +8 -8
- package/dist/daemon/utils/mcp-probe-templates.js +1 -1
- package/dist/daemon/utils/query-params.d.ts +20 -0
- package/dist/daemon/utils/query-params.js +17 -0
- package/dist/daemon/utils/session-state-hooks.js +4 -4
- package/dist/daemon/utils/session-tasks.d.ts +43 -0
- package/dist/daemon/utils/session-tasks.js +39 -0
- package/dist/daemon/utils/spawn-executor.d.ts +20 -113
- package/dist/daemon/utils/spawn-executor.js +91 -15
- package/dist/daemon/utils/task-runner.d.ts +18 -0
- package/dist/daemon/utils/task-runner.js +2 -1
- package/dist/daemon/utils/unix-group-init.js +5 -9
- package/dist/daemon/utils/upload.js +5 -6
- package/dist/daemon/utils/worktree-authorization.js +4 -3
- package/dist/daemon/widgets/env-vars/index.d.ts +52 -0
- package/dist/daemon/widgets/env-vars/index.js +14612 -0
- package/dist/daemon/widgets/index.d.ts +25 -0
- package/dist/daemon/widgets/index.js +14782 -0
- package/dist/daemon/widgets/registry.d.ts +106 -0
- package/dist/daemon/widgets/registry.js +26 -0
- package/dist/daemon/widgets/submissions.d.ts +76 -0
- package/dist/daemon/widgets/submissions.js +166 -0
- package/dist/executor/cli.js +15 -2
- package/dist/executor/commands/git.d.ts.map +1 -1
- package/dist/executor/commands/git.js +14 -12
- package/dist/executor/commands/unix.d.ts.map +1 -1
- package/dist/executor/commands/unix.js +6 -5
- package/dist/executor/commands/zellij.d.ts.map +1 -1
- package/dist/executor/commands/zellij.js +257 -62
- package/dist/executor/config.d.ts +18 -2
- package/dist/executor/config.d.ts.map +1 -1
- package/dist/executor/config.js +27 -3
- package/dist/executor/handlers/sdk/base-executor.d.ts +1 -1
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +3 -3
- package/dist/executor/handlers/sdk/claude.d.ts +2 -0
- package/dist/executor/handlers/sdk/claude.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/claude.js +6 -17
- package/dist/executor/handlers/sdk/codex.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/codex.js +2 -1
- package/dist/executor/handlers/sdk/copilot.d.ts +2 -0
- package/dist/executor/handlers/sdk/copilot.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/copilot.js +4 -5
- package/dist/executor/handlers/sdk/gemini.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/gemini.js +2 -1
- package/dist/executor/handlers/sdk/opencode.d.ts +2 -0
- package/dist/executor/handlers/sdk/opencode.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/opencode.js +11 -19
- package/dist/executor/handlers/sdk/tool-registry.d.ts +4 -0
- package/dist/executor/handlers/sdk/tool-registry.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/tool-registry.js +5 -4
- package/dist/executor/index.d.ts +3 -0
- package/dist/executor/index.d.ts.map +1 -1
- package/dist/executor/index.js +4 -18
- package/dist/executor/payload-types.d.ts +259 -15
- package/dist/executor/payload-types.d.ts.map +1 -1
- package/dist/executor/payload-types.js +53 -3
- package/dist/executor/permissions/permission-manager.d.ts.map +1 -1
- package/dist/executor/permissions/permission-manager.js +3 -2
- package/dist/executor/permissions/permission-service.d.ts.map +1 -1
- package/dist/executor/permissions/permission-service.js +2 -1
- package/dist/executor/sdk-handlers/base/index.d.ts +1 -0
- package/dist/executor/sdk-handlers/base/index.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/index.js +1 -0
- package/dist/executor/sdk-handlers/base/service-clients.d.ts +53 -0
- package/dist/executor/sdk-handlers/base/service-clients.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/base/service-clients.js +12 -0
- package/dist/executor/sdk-handlers/base/tool.interface.d.ts +15 -1
- package/dist/executor/sdk-handlers/base/tool.interface.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/types.d.ts +1 -1
- package/dist/executor/sdk-handlers/base/types.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +4 -35
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +7 -7
- package/dist/executor/sdk-handlers/claude/constants.d.ts +32 -0
- package/dist/executor/sdk-handlers/claude/constants.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/claude/constants.js +36 -0
- package/dist/executor/sdk-handlers/claude/message-builder.d.ts +1 -1
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts +0 -5
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/message-processor.js +12 -19
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts +4 -15
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.js +4 -138
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +4 -5
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/prompt-service.js +7 -10
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +2 -3
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +24 -27
- package/dist/executor/sdk-handlers/claude/safe-message-service.d.ts +1 -1
- package/dist/executor/sdk-handlers/claude/safe-message-service.js +2 -2
- package/dist/executor/sdk-handlers/claude/session-context.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/session-context.js +4 -3
- package/dist/executor/sdk-handlers/claude-cli/index.d.ts +17 -0
- package/dist/executor/sdk-handlers/claude-cli/index.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/claude-cli/index.js +1 -0
- package/dist/executor/sdk-handlers/codex/app-server-client.d.ts +36 -0
- package/dist/executor/sdk-handlers/codex/app-server-client.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/codex/app-server-client.js +155 -0
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +1 -2
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +4 -4
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +9 -0
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +78 -16
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts +2 -3
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/copilot-tool.js +2 -2
- package/dist/executor/sdk-handlers/copilot/permission-mapper.d.ts +2 -2
- package/dist/executor/sdk-handlers/copilot/permission-mapper.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/permission-mapper.js +3 -3
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts +2 -2
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/prompt-service.js +4 -3
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +1 -2
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +3 -2
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts +15 -15
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.js +75 -73
- package/dist/ui/assets/CodeEditor.inner-xPF1At9N.js +1 -0
- package/dist/ui/assets/_basePickBy-CteUBWsh.js +1 -0
- package/dist/ui/assets/_basePickBy-CteUBWsh.js.gz +0 -0
- package/dist/ui/assets/_baseUniq-KXMAW6Wf.js +1 -0
- package/dist/ui/assets/_baseUniq-KXMAW6Wf.js.gz +0 -0
- package/dist/ui/assets/angular-html-CLFajOhw.js +1 -0
- package/dist/ui/assets/angular-html-CLFajOhw.js.gz +0 -0
- package/dist/ui/assets/angular-ts-BiV2XM7J.js +1 -0
- package/dist/ui/assets/angular-ts-BiV2XM7J.js.gz +0 -0
- package/dist/ui/assets/antd-D9Oi6gnF.js +403 -0
- package/dist/ui/assets/antd-D9Oi6gnF.js.gz +0 -0
- package/dist/ui/assets/apl-DQH0j_jv.js +1 -0
- package/dist/ui/assets/apl-DQH0j_jv.js.gz +0 -0
- package/dist/ui/assets/arc-5ILrfQ0m.js +1 -0
- package/dist/ui/assets/arc-5ILrfQ0m.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-BaL1VctM.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-CM3xKLAC.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-CM3xKLAC.js.gz +0 -0
- package/dist/ui/assets/astro-lEHCVpfT.js +1 -0
- package/dist/ui/assets/astro-lEHCVpfT.js.gz +0 -0
- package/dist/ui/assets/blade-CIHDsDvm.js +1 -0
- package/dist/ui/assets/blade-CIHDsDvm.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BazMqo3u.js +122 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BazMqo3u.js.gz +0 -0
- package/dist/ui/assets/bsl-DL3-G7Z8.js +1 -0
- package/dist/ui/assets/bsl-DL3-G7Z8.js.gz +0 -0
- package/dist/ui/assets/c-Cn3t7aTF.js +1 -0
- package/dist/ui/assets/c-Cn3t7aTF.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-BjJd-H7B.js +10 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-BjJd-H7B.js.gz +0 -0
- package/dist/ui/assets/cairo-BbIHl2iE.js +1 -0
- package/dist/ui/assets/cairo-BbIHl2iE.js.gz +0 -0
- package/dist/ui/assets/channel-DSGJP1k6.js +1 -0
- package/dist/ui/assets/chunk-4BX2VUAB-DhWiydXL.js +1 -0
- package/dist/ui/assets/chunk-55IACEB6-C2AH2dgl.js +1 -0
- package/dist/ui/assets/chunk-76Q3JFCE-gpWAIz4K.js +1 -0
- package/dist/ui/assets/chunk-ABZYJK2D-CgWq7GkD.js +81 -0
- package/dist/ui/assets/chunk-ABZYJK2D-CgWq7GkD.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DDEa3xve.js +1 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DDEa3xve.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-DvQkGYzj.js +165 -0
- package/dist/ui/assets/chunk-B4BG7PRW-DvQkGYzj.js.gz +0 -0
- package/dist/ui/assets/chunk-CVBHYZKI-C5s0Oi1k.js +1 -0
- package/dist/ui/assets/chunk-DI55MBZ5-pRKAyqf_.js +220 -0
- package/dist/ui/assets/chunk-DI55MBZ5-pRKAyqf_.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B0WSVr4_.js +1 -0
- package/dist/ui/assets/chunk-FMBD7UC4-BjUe7vZc.js +15 -0
- package/dist/ui/assets/chunk-FPAJGGOC-BUaFH3cW.js +80 -0
- package/dist/ui/assets/chunk-FPAJGGOC-BUaFH3cW.js.gz +0 -0
- package/dist/ui/assets/chunk-FWNWRKHM-BnYpstoM.js +1 -0
- package/dist/ui/assets/chunk-FWNWRKHM-BnYpstoM.js.gz +0 -0
- package/dist/ui/assets/chunk-HN2XXSSU-Bryl_mh6.js +1 -0
- package/dist/ui/assets/chunk-HN2XXSSU-Bryl_mh6.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-2V21eWHj.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-2V21eWHj.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-FnuvrJa7.js +54 -0
- package/dist/ui/assets/chunk-JZLCHNYA-FnuvrJa7.js.gz +0 -0
- package/dist/ui/assets/chunk-LBM3YZW2-Cw6bMmO9.js +1 -0
- package/dist/ui/assets/chunk-LHMN2FUI-4PvuViM7.js +1 -0
- package/dist/ui/assets/chunk-MI3HLSF2-BGlwupVV.js +32 -0
- package/dist/ui/assets/chunk-MI3HLSF2-BGlwupVV.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-CNYIiENU.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-CNYIiENU.js.gz +0 -0
- package/dist/ui/assets/chunk-O7ZBX7Z2-D1klhS9e.js +1 -0
- package/dist/ui/assets/chunk-QN33PNHL-CVLSdlCA.js +1 -0
- package/dist/ui/assets/chunk-QXUST7PY-D9H9T9iv.js +7 -0
- package/dist/ui/assets/chunk-QXUST7PY-D9H9T9iv.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN--a5kzrW8.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-CKCl4bIx.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-CKCl4bIx.js.gz +0 -0
- package/dist/ui/assets/chunk-S6J4BHB3-CTPea3vv.js +1 -0
- package/dist/ui/assets/chunk-T53DSG4Q-D8ldL5g2.js +1 -0
- package/dist/ui/assets/chunk-TZMSLE5B-Cmz7ZjFI.js +1 -0
- package/dist/ui/assets/chunk-TZMSLE5B-Cmz7ZjFI.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BQu1e8d0.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-zZb-Hp50.js +1 -0
- package/dist/ui/assets/claude-code-cli-D5DHHf2_.png +0 -0
- package/dist/ui/assets/clone-BsnmMhrp.js +1 -0
- package/dist/ui/assets/cobol-ClxZgyhO.js +1 -0
- package/dist/ui/assets/cobol-ClxZgyhO.js.gz +0 -0
- package/dist/ui/assets/coffee-DqTJPLbh.js +1 -0
- package/dist/ui/assets/coffee-DqTJPLbh.js.gz +0 -0
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CwJtHGYL.js +1 -0
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CwJtHGYL.js.gz +0 -0
- package/dist/ui/assets/cpp-wQC3YVGB.js +1 -0
- package/dist/ui/assets/cpp-wQC3YVGB.js.gz +0 -0
- package/dist/ui/assets/crystal-k5T7adsX.js +1 -0
- package/dist/ui/assets/crystal-k5T7adsX.js.gz +0 -0
- package/dist/ui/assets/css-BAdozGc0.js +1 -0
- package/dist/ui/assets/css-BAdozGc0.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-CM8W_G2H.js +4 -0
- package/dist/ui/assets/dagre-6UL2VRFP-CM8W_G2H.js.gz +0 -0
- package/dist/ui/assets/dagre-CWG05jk4.js +1 -0
- package/dist/ui/assets/dagre-CWG05jk4.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DPMipzgy.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DPMipzgy.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-Cul6as8G.js +43 -0
- package/dist/ui/assets/diagram-QEK2KX5R-Cul6as8G.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-DUjElgXV.js +24 -0
- package/dist/ui/assets/diagram-S2PKOQOG-DUjElgXV.js.gz +0 -0
- package/dist/ui/assets/dist-MvOUsZJh.js +1 -0
- package/dist/ui/assets/dist-MvOUsZJh.js.gz +0 -0
- package/dist/ui/assets/edge-CWrBA9sH.js +1 -0
- package/dist/ui/assets/edge-CWrBA9sH.js.gz +0 -0
- package/dist/ui/assets/editor-BkedqcN8.js +34 -0
- package/dist/ui/assets/editor-BkedqcN8.js.gz +0 -0
- package/dist/ui/assets/elixir-CLNXfiE-.js +1 -0
- package/dist/ui/assets/elixir-CLNXfiE-.js.gz +0 -0
- package/dist/ui/assets/elm-CA_kKGBa.js +1 -0
- package/dist/ui/assets/elm-CA_kKGBa.js.gz +0 -0
- package/dist/ui/assets/emoji-DpjRrIoR.js +3 -0
- package/dist/ui/assets/emoji-DpjRrIoR.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-D0VAX2lA.js +60 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-D0VAX2lA.js.gz +0 -0
- package/dist/ui/assets/erb-DWuYyPRh.js +1 -0
- package/dist/ui/assets/erb-DWuYyPRh.js.gz +0 -0
- package/dist/ui/assets/erlang-BCBe8nCc.js +1 -0
- package/dist/ui/assets/erlang-BCBe8nCc.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-mNdIUGcM.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-mNdIUGcM.js.gz +0 -0
- package/dist/ui/assets/fortran-fixed-form-B8c9LBVd.js +1 -0
- package/dist/ui/assets/fortran-fixed-form-B8c9LBVd.js.gz +0 -0
- package/dist/ui/assets/fsharp-CZsYmiw9.js +1 -0
- package/dist/ui/assets/fsharp-CZsYmiw9.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-BgnJ1uze.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-BgnJ1uze.js.gz +0 -0
- package/dist/ui/assets/gdresource-obhWCKW5.js +1 -0
- package/dist/ui/assets/gdresource-obhWCKW5.js.gz +0 -0
- package/dist/ui/assets/git-commit-DH6mY3Km.js +1 -0
- package/dist/ui/assets/git-commit-DH6mY3Km.js.gz +0 -0
- package/dist/ui/assets/git-rebase-DczmTOjp.js +1 -0
- package/dist/ui/assets/gitGraph-F6HP7TQM-CxRcBypw.js +1 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-B4MGg45Z.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-B4MGg45Z.js.gz +0 -0
- package/dist/ui/assets/glimmer-js-DD3_7p3G.js +1 -0
- package/dist/ui/assets/glimmer-js-DD3_7p3G.js.gz +0 -0
- package/dist/ui/assets/glimmer-ts-D3bXvIFP.js +1 -0
- package/dist/ui/assets/glimmer-ts-D3bXvIFP.js.gz +0 -0
- package/dist/ui/assets/glsl-DJJ4Zwos.js +1 -0
- package/dist/ui/assets/glsl-DJJ4Zwos.js.gz +0 -0
- package/dist/ui/assets/graphlib-CDSMZlmz.js +1 -0
- package/dist/ui/assets/graphlib-CDSMZlmz.js.gz +0 -0
- package/dist/ui/assets/graphql-CJQuJVH2.js +1 -0
- package/dist/ui/assets/graphql-CJQuJVH2.js.gz +0 -0
- package/dist/ui/assets/hack-r5oP3zcE.js +1 -0
- package/dist/ui/assets/hack-r5oP3zcE.js.gz +0 -0
- package/dist/ui/assets/haml-C1Eal-_8.js +1 -0
- package/dist/ui/assets/haml-C1Eal-_8.js.gz +0 -0
- package/dist/ui/assets/handlebars-BEpEgjbn.js +1 -0
- package/dist/ui/assets/handlebars-BEpEgjbn.js.gz +0 -0
- package/dist/ui/assets/html-DlBp0zO1.js +1 -0
- package/dist/ui/assets/html-DlBp0zO1.js.gz +0 -0
- package/dist/ui/assets/html-derivative-Lcv1q5b2.js +1 -0
- package/dist/ui/assets/http-BNOKPdih.js +1 -0
- package/dist/ui/assets/http-BNOKPdih.js.gz +0 -0
- package/dist/ui/assets/hurl-CZl9Vwf4.js +1 -0
- package/dist/ui/assets/hurl-CZl9Vwf4.js.gz +0 -0
- package/dist/ui/assets/hxml-CztOsL8o.js +1 -0
- package/dist/ui/assets/hxml-CztOsL8o.js.gz +0 -0
- package/dist/ui/assets/index-AATkIWNL.js +598 -0
- package/dist/ui/assets/index-AATkIWNL.js.gz +0 -0
- package/dist/ui/assets/index-B5k0j1pj.css +1 -0
- package/dist/ui/assets/index-B5k0j1pj.css.gz +0 -0
- package/dist/ui/assets/info-NVLQJR56-krgQikVI.js +1 -0
- package/dist/ui/assets/infoDiagram-ER5ION4S-Do2hNohx.js +2 -0
- package/dist/ui/assets/isEmpty-B3r9u9Pw.js +1 -0
- package/dist/ui/assets/isEmpty-B3r9u9Pw.js.gz +0 -0
- package/dist/ui/assets/java-hWciv81W.js +1 -0
- package/dist/ui/assets/java-hWciv81W.js.gz +0 -0
- package/dist/ui/assets/javascript-C2nKsYpo.js +1 -0
- package/dist/ui/assets/javascript-C2nKsYpo.js.gz +0 -0
- package/dist/ui/assets/jinja-C70lHWmq.js +1 -0
- package/dist/ui/assets/jinja-C70lHWmq.js.gz +0 -0
- package/dist/ui/assets/jison-CRf65E96.js +1 -0
- package/dist/ui/assets/jison-CRf65E96.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-DFubgEjy.js +139 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-DFubgEjy.js.gz +0 -0
- package/dist/ui/assets/json-Cp3rbIBo.js +1 -0
- package/dist/ui/assets/json-Cp3rbIBo.js.gz +0 -0
- package/dist/ui/assets/jsx-V7OS6CeZ.js +1 -0
- package/dist/ui/assets/jsx-V7OS6CeZ.js.gz +0 -0
- package/dist/ui/assets/julia-CLobQTrV.js +1 -0
- package/dist/ui/assets/julia-CLobQTrV.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DYzdIrjh.js +89 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DYzdIrjh.js.gz +0 -0
- package/dist/ui/assets/katex-BqLWkbI2.js +257 -0
- package/dist/ui/assets/katex-BqLWkbI2.js.gz +0 -0
- package/dist/ui/assets/latex-DbjobGar.js +1 -0
- package/dist/ui/assets/latex-DbjobGar.js.gz +0 -0
- package/dist/ui/assets/lib-CTG1jGwk.js +4 -0
- package/dist/ui/assets/lib-CTG1jGwk.js.gz +0 -0
- package/dist/ui/assets/line-BYjITAkj.js +1 -0
- package/dist/ui/assets/linear-DP1Ek6vM.js +1 -0
- package/dist/ui/assets/linear-DP1Ek6vM.js.gz +0 -0
- package/dist/ui/assets/liquid-O_VU2LUa.js +1 -0
- package/dist/ui/assets/liquid-O_VU2LUa.js.gz +0 -0
- package/dist/ui/assets/lua-t5liZVKS.js +1 -0
- package/dist/ui/assets/lua-t5liZVKS.js.gz +0 -0
- package/dist/ui/assets/marko-BT1FcB8Z.js +1 -0
- package/dist/ui/assets/marko-BT1FcB8Z.js.gz +0 -0
- package/dist/ui/assets/mdc-DcWVOLoS.js +1 -0
- package/dist/ui/assets/mdc-DcWVOLoS.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-CdS1CbgS.js +4 -0
- package/dist/ui/assets/mermaid-parser.core-CdS1CbgS.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-8xLwHLFo.js +11 -0
- package/dist/ui/assets/mermaid.core-8xLwHLFo.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-D3lnyUy4.js +68 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-D3lnyUy4.js.gz +0 -0
- package/dist/ui/assets/nginx-DHmvy5qb.js +1 -0
- package/dist/ui/assets/nginx-DHmvy5qb.js.gz +0 -0
- package/dist/ui/assets/nim-H3r02Shw.js +1 -0
- package/dist/ui/assets/nim-H3r02Shw.js.gz +0 -0
- package/dist/ui/assets/ordinal-FztiIW_R.js +1 -0
- package/dist/ui/assets/ordinal-FztiIW_R.js.gz +0 -0
- package/dist/ui/assets/packet-BFZMPI3H-BhSpfmuh.js +1 -0
- package/dist/ui/assets/particles-WLChKA_f.js +1 -0
- package/dist/ui/assets/particles-WLChKA_f.js.gz +0 -0
- package/dist/ui/assets/perl-Dql9KhV3.js +1 -0
- package/dist/ui/assets/perl-Dql9KhV3.js.gz +0 -0
- package/dist/ui/assets/php-DUp4p2Oy.js +1 -0
- package/dist/ui/assets/php-DUp4p2Oy.js.gz +0 -0
- package/dist/ui/assets/pie-7BOR55EZ-DMpBzNk-.js +1 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-CZXwugHW.js +30 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-CZXwugHW.js.gz +0 -0
- package/dist/ui/assets/pug-D3Rjmsvz.js +1 -0
- package/dist/ui/assets/pug-D3Rjmsvz.js.gz +0 -0
- package/dist/ui/assets/qml-BKHXKhSg.js +1 -0
- package/dist/ui/assets/qml-BKHXKhSg.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DMnudmG_.js +7 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DMnudmG_.js.gz +0 -0
- package/dist/ui/assets/r-Btu9EZVQ.js +1 -0
- package/dist/ui/assets/r-Btu9EZVQ.js.gz +0 -0
- package/dist/ui/assets/radar-NHE76QYJ-CQvq4_yB.js +1 -0
- package/dist/ui/assets/razor-Dc0UpJl3.js +1 -0
- package/dist/ui/assets/razor-Dc0UpJl3.js.gz +0 -0
- package/dist/ui/assets/reactflow-8hax8RNO.css +1 -0
- package/dist/ui/assets/reactflow-8hax8RNO.css.gz +0 -0
- package/dist/ui/assets/reactflow-wgB-nQlh.js +2 -0
- package/dist/ui/assets/reactflow-wgB-nQlh.js.gz +0 -0
- package/dist/ui/assets/regexp-CK2DT2yI.js +1 -0
- package/dist/ui/assets/regexp-CK2DT2yI.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-XLudBoxc.js +64 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-XLudBoxc.js.gz +0 -0
- package/dist/ui/assets/rst-Dya2I9P6.js +1 -0
- package/dist/ui/assets/rst-Dya2I9P6.js.gz +0 -0
- package/dist/ui/assets/ruby-BtZzeQ2G.js +1 -0
- package/dist/ui/assets/ruby-BtZzeQ2G.js.gz +0 -0
- package/dist/ui/assets/sandpack-uwRKqYOO.js +717 -0
- package/dist/ui/assets/sandpack-uwRKqYOO.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Bgl1CVIl.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Bgl1CVIl.js.gz +0 -0
- package/dist/ui/assets/sas-B-k9Koac.js +1 -0
- package/dist/ui/assets/sas-B-k9Koac.js.gz +0 -0
- package/dist/ui/assets/scss-CJkaKkJn.js +1 -0
- package/dist/ui/assets/scss-CJkaKkJn.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DKu92_Q-.js +145 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DKu92_Q-.js.gz +0 -0
- package/dist/ui/assets/shaderlab-CbA6FzqS.js +1 -0
- package/dist/ui/assets/shaderlab-CbA6FzqS.js.gz +0 -0
- package/dist/ui/assets/shellscript-BJpF99EX.js +1 -0
- package/dist/ui/assets/shellscript-BJpF99EX.js.gz +0 -0
- package/dist/ui/assets/shellsession-BQEUiOxd.js +1 -0
- package/dist/ui/assets/soy-9UJwk-3D.js +1 -0
- package/dist/ui/assets/soy-9UJwk-3D.js.gz +0 -0
- package/dist/ui/assets/sparql-CawLnniT.js +1 -0
- package/dist/ui/assets/sparql-CawLnniT.js.gz +0 -0
- package/dist/ui/assets/sql-CB5ZQzYk.js +1 -0
- package/dist/ui/assets/sql-CB5ZQzYk.js.gz +0 -0
- package/dist/ui/assets/src-BAiS8tNN.js +1 -0
- package/dist/ui/assets/src-BAiS8tNN.js.gz +0 -0
- package/dist/ui/assets/stata-ikukLAQo.js +1 -0
- package/dist/ui/assets/stata-ikukLAQo.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-DAMD-F89.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-DAMD-F89.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-Dc54C8O1.js +1 -0
- package/dist/ui/assets/svelte-BopLWlLn.js +1 -0
- package/dist/ui/assets/svelte-BopLWlLn.js.gz +0 -0
- package/dist/ui/assets/syntax-BafRBzNc.js +9 -0
- package/dist/ui/assets/syntax-BafRBzNc.js.gz +0 -0
- package/dist/ui/assets/templ-BIr0_YvB.js +1 -0
- package/dist/ui/assets/templ-BIr0_YvB.js.gz +0 -0
- package/dist/ui/assets/tex-CjLV5j7d.js +1 -0
- package/dist/ui/assets/tex-CjLV5j7d.js.gz +0 -0
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CsgpnflO.js +61 -0
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CsgpnflO.js.gz +0 -0
- package/dist/ui/assets/treemap-KMMF4GRG-5yidkt4q.js +1 -0
- package/dist/ui/assets/ts-tags-DYjPi6AJ.js +1 -0
- package/dist/ui/assets/ts-tags-DYjPi6AJ.js.gz +0 -0
- package/dist/ui/assets/tsx-Dh0KrXzH.js +1 -0
- package/dist/ui/assets/tsx-Dh0KrXzH.js.gz +0 -0
- package/dist/ui/assets/twig-COAmG-_r.js +1 -0
- package/dist/ui/assets/twig-COAmG-_r.js.gz +0 -0
- package/dist/ui/assets/typescript-BYZYJG-_.js +1 -0
- package/dist/ui/assets/typescript-BYZYJG-_.js.gz +0 -0
- package/dist/ui/assets/vue-BTQT9VM6.js +1 -0
- package/dist/ui/assets/vue-BTQT9VM6.js.gz +0 -0
- package/dist/ui/assets/vue-html-CAFpkOwd.js +1 -0
- package/dist/ui/assets/vue-html-CAFpkOwd.js.gz +0 -0
- package/dist/ui/assets/vue-vine-CkKjLCx-.js +1 -0
- package/dist/ui/assets/vue-vine-CkKjLCx-.js.gz +0 -0
- package/dist/ui/assets/xml-87xGHlTz.js +1 -0
- package/dist/ui/assets/xml-87xGHlTz.js.gz +0 -0
- package/dist/ui/assets/xsl-C3OVzq5P.js +1 -0
- package/dist/ui/assets/xsl-C3OVzq5P.js.gz +0 -0
- package/dist/ui/assets/xterm-DjlKmdRW.js +7 -0
- package/dist/ui/assets/xterm-DjlKmdRW.js.gz +0 -0
- package/dist/ui/assets/xterm-kHJ-D0s7.css +1 -0
- package/dist/ui/assets/xterm-kHJ-D0s7.css.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-DES6Uq14.js +7 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-DES6Uq14.js.gz +0 -0
- package/dist/ui/assets/yaml-BzeRHC01.js +1 -0
- package/dist/ui/assets/yaml-BzeRHC01.js.gz +0 -0
- package/dist/ui/index.html +14 -4
- package/dist/ui/index.html.gz +0 -0
- package/package.json +3 -3
- package/dist/core/agentic-tool-BoVfSlQg.d.cts +0 -131
- package/dist/core/agentic-tool-DzVU-k-L.d.ts +0 -131
- package/dist/core/artifact-BiiLXU1_.d.ts +0 -341
- package/dist/core/artifact-CJVX9P0W.d.cts +0 -341
- package/dist/core/board-DGqozUC3.d.cts +0 -331
- package/dist/core/board-DJssyVxQ.d.ts +0 -331
- package/dist/core/board-comment-C2B-y547.d.cts +0 -140
- package/dist/core/board-comment-Gj_H7_O5.d.ts +0 -140
- package/dist/core/client-BZZ079pE.d.cts +0 -10783
- package/dist/core/client-C67tXxsk.d.ts +0 -10783
- package/dist/core/config-manager-BET18dIh.d.cts +0 -289
- package/dist/core/config-manager-Cz_Uk_n7.d.ts +0 -289
- package/dist/core/config-services-DXeqk2Do.d.cts +0 -183
- package/dist/core/config-services-W4ZGuziR.d.ts +0 -183
- package/dist/core/feathers-DZvgVY4k.d.cts +0 -263
- package/dist/core/feathers-veXYnC_G.d.ts +0 -263
- package/dist/core/gateway-BYf_zyZ2.d.cts +0 -99
- package/dist/core/gateway-CO5u0sMT.d.ts +0 -99
- package/dist/core/id-DkhPzOUr.d.cts +0 -236
- package/dist/core/id-DkhPzOUr.d.ts +0 -236
- package/dist/core/mcp-3o0cxfxv.d.cts +0 -222
- package/dist/core/mcp-BrlfyCrb.d.ts +0 -222
- package/dist/core/message-0Ym119On.d.ts +0 -225
- package/dist/core/message-aoAVQOoh.d.cts +0 -225
- package/dist/core/repo-X-f3IbfQ.d.cts +0 -958
- package/dist/core/repo-rgMGUgtm.d.ts +0 -958
- package/dist/core/resolve-config-CJ4dkASO.d.ts +0 -74
- package/dist/core/resolve-config-Ci8TVB13.d.cts +0 -74
- package/dist/core/session-D2IKSDMm.d.cts +0 -437
- package/dist/core/session-DfaRpjh7.d.ts +0 -437
- package/dist/core/session-guard-C0trzVoG.d.cts +0 -240
- package/dist/core/session-guard-CduZtOkN.d.ts +0 -240
- package/dist/core/task-BwzcDown.d.cts +0 -194
- package/dist/core/task-DEuBUSIM.d.ts +0 -194
- package/dist/core/types-DfkMy25M.d.ts +0 -724
- package/dist/core/types-LbFJvpjs.d.cts +0 -724
- package/dist/core/user-Bh_97om1.d.cts +0 -358
- package/dist/core/user-Bu1on2Sn.d.ts +0 -358
- package/dist/ui/assets/CodeEditor.inner-B-LSxNLi.js +0 -2
- package/dist/ui/assets/CodeEditor.inner-B-LSxNLi.js.gz +0 -0
- package/dist/ui/assets/_basePickBy-aO4uJaZv.js +0 -1
- package/dist/ui/assets/_basePickBy-aO4uJaZv.js.gz +0 -0
- package/dist/ui/assets/_baseUniq-CYW7aAFH.js +0 -1
- package/dist/ui/assets/_baseUniq-CYW7aAFH.js.gz +0 -0
- package/dist/ui/assets/angular-html-7ZSDV2XE.js +0 -1
- package/dist/ui/assets/angular-html-7ZSDV2XE.js.gz +0 -0
- package/dist/ui/assets/angular-ts--CzNoEx7.js +0 -1
- package/dist/ui/assets/angular-ts--CzNoEx7.js.gz +0 -0
- package/dist/ui/assets/apl-djITE3dZ.js +0 -1
- package/dist/ui/assets/apl-djITE3dZ.js.gz +0 -0
- package/dist/ui/assets/arc-Ddz4TeZN.js +0 -1
- package/dist/ui/assets/arc-Ddz4TeZN.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CRmSmtA1.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-BOtw3C-s.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-BOtw3C-s.js.gz +0 -0
- package/dist/ui/assets/astro-B7VVLtp2.js +0 -1
- package/dist/ui/assets/astro-B7VVLtp2.js.gz +0 -0
- package/dist/ui/assets/base-80a1f760-DPuSYwsb.js +0 -1
- package/dist/ui/assets/blade-ClLzXpX6.js +0 -1
- package/dist/ui/assets/blade-ClLzXpX6.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-CD6wVOI_.js +0 -122
- package/dist/ui/assets/blockDiagram-VD42YOAC-CD6wVOI_.js.gz +0 -0
- package/dist/ui/assets/bsl-CL8jyVM0.js +0 -1
- package/dist/ui/assets/bsl-CL8jyVM0.js.gz +0 -0
- package/dist/ui/assets/c-D9BL0tfA.js +0 -1
- package/dist/ui/assets/c-D9BL0tfA.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-DI1VgHC9.js +0 -10
- package/dist/ui/assets/c4Diagram-YG6GDRKO-DI1VgHC9.js.gz +0 -0
- package/dist/ui/assets/cairo-D7G0W7-s.js +0 -1
- package/dist/ui/assets/cairo-D7G0W7-s.js.gz +0 -0
- package/dist/ui/assets/channel-Z1ndN-1Q.js +0 -1
- package/dist/ui/assets/chunk-4BX2VUAB-DeeSQrFJ.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-o3sSL9lC.js +0 -1
- package/dist/ui/assets/chunk-76Q3JFCE-DHsbWBiu.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-C7wO77xG.js +0 -81
- package/dist/ui/assets/chunk-ABZYJK2D-C7wO77xG.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-BxLyiY2G.js +0 -1
- package/dist/ui/assets/chunk-ATLVNIR6-BxLyiY2G.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-cm4IVPdj.js +0 -165
- package/dist/ui/assets/chunk-B4BG7PRW-cm4IVPdj.js.gz +0 -0
- package/dist/ui/assets/chunk-CVBHYZKI-C3gU9MJa.js +0 -1
- package/dist/ui/assets/chunk-DI55MBZ5-Cn11MhsG.js +0 -220
- package/dist/ui/assets/chunk-DI55MBZ5-Cn11MhsG.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-BINdIke0.js +0 -1
- package/dist/ui/assets/chunk-FMBD7UC4-nUxlvJ2M.js +0 -15
- package/dist/ui/assets/chunk-FPAJGGOC-BnrkVs8i.js +0 -80
- package/dist/ui/assets/chunk-FPAJGGOC-BnrkVs8i.js.gz +0 -0
- package/dist/ui/assets/chunk-FWNWRKHM-hrsczLoa.js +0 -1
- package/dist/ui/assets/chunk-FWNWRKHM-hrsczLoa.js.gz +0 -0
- package/dist/ui/assets/chunk-HN2XXSSU-ByreOuj8.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-ByreOuj8.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Bax7xK_N.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-Bax7xK_N.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-Dl9q9w_H.js +0 -54
- package/dist/ui/assets/chunk-JZLCHNYA-Dl9q9w_H.js.gz +0 -0
- package/dist/ui/assets/chunk-LBM3YZW2-BwRMbwZQ.js +0 -1
- package/dist/ui/assets/chunk-LHMN2FUI-ZM7ODxa1.js +0 -1
- package/dist/ui/assets/chunk-MI3HLSF2-DENCMb8x.js +0 -32
- package/dist/ui/assets/chunk-MI3HLSF2-DENCMb8x.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-M_81kVpk.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-M_81kVpk.js.gz +0 -0
- package/dist/ui/assets/chunk-O7ZBX7Z2-DpGiu9K-.js +0 -1
- package/dist/ui/assets/chunk-QN33PNHL-BylJc9WI.js +0 -1
- package/dist/ui/assets/chunk-QXUST7PY-GzChXWQ7.js +0 -7
- package/dist/ui/assets/chunk-QXUST7PY-GzChXWQ7.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CiTT4w1Y.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-8aOqy05k.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-8aOqy05k.js.gz +0 -0
- package/dist/ui/assets/chunk-S6J4BHB3-BOvrHkD-.js +0 -1
- package/dist/ui/assets/chunk-T53DSG4Q-Cs-xy-VU.js +0 -1
- package/dist/ui/assets/chunk-TZMSLE5B-BxJrLwMD.js +0 -1
- package/dist/ui/assets/chunk-TZMSLE5B-BxJrLwMD.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-D5RKbezd.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB--hxRdqYw.js +0 -1
- package/dist/ui/assets/clone-Duo1_Rc-.js +0 -1
- package/dist/ui/assets/cobol-DZKzbcOW.js +0 -1
- package/dist/ui/assets/cobol-DZKzbcOW.js.gz +0 -0
- package/dist/ui/assets/coffee-DotC8DrW.js +0 -1
- package/dist/ui/assets/coffee-DotC8DrW.js.gz +0 -0
- package/dist/ui/assets/consoleHook-59e792cb-CzU4Wihp.js +0 -2
- package/dist/ui/assets/consoleHook-59e792cb-CzU4Wihp.js.gz +0 -0
- package/dist/ui/assets/cose-bilkent-S5V4N54A-ChrN-7Nk.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-ChrN-7Nk.js.gz +0 -0
- package/dist/ui/assets/cpp-DdwwGSAt.js +0 -1
- package/dist/ui/assets/cpp-DdwwGSAt.js.gz +0 -0
- package/dist/ui/assets/crystal-BAiQTDiG.js +0 -1
- package/dist/ui/assets/crystal-BAiQTDiG.js.gz +0 -0
- package/dist/ui/assets/css-TJ6C5JKp.js +0 -1
- package/dist/ui/assets/css-TJ6C5JKp.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-RxBNvESq.js +0 -4
- package/dist/ui/assets/dagre-6UL2VRFP-RxBNvESq.js.gz +0 -0
- package/dist/ui/assets/dagre-BQkMlG7T.js +0 -1
- package/dist/ui/assets/dagre-BQkMlG7T.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CA9V0qry.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-CA9V0qry.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-D_XJg8In.js +0 -43
- package/dist/ui/assets/diagram-QEK2KX5R-D_XJg8In.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-D-XWx6cj.js +0 -24
- package/dist/ui/assets/diagram-S2PKOQOG-D-XWx6cj.js.gz +0 -0
- package/dist/ui/assets/dist-CMRTQ598.js +0 -1
- package/dist/ui/assets/dist-CMRTQ598.js.gz +0 -0
- package/dist/ui/assets/edge-fFzd_u07.js +0 -1
- package/dist/ui/assets/edge-fFzd_u07.js.gz +0 -0
- package/dist/ui/assets/elixir-Cnh2XrCX.js +0 -1
- package/dist/ui/assets/elixir-Cnh2XrCX.js.gz +0 -0
- package/dist/ui/assets/elm-TqLOCgFX.js +0 -1
- package/dist/ui/assets/elm-TqLOCgFX.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-DjU6rC6-.js +0 -60
- package/dist/ui/assets/erDiagram-Q2GNP2WA-DjU6rC6-.js.gz +0 -0
- package/dist/ui/assets/erb-CxikfmxQ.js +0 -1
- package/dist/ui/assets/erb-CxikfmxQ.js.gz +0 -0
- package/dist/ui/assets/erlang-5XIDkYrM.js +0 -1
- package/dist/ui/assets/erlang-5XIDkYrM.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-ynZiTH3K.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-ynZiTH3K.js.gz +0 -0
- package/dist/ui/assets/fortran-fixed-form-CVBm8Rux.js +0 -1
- package/dist/ui/assets/fortran-fixed-form-CVBm8Rux.js.gz +0 -0
- package/dist/ui/assets/fsharp-By8soj6-.js +0 -1
- package/dist/ui/assets/fsharp-By8soj6-.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-mCDFE6N1.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-mCDFE6N1.js.gz +0 -0
- package/dist/ui/assets/gdresource-Cl8Xk3T5.js +0 -1
- package/dist/ui/assets/gdresource-Cl8Xk3T5.js.gz +0 -0
- package/dist/ui/assets/git-commit-_ZiciHIx.js +0 -1
- package/dist/ui/assets/git-commit-_ZiciHIx.js.gz +0 -0
- package/dist/ui/assets/git-rebase-Hj555zvc.js +0 -1
- package/dist/ui/assets/gitGraph-F6HP7TQM-DGSMJdUj.js +0 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-C-Fjma_s.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-C-Fjma_s.js.gz +0 -0
- package/dist/ui/assets/glimmer-js-D29lJlsC.js +0 -1
- package/dist/ui/assets/glimmer-js-D29lJlsC.js.gz +0 -0
- package/dist/ui/assets/glimmer-ts-BQcBQLPg.js +0 -1
- package/dist/ui/assets/glimmer-ts-BQcBQLPg.js.gz +0 -0
- package/dist/ui/assets/glsl-Dy-lzVT0.js +0 -1
- package/dist/ui/assets/glsl-Dy-lzVT0.js.gz +0 -0
- package/dist/ui/assets/graphlib-B0yPC31I.js +0 -1
- package/dist/ui/assets/graphlib-B0yPC31I.js.gz +0 -0
- package/dist/ui/assets/graphql-aR408kS-.js +0 -1
- package/dist/ui/assets/graphql-aR408kS-.js.gz +0 -0
- package/dist/ui/assets/hack-CurXNrlh.js +0 -1
- package/dist/ui/assets/hack-CurXNrlh.js.gz +0 -0
- package/dist/ui/assets/haml-B4Z48r83.js +0 -1
- package/dist/ui/assets/haml-B4Z48r83.js.gz +0 -0
- package/dist/ui/assets/handlebars-CyGVn3rj.js +0 -1
- package/dist/ui/assets/handlebars-CyGVn3rj.js.gz +0 -0
- package/dist/ui/assets/html-BRSVUaBq.js +0 -1
- package/dist/ui/assets/html-BRSVUaBq.js.gz +0 -0
- package/dist/ui/assets/html-derivative-74aEJlWz.js +0 -1
- package/dist/ui/assets/http-BRYjyWqz.js +0 -1
- package/dist/ui/assets/http-BRYjyWqz.js.gz +0 -0
- package/dist/ui/assets/hurl-BVCRDd-0.js +0 -1
- package/dist/ui/assets/hurl-BVCRDd-0.js.gz +0 -0
- package/dist/ui/assets/hxml-CptwXXqC.js +0 -1
- package/dist/ui/assets/hxml-CptwXXqC.js.gz +0 -0
- package/dist/ui/assets/index-599aeaf7-DW44bv7a.js +0 -16
- package/dist/ui/assets/index-599aeaf7-DW44bv7a.js.gz +0 -0
- package/dist/ui/assets/index-BmTcW7iL.js +0 -1743
- package/dist/ui/assets/index-BmTcW7iL.js.gz +0 -0
- package/dist/ui/assets/index-Bw4KNA06.css +0 -1
- package/dist/ui/assets/index-Bw4KNA06.css.gz +0 -0
- package/dist/ui/assets/info-NVLQJR56-9uJ4f4TZ.js +0 -1
- package/dist/ui/assets/infoDiagram-ER5ION4S-DvCvvyxp.js +0 -2
- package/dist/ui/assets/isEmpty-Co-qm-ix.js +0 -1
- package/dist/ui/assets/isEmpty-Co-qm-ix.js.gz +0 -0
- package/dist/ui/assets/java-CGhZyV5g.js +0 -1
- package/dist/ui/assets/java-CGhZyV5g.js.gz +0 -0
- package/dist/ui/assets/javascript-CxqGvpPH.js +0 -1
- package/dist/ui/assets/javascript-CxqGvpPH.js.gz +0 -0
- package/dist/ui/assets/jinja-Bw8RXyh4.js +0 -1
- package/dist/ui/assets/jinja-Bw8RXyh4.js.gz +0 -0
- package/dist/ui/assets/jison-D0OtVfMi.js +0 -1
- package/dist/ui/assets/jison-D0OtVfMi.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CUu4LTwo.js +0 -139
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CUu4LTwo.js.gz +0 -0
- package/dist/ui/assets/json-BL7mdgj5.js +0 -1
- package/dist/ui/assets/json-BL7mdgj5.js.gz +0 -0
- package/dist/ui/assets/jsx-zrSQSWJ7.js +0 -1
- package/dist/ui/assets/jsx-zrSQSWJ7.js.gz +0 -0
- package/dist/ui/assets/julia-BcqpL71I.js +0 -1
- package/dist/ui/assets/julia-BcqpL71I.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DgxIm_fo.js +0 -89
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DgxIm_fo.js.gz +0 -0
- package/dist/ui/assets/katex-bhLIJZGA.js +0 -257
- package/dist/ui/assets/katex-bhLIJZGA.js.gz +0 -0
- package/dist/ui/assets/latex-BLAoaBJR.js +0 -1
- package/dist/ui/assets/latex-BLAoaBJR.js.gz +0 -0
- package/dist/ui/assets/lib-Cfk8U6Lp.js +0 -4
- package/dist/ui/assets/lib-Cfk8U6Lp.js.gz +0 -0
- package/dist/ui/assets/line-BPBIcMZX.js +0 -1
- package/dist/ui/assets/linear-CvByawp5.js +0 -1
- package/dist/ui/assets/linear-CvByawp5.js.gz +0 -0
- package/dist/ui/assets/liquid-BbC3Lgxb.js +0 -1
- package/dist/ui/assets/liquid-BbC3Lgxb.js.gz +0 -0
- package/dist/ui/assets/lua-6p0CpD-e.js +0 -1
- package/dist/ui/assets/lua-6p0CpD-e.js.gz +0 -0
- package/dist/ui/assets/marko-CK4yL0uR.js +0 -1
- package/dist/ui/assets/marko-CK4yL0uR.js.gz +0 -0
- package/dist/ui/assets/mdc-DLGkOUm_.js +0 -1
- package/dist/ui/assets/mdc-DLGkOUm_.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-DELRDTUA.js +0 -4
- package/dist/ui/assets/mermaid-parser.core-DELRDTUA.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-CO2N44zL.js +0 -11
- package/dist/ui/assets/mermaid.core-CO2N44zL.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-vBulzGic.js +0 -68
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-vBulzGic.js.gz +0 -0
- package/dist/ui/assets/nginx-CUK2vqBX.js +0 -1
- package/dist/ui/assets/nginx-CUK2vqBX.js.gz +0 -0
- package/dist/ui/assets/nim-DuYh1wv8.js +0 -1
- package/dist/ui/assets/nim-DuYh1wv8.js.gz +0 -0
- package/dist/ui/assets/node-BVTGLmvK.js +0 -4
- package/dist/ui/assets/node-BVTGLmvK.js.gz +0 -0
- package/dist/ui/assets/ordinal-t_ha_BUo.js +0 -1
- package/dist/ui/assets/ordinal-t_ha_BUo.js.gz +0 -0
- package/dist/ui/assets/packet-BFZMPI3H-DI49m83V.js +0 -1
- package/dist/ui/assets/perl-wan-bZBc.js +0 -1
- package/dist/ui/assets/perl-wan-bZBc.js.gz +0 -0
- package/dist/ui/assets/php-B2n8Sr77.js +0 -1
- package/dist/ui/assets/php-B2n8Sr77.js.gz +0 -0
- package/dist/ui/assets/pie-7BOR55EZ-B_IeTO7D.js +0 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-CXLnsdI6.js +0 -30
- package/dist/ui/assets/pieDiagram-ADFJNKIX-CXLnsdI6.js.gz +0 -0
- package/dist/ui/assets/pug-EDXlCxiW.js +0 -1
- package/dist/ui/assets/pug-EDXlCxiW.js.gz +0 -0
- package/dist/ui/assets/qml-CfMDof6S.js +0 -1
- package/dist/ui/assets/qml-CfMDof6S.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-BL6urrj8.js +0 -7
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-BL6urrj8.js.gz +0 -0
- package/dist/ui/assets/r-Ccs3nclj.js +0 -1
- package/dist/ui/assets/r-Ccs3nclj.js.gz +0 -0
- package/dist/ui/assets/radar-NHE76QYJ-6Tf7aOti.js +0 -1
- package/dist/ui/assets/razor-BJMPTF3e.js +0 -1
- package/dist/ui/assets/razor-BJMPTF3e.js.gz +0 -0
- package/dist/ui/assets/regexp-Bl_gO0sO.js +0 -1
- package/dist/ui/assets/regexp-Bl_gO0sO.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-BMjDHrbD.js +0 -64
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-BMjDHrbD.js.gz +0 -0
- package/dist/ui/assets/rst-Dwbs7nRa.js +0 -1
- package/dist/ui/assets/rst-Dwbs7nRa.js.gz +0 -0
- package/dist/ui/assets/ruby-DB0dWtoW.js +0 -1
- package/dist/ui/assets/ruby-DB0dWtoW.js.gz +0 -0
- package/dist/ui/assets/runtime-ls8MNB0x.js +0 -1
- package/dist/ui/assets/runtime-ls8MNB0x.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-CR08BYIq.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-CR08BYIq.js.gz +0 -0
- package/dist/ui/assets/sas-DeRVnuWo.js +0 -1
- package/dist/ui/assets/sas-DeRVnuWo.js.gz +0 -0
- package/dist/ui/assets/scss-Pg8peMy8.js +0 -1
- package/dist/ui/assets/scss-Pg8peMy8.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DCDleF5P.js +0 -145
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DCDleF5P.js.gz +0 -0
- package/dist/ui/assets/shaderlab-CvPMthch.js +0 -1
- package/dist/ui/assets/shaderlab-CvPMthch.js.gz +0 -0
- package/dist/ui/assets/shellscript-7c6G4Col.js +0 -1
- package/dist/ui/assets/shellscript-7c6G4Col.js.gz +0 -0
- package/dist/ui/assets/shellsession-sFfcJNpy.js +0 -1
- package/dist/ui/assets/soy-CT-uD9tx.js +0 -1
- package/dist/ui/assets/soy-CT-uD9tx.js.gz +0 -0
- package/dist/ui/assets/sparql-Ctg__NhZ.js +0 -1
- package/dist/ui/assets/sparql-Ctg__NhZ.js.gz +0 -0
- package/dist/ui/assets/sql-BokJFRt-.js +0 -1
- package/dist/ui/assets/sql-BokJFRt-.js.gz +0 -0
- package/dist/ui/assets/src-B_KHrEYy.js +0 -1
- package/dist/ui/assets/src-B_KHrEYy.js.gz +0 -0
- package/dist/ui/assets/stata-CMW-lQwL.js +0 -1
- package/dist/ui/assets/stata-CMW-lQwL.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-C3_ziXMz.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-C3_ziXMz.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CLvtczX3.js +0 -1
- package/dist/ui/assets/svelte-BqfhvuSY.js +0 -1
- package/dist/ui/assets/svelte-BqfhvuSY.js.gz +0 -0
- package/dist/ui/assets/templ-BYX_lutV.js +0 -1
- package/dist/ui/assets/templ-BYX_lutV.js.gz +0 -0
- package/dist/ui/assets/tex-xe35xk7S.js +0 -1
- package/dist/ui/assets/tex-xe35xk7S.js.gz +0 -0
- package/dist/ui/assets/timeline-definition-IT6M3QCI-DDmyaQZc.js +0 -61
- package/dist/ui/assets/timeline-definition-IT6M3QCI-DDmyaQZc.js.gz +0 -0
- package/dist/ui/assets/treemap-KMMF4GRG-D1UsHyXi.js +0 -1
- package/dist/ui/assets/ts-tags-B4l5hKLf.js +0 -1
- package/dist/ui/assets/ts-tags-B4l5hKLf.js.gz +0 -0
- package/dist/ui/assets/tsx-CMkmgh6q.js +0 -1
- package/dist/ui/assets/tsx-CMkmgh6q.js.gz +0 -0
- package/dist/ui/assets/twig-MEnn-L6W.js +0 -1
- package/dist/ui/assets/twig-MEnn-L6W.js.gz +0 -0
- package/dist/ui/assets/typescript-BilFknOx.js +0 -1
- package/dist/ui/assets/typescript-BilFknOx.js.gz +0 -0
- package/dist/ui/assets/vue-C6YKWylD.js +0 -1
- package/dist/ui/assets/vue-C6YKWylD.js.gz +0 -0
- package/dist/ui/assets/vue-html-DQLWWLLj.js +0 -1
- package/dist/ui/assets/vue-html-DQLWWLLj.js.gz +0 -0
- package/dist/ui/assets/vue-vine-C0huARue.js +0 -1
- package/dist/ui/assets/vue-vine-C0huARue.js.gz +0 -0
- package/dist/ui/assets/xml-C7EKTDgq.js +0 -1
- package/dist/ui/assets/xml-C7EKTDgq.js.gz +0 -0
- package/dist/ui/assets/xsl-Dh3p-yaZ.js +0 -1
- package/dist/ui/assets/xsl-Dh3p-yaZ.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-Mt6QyXzu.js +0 -7
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-Mt6QyXzu.js.gz +0 -0
- package/dist/ui/assets/yaml-D5AL70ET.js +0 -1
- package/dist/ui/assets/yaml-D5AL70ET.js.gz +0 -0
- /package/dist/ui/assets/{_createAssigner-hI3bgaSB.js → _createAssigner-BRZJkxVt.js} +0 -0
- /package/dist/ui/assets/{_createAssigner-hI3bgaSB.js.gz → _createAssigner-BRZJkxVt.js.gz} +0 -0
- /package/dist/ui/assets/{abap-C1K0-wzc.js → abap-BtXDhIo4.js} +0 -0
- /package/dist/ui/assets/{abap-C1K0-wzc.js.gz → abap-BtXDhIo4.js.gz} +0 -0
- /package/dist/ui/assets/{actionscript-3-9EfDPXV9.js → actionscript-3-BON37_Bf.js} +0 -0
- /package/dist/ui/assets/{actionscript-3-9EfDPXV9.js.gz → actionscript-3-BON37_Bf.js.gz} +0 -0
- /package/dist/ui/assets/{ada-Bt8r9fME.js → ada-bamqK3YS.js} +0 -0
- /package/dist/ui/assets/{ada-Bt8r9fME.js.gz → ada-bamqK3YS.js.gz} +0 -0
- /package/dist/ui/assets/{andromeeda-B0bo8KMG.js → andromeeda-BFy1SiVj.js} +0 -0
- /package/dist/ui/assets/{andromeeda-B0bo8KMG.js.gz → andromeeda-BFy1SiVj.js.gz} +0 -0
- /package/dist/ui/assets/{apache-CnlleE6P.js → apache-BKWgsu5P.js} +0 -0
- /package/dist/ui/assets/{apache-CnlleE6P.js.gz → apache-BKWgsu5P.js.gz} +0 -0
- /package/dist/ui/assets/{apex-5ivq5CnR.js → apex-DeXJKO8N.js} +0 -0
- /package/dist/ui/assets/{apex-5ivq5CnR.js.gz → apex-DeXJKO8N.js.gz} +0 -0
- /package/dist/ui/assets/{applescript-DO7AnO8U.js → applescript-DHugLj9J.js} +0 -0
- /package/dist/ui/assets/{applescript-DO7AnO8U.js.gz → applescript-DHugLj9J.js.gz} +0 -0
- /package/dist/ui/assets/{ara-i83AydZj.js → ara-CKl7nNeK.js} +0 -0
- /package/dist/ui/assets/{ara-i83AydZj.js.gz → ara-CKl7nNeK.js.gz} +0 -0
- /package/dist/ui/assets/{array-CYHT4lxU.js → array-9GQRnUsD.js} +0 -0
- /package/dist/ui/assets/{asciidoc-BtFfNOwb.js → asciidoc-C8bXWVTg.js} +0 -0
- /package/dist/ui/assets/{asciidoc-BtFfNOwb.js.gz → asciidoc-C8bXWVTg.js.gz} +0 -0
- /package/dist/ui/assets/{asm-B5S47Rgr.js → asm-Y2ZqyUjx.js} +0 -0
- /package/dist/ui/assets/{asm-B5S47Rgr.js.gz → asm-Y2ZqyUjx.js.gz} +0 -0
- /package/dist/ui/assets/{aurora-x-DOZNk3C5.js → aurora-x-CetC7M8b.js} +0 -0
- /package/dist/ui/assets/{aurora-x-DOZNk3C5.js.gz → aurora-x-CetC7M8b.js.gz} +0 -0
- /package/dist/ui/assets/{awk-CfyLHXqS.js → awk-NSuQTZIt.js} +0 -0
- /package/dist/ui/assets/{awk-CfyLHXqS.js.gz → awk-NSuQTZIt.js.gz} +0 -0
- /package/dist/ui/assets/{ayu-dark-BVrGER3P.js → ayu-dark-Bx1N269G.js} +0 -0
- /package/dist/ui/assets/{ayu-dark-BVrGER3P.js.gz → ayu-dark-Bx1N269G.js.gz} +0 -0
- /package/dist/ui/assets/{ballerina-CumGp9A7.js → ballerina-CY106-Bs.js} +0 -0
- /package/dist/ui/assets/{ballerina-CumGp9A7.js.gz → ballerina-CY106-Bs.js.gz} +0 -0
- /package/dist/ui/assets/{bat-Ca2SBbYN.js → bat-HCAceH1N.js} +0 -0
- /package/dist/ui/assets/{bat-Ca2SBbYN.js.gz → bat-HCAceH1N.js.gz} +0 -0
- /package/dist/ui/assets/{beancount-CqyXBwwF.js → beancount-oIQRN6Qg.js} +0 -0
- /package/dist/ui/assets/{beancount-CqyXBwwF.js.gz → beancount-oIQRN6Qg.js.gz} +0 -0
- /package/dist/ui/assets/{berry-c6XLUlHZ.js → berry-BIVAUTrc.js} +0 -0
- /package/dist/ui/assets/{berry-c6XLUlHZ.js.gz → berry-BIVAUTrc.js.gz} +0 -0
- /package/dist/ui/assets/{bibtex-DoFFszjV.js → bibtex-Bpl-g3kR.js} +0 -0
- /package/dist/ui/assets/{bibtex-DoFFszjV.js.gz → bibtex-Bpl-g3kR.js.gz} +0 -0
- /package/dist/ui/assets/{bicep-CWPi4nfK.js → bicep-CZgWnaAu.js} +0 -0
- /package/dist/ui/assets/{bicep-CWPi4nfK.js.gz → bicep-CZgWnaAu.js.gz} +0 -0
- /package/dist/ui/assets/{cadence-D8qYS6pR.js → cadence-B0GBC8OF.js} +0 -0
- /package/dist/ui/assets/{cadence-D8qYS6pR.js.gz → cadence-B0GBC8OF.js.gz} +0 -0
- /package/dist/ui/assets/{catppuccin-frappe-DLHLTCnF.js → catppuccin-frappe-FhUCVxex.js} +0 -0
- /package/dist/ui/assets/{catppuccin-frappe-DLHLTCnF.js.gz → catppuccin-frappe-FhUCVxex.js.gz} +0 -0
- /package/dist/ui/assets/{catppuccin-latte-DfCS_kJi.js → catppuccin-latte-CzfrtmgL.js} +0 -0
- /package/dist/ui/assets/{catppuccin-latte-DfCS_kJi.js.gz → catppuccin-latte-CzfrtmgL.js.gz} +0 -0
- /package/dist/ui/assets/{catppuccin-macchiato-CR9A3_vc.js → catppuccin-macchiato-6xL0lOtj.js} +0 -0
- /package/dist/ui/assets/{catppuccin-macchiato-CR9A3_vc.js.gz → catppuccin-macchiato-6xL0lOtj.js.gz} +0 -0
- /package/dist/ui/assets/{catppuccin-mocha-BSuJX63a.js → catppuccin-mocha-D39-xS3P.js} +0 -0
- /package/dist/ui/assets/{catppuccin-mocha-BSuJX63a.js.gz → catppuccin-mocha-D39-xS3P.js.gz} +0 -0
- /package/dist/ui/assets/{chunk-6MN3ZHY7-B8I4ITt9.js → chunk-6MN3ZHY7-Du1yL_6Y.js} +0 -0
- /package/dist/ui/assets/{chunk-6MN3ZHY7-B8I4ITt9.js.gz → chunk-6MN3ZHY7-Du1yL_6Y.js.gz} +0 -0
- /package/dist/ui/assets/{clarity-CGiU22jY.js → clarity-F39L0xMJ.js} +0 -0
- /package/dist/ui/assets/{clarity-CGiU22jY.js.gz → clarity-F39L0xMJ.js.gz} +0 -0
- /package/dist/ui/assets/{clojure-COIC3doh.js → clojure-DloMkd8K.js} +0 -0
- /package/dist/ui/assets/{clojure-COIC3doh.js.gz → clojure-DloMkd8K.js.gz} +0 -0
- /package/dist/ui/assets/{cmake-DWUEQfHv.js → cmake-CwerJun_.js} +0 -0
- /package/dist/ui/assets/{cmake-DWUEQfHv.js.gz → cmake-CwerJun_.js.gz} +0 -0
- /package/dist/ui/assets/{codeowners-BNHiAQea.js → codeowners-CQyVz4Qf.js} +0 -0
- /package/dist/ui/assets/{codeql-BuKaoS0j.js → codeql-Bb229zuY.js} +0 -0
- /package/dist/ui/assets/{codeql-BuKaoS0j.js.gz → codeql-Bb229zuY.js.gz} +0 -0
- /package/dist/ui/assets/{common-lisp-D5IKbxsd.js → common-lisp-KMlIwq5I.js} +0 -0
- /package/dist/ui/assets/{common-lisp-D5IKbxsd.js.gz → common-lisp-KMlIwq5I.js.gz} +0 -0
- /package/dist/ui/assets/{coq-BMVS-p94.js → coq-DHX_3IIo.js} +0 -0
- /package/dist/ui/assets/{coq-BMVS-p94.js.gz → coq-DHX_3IIo.js.gz} +0 -0
- /package/dist/ui/assets/{csharp-Z6o_AO_Y.js → csharp-DQKYPs0Q.js} +0 -0
- /package/dist/ui/assets/{csharp-Z6o_AO_Y.js.gz → csharp-DQKYPs0Q.js.gz} +0 -0
- /package/dist/ui/assets/{csv-DoNVBBf0.js → csv-l1g_V5MV.js} +0 -0
- /package/dist/ui/assets/{csv-DoNVBBf0.js.gz → csv-l1g_V5MV.js.gz} +0 -0
- /package/dist/ui/assets/{cue-DoTRbBg-.js → cue-BrxRmilg.js} +0 -0
- /package/dist/ui/assets/{cue-DoTRbBg-.js.gz → cue-BrxRmilg.js.gz} +0 -0
- /package/dist/ui/assets/{cypher-DVsNdTT3.js → cypher-rZkKwqZc.js} +0 -0
- /package/dist/ui/assets/{cypher-DVsNdTT3.js.gz → cypher-rZkKwqZc.js.gz} +0 -0
- /package/dist/ui/assets/{cytoscape.esm-bG2wK2kn.js → cytoscape.esm-Bp0gvu9-.js} +0 -0
- /package/dist/ui/assets/{cytoscape.esm-bG2wK2kn.js.gz → cytoscape.esm-Bp0gvu9-.js.gz} +0 -0
- /package/dist/ui/assets/{d-EX7BBSrv.js → d-BALR-QuP.js} +0 -0
- /package/dist/ui/assets/{d-EX7BBSrv.js.gz → d-BALR-QuP.js.gz} +0 -0
- /package/dist/ui/assets/{dark-plus-BQj_4vQ6.js → dark-plus-6-sdRQsJ.js} +0 -0
- /package/dist/ui/assets/{dark-plus-BQj_4vQ6.js.gz → dark-plus-6-sdRQsJ.js.gz} +0 -0
- /package/dist/ui/assets/{dart-D6w0fd55.js → dart-cDhJfKNZ.js} +0 -0
- /package/dist/ui/assets/{dart-D6w0fd55.js.gz → dart-cDhJfKNZ.js.gz} +0 -0
- /package/dist/ui/assets/{dax-DxOieacu.js → dax-BNHD-QBA.js} +0 -0
- /package/dist/ui/assets/{dax-DxOieacu.js.gz → dax-BNHD-QBA.js.gz} +0 -0
- /package/dist/ui/assets/{defaultLocale-J2VcaXOU.js → defaultLocale-DG_4j6Kx.js} +0 -0
- /package/dist/ui/assets/{defaultLocale-J2VcaXOU.js.gz → defaultLocale-DG_4j6Kx.js.gz} +0 -0
- /package/dist/ui/assets/{desktop-CvdV7SBf.js → desktop-CN0IXPrP.js} +0 -0
- /package/dist/ui/assets/{desktop-CvdV7SBf.js.gz → desktop-CN0IXPrP.js.gz} +0 -0
- /package/dist/ui/assets/{diff-CNOetGen.js → diff-BtOXapES.js} +0 -0
- /package/dist/ui/assets/{diff-CNOetGen.js.gz → diff-BtOXapES.js.gz} +0 -0
- /package/dist/ui/assets/{docker-DAlG4_q-.js → docker-DNsAo_qO.js} +0 -0
- /package/dist/ui/assets/{docker-DAlG4_q-.js.gz → docker-DNsAo_qO.js.gz} +0 -0
- /package/dist/ui/assets/{dotenv-Dh3qf6yx.js → dotenv-D6Pl6aOU.js} +0 -0
- /package/dist/ui/assets/{dotenv-Dh3qf6yx.js.gz → dotenv-D6Pl6aOU.js.gz} +0 -0
- /package/dist/ui/assets/{dracula-9O0NCT_h.js → dracula-TrQL2iB5.js} +0 -0
- /package/dist/ui/assets/{dracula-9O0NCT_h.js.gz → dracula-TrQL2iB5.js.gz} +0 -0
- /package/dist/ui/assets/{dracula-soft-C4h6XVJR.js → dracula-soft-n2XOlgh-.js} +0 -0
- /package/dist/ui/assets/{dracula-soft-C4h6XVJR.js.gz → dracula-soft-n2XOlgh-.js.gz} +0 -0
- /package/dist/ui/assets/{dream-maker-DeRjdBn8.js → dream-maker-DZAPbPTi.js} +0 -0
- /package/dist/ui/assets/{dream-maker-DeRjdBn8.js.gz → dream-maker-DZAPbPTi.js.gz} +0 -0
- /package/dist/ui/assets/{emacs-lisp-C8JEGMm-.js → emacs-lisp-LCiceNTZ.js} +0 -0
- /package/dist/ui/assets/{emacs-lisp-C8JEGMm-.js.gz → emacs-lisp-LCiceNTZ.js.gz} +0 -0
- /package/dist/ui/assets/{everforest-dark-DC3iWRDz.js → everforest-dark-BuZahZYp.js} +0 -0
- /package/dist/ui/assets/{everforest-dark-DC3iWRDz.js.gz → everforest-dark-BuZahZYp.js.gz} +0 -0
- /package/dist/ui/assets/{everforest-light-CIhs5wLb.js → everforest-light-DPH53z5H.js} +0 -0
- /package/dist/ui/assets/{everforest-light-CIhs5wLb.js.gz → everforest-light-DPH53z5H.js.gz} +0 -0
- /package/dist/ui/assets/{fennel-CeMarbvn.js → fennel-WuBw6IR1.js} +0 -0
- /package/dist/ui/assets/{fennel-CeMarbvn.js.gz → fennel-WuBw6IR1.js.gz} +0 -0
- /package/dist/ui/assets/{fish-BYrt6Xtb.js → fish-Byy9dusu.js} +0 -0
- /package/dist/ui/assets/{fish-BYrt6Xtb.js.gz → fish-Byy9dusu.js.gz} +0 -0
- /package/dist/ui/assets/{fluent-Cr5VcAwh.js → fluent-CDxb_sgw.js} +0 -0
- /package/dist/ui/assets/{fluent-Cr5VcAwh.js.gz → fluent-CDxb_sgw.js.gz} +0 -0
- /package/dist/ui/assets/{fortran-free-form-B8bF-7ap.js → fortran-free-form-b0ifiAdT.js} +0 -0
- /package/dist/ui/assets/{fortran-free-form-B8bF-7ap.js.gz → fortran-free-form-b0ifiAdT.js.gz} +0 -0
- /package/dist/ui/assets/{gdscript-BhHzbdBS.js → gdscript-Z83oQpnV.js} +0 -0
- /package/dist/ui/assets/{gdscript-BhHzbdBS.js.gz → gdscript-Z83oQpnV.js.gz} +0 -0
- /package/dist/ui/assets/{gdshader-Chr-5UYt.js → gdshader-D-RM-SQk.js} +0 -0
- /package/dist/ui/assets/{gdshader-Chr-5UYt.js.gz → gdshader-D-RM-SQk.js.gz} +0 -0
- /package/dist/ui/assets/{genie-kWHMWnt0.js → genie-CowkJhej.js} +0 -0
- /package/dist/ui/assets/{genie-kWHMWnt0.js.gz → genie-CowkJhej.js.gz} +0 -0
- /package/dist/ui/assets/{gherkin-DtEBQFUo.js → gherkin-CLFpoVYJ.js} +0 -0
- /package/dist/ui/assets/{gherkin-DtEBQFUo.js.gz → gherkin-CLFpoVYJ.js.gz} +0 -0
- /package/dist/ui/assets/{github-dark-DbXvKwaC.js → github-dark-Bf7zdp5s.js} +0 -0
- /package/dist/ui/assets/{github-dark-DbXvKwaC.js.gz → github-dark-Bf7zdp5s.js.gz} +0 -0
- /package/dist/ui/assets/{github-dark-default-CobA03O1.js → github-dark-default-DqsBBV11.js} +0 -0
- /package/dist/ui/assets/{github-dark-default-CobA03O1.js.gz → github-dark-default-DqsBBV11.js.gz} +0 -0
- /package/dist/ui/assets/{github-dark-dimmed-cxsH--DX.js → github-dark-dimmed-X2gqRz6w.js} +0 -0
- /package/dist/ui/assets/{github-dark-dimmed-cxsH--DX.js.gz → github-dark-dimmed-X2gqRz6w.js.gz} +0 -0
- /package/dist/ui/assets/{github-dark-high-contrast-BjBB0JIk.js → github-dark-high-contrast-Z7tvbGX4.js} +0 -0
- /package/dist/ui/assets/{github-dark-high-contrast-BjBB0JIk.js.gz → github-dark-high-contrast-Z7tvbGX4.js.gz} +0 -0
- /package/dist/ui/assets/{github-light-BE6sxIlE.js → github-light-BKxt-7zZ.js} +0 -0
- /package/dist/ui/assets/{github-light-BE6sxIlE.js.gz → github-light-BKxt-7zZ.js.gz} +0 -0
- /package/dist/ui/assets/{github-light-default-BNWs7XBL.js → github-light-default-B0liF4d4.js} +0 -0
- /package/dist/ui/assets/{github-light-default-BNWs7XBL.js.gz → github-light-default-B0liF4d4.js.gz} +0 -0
- /package/dist/ui/assets/{github-light-high-contrast-_RqafDwE.js → github-light-high-contrast-F4encJwr.js} +0 -0
- /package/dist/ui/assets/{github-light-high-contrast-_RqafDwE.js.gz → github-light-high-contrast-F4encJwr.js.gz} +0 -0
- /package/dist/ui/assets/{gleam-BpYoOqIT.js → gleam-DwSyXJWP.js} +0 -0
- /package/dist/ui/assets/{gleam-BpYoOqIT.js.gz → gleam-DwSyXJWP.js.gz} +0 -0
- /package/dist/ui/assets/{gnuplot-DVHIg4_u.js → gnuplot-D7I0v20p.js} +0 -0
- /package/dist/ui/assets/{gnuplot-DVHIg4_u.js.gz → gnuplot-D7I0v20p.js.gz} +0 -0
- /package/dist/ui/assets/{go-DVVuFa_v.js → go-CdUGGF3d.js} +0 -0
- /package/dist/ui/assets/{go-DVVuFa_v.js.gz → go-CdUGGF3d.js.gz} +0 -0
- /package/dist/ui/assets/{groovy-BFwr_gov.js → groovy-DS-pne5-.js} +0 -0
- /package/dist/ui/assets/{groovy-BFwr_gov.js.gz → groovy-DS-pne5-.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-hard-DIiVjZ5v.js → gruvbox-dark-hard-DcoftiUX.js} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-hard-DIiVjZ5v.js.gz → gruvbox-dark-hard-DcoftiUX.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-medium-DDpVVAoZ.js → gruvbox-dark-medium-D1wVSuD8.js} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-medium-DDpVVAoZ.js.gz → gruvbox-dark-medium-D1wVSuD8.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-soft-o4E3Pbzg.js → gruvbox-dark-soft-DWpunymH.js} +0 -0
- /package/dist/ui/assets/{gruvbox-dark-soft-o4E3Pbzg.js.gz → gruvbox-dark-soft-DWpunymH.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-light-hard-D56454Fb.js → gruvbox-light-hard-rHMvyUdS.js} +0 -0
- /package/dist/ui/assets/{gruvbox-light-hard-D56454Fb.js.gz → gruvbox-light-hard-rHMvyUdS.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-light-medium-DiAMHDHG.js → gruvbox-light-medium-3O2KiXO7.js} +0 -0
- /package/dist/ui/assets/{gruvbox-light-medium-DiAMHDHG.js.gz → gruvbox-light-medium-3O2KiXO7.js.gz} +0 -0
- /package/dist/ui/assets/{gruvbox-light-soft-DWYGGtE_.js → gruvbox-light-soft-lNlXJPwH.js} +0 -0
- /package/dist/ui/assets/{gruvbox-light-soft-DWYGGtE_.js.gz → gruvbox-light-soft-lNlXJPwH.js.gz} +0 -0
- /package/dist/ui/assets/{haskell-ugtPwAyp.js → haskell-uQcywkDH.js} +0 -0
- /package/dist/ui/assets/{haskell-ugtPwAyp.js.gz → haskell-uQcywkDH.js.gz} +0 -0
- /package/dist/ui/assets/{haxe-BBLWrl1o.js → haxe-c6bI4_GT.js} +0 -0
- /package/dist/ui/assets/{haxe-BBLWrl1o.js.gz → haxe-c6bI4_GT.js.gz} +0 -0
- /package/dist/ui/assets/{hcl-DT36tIRQ.js → hcl-CQXTiEXq.js} +0 -0
- /package/dist/ui/assets/{hcl-DT36tIRQ.js.gz → hcl-CQXTiEXq.js.gz} +0 -0
- /package/dist/ui/assets/{hjson-pgNGfboC.js → hjson-ChETf2bz.js} +0 -0
- /package/dist/ui/assets/{hjson-pgNGfboC.js.gz → hjson-ChETf2bz.js.gz} +0 -0
- /package/dist/ui/assets/{hlsl-DBQ0L4LS.js → hlsl-BMC4JGoE.js} +0 -0
- /package/dist/ui/assets/{hlsl-DBQ0L4LS.js.gz → hlsl-BMC4JGoE.js.gz} +0 -0
- /package/dist/ui/assets/{houston-Zwt3HUsS.js → houston-Dm4pMJIX.js} +0 -0
- /package/dist/ui/assets/{houston-Zwt3HUsS.js.gz → houston-Dm4pMJIX.js.gz} +0 -0
- /package/dist/ui/assets/{hy-CNQJAZDy.js → hy-D_SOuqw9.js} +0 -0
- /package/dist/ui/assets/{hy-CNQJAZDy.js.gz → hy-D_SOuqw9.js.gz} +0 -0
- /package/dist/ui/assets/{imba-BGnUe1wa.js → imba-BxLOHO5I.js} +0 -0
- /package/dist/ui/assets/{imba-BGnUe1wa.js.gz → imba-BxLOHO5I.js.gz} +0 -0
- /package/dist/ui/assets/{ini-BMTt2XT3.js → ini-ox-CFcg0.js} +0 -0
- /package/dist/ui/assets/{ini-BMTt2XT3.js.gz → ini-ox-CFcg0.js.gz} +0 -0
- /package/dist/ui/assets/{init-D0iKTvvc.js → init-B-FmraLM.js} +0 -0
- /package/dist/ui/assets/{json5-BBYWC0Tt.js → json5-CEQ50pGM.js} +0 -0
- /package/dist/ui/assets/{json5-BBYWC0Tt.js.gz → json5-CEQ50pGM.js.gz} +0 -0
- /package/dist/ui/assets/{jsonc-BOMuuHnX.js → jsonc-CfrLEAKA.js} +0 -0
- /package/dist/ui/assets/{jsonc-BOMuuHnX.js.gz → jsonc-CfrLEAKA.js.gz} +0 -0
- /package/dist/ui/assets/{jsonl-e8rdbfck.js → jsonl-fKbrANC2.js} +0 -0
- /package/dist/ui/assets/{jsonl-e8rdbfck.js.gz → jsonl-fKbrANC2.js.gz} +0 -0
- /package/dist/ui/assets/{jsonnet-BzniseuI.js → jsonnet-DKbkPaQ2.js} +0 -0
- /package/dist/ui/assets/{jsonnet-BzniseuI.js.gz → jsonnet-DKbkPaQ2.js.gz} +0 -0
- /package/dist/ui/assets/{jssm-CY6UrqjZ.js → jssm-Dxxx1Hqu.js} +0 -0
- /package/dist/ui/assets/{jssm-CY6UrqjZ.js.gz → jssm-Dxxx1Hqu.js.gz} +0 -0
- /package/dist/ui/assets/{kanagawa-dragon-DzZvlhdB.js → kanagawa-dragon-q3IZG2mU.js} +0 -0
- /package/dist/ui/assets/{kanagawa-dragon-DzZvlhdB.js.gz → kanagawa-dragon-q3IZG2mU.js.gz} +0 -0
- /package/dist/ui/assets/{kanagawa-lotus-DmYapFvr.js → kanagawa-lotus-BbU5dcfH.js} +0 -0
- /package/dist/ui/assets/{kanagawa-lotus-DmYapFvr.js.gz → kanagawa-lotus-BbU5dcfH.js.gz} +0 -0
- /package/dist/ui/assets/{kanagawa-wave-C1qJDn8L.js → kanagawa-wave-Bi3j39e9.js} +0 -0
- /package/dist/ui/assets/{kanagawa-wave-C1qJDn8L.js.gz → kanagawa-wave-Bi3j39e9.js.gz} +0 -0
- /package/dist/ui/assets/{kdl-DXSsFcms.js → kdl-DilRejnB.js} +0 -0
- /package/dist/ui/assets/{kdl-DXSsFcms.js.gz → kdl-DilRejnB.js.gz} +0 -0
- /package/dist/ui/assets/{kotlin-BXNIvloo.js → kotlin-Bq5JtKaa.js} +0 -0
- /package/dist/ui/assets/{kotlin-BXNIvloo.js.gz → kotlin-Bq5JtKaa.js.gz} +0 -0
- /package/dist/ui/assets/{kusto-DyvXgApB.js → kusto-CMLknW_P.js} +0 -0
- /package/dist/ui/assets/{kusto-DyvXgApB.js.gz → kusto-CMLknW_P.js.gz} +0 -0
- /package/dist/ui/assets/{laserwave-g0nW5bXd.js → laserwave-B4XktGfw.js} +0 -0
- /package/dist/ui/assets/{laserwave-g0nW5bXd.js.gz → laserwave-B4XktGfw.js.gz} +0 -0
- /package/dist/ui/assets/{lean-BbTEyJjM.js → lean-C4UuPQSX.js} +0 -0
- /package/dist/ui/assets/{lean-BbTEyJjM.js.gz → lean-C4UuPQSX.js.gz} +0 -0
- /package/dist/ui/assets/{less-CcUdtNJi.js → less-NPqH-26u.js} +0 -0
- /package/dist/ui/assets/{less-CcUdtNJi.js.gz → less-NPqH-26u.js.gz} +0 -0
- /package/dist/ui/assets/{light-plus-CCtpI6za.js → light-plus-CjS5UTgi.js} +0 -0
- /package/dist/ui/assets/{light-plus-CCtpI6za.js.gz → light-plus-CjS5UTgi.js.gz} +0 -0
- /package/dist/ui/assets/{llvm-B2zVRyMh.js → llvm-kbnqb_J_.js} +0 -0
- /package/dist/ui/assets/{llvm-B2zVRyMh.js.gz → llvm-kbnqb_J_.js.gz} +0 -0
- /package/dist/ui/assets/{log-BOi0GB58.js → log-CeQmiQSz.js} +0 -0
- /package/dist/ui/assets/{log-BOi0GB58.js.gz → log-CeQmiQSz.js.gz} +0 -0
- /package/dist/ui/assets/{logo-BQUr3X2Y.js → logo-BO0VrjBm.js} +0 -0
- /package/dist/ui/assets/{logo-BQUr3X2Y.js.gz → logo-BO0VrjBm.js.gz} +0 -0
- /package/dist/ui/assets/{luau-lW-8-_nM.js → luau-CGfWFUT1.js} +0 -0
- /package/dist/ui/assets/{luau-lW-8-_nM.js.gz → luau-CGfWFUT1.js.gz} +0 -0
- /package/dist/ui/assets/{make-DEkKRDRU.js → make-CwfmN7e_.js} +0 -0
- /package/dist/ui/assets/{make-DEkKRDRU.js.gz → make-CwfmN7e_.js.gz} +0 -0
- /package/dist/ui/assets/{markdown-Bbe4FlLp.js → markdown-p5mNledS.js} +0 -0
- /package/dist/ui/assets/{markdown-Bbe4FlLp.js.gz → markdown-p5mNledS.js.gz} +0 -0
- /package/dist/ui/assets/{material-theme-CEHn_EMH.js → material-theme-B0GuAxhl.js} +0 -0
- /package/dist/ui/assets/{material-theme-CEHn_EMH.js.gz → material-theme-B0GuAxhl.js.gz} +0 -0
- /package/dist/ui/assets/{material-theme-darker-2KMnm9X3.js → material-theme-darker-CZbc7JwZ.js} +0 -0
- /package/dist/ui/assets/{material-theme-darker-2KMnm9X3.js.gz → material-theme-darker-CZbc7JwZ.js.gz} +0 -0
- /package/dist/ui/assets/{material-theme-lighter-zObzHm6J.js → material-theme-lighter-Burc_UpA.js} +0 -0
- /package/dist/ui/assets/{material-theme-lighter-zObzHm6J.js.gz → material-theme-lighter-Burc_UpA.js.gz} +0 -0
- /package/dist/ui/assets/{material-theme-ocean-anb4hh1p.js → material-theme-ocean-B_2uOeYL.js} +0 -0
- /package/dist/ui/assets/{material-theme-ocean-anb4hh1p.js.gz → material-theme-ocean-B_2uOeYL.js.gz} +0 -0
- /package/dist/ui/assets/{material-theme-palenight-DND8OrJk.js → material-theme-palenight-Byy4sFv9.js} +0 -0
- /package/dist/ui/assets/{material-theme-palenight-DND8OrJk.js.gz → material-theme-palenight-Byy4sFv9.js.gz} +0 -0
- /package/dist/ui/assets/{math-wh5kcxAa.js → math-CYpgkRbw.js} +0 -0
- /package/dist/ui/assets/{matlab-BqUtv2ml.js → matlab-Z0RUE3V_.js} +0 -0
- /package/dist/ui/assets/{matlab-BqUtv2ml.js.gz → matlab-Z0RUE3V_.js.gz} +0 -0
- /package/dist/ui/assets/{mdx-DFMrnHBn.js → mdx-BZ5wPYzV.js} +0 -0
- /package/dist/ui/assets/{mdx-DFMrnHBn.js.gz → mdx-BZ5wPYzV.js.gz} +0 -0
- /package/dist/ui/assets/{mermaid-CIvcxrVi.js → mermaid-CQEYbjeg.js} +0 -0
- /package/dist/ui/assets/{mermaid-CIvcxrVi.js.gz → mermaid-CQEYbjeg.js.gz} +0 -0
- /package/dist/ui/assets/{min-dark-Bk3ZYVFB.js → min-dark-dyk1cWlJ.js} +0 -0
- /package/dist/ui/assets/{min-dark-Bk3ZYVFB.js.gz → min-dark-dyk1cWlJ.js.gz} +0 -0
- /package/dist/ui/assets/{min-light-C_asTWEt.js → min-light-qP5B9k9w.js} +0 -0
- /package/dist/ui/assets/{min-light-C_asTWEt.js.gz → min-light-qP5B9k9w.js.gz} +0 -0
- /package/dist/ui/assets/{mipsasm-DHhEcvKr.js → mipsasm-BiDfQ4ir.js} +0 -0
- /package/dist/ui/assets/{mipsasm-DHhEcvKr.js.gz → mipsasm-BiDfQ4ir.js.gz} +0 -0
- /package/dist/ui/assets/{mojo-C3N46qB5.js → mojo-ClTYvVcC.js} +0 -0
- /package/dist/ui/assets/{mojo-C3N46qB5.js.gz → mojo-ClTYvVcC.js.gz} +0 -0
- /package/dist/ui/assets/{monokai-C7k9EUva.js → monokai-6LF27W_4.js} +0 -0
- /package/dist/ui/assets/{monokai-C7k9EUva.js.gz → monokai-6LF27W_4.js.gz} +0 -0
- /package/dist/ui/assets/{move-CusfaN2-.js → move-wDL8A3rt.js} +0 -0
- /package/dist/ui/assets/{move-CusfaN2-.js.gz → move-wDL8A3rt.js.gz} +0 -0
- /package/dist/ui/assets/{narrat-DX4JlAWT.js → narrat-CJM4VEN6.js} +0 -0
- /package/dist/ui/assets/{narrat-DX4JlAWT.js.gz → narrat-CJM4VEN6.js.gz} +0 -0
- /package/dist/ui/assets/{nextflow-B7XS6PJl.js → nextflow-C8KeIjDS.js} +0 -0
- /package/dist/ui/assets/{nextflow-B7XS6PJl.js.gz → nextflow-C8KeIjDS.js.gz} +0 -0
- /package/dist/ui/assets/{night-owl-CVr1Acvt.js → night-owl-DPwAj-n1.js} +0 -0
- /package/dist/ui/assets/{night-owl-CVr1Acvt.js.gz → night-owl-DPwAj-n1.js.gz} +0 -0
- /package/dist/ui/assets/{nix-CaWnD8tM.js → nix-CLrXRb5w.js} +0 -0
- /package/dist/ui/assets/{nix-CaWnD8tM.js.gz → nix-CLrXRb5w.js.gz} +0 -0
- /package/dist/ui/assets/{nord-o0gm5mt_.js → nord-4tR4EUY1.js} +0 -0
- /package/dist/ui/assets/{nord-o0gm5mt_.js.gz → nord-4tR4EUY1.js.gz} +0 -0
- /package/dist/ui/assets/{nushell-Bq0SS8Mg.js → nushell-BoOxC5jA.js} +0 -0
- /package/dist/ui/assets/{nushell-Bq0SS8Mg.js.gz → nushell-BoOxC5jA.js.gz} +0 -0
- /package/dist/ui/assets/{objective-c-CO0-Pacn.js → objective-c-CoeQAcnP.js} +0 -0
- /package/dist/ui/assets/{objective-c-CO0-Pacn.js.gz → objective-c-CoeQAcnP.js.gz} +0 -0
- /package/dist/ui/assets/{objective-cpp-SkrjegYw.js → objective-cpp-BysdFvND.js} +0 -0
- /package/dist/ui/assets/{objective-cpp-SkrjegYw.js.gz → objective-cpp-BysdFvND.js.gz} +0 -0
- /package/dist/ui/assets/{ocaml-CAihtkib.js → ocaml-CrtQYMMK.js} +0 -0
- /package/dist/ui/assets/{ocaml-CAihtkib.js.gz → ocaml-CrtQYMMK.js.gz} +0 -0
- /package/dist/ui/assets/{one-dark-pro-ClpNRdFi.js → one-dark-pro-oX5X9zOn.js} +0 -0
- /package/dist/ui/assets/{one-dark-pro-ClpNRdFi.js.gz → one-dark-pro-oX5X9zOn.js.gz} +0 -0
- /package/dist/ui/assets/{one-light-CKcLUzba.js → one-light-DAxrckAs.js} +0 -0
- /package/dist/ui/assets/{one-light-CKcLUzba.js.gz → one-light-DAxrckAs.js.gz} +0 -0
- /package/dist/ui/assets/{pascal-DMt-6tdZ.js → pascal-RcT1dQYN.js} +0 -0
- /package/dist/ui/assets/{pascal-DMt-6tdZ.js.gz → pascal-RcT1dQYN.js.gz} +0 -0
- /package/dist/ui/assets/{path-BoFZ_ZCz.js → path-BKCho5uS.js} +0 -0
- /package/dist/ui/assets/{path-BoFZ_ZCz.js.gz → path-BKCho5uS.js.gz} +0 -0
- /package/dist/ui/assets/{pkl-CTiPytg-.js → pkl-D6gRI9qQ.js} +0 -0
- /package/dist/ui/assets/{pkl-CTiPytg-.js.gz → pkl-D6gRI9qQ.js.gz} +0 -0
- /package/dist/ui/assets/{plastic-DWi5jYUY.js → plastic-DIfRaaE3.js} +0 -0
- /package/dist/ui/assets/{plastic-DWi5jYUY.js.gz → plastic-DIfRaaE3.js.gz} +0 -0
- /package/dist/ui/assets/{plsql-D_gbgZIr.js → plsql-CTDnCVE3.js} +0 -0
- /package/dist/ui/assets/{plsql-D_gbgZIr.js.gz → plsql-CTDnCVE3.js.gz} +0 -0
- /package/dist/ui/assets/{po-BkhbDUnq.js → po-DDnzm7AQ.js} +0 -0
- /package/dist/ui/assets/{po-BkhbDUnq.js.gz → po-DDnzm7AQ.js.gz} +0 -0
- /package/dist/ui/assets/{poimandres-MXtqikSE.js → poimandres-CB89Guv8.js} +0 -0
- /package/dist/ui/assets/{poimandres-MXtqikSE.js.gz → poimandres-CB89Guv8.js.gz} +0 -0
- /package/dist/ui/assets/{polar-B3B23wca.js → polar-WBTQdMzX.js} +0 -0
- /package/dist/ui/assets/{polar-B3B23wca.js.gz → polar-WBTQdMzX.js.gz} +0 -0
- /package/dist/ui/assets/{postcss-BgJlpFdw.js → postcss-71Z6AbWU.js} +0 -0
- /package/dist/ui/assets/{postcss-BgJlpFdw.js.gz → postcss-71Z6AbWU.js.gz} +0 -0
- /package/dist/ui/assets/{powerquery-fKJWI-Sh.js → powerquery-DVtReIRR.js} +0 -0
- /package/dist/ui/assets/{powerquery-fKJWI-Sh.js.gz → powerquery-DVtReIRR.js.gz} +0 -0
- /package/dist/ui/assets/{powershell-B4Y7KIgx.js → powershell-Cb_RNzSh.js} +0 -0
- /package/dist/ui/assets/{powershell-B4Y7KIgx.js.gz → powershell-Cb_RNzSh.js.gz} +0 -0
- /package/dist/ui/assets/{prisma-J--XdTXX.js → prisma-nKLUh3DY.js} +0 -0
- /package/dist/ui/assets/{prisma-J--XdTXX.js.gz → prisma-nKLUh3DY.js.gz} +0 -0
- /package/dist/ui/assets/{prolog-BBTg4Vb3.js → prolog-BD9orEy4.js} +0 -0
- /package/dist/ui/assets/{prolog-BBTg4Vb3.js.gz → prolog-BD9orEy4.js.gz} +0 -0
- /package/dist/ui/assets/{proto-DSztQ_bU.js → proto-B1UzJWnD.js} +0 -0
- /package/dist/ui/assets/{proto-DSztQ_bU.js.gz → proto-B1UzJWnD.js.gz} +0 -0
- /package/dist/ui/assets/{puppet-ZiUfc9JV.js → puppet-DDW6wWm4.js} +0 -0
- /package/dist/ui/assets/{puppet-ZiUfc9JV.js.gz → puppet-DDW6wWm4.js.gz} +0 -0
- /package/dist/ui/assets/{purescript-CmT8SCHB.js → purescript-DXy49AJg.js} +0 -0
- /package/dist/ui/assets/{purescript-CmT8SCHB.js.gz → purescript-DXy49AJg.js.gz} +0 -0
- /package/dist/ui/assets/{python-DUH8qy7N.js → python-C7TlkHhK.js} +0 -0
- /package/dist/ui/assets/{python-DUH8qy7N.js.gz → python-C7TlkHhK.js.gz} +0 -0
- /package/dist/ui/assets/{qmldir-CpaiJywQ.js → qmldir-CboMQXQW.js} +0 -0
- /package/dist/ui/assets/{qss-C-zdz0i5.js → qss-8XaprLEt.js} +0 -0
- /package/dist/ui/assets/{qss-C-zdz0i5.js.gz → qss-8XaprLEt.js.gz} +0 -0
- /package/dist/ui/assets/{racket-gkn6Z_Jw.js → racket-ChcVp15M.js} +0 -0
- /package/dist/ui/assets/{racket-gkn6Z_Jw.js.gz → racket-ChcVp15M.js.gz} +0 -0
- /package/dist/ui/assets/{raku-C0ZBuKlx.js → raku-dEgEXW0A.js} +0 -0
- /package/dist/ui/assets/{raku-C0ZBuKlx.js.gz → raku-dEgEXW0A.js.gz} +0 -0
- /package/dist/ui/assets/{red-BdLeDZaD.js → red-Re2PfUSD.js} +0 -0
- /package/dist/ui/assets/{red-BdLeDZaD.js.gz → red-Re2PfUSD.js.gz} +0 -0
- /package/dist/ui/assets/{reg-Dt_EsyGR.js → reg-CIkOufh2.js} +0 -0
- /package/dist/ui/assets/{reg-Dt_EsyGR.js.gz → reg-CIkOufh2.js.gz} +0 -0
- /package/dist/ui/assets/{rel-MJ2LcyzJ.js → rel-NXKKDiTi.js} +0 -0
- /package/dist/ui/assets/{rel-MJ2LcyzJ.js.gz → rel-NXKKDiTi.js.gz} +0 -0
- /package/dist/ui/assets/{riscv-BZYWzMAA.js → riscv-BEIzhPcg.js} +0 -0
- /package/dist/ui/assets/{riscv-BZYWzMAA.js.gz → riscv-BEIzhPcg.js.gz} +0 -0
- /package/dist/ui/assets/{chunk-Dlc7tRH4.js → rolldown-runtime-BTPm5ob3.js} +0 -0
- /package/dist/ui/assets/{rose-pine-Bk7vPZOm.js → rose-pine-BQeRdYLJ.js} +0 -0
- /package/dist/ui/assets/{rose-pine-Bk7vPZOm.js.gz → rose-pine-BQeRdYLJ.js.gz} +0 -0
- /package/dist/ui/assets/{rose-pine-dawn-Cr_sMvsE.js → rose-pine-dawn-3omAcPQc.js} +0 -0
- /package/dist/ui/assets/{rose-pine-dawn-Cr_sMvsE.js.gz → rose-pine-dawn-3omAcPQc.js.gz} +0 -0
- /package/dist/ui/assets/{rose-pine-moon-CiKfOgrI.js → rose-pine-moon-BlvDKTaG.js} +0 -0
- /package/dist/ui/assets/{rose-pine-moon-CiKfOgrI.js.gz → rose-pine-moon-BlvDKTaG.js.gz} +0 -0
- /package/dist/ui/assets/{rosmsg-NtS6429H.js → rosmsg-CPG8X-D5.js} +0 -0
- /package/dist/ui/assets/{rosmsg-NtS6429H.js.gz → rosmsg-CPG8X-D5.js.gz} +0 -0
- /package/dist/ui/assets/{rust-BjIXvF9h.js → rust-CxfW3ePx.js} +0 -0
- /package/dist/ui/assets/{rust-BjIXvF9h.js.gz → rust-CxfW3ePx.js.gz} +0 -0
- /package/dist/ui/assets/{sass-CQ23wf5E.js → sass-D-7bxo_L.js} +0 -0
- /package/dist/ui/assets/{sass-CQ23wf5E.js.gz → sass-D-7bxo_L.js.gz} +0 -0
- /package/dist/ui/assets/{scala-LfKLM143.js → scala-DyUsfHNc.js} +0 -0
- /package/dist/ui/assets/{scala-LfKLM143.js.gz → scala-DyUsfHNc.js.gz} +0 -0
- /package/dist/ui/assets/{scheme-D3SLBXlF.js → scheme-ROgrwiO-.js} +0 -0
- /package/dist/ui/assets/{scheme-D3SLBXlF.js.gz → scheme-ROgrwiO-.js.gz} +0 -0
- /package/dist/ui/assets/{sdbl-uNtUZPJf.js → sdbl-BZVFf6k0.js} +0 -0
- /package/dist/ui/assets/{sdbl-uNtUZPJf.js.gz → sdbl-BZVFf6k0.js.gz} +0 -0
- /package/dist/ui/assets/{slack-dark-DmjKz1P2.js → slack-dark-2MJp1HDM.js} +0 -0
- /package/dist/ui/assets/{slack-dark-DmjKz1P2.js.gz → slack-dark-2MJp1HDM.js.gz} +0 -0
- /package/dist/ui/assets/{slack-ochin-wTZATI9h.js → slack-ochin-CsJ-XTso.js} +0 -0
- /package/dist/ui/assets/{slack-ochin-wTZATI9h.js.gz → slack-ochin-CsJ-XTso.js.gz} +0 -0
- /package/dist/ui/assets/{smalltalk-haMT-Sbe.js → smalltalk-B-1waXvA.js} +0 -0
- /package/dist/ui/assets/{smalltalk-haMT-Sbe.js.gz → smalltalk-B-1waXvA.js.gz} +0 -0
- /package/dist/ui/assets/{snazzy-light-B42aLgZJ.js → snazzy-light-Camp4WtP.js} +0 -0
- /package/dist/ui/assets/{snazzy-light-B42aLgZJ.js.gz → snazzy-light-Camp4WtP.js.gz} +0 -0
- /package/dist/ui/assets/{solarized-dark-DInn5w8o.js → solarized-dark-DDu7grB1.js} +0 -0
- /package/dist/ui/assets/{solarized-dark-DInn5w8o.js.gz → solarized-dark-DDu7grB1.js.gz} +0 -0
- /package/dist/ui/assets/{solarized-light-CEaI6xSe.js → solarized-light-BYMct7jG.js} +0 -0
- /package/dist/ui/assets/{solarized-light-CEaI6xSe.js.gz → solarized-light-BYMct7jG.js.gz} +0 -0
- /package/dist/ui/assets/{solidity-DBt9QkC7.js → solidity-CiH5MylZ.js} +0 -0
- /package/dist/ui/assets/{solidity-DBt9QkC7.js.gz → solidity-CiH5MylZ.js.gz} +0 -0
- /package/dist/ui/assets/{splunk-CyH4RWBp.js → splunk-jK6-Sr06.js} +0 -0
- /package/dist/ui/assets/{splunk-CyH4RWBp.js.gz → splunk-jK6-Sr06.js.gz} +0 -0
- /package/dist/ui/assets/{ssh-config-DNvQJ1Qx.js → ssh-config-Bimb9LVr.js} +0 -0
- /package/dist/ui/assets/{ssh-config-DNvQJ1Qx.js.gz → ssh-config-Bimb9LVr.js.gz} +0 -0
- /package/dist/ui/assets/{stylus-ByQQdtmf.js → stylus-B2DgJRJw.js} +0 -0
- /package/dist/ui/assets/{stylus-ByQQdtmf.js.gz → stylus-B2DgJRJw.js.gz} +0 -0
- /package/dist/ui/assets/{swift-DVgZOUl-.js → swift-CwRJfzBN.js} +0 -0
- /package/dist/ui/assets/{swift-DVgZOUl-.js.gz → swift-CwRJfzBN.js.gz} +0 -0
- /package/dist/ui/assets/{synthwave-84-yMxuZek_.js → synthwave-84-DPp_gDgI.js} +0 -0
- /package/dist/ui/assets/{synthwave-84-yMxuZek_.js.gz → synthwave-84-DPp_gDgI.js.gz} +0 -0
- /package/dist/ui/assets/{system-verilog-Cv7eEmhY.js → system-verilog-CgxJCrOK.js} +0 -0
- /package/dist/ui/assets/{system-verilog-Cv7eEmhY.js.gz → system-verilog-CgxJCrOK.js.gz} +0 -0
- /package/dist/ui/assets/{systemd-BrXm7juI.js → systemd-D0x7_XYJ.js} +0 -0
- /package/dist/ui/assets/{systemd-BrXm7juI.js.gz → systemd-D0x7_XYJ.js.gz} +0 -0
- /package/dist/ui/assets/{talonscript-DTHAQXnS.js → talonscript-B50aQRuc.js} +0 -0
- /package/dist/ui/assets/{talonscript-DTHAQXnS.js.gz → talonscript-B50aQRuc.js.gz} +0 -0
- /package/dist/ui/assets/{tasl-zt-Vfd45.js → tasl-Byv8gHCL.js} +0 -0
- /package/dist/ui/assets/{tasl-zt-Vfd45.js.gz → tasl-Byv8gHCL.js.gz} +0 -0
- /package/dist/ui/assets/{tcl-GHRwRdsa.js → tcl-CzMjCzWo.js} +0 -0
- /package/dist/ui/assets/{tcl-GHRwRdsa.js.gz → tcl-CzMjCzWo.js.gz} +0 -0
- /package/dist/ui/assets/{terraform-BQ2cKJgC.js → terraform-D6GH4CXG.js} +0 -0
- /package/dist/ui/assets/{terraform-BQ2cKJgC.js.gz → terraform-D6GH4CXG.js.gz} +0 -0
- /package/dist/ui/assets/{tokyo-night-C-nBGA2n.js → tokyo-night-CjFWOaYp.js} +0 -0
- /package/dist/ui/assets/{tokyo-night-C-nBGA2n.js.gz → tokyo-night-CjFWOaYp.js.gz} +0 -0
- /package/dist/ui/assets/{toml-CBtmqnm-.js → toml-D9W-BuJE.js} +0 -0
- /package/dist/ui/assets/{toml-CBtmqnm-.js.gz → toml-D9W-BuJE.js.gz} +0 -0
- /package/dist/ui/assets/{tsv-C1H1VoSx.js → tsv-BddanT8p.js} +0 -0
- /package/dist/ui/assets/{turtle-B4r8KEJH.js → turtle-2DYvssFL.js} +0 -0
- /package/dist/ui/assets/{turtle-B4r8KEJH.js.gz → turtle-2DYvssFL.js.gz} +0 -0
- /package/dist/ui/assets/{typespec-Du0oqdlE.js → typespec-CIriBESi.js} +0 -0
- /package/dist/ui/assets/{typespec-Du0oqdlE.js.gz → typespec-CIriBESi.js.gz} +0 -0
- /package/dist/ui/assets/{typst-BmuByvwG.js → typst-Bxvc-9ID.js} +0 -0
- /package/dist/ui/assets/{typst-BmuByvwG.js.gz → typst-Bxvc-9ID.js.gz} +0 -0
- /package/dist/ui/assets/{v-BRcsIrqX.js → v-kVYZE10o.js} +0 -0
- /package/dist/ui/assets/{v-BRcsIrqX.js.gz → v-kVYZE10o.js.gz} +0 -0
- /package/dist/ui/assets/{vala-BZRF0LXd.js → vala-B3zj44PV.js} +0 -0
- /package/dist/ui/assets/{vala-BZRF0LXd.js.gz → vala-B3zj44PV.js.gz} +0 -0
- /package/dist/ui/assets/{vb-D3FN65pY.js → vb-CHgWrFTj.js} +0 -0
- /package/dist/ui/assets/{vb-D3FN65pY.js.gz → vb-CHgWrFTj.js.gz} +0 -0
- /package/dist/ui/assets/{verilog-Bax1T7Ug.js → verilog-zIMuE3hE.js} +0 -0
- /package/dist/ui/assets/{verilog-Bax1T7Ug.js.gz → verilog-zIMuE3hE.js.gz} +0 -0
- /package/dist/ui/assets/{vesper-Bc6c4xT4.js → vesper-7jKoPtxy.js} +0 -0
- /package/dist/ui/assets/{vesper-Bc6c4xT4.js.gz → vesper-7jKoPtxy.js.gz} +0 -0
- /package/dist/ui/assets/{vhdl-B9zCQ6A-.js → vhdl-Q2EtgpQN.js} +0 -0
- /package/dist/ui/assets/{vhdl-B9zCQ6A-.js.gz → vhdl-Q2EtgpQN.js.gz} +0 -0
- /package/dist/ui/assets/{viml-BCl3wyyZ.js → viml-CrtDZkFz.js} +0 -0
- /package/dist/ui/assets/{viml-BCl3wyyZ.js.gz → viml-CrtDZkFz.js.gz} +0 -0
- /package/dist/ui/assets/{vitesse-black-CbgIKamS.js → vitesse-black-DaToSKPE.js} +0 -0
- /package/dist/ui/assets/{vitesse-black-CbgIKamS.js.gz → vitesse-black-DaToSKPE.js.gz} +0 -0
- /package/dist/ui/assets/{vitesse-dark-DZgc4dHD.js → vitesse-dark-DSPFdD5i.js} +0 -0
- /package/dist/ui/assets/{vitesse-dark-DZgc4dHD.js.gz → vitesse-dark-DSPFdD5i.js.gz} +0 -0
- /package/dist/ui/assets/{vitesse-light-D7auQmSc.js → vitesse-light-CRe2ZnfQ.js} +0 -0
- /package/dist/ui/assets/{vitesse-light-D7auQmSc.js.gz → vitesse-light-CRe2ZnfQ.js.gz} +0 -0
- /package/dist/ui/assets/{vyper-BYrgo6ur.js → vyper-LQ1KxOUo.js} +0 -0
- /package/dist/ui/assets/{vyper-BYrgo6ur.js.gz → vyper-LQ1KxOUo.js.gz} +0 -0
- /package/dist/ui/assets/{wasm-CDG3n-2O.js → wasm-B-mpMVDM.js} +0 -0
- /package/dist/ui/assets/{wasm-CDG3n-2O.js.gz → wasm-B-mpMVDM.js.gz} +0 -0
- /package/dist/ui/assets/{wasm-F1qu14fG.js → wasm-C02wlRbP.js} +0 -0
- /package/dist/ui/assets/{wasm-F1qu14fG.js.gz → wasm-C02wlRbP.js.gz} +0 -0
- /package/dist/ui/assets/{wenyan-DIFdJTeO.js → wenyan-LqMyA7px.js} +0 -0
- /package/dist/ui/assets/{wenyan-DIFdJTeO.js.gz → wenyan-LqMyA7px.js.gz} +0 -0
- /package/dist/ui/assets/{wgsl-BRMdbmEG.js → wgsl-eI4U21sm.js} +0 -0
- /package/dist/ui/assets/{wgsl-BRMdbmEG.js.gz → wgsl-eI4U21sm.js.gz} +0 -0
- /package/dist/ui/assets/{wikitext-C3lCp3rO.js → wikitext-CuWC2dfS.js} +0 -0
- /package/dist/ui/assets/{wikitext-C3lCp3rO.js.gz → wikitext-CuWC2dfS.js.gz} +0 -0
- /package/dist/ui/assets/{wit-mtnHY5XL.js → wit-CCPY0MNz.js} +0 -0
- /package/dist/ui/assets/{wit-mtnHY5XL.js.gz → wit-CCPY0MNz.js.gz} +0 -0
- /package/dist/ui/assets/{wolfram-CDkq298A.js → wolfram-CXhjyJun.js} +0 -0
- /package/dist/ui/assets/{wolfram-CDkq298A.js.gz → wolfram-CXhjyJun.js.gz} +0 -0
- /package/dist/ui/assets/{zenscript-D714k2Tj.js → zenscript-BzHPI08Q.js} +0 -0
- /package/dist/ui/assets/{zenscript-D714k2Tj.js.gz → zenscript-BzHPI08Q.js.gz} +0 -0
- /package/dist/ui/assets/{zig-C2OcFVIf.js → zig-CBuhKUve.js} +0 -0
- /package/dist/ui/assets/{zig-C2OcFVIf.js.gz → zig-CBuhKUve.js.gz} +0 -0
|
@@ -8,7 +8,121 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
+
// src/utils/append-system-message.ts
|
|
12
|
+
import { generateId, SessionRepository as SessionRepository2 } from "@agor/core/db";
|
|
13
|
+
import { MessageRole } from "@agor/core/types";
|
|
14
|
+
async function appendSystemMessage(opts) {
|
|
15
|
+
const {
|
|
16
|
+
app,
|
|
17
|
+
db,
|
|
18
|
+
sessionId,
|
|
19
|
+
taskId,
|
|
20
|
+
content,
|
|
21
|
+
contentPreview,
|
|
22
|
+
type = "system",
|
|
23
|
+
role = MessageRole.SYSTEM,
|
|
24
|
+
metadata,
|
|
25
|
+
params
|
|
26
|
+
} = opts;
|
|
27
|
+
const index = await new SessionRepository2(db).countMessages(sessionId);
|
|
28
|
+
const preview = contentPreview ?? (typeof content === "string" ? content.substring(0, 200) : "");
|
|
29
|
+
const message = {
|
|
30
|
+
message_id: generateId(),
|
|
31
|
+
session_id: sessionId,
|
|
32
|
+
task_id: taskId,
|
|
33
|
+
type,
|
|
34
|
+
role,
|
|
35
|
+
index,
|
|
36
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
37
|
+
content_preview: preview,
|
|
38
|
+
content,
|
|
39
|
+
...metadata ? { metadata } : {}
|
|
40
|
+
};
|
|
41
|
+
const created = await app.service("messages").create(message, params ?? {});
|
|
42
|
+
return created;
|
|
43
|
+
}
|
|
44
|
+
var init_append_system_message = __esm({
|
|
45
|
+
"src/utils/append-system-message.ts"() {
|
|
46
|
+
"use strict";
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// src/utils/build-initial-user-message.ts
|
|
51
|
+
import { generateId as generateId2 } from "@agor/core/db";
|
|
52
|
+
import { MessageRole as MessageRole2 } from "@agor/core/types";
|
|
53
|
+
function buildInitialUserMessage(input) {
|
|
54
|
+
const preview = typeof input.content === "string" ? input.content.slice(0, CONTENT_PREVIEW_MAX_CHARS) : safeStringify(input.content).slice(0, CONTENT_PREVIEW_MAX_CHARS);
|
|
55
|
+
return {
|
|
56
|
+
message_id: generateId2(),
|
|
57
|
+
session_id: input.sessionId,
|
|
58
|
+
task_id: input.taskId,
|
|
59
|
+
type: input.type ?? "user",
|
|
60
|
+
role: MessageRole2.USER,
|
|
61
|
+
index: input.index,
|
|
62
|
+
timestamp: input.timestamp,
|
|
63
|
+
content_preview: preview,
|
|
64
|
+
content: input.content,
|
|
65
|
+
metadata: input.metadata
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function safeStringify(value) {
|
|
69
|
+
if (value == null) return "";
|
|
70
|
+
try {
|
|
71
|
+
return JSON.stringify(value);
|
|
72
|
+
} catch {
|
|
73
|
+
return String(value);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var CONTENT_PREVIEW_MAX_CHARS;
|
|
77
|
+
var init_build_initial_user_message = __esm({
|
|
78
|
+
"src/utils/build-initial-user-message.ts"() {
|
|
79
|
+
"use strict";
|
|
80
|
+
CONTENT_PREVIEW_MAX_CHARS = 200;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/utils/session-tasks.ts
|
|
85
|
+
import { TaskStatus } from "@agor/core/types";
|
|
86
|
+
function recencyKey(t) {
|
|
87
|
+
return new Date(t.started_at || t.created_at).getTime();
|
|
88
|
+
}
|
|
89
|
+
async function findTasksForSession(app, sessionId, params) {
|
|
90
|
+
const result = await app.service("tasks").find({
|
|
91
|
+
...params ?? {},
|
|
92
|
+
// Merge defensively: spread params first, then force session_id so a
|
|
93
|
+
// caller-supplied params.query can never silently overwrite the filter.
|
|
94
|
+
query: {
|
|
95
|
+
...params?.query,
|
|
96
|
+
session_id: sessionId,
|
|
97
|
+
$limit: params?.query?.$limit ?? 1e3
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const tasks = Array.isArray(result) ? result : result.data;
|
|
101
|
+
return [...tasks].sort((a, b) => recencyKey(b) - recencyKey(a));
|
|
102
|
+
}
|
|
103
|
+
async function findActiveTasksForSession(app, sessionId, params) {
|
|
104
|
+
const all = await findTasksForSession(app, sessionId, params);
|
|
105
|
+
return all.filter((t) => ACTIVE_TASK_STATUSES.has(t.status));
|
|
106
|
+
}
|
|
107
|
+
async function findHostTaskForSession(app, sessionId, params) {
|
|
108
|
+
const all = await findTasksForSession(app, sessionId, params);
|
|
109
|
+
if (all.length === 0) return void 0;
|
|
110
|
+
return all.find((t) => ACTIVE_TASK_STATUSES.has(t.status)) ?? all[0];
|
|
111
|
+
}
|
|
112
|
+
var ACTIVE_TASK_STATUSES;
|
|
113
|
+
var init_session_tasks = __esm({
|
|
114
|
+
"src/utils/session-tasks.ts"() {
|
|
115
|
+
"use strict";
|
|
116
|
+
ACTIVE_TASK_STATUSES = /* @__PURE__ */ new Set([
|
|
117
|
+
TaskStatus.RUNNING,
|
|
118
|
+
TaskStatus.AWAITING_PERMISSION,
|
|
119
|
+
TaskStatus.STOPPING
|
|
120
|
+
]);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
11
124
|
// src/utils/worktree-authorization.ts
|
|
125
|
+
import { shortId as shortId5 } from "@agor/core/db";
|
|
12
126
|
import { Forbidden as Forbidden3, NotAuthenticated as NotAuthenticated3 } from "@agor/core/feathers";
|
|
13
127
|
import { ROLES as ROLES2, WORKTREE_PERMISSION_LEVELS } from "@agor/core/types";
|
|
14
128
|
function isSuperAdmin(role, allowSuperadmin = true) {
|
|
@@ -75,7 +189,7 @@ async function ensureCanPromptTargetSession(sessionId, userId, app, worktreeRepo
|
|
|
75
189
|
try {
|
|
76
190
|
targetSession = await app.service("sessions").get(sessionId, { provider: void 0 });
|
|
77
191
|
} catch {
|
|
78
|
-
throw new Forbidden3(`Invalid callback target: session ${sessionId
|
|
192
|
+
throw new Forbidden3(`Invalid callback target: session ${shortId5(sessionId)} not found`);
|
|
79
193
|
}
|
|
80
194
|
const worktree = await worktreeRepo.findById(targetSession.worktree_id);
|
|
81
195
|
if (!worktree) {
|
|
@@ -100,7 +214,7 @@ async function ensureCanPromptTargetSession(sessionId, userId, app, worktreeRepo
|
|
|
100
214
|
);
|
|
101
215
|
}
|
|
102
216
|
throw new Forbidden3(
|
|
103
|
-
`Cannot set callback target: you need at least 'session' permission on worktree ${worktree.name || worktree.worktree_id
|
|
217
|
+
`Cannot set callback target: you need at least 'session' permission on worktree ${worktree.name || shortId5(worktree.worktree_id)}. You have '${effectiveLevel}' permission.`
|
|
104
218
|
);
|
|
105
219
|
}
|
|
106
220
|
function checkSessionOwnerOrAdmin(user, session, options) {
|
|
@@ -127,6 +241,18 @@ var init_worktree_authorization = __esm({
|
|
|
127
241
|
}
|
|
128
242
|
});
|
|
129
243
|
|
|
244
|
+
// src/widgets/registry.ts
|
|
245
|
+
function getWidget(type) {
|
|
246
|
+
return widgetRegistry.get(type);
|
|
247
|
+
}
|
|
248
|
+
var widgetRegistry;
|
|
249
|
+
var init_registry = __esm({
|
|
250
|
+
"src/widgets/registry.ts"() {
|
|
251
|
+
"use strict";
|
|
252
|
+
widgetRegistry = /* @__PURE__ */ new Map();
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
130
256
|
// src/auth/service-jwt-strategy.ts
|
|
131
257
|
var service_jwt_strategy_exports = {};
|
|
132
258
|
__export(service_jwt_strategy_exports, {
|
|
@@ -189,7 +315,7 @@ var api_key_strategy_exports = {};
|
|
|
189
315
|
__export(api_key_strategy_exports, {
|
|
190
316
|
ApiKeyStrategy: () => ApiKeyStrategy
|
|
191
317
|
});
|
|
192
|
-
import { AuthenticationBaseStrategy, NotAuthenticated as
|
|
318
|
+
import { AuthenticationBaseStrategy, NotAuthenticated as NotAuthenticated5 } from "@agor/core/feathers";
|
|
193
319
|
var ApiKeyStrategy;
|
|
194
320
|
var init_api_key_strategy = __esm({
|
|
195
321
|
"src/auth/api-key-strategy.ts"() {
|
|
@@ -206,22 +332,22 @@ var init_api_key_strategy = __esm({
|
|
|
206
332
|
// biome-ignore lint/suspicious/noExplicitAny: Feathers type compatibility
|
|
207
333
|
async authenticate(authentication, params) {
|
|
208
334
|
if (!this.apiKeysRepo || !this.usersService) {
|
|
209
|
-
throw new
|
|
335
|
+
throw new NotAuthenticated5("ApiKeyStrategy not initialized");
|
|
210
336
|
}
|
|
211
337
|
const apiKey = authentication.apiKey;
|
|
212
338
|
if (!apiKey || !apiKey.startsWith("agor_sk_")) {
|
|
213
|
-
throw new
|
|
339
|
+
throw new NotAuthenticated5("Invalid API key format");
|
|
214
340
|
}
|
|
215
341
|
const keyRow = await this.apiKeysRepo.verifyKey(apiKey);
|
|
216
342
|
if (!keyRow) {
|
|
217
|
-
throw new
|
|
343
|
+
throw new NotAuthenticated5("Invalid API key");
|
|
218
344
|
}
|
|
219
345
|
this.apiKeysRepo.updateLastUsed(keyRow.id).catch((err) => {
|
|
220
346
|
console.warn("Failed to update API key last_used_at:", err);
|
|
221
347
|
});
|
|
222
348
|
const user = await this.usersService.get(keyRow.user_id);
|
|
223
349
|
if (!user) {
|
|
224
|
-
throw new
|
|
350
|
+
throw new NotAuthenticated5("User not found for API key");
|
|
225
351
|
}
|
|
226
352
|
return {
|
|
227
353
|
authentication: { strategy: "api-key" },
|
|
@@ -253,25 +379,1120 @@ var init_api_key_strategy = __esm({
|
|
|
253
379
|
}
|
|
254
380
|
});
|
|
255
381
|
|
|
256
|
-
// src/
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
382
|
+
// src/adapters/drizzle.ts
|
|
383
|
+
import { NotFoundError } from "@agor/core/utils/errors";
|
|
384
|
+
var init_drizzle = __esm({
|
|
385
|
+
"src/adapters/drizzle.ts"() {
|
|
386
|
+
"use strict";
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// src/services/claude-cli-watcher.ts
|
|
391
|
+
import { promises as fsp, watch } from "fs";
|
|
392
|
+
import path2 from "path";
|
|
393
|
+
import {
|
|
394
|
+
claudeSessionJsonlPath,
|
|
395
|
+
claudeSubagentsDir,
|
|
396
|
+
JsonlEventTranslator
|
|
397
|
+
} from "@agor/core/claude-cli";
|
|
398
|
+
function sleep(ms) {
|
|
399
|
+
return new Promise((resolve) => {
|
|
400
|
+
const t = setTimeout(resolve, ms);
|
|
401
|
+
t.unref?.();
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
var DEFAULT_PERSIST_EVERY_N_LINES, DEFAULT_PERSIST_EVERY_MS, FILE_NOT_FOUND_FAST_BACKOFF_MS, FILE_NOT_FOUND_FAST_RETRIES, PARENT_DIR_CHECK_INTERVAL_MS, ClaudeCliWatcher, ClaudeCliWatcherRegistry;
|
|
405
|
+
var init_claude_cli_watcher = __esm({
|
|
406
|
+
"src/services/claude-cli-watcher.ts"() {
|
|
407
|
+
"use strict";
|
|
408
|
+
DEFAULT_PERSIST_EVERY_N_LINES = 25;
|
|
409
|
+
DEFAULT_PERSIST_EVERY_MS = 5e3;
|
|
410
|
+
FILE_NOT_FOUND_FAST_BACKOFF_MS = 100;
|
|
411
|
+
FILE_NOT_FOUND_FAST_RETRIES = 50;
|
|
412
|
+
PARENT_DIR_CHECK_INTERVAL_MS = 3e4;
|
|
413
|
+
ClaudeCliWatcher = class {
|
|
414
|
+
translator = new JsonlEventTranslator();
|
|
415
|
+
opts;
|
|
416
|
+
jsonlPath;
|
|
417
|
+
subagentsDir;
|
|
418
|
+
watcher = null;
|
|
419
|
+
/** Long-lived watch on the parent slug dir while waiting for the JSONL
|
|
420
|
+
* to appear. Closed once we successfully open the file. */
|
|
421
|
+
parentDirWatcher = null;
|
|
422
|
+
/** Backstop polling timer for the slow-path "waiting on JSONL" state. */
|
|
423
|
+
parentDirPollTimer = null;
|
|
424
|
+
offset;
|
|
425
|
+
/** Trailing fragment held over between `change` events when the last
|
|
426
|
+
* write didn't end in `\n`. */
|
|
427
|
+
lineBuffer = "";
|
|
428
|
+
/** Lines processed since the last `persistOffset()` flush. */
|
|
429
|
+
linesSinceFlush = 0;
|
|
430
|
+
flushTimer = null;
|
|
431
|
+
/** Last seen `assistant.timestamp` / `uuid` for telemetry / resume-sanity. */
|
|
432
|
+
lastEventTs = null;
|
|
433
|
+
lastEventUuid = null;
|
|
434
|
+
/** Serialize the read-and-dispatch loop so overlapping `change`
|
|
435
|
+
* notifications don't interleave. */
|
|
436
|
+
busy = Promise.resolve();
|
|
437
|
+
stopped = false;
|
|
438
|
+
constructor(options) {
|
|
439
|
+
this.opts = {
|
|
440
|
+
sessionId: options.sessionId,
|
|
441
|
+
cwd: options.cwd,
|
|
442
|
+
homeDir: options.homeDir,
|
|
443
|
+
startOffset: options.startOffset ?? 0,
|
|
444
|
+
persister: options.persister,
|
|
445
|
+
sink: options.sink,
|
|
446
|
+
persistEveryNLines: options.persistEveryNLines ?? DEFAULT_PERSIST_EVERY_N_LINES,
|
|
447
|
+
persistEveryMs: options.persistEveryMs ?? DEFAULT_PERSIST_EVERY_MS,
|
|
448
|
+
log: options.log ?? console
|
|
449
|
+
};
|
|
450
|
+
this.offset = this.opts.startOffset;
|
|
451
|
+
this.jsonlPath = claudeSessionJsonlPath(this.opts.homeDir, this.opts.cwd, this.opts.sessionId);
|
|
452
|
+
this.subagentsDir = claudeSubagentsDir(this.opts.homeDir, this.opts.cwd, this.opts.sessionId);
|
|
453
|
+
}
|
|
454
|
+
/** Absolute path to the JSONL we're watching. */
|
|
455
|
+
get path() {
|
|
456
|
+
return this.jsonlPath;
|
|
457
|
+
}
|
|
458
|
+
/** Where the subagent JSONLs would live (we don't watch this yet). */
|
|
459
|
+
get subagentsPath() {
|
|
460
|
+
return this.subagentsDir;
|
|
461
|
+
}
|
|
462
|
+
/** Current byte offset into the JSONL. */
|
|
463
|
+
get currentOffset() {
|
|
464
|
+
return this.offset;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Begin watching. Resolves once the file is either found (and an initial
|
|
468
|
+
* pass over `[startOffset, EOF)` has run) OR we've fallen through to the
|
|
469
|
+
* patient `watching-parent-dir` slow path.
|
|
470
|
+
*
|
|
471
|
+
* Two-tier wait:
|
|
472
|
+
* 1. **Fast path** — poll the JSONL every 100ms for up to ~5s. This
|
|
473
|
+
* latches on quickly in the common case where `claude` is spawning
|
|
474
|
+
* right alongside us (sub-100ms is typical per the analysis doc).
|
|
475
|
+
* 2. **Slow path** — once the fast retries exhaust, `start()` returns
|
|
476
|
+
* and we install an `fs.watch` on the parent slug directory plus
|
|
477
|
+
* a 30s backstop poll. As soon as the JSONL appears (e.g. the user
|
|
478
|
+
* finally opens the terminal modal and the `claude` REPL starts
|
|
479
|
+
* writing), we transition to the live-tail watcher. No timeout —
|
|
480
|
+
* it sits idle indefinitely, at zero cost.
|
|
481
|
+
*
|
|
482
|
+
* The patient slow path matters because Agor's lifecycle is:
|
|
483
|
+
* create CLI session → daemon emits `terminal:tab` → user opens
|
|
484
|
+
* terminal modal → executor spawns the tab → `claude` writes JSONL.
|
|
485
|
+
*
|
|
486
|
+
* The gap between session create and terminal open can be arbitrary
|
|
487
|
+
* (user might create-then-leave). Failing the watcher at 5s was a v0
|
|
488
|
+
* shortcut that this method replaces.
|
|
489
|
+
*/
|
|
490
|
+
async start() {
|
|
491
|
+
if (this.stopped) throw new Error("ClaudeCliWatcher: cannot start a stopped watcher");
|
|
492
|
+
for (let attempt = 0; attempt < FILE_NOT_FOUND_FAST_RETRIES; attempt++) {
|
|
493
|
+
try {
|
|
494
|
+
await fsp.stat(this.jsonlPath);
|
|
495
|
+
return await this.beginTailing();
|
|
496
|
+
} catch (err) {
|
|
497
|
+
if (err.code !== "ENOENT") throw err;
|
|
498
|
+
}
|
|
499
|
+
await sleep(FILE_NOT_FOUND_FAST_BACKOFF_MS);
|
|
500
|
+
}
|
|
501
|
+
this.opts.log.info("[claude-cli-watcher] JSONL not yet present, entering patient-wait mode", {
|
|
502
|
+
sessionId: this.opts.sessionId,
|
|
503
|
+
path: this.jsonlPath
|
|
504
|
+
});
|
|
505
|
+
this.installParentDirWaiter();
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Open the JSONL and start the live-tail watcher. Idempotent: safe to
|
|
509
|
+
* call from either the fast-path success branch or the parent-dir
|
|
510
|
+
* waiter when the file finally shows up.
|
|
511
|
+
*/
|
|
512
|
+
async beginTailing() {
|
|
513
|
+
if (this.stopped) return;
|
|
514
|
+
if (this.watcher) return;
|
|
515
|
+
this.closeParentDirWaiter();
|
|
516
|
+
await this.readAndDispatch();
|
|
517
|
+
this.watcher = watch(this.jsonlPath, { persistent: false }, () => {
|
|
518
|
+
this.busy = this.busy.then(() => this.readAndDispatch()).catch((err) => {
|
|
519
|
+
this.opts.log.error("[claude-cli-watcher] read error", {
|
|
520
|
+
sessionId: this.opts.sessionId,
|
|
521
|
+
err
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
this.scheduleFlush();
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Stop watching and flush the current offset to the persister.
|
|
529
|
+
* Idempotent.
|
|
530
|
+
*/
|
|
531
|
+
async stop() {
|
|
532
|
+
if (this.stopped) return;
|
|
533
|
+
this.stopped = true;
|
|
534
|
+
if (this.watcher) {
|
|
535
|
+
this.watcher.close();
|
|
536
|
+
this.watcher = null;
|
|
537
|
+
}
|
|
538
|
+
this.closeParentDirWaiter();
|
|
539
|
+
if (this.flushTimer) {
|
|
540
|
+
clearTimeout(this.flushTimer);
|
|
541
|
+
this.flushTimer = null;
|
|
542
|
+
}
|
|
543
|
+
await this.busy;
|
|
544
|
+
await this.persistOffset();
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Install the patient-wait mode: an `fs.watch` on the parent slug
|
|
548
|
+
* directory (so we wake up the instant the CLI writes the file's first
|
|
549
|
+
* byte and triggers a `rename` event), backed by a slow poll as a
|
|
550
|
+
* defensive belt-and-suspenders.
|
|
551
|
+
*
|
|
552
|
+
* Idempotent and stoppable via {@link stop} / {@link closeParentDirWaiter}.
|
|
553
|
+
*/
|
|
554
|
+
installParentDirWaiter() {
|
|
555
|
+
if (this.stopped) return;
|
|
556
|
+
if (this.parentDirWatcher || this.parentDirPollTimer) return;
|
|
557
|
+
const parentDir = path2.dirname(this.jsonlPath);
|
|
558
|
+
const targetBasename = path2.basename(this.jsonlPath);
|
|
559
|
+
const tryLatch = () => {
|
|
560
|
+
if (this.stopped || this.watcher) return;
|
|
561
|
+
fsp.stat(this.jsonlPath).then(
|
|
562
|
+
() => {
|
|
563
|
+
if (this.stopped || this.watcher) return;
|
|
564
|
+
this.busy = this.busy.then(() => this.beginTailing()).catch((err) => {
|
|
565
|
+
this.opts.log.error("[claude-cli-watcher] beginTailing failed", {
|
|
566
|
+
sessionId: this.opts.sessionId,
|
|
567
|
+
err
|
|
568
|
+
});
|
|
569
|
+
});
|
|
570
|
+
},
|
|
571
|
+
() => {
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
};
|
|
575
|
+
try {
|
|
576
|
+
this.parentDirWatcher = watch(parentDir, { persistent: false }, (_event, filename) => {
|
|
577
|
+
if (filename === targetBasename) tryLatch();
|
|
578
|
+
});
|
|
579
|
+
} catch (err) {
|
|
580
|
+
this.opts.log.debug?.("[claude-cli-watcher] parent dir watch failed (will poll)", {
|
|
581
|
+
sessionId: this.opts.sessionId,
|
|
582
|
+
parentDir,
|
|
583
|
+
err
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
this.parentDirPollTimer = setInterval(tryLatch, PARENT_DIR_CHECK_INTERVAL_MS);
|
|
587
|
+
this.parentDirPollTimer.unref?.();
|
|
588
|
+
tryLatch();
|
|
589
|
+
}
|
|
590
|
+
closeParentDirWaiter() {
|
|
591
|
+
if (this.parentDirWatcher) {
|
|
592
|
+
this.parentDirWatcher.close();
|
|
593
|
+
this.parentDirWatcher = null;
|
|
594
|
+
}
|
|
595
|
+
if (this.parentDirPollTimer) {
|
|
596
|
+
clearInterval(this.parentDirPollTimer);
|
|
597
|
+
this.parentDirPollTimer = null;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
async readAndDispatch() {
|
|
601
|
+
if (this.stopped) return;
|
|
602
|
+
let stat;
|
|
603
|
+
try {
|
|
604
|
+
stat = await fsp.stat(this.jsonlPath);
|
|
605
|
+
} catch (err) {
|
|
606
|
+
this.opts.log.warn("[claude-cli-watcher] stat failed", {
|
|
607
|
+
sessionId: this.opts.sessionId,
|
|
608
|
+
err
|
|
609
|
+
});
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
if (stat.size === this.offset) return;
|
|
613
|
+
if (stat.size < this.offset) {
|
|
614
|
+
this.opts.log.warn("[claude-cli-watcher] file shrank \u2014 re-reading from start", {
|
|
615
|
+
sessionId: this.opts.sessionId,
|
|
616
|
+
path: this.jsonlPath,
|
|
617
|
+
old: this.offset,
|
|
618
|
+
new: stat.size
|
|
619
|
+
});
|
|
620
|
+
this.offset = 0;
|
|
621
|
+
this.lineBuffer = "";
|
|
622
|
+
}
|
|
623
|
+
const fh = await fsp.open(this.jsonlPath, "r");
|
|
624
|
+
try {
|
|
625
|
+
const readFrom = this.offset;
|
|
626
|
+
const chunkSize = stat.size - readFrom;
|
|
627
|
+
const buf = Buffer.alloc(chunkSize);
|
|
628
|
+
const { bytesRead } = await fh.read(buf, 0, chunkSize, readFrom);
|
|
629
|
+
const fragmentBytes = Buffer.byteLength(this.lineBuffer, "utf-8");
|
|
630
|
+
const combined = this.lineBuffer + buf.subarray(0, bytesRead).toString("utf-8");
|
|
631
|
+
const lines = combined.split("\n");
|
|
632
|
+
const trailing = lines.pop() ?? "";
|
|
633
|
+
let lineStart = readFrom - fragmentBytes;
|
|
634
|
+
let sinkFailed = false;
|
|
635
|
+
for (const line of lines) {
|
|
636
|
+
const lineBytes = Buffer.byteLength(line, "utf-8");
|
|
637
|
+
const lineEnd = lineStart + lineBytes + 1;
|
|
638
|
+
if (!line.trim()) {
|
|
639
|
+
this.offset = lineEnd;
|
|
640
|
+
this.lineBuffer = "";
|
|
641
|
+
lineStart = lineEnd;
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
644
|
+
const events = this.translator.translateLine(line);
|
|
645
|
+
let allSucceeded = true;
|
|
646
|
+
for (const event of events) {
|
|
647
|
+
try {
|
|
648
|
+
if ("uuid" in event && event.uuid) this.lastEventUuid = event.uuid;
|
|
649
|
+
if ("timestamp" in event && event.timestamp) this.lastEventTs = event.timestamp;
|
|
650
|
+
await this.opts.sink(this.opts.sessionId, event);
|
|
651
|
+
} catch (err) {
|
|
652
|
+
this.opts.log.error("[claude-cli-watcher] sink error \u2014 stopping at line", {
|
|
653
|
+
sessionId: this.opts.sessionId,
|
|
654
|
+
eventType: event.type,
|
|
655
|
+
byteOffset: lineStart,
|
|
656
|
+
err
|
|
657
|
+
});
|
|
658
|
+
allSucceeded = false;
|
|
659
|
+
sinkFailed = true;
|
|
660
|
+
break;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if (!allSucceeded) break;
|
|
664
|
+
this.offset = lineEnd;
|
|
665
|
+
this.lineBuffer = "";
|
|
666
|
+
lineStart = lineEnd;
|
|
667
|
+
this.linesSinceFlush++;
|
|
668
|
+
if (this.linesSinceFlush >= this.opts.persistEveryNLines) {
|
|
669
|
+
void this.persistOffset();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (!sinkFailed) {
|
|
673
|
+
this.lineBuffer = trailing;
|
|
674
|
+
}
|
|
675
|
+
} finally {
|
|
676
|
+
await fh.close();
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
scheduleFlush() {
|
|
680
|
+
if (this.stopped) return;
|
|
681
|
+
this.flushTimer = setTimeout(() => {
|
|
682
|
+
void this.persistOffset().finally(() => this.scheduleFlush());
|
|
683
|
+
}, this.opts.persistEveryMs);
|
|
684
|
+
this.flushTimer?.unref?.();
|
|
685
|
+
}
|
|
686
|
+
async persistOffset() {
|
|
687
|
+
this.linesSinceFlush = 0;
|
|
688
|
+
try {
|
|
689
|
+
await this.opts.persister.saveOffset(this.opts.sessionId, {
|
|
690
|
+
watcher_offset: this.offset,
|
|
691
|
+
last_event_ts: this.lastEventTs,
|
|
692
|
+
last_event_uuid: this.lastEventUuid
|
|
693
|
+
});
|
|
694
|
+
} catch (err) {
|
|
695
|
+
this.opts.log.warn("[claude-cli-watcher] persist failed", {
|
|
696
|
+
sessionId: this.opts.sessionId,
|
|
697
|
+
err
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
ClaudeCliWatcherRegistry = class {
|
|
703
|
+
constructor(persister, sink, log = console) {
|
|
704
|
+
this.persister = persister;
|
|
705
|
+
this.sink = sink;
|
|
706
|
+
this.log = log;
|
|
707
|
+
}
|
|
708
|
+
watchers = /* @__PURE__ */ new Map();
|
|
709
|
+
/** Start a watcher for a session. No-op if one already exists. */
|
|
710
|
+
async register(args) {
|
|
711
|
+
const existing = this.watchers.get(args.sessionId);
|
|
712
|
+
if (existing) return existing;
|
|
713
|
+
const w = new ClaudeCliWatcher({
|
|
714
|
+
...args,
|
|
715
|
+
persister: this.persister,
|
|
716
|
+
sink: this.sink,
|
|
717
|
+
log: this.log
|
|
718
|
+
});
|
|
719
|
+
this.watchers.set(args.sessionId, w);
|
|
720
|
+
try {
|
|
721
|
+
await w.start();
|
|
722
|
+
this.log.info("[claude-cli-watcher] started", {
|
|
723
|
+
sessionId: args.sessionId,
|
|
724
|
+
path: w.path,
|
|
725
|
+
startOffset: args.startOffset ?? 0
|
|
726
|
+
});
|
|
727
|
+
} catch (err) {
|
|
728
|
+
this.watchers.delete(args.sessionId);
|
|
729
|
+
throw err;
|
|
730
|
+
}
|
|
731
|
+
return w;
|
|
732
|
+
}
|
|
733
|
+
/** Stop + flush a watcher. No-op if none. */
|
|
734
|
+
async unregister(sessionId) {
|
|
735
|
+
const w = this.watchers.get(sessionId);
|
|
736
|
+
if (!w) return;
|
|
737
|
+
this.watchers.delete(sessionId);
|
|
738
|
+
await w.stop();
|
|
739
|
+
this.log.info("[claude-cli-watcher] stopped", { sessionId });
|
|
740
|
+
}
|
|
741
|
+
/** Stop every watcher. Called on daemon shutdown. */
|
|
742
|
+
async stopAll() {
|
|
743
|
+
const sessions = Array.from(this.watchers.keys());
|
|
744
|
+
await Promise.all(sessions.map((id) => this.unregister(id)));
|
|
745
|
+
}
|
|
746
|
+
/** Peek the live watcher for a session — diagnostic / test-only. */
|
|
747
|
+
get(sessionId) {
|
|
748
|
+
return this.watchers.get(sessionId);
|
|
749
|
+
}
|
|
750
|
+
/** Count of active watchers — diagnostic. */
|
|
751
|
+
get size() {
|
|
752
|
+
return this.watchers.size;
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
// src/services/claude-cli-integration.ts
|
|
759
|
+
var claude_cli_integration_exports = {};
|
|
760
|
+
__export(claude_cli_integration_exports, {
|
|
761
|
+
ClaudeCliWatcherRegistry: () => ClaudeCliWatcherRegistry,
|
|
762
|
+
buildCliEventSink: () => buildCliEventSink,
|
|
763
|
+
buildCliPersister: () => buildCliPersister,
|
|
764
|
+
buildSpawnConfigForSession: () => buildSpawnConfigForSession,
|
|
765
|
+
getCliWatcherRegistry: () => getCliWatcherRegistry,
|
|
766
|
+
isClaudeRunningFor: () => isClaudeRunningFor,
|
|
767
|
+
onCliSessionCreated: () => onCliSessionCreated,
|
|
768
|
+
onCliSessionEnded: () => onCliSessionEnded,
|
|
769
|
+
primeActiveCliTurnFromSession: () => primeActiveCliTurnFromSession,
|
|
770
|
+
rehydrateCliWatchers: () => rehydrateCliWatchers,
|
|
771
|
+
resolveHomeDirForCliSession: () => resolveHomeDirForCliSession,
|
|
772
|
+
setPendingCliTask: () => setPendingCliTask
|
|
773
|
+
});
|
|
774
|
+
import { spawn as spawnProcess } from "child_process";
|
|
775
|
+
import * as fs2 from "fs";
|
|
776
|
+
import os2 from "os";
|
|
777
|
+
import {
|
|
778
|
+
buildClaudeCliSpawn,
|
|
779
|
+
claudeSessionJsonlPath as claudeSessionJsonlPath2,
|
|
780
|
+
computeCost,
|
|
781
|
+
getContextWindowLimit,
|
|
782
|
+
permissionModeForCli,
|
|
783
|
+
slugForCwd
|
|
784
|
+
} from "@agor/core/claude-cli";
|
|
785
|
+
import {
|
|
786
|
+
generateId as generateId3,
|
|
787
|
+
SessionRepository as SessionRepository3,
|
|
788
|
+
shortId as shortId6,
|
|
789
|
+
TaskRepository
|
|
790
|
+
} from "@agor/core/db";
|
|
791
|
+
import {
|
|
792
|
+
SessionStatus as SessionStatus2,
|
|
793
|
+
TaskStatus as TaskStatus3
|
|
794
|
+
} from "@agor/core/types";
|
|
795
|
+
function getDb(app) {
|
|
796
|
+
const db = app.get("database") ?? app.get("db");
|
|
797
|
+
return db ?? null;
|
|
798
|
+
}
|
|
799
|
+
async function persistActiveTurnSnapshot(app, sessionId, turn) {
|
|
800
|
+
const db = getDb(app);
|
|
801
|
+
if (!db) return;
|
|
802
|
+
const repo = new SessionRepository3(db);
|
|
803
|
+
const row = await repo.findById(sessionId);
|
|
804
|
+
if (!row) {
|
|
805
|
+
throw new Error(`persistActiveTurnSnapshot: session not found: ${shortId6(sessionId)}`);
|
|
806
|
+
}
|
|
807
|
+
const patch = {
|
|
808
|
+
cli_state: {
|
|
809
|
+
...row.cli_state ?? {},
|
|
810
|
+
active_turn: {
|
|
811
|
+
task_id: turn.taskId,
|
|
812
|
+
user_message_index: turn.userMessageIndex,
|
|
813
|
+
started_at_ms: turn.startedAtMs
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
await repo.update(sessionId, patch);
|
|
818
|
+
}
|
|
819
|
+
async function clearActiveTurnSnapshot(app, sessionId) {
|
|
820
|
+
const db = getDb(app);
|
|
821
|
+
if (!db) return;
|
|
822
|
+
try {
|
|
823
|
+
const repo = new SessionRepository3(db);
|
|
824
|
+
const patch = {
|
|
825
|
+
cli_state: { active_turn: null }
|
|
826
|
+
};
|
|
827
|
+
await repo.update(sessionId, patch);
|
|
828
|
+
} catch (err) {
|
|
829
|
+
console.warn("[claude-cli-integration] clearActiveTurnSnapshot failed", err);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
function primeActiveCliTurnFromSession(app, session) {
|
|
833
|
+
const persisted = session.cli_state?.active_turn;
|
|
834
|
+
if (!persisted) return;
|
|
835
|
+
if (activeCliTurn.has(session.session_id)) return;
|
|
836
|
+
activeCliTurn.set(session.session_id, {
|
|
837
|
+
taskId: persisted.task_id,
|
|
838
|
+
userMessageIndex: persisted.user_message_index,
|
|
839
|
+
lastIndex: persisted.user_message_index,
|
|
840
|
+
lastTimestamp: new Date(persisted.started_at_ms).toISOString(),
|
|
841
|
+
startedAtMs: persisted.started_at_ms,
|
|
842
|
+
assistantTurns: [],
|
|
843
|
+
lastAssistantRaw: null,
|
|
844
|
+
toolUseCount: 0
|
|
845
|
+
});
|
|
846
|
+
startTaskWatchdog(app, session.session_id);
|
|
847
|
+
}
|
|
848
|
+
function isClaudeRunningFor(sessionId) {
|
|
849
|
+
return new Promise((resolve) => {
|
|
850
|
+
const pattern = `claude .*(--session-id|--resume) ${sessionId}`;
|
|
851
|
+
const proc = spawnProcess("pgrep", ["-f", pattern], { stdio: "ignore" });
|
|
852
|
+
proc.on("exit", (code) => resolve(code === 0));
|
|
853
|
+
proc.on("error", () => resolve(true));
|
|
854
|
+
setTimeout(() => {
|
|
855
|
+
try {
|
|
856
|
+
proc.kill();
|
|
857
|
+
} catch {
|
|
858
|
+
}
|
|
859
|
+
resolve(true);
|
|
860
|
+
}, 3e3);
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
function stopTaskWatchdog(sessionId) {
|
|
864
|
+
const t = watchdogTimers.get(sessionId);
|
|
865
|
+
if (t) {
|
|
866
|
+
clearInterval(t);
|
|
867
|
+
watchdogTimers.delete(sessionId);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
function startTaskWatchdog(app, sessionId) {
|
|
871
|
+
stopTaskWatchdog(sessionId);
|
|
872
|
+
const timer = setInterval(async () => {
|
|
873
|
+
const active = activeCliTurn.get(sessionId);
|
|
874
|
+
if (!active) {
|
|
875
|
+
stopTaskWatchdog(sessionId);
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
const idleMs = Date.now() - (Date.parse(active.lastTimestamp) || active.startedAtMs);
|
|
879
|
+
if (idleMs < WATCHDOG_IDLE_THRESHOLD_MS) return;
|
|
880
|
+
const alive = await isClaudeRunningFor(sessionId);
|
|
881
|
+
if (alive) return;
|
|
882
|
+
console.log(
|
|
883
|
+
JSON.stringify({
|
|
884
|
+
layer: "claude-cli-watcher.watchdog",
|
|
885
|
+
sessionId,
|
|
886
|
+
idleMs,
|
|
887
|
+
note: "claude process not running \u2014 closing stale turn"
|
|
888
|
+
})
|
|
889
|
+
);
|
|
890
|
+
try {
|
|
891
|
+
await closeActiveTurnDispatch?.(sessionId, "claude_exited", (/* @__PURE__ */ new Date()).toISOString());
|
|
892
|
+
} catch (err) {
|
|
893
|
+
console.warn("[claude-cli-watcher.watchdog] close dispatch failed", err);
|
|
894
|
+
}
|
|
895
|
+
stopTaskWatchdog(sessionId);
|
|
896
|
+
}, WATCHDOG_TICK_MS);
|
|
897
|
+
timer.unref?.();
|
|
898
|
+
watchdogTimers.set(sessionId, timer);
|
|
899
|
+
}
|
|
900
|
+
function buildCliPersister(app) {
|
|
901
|
+
return {
|
|
902
|
+
async saveOffset(sessionId, update) {
|
|
903
|
+
const db = getDb(app);
|
|
904
|
+
if (!db) return;
|
|
905
|
+
const repo = new SessionRepository3(db);
|
|
906
|
+
const row = await repo.findById(sessionId).catch(() => null);
|
|
907
|
+
if (!row) return;
|
|
908
|
+
const existing = row.cli_state ?? {};
|
|
909
|
+
const patch = {
|
|
910
|
+
cli_state: {
|
|
911
|
+
...existing,
|
|
912
|
+
watcher_offset: update.watcher_offset,
|
|
913
|
+
last_event_ts: update.last_event_ts ?? existing.last_event_ts,
|
|
914
|
+
last_event_uuid: update.last_event_uuid ?? existing.last_event_uuid
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
await repo.update(sessionId, patch);
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function setPendingCliTask(sessionId, taskId, userMessageIndex) {
|
|
922
|
+
pendingCliTask.set(sessionId, { taskId, userMessageIndex });
|
|
923
|
+
}
|
|
924
|
+
function buildCliEventSink(app) {
|
|
925
|
+
const indexBySession = /* @__PURE__ */ new Map();
|
|
926
|
+
const nextIndex = async (sessionId) => {
|
|
927
|
+
const cached2 = indexBySession.get(sessionId);
|
|
928
|
+
if (cached2 !== void 0) {
|
|
929
|
+
indexBySession.set(sessionId, cached2 + 1);
|
|
930
|
+
return cached2;
|
|
931
|
+
}
|
|
932
|
+
try {
|
|
933
|
+
const db = getDb(app);
|
|
934
|
+
if (!db) {
|
|
935
|
+
indexBySession.set(sessionId, 1);
|
|
936
|
+
return 0;
|
|
937
|
+
}
|
|
938
|
+
const repo = new SessionRepository3(db);
|
|
939
|
+
const count = await repo.countMessages(sessionId).catch(() => 0) ?? 0;
|
|
940
|
+
indexBySession.set(sessionId, count + 1);
|
|
941
|
+
return count;
|
|
942
|
+
} catch {
|
|
943
|
+
indexBySession.set(sessionId, 1);
|
|
944
|
+
return 0;
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
const previewFor = (content) => {
|
|
948
|
+
if (typeof content === "string") return content.slice(0, 200);
|
|
949
|
+
if (!content) return "";
|
|
950
|
+
try {
|
|
951
|
+
return JSON.stringify(content).slice(0, 200);
|
|
952
|
+
} catch {
|
|
953
|
+
return String(content).slice(0, 200);
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
const mintTaskForOrphanTurn = async (sessionId, prompt, userMessageIndex, timestamp) => {
|
|
957
|
+
const db = getDb(app);
|
|
958
|
+
if (!db) return null;
|
|
959
|
+
try {
|
|
960
|
+
const sessionRepo = new SessionRepository3(db);
|
|
961
|
+
const session = await sessionRepo.findById(sessionId).catch(() => null);
|
|
962
|
+
if (!session) return null;
|
|
963
|
+
const taskRepo = new TaskRepository(db);
|
|
964
|
+
const task = await taskRepo.create({
|
|
965
|
+
session_id: sessionId,
|
|
966
|
+
created_by: session.created_by,
|
|
967
|
+
full_prompt: prompt,
|
|
968
|
+
status: TaskStatus3.RUNNING,
|
|
969
|
+
started_at: timestamp,
|
|
970
|
+
message_range: {
|
|
971
|
+
start_index: userMessageIndex,
|
|
972
|
+
end_index: userMessageIndex,
|
|
973
|
+
start_timestamp: timestamp,
|
|
974
|
+
end_timestamp: timestamp
|
|
975
|
+
},
|
|
976
|
+
git_state: {
|
|
977
|
+
ref_at_start: session.git_state?.ref ?? "",
|
|
978
|
+
sha_at_start: session.git_state?.current_sha ?? ""
|
|
979
|
+
},
|
|
980
|
+
tool_use_count: 0,
|
|
981
|
+
metadata: { source: "cli-repl" }
|
|
982
|
+
});
|
|
983
|
+
app.service("tasks").emit("created", task);
|
|
984
|
+
await app.service("sessions").patch(sessionId, {
|
|
985
|
+
status: SessionStatus2.RUNNING,
|
|
986
|
+
ready_for_prompt: false,
|
|
987
|
+
tasks: [...session.tasks, task.task_id]
|
|
988
|
+
}).catch((err) => {
|
|
989
|
+
console.warn("[claude-cli-watcher.sink] session patch (RUNNING) failed", err);
|
|
990
|
+
});
|
|
991
|
+
return task.task_id;
|
|
992
|
+
} catch (err) {
|
|
993
|
+
console.warn("[claude-cli-watcher.sink] mintTaskForOrphanTurn failed", err);
|
|
994
|
+
return null;
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
const sink = async (sessionId, event) => {
|
|
998
|
+
try {
|
|
999
|
+
const baseTs = (/* @__PURE__ */ new Date()).toISOString();
|
|
1000
|
+
if (event.type === "user_message") {
|
|
1001
|
+
if (event.isSidechain) return;
|
|
1002
|
+
const promptText = typeof event.content === "string" ? event.content : (() => {
|
|
1003
|
+
try {
|
|
1004
|
+
return JSON.stringify(event.content);
|
|
1005
|
+
} catch {
|
|
1006
|
+
return String(event.content ?? "");
|
|
1007
|
+
}
|
|
1008
|
+
})();
|
|
1009
|
+
const ts = event.timestamp ?? baseTs;
|
|
1010
|
+
const pending = pendingCliTask.get(sessionId);
|
|
1011
|
+
if (pending) {
|
|
1012
|
+
pendingCliTask.delete(sessionId);
|
|
1013
|
+
indexBySession.set(sessionId, pending.userMessageIndex + 1);
|
|
1014
|
+
const turn2 = {
|
|
1015
|
+
taskId: pending.taskId,
|
|
1016
|
+
userMessageIndex: pending.userMessageIndex,
|
|
1017
|
+
lastIndex: pending.userMessageIndex,
|
|
1018
|
+
lastTimestamp: ts,
|
|
1019
|
+
startedAtMs: Date.parse(ts) || Date.now(),
|
|
1020
|
+
assistantTurns: [],
|
|
1021
|
+
lastAssistantRaw: null,
|
|
1022
|
+
toolUseCount: 0
|
|
1023
|
+
};
|
|
1024
|
+
activeCliTurn.set(sessionId, turn2);
|
|
1025
|
+
await persistActiveTurnSnapshot(app, sessionId, turn2);
|
|
1026
|
+
startTaskWatchdog(app, sessionId);
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
const userIdx = await nextIndex(sessionId);
|
|
1030
|
+
const taskId = await mintTaskForOrphanTurn(sessionId, promptText, userIdx, ts);
|
|
1031
|
+
const userMessage = buildInitialUserMessage({
|
|
1032
|
+
sessionId,
|
|
1033
|
+
taskId: taskId ?? void 0,
|
|
1034
|
+
index: userIdx,
|
|
1035
|
+
timestamp: ts,
|
|
1036
|
+
content: typeof event.content === "string" ? event.content : event.content ?? "",
|
|
1037
|
+
metadata: { source: "cli-repl", original_id: event.uuid ?? void 0 }
|
|
1038
|
+
});
|
|
1039
|
+
await app.service("messages").create(userMessage);
|
|
1040
|
+
if (!taskId) return;
|
|
1041
|
+
const turn = {
|
|
1042
|
+
taskId,
|
|
1043
|
+
userMessageIndex: userIdx,
|
|
1044
|
+
lastIndex: userIdx,
|
|
1045
|
+
lastTimestamp: ts,
|
|
1046
|
+
startedAtMs: Date.parse(ts) || Date.now(),
|
|
1047
|
+
assistantTurns: [],
|
|
1048
|
+
lastAssistantRaw: null,
|
|
1049
|
+
toolUseCount: 0
|
|
1050
|
+
};
|
|
1051
|
+
activeCliTurn.set(sessionId, turn);
|
|
1052
|
+
await persistActiveTurnSnapshot(app, sessionId, turn);
|
|
1053
|
+
startTaskWatchdog(app, sessionId);
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
if (event.type === "assistant_message") {
|
|
1057
|
+
if (event.turn.isSidechain) return;
|
|
1058
|
+
const idx = await nextIndex(sessionId);
|
|
1059
|
+
const content = event.turn.content;
|
|
1060
|
+
const ts = event.turn.timestamp ?? baseTs;
|
|
1061
|
+
const active = activeCliTurn.get(sessionId);
|
|
1062
|
+
await app.service("messages").create({
|
|
1063
|
+
message_id: generateId3(),
|
|
1064
|
+
session_id: sessionId,
|
|
1065
|
+
task_id: active?.taskId,
|
|
1066
|
+
type: "assistant",
|
|
1067
|
+
role: "assistant",
|
|
1068
|
+
index: idx,
|
|
1069
|
+
timestamp: ts,
|
|
1070
|
+
content_preview: previewFor(content),
|
|
1071
|
+
content,
|
|
1072
|
+
metadata: {
|
|
1073
|
+
model: event.turn.model ?? void 0,
|
|
1074
|
+
original_id: event.turn.messageId,
|
|
1075
|
+
stop_reason: event.turn.stopReason ?? void 0,
|
|
1076
|
+
tokens: event.turn.usage ? {
|
|
1077
|
+
input: event.turn.usage.input_tokens ?? 0,
|
|
1078
|
+
output: event.turn.usage.output_tokens ?? 0,
|
|
1079
|
+
cache_creation: event.turn.usage.cache_creation_input_tokens ?? 0,
|
|
1080
|
+
cache_read: event.turn.usage.cache_read_input_tokens ?? 0
|
|
1081
|
+
} : void 0
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
if (active) {
|
|
1085
|
+
active.lastIndex = idx;
|
|
1086
|
+
active.lastTimestamp = ts;
|
|
1087
|
+
active.assistantTurns.push({
|
|
1088
|
+
model: event.turn.model ?? null,
|
|
1089
|
+
usage: event.turn.usage ?? null,
|
|
1090
|
+
messageId: event.turn.messageId,
|
|
1091
|
+
timestamp: event.turn.timestamp ?? null,
|
|
1092
|
+
stopReason: event.turn.stopReason ?? null
|
|
1093
|
+
});
|
|
1094
|
+
active.lastAssistantRaw = {
|
|
1095
|
+
message: {
|
|
1096
|
+
id: event.turn.messageId,
|
|
1097
|
+
type: "message",
|
|
1098
|
+
role: "assistant",
|
|
1099
|
+
model: event.turn.model,
|
|
1100
|
+
content,
|
|
1101
|
+
stop_reason: event.turn.stopReason,
|
|
1102
|
+
usage: event.turn.usage
|
|
1103
|
+
},
|
|
1104
|
+
timestamp: event.turn.timestamp
|
|
1105
|
+
};
|
|
1106
|
+
if (Array.isArray(content)) {
|
|
1107
|
+
for (const block of content) {
|
|
1108
|
+
if (block && typeof block === "object" && block.type === "tool_use") {
|
|
1109
|
+
active.toolUseCount += 1;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
if (event.type === "tool_result") {
|
|
1117
|
+
if (event.isSidechain) return;
|
|
1118
|
+
const idx = await nextIndex(sessionId);
|
|
1119
|
+
const ts = event.timestamp ?? baseTs;
|
|
1120
|
+
const active = activeCliTurn.get(sessionId);
|
|
1121
|
+
await app.service("messages").create({
|
|
1122
|
+
message_id: generateId3(),
|
|
1123
|
+
session_id: sessionId,
|
|
1124
|
+
task_id: active?.taskId,
|
|
1125
|
+
type: "user",
|
|
1126
|
+
role: "user",
|
|
1127
|
+
index: idx,
|
|
1128
|
+
timestamp: ts,
|
|
1129
|
+
content_preview: previewFor(event.result),
|
|
1130
|
+
content: [
|
|
1131
|
+
{
|
|
1132
|
+
type: "tool_result",
|
|
1133
|
+
tool_use_id: event.sourceToolAssistantUUID ?? void 0,
|
|
1134
|
+
content: event.result
|
|
1135
|
+
}
|
|
1136
|
+
],
|
|
1137
|
+
metadata: { original_id: event.uuid ?? void 0 }
|
|
1138
|
+
});
|
|
1139
|
+
if (active) {
|
|
1140
|
+
active.lastIndex = idx;
|
|
1141
|
+
active.lastTimestamp = ts;
|
|
1142
|
+
}
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
if (event.type === "turn_end") {
|
|
1146
|
+
const active = activeCliTurn.get(sessionId);
|
|
1147
|
+
if (!active) {
|
|
1148
|
+
console.log(
|
|
1149
|
+
JSON.stringify({
|
|
1150
|
+
layer: "claude-cli-watcher.sink",
|
|
1151
|
+
sessionId,
|
|
1152
|
+
eventType: "turn_end",
|
|
1153
|
+
note: "no active turn \u2014 skipping close"
|
|
1154
|
+
})
|
|
1155
|
+
);
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
activeCliTurn.delete(sessionId);
|
|
1159
|
+
void clearActiveTurnSnapshot(app, sessionId);
|
|
1160
|
+
stopTaskWatchdog(sessionId);
|
|
1161
|
+
const ts = event.timestamp ?? active.lastTimestamp ?? baseTs;
|
|
1162
|
+
const endedAtMs = Date.parse(ts) || Date.now();
|
|
1163
|
+
const durationMs = Math.max(0, endedAtMs - active.startedAtMs);
|
|
1164
|
+
const modelUsageMap = {};
|
|
1165
|
+
let totalInput = 0;
|
|
1166
|
+
let totalOutput = 0;
|
|
1167
|
+
let totalCacheCreation = 0;
|
|
1168
|
+
let totalCacheRead = 0;
|
|
1169
|
+
let totalCostUsd;
|
|
1170
|
+
let primaryModel;
|
|
1171
|
+
for (const turn of active.assistantTurns) {
|
|
1172
|
+
const modelId = turn.model ?? "unknown";
|
|
1173
|
+
if (!primaryModel && turn.model) primaryModel = turn.model;
|
|
1174
|
+
const u = turn.usage ?? {};
|
|
1175
|
+
const tIn = u.input_tokens ?? 0;
|
|
1176
|
+
const tOut = u.output_tokens ?? 0;
|
|
1177
|
+
const tCacheC = u.cache_creation_input_tokens ?? 0;
|
|
1178
|
+
const tCacheR = u.cache_read_input_tokens ?? 0;
|
|
1179
|
+
totalInput += tIn;
|
|
1180
|
+
totalOutput += tOut;
|
|
1181
|
+
totalCacheCreation += tCacheC;
|
|
1182
|
+
totalCacheRead += tCacheR;
|
|
1183
|
+
const entry = modelUsageMap[modelId] ?? {
|
|
1184
|
+
inputTokens: 0,
|
|
1185
|
+
outputTokens: 0,
|
|
1186
|
+
cacheCreationInputTokens: 0,
|
|
1187
|
+
cacheReadInputTokens: 0,
|
|
1188
|
+
contextWindow: getContextWindowLimit(turn.model)
|
|
1189
|
+
};
|
|
1190
|
+
entry.inputTokens += tIn;
|
|
1191
|
+
entry.outputTokens += tOut;
|
|
1192
|
+
entry.cacheCreationInputTokens += tCacheC;
|
|
1193
|
+
entry.cacheReadInputTokens += tCacheR;
|
|
1194
|
+
modelUsageMap[modelId] = entry;
|
|
1195
|
+
const turnCost = computeCost(turn.model, u);
|
|
1196
|
+
if (turnCost !== void 0) {
|
|
1197
|
+
totalCostUsd = (totalCostUsd ?? 0) + turnCost;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
const rawSdkResponse = {
|
|
1201
|
+
type: "result",
|
|
1202
|
+
subtype: "success",
|
|
1203
|
+
session_id: sessionId,
|
|
1204
|
+
duration_ms: durationMs,
|
|
1205
|
+
total_cost_usd: totalCostUsd,
|
|
1206
|
+
modelUsage: modelUsageMap,
|
|
1207
|
+
usage: {
|
|
1208
|
+
input_tokens: totalInput,
|
|
1209
|
+
output_tokens: totalOutput,
|
|
1210
|
+
cache_read_input_tokens: totalCacheRead,
|
|
1211
|
+
cache_creation_input_tokens: totalCacheCreation
|
|
1212
|
+
},
|
|
1213
|
+
// Provenance: keeping the last assistant payload around helps
|
|
1214
|
+
// debug "did we miss the end_turn?" cases without re-parsing
|
|
1215
|
+
// the JSONL.
|
|
1216
|
+
_cli_provenance: {
|
|
1217
|
+
adapter: "claude-code-cli",
|
|
1218
|
+
assistantTurns: active.assistantTurns.length,
|
|
1219
|
+
lastAssistantSnapshot: active.lastAssistantRaw
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1222
|
+
const normalizedSdkResponse = {
|
|
1223
|
+
tokenUsage: {
|
|
1224
|
+
inputTokens: totalInput,
|
|
1225
|
+
outputTokens: totalOutput,
|
|
1226
|
+
totalTokens: totalInput + totalOutput,
|
|
1227
|
+
cacheReadTokens: totalCacheRead,
|
|
1228
|
+
cacheCreationTokens: totalCacheCreation
|
|
1229
|
+
},
|
|
1230
|
+
contextWindowLimit: Math.max(0, ...Object.values(modelUsageMap).map((m) => m.contextWindow)) || 2e5,
|
|
1231
|
+
costUsd: totalCostUsd,
|
|
1232
|
+
primaryModel,
|
|
1233
|
+
durationMs
|
|
1234
|
+
};
|
|
1235
|
+
const lastTurn = active.assistantTurns[active.assistantTurns.length - 1];
|
|
1236
|
+
const computedContextWindow = lastTurn?.usage ? (lastTurn.usage.input_tokens ?? 0) + (lastTurn.usage.cache_creation_input_tokens ?? 0) + (lastTurn.usage.cache_read_input_tokens ?? 0) : void 0;
|
|
1237
|
+
try {
|
|
1238
|
+
await app.service("tasks").patch(active.taskId, {
|
|
1239
|
+
status: TaskStatus3.COMPLETED,
|
|
1240
|
+
completed_at: ts,
|
|
1241
|
+
message_range: {
|
|
1242
|
+
start_index: active.userMessageIndex,
|
|
1243
|
+
end_index: active.lastIndex,
|
|
1244
|
+
end_timestamp: ts
|
|
1245
|
+
},
|
|
1246
|
+
model: primaryModel,
|
|
1247
|
+
duration_ms: durationMs,
|
|
1248
|
+
tool_use_count: active.toolUseCount,
|
|
1249
|
+
raw_sdk_response: rawSdkResponse,
|
|
1250
|
+
normalized_sdk_response: normalizedSdkResponse,
|
|
1251
|
+
computed_context_window: computedContextWindow
|
|
1252
|
+
});
|
|
1253
|
+
} catch (err) {
|
|
1254
|
+
console.warn("[claude-cli-watcher.sink] task close failed", {
|
|
1255
|
+
sessionId,
|
|
1256
|
+
taskId: active.taskId,
|
|
1257
|
+
err: err instanceof Error ? err.message : String(err)
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
try {
|
|
1261
|
+
const patch = {
|
|
1262
|
+
status: SessionStatus2.IDLE,
|
|
1263
|
+
ready_for_prompt: true
|
|
1264
|
+
};
|
|
1265
|
+
if (computedContextWindow !== void 0) {
|
|
1266
|
+
patch.current_context_usage = computedContextWindow;
|
|
1267
|
+
patch.context_window_limit = normalizedSdkResponse.contextWindowLimit;
|
|
1268
|
+
patch.last_context_update_at = ts;
|
|
1269
|
+
}
|
|
1270
|
+
await app.service("sessions").patch(sessionId, patch);
|
|
1271
|
+
} catch (err) {
|
|
1272
|
+
console.warn("[claude-cli-watcher.sink] session IDLE patch failed", {
|
|
1273
|
+
sessionId,
|
|
1274
|
+
err: err instanceof Error ? err.message : String(err)
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
console.log(
|
|
1280
|
+
JSON.stringify({
|
|
1281
|
+
layer: "claude-cli-watcher.sink",
|
|
1282
|
+
sessionId,
|
|
1283
|
+
eventType: event.type
|
|
1284
|
+
})
|
|
1285
|
+
);
|
|
1286
|
+
} catch (err) {
|
|
1287
|
+
console.warn("[claude-cli-watcher.sink] write failed (re-throwing)", {
|
|
1288
|
+
sessionId,
|
|
1289
|
+
eventType: event.type,
|
|
1290
|
+
err: err instanceof Error ? err.message : String(err)
|
|
1291
|
+
});
|
|
1292
|
+
throw err;
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
closeActiveTurnDispatch = async (sessionId, _reason, ts) => {
|
|
1296
|
+
await sink(sessionId, {
|
|
1297
|
+
type: "turn_end",
|
|
1298
|
+
messageId: "watchdog-synthetic",
|
|
1299
|
+
timestamp: ts
|
|
1300
|
+
});
|
|
1301
|
+
};
|
|
1302
|
+
return sink;
|
|
1303
|
+
}
|
|
1304
|
+
function resolveHomeDirForCliSession(session) {
|
|
1305
|
+
if (session.unix_username) {
|
|
1306
|
+
return `/home/${session.unix_username}`;
|
|
1307
|
+
}
|
|
1308
|
+
return os2.homedir();
|
|
1309
|
+
}
|
|
1310
|
+
function getCliWatcherRegistry(app) {
|
|
1311
|
+
if (!registrySingleton) {
|
|
1312
|
+
registrySingleton = new ClaudeCliWatcherRegistry(
|
|
1313
|
+
buildCliPersister(app),
|
|
1314
|
+
buildCliEventSink(app),
|
|
1315
|
+
console
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
return registrySingleton;
|
|
1319
|
+
}
|
|
1320
|
+
function buildSpawnConfigForSession(session, worktreeCwd) {
|
|
1321
|
+
const homeDir = resolveHomeDirForCliSession(session);
|
|
1322
|
+
const jsonlPath = claudeSessionJsonlPath2(homeDir, worktreeCwd, session.session_id);
|
|
1323
|
+
const transcriptExists = fs2.existsSync(jsonlPath);
|
|
1324
|
+
return {
|
|
1325
|
+
sessionId: transcriptExists ? void 0 : session.session_id,
|
|
1326
|
+
resumeSessionId: transcriptExists ? session.session_id : void 0,
|
|
1327
|
+
displayName: `cli-${shortId6(session.session_id)}`,
|
|
1328
|
+
model: session.model_config?.model,
|
|
1329
|
+
effort: session.model_config?.effort,
|
|
1330
|
+
permissionMode: permissionModeForCli(session.permission_config?.mode),
|
|
1331
|
+
addDirs: [worktreeCwd]
|
|
1332
|
+
// mcpConfigPath: lands once MCP scoping is plumbed for the CLI adapter.
|
|
1333
|
+
// appendSystemPromptFile: lands once session-context rendering is wired.
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
function dispatchZellijClaudeTab(app, userId, tabName, cwd, command, commandArgs) {
|
|
1337
|
+
if (!userId) return false;
|
|
1338
|
+
if (!app.io) return false;
|
|
1339
|
+
app.io.to(`user/${userId}/terminal`).emit("terminal:tab", {
|
|
1340
|
+
userId,
|
|
1341
|
+
action: "create",
|
|
1342
|
+
tabName,
|
|
1343
|
+
cwd,
|
|
1344
|
+
command,
|
|
1345
|
+
commandArgs
|
|
1346
|
+
});
|
|
1347
|
+
return true;
|
|
1348
|
+
}
|
|
1349
|
+
async function onCliSessionCreated(app, session, worktreeCwd) {
|
|
1350
|
+
if (session.agentic_tool !== "claude-code-cli") return;
|
|
1351
|
+
const homeDir = resolveHomeDirForCliSession(session);
|
|
1352
|
+
const slug = slugForCwd(worktreeCwd);
|
|
1353
|
+
const jsonlPath = claudeSessionJsonlPath2(homeDir, worktreeCwd, session.session_id);
|
|
1354
|
+
const spawnCfg = buildSpawnConfigForSession(session, worktreeCwd);
|
|
1355
|
+
const built = buildClaudeCliSpawn(spawnCfg);
|
|
1356
|
+
const tabName = spawnCfg.displayName ?? `cli-${shortId6(session.session_id)}`;
|
|
1357
|
+
const persister = buildCliPersister(app);
|
|
1358
|
+
await persister.saveOffset(session.session_id, {
|
|
1359
|
+
watcher_offset: 0,
|
|
1360
|
+
last_event_ts: null,
|
|
1361
|
+
last_event_uuid: null
|
|
1362
|
+
});
|
|
1363
|
+
try {
|
|
1364
|
+
const db = getDb(app);
|
|
1365
|
+
if (db) {
|
|
1366
|
+
const repo = new SessionRepository3(db);
|
|
1367
|
+
const row = await repo.findById(session.session_id).catch(() => null);
|
|
1368
|
+
if (row) {
|
|
1369
|
+
const patch = {
|
|
1370
|
+
sdk_session_id: session.session_id,
|
|
1371
|
+
cli_state: {
|
|
1372
|
+
...row.cli_state ?? {},
|
|
1373
|
+
slug,
|
|
1374
|
+
jsonl_path: jsonlPath,
|
|
1375
|
+
zellij_tab_name: tabName
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
await repo.update(session.session_id, patch);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
} catch (err) {
|
|
1382
|
+
console.warn("[claude-cli-integration] failed to persist initial cli_state", err);
|
|
1383
|
+
}
|
|
1384
|
+
try {
|
|
1385
|
+
const reg = getCliWatcherRegistry(app);
|
|
1386
|
+
await reg.register({
|
|
1387
|
+
sessionId: session.session_id,
|
|
1388
|
+
cwd: worktreeCwd,
|
|
1389
|
+
homeDir,
|
|
1390
|
+
startOffset: session.cli_state?.watcher_offset ?? 0
|
|
1391
|
+
});
|
|
1392
|
+
} catch (err) {
|
|
1393
|
+
console.warn(
|
|
1394
|
+
`[claude-cli-integration] watcher register failed for session ${session.session_id}:`,
|
|
1395
|
+
err
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
const dispatched = dispatchZellijClaudeTab(
|
|
1399
|
+
app,
|
|
1400
|
+
session.created_by,
|
|
1401
|
+
tabName,
|
|
1402
|
+
worktreeCwd,
|
|
1403
|
+
built.bin,
|
|
1404
|
+
built.args
|
|
1405
|
+
);
|
|
1406
|
+
console.log(
|
|
1407
|
+
JSON.stringify({
|
|
1408
|
+
layer: "claude-cli-integration.onCliSessionCreated",
|
|
1409
|
+
sessionId: session.session_id,
|
|
1410
|
+
slug,
|
|
1411
|
+
jsonl_path: jsonlPath,
|
|
1412
|
+
tab_dispatched: dispatched,
|
|
1413
|
+
spawn: { bin: built.bin, args: built.args }
|
|
1414
|
+
})
|
|
1415
|
+
);
|
|
1416
|
+
}
|
|
1417
|
+
async function onCliSessionEnded(app, sessionId) {
|
|
1418
|
+
const reg = getCliWatcherRegistry(app);
|
|
1419
|
+
await reg.unregister(sessionId);
|
|
1420
|
+
stopTaskWatchdog(sessionId);
|
|
1421
|
+
activeCliTurn.delete(sessionId);
|
|
1422
|
+
}
|
|
1423
|
+
async function rehydrateCliWatchers(app, worktreeCwdLookup) {
|
|
1424
|
+
const db = getDb(app);
|
|
1425
|
+
if (!db) return;
|
|
1426
|
+
const repo = new SessionRepository3(db);
|
|
1427
|
+
const all = await repo.findAll().catch(() => []);
|
|
1428
|
+
const reg = getCliWatcherRegistry(app);
|
|
1429
|
+
let rehydrated = 0;
|
|
1430
|
+
for (const session of all) {
|
|
1431
|
+
if (session.agentic_tool !== "claude-code-cli") continue;
|
|
1432
|
+
if (session.status === "completed" || session.status === "failed") continue;
|
|
1433
|
+
if (session.archived) continue;
|
|
1434
|
+
const cwd = await worktreeCwdLookup(session.worktree_id);
|
|
1435
|
+
if (!cwd) continue;
|
|
1436
|
+
primeActiveCliTurnFromSession(app, session);
|
|
1437
|
+
try {
|
|
1438
|
+
await reg.register({
|
|
1439
|
+
sessionId: session.session_id,
|
|
1440
|
+
cwd,
|
|
1441
|
+
homeDir: resolveHomeDirForCliSession(session),
|
|
1442
|
+
startOffset: session.cli_state?.watcher_offset ?? 0
|
|
1443
|
+
});
|
|
1444
|
+
rehydrated++;
|
|
1445
|
+
} catch (err) {
|
|
1446
|
+
console.warn(
|
|
1447
|
+
`[claude-cli-integration] failed to rehydrate watcher for ${session.session_id}:`,
|
|
1448
|
+
err
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
if (rehydrated > 0) {
|
|
1453
|
+
console.log(`[claude-cli-integration] rehydrated ${rehydrated} CLI watcher(s)`);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
var activeCliTurn, WATCHDOG_TICK_MS, WATCHDOG_IDLE_THRESHOLD_MS, watchdogTimers, closeActiveTurnDispatch, pendingCliTask, registrySingleton;
|
|
1457
|
+
var init_claude_cli_integration = __esm({
|
|
1458
|
+
"src/services/claude-cli-integration.ts"() {
|
|
1459
|
+
"use strict";
|
|
1460
|
+
init_drizzle();
|
|
1461
|
+
init_build_initial_user_message();
|
|
1462
|
+
init_claude_cli_watcher();
|
|
1463
|
+
init_claude_cli_watcher();
|
|
1464
|
+
activeCliTurn = /* @__PURE__ */ new Map();
|
|
1465
|
+
WATCHDOG_TICK_MS = 6e4;
|
|
1466
|
+
WATCHDOG_IDLE_THRESHOLD_MS = 9e4;
|
|
1467
|
+
watchdogTimers = /* @__PURE__ */ new Map();
|
|
1468
|
+
closeActiveTurnDispatch = null;
|
|
1469
|
+
pendingCliTask = /* @__PURE__ */ new Map();
|
|
1470
|
+
registrySingleton = null;
|
|
1471
|
+
}
|
|
260
1472
|
});
|
|
261
|
-
|
|
262
|
-
|
|
1473
|
+
|
|
1474
|
+
// src/utils/git-impersonation.ts
|
|
1475
|
+
async function resolveDaemonUserForGroupRefresh() {
|
|
263
1476
|
const { getDaemonUser, isUnixGroupRefreshNeeded } = await import("@agor/core/config");
|
|
264
1477
|
if (!isUnixGroupRefreshNeeded()) {
|
|
265
1478
|
return void 0;
|
|
266
1479
|
}
|
|
267
|
-
|
|
268
|
-
if (daemonUser) {
|
|
269
|
-
validateResolvedUnixUser("simple", daemonUser);
|
|
270
|
-
}
|
|
271
|
-
return daemonUser;
|
|
1480
|
+
return getDaemonUser();
|
|
272
1481
|
}
|
|
1482
|
+
var init_git_impersonation = __esm({
|
|
1483
|
+
"src/utils/git-impersonation.ts"() {
|
|
1484
|
+
"use strict";
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
|
|
1488
|
+
// src/utils/git-shell-capture.ts
|
|
1489
|
+
var git_shell_capture_exports = {};
|
|
1490
|
+
__export(git_shell_capture_exports, {
|
|
1491
|
+
captureGitStateViaShell: () => captureGitStateViaShell
|
|
1492
|
+
});
|
|
1493
|
+
import { runAsUser } from "@agor/core/unix";
|
|
273
1494
|
async function captureGitStateViaShell(worktreePath) {
|
|
274
|
-
const daemonUser = await
|
|
1495
|
+
const daemonUser = await resolveDaemonUserForGroupRefresh();
|
|
275
1496
|
const runOpts = { asUser: daemonUser, timeout: 1e4 };
|
|
276
1497
|
let sha = "unknown";
|
|
277
1498
|
let ref = "unknown";
|
|
@@ -301,12 +1522,13 @@ async function captureGitStateViaShell(worktreePath) {
|
|
|
301
1522
|
}
|
|
302
1523
|
return { sha, ref };
|
|
303
1524
|
}
|
|
304
|
-
function escapeForShell(
|
|
305
|
-
return `'${
|
|
1525
|
+
function escapeForShell(path3) {
|
|
1526
|
+
return `'${path3.replace(/'/g, "'\\''")}'`;
|
|
306
1527
|
}
|
|
307
1528
|
var init_git_shell_capture = __esm({
|
|
308
1529
|
"src/utils/git-shell-capture.ts"() {
|
|
309
1530
|
"use strict";
|
|
1531
|
+
init_git_impersonation();
|
|
310
1532
|
}
|
|
311
1533
|
});
|
|
312
1534
|
|
|
@@ -640,10 +1862,10 @@ function mergeDefs(...defs) {
|
|
|
640
1862
|
function cloneDef(schema) {
|
|
641
1863
|
return mergeDefs(schema._zod.def);
|
|
642
1864
|
}
|
|
643
|
-
function getElementAtPath(obj,
|
|
644
|
-
if (!
|
|
1865
|
+
function getElementAtPath(obj, path3) {
|
|
1866
|
+
if (!path3)
|
|
645
1867
|
return obj;
|
|
646
|
-
return
|
|
1868
|
+
return path3.reduce((acc, key) => acc?.[key], obj);
|
|
647
1869
|
}
|
|
648
1870
|
function promiseAllObject(promisesObj) {
|
|
649
1871
|
const keys = Object.keys(promisesObj);
|
|
@@ -971,11 +2193,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
971
2193
|
}
|
|
972
2194
|
return false;
|
|
973
2195
|
}
|
|
974
|
-
function prefixIssues(
|
|
2196
|
+
function prefixIssues(path3, issues) {
|
|
975
2197
|
return issues.map((iss) => {
|
|
976
2198
|
var _a3;
|
|
977
2199
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
978
|
-
iss.path.unshift(
|
|
2200
|
+
iss.path.unshift(path3);
|
|
979
2201
|
return iss;
|
|
980
2202
|
});
|
|
981
2203
|
}
|
|
@@ -1193,16 +2415,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
1193
2415
|
}
|
|
1194
2416
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1195
2417
|
const fieldErrors = { _errors: [] };
|
|
1196
|
-
const processError = (error52,
|
|
2418
|
+
const processError = (error52, path3 = []) => {
|
|
1197
2419
|
for (const issue2 of error52.issues) {
|
|
1198
2420
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1199
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
2421
|
+
issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
|
|
1200
2422
|
} else if (issue2.code === "invalid_key") {
|
|
1201
|
-
processError({ issues: issue2.issues }, [...
|
|
2423
|
+
processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
|
|
1202
2424
|
} else if (issue2.code === "invalid_element") {
|
|
1203
|
-
processError({ issues: issue2.issues }, [...
|
|
2425
|
+
processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
|
|
1204
2426
|
} else {
|
|
1205
|
-
const fullpath = [...
|
|
2427
|
+
const fullpath = [...path3, ...issue2.path];
|
|
1206
2428
|
if (fullpath.length === 0) {
|
|
1207
2429
|
fieldErrors._errors.push(mapper(issue2));
|
|
1208
2430
|
} else {
|
|
@@ -1229,17 +2451,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
1229
2451
|
}
|
|
1230
2452
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1231
2453
|
const result = { errors: [] };
|
|
1232
|
-
const processError = (error52,
|
|
2454
|
+
const processError = (error52, path3 = []) => {
|
|
1233
2455
|
var _a3, _b;
|
|
1234
2456
|
for (const issue2 of error52.issues) {
|
|
1235
2457
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1236
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
2458
|
+
issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
|
|
1237
2459
|
} else if (issue2.code === "invalid_key") {
|
|
1238
|
-
processError({ issues: issue2.issues }, [...
|
|
2460
|
+
processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
|
|
1239
2461
|
} else if (issue2.code === "invalid_element") {
|
|
1240
|
-
processError({ issues: issue2.issues }, [...
|
|
2462
|
+
processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
|
|
1241
2463
|
} else {
|
|
1242
|
-
const fullpath = [...
|
|
2464
|
+
const fullpath = [...path3, ...issue2.path];
|
|
1243
2465
|
if (fullpath.length === 0) {
|
|
1244
2466
|
result.errors.push(mapper(issue2));
|
|
1245
2467
|
continue;
|
|
@@ -1271,8 +2493,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
1271
2493
|
}
|
|
1272
2494
|
function toDotPath(_path) {
|
|
1273
2495
|
const segs = [];
|
|
1274
|
-
const
|
|
1275
|
-
for (const seg of
|
|
2496
|
+
const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
2497
|
+
for (const seg of path3) {
|
|
1276
2498
|
if (typeof seg === "number")
|
|
1277
2499
|
segs.push(`[${seg}]`);
|
|
1278
2500
|
else if (typeof seg === "symbol")
|
|
@@ -13153,7 +14375,7 @@ var init_v4_mini = __esm({
|
|
|
13153
14375
|
|
|
13154
14376
|
// src/mcp/tokens.ts
|
|
13155
14377
|
import { MCP_TOKEN } from "@agor/core/config";
|
|
13156
|
-
import { generateId, SessionRepository as
|
|
14378
|
+
import { generateId as generateId4, SessionRepository as SessionRepository4, shortId as shortId7 } from "@agor/core/db";
|
|
13157
14379
|
import {
|
|
13158
14380
|
MCP_TOKEN_AUDIENCE,
|
|
13159
14381
|
MCP_TOKEN_ISSUER
|
|
@@ -13204,7 +14426,7 @@ async function validateSessionToken(app, token) {
|
|
|
13204
14426
|
}
|
|
13205
14427
|
const sessionExists = await s.sessionRepo.exists(sessionId);
|
|
13206
14428
|
if (!sessionExists) {
|
|
13207
|
-
console.warn(`[mcp-tokens] token rejected: session ${sessionId
|
|
14429
|
+
console.warn(`[mcp-tokens] token rejected: session ${shortId7(sessionId)} not found`);
|
|
13208
14430
|
return null;
|
|
13209
14431
|
}
|
|
13210
14432
|
return { sessionId, userId, jti: payload.jti };
|
|
@@ -13232,7 +14454,8 @@ var init_tool_registry = __esm({
|
|
|
13232
14454
|
users: "User accounts, profiles, preferences, and administration",
|
|
13233
14455
|
analytics: "Usage and cost tracking leaderboard",
|
|
13234
14456
|
"mcp-servers": "External MCP server configuration and OAuth management",
|
|
13235
|
-
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)"
|
|
14457
|
+
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)",
|
|
14458
|
+
widgets: "In-conversation interactive widgets \u2014 agents render small forms/buttons inline in the transcript to capture user input that never enters the LLM context"
|
|
13236
14459
|
};
|
|
13237
14460
|
ALWAYS_VISIBLE = /* @__PURE__ */ new Set(["agor_search_tools", "agor_execute_tool"]);
|
|
13238
14461
|
ToolRegistry = class {
|
|
@@ -15001,13 +16224,13 @@ function resolveRef(ref, ctx) {
|
|
|
15001
16224
|
if (!ref.startsWith("#")) {
|
|
15002
16225
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
15003
16226
|
}
|
|
15004
|
-
const
|
|
15005
|
-
if (
|
|
16227
|
+
const path3 = ref.slice(1).split("/").filter(Boolean);
|
|
16228
|
+
if (path3.length === 0) {
|
|
15006
16229
|
return ctx.rootSchema;
|
|
15007
16230
|
}
|
|
15008
16231
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
15009
|
-
if (
|
|
15010
|
-
const key =
|
|
16232
|
+
if (path3[0] === defsKey) {
|
|
16233
|
+
const key = path3[1];
|
|
15011
16234
|
if (!key || !ctx.defs[key]) {
|
|
15012
16235
|
throw new Error(`Reference not found: ${ref}`);
|
|
15013
16236
|
}
|
|
@@ -15875,7 +17098,7 @@ var init_analytics = __esm({
|
|
|
15875
17098
|
|
|
15876
17099
|
// src/mcp/tools/artifacts.ts
|
|
15877
17100
|
import { WorktreeRepository as WorktreeRepository2 } from "@agor/core/db";
|
|
15878
|
-
import { NotFoundError } from "@agor/core/utils/errors";
|
|
17101
|
+
import { NotFoundError as NotFoundError2 } from "@agor/core/utils/errors";
|
|
15879
17102
|
function registerArtifactTools(server, ctx) {
|
|
15880
17103
|
server.registerTool(
|
|
15881
17104
|
"agor_artifacts_publish",
|
|
@@ -16048,7 +17271,7 @@ NOTE: sandpack_error and console_logs require a browser to be viewing the artifa
|
|
|
16048
17271
|
try {
|
|
16049
17272
|
artifact = await service.get(artifactId, ctx.baseServiceParams);
|
|
16050
17273
|
} catch (err) {
|
|
16051
|
-
if (err instanceof
|
|
17274
|
+
if (err instanceof NotFoundError2) {
|
|
16052
17275
|
return textResult({ error: `Artifact ${artifactId} not found` });
|
|
16053
17276
|
}
|
|
16054
17277
|
throw err;
|
|
@@ -16159,7 +17382,7 @@ Visibility: public artifacts are readable by anyone; private artifacts are only
|
|
|
16159
17382
|
try {
|
|
16160
17383
|
artifact = await service.get(artifactId, ctx.baseServiceParams);
|
|
16161
17384
|
} catch (err) {
|
|
16162
|
-
if (err instanceof
|
|
17385
|
+
if (err instanceof NotFoundError2) {
|
|
16163
17386
|
return textResult({ error: `Artifact ${artifactId} not found` });
|
|
16164
17387
|
}
|
|
16165
17388
|
throw err;
|
|
@@ -17493,7 +18716,7 @@ import {
|
|
|
17493
18716
|
inArray,
|
|
17494
18717
|
messages as messagesTable,
|
|
17495
18718
|
or,
|
|
17496
|
-
SessionRepository as
|
|
18719
|
+
SessionRepository as SessionRepository5,
|
|
17497
18720
|
select,
|
|
17498
18721
|
sql
|
|
17499
18722
|
} from "@agor/core/db";
|
|
@@ -17562,7 +18785,7 @@ function registerMessageTools(server, ctx) {
|
|
|
17562
18785
|
if (isWorktreeRbacEnabled()) {
|
|
17563
18786
|
const userRole = ctx.authenticatedUser?.role;
|
|
17564
18787
|
if (!isSuperAdmin(userRole)) {
|
|
17565
|
-
const sessionRepo = new
|
|
18788
|
+
const sessionRepo = new SessionRepository5(ctx.db);
|
|
17566
18789
|
const accessibleSessions = await sessionRepo.findAccessibleSessions(ctx.userId);
|
|
17567
18790
|
const accessibleIds = accessibleSessions.map((s) => s.session_id);
|
|
17568
18791
|
if (accessibleIds.length === 0) {
|
|
@@ -17868,11 +19091,11 @@ function registerRepoTools(server, ctx) {
|
|
|
17868
19091
|
})
|
|
17869
19092
|
},
|
|
17870
19093
|
async (args) => {
|
|
17871
|
-
const
|
|
17872
|
-
if (!
|
|
19094
|
+
const path3 = coerceString(args.path);
|
|
19095
|
+
if (!path3) throw new Error("path is required");
|
|
17873
19096
|
const slug = coerceString(args.slug);
|
|
17874
19097
|
const reposService = ctx.app.service("repos");
|
|
17875
|
-
const repo = await reposService.addLocalRepository({ path:
|
|
19098
|
+
const repo = await reposService.addLocalRepository({ path: path3, slug }, ctx.baseServiceParams);
|
|
17876
19099
|
return textResult(repo);
|
|
17877
19100
|
}
|
|
17878
19101
|
);
|
|
@@ -18053,7 +19276,7 @@ var init_search = __esm({
|
|
|
18053
19276
|
});
|
|
18054
19277
|
|
|
18055
19278
|
// src/mcp/tools/sessions.ts
|
|
18056
|
-
import { WorktreeRepository as WorktreeRepository3 } from "@agor/core/db";
|
|
19279
|
+
import { shortId as shortId8, WorktreeRepository as WorktreeRepository3 } from "@agor/core/db";
|
|
18057
19280
|
import {
|
|
18058
19281
|
AVAILABLE_CLAUDE_MODEL_ALIASES,
|
|
18059
19282
|
CODEX_MODEL_METADATA,
|
|
@@ -18336,7 +19559,7 @@ function registerSessionTools(server, ctx) {
|
|
|
18336
19559
|
inputSchema: external_exports.object({
|
|
18337
19560
|
prompt: external_exports.string().describe("The prompt/task for the subsession agent to execute"),
|
|
18338
19561
|
title: external_exports.string().optional().describe("Optional title for the session (defaults to first 100 chars of prompt)"),
|
|
18339
|
-
agenticTool: external_exports.enum(["claude-code", "codex", "gemini", "opencode"]).optional().describe("Which agent to use for the subsession (defaults to same as parent)"),
|
|
19562
|
+
agenticTool: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini", "opencode"]).optional().describe("Which agent to use for the subsession (defaults to same as parent)"),
|
|
18340
19563
|
enableCallback: external_exports.boolean().optional().describe("Enable callback to parent on completion (default: true)"),
|
|
18341
19564
|
includeLastMessage: external_exports.boolean().optional().describe("Include child's final result in callback (default: true)"),
|
|
18342
19565
|
includeOriginalPrompt: external_exports.boolean().optional().describe("Include original spawn prompt in callback (default: false)"),
|
|
@@ -18391,7 +19614,7 @@ function registerSessionTools(server, ctx) {
|
|
|
18391
19614
|
mode: external_exports.enum(["continue", "fork", "subsession", "btw"]).describe(
|
|
18392
19615
|
"How to route the work: continue (add to existing session), fork (create sibling session), subsession (create child session), btw (ephemeral fork \u2014 works even on running sessions, auto-callbacks result to caller, auto-archives when done)"
|
|
18393
19616
|
),
|
|
18394
|
-
agenticTool: external_exports.enum(["claude-code", "codex", "gemini"]).optional().describe(
|
|
19617
|
+
agenticTool: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini"]).optional().describe(
|
|
18395
19618
|
"Agent for subsession (subsession mode only, defaults to parent agent). Fork mode always uses parent agent."
|
|
18396
19619
|
),
|
|
18397
19620
|
title: external_exports.string().optional().describe("Session title (for fork/subsession only)"),
|
|
@@ -18500,7 +19723,7 @@ function registerSessionTools(server, ctx) {
|
|
|
18500
19723
|
description: 'Create a new session in an existing worktree. Use for starting fresh work on a new task in the same codebase (e.g., new feature branch, separate investigation). Unlike spawn, this creates an independent session with no parent-child relationship. MCP servers are inherited from the worktree (if configured) or user defaults, or can be overridden via `mcpServerIds`. Model selection falls back to user defaults and can be overridden via `modelConfig` (accepts either a model ID string like "claude-opus-4-6" or a full {mode, model, effort, provider} object \u2014 call `agor_models_list` to discover valid model IDs per agenticTool). Supports optional callbacks to notify the creating session when the new session completes.',
|
|
18501
19724
|
inputSchema: external_exports.object({
|
|
18502
19725
|
worktreeId: external_exports.string().describe("Worktree ID where the session will run (required)"),
|
|
18503
|
-
agenticTool: external_exports.enum(["claude-code", "codex", "gemini"]).describe("Which agent to use for this session (required)"),
|
|
19726
|
+
agenticTool: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini"]).describe("Which agent to use for this session (required)"),
|
|
18504
19727
|
title: external_exports.string().optional().describe("Session title (optional)"),
|
|
18505
19728
|
description: external_exports.string().optional().describe("Session description (optional)"),
|
|
18506
19729
|
contextFiles: external_exports.array(external_exports.string()).optional().describe("Context file paths to load (optional)"),
|
|
@@ -18623,7 +19846,7 @@ function registerSessionTools(server, ctx) {
|
|
|
18623
19846
|
{ ...ctx.baseServiceParams, route: { id: session.session_id } }
|
|
18624
19847
|
);
|
|
18625
19848
|
}
|
|
18626
|
-
const callbackNote = callbackConfig.callback_session_id ? ` Callback will be sent to session ${callbackConfig.callback_session_id
|
|
19849
|
+
const callbackNote = callbackConfig.callback_session_id ? ` Callback will be sent to session ${shortId8(callbackConfig.callback_session_id)} on completion.` : "";
|
|
18627
19850
|
const mcpFailureNote = mcpAttachFailures.length > 0 ? ` Warning: ${mcpAttachFailures.length} requested MCP server(s) failed to attach \u2014 see mcpAttachFailures.` : "";
|
|
18628
19851
|
return textResult({
|
|
18629
19852
|
session,
|
|
@@ -18894,7 +20117,7 @@ function registerSessionTools(server, ctx) {
|
|
|
18894
20117
|
description: "List valid model IDs grouped by agenticTool. Use this to discover what to pass for `modelConfig` (or its string shorthand) in agor_sessions_create / spawn / prompt. Sourced live from the daemon model registry \u2014 when new models ship and the registry is updated, this tool returns them on the next call.",
|
|
18895
20118
|
annotations: { readOnlyHint: true },
|
|
18896
20119
|
inputSchema: external_exports.object({
|
|
18897
|
-
agenticTool: external_exports.enum(["claude-code", "codex", "copilot", "gemini"]).optional().describe("Filter to a single agentic tool. Omit to return all tools.")
|
|
20120
|
+
agenticTool: external_exports.enum(["claude-code", "claude-code-cli", "codex", "copilot", "gemini"]).optional().describe("Filter to a single agentic tool. Omit to return all tools.")
|
|
18898
20121
|
})
|
|
18899
20122
|
},
|
|
18900
20123
|
async (args) => {
|
|
@@ -18926,6 +20149,13 @@ function registerSessionTools(server, ctx) {
|
|
|
18926
20149
|
default: DEFAULT_CLAUDE_MODEL,
|
|
18927
20150
|
models: claudeModels
|
|
18928
20151
|
},
|
|
20152
|
+
// Claude Code CLI shares the same Anthropic model lineup as the
|
|
20153
|
+
// SDK path; surface the same list so MCP clients can pass any
|
|
20154
|
+
// valid claude id to either adapter.
|
|
20155
|
+
"claude-code-cli": {
|
|
20156
|
+
default: DEFAULT_CLAUDE_MODEL,
|
|
20157
|
+
models: claudeModels
|
|
20158
|
+
},
|
|
18929
20159
|
codex: {
|
|
18930
20160
|
default: DEFAULT_CODEX_MODEL,
|
|
18931
20161
|
models: codexModels
|
|
@@ -19146,33 +20376,194 @@ function registerUserTools(server, ctx) {
|
|
|
19146
20376
|
})
|
|
19147
20377
|
},
|
|
19148
20378
|
async (args) => {
|
|
19149
|
-
const createData = {
|
|
19150
|
-
email: args.email,
|
|
19151
|
-
password: args.password
|
|
19152
|
-
};
|
|
19153
|
-
if (args.name !== void 0) createData.name = args.name;
|
|
19154
|
-
if (args.emoji !== void 0) createData.emoji = args.emoji;
|
|
19155
|
-
if (args.avatar !== void 0) createData.avatar = args.avatar;
|
|
19156
|
-
if (args.unix_username !== void 0) createData.unix_username = args.unix_username;
|
|
19157
|
-
if (args.must_change_password !== void 0)
|
|
19158
|
-
createData.must_change_password = args.must_change_password;
|
|
19159
|
-
if (args.role !== void 0) createData.role = args.role;
|
|
19160
|
-
const newUser = await ctx.app.service("users").create(createData, ctx.baseServiceParams);
|
|
19161
|
-
return textResult(newUser);
|
|
20379
|
+
const createData = {
|
|
20380
|
+
email: args.email,
|
|
20381
|
+
password: args.password
|
|
20382
|
+
};
|
|
20383
|
+
if (args.name !== void 0) createData.name = args.name;
|
|
20384
|
+
if (args.emoji !== void 0) createData.emoji = args.emoji;
|
|
20385
|
+
if (args.avatar !== void 0) createData.avatar = args.avatar;
|
|
20386
|
+
if (args.unix_username !== void 0) createData.unix_username = args.unix_username;
|
|
20387
|
+
if (args.must_change_password !== void 0)
|
|
20388
|
+
createData.must_change_password = args.must_change_password;
|
|
20389
|
+
if (args.role !== void 0) createData.role = args.role;
|
|
20390
|
+
const newUser = await ctx.app.service("users").create(createData, ctx.baseServiceParams);
|
|
20391
|
+
return textResult(newUser);
|
|
20392
|
+
}
|
|
20393
|
+
);
|
|
20394
|
+
}
|
|
20395
|
+
var init_users = __esm({
|
|
20396
|
+
"src/mcp/tools/users.ts"() {
|
|
20397
|
+
"use strict";
|
|
20398
|
+
init_zod();
|
|
20399
|
+
init_server();
|
|
20400
|
+
}
|
|
20401
|
+
});
|
|
20402
|
+
|
|
20403
|
+
// src/widgets/env-vars/index.ts
|
|
20404
|
+
import { ENV_VAR_CONSTRAINTS, isEnvVarAllowed, validateEnvVar } from "@agor/core/config";
|
|
20405
|
+
import { BadRequest as BadRequest2 } from "@agor/core/feathers";
|
|
20406
|
+
var ENV_VAR_NAME_REGEX, envVarsParamsSchema, envVarsSubmitSchema;
|
|
20407
|
+
var init_env_vars = __esm({
|
|
20408
|
+
"src/widgets/env-vars/index.ts"() {
|
|
20409
|
+
"use strict";
|
|
20410
|
+
init_zod();
|
|
20411
|
+
init_registry();
|
|
20412
|
+
ENV_VAR_NAME_REGEX = ENV_VAR_CONSTRAINTS.NAME_PATTERN;
|
|
20413
|
+
envVarsParamsSchema = external_exports.object({
|
|
20414
|
+
names: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).min(1).max(10).refine((names) => new Set(names).size === names.length, {
|
|
20415
|
+
message: "Env var names must be unique"
|
|
20416
|
+
}).describe("UPPER_SNAKE env var names (same validation as User Settings)."),
|
|
20417
|
+
reason: external_exports.string().min(1).max(200).describe(
|
|
20418
|
+
"One sentence explaining why you need the value(s). Keep it tight \u2014 this renders in a small muted line under the input. NOT a place to restate what the widget does."
|
|
20419
|
+
),
|
|
20420
|
+
auto_resume: external_exports.boolean().default(true).describe(
|
|
20421
|
+
"When true (default), a system-authored prompt is auto-queued back into the agent on submit/dismiss."
|
|
20422
|
+
)
|
|
20423
|
+
});
|
|
20424
|
+
envVarsSubmitSchema = external_exports.object({
|
|
20425
|
+
values: external_exports.record(
|
|
20426
|
+
external_exports.string().regex(ENV_VAR_NAME_REGEX),
|
|
20427
|
+
external_exports.string().min(1).max(ENV_VAR_CONSTRAINTS.MAX_VALUE_LENGTH)
|
|
20428
|
+
).refine((v) => Object.keys(v).length >= 1 && Object.keys(v).length <= 10, {
|
|
20429
|
+
message: "Must submit between 1 and 10 env vars"
|
|
20430
|
+
}),
|
|
20431
|
+
scope: external_exports.enum(["global", "session"])
|
|
20432
|
+
});
|
|
20433
|
+
}
|
|
20434
|
+
});
|
|
20435
|
+
|
|
20436
|
+
// src/mcp/tools/widgets.ts
|
|
20437
|
+
import { MessageRole as MessageRole3 } from "@agor/core/types";
|
|
20438
|
+
function widgetContentPreview(params) {
|
|
20439
|
+
const list = params.names.join(", ");
|
|
20440
|
+
return params.names.length === 1 ? `Please provide ${list}: ${params.reason}` : `Please provide ${list}: ${params.reason}`;
|
|
20441
|
+
}
|
|
20442
|
+
function allNamesPresentInScope(envVarsMeta, names, scope) {
|
|
20443
|
+
if (!envVarsMeta) return false;
|
|
20444
|
+
for (const name of names) {
|
|
20445
|
+
const meta3 = envVarsMeta[name];
|
|
20446
|
+
if (!meta3 || meta3.scope !== scope) return false;
|
|
20447
|
+
}
|
|
20448
|
+
return true;
|
|
20449
|
+
}
|
|
20450
|
+
function registerWidgetTools(server, ctx) {
|
|
20451
|
+
server.registerTool(
|
|
20452
|
+
"agor_widgets_request_env_vars",
|
|
20453
|
+
{
|
|
20454
|
+
description: 'Ask the user to provide one or more environment variables via a compact in-conversation form. FIRE-AND-FORGET: the widget renders inline; end your turn after calling. You will receive a user-role message ("[Agor] User submitted ...") when the user responds. Values never enter your context \u2014 only the variable NAMES do. Do NOT ask the user to paste values into chat. Keep `reason` to ONE short sentence (\u2264200 chars) \u2014 it shows as a small muted line; do not restate what the widget does or describe the security contract (the UI handles that).',
|
|
20455
|
+
annotations: { destructiveHint: false, openWorldHint: false },
|
|
20456
|
+
inputSchema: envVarsParamsSchema
|
|
20457
|
+
},
|
|
20458
|
+
async (args) => {
|
|
20459
|
+
const params = args;
|
|
20460
|
+
const session = await ctx.app.service("sessions").get(ctx.sessionId, ctx.baseServiceParams);
|
|
20461
|
+
const sessionCreatorId = session.created_by;
|
|
20462
|
+
const creator = await ctx.app.service("users").get(sessionCreatorId, ctx.baseServiceParams);
|
|
20463
|
+
const presentEverywhere = allNamesPresentInScope(
|
|
20464
|
+
creator.env_vars,
|
|
20465
|
+
params.names,
|
|
20466
|
+
"global"
|
|
20467
|
+
);
|
|
20468
|
+
const requestedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
20469
|
+
const baseWidgetMeta = {
|
|
20470
|
+
widget_type: "env_vars",
|
|
20471
|
+
schema_version: 1,
|
|
20472
|
+
params,
|
|
20473
|
+
status: presentEverywhere ? "already_present" : "pending",
|
|
20474
|
+
requested_at: requestedAt,
|
|
20475
|
+
...presentEverywhere ? { resolved_at: requestedAt } : {},
|
|
20476
|
+
auto_resume: params.auto_resume
|
|
20477
|
+
};
|
|
20478
|
+
const hostTask = await findHostTaskForSession(
|
|
20479
|
+
ctx.app,
|
|
20480
|
+
ctx.sessionId,
|
|
20481
|
+
ctx.baseServiceParams
|
|
20482
|
+
);
|
|
20483
|
+
const hostTaskId = hostTask?.task_id;
|
|
20484
|
+
const created = await appendSystemMessage({
|
|
20485
|
+
app: ctx.app,
|
|
20486
|
+
db: ctx.db,
|
|
20487
|
+
sessionId: ctx.sessionId,
|
|
20488
|
+
taskId: hostTaskId,
|
|
20489
|
+
content: widgetContentPreview(params),
|
|
20490
|
+
contentPreview: `Widget: env_vars (${params.names.join(", ")})`,
|
|
20491
|
+
type: "widget_request",
|
|
20492
|
+
role: MessageRole3.SYSTEM,
|
|
20493
|
+
// widget_id is filled in once we know the new message_id (id == widget_id).
|
|
20494
|
+
metadata: {
|
|
20495
|
+
widget: {
|
|
20496
|
+
...baseWidgetMeta,
|
|
20497
|
+
widget_id: "pending"
|
|
20498
|
+
}
|
|
20499
|
+
}
|
|
20500
|
+
});
|
|
20501
|
+
const widgetId = created.message_id;
|
|
20502
|
+
if (hostTask?.message_range) {
|
|
20503
|
+
try {
|
|
20504
|
+
await ctx.app.service("tasks").patch(
|
|
20505
|
+
hostTask.task_id,
|
|
20506
|
+
{
|
|
20507
|
+
message_range: {
|
|
20508
|
+
start_index: hostTask.message_range.start_index,
|
|
20509
|
+
end_index: created.index
|
|
20510
|
+
}
|
|
20511
|
+
},
|
|
20512
|
+
ctx.baseServiceParams
|
|
20513
|
+
);
|
|
20514
|
+
} catch (err) {
|
|
20515
|
+
console.warn(
|
|
20516
|
+
`[widgets] failed to extend task.message_range for widget ${widgetId}:`,
|
|
20517
|
+
err
|
|
20518
|
+
);
|
|
20519
|
+
}
|
|
20520
|
+
}
|
|
20521
|
+
await ctx.app.service("messages").patch(
|
|
20522
|
+
widgetId,
|
|
20523
|
+
{
|
|
20524
|
+
metadata: {
|
|
20525
|
+
...created.metadata ?? {},
|
|
20526
|
+
widget: { ...baseWidgetMeta, widget_id: widgetId }
|
|
20527
|
+
}
|
|
20528
|
+
},
|
|
20529
|
+
ctx.baseServiceParams
|
|
20530
|
+
);
|
|
20531
|
+
if (presentEverywhere) {
|
|
20532
|
+
if (params.auto_resume) {
|
|
20533
|
+
const namesList = params.names.join(", ");
|
|
20534
|
+
const verb = params.names.length === 1 ? "was" : "were";
|
|
20535
|
+
const prompt = `[Agor] ${namesList} ${verb} already configured. You can proceed.`;
|
|
20536
|
+
await ctx.app.service("/sessions/:id/prompt").create(
|
|
20537
|
+
{
|
|
20538
|
+
prompt,
|
|
20539
|
+
messageSource: "agor",
|
|
20540
|
+
metadata: {
|
|
20541
|
+
system_authored: true,
|
|
20542
|
+
widget_id: widgetId
|
|
20543
|
+
}
|
|
20544
|
+
},
|
|
20545
|
+
{ ...ctx.baseServiceParams, route: { id: ctx.sessionId } }
|
|
20546
|
+
);
|
|
20547
|
+
}
|
|
20548
|
+
return textResult({ widget_id: widgetId, status: "already_present" });
|
|
20549
|
+
}
|
|
20550
|
+
return textResult({ widget_id: widgetId, status: "requested" });
|
|
19162
20551
|
}
|
|
19163
20552
|
);
|
|
19164
20553
|
}
|
|
19165
|
-
var
|
|
19166
|
-
"src/mcp/tools/
|
|
20554
|
+
var init_widgets = __esm({
|
|
20555
|
+
"src/mcp/tools/widgets.ts"() {
|
|
19167
20556
|
"use strict";
|
|
19168
|
-
|
|
20557
|
+
init_append_system_message();
|
|
20558
|
+
init_session_tasks();
|
|
20559
|
+
init_env_vars();
|
|
19169
20560
|
init_server();
|
|
19170
20561
|
}
|
|
19171
20562
|
});
|
|
19172
20563
|
|
|
19173
20564
|
// src/mcp/tools/worktrees.ts
|
|
19174
20565
|
import { isWorktreeRbacEnabled as isWorktreeRbacEnabled2 } from "@agor/core/config";
|
|
19175
|
-
import { WorktreeRepository as WorktreeRepository4 } from "@agor/core/db";
|
|
20566
|
+
import { shortId as shortId9, WorktreeRepository as WorktreeRepository4 } from "@agor/core/db";
|
|
19176
20567
|
import { getAssistantConfig, isAssistant, WORKTREE_PERMISSION_LEVELS as WORKTREE_PERMISSION_LEVELS2 } from "@agor/core/types";
|
|
19177
20568
|
import { computeZoneRelativePosition } from "@agor/core/utils/board-placement";
|
|
19178
20569
|
import { normalizeOptionalHttpUrl } from "@agor/core/utils/url";
|
|
@@ -19552,7 +20943,7 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19552
20943
|
const zoneId = coerceString(args.zoneId);
|
|
19553
20944
|
const targetSessionId = coerceString(args.targetSessionId) ? await resolveSessionId(ctx, coerceString(args.targetSessionId)) : void 0;
|
|
19554
20945
|
const triggerTemplate = args.triggerTemplate === true;
|
|
19555
|
-
console.log(`\u{1F4CD} MCP pinning worktree ${worktreeId
|
|
20946
|
+
console.log(`\u{1F4CD} MCP pinning worktree ${shortId9(worktreeId)} to zone ${zoneId}`);
|
|
19556
20947
|
const worktree = await ctx.app.service("worktrees").get(worktreeId, ctx.baseServiceParams);
|
|
19557
20948
|
if (!worktree.board_id) {
|
|
19558
20949
|
throw new Error("Worktree must be on a board before it can be pinned to a zone");
|
|
@@ -19590,9 +20981,7 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19590
20981
|
const hasZoneTrigger = zone.trigger?.template && zone.trigger.template.trim().length > 0;
|
|
19591
20982
|
const isAlwaysNew = hasZoneTrigger && zone.trigger.behavior === "always_new";
|
|
19592
20983
|
if (triggerTemplate && targetSessionId && hasZoneTrigger) {
|
|
19593
|
-
console.log(
|
|
19594
|
-
`\u{1F3AF} Triggering zone prompt template for session ${targetSessionId.substring(0, 8)}`
|
|
19595
|
-
);
|
|
20984
|
+
console.log(`\u{1F3AF} Triggering zone prompt template for session ${shortId9(targetSessionId)}`);
|
|
19596
20985
|
const { renderTemplate: renderTemplate2 } = await import("@agor/core/templates/handlebars-helpers");
|
|
19597
20986
|
const { buildZoneTriggerContext: buildZoneTriggerContext2 } = await import("@agor/core/templates/zone-trigger-context");
|
|
19598
20987
|
let targetSession;
|
|
@@ -19625,7 +21014,7 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19625
21014
|
note: "Session is busy. Zone trigger prompt has been queued."
|
|
19626
21015
|
};
|
|
19627
21016
|
console.log(
|
|
19628
|
-
`\u{1F4EC} Zone trigger queued for session ${targetSessionId
|
|
21017
|
+
`\u{1F4EC} Zone trigger queued for session ${shortId9(targetSessionId)} at position ${task.queue_position}`
|
|
19629
21018
|
);
|
|
19630
21019
|
} else {
|
|
19631
21020
|
promptResult = {
|
|
@@ -19633,7 +21022,7 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19633
21022
|
sessionId: targetSessionId,
|
|
19634
21023
|
note: "Zone trigger prompt sent to target session"
|
|
19635
21024
|
};
|
|
19636
|
-
console.log(`\u2705 Zone trigger executed: task ${task.task_id
|
|
21025
|
+
console.log(`\u2705 Zone trigger executed: task ${shortId9(task.task_id)}`);
|
|
19637
21026
|
}
|
|
19638
21027
|
} else {
|
|
19639
21028
|
promptResult = {
|
|
@@ -19643,7 +21032,7 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19643
21032
|
}
|
|
19644
21033
|
} else if (isAlwaysNew) {
|
|
19645
21034
|
console.log(
|
|
19646
|
-
`\u{1F3AF} Zone has always_new trigger, auto-creating session for worktree ${worktreeId
|
|
21035
|
+
`\u{1F3AF} Zone has always_new trigger, auto-creating session for worktree ${shortId9(worktreeId)}`
|
|
19647
21036
|
);
|
|
19648
21037
|
try {
|
|
19649
21038
|
const user = await ctx.app.service("users").get(ctx.userId, ctx.baseServiceParams);
|
|
@@ -19658,15 +21047,13 @@ function registerWorktreeTools(server, ctx) {
|
|
|
19658
21047
|
userId: ctx.userId
|
|
19659
21048
|
});
|
|
19660
21049
|
const agenticTool = newSession.agentic_tool;
|
|
19661
|
-
console.log(
|
|
19662
|
-
`\u2705 Auto-created session ${newSession.session_id.substring(0, 8)} (${agenticTool})`
|
|
19663
|
-
);
|
|
21050
|
+
console.log(`\u2705 Auto-created session ${shortId9(newSession.session_id)} (${agenticTool})`);
|
|
19664
21051
|
promptResult = {
|
|
19665
21052
|
taskId: task.task_id,
|
|
19666
21053
|
sessionId: newSession.session_id,
|
|
19667
|
-
note: `always_new trigger: created session ${newSession.session_id
|
|
21054
|
+
note: `always_new trigger: created session ${shortId9(newSession.session_id)} (${agenticTool}) and sent prompt`
|
|
19668
21055
|
};
|
|
19669
|
-
console.log(`\u2705 Zone trigger executed: task ${task.task_id
|
|
21056
|
+
console.log(`\u2705 Zone trigger executed: task ${shortId9(task.task_id)}`);
|
|
19670
21057
|
} catch (error51) {
|
|
19671
21058
|
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
19672
21059
|
if (message.includes("rendered to an empty prompt")) {
|
|
@@ -19847,8 +21234,9 @@ __export(server_exports, {
|
|
|
19847
21234
|
setupMCPRoutes: () => setupMCPRoutes,
|
|
19848
21235
|
textResult: () => textResult
|
|
19849
21236
|
});
|
|
21237
|
+
import { shortId as shortId10 } from "@agor/core/db";
|
|
19850
21238
|
import { getServiceTier as getServiceTier2, SERVICE_GROUP_TO_MCP_DOMAINS, SERVICE_TIER_RANK } from "@agor/core/types";
|
|
19851
|
-
import { NotFoundError as
|
|
21239
|
+
import { NotFoundError as NotFoundError3 } from "@agor/core/utils/errors";
|
|
19852
21240
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19853
21241
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
19854
21242
|
import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -19912,6 +21300,10 @@ function buildRegistry(servicesConfig) {
|
|
|
19912
21300
|
registerTaskTools(tempServer, dummyCtx);
|
|
19913
21301
|
registerMessageTools(tempServer, dummyCtx);
|
|
19914
21302
|
}
|
|
21303
|
+
if (isDomainEnabled("widgets", servicesConfig)) {
|
|
21304
|
+
registry2.setCurrentDomain("widgets");
|
|
21305
|
+
registerWidgetTools(tempServer, dummyCtx);
|
|
21306
|
+
}
|
|
19915
21307
|
if (isDomainEnabled("repos", servicesConfig)) {
|
|
19916
21308
|
registry2.setCurrentDomain("repos");
|
|
19917
21309
|
registerRepoTools(tempServer, dummyCtx);
|
|
@@ -20018,6 +21410,7 @@ function createMcpServer(ctx, toolSearchEnabled, servicesConfig) {
|
|
|
20018
21410
|
registerTaskTools(s, c);
|
|
20019
21411
|
registerMessageTools(s, c);
|
|
20020
21412
|
});
|
|
21413
|
+
domainRegister("widgets", registerWidgetTools);
|
|
20021
21414
|
domainRegister("repos", registerRepoTools);
|
|
20022
21415
|
domainRegister("worktrees", (s, c) => {
|
|
20023
21416
|
registerWorktreeTools(s, c);
|
|
@@ -20090,13 +21483,13 @@ function setupMCPRoutes(app, db, toolSearchEnabled = true, servicesConfig) {
|
|
|
20090
21483
|
});
|
|
20091
21484
|
}
|
|
20092
21485
|
console.log(
|
|
20093
|
-
`\u{1F50C} MCP request authenticated (user: ${context.userId
|
|
21486
|
+
`\u{1F50C} MCP request authenticated (user: ${shortId10(context.userId)}, session: ${shortId10(context.sessionId)})`
|
|
20094
21487
|
);
|
|
20095
21488
|
let authenticatedUser;
|
|
20096
21489
|
try {
|
|
20097
21490
|
authenticatedUser = await app.service("users").get(context.userId);
|
|
20098
21491
|
} catch (error51) {
|
|
20099
|
-
if (error51 instanceof
|
|
21492
|
+
if (error51 instanceof NotFoundError3) {
|
|
20100
21493
|
return res.status(401).json({
|
|
20101
21494
|
jsonrpc: "2.0",
|
|
20102
21495
|
id: req.body?.id,
|
|
@@ -20174,6 +21567,7 @@ var init_server = __esm({
|
|
|
20174
21567
|
init_sessions();
|
|
20175
21568
|
init_tasks();
|
|
20176
21569
|
init_users();
|
|
21570
|
+
init_widgets();
|
|
20177
21571
|
init_worktrees();
|
|
20178
21572
|
SERVER_INSTRUCTIONS = `Agor is a multiplayer canvas for orchestrating AI coding agents. It manages git worktrees, tracks AI conversations, visualizes work on spatial boards, and enables real-time collaboration.
|
|
20179
21573
|
|
|
@@ -20192,6 +21586,7 @@ Domains:
|
|
|
20192
21586
|
- users: User accounts, profiles, preferences, and administration
|
|
20193
21587
|
- analytics: Usage and cost tracking leaderboard
|
|
20194
21588
|
- mcp-servers: External MCP server configuration and OAuth management
|
|
21589
|
+
- widgets: In-conversation interactive widgets (forms/buttons rendered inline; values never enter your context)
|
|
20195
21590
|
|
|
20196
21591
|
Common workflows:
|
|
20197
21592
|
|
|
@@ -20217,40 +21612,43 @@ Discover tools: search (list detail) \u2192 search (full detail for schemas) \u2
|
|
|
20217
21612
|
// src/register-routes.ts
|
|
20218
21613
|
import { loadConfig as loadConfig2 } from "@agor/core/config";
|
|
20219
21614
|
import {
|
|
20220
|
-
generateId as
|
|
21615
|
+
generateId as generateId5,
|
|
20221
21616
|
MCPServerRepository,
|
|
20222
21617
|
MessagesRepository,
|
|
20223
21618
|
RepoRepository,
|
|
20224
21619
|
SessionMCPServerRepository as SessionMCPServerRepository2,
|
|
20225
|
-
SessionRepository as
|
|
20226
|
-
|
|
21620
|
+
SessionRepository as SessionRepository6,
|
|
21621
|
+
shortId as shortId11,
|
|
21622
|
+
TaskRepository as TaskRepository2,
|
|
20227
21623
|
UsersRepository as UsersRepository2,
|
|
20228
21624
|
WorktreeRepository as WorktreeRepository5
|
|
20229
21625
|
} from "@agor/core/db";
|
|
20230
21626
|
import {
|
|
20231
21627
|
AuthenticationService,
|
|
20232
|
-
BadRequest as
|
|
21628
|
+
BadRequest as BadRequest3,
|
|
20233
21629
|
Conflict as Conflict2,
|
|
20234
21630
|
errorHandler,
|
|
20235
|
-
Forbidden as
|
|
21631
|
+
Forbidden as Forbidden5,
|
|
20236
21632
|
LocalStrategy,
|
|
20237
|
-
NotAuthenticated as
|
|
20238
|
-
NotFound as
|
|
21633
|
+
NotAuthenticated as NotAuthenticated6,
|
|
21634
|
+
NotFound as NotFound3
|
|
20239
21635
|
} from "@agor/core/feathers";
|
|
20240
21636
|
import { PermissionService } from "@agor/core/permissions";
|
|
20241
21637
|
import {
|
|
20242
21638
|
AGENTIC_TOOL_CAPABILITIES as AGENTIC_TOOL_CAPABILITIES2,
|
|
20243
21639
|
hasMinimumRole as hasMinimumRole2,
|
|
21640
|
+
MessageRole as MessageRole4,
|
|
20244
21641
|
ROLES as ROLES4,
|
|
20245
21642
|
SERVICE_GROUP_NAMES as SERVICE_GROUP_NAMES2,
|
|
20246
|
-
SessionStatus as
|
|
20247
|
-
TaskStatus as
|
|
21643
|
+
SessionStatus as SessionStatus3,
|
|
21644
|
+
TaskStatus as TaskStatus4
|
|
20248
21645
|
} from "@agor/core/types";
|
|
20249
|
-
import { NotFoundError as
|
|
21646
|
+
import { NotFoundError as NotFoundError4 } from "@agor/core/utils/errors";
|
|
20250
21647
|
import { rateLimit as rateLimit2 } from "express-rate-limit";
|
|
20251
21648
|
import jwt4 from "jsonwebtoken";
|
|
20252
21649
|
|
|
20253
21650
|
// src/executor-tracking.ts
|
|
21651
|
+
import { shortId } from "@agor/core/db";
|
|
20254
21652
|
var executorProcesses = /* @__PURE__ */ new Map();
|
|
20255
21653
|
function killExecutorProcess(sessionId) {
|
|
20256
21654
|
const proc = executorProcesses.get(sessionId);
|
|
@@ -20262,7 +21660,7 @@ function killExecutorProcess(sessionId) {
|
|
|
20262
21660
|
return false;
|
|
20263
21661
|
}
|
|
20264
21662
|
console.log(
|
|
20265
|
-
`\u{1F6D1} [Stop] Sending SIGTERM to executor PID ${proc.pid} (session ${sessionId
|
|
21663
|
+
`\u{1F6D1} [Stop] Sending SIGTERM to executor PID ${proc.pid} (session ${shortId(sessionId)})`
|
|
20266
21664
|
);
|
|
20267
21665
|
try {
|
|
20268
21666
|
process.kill(proc.pid, "SIGTERM");
|
|
@@ -20315,6 +21713,7 @@ var ScheduleNotReadyError = class extends Error {
|
|
|
20315
21713
|
};
|
|
20316
21714
|
|
|
20317
21715
|
// src/services/user-api-keys.ts
|
|
21716
|
+
import { shortId as shortId2 } from "@agor/core/db";
|
|
20318
21717
|
import { BadRequest, NotAuthenticated } from "@agor/core/feathers";
|
|
20319
21718
|
function createUserApiKeysService(apiKeysRepo) {
|
|
20320
21719
|
return {
|
|
@@ -20336,9 +21735,7 @@ function createUserApiKeysService(apiKeysRepo) {
|
|
|
20336
21735
|
throw new BadRequest("Maximum of 25 API keys per user");
|
|
20337
21736
|
}
|
|
20338
21737
|
const result = await apiKeysRepo.create(user.user_id, name);
|
|
20339
|
-
console.log(
|
|
20340
|
-
`[API Keys] Created: ${result.key.prefix}... for user ${user.user_id.substring(0, 8)}`
|
|
20341
|
-
);
|
|
21738
|
+
console.log(`[API Keys] Created: ${result.key.prefix}... for user ${shortId2(user.user_id)}`);
|
|
20342
21739
|
return result;
|
|
20343
21740
|
},
|
|
20344
21741
|
/** Update key name */
|
|
@@ -20358,9 +21755,7 @@ function createUserApiKeysService(apiKeysRepo) {
|
|
|
20358
21755
|
const user = params.user;
|
|
20359
21756
|
if (!user) throw new NotAuthenticated("Authentication required");
|
|
20360
21757
|
await apiKeysRepo.delete(id, user.user_id);
|
|
20361
|
-
console.log(
|
|
20362
|
-
`[API Keys] Deleted: ${id.substring(0, 8)} for user ${user.user_id.substring(0, 8)}`
|
|
20363
|
-
);
|
|
21758
|
+
console.log(`[API Keys] Deleted: ${shortId2(id)} for user ${shortId2(user.user_id)}`);
|
|
20364
21759
|
return { id };
|
|
20365
21760
|
}
|
|
20366
21761
|
};
|
|
@@ -20611,6 +22006,9 @@ function applyTierHooks(app, servicePath, tier) {
|
|
|
20611
22006
|
}
|
|
20612
22007
|
}
|
|
20613
22008
|
|
|
22009
|
+
// src/register-routes.ts
|
|
22010
|
+
init_append_system_message();
|
|
22011
|
+
|
|
20614
22012
|
// src/utils/auth-rate-limit-key.ts
|
|
20615
22013
|
function buildAuthRateLimitKey(req) {
|
|
20616
22014
|
const ip = (req.ip || "unknown").toLowerCase();
|
|
@@ -20645,17 +22043,21 @@ function requireMinimumRole(minimumRole, action) {
|
|
|
20645
22043
|
};
|
|
20646
22044
|
}
|
|
20647
22045
|
var DEFAULT_MANAGED_ENVS_MINIMUM_ROLE = ROLES.MEMBER;
|
|
20648
|
-
function registerAuthenticatedRoute(app,
|
|
20649
|
-
app.use(
|
|
22046
|
+
function registerAuthenticatedRoute(app, path3, service, authConfig, requireAuth) {
|
|
22047
|
+
app.use(path3, service);
|
|
20650
22048
|
const hooks = {};
|
|
20651
22049
|
for (const [method, config2] of Object.entries(authConfig)) {
|
|
20652
22050
|
hooks[method] = [requireAuth, requireMinimumRole(config2.role, config2.action)];
|
|
20653
22051
|
}
|
|
20654
|
-
app.service(
|
|
22052
|
+
app.service(path3).hooks({
|
|
20655
22053
|
before: hooks
|
|
20656
22054
|
});
|
|
20657
22055
|
}
|
|
20658
22056
|
|
|
22057
|
+
// src/register-routes.ts
|
|
22058
|
+
init_build_initial_user_message();
|
|
22059
|
+
init_session_tasks();
|
|
22060
|
+
|
|
20659
22061
|
// src/utils/session-turn-lock.ts
|
|
20660
22062
|
async function withSessionTurnLock(locks, sessionId, fn) {
|
|
20661
22063
|
while (locks.has(sessionId)) {
|
|
@@ -20675,16 +22077,17 @@ async function withSessionTurnLock(locks, sessionId, fn) {
|
|
|
20675
22077
|
}
|
|
20676
22078
|
|
|
20677
22079
|
// src/utils/task-runner.ts
|
|
22080
|
+
import { shortId as shortId3 } from "@agor/core/db";
|
|
20678
22081
|
import { Conflict, NotFound } from "@agor/core/feathers";
|
|
20679
|
-
import { TaskStatus } from "@agor/core/types";
|
|
22082
|
+
import { TaskStatus as TaskStatus2 } from "@agor/core/types";
|
|
20680
22083
|
async function runExistingTask(task, options, params, deps) {
|
|
20681
22084
|
const fresh = await deps.findTaskById(task.task_id);
|
|
20682
22085
|
if (!fresh) {
|
|
20683
22086
|
throw new NotFound(`Task ${task.task_id} no longer exists`);
|
|
20684
22087
|
}
|
|
20685
|
-
if (fresh.status !==
|
|
22088
|
+
if (fresh.status !== TaskStatus2.CREATED) {
|
|
20686
22089
|
throw new Conflict(
|
|
20687
|
-
`Task ${task.task_id
|
|
22090
|
+
`Task ${shortId3(task.task_id)} cannot be run: status is '${fresh.status}' (only 'created' tasks may be triggered; the task may have been started by another caller or drained from the queue).`
|
|
20688
22091
|
);
|
|
20689
22092
|
}
|
|
20690
22093
|
return await deps.spawnFn(fresh, options, params);
|
|
@@ -20700,6 +22103,7 @@ function normalizeMessageSource(input, params) {
|
|
|
20700
22103
|
import fs from "fs/promises";
|
|
20701
22104
|
import os from "os";
|
|
20702
22105
|
import path from "path";
|
|
22106
|
+
import { shortId as shortId4 } from "@agor/core/db";
|
|
20703
22107
|
import multer from "multer";
|
|
20704
22108
|
var ALLOWED_UPLOAD_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
20705
22109
|
// Images
|
|
@@ -20738,7 +22142,7 @@ function createUploadStorage(sessionRepo, worktreeRepo) {
|
|
|
20738
22142
|
}
|
|
20739
22143
|
if (DEBUG_UPLOAD) {
|
|
20740
22144
|
console.log(
|
|
20741
|
-
`\u{1F4C2} [Upload Storage] Processing upload for session ${sessionId
|
|
22145
|
+
`\u{1F4C2} [Upload Storage] Processing upload for session ${sessionId ? shortId4(sessionId) : "unknown"}`
|
|
20742
22146
|
);
|
|
20743
22147
|
console.log(` Destination type: ${destination}`);
|
|
20744
22148
|
}
|
|
@@ -20748,18 +22152,16 @@ function createUploadStorage(sessionRepo, worktreeRepo) {
|
|
|
20748
22152
|
}
|
|
20749
22153
|
const session = await sessionRepo.findById(sessionId);
|
|
20750
22154
|
if (!session) {
|
|
20751
|
-
console.error(`\u274C [Upload Storage] Session not found: ${sessionId
|
|
22155
|
+
console.error(`\u274C [Upload Storage] Session not found: ${shortId4(sessionId)}`);
|
|
20752
22156
|
return cb(new Error(`Session not found: ${sessionId}`), "");
|
|
20753
22157
|
}
|
|
20754
22158
|
if (!session.worktree_id) {
|
|
20755
|
-
console.error(`\u274C [Upload Storage] Session ${sessionId
|
|
22159
|
+
console.error(`\u274C [Upload Storage] Session ${shortId4(sessionId)} has no worktree`);
|
|
20756
22160
|
return cb(new Error(`Session ${sessionId} has no associated worktree`), "");
|
|
20757
22161
|
}
|
|
20758
22162
|
const worktree = await worktreeRepo.findById(session.worktree_id);
|
|
20759
22163
|
if (!worktree) {
|
|
20760
|
-
console.error(
|
|
20761
|
-
`\u274C [Upload Storage] Worktree not found: ${session.worktree_id.substring(0, 8)}`
|
|
20762
|
-
);
|
|
22164
|
+
console.error(`\u274C [Upload Storage] Worktree not found: ${shortId4(session.worktree_id)}`);
|
|
20763
22165
|
return cb(new Error(`Worktree not found: ${session.worktree_id}`), "");
|
|
20764
22166
|
}
|
|
20765
22167
|
const paths = {
|
|
@@ -20863,6 +22265,144 @@ function enforceParsedTotalUploadSize() {
|
|
|
20863
22265
|
|
|
20864
22266
|
// src/register-routes.ts
|
|
20865
22267
|
init_worktree_authorization();
|
|
22268
|
+
|
|
22269
|
+
// src/widgets/submissions.ts
|
|
22270
|
+
init_worktree_authorization();
|
|
22271
|
+
init_registry();
|
|
22272
|
+
import { Forbidden as Forbidden4, NotAuthenticated as NotAuthenticated4, NotFound as NotFound2 } from "@agor/core/feathers";
|
|
22273
|
+
function canResolveWidget(caller, session, worktree, isOwner) {
|
|
22274
|
+
if (session.created_by === caller.user_id) return true;
|
|
22275
|
+
const effective = resolveWorktreePermission(worktree, caller.user_id, isOwner, caller.role);
|
|
22276
|
+
return PERMISSION_RANK[effective] >= PERMISSION_RANK.prompt;
|
|
22277
|
+
}
|
|
22278
|
+
var inFlightResolutions = /* @__PURE__ */ new Map();
|
|
22279
|
+
async function resolveWidget(widgetId, action, caller, deps) {
|
|
22280
|
+
if (!caller) {
|
|
22281
|
+
throw new NotAuthenticated4("Authentication required to resolve a widget");
|
|
22282
|
+
}
|
|
22283
|
+
const existing = inFlightResolutions.get(widgetId);
|
|
22284
|
+
if (existing) {
|
|
22285
|
+
await existing.catch(() => {
|
|
22286
|
+
});
|
|
22287
|
+
}
|
|
22288
|
+
const promise2 = (async () => doResolveWidget(widgetId, action, caller, deps))();
|
|
22289
|
+
inFlightResolutions.set(widgetId, promise2);
|
|
22290
|
+
try {
|
|
22291
|
+
return await promise2;
|
|
22292
|
+
} finally {
|
|
22293
|
+
if (inFlightResolutions.get(widgetId) === promise2) {
|
|
22294
|
+
inFlightResolutions.delete(widgetId);
|
|
22295
|
+
}
|
|
22296
|
+
}
|
|
22297
|
+
}
|
|
22298
|
+
async function doResolveWidget(widgetId, action, caller, deps) {
|
|
22299
|
+
let message;
|
|
22300
|
+
try {
|
|
22301
|
+
message = await deps.app.service("messages").get(widgetId);
|
|
22302
|
+
} catch {
|
|
22303
|
+
throw new NotFound2(`Widget ${widgetId} not found`);
|
|
22304
|
+
}
|
|
22305
|
+
if (message.type !== "widget_request") {
|
|
22306
|
+
throw new NotFound2(`Message ${widgetId} is not a widget request`);
|
|
22307
|
+
}
|
|
22308
|
+
const widget = message.metadata?.widget;
|
|
22309
|
+
if (!widget) {
|
|
22310
|
+
throw new NotFound2(`Widget ${widgetId} has no widget metadata`);
|
|
22311
|
+
}
|
|
22312
|
+
const session = await deps.app.service("sessions").get(message.session_id);
|
|
22313
|
+
const worktree = await deps.app.service("worktrees").get(session.worktree_id);
|
|
22314
|
+
const isOwner = await deps.isWorktreeOwner(worktree.worktree_id, caller.user_id);
|
|
22315
|
+
if (!canResolveWidget(caller, session, worktree, isOwner)) {
|
|
22316
|
+
throw new Forbidden4(
|
|
22317
|
+
`You need to be the session creator, a worktree owner, or have 'prompt' permission on the worktree to resolve this widget.`
|
|
22318
|
+
);
|
|
22319
|
+
}
|
|
22320
|
+
if (widget.status !== "pending") {
|
|
22321
|
+
throw new Forbidden4(
|
|
22322
|
+
`Widget ${widgetId} is already ${widget.status}; cannot ${action.kind} again.`
|
|
22323
|
+
);
|
|
22324
|
+
}
|
|
22325
|
+
const entry = getWidget(widget.widget_type);
|
|
22326
|
+
let resultMeta;
|
|
22327
|
+
let autoResumePrompt;
|
|
22328
|
+
if (action.kind === "submit") {
|
|
22329
|
+
if (!entry) {
|
|
22330
|
+
throw new NotFound2(
|
|
22331
|
+
`Widget type '${widget.widget_type}' is not registered on this daemon. Update the daemon or use a known widget type.`
|
|
22332
|
+
);
|
|
22333
|
+
}
|
|
22334
|
+
const parsed = entry.submitSchema.safeParse(action.body);
|
|
22335
|
+
if (!parsed.success) {
|
|
22336
|
+
throw new Forbidden4(`Invalid submit payload: ${parsed.error.message}`);
|
|
22337
|
+
}
|
|
22338
|
+
const submit = parsed.data;
|
|
22339
|
+
const submitCtx = {
|
|
22340
|
+
// biome-ignore lint/suspicious/noExplicitAny: Pass-through Feathers Application
|
|
22341
|
+
app: deps.app,
|
|
22342
|
+
sessionId: message.session_id,
|
|
22343
|
+
submitterUserId: caller.user_id,
|
|
22344
|
+
submitterRole: caller.role,
|
|
22345
|
+
sessionCreatorUserId: session.created_by
|
|
22346
|
+
};
|
|
22347
|
+
await entry.applySubmit(submitCtx, submit, widget.params);
|
|
22348
|
+
resultMeta = entry.buildResultMeta(submit);
|
|
22349
|
+
autoResumePrompt = entry.buildAutoResumePrompt(resultMeta, widget.params);
|
|
22350
|
+
} else {
|
|
22351
|
+
autoResumePrompt = entry ? entry.buildDismissedPrompt(widget.params) : `[Agor] User dismissed a widget request. Do not re-request immediately \u2014 ask whether to proceed without, or move on to other work.`;
|
|
22352
|
+
}
|
|
22353
|
+
const newStatus = action.kind === "submit" ? "submitted" : "dismissed";
|
|
22354
|
+
const updatedWidget = {
|
|
22355
|
+
...widget,
|
|
22356
|
+
status: newStatus,
|
|
22357
|
+
resolved_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
22358
|
+
submitted_by: caller.user_id,
|
|
22359
|
+
...resultMeta !== void 0 ? { result_meta: resultMeta } : {}
|
|
22360
|
+
};
|
|
22361
|
+
await deps.app.service("messages").patch(widgetId, {
|
|
22362
|
+
metadata: {
|
|
22363
|
+
...message.metadata ?? {},
|
|
22364
|
+
widget: updatedWidget
|
|
22365
|
+
}
|
|
22366
|
+
});
|
|
22367
|
+
let autoResumeQueued = false;
|
|
22368
|
+
if (widget.auto_resume !== false && autoResumePrompt) {
|
|
22369
|
+
await deps.app.service("/sessions/:id/prompt").create(
|
|
22370
|
+
{
|
|
22371
|
+
prompt: autoResumePrompt,
|
|
22372
|
+
messageSource: "agor",
|
|
22373
|
+
// Stamp traceability fields onto the queued task so the UI can
|
|
22374
|
+
// distinguish system-authored auto-resume prompts from user-typed
|
|
22375
|
+
// ones, and so the resulting task links back to its widget.
|
|
22376
|
+
metadata: {
|
|
22377
|
+
system_authored: true,
|
|
22378
|
+
widget_id: widget.widget_id
|
|
22379
|
+
}
|
|
22380
|
+
},
|
|
22381
|
+
{
|
|
22382
|
+
// Internal call — no `provider` so RBAC hooks bypass. Submitter is
|
|
22383
|
+
// attributed (`created_by`) for audit; see §5.3 of the design.
|
|
22384
|
+
user: { user_id: caller.user_id },
|
|
22385
|
+
route: { id: message.session_id }
|
|
22386
|
+
}
|
|
22387
|
+
);
|
|
22388
|
+
autoResumeQueued = true;
|
|
22389
|
+
}
|
|
22390
|
+
deps.app.service("messages").emit?.("widget:resolved", {
|
|
22391
|
+
widget_id: widget.widget_id,
|
|
22392
|
+
session_id: message.session_id,
|
|
22393
|
+
status: newStatus,
|
|
22394
|
+
result_meta: resultMeta,
|
|
22395
|
+
resolved_at: updatedWidget.resolved_at,
|
|
22396
|
+
submitted_by: caller.user_id
|
|
22397
|
+
});
|
|
22398
|
+
return {
|
|
22399
|
+
widget_id: widget.widget_id,
|
|
22400
|
+
status: newStatus,
|
|
22401
|
+
auto_resume_queued: autoResumeQueued
|
|
22402
|
+
};
|
|
22403
|
+
}
|
|
22404
|
+
|
|
22405
|
+
// src/register-routes.ts
|
|
20866
22406
|
function isPaginated(result) {
|
|
20867
22407
|
return !Array.isArray(result) && "data" in result && "total" in result;
|
|
20868
22408
|
}
|
|
@@ -20900,9 +22440,9 @@ async function registerRoutes(ctx) {
|
|
|
20900
22440
|
const usersService = app.service("users");
|
|
20901
22441
|
const tasksService = app.service("tasks");
|
|
20902
22442
|
const reposService = app.service("repos");
|
|
20903
|
-
const safeService = (
|
|
22443
|
+
const safeService = (path3) => {
|
|
20904
22444
|
try {
|
|
20905
|
-
return app.service(
|
|
22445
|
+
return app.service(path3);
|
|
20906
22446
|
} catch {
|
|
20907
22447
|
return void 0;
|
|
20908
22448
|
}
|
|
@@ -20971,20 +22511,6 @@ async function registerRoutes(ctx) {
|
|
|
20971
22511
|
security: []
|
|
20972
22512
|
};
|
|
20973
22513
|
authService.hooks({
|
|
20974
|
-
before: {
|
|
20975
|
-
create: [
|
|
20976
|
-
// biome-ignore lint/suspicious/noExplicitAny: FeathersJS context type not fully typed
|
|
20977
|
-
async (context) => {
|
|
20978
|
-
const data = Array.isArray(context.data) ? context.data[0] : context.data;
|
|
20979
|
-
console.log("\u{1F510} Authentication attempt:", {
|
|
20980
|
-
strategy: data?.strategy,
|
|
20981
|
-
email: data?.email,
|
|
20982
|
-
hasPassword: !!data?.password
|
|
20983
|
-
});
|
|
20984
|
-
return context;
|
|
20985
|
-
}
|
|
20986
|
-
]
|
|
20987
|
-
},
|
|
20988
22514
|
after: {
|
|
20989
22515
|
create: [
|
|
20990
22516
|
// biome-ignore lint/suspicious/noExplicitAny: FeathersJS context type not fully typed
|
|
@@ -21042,7 +22568,7 @@ async function registerRoutes(ctx) {
|
|
|
21042
22568
|
user
|
|
21043
22569
|
};
|
|
21044
22570
|
} catch (_error) {
|
|
21045
|
-
throw new
|
|
22571
|
+
throw new NotAuthenticated6("Invalid or expired refresh token");
|
|
21046
22572
|
}
|
|
21047
22573
|
}
|
|
21048
22574
|
});
|
|
@@ -21056,38 +22582,38 @@ async function registerRoutes(ctx) {
|
|
|
21056
22582
|
async create(data, params) {
|
|
21057
22583
|
const authParams = params;
|
|
21058
22584
|
if (!authParams?.user || !authParams.user.user_id) {
|
|
21059
|
-
throw new
|
|
22585
|
+
throw new NotAuthenticated6("Authentication required");
|
|
21060
22586
|
}
|
|
21061
22587
|
const caller = authParams.user;
|
|
21062
22588
|
if (!hasMinimumRole2(caller.role, ROLES4.SUPERADMIN)) {
|
|
21063
|
-
throw new
|
|
22589
|
+
throw new Forbidden5("Superadmin role required for impersonation");
|
|
21064
22590
|
}
|
|
21065
22591
|
const authPayload = authParams.authentication?.payload;
|
|
21066
22592
|
if (authPayload?.is_impersonated === true) {
|
|
21067
|
-
throw new
|
|
22593
|
+
throw new Forbidden5("Cannot impersonate from an already-impersonated token");
|
|
21068
22594
|
}
|
|
21069
22595
|
if (!data?.user_id) {
|
|
21070
|
-
throw new
|
|
22596
|
+
throw new BadRequest3("user_id is required");
|
|
21071
22597
|
}
|
|
21072
22598
|
if (data.expiry_ms != null) {
|
|
21073
22599
|
if (typeof data.expiry_ms !== "number" || !Number.isFinite(data.expiry_ms)) {
|
|
21074
|
-
throw new
|
|
22600
|
+
throw new BadRequest3("expiry_ms must be a finite number");
|
|
21075
22601
|
}
|
|
21076
22602
|
if (data.expiry_ms <= 0) {
|
|
21077
|
-
throw new
|
|
22603
|
+
throw new BadRequest3("expiry_ms must be a positive number");
|
|
21078
22604
|
}
|
|
21079
22605
|
}
|
|
21080
22606
|
let targetUser;
|
|
21081
22607
|
try {
|
|
21082
22608
|
targetUser = await usersService.get(data.user_id);
|
|
21083
22609
|
} catch {
|
|
21084
|
-
throw new
|
|
22610
|
+
throw new NotFound3(`User not found: ${data.user_id}`);
|
|
21085
22611
|
}
|
|
21086
22612
|
const configuredMax = config2.daemon?.impersonation_token_expiry_ms ?? MAX_IMPERSONATION_EXPIRY_MS;
|
|
21087
22613
|
const maxExpiry = Math.min(configuredMax, MAX_IMPERSONATION_EXPIRY_MS);
|
|
21088
22614
|
const requestedExpiry = data.expiry_ms ?? maxExpiry;
|
|
21089
22615
|
const expiryMs = Math.min(requestedExpiry, maxExpiry);
|
|
21090
|
-
const jti =
|
|
22616
|
+
const jti = generateId5();
|
|
21091
22617
|
const expiresAt = new Date(Date.now() + expiryMs);
|
|
21092
22618
|
const accessToken = jwt4.sign(
|
|
21093
22619
|
{
|
|
@@ -21129,12 +22655,12 @@ async function registerRoutes(ctx) {
|
|
|
21129
22655
|
}
|
|
21130
22656
|
});
|
|
21131
22657
|
const _messagesRepo = new MessagesRepository(db);
|
|
21132
|
-
const _sessionsRepo = new
|
|
22658
|
+
const _sessionsRepo = new SessionRepository6(db);
|
|
21133
22659
|
const _sessionMCPRepo = new SessionMCPServerRepository2(db);
|
|
21134
22660
|
const _mcpServerRepo = new MCPServerRepository(db);
|
|
21135
22661
|
const _worktreesRepo = new WorktreeRepository5(db);
|
|
21136
22662
|
const _reposRepo = new RepoRepository(db);
|
|
21137
|
-
const _tasksRepo = new
|
|
22663
|
+
const _tasksRepo = new TaskRepository2(db);
|
|
21138
22664
|
const permissionService = new PermissionService((event, data) => {
|
|
21139
22665
|
app.service("sessions").emit(event, data);
|
|
21140
22666
|
});
|
|
@@ -21188,9 +22714,9 @@ async function registerRoutes(ctx) {
|
|
|
21188
22714
|
async create(data, params) {
|
|
21189
22715
|
const id = params.route?.id;
|
|
21190
22716
|
if (!id) throw new Error("Session ID required");
|
|
21191
|
-
console.log(`\u{1F500} Forking session: ${id
|
|
22717
|
+
console.log(`\u{1F500} Forking session: ${shortId11(id)}`);
|
|
21192
22718
|
const forkedSession = await sessionsService.fork(id, data, params);
|
|
21193
|
-
console.log(`\u2705 Fork created: ${forkedSession.session_id
|
|
22719
|
+
console.log(`\u2705 Fork created: ${shortId11(forkedSession.session_id)}`);
|
|
21194
22720
|
console.log("\u{1F4E1} [FORK] Manually broadcasting created event to all clients");
|
|
21195
22721
|
if (app.io) {
|
|
21196
22722
|
app.io.emit("sessions created", forkedSession);
|
|
@@ -21210,9 +22736,9 @@ async function registerRoutes(ctx) {
|
|
|
21210
22736
|
async create(data, params) {
|
|
21211
22737
|
const id = params.route?.id;
|
|
21212
22738
|
if (!id) throw new Error("Session ID required");
|
|
21213
|
-
console.log(`\u{1F331} Spawning session from: ${id
|
|
22739
|
+
console.log(`\u{1F331} Spawning session from: ${shortId11(id)}`);
|
|
21214
22740
|
const spawnedSession = await sessionsService.spawn(id, data, params);
|
|
21215
|
-
console.log(`\u2705 Spawn created: ${spawnedSession.session_id
|
|
22741
|
+
console.log(`\u2705 Spawn created: ${shortId11(spawnedSession.session_id)}`);
|
|
21216
22742
|
console.log("\u{1F4E1} [SPAWN] Manually broadcasting created event to all clients");
|
|
21217
22743
|
if (app.io) {
|
|
21218
22744
|
app.io.emit("sessions created", spawnedSession);
|
|
@@ -21241,16 +22767,79 @@ async function registerRoutes(ctx) {
|
|
|
21241
22767
|
},
|
|
21242
22768
|
requireAuth
|
|
21243
22769
|
);
|
|
22770
|
+
registerAuthenticatedRoute(
|
|
22771
|
+
app,
|
|
22772
|
+
"/sessions/:id/restart-cli",
|
|
22773
|
+
{
|
|
22774
|
+
async create(_data, params) {
|
|
22775
|
+
const id = params.route?.id;
|
|
22776
|
+
if (!id) throw new Error("Session ID required");
|
|
22777
|
+
const session = await sessionsService.get(id, params);
|
|
22778
|
+
if (session.agentic_tool !== "claude-code-cli") {
|
|
22779
|
+
throw new Error(
|
|
22780
|
+
`Restart is only supported for claude-code-cli sessions; this session is ${session.agentic_tool}`
|
|
22781
|
+
);
|
|
22782
|
+
}
|
|
22783
|
+
const targetUserId = session.created_by;
|
|
22784
|
+
if (!targetUserId) throw new Error("Session has no created_by \u2014 cannot route restart");
|
|
22785
|
+
const tabName = `cli-${shortId11(session.session_id)}`;
|
|
22786
|
+
const channel = `user/${targetUserId}/terminal`;
|
|
22787
|
+
try {
|
|
22788
|
+
const { spawn: spawnProc } = await import("child_process");
|
|
22789
|
+
const killProc = spawnProc(
|
|
22790
|
+
"pkill",
|
|
22791
|
+
["-f", `claude .*(--session-id|--resume) ${session.session_id}`],
|
|
22792
|
+
{ stdio: "ignore" }
|
|
22793
|
+
);
|
|
22794
|
+
await new Promise((resolve) => {
|
|
22795
|
+
killProc.on("exit", () => resolve());
|
|
22796
|
+
killProc.on("error", () => resolve());
|
|
22797
|
+
setTimeout(() => {
|
|
22798
|
+
try {
|
|
22799
|
+
killProc.kill();
|
|
22800
|
+
} catch {
|
|
22801
|
+
}
|
|
22802
|
+
resolve();
|
|
22803
|
+
}, 2e3);
|
|
22804
|
+
});
|
|
22805
|
+
} catch (err) {
|
|
22806
|
+
console.warn("[claude-cli-integration] pkill failed, proceeding anyway", err);
|
|
22807
|
+
}
|
|
22808
|
+
const worktree = await app.service("worktrees").get(session.worktree_id, params);
|
|
22809
|
+
const cwd = worktree?.path;
|
|
22810
|
+
if (!cwd) throw new Error("Worktree has no path; cannot restart");
|
|
22811
|
+
const { buildSpawnConfigForSession: buildSpawnConfigForSession2 } = await Promise.resolve().then(() => (init_claude_cli_integration(), claude_cli_integration_exports));
|
|
22812
|
+
const { buildClaudeCliSpawn: buildClaudeCliSpawn2 } = await import("@agor/core/claude-cli");
|
|
22813
|
+
const spawnCfg = buildSpawnConfigForSession2(session, cwd);
|
|
22814
|
+
const built = buildClaudeCliSpawn2(spawnCfg);
|
|
22815
|
+
if (app.io) {
|
|
22816
|
+
app.io.to(channel).emit("terminal:tab", {
|
|
22817
|
+
userId: targetUserId,
|
|
22818
|
+
action: "create",
|
|
22819
|
+
tabName,
|
|
22820
|
+
cwd,
|
|
22821
|
+
command: built.bin,
|
|
22822
|
+
commandArgs: built.args,
|
|
22823
|
+
forceRecreate: true
|
|
22824
|
+
});
|
|
22825
|
+
}
|
|
22826
|
+
return { ok: true, tabName };
|
|
22827
|
+
}
|
|
22828
|
+
// biome-ignore lint/suspicious/noExplicitAny: FeathersJS route handler type mismatch
|
|
22829
|
+
},
|
|
22830
|
+
{
|
|
22831
|
+
create: { role: ROLES4.MEMBER, action: "restart claude CLI session" }
|
|
22832
|
+
},
|
|
22833
|
+
requireAuth
|
|
22834
|
+
);
|
|
21244
22835
|
const sessionTurnLocks = /* @__PURE__ */ new Map();
|
|
21245
22836
|
async function safePatch(serviceName, id, data, entityType, params) {
|
|
21246
22837
|
try {
|
|
21247
22838
|
await app.service(serviceName).patch(id, data, params || {});
|
|
21248
22839
|
return true;
|
|
21249
22840
|
} catch (error51) {
|
|
21250
|
-
if (error51 instanceof
|
|
21251
|
-
console.log(
|
|
21252
|
-
`\u26A0\uFE0F ${entityType} ${id.substring(0, 8)} was deleted mid-execution - skipping update`
|
|
21253
|
-
);
|
|
22841
|
+
if (error51 instanceof NotFoundError4 || error51 instanceof Error && error51.message.includes("No record found")) {
|
|
22842
|
+
console.log(`\u26A0\uFE0F ${entityType} ${shortId11(id)} was deleted mid-execution - skipping update`);
|
|
21254
22843
|
return false;
|
|
21255
22844
|
}
|
|
21256
22845
|
throw error51;
|
|
@@ -21284,7 +22873,7 @@ async function registerRoutes(ctx) {
|
|
|
21284
22873
|
const updatedTask = await app.service("tasks").patch(
|
|
21285
22874
|
task.task_id,
|
|
21286
22875
|
{
|
|
21287
|
-
status:
|
|
22876
|
+
status: TaskStatus4.RUNNING,
|
|
21288
22877
|
started_at: startTimestamp,
|
|
21289
22878
|
queue_position: void 0,
|
|
21290
22879
|
message_range: {
|
|
@@ -21311,24 +22900,21 @@ async function registerRoutes(ctx) {
|
|
|
21311
22900
|
if (source) {
|
|
21312
22901
|
messageMetadata.source = source;
|
|
21313
22902
|
}
|
|
21314
|
-
const userMessage = {
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
// Callback messages are typed `system` so the UI shows the special
|
|
21318
|
-
// Agor-callback styling. Normal prompts stay `user`.
|
|
21319
|
-
type: isCallback ? "system" : "user",
|
|
21320
|
-
role: "user",
|
|
22903
|
+
const userMessage = buildInitialUserMessage({
|
|
22904
|
+
sessionId: task.session_id,
|
|
22905
|
+
taskId: task.task_id,
|
|
21321
22906
|
index: messageStartIndex,
|
|
21322
22907
|
timestamp: startTimestamp,
|
|
21323
|
-
content_preview: task.full_prompt.substring(0, 200),
|
|
21324
22908
|
content: task.full_prompt,
|
|
21325
|
-
|
|
22909
|
+
// Callback messages are typed `system` so the UI shows the special
|
|
22910
|
+
// Agor-callback styling. Normal prompts stay `user`.
|
|
22911
|
+
type: isCallback ? "system" : "user",
|
|
21326
22912
|
metadata: Object.keys(messageMetadata).length > 0 ? messageMetadata : void 0
|
|
21327
|
-
};
|
|
22913
|
+
});
|
|
21328
22914
|
await app.service("messages").create(userMessage, params);
|
|
21329
22915
|
} catch (msgErr) {
|
|
21330
22916
|
console.warn(
|
|
21331
|
-
`\u26A0\uFE0F [Daemon] Failed to write initial user-message row for task ${task.task_id
|
|
22917
|
+
`\u26A0\uFE0F [Daemon] Failed to write initial user-message row for task ${shortId11(task.task_id)} (executor will retry):`,
|
|
21332
22918
|
msgErr
|
|
21333
22919
|
);
|
|
21334
22920
|
}
|
|
@@ -21336,7 +22922,7 @@ async function registerRoutes(ctx) {
|
|
|
21336
22922
|
await app.service("sessions").patch(
|
|
21337
22923
|
task.session_id,
|
|
21338
22924
|
{
|
|
21339
|
-
status:
|
|
22925
|
+
status: SessionStatus3.RUNNING,
|
|
21340
22926
|
ready_for_prompt: false,
|
|
21341
22927
|
tasks: [...session.tasks, task.task_id]
|
|
21342
22928
|
},
|
|
@@ -21356,19 +22942,59 @@ async function registerRoutes(ctx) {
|
|
|
21356
22942
|
${task.full_prompt}`;
|
|
21357
22943
|
}
|
|
21358
22944
|
} catch (err) {
|
|
21359
|
-
console.warn(
|
|
21360
|
-
`[Prompt] Failed to look up prompter user ${prompterUserId.substring(0, 8)}:`,
|
|
21361
|
-
err
|
|
21362
|
-
);
|
|
22945
|
+
console.warn(`[Prompt] Failed to look up prompter user ${shortId11(prompterUserId)}:`, err);
|
|
21363
22946
|
}
|
|
21364
22947
|
}
|
|
21365
22948
|
const useStreaming = options.stream !== false;
|
|
21366
22949
|
const sessionId = task.session_id;
|
|
21367
22950
|
const taskId = task.task_id;
|
|
22951
|
+
if (session.agentic_tool === "claude-code-cli") {
|
|
22952
|
+
const { setPendingCliTask: setPendingCliTask2 } = await Promise.resolve().then(() => (init_claude_cli_integration(), claude_cli_integration_exports));
|
|
22953
|
+
setPendingCliTask2(sessionId, taskId, messageStartIndex);
|
|
22954
|
+
setImmediate(async () => {
|
|
22955
|
+
try {
|
|
22956
|
+
const targetUserId = session.created_by;
|
|
22957
|
+
if (!targetUserId) {
|
|
22958
|
+
throw new Error("CLI session has no created_by \u2014 cannot route PTY injection");
|
|
22959
|
+
}
|
|
22960
|
+
const channel = `user/${targetUserId}/terminal`;
|
|
22961
|
+
const tabName = `cli-${shortId11(session.session_id)}`;
|
|
22962
|
+
const io = app.io;
|
|
22963
|
+
io?.to(channel).emit("terminal:tab", {
|
|
22964
|
+
userId: targetUserId,
|
|
22965
|
+
action: "focus",
|
|
22966
|
+
tabName
|
|
22967
|
+
});
|
|
22968
|
+
await new Promise((r) => setTimeout(r, 150));
|
|
22969
|
+
const payload = `${promptForExecutor}\r`;
|
|
22970
|
+
io?.to(channel).emit("terminal:input", { userId: targetUserId, input: payload });
|
|
22971
|
+
console.log(
|
|
22972
|
+
`[claude-cli] PTY-injected prompt into ${channel} \u2192 tab ${tabName} (task ${shortId11(taskId)}, ${promptForExecutor.length} chars)`
|
|
22973
|
+
);
|
|
22974
|
+
} catch (err) {
|
|
22975
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
22976
|
+
console.error(`[claude-cli] PTY injection failed for task ${shortId11(taskId)}: ${msg}`);
|
|
22977
|
+
await safePatch(
|
|
22978
|
+
"tasks",
|
|
22979
|
+
taskId,
|
|
22980
|
+
{
|
|
22981
|
+
status: TaskStatus4.FAILED,
|
|
22982
|
+
completed_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
22983
|
+
error_message: `PTY injection failed: ${msg}`
|
|
22984
|
+
},
|
|
22985
|
+
"Task",
|
|
22986
|
+
params
|
|
22987
|
+
);
|
|
22988
|
+
await app.service("sessions").patch(sessionId, { status: SessionStatus3.IDLE, ready_for_prompt: true }, params).catch(() => {
|
|
22989
|
+
});
|
|
22990
|
+
}
|
|
22991
|
+
});
|
|
22992
|
+
return updatedTask;
|
|
22993
|
+
}
|
|
21368
22994
|
setImmediate(async () => {
|
|
21369
22995
|
try {
|
|
21370
22996
|
console.log(
|
|
21371
|
-
`\u{1F680} [Daemon] Routing ${session.agentic_tool} to Feathers/WebSocket executor (task ${taskId
|
|
22997
|
+
`\u{1F680} [Daemon] Routing ${session.agentic_tool} to Feathers/WebSocket executor (task ${shortId11(taskId)})`
|
|
21372
22998
|
);
|
|
21373
22999
|
await sessionsService.executeTask(
|
|
21374
23000
|
sessionId,
|
|
@@ -21382,19 +23008,19 @@ ${task.full_prompt}`;
|
|
|
21382
23008
|
params
|
|
21383
23009
|
);
|
|
21384
23010
|
console.log(
|
|
21385
|
-
`\u2705 [Daemon] Executor spawned for session ${sessionId
|
|
23011
|
+
`\u2705 [Daemon] Executor spawned for session ${shortId11(sessionId)}, waiting for task completion`
|
|
21386
23012
|
);
|
|
21387
23013
|
} catch (error51) {
|
|
21388
23014
|
const errorMessage = error51 instanceof Error ? error51.message : String(error51);
|
|
21389
23015
|
console.error(
|
|
21390
|
-
`\u274C [Daemon] Executor spawn failed for session=${sessionId
|
|
23016
|
+
`\u274C [Daemon] Executor spawn failed for session=${shortId11(sessionId)} task=${shortId11(taskId)} agent=${session.agentic_tool} unix_username=${session.unix_username ?? "null"}: ${errorMessage}`,
|
|
21391
23017
|
error51
|
|
21392
23018
|
);
|
|
21393
23019
|
await safePatch(
|
|
21394
23020
|
"tasks",
|
|
21395
23021
|
taskId,
|
|
21396
23022
|
{
|
|
21397
|
-
status:
|
|
23023
|
+
status: TaskStatus4.FAILED,
|
|
21398
23024
|
completed_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21399
23025
|
error_message: errorMessage
|
|
21400
23026
|
},
|
|
@@ -21402,23 +23028,19 @@ ${task.full_prompt}`;
|
|
|
21402
23028
|
params
|
|
21403
23029
|
);
|
|
21404
23030
|
try {
|
|
21405
|
-
const sysIndex = await sessionsRepository.countMessages(sessionId);
|
|
21406
23031
|
const errorContent = `\u26A0\uFE0F The agent failed to start.
|
|
21407
23032
|
|
|
21408
23033
|
${errorMessage}`;
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
index: sysIndex,
|
|
21415
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21416
|
-
content_preview: errorContent.substring(0, 200),
|
|
23034
|
+
await appendSystemMessage({
|
|
23035
|
+
app,
|
|
23036
|
+
db,
|
|
23037
|
+
sessionId,
|
|
23038
|
+
taskId,
|
|
21417
23039
|
content: errorContent,
|
|
21418
|
-
|
|
21419
|
-
metadata: { is_meta: true }
|
|
21420
|
-
|
|
21421
|
-
|
|
23040
|
+
role: MessageRole4.ASSISTANT,
|
|
23041
|
+
metadata: { is_meta: true },
|
|
23042
|
+
params
|
|
23043
|
+
});
|
|
21422
23044
|
} catch (sysErr) {
|
|
21423
23045
|
console.warn(
|
|
21424
23046
|
"[Daemon] Failed to write system error message after spawn failure:",
|
|
@@ -21443,7 +23065,9 @@ ${errorMessage}`;
|
|
|
21443
23065
|
"/sessions/:id/prompt",
|
|
21444
23066
|
{
|
|
21445
23067
|
async create(data, params) {
|
|
21446
|
-
console.log(
|
|
23068
|
+
console.log(
|
|
23069
|
+
`\u{1F4E8} [Daemon] Prompt request for session ${params.route?.id ? shortId11(params.route.id) : "unknown"}`
|
|
23070
|
+
);
|
|
21447
23071
|
console.log(` Permission mode: ${data.permissionMode || "not specified"}`);
|
|
21448
23072
|
console.log(` Streaming: ${data.stream !== false}`);
|
|
21449
23073
|
console.log(` Message source: ${data.messageSource || "not specified"}`);
|
|
@@ -21470,7 +23094,7 @@ ${errorMessage}`;
|
|
|
21470
23094
|
}
|
|
21471
23095
|
if (session.archived) {
|
|
21472
23096
|
console.log(
|
|
21473
|
-
`\u{1F4E6} [Prompt] Auto-unarchiving session ${id
|
|
23097
|
+
`\u{1F4E6} [Prompt] Auto-unarchiving session ${shortId11(id)} (was archived: ${session.archived_reason || "unknown reason"})`
|
|
21474
23098
|
);
|
|
21475
23099
|
session = await sessionsService.patch(
|
|
21476
23100
|
id,
|
|
@@ -21478,37 +23102,38 @@ ${errorMessage}`;
|
|
|
21478
23102
|
params
|
|
21479
23103
|
);
|
|
21480
23104
|
}
|
|
21481
|
-
if (session.status ===
|
|
23105
|
+
if (session.status === SessionStatus3.STOPPING) {
|
|
21482
23106
|
throw new Error("Cannot send prompt: session is currently stopping");
|
|
21483
23107
|
}
|
|
21484
|
-
const taskRepo = new
|
|
23108
|
+
const taskRepo = new TaskRepository2(db);
|
|
21485
23109
|
if (!params.user?.user_id) {
|
|
21486
|
-
throw new
|
|
23110
|
+
throw new NotAuthenticated6("Authentication required to prompt a session");
|
|
21487
23111
|
}
|
|
21488
23112
|
const createdBy = params.user.user_id;
|
|
21489
23113
|
return await withSessionTurnLock(sessionTurnLocks, id, async () => {
|
|
21490
23114
|
const lockedSession = await sessionsService.get(id, params);
|
|
21491
|
-
if (lockedSession.status ===
|
|
23115
|
+
if (lockedSession.status === SessionStatus3.STOPPING) {
|
|
21492
23116
|
throw new Error("Cannot send prompt: session is currently stopping");
|
|
21493
23117
|
}
|
|
21494
23118
|
const queuedTasks = await taskRepo.findQueued(id);
|
|
21495
|
-
const shouldQueue = lockedSession.status !==
|
|
23119
|
+
const shouldQueue = lockedSession.status !== SessionStatus3.IDLE || queuedTasks.length > 0;
|
|
21496
23120
|
if (shouldQueue) {
|
|
21497
23121
|
const queuedTask = await taskRepo.createPending({
|
|
21498
23122
|
session_id: id,
|
|
21499
23123
|
full_prompt: data.prompt,
|
|
21500
23124
|
created_by: createdBy,
|
|
21501
|
-
status:
|
|
23125
|
+
status: TaskStatus4.QUEUED,
|
|
21502
23126
|
metadata: {
|
|
21503
23127
|
...params.user?.user_id ? { queued_by_user_id: params.user.user_id } : {},
|
|
21504
|
-
...messageSource ? { source: messageSource } : {}
|
|
23128
|
+
...messageSource ? { source: messageSource } : {},
|
|
23129
|
+
...data.metadata ?? {}
|
|
21505
23130
|
}
|
|
21506
23131
|
});
|
|
21507
23132
|
console.log(
|
|
21508
|
-
`\u{1F4EC} [Prompt] Auto-queued task for session ${id
|
|
23133
|
+
`\u{1F4EC} [Prompt] Auto-queued task for session ${shortId11(id)} at position ${queuedTask.queue_position} (session status: ${lockedSession.status}, existing queue items: ${queuedTasks.length})`
|
|
21509
23134
|
);
|
|
21510
23135
|
app.service("tasks").emit("queued", queuedTask);
|
|
21511
|
-
if (lockedSession.status ===
|
|
23136
|
+
if (lockedSession.status === SessionStatus3.IDLE) {
|
|
21512
23137
|
setImmediate(async () => {
|
|
21513
23138
|
try {
|
|
21514
23139
|
await sessionsService.triggerQueueProcessing(id, params);
|
|
@@ -21526,12 +23151,16 @@ ${errorMessage}`;
|
|
|
21526
23151
|
console.log(
|
|
21527
23152
|
` Session permission_config.mode: ${lockedSession.permission_config?.mode || "not set"}`
|
|
21528
23153
|
);
|
|
23154
|
+
const idleTaskMetadata = {
|
|
23155
|
+
...messageSource ? { source: messageSource } : {},
|
|
23156
|
+
...data.metadata ?? {}
|
|
23157
|
+
};
|
|
21529
23158
|
const task = await taskRepo.createPending({
|
|
21530
23159
|
session_id: id,
|
|
21531
23160
|
full_prompt: data.prompt,
|
|
21532
23161
|
created_by: createdBy,
|
|
21533
|
-
status:
|
|
21534
|
-
metadata:
|
|
23162
|
+
status: TaskStatus4.CREATED,
|
|
23163
|
+
metadata: Object.keys(idleTaskMetadata).length > 0 ? idleTaskMetadata : void 0
|
|
21535
23164
|
});
|
|
21536
23165
|
app.service("tasks").emit("created", task);
|
|
21537
23166
|
return await spawnTaskExecutor(
|
|
@@ -21557,16 +23186,16 @@ ${errorMessage}`;
|
|
|
21557
23186
|
{
|
|
21558
23187
|
async create(data, params) {
|
|
21559
23188
|
const taskId = params.route?.id;
|
|
21560
|
-
if (!taskId) throw new
|
|
21561
|
-
const taskRepo = new
|
|
23189
|
+
if (!taskId) throw new BadRequest3("Task ID required");
|
|
23190
|
+
const taskRepo = new TaskRepository2(db);
|
|
21562
23191
|
const task = await taskRepo.findById(taskId);
|
|
21563
23192
|
if (!task) {
|
|
21564
|
-
throw new
|
|
23193
|
+
throw new NotFound3(`Task ${taskId} not found`);
|
|
21565
23194
|
}
|
|
21566
|
-
if (task.status !==
|
|
21567
|
-
const hint = task.status ===
|
|
23195
|
+
if (task.status !== TaskStatus4.CREATED) {
|
|
23196
|
+
const hint = task.status === TaskStatus4.QUEUED ? `Queued tasks drain automatically in queue-position order when the session becomes idle \u2014 wait for it, or stop the currently running task to free the queue.` : `Only 'created' tasks may be triggered.`;
|
|
21568
23197
|
throw new Conflict2(
|
|
21569
|
-
`Task ${taskId
|
|
23198
|
+
`Task ${shortId11(taskId)} cannot be run: status is '${task.status}'. ${hint}`
|
|
21570
23199
|
);
|
|
21571
23200
|
}
|
|
21572
23201
|
const isInternalCall = !params.provider;
|
|
@@ -21577,11 +23206,11 @@ ${errorMessage}`;
|
|
|
21577
23206
|
} else {
|
|
21578
23207
|
const userId = params.user?.user_id;
|
|
21579
23208
|
if (!userId) {
|
|
21580
|
-
throw new
|
|
23209
|
+
throw new Forbidden5("Authentication required to run tasks");
|
|
21581
23210
|
}
|
|
21582
23211
|
const wt = await worktreeRepository.findById(session.worktree_id);
|
|
21583
23212
|
if (!wt) {
|
|
21584
|
-
throw new
|
|
23213
|
+
throw new NotFound3(`Worktree ${session.worktree_id} not found`);
|
|
21585
23214
|
}
|
|
21586
23215
|
const isOwner = await worktreeRepository.isOwner(wt.worktree_id, userId);
|
|
21587
23216
|
const effectiveLevel = resolveWorktreePermission(
|
|
@@ -21593,7 +23222,7 @@ ${errorMessage}`;
|
|
|
21593
23222
|
);
|
|
21594
23223
|
const canRun = PERMISSION_RANK[effectiveLevel] >= PERMISSION_RANK.prompt || effectiveLevel === "session" && session.created_by === userId;
|
|
21595
23224
|
if (!canRun) {
|
|
21596
|
-
throw new
|
|
23225
|
+
throw new Forbidden5(
|
|
21597
23226
|
`You have '${effectiveLevel}' permission on this worktree, which does not allow running tasks. Need 'prompt' or 'all' (or 'session' for own sessions).`
|
|
21598
23227
|
);
|
|
21599
23228
|
}
|
|
@@ -21601,12 +23230,12 @@ ${errorMessage}`;
|
|
|
21601
23230
|
}
|
|
21602
23231
|
return await withSessionTurnLock(sessionTurnLocks, task.session_id, async () => {
|
|
21603
23232
|
const session = await sessionsService.get(task.session_id, params);
|
|
21604
|
-
if (session.status ===
|
|
21605
|
-
throw new
|
|
23233
|
+
if (session.status === SessionStatus3.STOPPING) {
|
|
23234
|
+
throw new BadRequest3("Cannot run task: session is currently stopping");
|
|
21606
23235
|
}
|
|
21607
|
-
if (session.status !==
|
|
23236
|
+
if (session.status !== SessionStatus3.IDLE) {
|
|
21608
23237
|
throw new Conflict2(
|
|
21609
|
-
`Cannot run task ${taskId
|
|
23238
|
+
`Cannot run task ${shortId11(taskId)}: session is '${session.status}'. To enqueue a prompt on a busy session, POST to /sessions/:id/prompt instead \u2014 it creates and queues a task atomically.`
|
|
21610
23239
|
);
|
|
21611
23240
|
}
|
|
21612
23241
|
return await runExistingTask(
|
|
@@ -21636,9 +23265,9 @@ ${errorMessage}`;
|
|
|
21636
23265
|
{
|
|
21637
23266
|
async create(data, params) {
|
|
21638
23267
|
const id = params.route?.id;
|
|
21639
|
-
if (!id) throw new
|
|
23268
|
+
if (!id) throw new BadRequest3("Session ID required");
|
|
21640
23269
|
if (typeof data?.userPrompt !== "string") {
|
|
21641
|
-
throw new
|
|
23270
|
+
throw new BadRequest3("userPrompt (string) is required");
|
|
21642
23271
|
}
|
|
21643
23272
|
const { renderSpawnSubsessionPrompt } = await import("@agor/core/templates/spawn-subsession-template");
|
|
21644
23273
|
const { parentPermissionMode, ...spawnContext } = data;
|
|
@@ -21663,26 +23292,26 @@ ${errorMessage}`;
|
|
|
21663
23292
|
{
|
|
21664
23293
|
async create(data, params) {
|
|
21665
23294
|
const worktreeId = params.route?.id;
|
|
21666
|
-
if (!worktreeId) throw new
|
|
23295
|
+
if (!worktreeId) throw new BadRequest3("Worktree ID required");
|
|
21667
23296
|
if (typeof data?.zoneId !== "string" || !data.zoneId.trim()) {
|
|
21668
|
-
throw new
|
|
23297
|
+
throw new BadRequest3("zoneId (string) is required");
|
|
21669
23298
|
}
|
|
21670
23299
|
const worktree = await app.service("worktrees").get(worktreeId, params);
|
|
21671
23300
|
if (!worktree.board_id) {
|
|
21672
|
-
throw new
|
|
23301
|
+
throw new BadRequest3("Worktree is not on a board; cannot resolve zone");
|
|
21673
23302
|
}
|
|
21674
23303
|
const board = await app.service("boards").get(worktree.board_id, params);
|
|
21675
23304
|
const zoneObj = board.objects?.[data.zoneId];
|
|
21676
23305
|
if (!zoneObj || zoneObj.type !== "zone") {
|
|
21677
|
-
throw new
|
|
23306
|
+
throw new BadRequest3(`Zone ${data.zoneId} not found on board ${worktree.board_id}`);
|
|
21678
23307
|
}
|
|
21679
23308
|
if (zoneObj.trigger?.behavior !== "always_new") {
|
|
21680
|
-
throw new
|
|
23309
|
+
throw new BadRequest3(
|
|
21681
23310
|
`Zone "${zoneObj.label}" trigger behaviour is "${zoneObj.trigger?.behavior}", expected "always_new"`
|
|
21682
23311
|
);
|
|
21683
23312
|
}
|
|
21684
23313
|
const userId = params.user?.user_id;
|
|
21685
|
-
if (!userId) throw new
|
|
23314
|
+
if (!userId) throw new BadRequest3("Authenticated user required");
|
|
21686
23315
|
const user = await app.service("users").get(userId, params);
|
|
21687
23316
|
const { fireAlwaysNewZoneTrigger: fireAlwaysNewZoneTrigger2 } = await Promise.resolve().then(() => (init_zone_trigger(), zone_trigger_exports));
|
|
21688
23317
|
try {
|
|
@@ -21697,7 +23326,7 @@ ${errorMessage}`;
|
|
|
21697
23326
|
});
|
|
21698
23327
|
} catch (err) {
|
|
21699
23328
|
const message = err instanceof Error ? err.message : String(err);
|
|
21700
|
-
throw new
|
|
23329
|
+
throw new BadRequest3(message);
|
|
21701
23330
|
}
|
|
21702
23331
|
}
|
|
21703
23332
|
},
|
|
@@ -21706,7 +23335,7 @@ ${errorMessage}`;
|
|
|
21706
23335
|
},
|
|
21707
23336
|
requireAuth
|
|
21708
23337
|
);
|
|
21709
|
-
const sessionRepo = new
|
|
23338
|
+
const sessionRepo = new SessionRepository6(db);
|
|
21710
23339
|
const worktreeRepo = new WorktreeRepository5(db);
|
|
21711
23340
|
const uploadMiddleware = createUploadMiddleware(sessionRepo, worktreeRepo);
|
|
21712
23341
|
const DEBUG_UPLOAD2 = process.env.NODE_ENV !== "production";
|
|
@@ -21724,7 +23353,9 @@ ${errorMessage}`;
|
|
|
21724
23353
|
const { destination, notifyAgent, message } = req.body;
|
|
21725
23354
|
const files = req.files;
|
|
21726
23355
|
if (DEBUG_UPLOAD2) {
|
|
21727
|
-
console.log(
|
|
23356
|
+
console.log(
|
|
23357
|
+
`\u{1F4CE} [Upload Handler] Processing for session ${sessionId ? shortId11(sessionId) : "unknown"}`
|
|
23358
|
+
);
|
|
21728
23359
|
console.log(` Destination: ${destination || "worktree"}`);
|
|
21729
23360
|
console.log(` Notify agent: ${notifyAgent === "true" || notifyAgent === true}`);
|
|
21730
23361
|
console.log(` Files received: ${files?.length || 0}`);
|
|
@@ -21733,14 +23364,14 @@ ${errorMessage}`;
|
|
|
21733
23364
|
if (DEBUG_UPLOAD2) {
|
|
21734
23365
|
console.log(` Auth params:`, {
|
|
21735
23366
|
hasUser: !!params?.user,
|
|
21736
|
-
userId: params?.user?.user_id
|
|
23367
|
+
userId: params?.user?.user_id ? shortId11(params.user.user_id) : void 0,
|
|
21737
23368
|
provider: params?.provider
|
|
21738
23369
|
});
|
|
21739
23370
|
}
|
|
21740
23371
|
ensureMinimumRole(params, ROLES4.MEMBER, "upload files");
|
|
21741
23372
|
const session = await sessionsService.get(sessionId, params);
|
|
21742
23373
|
if (!session) {
|
|
21743
|
-
console.error(`\u274C [Upload Handler] Session not found: ${sessionId
|
|
23374
|
+
console.error(`\u274C [Upload Handler] Session not found: ${shortId11(sessionId)}`);
|
|
21744
23375
|
return res.status(404).json({ error: "Session not found" });
|
|
21745
23376
|
}
|
|
21746
23377
|
if (worktreeRbacEnabled) {
|
|
@@ -21763,7 +23394,7 @@ ${errorMessage}`;
|
|
|
21763
23394
|
const canUpload = PERMISSION_RANK[effectiveLevel] >= PERMISSION_RANK.prompt || effectiveLevel === "session" && session.created_by === userId;
|
|
21764
23395
|
if (!canUpload) {
|
|
21765
23396
|
console.error(
|
|
21766
|
-
`\u274C [Upload Handler] User ${userId
|
|
23397
|
+
`\u274C [Upload Handler] User ${shortId11(userId)} has '${effectiveLevel}' permission, cannot upload to worktree ${shortId11(wt.worktree_id)}`
|
|
21767
23398
|
);
|
|
21768
23399
|
return res.status(403).json({ error: "Not authorized to upload to this session" });
|
|
21769
23400
|
}
|
|
@@ -21829,7 +23460,10 @@ ${errorMessage}`;
|
|
|
21829
23460
|
console.log(" URL:", req.url);
|
|
21830
23461
|
console.log(" Content-Type:", req.headers["content-type"]);
|
|
21831
23462
|
console.log(" Has auth header:", !!req.headers.authorization);
|
|
21832
|
-
console.log(
|
|
23463
|
+
console.log(
|
|
23464
|
+
" Session ID param:",
|
|
23465
|
+
req.params.sessionId ? shortId11(req.params.sessionId) : "unknown"
|
|
23466
|
+
);
|
|
21833
23467
|
}
|
|
21834
23468
|
next();
|
|
21835
23469
|
};
|
|
@@ -21854,7 +23488,7 @@ ${errorMessage}`;
|
|
|
21854
23488
|
});
|
|
21855
23489
|
if (DEBUG_UPLOAD2) {
|
|
21856
23490
|
console.log("\u2705 [Upload Auth] Authentication successful");
|
|
21857
|
-
console.log(" User:", result.user?.user_id
|
|
23491
|
+
console.log(" User:", result.user?.user_id ? shortId11(result.user.user_id) : "unknown");
|
|
21858
23492
|
}
|
|
21859
23493
|
req.feathers = {
|
|
21860
23494
|
user: result.user,
|
|
@@ -21875,7 +23509,10 @@ ${errorMessage}`;
|
|
|
21875
23509
|
((req, res, next) => {
|
|
21876
23510
|
if (DEBUG_UPLOAD2) {
|
|
21877
23511
|
console.log("\u2705 [Upload Route] Authentication passed");
|
|
21878
|
-
console.log(
|
|
23512
|
+
console.log(
|
|
23513
|
+
" User:",
|
|
23514
|
+
req.feathers?.user?.user_id ? shortId11(req.feathers.user.user_id) : "unknown"
|
|
23515
|
+
);
|
|
21879
23516
|
}
|
|
21880
23517
|
next();
|
|
21881
23518
|
}),
|
|
@@ -21918,9 +23555,9 @@ ${errorMessage}`;
|
|
|
21918
23555
|
const stopReason = data && typeof data === "object" && "reason" in data && typeof data.reason === "string" ? data.reason : void 0;
|
|
21919
23556
|
const session = await sessionsService.get(id, params);
|
|
21920
23557
|
const activeStates = [
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
23558
|
+
SessionStatus3.RUNNING,
|
|
23559
|
+
SessionStatus3.AWAITING_PERMISSION,
|
|
23560
|
+
SessionStatus3.STOPPING
|
|
21924
23561
|
];
|
|
21925
23562
|
if (!activeStates.includes(session.status)) {
|
|
21926
23563
|
return {
|
|
@@ -21928,55 +23565,38 @@ ${errorMessage}`;
|
|
|
21928
23565
|
reason: `Session cannot be stopped (status: ${session.status})`
|
|
21929
23566
|
};
|
|
21930
23567
|
}
|
|
21931
|
-
const targetTasksArray =
|
|
21932
|
-
for (const status of [
|
|
21933
|
-
TaskStatus2.RUNNING,
|
|
21934
|
-
TaskStatus2.AWAITING_PERMISSION,
|
|
21935
|
-
TaskStatus2.STOPPING
|
|
21936
|
-
]) {
|
|
21937
|
-
const result = await tasksService.find({
|
|
21938
|
-
query: { session_id: id, status, $limit: 10 }
|
|
21939
|
-
});
|
|
21940
|
-
const findResult = result;
|
|
21941
|
-
const tasks = isPaginated(findResult) ? findResult.data : findResult;
|
|
21942
|
-
targetTasksArray.push(...tasks);
|
|
21943
|
-
}
|
|
23568
|
+
const targetTasksArray = await findActiveTasksForSession(app, id);
|
|
21944
23569
|
if (targetTasksArray.length === 0) {
|
|
21945
23570
|
console.warn(
|
|
21946
|
-
`\u26A0\uFE0F [Stop] No active tasks for session ${id
|
|
23571
|
+
`\u26A0\uFE0F [Stop] No active tasks for session ${shortId11(id)}, resetting to IDLE${stopReason ? ` (reason: ${stopReason})` : ""}`
|
|
21947
23572
|
);
|
|
21948
23573
|
await app.service("sessions").patch(
|
|
21949
23574
|
id,
|
|
21950
23575
|
{
|
|
21951
|
-
status:
|
|
23576
|
+
status: SessionStatus3.IDLE,
|
|
21952
23577
|
ready_for_prompt: true
|
|
21953
23578
|
},
|
|
21954
23579
|
params
|
|
21955
23580
|
);
|
|
21956
23581
|
return {
|
|
21957
23582
|
success: true,
|
|
21958
|
-
status:
|
|
23583
|
+
status: SessionStatus3.IDLE,
|
|
21959
23584
|
reason: "No active tasks found, session reset to idle"
|
|
21960
23585
|
};
|
|
21961
23586
|
}
|
|
21962
|
-
targetTasksArray.sort((a, b) => {
|
|
21963
|
-
const timeA = new Date(a.started_at || a.created_at).getTime();
|
|
21964
|
-
const timeB = new Date(b.started_at || b.created_at).getTime();
|
|
21965
|
-
return timeB - timeA;
|
|
21966
|
-
});
|
|
21967
23587
|
const latestTask = targetTasksArray[0];
|
|
21968
23588
|
console.log(
|
|
21969
|
-
`\u{1F6D1} [Stop] Stopping task ${latestTask.task_id
|
|
23589
|
+
`\u{1F6D1} [Stop] Stopping task ${shortId11(latestTask.task_id)} for session ${shortId11(id)}${stopReason ? ` (reason: ${stopReason})` : ""}`
|
|
21970
23590
|
);
|
|
21971
23591
|
const processKilled = killExecutorProcess(id);
|
|
21972
23592
|
if (!processKilled) {
|
|
21973
23593
|
console.warn(
|
|
21974
|
-
`\u26A0\uFE0F [Stop] No tracked process for session ${id
|
|
23594
|
+
`\u26A0\uFE0F [Stop] No tracked process for session ${shortId11(id)} \u2014 executor may have already exited`
|
|
21975
23595
|
);
|
|
21976
23596
|
}
|
|
21977
23597
|
try {
|
|
21978
23598
|
await tasksService.patch(latestTask.task_id, {
|
|
21979
|
-
status:
|
|
23599
|
+
status: TaskStatus4.STOPPED,
|
|
21980
23600
|
completed_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
21981
23601
|
});
|
|
21982
23602
|
} catch (error51) {
|
|
@@ -21986,7 +23606,7 @@ ${errorMessage}`;
|
|
|
21986
23606
|
await app.service("sessions").patch(
|
|
21987
23607
|
id,
|
|
21988
23608
|
{
|
|
21989
|
-
status:
|
|
23609
|
+
status: SessionStatus3.IDLE,
|
|
21990
23610
|
ready_for_prompt: true
|
|
21991
23611
|
},
|
|
21992
23612
|
params
|
|
@@ -21994,7 +23614,7 @@ ${errorMessage}`;
|
|
|
21994
23614
|
} catch (error51) {
|
|
21995
23615
|
console.error(`\u274C [Stop] Failed to patch session to IDLE:`, error51);
|
|
21996
23616
|
}
|
|
21997
|
-
return { success: true, status:
|
|
23617
|
+
return { success: true, status: SessionStatus3.IDLE };
|
|
21998
23618
|
}
|
|
21999
23619
|
},
|
|
22000
23620
|
{
|
|
@@ -22009,7 +23629,7 @@ ${errorMessage}`;
|
|
|
22009
23629
|
async find(params) {
|
|
22010
23630
|
const sessionId = params.route?.id;
|
|
22011
23631
|
if (!sessionId) throw new Error("Session ID required");
|
|
22012
|
-
const taskQueueRepo = new
|
|
23632
|
+
const taskQueueRepo = new TaskRepository2(db);
|
|
22013
23633
|
const queued = await taskQueueRepo.findQueued(sessionId);
|
|
22014
23634
|
return {
|
|
22015
23635
|
total: queued.length,
|
|
@@ -22027,9 +23647,7 @@ ${errorMessage}`;
|
|
|
22027
23647
|
async function processNextQueuedTask(sessionId, params) {
|
|
22028
23648
|
const existingLock = sessionTurnLocks.get(sessionId);
|
|
22029
23649
|
if (existingLock) {
|
|
22030
|
-
console.log(
|
|
22031
|
-
`\u23F3 [Queue] Session turn in progress for ${sessionId.substring(0, 8)}, waiting...`
|
|
22032
|
-
);
|
|
23650
|
+
console.log(`\u23F3 [Queue] Session turn in progress for ${shortId11(sessionId)}, waiting...`);
|
|
22033
23651
|
await existingLock.catch(() => void 0);
|
|
22034
23652
|
if (!queueRetryScheduled.has(sessionId)) {
|
|
22035
23653
|
queueRetryScheduled.add(sessionId);
|
|
@@ -22038,10 +23656,7 @@ ${errorMessage}`;
|
|
|
22038
23656
|
try {
|
|
22039
23657
|
await processNextQueuedTask(sessionId, params);
|
|
22040
23658
|
} catch (error51) {
|
|
22041
|
-
console.error(
|
|
22042
|
-
`\u274C [Queue] Retry failed for session ${sessionId.substring(0, 8)}:`,
|
|
22043
|
-
error51
|
|
22044
|
-
);
|
|
23659
|
+
console.error(`\u274C [Queue] Retry failed for session ${shortId11(sessionId)}:`, error51);
|
|
22045
23660
|
}
|
|
22046
23661
|
});
|
|
22047
23662
|
}
|
|
@@ -22060,10 +23675,10 @@ ${errorMessage}`;
|
|
|
22060
23675
|
}
|
|
22061
23676
|
}
|
|
22062
23677
|
async function processNextQueuedTaskInternal(sessionId, params) {
|
|
22063
|
-
const taskRepo = new
|
|
23678
|
+
const taskRepo = new TaskRepository2(db);
|
|
22064
23679
|
const nextTask = await taskRepo.getNextQueued(sessionId);
|
|
22065
23680
|
if (!nextTask) {
|
|
22066
|
-
console.log(`\u{1F4ED} No queued tasks for session ${sessionId
|
|
23681
|
+
console.log(`\u{1F4ED} No queued tasks for session ${shortId11(sessionId)}`);
|
|
22067
23682
|
return;
|
|
22068
23683
|
}
|
|
22069
23684
|
const userId = nextTask.metadata?.queued_by_user_id;
|
|
@@ -22074,18 +23689,18 @@ ${errorMessage}`;
|
|
|
22074
23689
|
user: queuedByUser
|
|
22075
23690
|
} : params;
|
|
22076
23691
|
console.log(
|
|
22077
|
-
`\u{1F4EC} Processing queued task ${nextTask.task_id
|
|
23692
|
+
`\u{1F4EC} Processing queued task ${shortId11(nextTask.task_id)} (position ${nextTask.queue_position}) with user context: ${queuedByUser ? shortId11(queuedByUser.user_id) : "none"}`
|
|
22078
23693
|
);
|
|
22079
23694
|
const session = await sessionsService.get(sessionId, taskParams);
|
|
22080
|
-
if (session.status !==
|
|
23695
|
+
if (session.status !== SessionStatus3.IDLE) {
|
|
22081
23696
|
console.log(
|
|
22082
|
-
`\u23F8\uFE0F [Queue] Session ${sessionId
|
|
23697
|
+
`\u23F8\uFE0F [Queue] Session ${shortId11(sessionId)} is ${session.status}, task ${shortId11(nextTask.task_id)} waiting in queue (will be processed when session becomes IDLE via patch hook)`
|
|
22083
23698
|
);
|
|
22084
23699
|
return;
|
|
22085
23700
|
}
|
|
22086
23701
|
const stillQueued = await taskRepo.findById(nextTask.task_id);
|
|
22087
|
-
if (!stillQueued || stillQueued.status !==
|
|
22088
|
-
console.log(`\u26A0\uFE0F Queued task ${nextTask.task_id
|
|
23702
|
+
if (!stillQueued || stillQueued.status !== TaskStatus4.QUEUED) {
|
|
23703
|
+
console.log(`\u26A0\uFE0F Queued task ${shortId11(nextTask.task_id)} no longer queued, skipping`);
|
|
22089
23704
|
return;
|
|
22090
23705
|
}
|
|
22091
23706
|
const source = nextTask.metadata?.source;
|
|
@@ -22097,7 +23712,7 @@ ${errorMessage}`;
|
|
|
22097
23712
|
},
|
|
22098
23713
|
taskParams
|
|
22099
23714
|
);
|
|
22100
|
-
console.log(`\u2705 Queued task drained for session ${sessionId
|
|
23715
|
+
console.log(`\u2705 Queued task drained for session ${shortId11(sessionId)}`);
|
|
22101
23716
|
}
|
|
22102
23717
|
sessionsService.setQueueProcessor(async (sessionId, params) => {
|
|
22103
23718
|
try {
|
|
@@ -22176,66 +23791,54 @@ ${errorMessage}`;
|
|
|
22176
23791
|
},
|
|
22177
23792
|
requireAuth
|
|
22178
23793
|
);
|
|
23794
|
+
const widgetResolverDeps = {
|
|
23795
|
+
// biome-ignore lint/suspicious/noExplicitAny: Feathers Application shape
|
|
23796
|
+
app,
|
|
23797
|
+
isWorktreeOwner: async (worktreeId, userId) => worktreeRepository.isOwner(worktreeId, userId)
|
|
23798
|
+
};
|
|
22179
23799
|
registerAuthenticatedRoute(
|
|
22180
23800
|
app,
|
|
22181
|
-
"/
|
|
23801
|
+
"/widgets/:id/submit",
|
|
22182
23802
|
{
|
|
22183
23803
|
async create(data, params) {
|
|
22184
|
-
const
|
|
22185
|
-
if (!
|
|
22186
|
-
if (!
|
|
22187
|
-
|
|
22188
|
-
const messagesServiceInst = app.service("messages");
|
|
22189
|
-
const messages = await messagesServiceInst.find({
|
|
22190
|
-
query: {
|
|
22191
|
-
session_id: id,
|
|
22192
|
-
type: "input_request"
|
|
22193
|
-
}
|
|
22194
|
-
});
|
|
22195
|
-
const messageList = isPaginated(messages) ? messages.data : messages;
|
|
22196
|
-
const inputMessage = messageList.find((msg) => {
|
|
22197
|
-
const content = msg.content;
|
|
22198
|
-
return content?.request_id === data.requestId;
|
|
22199
|
-
});
|
|
22200
|
-
if (!inputMessage) {
|
|
22201
|
-
throw new Error(`Input request ${data.requestId} not found`);
|
|
22202
|
-
}
|
|
22203
|
-
const inputContent = inputMessage.content;
|
|
22204
|
-
if (inputContent?.status && inputContent.status !== "pending") {
|
|
22205
|
-
return {
|
|
22206
|
-
success: false,
|
|
22207
|
-
alreadyResolved: true,
|
|
22208
|
-
status: inputContent.status,
|
|
22209
|
-
message: `Input request already ${inputContent.status}`
|
|
22210
|
-
};
|
|
23804
|
+
const widgetId = params.route?.id;
|
|
23805
|
+
if (!widgetId) throw new Error("Widget ID required");
|
|
23806
|
+
if (!params.user?.user_id) {
|
|
23807
|
+
throw new NotAuthenticated6("Authentication required to submit a widget");
|
|
22211
23808
|
}
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
23809
|
+
return resolveWidget(
|
|
23810
|
+
widgetId,
|
|
23811
|
+
{ kind: "submit", body: data ?? {} },
|
|
23812
|
+
{ user_id: params.user.user_id, role: params.user.role },
|
|
23813
|
+
widgetResolverDeps
|
|
23814
|
+
);
|
|
23815
|
+
}
|
|
23816
|
+
},
|
|
23817
|
+
{
|
|
23818
|
+
create: { role: ROLES4.MEMBER, action: "submit widgets" }
|
|
23819
|
+
},
|
|
23820
|
+
requireAuth
|
|
23821
|
+
);
|
|
23822
|
+
registerAuthenticatedRoute(
|
|
23823
|
+
app,
|
|
23824
|
+
"/widgets/:id/dismiss",
|
|
23825
|
+
{
|
|
23826
|
+
async create(_data, params) {
|
|
23827
|
+
const widgetId = params.route?.id;
|
|
23828
|
+
if (!widgetId) throw new Error("Widget ID required");
|
|
23829
|
+
if (!params.user?.user_id) {
|
|
23830
|
+
throw new NotAuthenticated6("Authentication required to dismiss a widget");
|
|
22215
23831
|
}
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
answered_by: data.respondedBy,
|
|
22223
|
-
answered_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
22224
|
-
}
|
|
22225
|
-
});
|
|
22226
|
-
app.service("messages").emit("input_resolved", {
|
|
22227
|
-
requestId: data.requestId,
|
|
22228
|
-
taskId: resolvedTaskId,
|
|
22229
|
-
sessionId: id,
|
|
22230
|
-
answers: data.answers,
|
|
22231
|
-
annotations: data.annotations,
|
|
22232
|
-
respondedBy: data.respondedBy
|
|
22233
|
-
});
|
|
22234
|
-
return { success: true };
|
|
23832
|
+
return resolveWidget(
|
|
23833
|
+
widgetId,
|
|
23834
|
+
{ kind: "dismiss" },
|
|
23835
|
+
{ user_id: params.user.user_id, role: params.user.role },
|
|
23836
|
+
widgetResolverDeps
|
|
23837
|
+
);
|
|
22235
23838
|
}
|
|
22236
23839
|
},
|
|
22237
23840
|
{
|
|
22238
|
-
create: { role: ROLES4.MEMBER, action: "
|
|
23841
|
+
create: { role: ROLES4.MEMBER, action: "dismiss widgets" }
|
|
22239
23842
|
},
|
|
22240
23843
|
requireAuth
|
|
22241
23844
|
);
|
|
@@ -22389,32 +23992,19 @@ ${errorMessage}`;
|
|
|
22389
23992
|
},
|
|
22390
23993
|
async create(data, params) {
|
|
22391
23994
|
return userApiKeysService.create(data, params);
|
|
22392
|
-
}
|
|
22393
|
-
|
|
22394
|
-
|
|
22395
|
-
find: { role: ROLES4.MEMBER, action: "list API keys" },
|
|
22396
|
-
create: { role: ROLES4.MEMBER, action: "create API keys" }
|
|
22397
|
-
},
|
|
22398
|
-
requireAuth
|
|
22399
|
-
);
|
|
22400
|
-
registerAuthenticatedRoute(
|
|
22401
|
-
app,
|
|
22402
|
-
"/api/v1/user/api-keys/:id",
|
|
22403
|
-
{
|
|
22404
|
-
// biome-ignore lint/suspicious/noExplicitAny: Feathers service type
|
|
22405
|
-
async patch(data, params) {
|
|
22406
|
-
const id = params.route?.id;
|
|
22407
|
-
if (!id) throw new BadRequest2("API key ID required");
|
|
23995
|
+
},
|
|
23996
|
+
async patch(id, data, params) {
|
|
23997
|
+
if (!id) throw new BadRequest3("API key ID required");
|
|
22408
23998
|
return userApiKeysService.patch(id, data, params);
|
|
22409
23999
|
},
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22413
|
-
if (!keyId) throw new BadRequest2("API key ID required");
|
|
22414
|
-
return userApiKeysService.remove(keyId, params);
|
|
24000
|
+
async remove(id, params) {
|
|
24001
|
+
if (!id) throw new BadRequest3("API key ID required");
|
|
24002
|
+
return userApiKeysService.remove(id, params);
|
|
22415
24003
|
}
|
|
22416
24004
|
},
|
|
22417
24005
|
{
|
|
24006
|
+
find: { role: ROLES4.MEMBER, action: "list API keys" },
|
|
24007
|
+
create: { role: ROLES4.MEMBER, action: "create API keys" },
|
|
22418
24008
|
patch: { role: ROLES4.MEMBER, action: "update API keys" },
|
|
22419
24009
|
remove: { role: ROLES4.MEMBER, action: "delete API keys" }
|
|
22420
24010
|
},
|
|
@@ -22603,7 +24193,7 @@ ${errorMessage}`;
|
|
|
22603
24193
|
if (!id) throw new Error("Worktree ID required");
|
|
22604
24194
|
const worktree = await worktreeRepository.findById(id);
|
|
22605
24195
|
if (!worktree) {
|
|
22606
|
-
throw new
|
|
24196
|
+
throw new Forbidden5(`Worktree not found: ${id}`);
|
|
22607
24197
|
}
|
|
22608
24198
|
const userId = context.params.user?.user_id;
|
|
22609
24199
|
const isOwner = userId ? await worktreeRepository.isOwner(worktree.worktree_id, userId) : false;
|
|
@@ -22615,7 +24205,7 @@ ${errorMessage}`;
|
|
|
22615
24205
|
const isOwner = context.params.isWorktreeOwner;
|
|
22616
24206
|
const userRole = context.params.user?.role;
|
|
22617
24207
|
if (!isOwner && !hasMinimumRole2(userRole, ROLES4.ADMIN)) {
|
|
22618
|
-
throw new
|
|
24208
|
+
throw new Forbidden5(
|
|
22619
24209
|
"You must be the worktree owner or a global admin to archive/delete worktrees"
|
|
22620
24210
|
);
|
|
22621
24211
|
}
|
|
@@ -22646,7 +24236,7 @@ ${errorMessage}`;
|
|
|
22646
24236
|
if (!id) throw new Error("Worktree ID required");
|
|
22647
24237
|
const worktree = await worktreeRepository.findById(id);
|
|
22648
24238
|
if (!worktree) {
|
|
22649
|
-
throw new
|
|
24239
|
+
throw new Forbidden5(`Worktree not found: ${id}`);
|
|
22650
24240
|
}
|
|
22651
24241
|
const userId = context.params.user?.user_id;
|
|
22652
24242
|
const isOwner = userId ? await worktreeRepository.isOwner(worktree.worktree_id, userId) : false;
|
|
@@ -22658,7 +24248,7 @@ ${errorMessage}`;
|
|
|
22658
24248
|
const isOwner = context.params.isWorktreeOwner;
|
|
22659
24249
|
const userRole = context.params.user?.role;
|
|
22660
24250
|
if (!isOwner && !hasMinimumRole2(userRole, ROLES4.ADMIN)) {
|
|
22661
|
-
throw new
|
|
24251
|
+
throw new Forbidden5(
|
|
22662
24252
|
"You must be the worktree owner or a global admin to unarchive worktrees"
|
|
22663
24253
|
);
|
|
22664
24254
|
}
|
|
@@ -22670,14 +24260,14 @@ ${errorMessage}`;
|
|
|
22670
24260
|
app.use("/worktrees/:id/execute-schedule-now", {
|
|
22671
24261
|
async create(_data, params) {
|
|
22672
24262
|
const id = params.route?.id;
|
|
22673
|
-
if (!id) throw new
|
|
24263
|
+
if (!id) throw new BadRequest3("Worktree ID required");
|
|
22674
24264
|
const scheduler = app.get("scheduler");
|
|
22675
24265
|
if (!scheduler) {
|
|
22676
|
-
throw new
|
|
24266
|
+
throw new NotFound3("Scheduler service is not enabled on this instance.");
|
|
22677
24267
|
}
|
|
22678
24268
|
const triggeredBy = params.user?.user_id;
|
|
22679
24269
|
if (!triggeredBy) {
|
|
22680
|
-
throw new
|
|
24270
|
+
throw new NotAuthenticated6("Authentication required to trigger schedule.");
|
|
22681
24271
|
}
|
|
22682
24272
|
try {
|
|
22683
24273
|
const session = await scheduler.executeScheduleNow({
|
|
@@ -22695,7 +24285,7 @@ ${errorMessage}`;
|
|
|
22695
24285
|
throw new Conflict2(err.message, { code: err.code });
|
|
22696
24286
|
}
|
|
22697
24287
|
if (err instanceof ScheduleNotReadyError) {
|
|
22698
|
-
throw new
|
|
24288
|
+
throw new BadRequest3(err.message, { code: err.code });
|
|
22699
24289
|
}
|
|
22700
24290
|
throw err;
|
|
22701
24291
|
}
|
|
@@ -22708,10 +24298,10 @@ ${errorMessage}`;
|
|
|
22708
24298
|
requireMinimumRole(ROLES4.MEMBER, "execute scheduled runs"),
|
|
22709
24299
|
async (context) => {
|
|
22710
24300
|
const id = context.params.route?.id;
|
|
22711
|
-
if (!id) throw new
|
|
24301
|
+
if (!id) throw new BadRequest3("Worktree ID required");
|
|
22712
24302
|
const worktree = await worktreeRepository.findById(id);
|
|
22713
24303
|
if (!worktree) {
|
|
22714
|
-
throw new
|
|
24304
|
+
throw new NotFound3(`Worktree not found: ${id}`);
|
|
22715
24305
|
}
|
|
22716
24306
|
const userId = context.params.user?.user_id;
|
|
22717
24307
|
const isOwner = userId ? await worktreeRepository.isOwner(worktree.worktree_id, userId) : false;
|
|
@@ -22723,7 +24313,7 @@ ${errorMessage}`;
|
|
|
22723
24313
|
const isOwner = context.params.isWorktreeOwner;
|
|
22724
24314
|
const userRole = context.params.user?.role;
|
|
22725
24315
|
if (!isOwner && !hasMinimumRole2(userRole, ROLES4.ADMIN)) {
|
|
22726
|
-
throw new
|
|
24316
|
+
throw new Forbidden5(
|
|
22727
24317
|
"You must be the worktree owner or a global admin to execute scheduled runs"
|
|
22728
24318
|
);
|
|
22729
24319
|
}
|
|
@@ -22843,28 +24433,28 @@ ${errorMessage}`;
|
|
|
22843
24433
|
const requireSessionOwnerOrAdmin = async (sessionId, params) => {
|
|
22844
24434
|
const user = params?.user;
|
|
22845
24435
|
if (!user) {
|
|
22846
|
-
throw new
|
|
24436
|
+
throw new NotAuthenticated6("Authentication required");
|
|
22847
24437
|
}
|
|
22848
24438
|
if (user._isServiceAccount) return;
|
|
22849
24439
|
const session = await sessionsService.get(sessionId, { provider: void 0 });
|
|
22850
24440
|
if (!session) {
|
|
22851
|
-
throw new
|
|
24441
|
+
throw new NotFound3(`Session not found: ${sessionId}`);
|
|
22852
24442
|
}
|
|
22853
24443
|
checkSessionOwnerOrAdmin(user, session, superadminOpts);
|
|
22854
24444
|
};
|
|
22855
24445
|
const normalizeEnvVarNames = (value) => {
|
|
22856
24446
|
if (!Array.isArray(value)) {
|
|
22857
|
-
throw new
|
|
24447
|
+
throw new BadRequest3("envVarNames (array of strings) required");
|
|
22858
24448
|
}
|
|
22859
24449
|
const seen = /* @__PURE__ */ new Set();
|
|
22860
24450
|
const out = [];
|
|
22861
24451
|
for (const entry of value) {
|
|
22862
24452
|
if (typeof entry !== "string") {
|
|
22863
|
-
throw new
|
|
24453
|
+
throw new BadRequest3("envVarNames entries must be strings");
|
|
22864
24454
|
}
|
|
22865
24455
|
const trimmed = entry.trim();
|
|
22866
24456
|
if (!trimmed) {
|
|
22867
|
-
throw new
|
|
24457
|
+
throw new BadRequest3("envVarNames entries must be non-empty");
|
|
22868
24458
|
}
|
|
22869
24459
|
if (!seen.has(trimmed)) {
|
|
22870
24460
|
seen.add(trimmed);
|
|
@@ -22881,19 +24471,19 @@ ${errorMessage}`;
|
|
|
22881
24471
|
// the comment above and the UI consumer expect names, not full rows.
|
|
22882
24472
|
async find(_data, params) {
|
|
22883
24473
|
const id = params.route?.id;
|
|
22884
|
-
if (!id) throw new
|
|
24474
|
+
if (!id) throw new BadRequest3("Session ID required");
|
|
22885
24475
|
await requireSessionOwnerOrAdmin(id, params);
|
|
22886
24476
|
const rows = await sessionEnvSelectionsService.list(id, params);
|
|
22887
24477
|
return rows.map((r) => r.env_var_name);
|
|
22888
24478
|
},
|
|
22889
24479
|
async create(data, params) {
|
|
22890
24480
|
const id = params.route?.id;
|
|
22891
|
-
if (!id) throw new
|
|
24481
|
+
if (!id) throw new BadRequest3("Session ID required");
|
|
22892
24482
|
if (!data?.envVarName || typeof data.envVarName !== "string") {
|
|
22893
|
-
throw new
|
|
24483
|
+
throw new BadRequest3("envVarName required");
|
|
22894
24484
|
}
|
|
22895
24485
|
const name = data.envVarName.trim();
|
|
22896
|
-
if (!name) throw new
|
|
24486
|
+
if (!name) throw new BadRequest3("envVarName must be non-empty");
|
|
22897
24487
|
await requireSessionOwnerOrAdmin(id, params);
|
|
22898
24488
|
await sessionEnvSelectionsService.add(id, name, params);
|
|
22899
24489
|
const relationship = {
|
|
@@ -22908,8 +24498,8 @@ ${errorMessage}`;
|
|
|
22908
24498
|
},
|
|
22909
24499
|
async remove(name, params) {
|
|
22910
24500
|
const id = params.route?.id;
|
|
22911
|
-
if (!id) throw new
|
|
22912
|
-
if (!name) throw new
|
|
24501
|
+
if (!id) throw new BadRequest3("Session ID required");
|
|
24502
|
+
if (!name) throw new BadRequest3("env var name required");
|
|
22913
24503
|
await requireSessionOwnerOrAdmin(id, params);
|
|
22914
24504
|
await sessionEnvSelectionsService.remove(id, name, params);
|
|
22915
24505
|
const relationship = {
|
|
@@ -22924,7 +24514,7 @@ ${errorMessage}`;
|
|
|
22924
24514
|
},
|
|
22925
24515
|
async patch(_nullId, data, params) {
|
|
22926
24516
|
const id = params.route?.id;
|
|
22927
|
-
if (!id) throw new
|
|
24517
|
+
if (!id) throw new BadRequest3("Session ID required");
|
|
22928
24518
|
const envVarNames = normalizeEnvVarNames(data?.envVarNames);
|
|
22929
24519
|
await requireSessionOwnerOrAdmin(id, params);
|
|
22930
24520
|
await sessionEnvSelectionsService.setAll(id, envVarNames, params);
|
|
@@ -23159,9 +24749,9 @@ ${errorMessage}`;
|
|
|
23159
24749
|
for (const [group, paths] of Object.entries(SERVICE_GROUP_PATHS)) {
|
|
23160
24750
|
const tier = svcTier(group);
|
|
23161
24751
|
if (tier === "on" || tier === "off") continue;
|
|
23162
|
-
for (const
|
|
24752
|
+
for (const path3 of paths) {
|
|
23163
24753
|
try {
|
|
23164
|
-
applyTierHooks(app,
|
|
24754
|
+
applyTierHooks(app, path3, tier);
|
|
23165
24755
|
} catch {
|
|
23166
24756
|
}
|
|
23167
24757
|
}
|