agor-live 0.16.1 → 0.16.3
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/board/add-session.js +4 -8
- package/dist/cli/commands/board/list.js +2 -4
- package/dist/cli/commands/daemon/sync.d.ts +19 -0
- package/dist/cli/commands/daemon/sync.js +277 -0
- package/dist/cli/commands/mcp/list.js +1 -2
- package/dist/cli/commands/mcp/remove.js +1 -2
- package/dist/cli/commands/mcp/show.js +1 -2
- package/dist/cli/commands/repo/rm.js +1 -2
- package/dist/cli/commands/session/load-claude.js +1 -2
- package/dist/cli/commands/user/delete.js +1 -2
- package/dist/cli/commands/user/update.js +1 -2
- package/dist/cli/commands/worktree/add.js +1 -2
- package/dist/cli/commands/worktree/archive.js +1 -2
- package/dist/cli/commands/worktree/list.js +3 -6
- package/dist/cli/commands/worktree/rm.js +1 -2
- package/dist/cli/commands/worktree/show.js +1 -2
- package/dist/cli/commands/worktree/unarchive.js +1 -2
- package/dist/core/{agentic-tool-COqFrlmU.d.ts → agentic-tool-1L19ixPC.d.ts} +21 -2
- package/dist/core/{agentic-tool-o8Io8dDl.d.cts → agentic-tool-3oiAj9Lg.d.cts} +21 -2
- package/dist/core/api/index.cjs +87 -2
- package/dist/core/api/index.d.cts +61 -18
- package/dist/core/api/index.d.ts +61 -18
- package/dist/core/api/index.js +85 -1
- package/dist/core/{artifact-Cv9Bs4Z0.d.cts → artifact-B5MFR79G.d.ts} +31 -11
- package/dist/core/{artifact-KXt7SRRb.d.ts → artifact-Bi-1jifF.d.cts} +31 -11
- package/dist/core/{board-Bfd4UTxM.d.ts → board-B9Xnux_i.d.ts} +11 -7
- package/dist/core/{board-BTK4RUmB.d.cts → board-CPZGf5wF.d.cts} +11 -7
- package/dist/core/{board-comment-D8NdYb9y.d.cts → board-comment-BQKnob6r.d.cts} +1 -1
- package/dist/core/{board-comment-BZm5w5S2.d.ts → board-comment-BoDqwrnL.d.ts} +1 -1
- package/dist/core/claude/index.cjs +295 -110
- package/dist/core/claude/index.d.cts +3 -3
- package/dist/core/claude/index.d.ts +3 -3
- package/dist/core/claude/index.js +302 -117
- package/dist/core/{client-DJJl-TZq.d.cts → client-BC_18M7T.d.cts} +204 -25
- package/dist/core/{client-8v0GxKL_.d.ts → client-HEOUNaCs.d.ts} +204 -25
- package/dist/core/config/browser.cjs +4 -2
- package/dist/core/config/browser.d.cts +16 -4
- package/dist/core/config/browser.d.ts +16 -4
- package/dist/core/config/browser.js +3 -2
- package/dist/core/config/index.cjs +498 -103
- package/dist/core/config/index.d.cts +226 -15
- package/dist/core/config/index.d.ts +226 -15
- package/dist/core/config/index.js +492 -110
- package/dist/core/{config-manager-CFaSP-Ym.d.ts → config-manager-DK1LMXEc.d.cts} +9 -2
- package/dist/core/{config-manager-BLIWF6CF.d.cts → config-manager-YrO9mG5j.d.ts} +9 -2
- package/dist/core/config-services-CuhBWSs_.d.cts +183 -0
- package/dist/core/config-services-DrHSgUEm.d.ts +183 -0
- package/dist/core/db/index.cjs +432 -139
- package/dist/core/db/index.d.cts +216 -32
- package/dist/core/db/index.d.ts +216 -32
- package/dist/core/db/index.js +443 -150
- package/dist/core/db/session-guard.d.cts +8 -8
- package/dist/core/db/session-guard.d.ts +8 -8
- package/dist/core/drizzle/postgres/0023_tough_magik.sql +11 -0
- package/dist/core/drizzle/postgres/meta/0023_snapshot.json +3006 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +7 -0
- package/dist/core/drizzle/sqlite/0033_dapper_thing.sql +34 -0
- package/dist/core/drizzle/sqlite/0034_add_session_to_others_can_check.sql +72 -0
- package/dist/core/drizzle/sqlite/meta/0033_snapshot.json +2401 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +14 -0
- package/dist/core/environment/variable-resolver.d.cts +2 -2
- package/dist/core/environment/variable-resolver.d.ts +2 -2
- package/dist/core/{feathers-DWfz4X2s.d.ts → feathers-CKfl55ut.d.ts} +12 -4
- package/dist/core/{feathers-DstwBmky.d.cts → feathers-NY8lH6YZ.d.cts} +12 -4
- package/dist/core/gateway/index.cjs +122 -16
- package/dist/core/gateway/index.d.cts +73 -11
- package/dist/core/gateway/index.d.ts +73 -11
- package/dist/core/gateway/index.js +121 -16
- package/dist/core/{gateway-BQsBWJXe.d.cts → gateway-Ci8LcUxK.d.ts} +24 -9
- package/dist/core/{gateway-BmsFBjwJ.d.ts → gateway-gHbaS6qt.d.cts} +24 -9
- package/dist/core/git/index.d.cts +9 -2
- package/dist/core/git/index.d.ts +9 -2
- package/dist/core/{id-DSzvIi3c.d.cts → id-Cv3ntaTJ.d.cts} +13 -1
- package/dist/core/{id-DSzvIi3c.d.ts → id-Cv3ntaTJ.d.ts} +13 -1
- package/dist/core/index.cjs +1054 -280
- package/dist/core/index.d.cts +22 -20
- package/dist/core/index.d.ts +22 -20
- package/dist/core/index.js +1033 -289
- package/dist/core/mcp/index.cjs +56 -14
- package/dist/core/mcp/index.d.cts +2 -2
- package/dist/core/mcp/index.d.ts +2 -2
- package/dist/core/mcp/index.js +56 -14
- package/dist/core/{mcp-DmSz5NtX.d.cts → mcp-CtC1DFEm.d.cts} +1 -1
- package/dist/core/{mcp-eYAM1JQj.d.ts → mcp-VhU-PMHo.d.ts} +1 -1
- package/dist/core/{message-ggLv6xJx.d.cts → message-CbD99EwO.d.cts} +33 -2
- package/dist/core/{message-DcNHiQJx.d.ts → message-Cwhx2ItQ.d.ts} +33 -2
- package/dist/core/models/index.cjs +21 -4
- package/dist/core/models/index.d.cts +29 -5
- package/dist/core/models/index.d.ts +29 -5
- package/dist/core/models/index.js +21 -4
- package/dist/core/permissions/index.d.cts +2 -2
- package/dist/core/permissions/index.d.ts +2 -2
- package/dist/core/{worktree-DQ1rsBlH.d.cts → repo-CcvhnJDf.d.cts} +177 -170
- package/dist/core/{worktree-CbBATC-0.d.ts → repo-j12tCmyK.d.ts} +177 -170
- package/dist/core/seed/index.cjs +353 -99
- package/dist/core/seed/index.d.cts +1 -1
- package/dist/core/seed/index.d.ts +1 -1
- package/dist/core/seed/index.js +361 -107
- package/dist/core/{session-I7SKR8X0.d.ts → session-Bw8_FN2l.d.ts} +20 -3
- package/dist/core/{session-DrNmhT4I.d.cts → session-DEU5FS0N.d.cts} +20 -3
- package/dist/core/{session-guard-DP0eaFA2.d.cts → session-guard-BjHxMpvV.d.cts} +3 -3
- package/dist/core/{session-guard-CpgPDegW.d.ts → session-guard-CJ7sfOF1.d.ts} +3 -3
- package/dist/core/{task-C_4XIEFP.d.ts → task-CKHC1gPj.d.ts} +1 -1
- package/dist/core/{task-Cobwzp1Z.d.cts → task-DCPYEXlG.d.cts} +1 -1
- package/dist/core/templates/session-context.d.cts +5 -5
- package/dist/core/templates/session-context.d.ts +5 -5
- 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-mcp-transport.cjs +71 -16
- package/dist/core/tools/mcp/oauth-mcp-transport.d.cts +46 -11
- package/dist/core/tools/mcp/oauth-mcp-transport.d.ts +46 -11
- package/dist/core/tools/mcp/oauth-mcp-transport.js +69 -16
- package/dist/core/types/index.cjs +183 -2
- package/dist/core/types/index.d.cts +16 -15
- package/dist/core/types/index.d.ts +16 -15
- package/dist/core/types/index.js +166 -1
- package/dist/core/{types-DKptGEQi.d.ts → types-BE6DTpRe.d.cts} +37 -4
- package/dist/core/{types-DKptGEQi.d.cts → types-BvYoeNhO.d.ts} +37 -4
- package/dist/core/unix/index.cjs +360 -104
- package/dist/core/unix/index.d.cts +8 -8
- package/dist/core/unix/index.d.ts +8 -8
- package/dist/core/unix/index.js +368 -112
- package/dist/core/{user-gTo6uzKE.d.cts → user-BpKIlt04.d.cts} +3 -3
- package/dist/core/{user-C-kUEFPf.d.ts → user-pO3lB_da.d.ts} +3 -3
- package/dist/core/utils/board-placement.cjs +78 -11
- package/dist/core/utils/board-placement.d.cts +55 -10
- package/dist/core/utils/board-placement.d.ts +55 -10
- package/dist/core/utils/board-placement.js +71 -10
- package/dist/core/utils/permission-mode-mapper.d.cts +3 -3
- package/dist/core/utils/permission-mode-mapper.d.ts +3 -3
- package/dist/core/utils/url.d.cts +1 -1
- package/dist/core/utils/url.d.ts +1 -1
- package/dist/daemon/declarations.d.ts +4 -1
- package/dist/daemon/executor-tracking.d.ts +27 -0
- package/dist/daemon/executor-tracking.js +40 -0
- package/dist/daemon/index.js +12928 -12055
- package/dist/daemon/mcp/resolve-ids.d.ts +34 -0
- package/dist/daemon/mcp/resolve-ids.js +48 -0
- package/dist/daemon/mcp/server.d.ts +11 -3
- package/dist/daemon/mcp/server.js +562 -313
- package/dist/daemon/mcp/tools/analytics.js +29 -6
- package/dist/daemon/mcp/tools/artifacts.d.ts +2 -2
- package/dist/daemon/mcp/tools/artifacts.js +112 -55
- package/dist/daemon/mcp/tools/boards.js +12 -3
- package/dist/daemon/mcp/tools/card-types.js +12 -3
- package/dist/daemon/mcp/tools/cards.js +35 -12
- package/dist/daemon/mcp/tools/environment.js +12 -3
- package/dist/daemon/mcp/tools/mcp-servers.js +46 -128
- package/dist/daemon/mcp/tools/messages.js +27 -6
- package/dist/daemon/mcp/tools/repos.js +12 -3
- package/dist/daemon/mcp/tools/search.js +27 -5
- package/dist/daemon/mcp/tools/sessions.js +147 -48
- package/dist/daemon/mcp/tools/tasks.js +19 -4
- package/dist/daemon/mcp/tools/users.js +12 -3
- package/dist/daemon/mcp/tools/worktrees.js +168 -26
- package/dist/daemon/oauth-cache.d.ts +50 -0
- package/dist/daemon/oauth-cache.js +134 -0
- package/dist/daemon/register-hooks.d.ts +40 -0
- package/dist/daemon/register-hooks.js +2390 -0
- package/dist/daemon/register-routes.d.ts +49 -0
- package/dist/daemon/register-routes.js +20844 -0
- package/dist/daemon/register-services.d.ts +53 -0
- package/dist/daemon/register-services.js +8292 -0
- package/dist/daemon/services/artifacts.d.ts +49 -32
- package/dist/daemon/services/artifacts.js +193 -176
- package/dist/daemon/services/cards.js +12 -27
- package/dist/daemon/services/gateway.js +67 -1
- package/dist/daemon/services/health-monitor.d.ts +2 -2
- package/dist/daemon/services/mcp-servers.d.ts +7 -2
- package/dist/daemon/services/repos.d.ts +3 -1
- package/dist/daemon/services/repos.js +20 -29
- package/dist/daemon/services/session-mcp-servers.d.ts +1 -1
- package/dist/daemon/services/sessions.js +3 -1
- package/dist/daemon/services/tasks.d.ts +6 -0
- package/dist/daemon/services/tasks.js +123 -1
- package/dist/daemon/services/worktree-owners.js +6 -4
- package/dist/daemon/setup/cors.d.ts +17 -7
- package/dist/daemon/setup/cors.js +57 -24
- package/dist/daemon/setup/index.d.ts +1 -0
- package/dist/daemon/setup/index.js +57 -24
- package/dist/daemon/setup/service-tiers.d.ts +45 -0
- package/dist/daemon/setup/service-tiers.js +111 -0
- package/dist/daemon/setup/socketio.d.ts +1 -0
- package/dist/daemon/startup.d.ts +27 -0
- package/dist/daemon/startup.js +750 -0
- package/dist/daemon/utils/worktree-authorization.d.ts +29 -6
- package/dist/daemon/utils/worktree-authorization.js +75 -18
- package/dist/executor/db/feathers-repositories.d.ts +1 -1
- package/dist/executor/db/feathers-repositories.d.ts.map +1 -1
- package/dist/executor/db/feathers-repositories.js +1 -2
- package/dist/executor/handlers/sdk/claude.js +1 -2
- package/dist/executor/handlers/sdk/codex.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/codex.js +1 -1
- package/dist/executor/sdk-handlers/base/diff-enrichment.d.ts +59 -0
- package/dist/executor/sdk-handlers/base/diff-enrichment.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +402 -0
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +9 -2
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +25 -10
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +1 -3
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/prompt-service.js +3 -35
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +0 -8
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +0 -10
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +5 -2
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +124 -23
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +7 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +111 -17
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.js +5 -0
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.js +3 -0
- package/dist/ui/assets/{_basePickBy-BtVrd6dO.js → _basePickBy-CM6p9_3C.js} +1 -1
- package/dist/ui/assets/_basePickBy-CM6p9_3C.js.gz +0 -0
- package/dist/ui/assets/{_baseUniq-BH9GjWbF.js → _baseUniq-CHMdQkaA.js} +1 -1
- package/dist/ui/assets/_baseUniq-CHMdQkaA.js.gz +0 -0
- package/dist/ui/assets/{arc-B4KDi1iJ.js → arc-Czp_Gn_m.js} +1 -1
- package/dist/ui/assets/arc-Czp_Gn_m.js.gz +0 -0
- package/dist/ui/assets/{architectureDiagram-VXUJARFQ-CdvbpFNm.js → architectureDiagram-VXUJARFQ-Cz-z2R4z.js} +1 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-Cz-z2R4z.js.gz +0 -0
- package/dist/ui/assets/{base-80a1f760-D-kQo-47.js → base-80a1f760-DL2sFXEh.js} +1 -1
- package/dist/ui/assets/{blockDiagram-VD42YOAC-B_mxl6Lf.js → blockDiagram-VD42YOAC-C62DfRc6.js} +1 -1
- package/dist/ui/assets/blockDiagram-VD42YOAC-C62DfRc6.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dx6ylHPl.js → c4Diagram-YG6GDRKO-DGSWKqxL.js} +1 -1
- package/dist/ui/assets/c4Diagram-YG6GDRKO-DGSWKqxL.js.gz +0 -0
- package/dist/ui/assets/channel-CmfC29hp.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-DNC2--Jg.js → chunk-4BX2VUAB-CuJEBfIh.js} +1 -1
- package/dist/ui/assets/{chunk-55IACEB6-gGF1w6GZ.js → chunk-55IACEB6-DYgjRl-z.js} +1 -1
- package/dist/ui/assets/{chunk-B4BG7PRW-FXlRD4Fw.js → chunk-B4BG7PRW-rqPu7wjt.js} +1 -1
- package/dist/ui/assets/chunk-B4BG7PRW-rqPu7wjt.js.gz +0 -0
- package/dist/ui/assets/{chunk-DI55MBZ5-DbBPQIQz.js → chunk-DI55MBZ5-D7PtpA49.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-D7PtpA49.js.gz +0 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-BqwS15h8.js → chunk-FMBD7UC4-1R4kh4IH.js} +1 -1
- package/dist/ui/assets/{chunk-QN33PNHL-E8BK1n1w.js → chunk-QN33PNHL-qNBgj7JQ.js} +1 -1
- package/dist/ui/assets/{chunk-QZHKN3VN-CoigW80z.js → chunk-QZHKN3VN-JUwZqL5s.js} +1 -1
- package/dist/ui/assets/{chunk-TZMSLE5B-DdFLlZDV.js → chunk-TZMSLE5B-Bk4l2qq1.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-Bk4l2qq1.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-LD317OSr.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-LD317OSr.js +1 -0
- package/dist/ui/assets/clone-iT69LzXk.js +1 -0
- package/dist/ui/assets/{consoleHook-59e792cb-Dz0DMm-0.js → consoleHook-59e792cb-BjB_4eqO.js} +1 -1
- package/dist/ui/assets/consoleHook-59e792cb-BjB_4eqO.js.gz +0 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-tnhbVTPe.js → cose-bilkent-S5V4N54A-Db3GpSRP.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Db3GpSRP.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-CVjnxYjN.js → dagre-6UL2VRFP-D9RUH_36.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-D9RUH_36.js.gz +0 -0
- package/dist/ui/assets/{diagram-PSM6KHXK-CWFzevZb.js → diagram-PSM6KHXK-C51S0t1m.js} +1 -1
- package/dist/ui/assets/diagram-PSM6KHXK-C51S0t1m.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-T_J5IVCY.js → diagram-QEK2KX5R-Bl99kj4s.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-Bl99kj4s.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-C4Dhp8jy.js → diagram-S2PKOQOG-Dm52PeWx.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-Dm52PeWx.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-D8w2VOw6.js → erDiagram-Q2GNP2WA-K5D_GKDZ.js} +1 -1
- package/dist/ui/assets/erDiagram-Q2GNP2WA-K5D_GKDZ.js.gz +0 -0
- package/dist/ui/assets/{flowDiagram-NV44I4VS-BxDP6XJj.js → flowDiagram-NV44I4VS-D7fCREXV.js} +1 -1
- package/dist/ui/assets/flowDiagram-NV44I4VS-D7fCREXV.js.gz +0 -0
- package/dist/ui/assets/{ganttDiagram-LVOFAZNH-Cqm31nz1.js → ganttDiagram-LVOFAZNH-CNW9D2UF.js} +1 -1
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CNW9D2UF.js.gz +0 -0
- package/dist/ui/assets/{gitGraphDiagram-NY62KEGX-49108Rzr.js → gitGraphDiagram-NY62KEGX-CzSHwK4S.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CzSHwK4S.js.gz +0 -0
- package/dist/ui/assets/{graph-Cl9WGtm3.js → graph-iZG1PujV.js} +1 -1
- package/dist/ui/assets/graph-iZG1PujV.js.gz +0 -0
- package/dist/ui/assets/{index-599aeaf7-tGQYdGhA.js → index-599aeaf7-BSVvtdOR.js} +1 -1
- package/dist/ui/assets/index-599aeaf7-BSVvtdOR.js.gz +0 -0
- package/dist/ui/assets/{index-DUaptCU5.js → index-Bv9iC_mb.js} +1 -1
- package/dist/ui/assets/index-Bv9iC_mb.js.gz +0 -0
- package/dist/ui/assets/{index-D_yKRJQj.js → index-CmhCTwYo.js} +294 -280
- package/dist/ui/assets/index-CmhCTwYo.js.gz +0 -0
- package/dist/ui/assets/{index-CKmdxjmm.js → index-DX9HbDkF.js} +1 -1
- package/dist/ui/assets/index-DX9HbDkF.js.gz +0 -0
- package/dist/ui/assets/{infoDiagram-ER5ION4S-CKv_e89I.js → infoDiagram-ER5ION4S-7UpJXgGv.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-BYXSkKZr.js → journeyDiagram-XKPGCS4Q-B_u-rXxp.js} +1 -1
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-B_u-rXxp.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-B4iIn-H8.js → kanban-definition-3W4ZIXB7-C60Ys_tG.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-C60Ys_tG.js.gz +0 -0
- package/dist/ui/assets/{layout-AQEby1op.js → layout-2nOBwYEK.js} +1 -1
- package/dist/ui/assets/layout-2nOBwYEK.js.gz +0 -0
- package/dist/ui/assets/{linear-BfcSxAMZ.js → linear-BBfmsNEf.js} +1 -1
- package/dist/ui/assets/linear-BBfmsNEf.js.gz +0 -0
- package/dist/ui/assets/{mermaid.core-DuEkBmyB.js → mermaid.core-BMmc28YS.js} +5 -5
- package/dist/ui/assets/mermaid.core-BMmc28YS.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-BBDWarB6.js → mindmap-definition-VGOIOE7T-CUOfncA2.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-CUOfncA2.js.gz +0 -0
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-EQSvb4cC.js → pieDiagram-ADFJNKIX-CYt5K7tI.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-CYt5K7tI.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-CpNlK4fQ.js → quadrantDiagram-AYHSOK5B-D3z7FGdo.js} +1 -1
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-D3z7FGdo.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-BPMaEFDA.js → requirementDiagram-UZGBJVZJ-DSmK1rXj.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-DSmK1rXj.js.gz +0 -0
- package/dist/ui/assets/{sankeyDiagram-TZEHDZUN-BiceNoew.js → sankeyDiagram-TZEHDZUN-BVudlnpo.js} +1 -1
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-BVudlnpo.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-CObp8n8B.js → sequenceDiagram-WL72ISMW-DShMajjv.js} +1 -1
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DShMajjv.js.gz +0 -0
- package/dist/ui/assets/{stateDiagram-FKZM4ZOC-DKNE6dA2.js → stateDiagram-FKZM4ZOC-9zK0uo4t.js} +1 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-9zK0uo4t.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-BZEgBfav.js +1 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-DLXCiWgU.js → timeline-definition-IT6M3QCI-DQ4HYAMD.js} +1 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-DQ4HYAMD.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-TaU-Vz5l.js → treemap-KMMF4GRG-Curv75AA.js} +1 -1
- package/dist/ui/assets/treemap-KMMF4GRG-Curv75AA.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-ry-Xm_33.js → xychartDiagram-PRI3JC2R-BJdTipk8.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BJdTipk8.js.gz +0 -0
- package/dist/ui/index.html +1 -1
- package/package.json +3 -2
- package/dist/ui/assets/_basePickBy-BtVrd6dO.js.gz +0 -0
- package/dist/ui/assets/_baseUniq-BH9GjWbF.js.gz +0 -0
- package/dist/ui/assets/arc-B4KDi1iJ.js.gz +0 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-CdvbpFNm.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-B_mxl6Lf.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dx6ylHPl.js.gz +0 -0
- package/dist/ui/assets/channel-CIT8bfEt.js +0 -1
- package/dist/ui/assets/chunk-B4BG7PRW-FXlRD4Fw.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-DbBPQIQz.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-DdFLlZDV.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CaaBDWvO.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CaaBDWvO.js +0 -1
- package/dist/ui/assets/clone-Dr8RgH2m.js +0 -1
- package/dist/ui/assets/consoleHook-59e792cb-Dz0DMm-0.js.gz +0 -0
- package/dist/ui/assets/cose-bilkent-S5V4N54A-tnhbVTPe.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-CVjnxYjN.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CWFzevZb.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-T_J5IVCY.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-C4Dhp8jy.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-D8w2VOw6.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-BxDP6XJj.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-Cqm31nz1.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-49108Rzr.js.gz +0 -0
- package/dist/ui/assets/graph-Cl9WGtm3.js.gz +0 -0
- package/dist/ui/assets/index-599aeaf7-tGQYdGhA.js.gz +0 -0
- package/dist/ui/assets/index-CKmdxjmm.js.gz +0 -0
- package/dist/ui/assets/index-DUaptCU5.js.gz +0 -0
- package/dist/ui/assets/index-D_yKRJQj.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-BYXSkKZr.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-B4iIn-H8.js.gz +0 -0
- package/dist/ui/assets/layout-AQEby1op.js.gz +0 -0
- package/dist/ui/assets/linear-BfcSxAMZ.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-DuEkBmyB.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-BBDWarB6.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-EQSvb4cC.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-CpNlK4fQ.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-BPMaEFDA.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-BiceNoew.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CObp8n8B.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-DKNE6dA2.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-fBA8Sge7.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-DLXCiWgU.js.gz +0 -0
- package/dist/ui/assets/treemap-KMMF4GRG-TaU-Vz5l.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-ry-Xm_33.js.gz +0 -0
|
@@ -161,8 +161,7 @@ var BoardAddSession = class _BoardAddSession extends BaseCommand {
|
|
|
161
161
|
const { args } = await this.parse(_BoardAddSession);
|
|
162
162
|
const client = await this.connectToDaemon();
|
|
163
163
|
try {
|
|
164
|
-
const
|
|
165
|
-
const boards = Array.isArray(boardsResult) ? boardsResult : boardsResult.data;
|
|
164
|
+
const boards = await client.service("boards").findAll({ query: { $limit: PAGINATION.DEFAULT_LIMIT } });
|
|
166
165
|
const board = boards.find(
|
|
167
166
|
(b) => b.board_id === args.boardId || b.board_id.startsWith(args.boardId) || b.slug === args.boardId
|
|
168
167
|
);
|
|
@@ -170,8 +169,7 @@ var BoardAddSession = class _BoardAddSession extends BaseCommand {
|
|
|
170
169
|
await this.cleanupClient(client);
|
|
171
170
|
this.error(`Board not found: ${args.boardId}`);
|
|
172
171
|
}
|
|
173
|
-
const
|
|
174
|
-
const sessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
172
|
+
const sessions = await client.service("sessions").findAll({ query: { $limit: PAGINATION.DEFAULT_LIMIT } });
|
|
175
173
|
const session = sessions.find(
|
|
176
174
|
(s) => s.session_id === args.sessionId || s.session_id.startsWith(args.sessionId)
|
|
177
175
|
);
|
|
@@ -183,19 +181,17 @@ var BoardAddSession = class _BoardAddSession extends BaseCommand {
|
|
|
183
181
|
await this.cleanupClient(client);
|
|
184
182
|
this.error("Session has no worktree associated");
|
|
185
183
|
}
|
|
186
|
-
const
|
|
187
|
-
const worktrees = Array.isArray(worktreesResult) ? worktreesResult : worktreesResult.data;
|
|
184
|
+
const worktrees = await client.service("worktrees").findAll({ query: { $limit: PAGINATION.DEFAULT_LIMIT } });
|
|
188
185
|
const worktree = worktrees.find((w) => w.worktree_id === session.worktree_id);
|
|
189
186
|
if (!worktree) {
|
|
190
187
|
await this.cleanupClient(client);
|
|
191
188
|
this.error("Worktree not found for session");
|
|
192
189
|
}
|
|
193
|
-
const
|
|
190
|
+
const boardObjects = await client.service("board-objects").findAll({
|
|
194
191
|
query: {
|
|
195
192
|
board_id: board.board_id
|
|
196
193
|
}
|
|
197
194
|
});
|
|
198
|
-
const boardObjects = Array.isArray(boardObjectsResult) ? boardObjectsResult : boardObjectsResult.data;
|
|
199
195
|
const existingObject = boardObjects.find(
|
|
200
196
|
(bo) => bo.worktree_id === worktree.worktree_id
|
|
201
197
|
);
|
|
@@ -156,15 +156,13 @@ var BoardList = class _BoardList extends BaseCommand {
|
|
|
156
156
|
const { flags } = await this.parse(_BoardList);
|
|
157
157
|
const client = await this.connectToDaemon();
|
|
158
158
|
try {
|
|
159
|
-
const
|
|
160
|
-
const allBoards = Array.isArray(result) ? result : result.data;
|
|
159
|
+
const allBoards = await client.service("boards").findAll({ query: { $limit: PAGINATION.DEFAULT_LIMIT } });
|
|
161
160
|
if (allBoards.length === 0) {
|
|
162
161
|
this.log(chalk2.yellow("No boards found."));
|
|
163
162
|
await this.cleanupClient(client);
|
|
164
163
|
return;
|
|
165
164
|
}
|
|
166
|
-
const
|
|
167
|
-
const boardObjects = Array.isArray(boardObjectsResult) ? boardObjectsResult : boardObjectsResult.data;
|
|
165
|
+
const boardObjects = await client.service("board-objects").findAll({ query: { $limit: PAGINATION.DEFAULT_LIMIT } });
|
|
168
166
|
const displayBoards = allBoards.slice(0, flags.limit);
|
|
169
167
|
const table = new Table({
|
|
170
168
|
head: [
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
|
+
import { Command } from '@oclif/core';
|
|
3
|
+
|
|
4
|
+
declare class DaemonSync extends Command {
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
'dry-run': _oclif_core_interfaces.BooleanFlag<boolean>;
|
|
9
|
+
config: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
private loadConfigFromPath;
|
|
13
|
+
private logCounts;
|
|
14
|
+
private syncRepos;
|
|
15
|
+
private syncWorktrees;
|
|
16
|
+
private syncUsers;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { DaemonSync as default };
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
// src/commands/daemon/sync.ts
|
|
2
|
+
import { existsSync, mkdirSync } from "fs";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import {
|
|
5
|
+
buildSlugToRepoIdMap,
|
|
6
|
+
daemonResourcesConfigSchema,
|
|
7
|
+
determineRepoAction,
|
|
8
|
+
determineUserAction,
|
|
9
|
+
determineWorktreeAction,
|
|
10
|
+
getReposDir,
|
|
11
|
+
getWorktreePath,
|
|
12
|
+
loadConfig,
|
|
13
|
+
loadConfigFromFile,
|
|
14
|
+
resolvePassword,
|
|
15
|
+
validateResourceCrossReferences
|
|
16
|
+
} from "@agor/core/config";
|
|
17
|
+
import {
|
|
18
|
+
createDatabase,
|
|
19
|
+
getDatabaseUrl,
|
|
20
|
+
hash,
|
|
21
|
+
RepoRepository,
|
|
22
|
+
UsersRepository,
|
|
23
|
+
WorktreeRepository
|
|
24
|
+
} from "@agor/core/db";
|
|
25
|
+
import { autoAssignWorktreeUniqueId } from "@agor/core/environment/variable-resolver";
|
|
26
|
+
import { cloneRepo, createWorktree, getWorktreesDir } from "@agor/core/git";
|
|
27
|
+
import { Command, Flags } from "@oclif/core";
|
|
28
|
+
import chalk from "chalk";
|
|
29
|
+
var DaemonSync = class _DaemonSync extends Command {
|
|
30
|
+
static description = "Sync resources from config.yml into database and filesystem";
|
|
31
|
+
static examples = [
|
|
32
|
+
"<%= config.bin %> daemon sync",
|
|
33
|
+
"<%= config.bin %> daemon sync --dry-run",
|
|
34
|
+
"<%= config.bin %> daemon sync --config /path/to/config.yml"
|
|
35
|
+
];
|
|
36
|
+
static flags = {
|
|
37
|
+
"dry-run": Flags.boolean({
|
|
38
|
+
description: "Validate and report what would change without making changes",
|
|
39
|
+
default: false
|
|
40
|
+
}),
|
|
41
|
+
config: Flags.string({
|
|
42
|
+
char: "c",
|
|
43
|
+
description: "Path to config file (default: ~/.agor/config.yaml)"
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
async run() {
|
|
47
|
+
const { flags } = await this.parse(_DaemonSync);
|
|
48
|
+
const dryRun = flags["dry-run"];
|
|
49
|
+
const config = flags.config ? await this.loadConfigFromPath(flags.config) : await loadConfig();
|
|
50
|
+
if (!config.resources) {
|
|
51
|
+
this.log(chalk.yellow("No resources section in config \u2014 nothing to sync."));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const parseResult = daemonResourcesConfigSchema.safeParse(config.resources);
|
|
55
|
+
if (!parseResult.success) {
|
|
56
|
+
this.log(chalk.red("Config validation failed:"));
|
|
57
|
+
for (const issue of parseResult.error.issues) {
|
|
58
|
+
this.log(chalk.red(` ${issue.path.join(".")}: ${issue.message}`));
|
|
59
|
+
}
|
|
60
|
+
this.exit(1);
|
|
61
|
+
}
|
|
62
|
+
const resources = parseResult.data;
|
|
63
|
+
const crossRefErrors = validateResourceCrossReferences(resources);
|
|
64
|
+
if (crossRefErrors.length > 0) {
|
|
65
|
+
this.log(chalk.red("Resource cross-reference errors:"));
|
|
66
|
+
for (const err of crossRefErrors) {
|
|
67
|
+
this.log(chalk.red(` ${err.path}: ${err.message}`));
|
|
68
|
+
}
|
|
69
|
+
this.exit(1);
|
|
70
|
+
}
|
|
71
|
+
this.log(chalk.bold("Syncing resources from config..."));
|
|
72
|
+
if (dryRun) {
|
|
73
|
+
this.log(chalk.yellow("(dry-run mode \u2014 no changes will be made)"));
|
|
74
|
+
}
|
|
75
|
+
this.log("");
|
|
76
|
+
const dbUrl = getDatabaseUrl();
|
|
77
|
+
const db = createDatabase({ url: dbUrl });
|
|
78
|
+
const repoRepo = new RepoRepository(db);
|
|
79
|
+
const worktreeRepo = new WorktreeRepository(db);
|
|
80
|
+
const usersRepo = new UsersRepository(db);
|
|
81
|
+
const repoCounts = await this.syncRepos(resources.repos ?? [], repoRepo, dryRun);
|
|
82
|
+
const worktreeCounts = await this.syncWorktrees(
|
|
83
|
+
resources.worktrees ?? [],
|
|
84
|
+
resources.repos ?? [],
|
|
85
|
+
worktreeRepo,
|
|
86
|
+
dryRun
|
|
87
|
+
);
|
|
88
|
+
const userCounts = await this.syncUsers(resources.users ?? [], usersRepo, dryRun);
|
|
89
|
+
this.log("");
|
|
90
|
+
this.log(chalk.bold("Sync complete:"));
|
|
91
|
+
this.logCounts("Repos", repoCounts);
|
|
92
|
+
this.logCounts("Worktrees", worktreeCounts);
|
|
93
|
+
this.logCounts("Users", userCounts);
|
|
94
|
+
}
|
|
95
|
+
async loadConfigFromPath(configPath) {
|
|
96
|
+
try {
|
|
97
|
+
return await loadConfigFromFile(configPath);
|
|
98
|
+
} catch (error) {
|
|
99
|
+
this.log(chalk.red(`Failed to load config from ${configPath}:`));
|
|
100
|
+
this.log(chalk.red(` ${error instanceof Error ? error.message : String(error)}`));
|
|
101
|
+
this.exit(1);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
logCounts(label, counts) {
|
|
105
|
+
const parts = [];
|
|
106
|
+
if (counts.created > 0) parts.push(chalk.green(`${counts.created} created`));
|
|
107
|
+
if (counts.updated > 0) parts.push(chalk.yellow(`${counts.updated} updated`));
|
|
108
|
+
if (counts.unchanged > 0) parts.push(chalk.dim(`${counts.unchanged} unchanged`));
|
|
109
|
+
this.log(` ${label}: ${parts.length > 0 ? parts.join(", ") : chalk.dim("none declared")}`);
|
|
110
|
+
}
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// Repo sync
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
async syncRepos(repos, repoRepo, dryRun) {
|
|
115
|
+
const counts = { created: 0, updated: 0, unchanged: 0 };
|
|
116
|
+
for (const repoCfg of repos) {
|
|
117
|
+
const existing = await repoRepo.findBySlug(repoCfg.slug);
|
|
118
|
+
const repoPath = join(getReposDir(), repoCfg.slug);
|
|
119
|
+
const fsExists = existsSync(repoPath);
|
|
120
|
+
const action = determineRepoAction(repoCfg, existing);
|
|
121
|
+
if (action === "create") {
|
|
122
|
+
this.log(` ${chalk.green("create")} repo ${chalk.cyan(repoCfg.slug)}`);
|
|
123
|
+
if (!dryRun) {
|
|
124
|
+
if (repoCfg.remote_url) {
|
|
125
|
+
mkdirSync(getReposDir(), { recursive: true });
|
|
126
|
+
await cloneRepo({ url: repoCfg.remote_url, targetDir: repoPath });
|
|
127
|
+
}
|
|
128
|
+
await repoRepo.create({
|
|
129
|
+
repo_id: repoCfg.repo_id,
|
|
130
|
+
slug: repoCfg.slug,
|
|
131
|
+
name: repoCfg.slug,
|
|
132
|
+
repo_type: repoCfg.repo_type ?? "remote",
|
|
133
|
+
remote_url: repoCfg.remote_url,
|
|
134
|
+
default_branch: repoCfg.default_branch ?? "main",
|
|
135
|
+
local_path: repoPath
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
counts.created++;
|
|
139
|
+
} else if (action === "update") {
|
|
140
|
+
this.log(` ${chalk.yellow("update")} repo ${chalk.cyan(repoCfg.slug)}`);
|
|
141
|
+
if (!dryRun && existing) {
|
|
142
|
+
await repoRepo.update(existing.repo_id, {
|
|
143
|
+
remote_url: repoCfg.remote_url ?? existing.remote_url,
|
|
144
|
+
default_branch: repoCfg.default_branch ?? existing.default_branch
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
counts.updated++;
|
|
148
|
+
} else {
|
|
149
|
+
counts.unchanged++;
|
|
150
|
+
}
|
|
151
|
+
if (existing && !fsExists && repoCfg.remote_url && !dryRun) {
|
|
152
|
+
this.log(` ${chalk.green("clone")} repo ${chalk.cyan(repoCfg.slug)} (filesystem missing)`);
|
|
153
|
+
mkdirSync(getReposDir(), { recursive: true });
|
|
154
|
+
await cloneRepo({ url: repoCfg.remote_url, targetDir: repoPath });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return counts;
|
|
158
|
+
}
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// Worktree sync
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
async syncWorktrees(worktrees, repos, worktreeRepo, dryRun) {
|
|
163
|
+
const counts = { created: 0, updated: 0, unchanged: 0 };
|
|
164
|
+
const slugToId = buildSlugToRepoIdMap(repos);
|
|
165
|
+
for (const wtCfg of worktrees) {
|
|
166
|
+
const repoId = slugToId.get(wtCfg.repo);
|
|
167
|
+
if (!repoId) {
|
|
168
|
+
this.log(chalk.red(` skip worktree "${wtCfg.name}" \u2014 repo "${wtCfg.repo}" not found`));
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const existing = await worktreeRepo.findByRepoAndName(repoId, wtCfg.name);
|
|
172
|
+
const action = determineWorktreeAction(wtCfg, existing);
|
|
173
|
+
if (action === "create") {
|
|
174
|
+
this.log(
|
|
175
|
+
` ${chalk.green("create")} worktree ${chalk.cyan(`${wtCfg.repo}/${wtCfg.name}`)}`
|
|
176
|
+
);
|
|
177
|
+
if (!dryRun) {
|
|
178
|
+
const repoPath = join(getReposDir(), wtCfg.repo);
|
|
179
|
+
const worktreePath = getWorktreePath(wtCfg.repo, wtCfg.name);
|
|
180
|
+
if (!existsSync(worktreePath)) {
|
|
181
|
+
mkdirSync(join(getWorktreesDir(), wtCfg.repo), { recursive: true });
|
|
182
|
+
await createWorktree(
|
|
183
|
+
repoPath,
|
|
184
|
+
worktreePath,
|
|
185
|
+
wtCfg.ref,
|
|
186
|
+
false,
|
|
187
|
+
false,
|
|
188
|
+
void 0,
|
|
189
|
+
void 0,
|
|
190
|
+
wtCfg.ref_type
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
const usedIds = await worktreeRepo.getAllUsedUniqueIds();
|
|
194
|
+
const nextId = autoAssignWorktreeUniqueId(usedIds);
|
|
195
|
+
await worktreeRepo.create({
|
|
196
|
+
worktree_id: wtCfg.worktree_id,
|
|
197
|
+
repo_id: repoId,
|
|
198
|
+
name: wtCfg.name,
|
|
199
|
+
ref: wtCfg.ref,
|
|
200
|
+
ref_type: wtCfg.ref_type ?? "branch",
|
|
201
|
+
path: worktreePath,
|
|
202
|
+
worktree_unique_id: nextId,
|
|
203
|
+
others_can: wtCfg.others_can ?? "session",
|
|
204
|
+
mcp_server_ids: wtCfg.mcp_server_ids,
|
|
205
|
+
new_branch: false,
|
|
206
|
+
last_used: (/* @__PURE__ */ new Date()).toISOString()
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
counts.created++;
|
|
210
|
+
} else if (action === "update") {
|
|
211
|
+
this.log(
|
|
212
|
+
` ${chalk.yellow("update")} worktree ${chalk.cyan(`${wtCfg.repo}/${wtCfg.name}`)}`
|
|
213
|
+
);
|
|
214
|
+
if (!dryRun && existing) {
|
|
215
|
+
await worktreeRepo.update(existing.worktree_id, {
|
|
216
|
+
ref: wtCfg.ref,
|
|
217
|
+
ref_type: wtCfg.ref_type ?? existing.ref_type,
|
|
218
|
+
others_can: wtCfg.others_can ?? existing.others_can,
|
|
219
|
+
mcp_server_ids: wtCfg.mcp_server_ids ?? existing.mcp_server_ids
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
counts.updated++;
|
|
223
|
+
} else {
|
|
224
|
+
counts.unchanged++;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return counts;
|
|
228
|
+
}
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// User sync
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
async syncUsers(users, usersRepo, dryRun) {
|
|
233
|
+
const counts = { created: 0, updated: 0, unchanged: 0 };
|
|
234
|
+
for (const userCfg of users) {
|
|
235
|
+
const existing = await usersRepo.findByEmail(userCfg.email);
|
|
236
|
+
const action = determineUserAction(userCfg, existing);
|
|
237
|
+
if (action === "create") {
|
|
238
|
+
this.log(` ${chalk.green("create")} user ${chalk.cyan(userCfg.email)}`);
|
|
239
|
+
if (!dryRun) {
|
|
240
|
+
const resolved = resolvePassword(userCfg.password);
|
|
241
|
+
if (resolved.mustChange) {
|
|
242
|
+
this.log(
|
|
243
|
+
` ${chalk.dim("generated temporary password for")} ${userCfg.email}: ${chalk.yellow(resolved.password)}`
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
const hashedPassword = await hash(resolved.password, 12);
|
|
247
|
+
await usersRepo.create({
|
|
248
|
+
user_id: userCfg.user_id,
|
|
249
|
+
email: userCfg.email,
|
|
250
|
+
name: userCfg.name,
|
|
251
|
+
role: userCfg.role ?? "member",
|
|
252
|
+
unix_username: userCfg.unix_username,
|
|
253
|
+
password: hashedPassword,
|
|
254
|
+
must_change_password: resolved.mustChange
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
counts.created++;
|
|
258
|
+
} else if (action === "update") {
|
|
259
|
+
this.log(` ${chalk.yellow("update")} user ${chalk.cyan(userCfg.email)}`);
|
|
260
|
+
if (!dryRun && existing) {
|
|
261
|
+
await usersRepo.update(existing.user_id, {
|
|
262
|
+
name: userCfg.name ?? existing.name,
|
|
263
|
+
role: userCfg.role ?? existing.role,
|
|
264
|
+
unix_username: userCfg.unix_username ?? existing.unix_username
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
counts.updated++;
|
|
268
|
+
} else {
|
|
269
|
+
counts.unchanged++;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return counts;
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
export {
|
|
276
|
+
DaemonSync as default
|
|
277
|
+
};
|
|
@@ -172,8 +172,7 @@ var McpList = class _McpList extends BaseCommand {
|
|
|
172
172
|
if (flags.scope) query.scope = flags.scope;
|
|
173
173
|
if (flags.transport) query.transport = flags.transport;
|
|
174
174
|
if (flags.enabled) query.enabled = true;
|
|
175
|
-
const
|
|
176
|
-
const servers = Array.isArray(result) ? result : result.data;
|
|
175
|
+
const servers = await client.service("mcp-servers").findAll({ query });
|
|
177
176
|
if (servers.length === 0) {
|
|
178
177
|
this.log(chalk2.yellow("No MCP servers found."));
|
|
179
178
|
await this.cleanupClient(client);
|
|
@@ -165,10 +165,9 @@ var McpRemove = class _McpRemove extends BaseCommand {
|
|
|
165
165
|
try {
|
|
166
166
|
let serverId = args.id;
|
|
167
167
|
if (!args.id.match(/^[0-9a-f]{8}/i)) {
|
|
168
|
-
const
|
|
168
|
+
const servers = await client.service("mcp-servers").findAll({
|
|
169
169
|
query: { $limit: 100 }
|
|
170
170
|
});
|
|
171
|
-
const servers = Array.isArray(result) ? result : result.data;
|
|
172
171
|
const server = servers.find((s) => s.name === args.id);
|
|
173
172
|
if (!server) {
|
|
174
173
|
await this.cleanupClient(client);
|
|
@@ -160,10 +160,9 @@ var McpShow = class _McpShow extends BaseCommand {
|
|
|
160
160
|
try {
|
|
161
161
|
server = await client.service("mcp-servers").get(args.id);
|
|
162
162
|
} catch {
|
|
163
|
-
const
|
|
163
|
+
const servers = await client.service("mcp-servers").findAll({
|
|
164
164
|
query: { $limit: 1 }
|
|
165
165
|
});
|
|
166
|
-
const servers = Array.isArray(result) ? result : result.data;
|
|
167
166
|
server = servers.find((s) => s.name === args.id) || null;
|
|
168
167
|
}
|
|
169
168
|
if (!server) {
|
|
@@ -173,8 +173,7 @@ var RepoRm = class _RepoRm extends BaseCommand {
|
|
|
173
173
|
try {
|
|
174
174
|
repo = await reposService.get(args.id);
|
|
175
175
|
} catch {
|
|
176
|
-
const
|
|
177
|
-
const repos = Array.isArray(result) ? result : result.data;
|
|
176
|
+
const repos = await reposService.findAll({ query: { slug: args.id } });
|
|
178
177
|
if (repos.length > 0) {
|
|
179
178
|
repo = repos[0];
|
|
180
179
|
}
|
|
@@ -189,8 +189,7 @@ ${chalk2.blue("\u25CF")} Loading Claude Code session: ${chalk2.cyan(sessionId)}
|
|
|
189
189
|
const projectName = path.basename(absoluteProjectDir);
|
|
190
190
|
let repo = null;
|
|
191
191
|
try {
|
|
192
|
-
const
|
|
193
|
-
const reposList = Array.isArray(allRepos) ? allRepos : allRepos.data;
|
|
192
|
+
const reposList = await reposService.findAll({ query: { $limit: 1e3 } });
|
|
194
193
|
repo = reposList.find((r) => r.local_path === absoluteProjectDir) || null;
|
|
195
194
|
} catch {
|
|
196
195
|
}
|
|
@@ -166,8 +166,7 @@ var UserDelete = class _UserDelete extends BaseCommand {
|
|
|
166
166
|
const client = await this.connectToDaemon();
|
|
167
167
|
try {
|
|
168
168
|
const usersService = client.service("users");
|
|
169
|
-
const
|
|
170
|
-
const users = Array.isArray(result) ? result : result.data;
|
|
169
|
+
const users = await usersService.findAll();
|
|
171
170
|
const user = users.find(
|
|
172
171
|
(u) => u.email === args.user || u.user_id === args.user || u.user_id.startsWith(args.user)
|
|
173
172
|
);
|
|
@@ -184,8 +184,7 @@ var UserUpdate = class _UserUpdate extends BaseCommand {
|
|
|
184
184
|
const client = await this.connectToDaemon();
|
|
185
185
|
try {
|
|
186
186
|
const usersService = client.service("users");
|
|
187
|
-
const
|
|
188
|
-
const users = Array.isArray(result) ? result : result.data;
|
|
187
|
+
const users = await usersService.findAll();
|
|
189
188
|
const user = users.find(
|
|
190
189
|
(u) => u.email === args.user || u.user_id === args.user || u.user_id.startsWith(args.user)
|
|
191
190
|
);
|
|
@@ -194,13 +194,12 @@ var WorktreeAdd = class _WorktreeAdd extends BaseCommand {
|
|
|
194
194
|
const reposService = client.service("repos");
|
|
195
195
|
const repo = await reposService.get(flags["repo-id"]);
|
|
196
196
|
const worktreesService = client.service("worktrees");
|
|
197
|
-
const
|
|
197
|
+
const worktreesList = await worktreesService.findAll({
|
|
198
198
|
query: {
|
|
199
199
|
repo_id: repo.repo_id,
|
|
200
200
|
name: args.name
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
|
-
const worktreesList = Array.isArray(existingWorktrees) ? existingWorktrees : existingWorktrees.data;
|
|
204
203
|
if (worktreesList.length > 0) {
|
|
205
204
|
this.error(`Worktree '${args.name}' already exists at ${worktreesList[0].path}`);
|
|
206
205
|
}
|
|
@@ -183,10 +183,9 @@ var WorktreeArchive = class _WorktreeArchive extends BaseCommand {
|
|
|
183
183
|
this.log(` ID: ${chalk2.dim(formatShortId(worktree.worktree_id))}`);
|
|
184
184
|
const sessionsService = client.service("sessions");
|
|
185
185
|
try {
|
|
186
|
-
const
|
|
186
|
+
const allSessions = await sessionsService.findAll({
|
|
187
187
|
query: { worktree_id: worktree.worktree_id, $limit: 1e4 }
|
|
188
188
|
});
|
|
189
|
-
const allSessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
190
189
|
if (allSessions.length > 0) {
|
|
191
190
|
this.log(
|
|
192
191
|
` Sessions: ${chalk2.dim(`${allSessions.length} session(s) will also be archived`)}`
|
|
@@ -193,15 +193,13 @@ var WorktreeList = class _WorktreeList extends BaseCommand {
|
|
|
193
193
|
const reposService = client.service("repos");
|
|
194
194
|
let allWorktrees = [];
|
|
195
195
|
if (flags["repo-id"]) {
|
|
196
|
-
|
|
196
|
+
allWorktrees = await worktreesService.findAll({
|
|
197
197
|
query: { repo_id: flags["repo-id"], $limit: PAGINATION.DEFAULT_LIMIT }
|
|
198
198
|
});
|
|
199
|
-
allWorktrees = Array.isArray(worktreesResult) ? worktreesResult : worktreesResult.data;
|
|
200
199
|
} else {
|
|
201
|
-
|
|
200
|
+
allWorktrees = await worktreesService.findAll({
|
|
202
201
|
query: { $limit: PAGINATION.DEFAULT_LIMIT }
|
|
203
202
|
});
|
|
204
|
-
allWorktrees = Array.isArray(worktreesResult) ? worktreesResult : worktreesResult.data;
|
|
205
203
|
}
|
|
206
204
|
let filteredWorktrees = allWorktrees;
|
|
207
205
|
if (flags.archived) {
|
|
@@ -239,10 +237,9 @@ var WorktreeList = class _WorktreeList extends BaseCommand {
|
|
|
239
237
|
const sessionsService = client.service("sessions");
|
|
240
238
|
const sessionCounts = /* @__PURE__ */ new Map();
|
|
241
239
|
try {
|
|
242
|
-
const
|
|
240
|
+
const allSessions = await sessionsService.findAll({
|
|
243
241
|
query: { $limit: PAGINATION.DEFAULT_LIMIT }
|
|
244
242
|
});
|
|
245
|
-
const allSessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
246
243
|
for (const session of allSessions) {
|
|
247
244
|
const count = sessionCounts.get(session.worktree_id) || 0;
|
|
248
245
|
sessionCounts.set(session.worktree_id, count + 1);
|
|
@@ -173,10 +173,9 @@ var WorktreeRemove = class _WorktreeRemove extends BaseCommand {
|
|
|
173
173
|
this.log(` ID: ${chalk2.dim(formatShortId(worktree.worktree_id))}`);
|
|
174
174
|
const sessionsService = client.service("sessions");
|
|
175
175
|
try {
|
|
176
|
-
const
|
|
176
|
+
const allSessions = await sessionsService.findAll({
|
|
177
177
|
query: { worktree_id: worktree.worktree_id, $limit: 1e4 }
|
|
178
178
|
});
|
|
179
|
-
const allSessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
180
179
|
if (allSessions.length > 0) {
|
|
181
180
|
this.log(
|
|
182
181
|
` Sessions: ${chalk2.yellow(`${allSessions.length} session(s) reference this worktree`)}`
|
|
@@ -214,10 +214,9 @@ var WorktreeShow = class _WorktreeShow extends BaseCommand {
|
|
|
214
214
|
this.log(chalk2.bold("Sessions:"));
|
|
215
215
|
const sessionsService = client.service("sessions");
|
|
216
216
|
try {
|
|
217
|
-
const
|
|
217
|
+
const allSessions = await sessionsService.findAll({
|
|
218
218
|
query: { worktree_id: worktree.worktree_id, $limit: 1e4 }
|
|
219
219
|
});
|
|
220
|
-
const allSessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
221
220
|
if (allSessions.length > 0) {
|
|
222
221
|
this.log(` ${chalk2.cyan(allSessions.length.toString())} session(s)`);
|
|
223
222
|
for (const session of allSessions.slice(0, 5)) {
|
|
@@ -179,7 +179,7 @@ var WorktreeUnarchive = class _WorktreeUnarchive extends BaseCommand {
|
|
|
179
179
|
this.log(` ID: ${chalk2.dim(formatShortId(worktree.worktree_id))}`);
|
|
180
180
|
const sessionsService = client.service("sessions");
|
|
181
181
|
try {
|
|
182
|
-
const
|
|
182
|
+
const allSessions = await sessionsService.findAll({
|
|
183
183
|
query: {
|
|
184
184
|
worktree_id: worktree.worktree_id,
|
|
185
185
|
archived: true,
|
|
@@ -187,7 +187,6 @@ var WorktreeUnarchive = class _WorktreeUnarchive extends BaseCommand {
|
|
|
187
187
|
$limit: 1e4
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
|
-
const allSessions = Array.isArray(sessionsResult) ? sessionsResult : sessionsResult.data;
|
|
191
190
|
if (allSessions.length > 0) {
|
|
192
191
|
this.log(
|
|
193
192
|
` Sessions: ${chalk2.dim(`${allSessions.length} session(s) will also be unarchived`)}`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AgenticToolID } from './id-
|
|
1
|
+
import { A as AgenticToolID } from './id-Cv3ntaTJ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Agentic coding tool names
|
|
@@ -106,5 +106,24 @@ type CodexNetworkAccess = boolean;
|
|
|
106
106
|
* - bypassPermissions: Auto-approve everything (equivalent to approveAll helper)
|
|
107
107
|
*/
|
|
108
108
|
type CopilotPermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions';
|
|
109
|
+
/**
|
|
110
|
+
* Static capability flags for agentic tools.
|
|
111
|
+
* Used by the UI to show/hide features based on what a tool supports.
|
|
112
|
+
* Mirrors the runtime ToolCapabilities in the executor but is available
|
|
113
|
+
* without instantiating a tool.
|
|
114
|
+
*/
|
|
115
|
+
interface AgenticToolCapabilities {
|
|
116
|
+
/** Can fork sessions (branch conversation at a decision point) */
|
|
117
|
+
supportsSessionFork: boolean;
|
|
118
|
+
/** Can spawn child sessions for subsessions */
|
|
119
|
+
supportsChildSpawn: boolean;
|
|
120
|
+
/** Can import historical sessions from tool's storage */
|
|
121
|
+
supportsSessionImport: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Static capability map for all agentic tools.
|
|
125
|
+
* Source of truth for what each tool supports — avoids scattered `if (tool === 'codex')` checks.
|
|
126
|
+
*/
|
|
127
|
+
declare const AGENTIC_TOOL_CAPABILITIES: Record<AgenticToolName, AgenticToolCapabilities>;
|
|
109
128
|
|
|
110
|
-
export type
|
|
129
|
+
export { type AgenticToolName as A, type ClaudeCodePermissionMode as C, type GeminiPermissionMode as G, type OpenCodePermissionMode as O, type CodexPermissionMode as a, type AgenticTool as b, type CodexSandboxMode as c, type CodexApprovalPolicy as d, type CodexNetworkAccess as e, type CopilotPermissionMode as f, type AgenticToolCapabilities as g, AGENTIC_TOOL_CAPABILITIES as h };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AgenticToolID } from './id-
|
|
1
|
+
import { A as AgenticToolID } from './id-Cv3ntaTJ.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Agentic coding tool names
|
|
@@ -106,5 +106,24 @@ type CodexNetworkAccess = boolean;
|
|
|
106
106
|
* - bypassPermissions: Auto-approve everything (equivalent to approveAll helper)
|
|
107
107
|
*/
|
|
108
108
|
type CopilotPermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions';
|
|
109
|
+
/**
|
|
110
|
+
* Static capability flags for agentic tools.
|
|
111
|
+
* Used by the UI to show/hide features based on what a tool supports.
|
|
112
|
+
* Mirrors the runtime ToolCapabilities in the executor but is available
|
|
113
|
+
* without instantiating a tool.
|
|
114
|
+
*/
|
|
115
|
+
interface AgenticToolCapabilities {
|
|
116
|
+
/** Can fork sessions (branch conversation at a decision point) */
|
|
117
|
+
supportsSessionFork: boolean;
|
|
118
|
+
/** Can spawn child sessions for subsessions */
|
|
119
|
+
supportsChildSpawn: boolean;
|
|
120
|
+
/** Can import historical sessions from tool's storage */
|
|
121
|
+
supportsSessionImport: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Static capability map for all agentic tools.
|
|
125
|
+
* Source of truth for what each tool supports — avoids scattered `if (tool === 'codex')` checks.
|
|
126
|
+
*/
|
|
127
|
+
declare const AGENTIC_TOOL_CAPABILITIES: Record<AgenticToolName, AgenticToolCapabilities>;
|
|
109
128
|
|
|
110
|
-
export type
|
|
129
|
+
export { type AgenticToolName as A, type ClaudeCodePermissionMode as C, type GeminiPermissionMode as G, type OpenCodePermissionMode as O, type CodexPermissionMode as a, type AgenticTool as b, type CodexSandboxMode as c, type CodexApprovalPolicy as d, type CodexNetworkAccess as e, type CopilotPermissionMode as f, type AgenticToolCapabilities as g, AGENTIC_TOOL_CAPABILITIES as h };
|