agor-live 0.14.2 → 0.14.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/bin/version-check.js +7 -5
- package/dist/core/api/index.d.cts +2 -2
- package/dist/core/api/index.d.ts +2 -2
- package/dist/core/config/browser.d.cts +2 -2
- package/dist/core/config/browser.d.ts +2 -2
- package/dist/core/config/index.d.cts +3 -3
- package/dist/core/config/index.d.ts +3 -3
- package/dist/core/{config-manager-DdwPsKTh.d.ts → config-manager-BDJG7HPR.d.ts} +1 -1
- package/dist/core/{config-manager-4zF2cWdg.d.cts → config-manager-Dw2LXbKq.d.cts} +1 -1
- package/dist/core/db/index.cjs +3 -6
- package/dist/core/db/index.d.cts +1 -1
- package/dist/core/db/index.d.ts +1 -1
- package/dist/core/db/index.js +3 -6
- package/dist/core/environment/variable-resolver.d.cts +1 -1
- package/dist/core/environment/variable-resolver.d.ts +1 -1
- package/dist/core/{feathers-B78IxAoi.d.cts → feathers-5DsXBqOW.d.cts} +3 -1
- package/dist/core/{feathers-MlqnVpas.d.ts → feathers-qrz_9jSJ.d.ts} +3 -1
- package/dist/core/gateway/index.cjs +3 -2
- package/dist/core/gateway/index.js +3 -2
- package/dist/core/git/index.cjs +41 -1
- package/dist/core/git/index.d.cts +14 -3
- package/dist/core/git/index.d.ts +14 -3
- package/dist/core/git/index.js +40 -1
- package/dist/core/index.cjs +87 -13
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +86 -13
- package/dist/core/sdk/index.d.cts +1 -1
- package/dist/core/sdk/index.d.ts +1 -1
- package/dist/core/seed/index.cjs +98 -7
- package/dist/core/seed/index.js +98 -7
- package/dist/core/templates/agor-system-prompt.md +3 -0
- package/dist/core/templates/session-context.cjs +16 -0
- package/dist/core/templates/session-context.d.cts +7 -1
- package/dist/core/templates/session-context.d.ts +7 -1
- package/dist/core/templates/session-context.js +16 -0
- package/dist/core/types/index.d.cts +2 -2
- package/dist/core/types/index.d.ts +2 -2
- package/dist/core/{types-D7s9-Y1x.d.cts → types-Cox7HmbB.d.cts} +17 -0
- package/dist/core/{types-D7s9-Y1x.d.ts → types-Cox7HmbB.d.ts} +17 -0
- package/dist/core/unix/index.cjs +43 -6
- package/dist/core/unix/index.d.cts +15 -1
- package/dist/core/unix/index.d.ts +15 -1
- package/dist/core/unix/index.js +43 -6
- package/dist/core/{worktree-BUhwPBvP.d.cts → worktree-CvakJ5w4.d.cts} +2 -0
- package/dist/core/{worktree-z5k683z2.d.ts → worktree-Dr_m10w8.d.ts} +2 -0
- package/dist/daemon/declarations.d.ts +5 -1
- package/dist/daemon/index.js +732 -35
- package/dist/daemon/mcp/routes.js +413 -3
- package/dist/daemon/services/health-monitor.js +0 -1
- package/dist/daemon/services/leaderboard.js +10 -4
- package/dist/daemon/services/repos.js +36 -2
- package/dist/daemon/services/session-token-service.js +0 -1
- package/dist/daemon/services/worktree-owners.js +6 -0
- package/dist/daemon/services/worktrees.js +8 -2
- package/dist/daemon/setup/index.js +3 -0
- package/dist/daemon/setup/socketio.js +3 -0
- package/dist/daemon/utils/worktree-authorization.js +18 -0
- package/dist/executor/commands/git.d.ts.map +1 -1
- package/dist/executor/commands/git.js +26 -3
- package/dist/executor/commands/unix.d.ts +1 -1
- package/dist/executor/commands/unix.d.ts.map +1 -1
- package/dist/executor/commands/unix.js +101 -2
- package/dist/executor/db/feathers-repositories.d.ts +11 -1
- package/dist/executor/db/feathers-repositories.d.ts.map +1 -1
- package/dist/executor/db/feathers-repositories.js +19 -0
- package/dist/executor/handlers/sdk/claude.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/claude.js +1 -1
- package/dist/executor/handlers/sdk/codex.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/codex.js +2 -2
- package/dist/executor/handlers/sdk/gemini.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/gemini.js +2 -2
- package/dist/executor/handlers/sdk/tool-registry.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/tool-registry.js +1 -1
- package/dist/executor/payload-types.d.ts +4 -0
- package/dist/executor/payload-types.d.ts.map +1 -1
- package/dist/executor/payload-types.js +4 -0
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +20 -2
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts +8 -0
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/message-processor.js +67 -19
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +7 -2
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/prompt-service.js +81 -6
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +4 -1
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +2 -0
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +2 -2
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +4 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +3 -2
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.js +3 -3
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +4 -2
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +5 -2
- package/dist/ui/assets/{_basePickBy-BcsCIFl3.js → _basePickBy-a-UPuVdu.js} +1 -1
- package/dist/ui/assets/_basePickBy-a-UPuVdu.js.gz +0 -0
- package/dist/ui/assets/{_baseUniq-C9qLHNz1.js → _baseUniq-BsamLjHu.js} +1 -1
- package/dist/ui/assets/_baseUniq-BsamLjHu.js.gz +0 -0
- package/dist/ui/assets/{arc-Ceq4haa-.js → arc-DyqZs1Vh.js} +1 -1
- package/dist/ui/assets/arc-DyqZs1Vh.js.gz +0 -0
- package/dist/ui/assets/{architectureDiagram-VXUJARFQ-DfyMRH2g.js → architectureDiagram-VXUJARFQ-CgsIeOuk.js} +1 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-CgsIeOuk.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-B-zMNwIS.js → blockDiagram-VD42YOAC-D1eydKiU.js} +1 -1
- package/dist/ui/assets/blockDiagram-VD42YOAC-D1eydKiU.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-BMw-AOGm.js → c4Diagram-YG6GDRKO-CTRsvfoC.js} +1 -1
- package/dist/ui/assets/c4Diagram-YG6GDRKO-CTRsvfoC.js.gz +0 -0
- package/dist/ui/assets/channel-Buowy_Lw.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-DKyQz3bJ.js → chunk-4BX2VUAB-DywfV5U9.js} +1 -1
- package/dist/ui/assets/{chunk-55IACEB6-DG978z5k.js → chunk-55IACEB6-_2HiUO9U.js} +1 -1
- package/dist/ui/assets/{chunk-B4BG7PRW-D4eKcLoO.js → chunk-B4BG7PRW-fTTNlIHk.js} +1 -1
- package/dist/ui/assets/chunk-B4BG7PRW-fTTNlIHk.js.gz +0 -0
- package/dist/ui/assets/{chunk-DI55MBZ5-BhCXePw-.js → chunk-DI55MBZ5-CkK99YYw.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-CkK99YYw.js.gz +0 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-LkMGYJmg.js → chunk-FMBD7UC4-DQTX-Hsy.js} +1 -1
- package/dist/ui/assets/{chunk-QN33PNHL-DqmrkLAy.js → chunk-QN33PNHL-CzeO2t_E.js} +1 -1
- package/dist/ui/assets/{chunk-QZHKN3VN-vu9nX0F4.js → chunk-QZHKN3VN-CHoat9Pt.js} +1 -1
- package/dist/ui/assets/{chunk-TZMSLE5B-D6ocQBEr.js → chunk-TZMSLE5B-S7n8674o.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-S7n8674o.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-6NEyxcEx.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-6NEyxcEx.js +1 -0
- package/dist/ui/assets/clone-D03hM6j2.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-DCGk_n2D.js → cose-bilkent-S5V4N54A-siMLCMvS.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-siMLCMvS.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-CsjhA74v.js → dagre-6UL2VRFP-_OX2gkxc.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-_OX2gkxc.js.gz +0 -0
- package/dist/ui/assets/{diagram-PSM6KHXK-bZdNMr9V.js → diagram-PSM6KHXK-DiegU_YP.js} +1 -1
- package/dist/ui/assets/diagram-PSM6KHXK-DiegU_YP.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-DvyBuPwZ.js → diagram-QEK2KX5R-RLTZ88ZV.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-RLTZ88ZV.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-DvV0uTTN.js → diagram-S2PKOQOG-yQSuJDK3.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-yQSuJDK3.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-BTmYWhPJ.js → erDiagram-Q2GNP2WA--p-2-5N5.js} +1 -1
- package/dist/ui/assets/erDiagram-Q2GNP2WA--p-2-5N5.js.gz +0 -0
- package/dist/ui/assets/{flowDiagram-NV44I4VS-B2RLSbVi.js → flowDiagram-NV44I4VS-C4zjWB0K.js} +1 -1
- package/dist/ui/assets/flowDiagram-NV44I4VS-C4zjWB0K.js.gz +0 -0
- package/dist/ui/assets/{ganttDiagram-LVOFAZNH-497U3z0q.js → ganttDiagram-LVOFAZNH-mxE44wXO.js} +1 -1
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-mxE44wXO.js.gz +0 -0
- package/dist/ui/assets/{gitGraphDiagram-NY62KEGX-D_zLKKo5.js → gitGraphDiagram-NY62KEGX-DMrIQq3G.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-DMrIQq3G.js.gz +0 -0
- package/dist/ui/assets/{graph-C96eyvF2.js → graph-VhrcdIIR.js} +1 -1
- package/dist/ui/assets/graph-VhrcdIIR.js.gz +0 -0
- package/dist/ui/assets/{index-DAG3Th-7.js → index-DKOtdAlC.js} +246 -248
- package/dist/ui/assets/index-DKOtdAlC.js.gz +0 -0
- package/dist/ui/assets/{infoDiagram-ER5ION4S-C_74OE3M.js → infoDiagram-ER5ION4S-Xoedk4d-.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CzA_GvKr.js → journeyDiagram-XKPGCS4Q-B_a5FCHm.js} +1 -1
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-B_a5FCHm.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-DOP0b3y_.js → kanban-definition-3W4ZIXB7-DiBtDV_W.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DiBtDV_W.js.gz +0 -0
- package/dist/ui/assets/{layout-CW1WQp_3.js → layout-bk99zgxO.js} +1 -1
- package/dist/ui/assets/layout-bk99zgxO.js.gz +0 -0
- package/dist/ui/assets/{linear-Cv3uYX5l.js → linear-DZd1s0sw.js} +1 -1
- package/dist/ui/assets/linear-DZd1s0sw.js.gz +0 -0
- package/dist/ui/assets/{mermaid.core-C-4jB_A3.js → mermaid.core-Dc9f_1yv.js} +5 -5
- package/dist/ui/assets/mermaid.core-Dc9f_1yv.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-CB2ELYQo.js → mindmap-definition-VGOIOE7T-J9nYSB--.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-J9nYSB--.js.gz +0 -0
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-HnXxtlZ9.js → pieDiagram-ADFJNKIX-Dh-hO5TS.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-Dh-hO5TS.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-Iq9g2p8B.js → quadrantDiagram-AYHSOK5B-COUMk2nQ.js} +1 -1
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-COUMk2nQ.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-DDFb6VL2.js → requirementDiagram-UZGBJVZJ-DVSwLaEz.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-DVSwLaEz.js.gz +0 -0
- package/dist/ui/assets/{sankeyDiagram-TZEHDZUN-CXiKAieY.js → sankeyDiagram-TZEHDZUN-CCEMM6UB.js} +1 -1
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-CCEMM6UB.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-rf_zL-yk.js → sequenceDiagram-WL72ISMW-DnlaHA2K.js} +1 -1
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DnlaHA2K.js.gz +0 -0
- package/dist/ui/assets/{stateDiagram-FKZM4ZOC-Bqqna_jr.js → stateDiagram-FKZM4ZOC-DJftQqhn.js} +1 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-DJftQqhn.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-9ApJophA.js +1 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-BM21Xo3N.js → timeline-definition-IT6M3QCI-BB3mW5UW.js} +1 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-BB3mW5UW.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-uSEFIr6t.js → treemap-KMMF4GRG-KI87p8ms.js} +1 -1
- package/dist/ui/assets/treemap-KMMF4GRG-KI87p8ms.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-C0rLaN2k.js → xychartDiagram-PRI3JC2R-BcAowgbC.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BcAowgbC.js.gz +0 -0
- package/dist/ui/index.html +1 -1
- package/package.json +6 -4
- package/dist/ui/assets/_basePickBy-BcsCIFl3.js.gz +0 -0
- package/dist/ui/assets/_baseUniq-C9qLHNz1.js.gz +0 -0
- package/dist/ui/assets/arc-Ceq4haa-.js.gz +0 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DfyMRH2g.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-B-zMNwIS.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-BMw-AOGm.js.gz +0 -0
- package/dist/ui/assets/channel-Bd2BDOXM.js +0 -1
- package/dist/ui/assets/chunk-B4BG7PRW-D4eKcLoO.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-BhCXePw-.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-D6ocQBEr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BeBW1sCT.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BeBW1sCT.js +0 -1
- package/dist/ui/assets/clone-BYVESyX3.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-DCGk_n2D.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-CsjhA74v.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-bZdNMr9V.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-DvyBuPwZ.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-DvV0uTTN.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-BTmYWhPJ.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-B2RLSbVi.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-497U3z0q.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-D_zLKKo5.js.gz +0 -0
- package/dist/ui/assets/graph-C96eyvF2.js.gz +0 -0
- package/dist/ui/assets/index-DAG3Th-7.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CzA_GvKr.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DOP0b3y_.js.gz +0 -0
- package/dist/ui/assets/layout-CW1WQp_3.js.gz +0 -0
- package/dist/ui/assets/linear-Cv3uYX5l.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-C-4jB_A3.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-CB2ELYQo.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-HnXxtlZ9.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-Iq9g2p8B.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-DDFb6VL2.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-CXiKAieY.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-rf_zL-yk.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-Bqqna_jr.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-Bxdu6frV.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-BM21Xo3N.js.gz +0 -0
- package/dist/ui/assets/treemap-KMMF4GRG-uSEFIr6t.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-C0rLaN2k.js.gz +0 -0
package/bin/version-check.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Node.js version check utility
|
|
3
|
-
* Used by CLI and daemon entry points to ensure Node
|
|
3
|
+
* Used by CLI and daemon entry points to ensure Node 22+ requirement
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
|
|
8
8
|
export function checkNodeVersion() {
|
|
9
9
|
const nodeVersion = process.versions.node;
|
|
10
|
-
const
|
|
10
|
+
const [majorStr, minorStr] = nodeVersion.split('.');
|
|
11
|
+
const major = parseInt(majorStr, 10);
|
|
12
|
+
const minor = parseInt(minorStr, 10);
|
|
11
13
|
|
|
12
|
-
if (
|
|
13
|
-
console.error(chalk.red('✖ Error: Agor requires Node.js
|
|
14
|
+
if (major < 22 || (major === 22 && minor < 12)) {
|
|
15
|
+
console.error(chalk.red('✖ Error: Agor requires Node.js v22.12.0 or higher'));
|
|
14
16
|
console.error(chalk.yellow(` Current version: v${nodeVersion}\n`));
|
|
15
17
|
console.error('Please upgrade Node.js:');
|
|
16
|
-
console.error(` • Using nvm: ${chalk.cyan('nvm install
|
|
18
|
+
console.error(` • Using nvm: ${chalk.cyan('nvm install 22 && nvm use 22')}`);
|
|
17
19
|
console.error(` • Download: ${chalk.cyan('https://nodejs.org/')}\n`);
|
|
18
20
|
process.exit(1);
|
|
19
21
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as Message } from '../message-kDoxvdzV.cjs';
|
|
2
2
|
import { e as Board, f as BoardExportBlob } from '../board-HBLXfsPa.cjs';
|
|
3
3
|
import { a as ContextFileListItem, b as ContextFileDetail } from '../context-ByxGjp5l.cjs';
|
|
4
|
-
import { b as AuthenticationResult } from '../feathers-
|
|
4
|
+
import { b as AuthenticationResult } from '../feathers-5DsXBqOW.cjs';
|
|
5
5
|
import { f as Session } from '../session-DmaExlXI.cjs';
|
|
6
6
|
import { d as User } from '../user-D8Z4aURB.cjs';
|
|
7
7
|
import { i as MCPServer } from '../mcp-DhSSHDnR.cjs';
|
|
8
|
-
import { b as Repo, d as Worktree } from '../worktree-
|
|
8
|
+
import { b as Repo, d as Worktree } from '../worktree-CvakJ5w4.cjs';
|
|
9
9
|
import { c as Task } from '../task-Cw2N74jk.cjs';
|
|
10
10
|
import { Params, Paginated, Application } from '@feathersjs/feathers';
|
|
11
11
|
import { Socket } from 'socket.io-client';
|
package/dist/core/api/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as Message } from '../message-C9XTt2nM.js';
|
|
2
2
|
import { e as Board, f as BoardExportBlob } from '../board-CD258gWW.js';
|
|
3
3
|
import { a as ContextFileListItem, b as ContextFileDetail } from '../context-ByxGjp5l.js';
|
|
4
|
-
import { b as AuthenticationResult } from '../feathers-
|
|
4
|
+
import { b as AuthenticationResult } from '../feathers-qrz_9jSJ.js';
|
|
5
5
|
import { f as Session } from '../session-0b_yCNQr.js';
|
|
6
6
|
import { d as User } from '../user-BpflK7uR.js';
|
|
7
7
|
import { i as MCPServer } from '../mcp-Db0cL7Xc.js';
|
|
8
|
-
import { b as Repo, d as Worktree } from '../worktree-
|
|
8
|
+
import { b as Repo, d as Worktree } from '../worktree-Dr_m10w8.js';
|
|
9
9
|
import { c as Task } from '../task-C2jNGWSt.js';
|
|
10
10
|
import { Params, Paginated, Application } from '@feathersjs/feathers';
|
|
11
11
|
import { Socket } from 'socket.io-client';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RepoSlug, W as WorktreeName, b as Repo, d as Worktree } from '../worktree-
|
|
1
|
+
import { R as RepoSlug, W as WorktreeName, b as Repo, d as Worktree } from '../worktree-CvakJ5w4.cjs';
|
|
2
2
|
import { U as UUID } from '../id-BwPJtWxW.cjs';
|
|
3
|
-
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-
|
|
3
|
+
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-Cox7HmbB.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* App-level constants for Agor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RepoSlug, W as WorktreeName, b as Repo, d as Worktree } from '../worktree-
|
|
1
|
+
import { R as RepoSlug, W as WorktreeName, b as Repo, d as Worktree } from '../worktree-Dr_m10w8.js';
|
|
2
2
|
import { U as UUID } from '../id-BwPJtWxW.js';
|
|
3
|
-
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-
|
|
3
|
+
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-Cox7HmbB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* App-level constants for Agor
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as RepoEnvironmentConfig } from '../worktree-
|
|
2
|
-
export { c as ensureCodexHome, e as expandHomePath, g as getAgorHome, j as getBaseUrl, a as getConfigPath, d as getConfigValue, m as getCredential, h as getDaemonUrl, n as getDaemonUser, t as getDataHome, y as getDataHomeAsync, b as getDefaultConfig, v as getReposDir, z as getReposDirAsync, x as getWorktreePath, w as getWorktreesDir, A as getWorktreesDirAsync, i as initConfig, q as isUnixImpersonationEnabled, p as isWorktreeRbacEnabled, l as loadConfig, k as loadConfigSync, o as requireDaemonUser, r as resolveCodexHome, s as saveConfig, f as setConfigValue, u as unsetConfigValue } from '../config-manager-
|
|
1
|
+
import { h as RepoEnvironmentConfig } from '../worktree-CvakJ5w4.cjs';
|
|
2
|
+
export { c as ensureCodexHome, e as expandHomePath, g as getAgorHome, j as getBaseUrl, a as getConfigPath, d as getConfigValue, m as getCredential, h as getDaemonUrl, n as getDaemonUser, t as getDataHome, y as getDataHomeAsync, b as getDefaultConfig, v as getReposDir, z as getReposDirAsync, x as getWorktreePath, w as getWorktreesDir, A as getWorktreesDirAsync, i as initConfig, q as isUnixImpersonationEnabled, p as isWorktreeRbacEnabled, l as loadConfig, k as loadConfigSync, o as requireDaemonUser, r as resolveCodexHome, s as saveConfig, f as setConfigValue, u as unsetConfigValue } from '../config-manager-Dw2LXbKq.cjs';
|
|
3
3
|
export { DAEMON, DATABASE, ENVIRONMENT, GIT, PAGINATION, RepoReference, RepoReferenceOption, SESSION, WEBSOCKET, extractSlugFromUrl, formatRepoReference, getDefaultRepoReference, getGroupedRepoReferenceOptions, getRepoReferenceOptions, isValidGitUrl, isValidSlug, parseRepoReference, resolveRepoReference } from './browser.cjs';
|
|
4
4
|
import { d as Database } from '../client-uz0_yQFy.cjs';
|
|
5
5
|
import { b as UserID } from '../id-BwPJtWxW.cjs';
|
|
6
|
-
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-
|
|
6
|
+
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-Cox7HmbB.cjs';
|
|
7
7
|
import 'drizzle-orm/libsql';
|
|
8
8
|
import 'drizzle-orm/postgres-js';
|
|
9
9
|
import 'drizzle-orm';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as RepoEnvironmentConfig } from '../worktree-
|
|
2
|
-
export { c as ensureCodexHome, e as expandHomePath, g as getAgorHome, j as getBaseUrl, a as getConfigPath, d as getConfigValue, m as getCredential, h as getDaemonUrl, n as getDaemonUser, t as getDataHome, y as getDataHomeAsync, b as getDefaultConfig, v as getReposDir, z as getReposDirAsync, x as getWorktreePath, w as getWorktreesDir, A as getWorktreesDirAsync, i as initConfig, q as isUnixImpersonationEnabled, p as isWorktreeRbacEnabled, l as loadConfig, k as loadConfigSync, o as requireDaemonUser, r as resolveCodexHome, s as saveConfig, f as setConfigValue, u as unsetConfigValue } from '../config-manager-
|
|
1
|
+
import { h as RepoEnvironmentConfig } from '../worktree-Dr_m10w8.js';
|
|
2
|
+
export { c as ensureCodexHome, e as expandHomePath, g as getAgorHome, j as getBaseUrl, a as getConfigPath, d as getConfigValue, m as getCredential, h as getDaemonUrl, n as getDaemonUser, t as getDataHome, y as getDataHomeAsync, b as getDefaultConfig, v as getReposDir, z as getReposDirAsync, x as getWorktreePath, w as getWorktreesDir, A as getWorktreesDirAsync, i as initConfig, q as isUnixImpersonationEnabled, p as isWorktreeRbacEnabled, l as loadConfig, k as loadConfigSync, o as requireDaemonUser, r as resolveCodexHome, s as saveConfig, f as setConfigValue, u as unsetConfigValue } from '../config-manager-BDJG7HPR.js';
|
|
3
3
|
export { DAEMON, DATABASE, ENVIRONMENT, GIT, PAGINATION, RepoReference, RepoReferenceOption, SESSION, WEBSOCKET, extractSlugFromUrl, formatRepoReference, getDefaultRepoReference, getGroupedRepoReferenceOptions, getRepoReferenceOptions, isValidGitUrl, isValidSlug, parseRepoReference, resolveRepoReference } from './browser.js';
|
|
4
4
|
import { d as Database } from '../client-BOtnEgnk.js';
|
|
5
5
|
import { b as UserID } from '../id-BwPJtWxW.js';
|
|
6
|
-
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-
|
|
6
|
+
export { f as AgorCodexSettings, k as AgorConfig, i as AgorCredentials, b as AgorDaemonSettings, e as AgorDatabaseSettings, A as AgorDefaults, a as AgorDisplaySettings, g as AgorExecutionSettings, j as AgorOnboardingSettings, d as AgorOpenCodeSettings, h as AgorPathSettings, c as AgorUISettings, l as ConfigKey, C as CredentialKey, U as UnknownJson } from '../types-Cox7HmbB.js';
|
|
7
7
|
import 'drizzle-orm/libsql';
|
|
8
8
|
import 'drizzle-orm/postgres-js';
|
|
9
9
|
import 'drizzle-orm';
|
package/dist/core/db/index.cjs
CHANGED
|
@@ -4918,12 +4918,9 @@ var SessionRepository = class {
|
|
|
4918
4918
|
const current = this.rowToSession(currentRow, boardId, boardSlug, baseUrl);
|
|
4919
4919
|
const merged = deepMerge(current, updates);
|
|
4920
4920
|
const insertData = this.sessionToInsert(merged);
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
ready_for_prompt: insertData.ready_for_prompt,
|
|
4925
|
-
data: insertData.data
|
|
4926
|
-
}).where((0, import_drizzle_orm12.eq)(sessions3.session_id, fullId)).run();
|
|
4921
|
+
insertData.updated_at = /* @__PURE__ */ new Date();
|
|
4922
|
+
await update(tx, sessions3).set(insertData).where((0, import_drizzle_orm12.eq)(sessions3.session_id, fullId)).run();
|
|
4923
|
+
merged.last_updated = insertData.updated_at.toISOString();
|
|
4927
4924
|
return merged;
|
|
4928
4925
|
});
|
|
4929
4926
|
return result;
|
package/dist/core/db/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ import { a as BoardEntityObject, e as Board, d as BoardObject, f as BoardExportB
|
|
|
17
17
|
import { c as GatewayChannel, G as GatewayChannelID, d as ThreadSessionMap, a as ThreadStatus, T as ThreadSessionMapID } from '../gateway-DmSEDGAS.cjs';
|
|
18
18
|
import { i as MCPServer, C as CreateMCPServerInput, U as UpdateMCPServerInput, j as MCPServerFilters, M as MCPServerID, S as SessionMCPServer } from '../mcp-DhSSHDnR.cjs';
|
|
19
19
|
import { i as Message } from '../message-kDoxvdzV.cjs';
|
|
20
|
-
import { b as Repo, d as Worktree } from '../worktree-
|
|
20
|
+
import { b as Repo, d as Worktree } from '../worktree-CvakJ5w4.cjs';
|
|
21
21
|
import { c as Task } from '../task-Cw2N74jk.cjs';
|
|
22
22
|
import { d as User } from '../user-D8Z4aURB.cjs';
|
|
23
23
|
import { S as SessionStatus, A as AgenticToolName, f as Session, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from '../session-DmaExlXI.cjs';
|
package/dist/core/db/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { a as BoardEntityObject, e as Board, d as BoardObject, f as BoardExportB
|
|
|
17
17
|
import { c as GatewayChannel, G as GatewayChannelID, d as ThreadSessionMap, a as ThreadStatus, T as ThreadSessionMapID } from '../gateway-BlmPS6ee.js';
|
|
18
18
|
import { i as MCPServer, C as CreateMCPServerInput, U as UpdateMCPServerInput, j as MCPServerFilters, M as MCPServerID, S as SessionMCPServer } from '../mcp-Db0cL7Xc.js';
|
|
19
19
|
import { i as Message } from '../message-C9XTt2nM.js';
|
|
20
|
-
import { b as Repo, d as Worktree } from '../worktree-
|
|
20
|
+
import { b as Repo, d as Worktree } from '../worktree-Dr_m10w8.js';
|
|
21
21
|
import { c as Task } from '../task-C2jNGWSt.js';
|
|
22
22
|
import { d as User } from '../user-BpflK7uR.js';
|
|
23
23
|
import { S as SessionStatus, A as AgenticToolName, f as Session, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from '../session-0b_yCNQr.js';
|
package/dist/core/db/index.js
CHANGED
|
@@ -4824,12 +4824,9 @@ var SessionRepository = class {
|
|
|
4824
4824
|
const current = this.rowToSession(currentRow, boardId, boardSlug, baseUrl);
|
|
4825
4825
|
const merged = deepMerge(current, updates);
|
|
4826
4826
|
const insertData = this.sessionToInsert(merged);
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
ready_for_prompt: insertData.ready_for_prompt,
|
|
4831
|
-
data: insertData.data
|
|
4832
|
-
}).where(eq9(sessions3.session_id, fullId)).run();
|
|
4827
|
+
insertData.updated_at = /* @__PURE__ */ new Date();
|
|
4828
|
+
await update(tx, sessions3).set(insertData).where(eq9(sessions3.session_id, fullId)).run();
|
|
4829
|
+
merged.last_updated = insertData.updated_at.toISOString();
|
|
4833
4830
|
return merged;
|
|
4834
4831
|
});
|
|
4835
4832
|
return result;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Session } from './session-DmaExlXI.cjs';
|
|
2
|
-
import { d as Worktree } from './worktree-
|
|
2
|
+
import { d as Worktree } from './worktree-CvakJ5w4.cjs';
|
|
3
3
|
import { Params, HookContext as HookContext$1, Paginated } from '@feathersjs/feathers';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -15,6 +15,8 @@ interface AuthenticatedUser {
|
|
|
15
15
|
email: string;
|
|
16
16
|
/** User role (for authorization) - always defined, defaults to 'member' */
|
|
17
17
|
role: string;
|
|
18
|
+
/** True for service accounts (executor) — bypasses RBAC checks */
|
|
19
|
+
_isServiceAccount?: boolean;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Extended params with authentication context
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Session } from './session-0b_yCNQr.js';
|
|
2
|
-
import { d as Worktree } from './worktree-
|
|
2
|
+
import { d as Worktree } from './worktree-Dr_m10w8.js';
|
|
3
3
|
import { Params, HookContext as HookContext$1, Paginated } from '@feathersjs/feathers';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -15,6 +15,8 @@ interface AuthenticatedUser {
|
|
|
15
15
|
email: string;
|
|
16
16
|
/** User role (for authorization) - always defined, defaults to 'member' */
|
|
17
17
|
role: string;
|
|
18
|
+
/** True for service accounts (executor) — bypasses RBAC checks */
|
|
19
|
+
_isServiceAccount?: boolean;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Extended params with authentication context
|
|
@@ -30,6 +30,7 @@ module.exports = __toCommonJS(gateway_exports);
|
|
|
30
30
|
// src/gateway/connectors/slack.ts
|
|
31
31
|
var import_socket_mode = require("@slack/socket-mode");
|
|
32
32
|
var import_web_api = require("@slack/web-api");
|
|
33
|
+
var import_slackify_markdown = require("slackify-markdown");
|
|
33
34
|
function parseThreadId(threadId) {
|
|
34
35
|
const lastHyphen = threadId.lastIndexOf("-");
|
|
35
36
|
if (lastHyphen === -1) {
|
|
@@ -52,7 +53,7 @@ function hasActiveMention(text, mentionPattern) {
|
|
|
52
53
|
return mentionPattern.test(stripped);
|
|
53
54
|
}
|
|
54
55
|
function markdownToMrkdwn(markdown) {
|
|
55
|
-
return
|
|
56
|
+
return (0, import_slackify_markdown.slackifyMarkdown)(markdown).trim();
|
|
56
57
|
}
|
|
57
58
|
var SlackConnector = class _SlackConnector {
|
|
58
59
|
channelType = "slack";
|
|
@@ -124,7 +125,7 @@ var SlackConnector = class _SlackConnector {
|
|
|
124
125
|
const result = await this.web.chat.postMessage({
|
|
125
126
|
channel,
|
|
126
127
|
thread_ts,
|
|
127
|
-
text:
|
|
128
|
+
text: req.text,
|
|
128
129
|
unfurl_links: false,
|
|
129
130
|
unfurl_media: false
|
|
130
131
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/gateway/connectors/slack.ts
|
|
2
2
|
import { SocketModeClient } from "@slack/socket-mode";
|
|
3
3
|
import { WebClient } from "@slack/web-api";
|
|
4
|
+
import { slackifyMarkdown } from "slackify-markdown";
|
|
4
5
|
function parseThreadId(threadId) {
|
|
5
6
|
const lastHyphen = threadId.lastIndexOf("-");
|
|
6
7
|
if (lastHyphen === -1) {
|
|
@@ -23,7 +24,7 @@ function hasActiveMention(text, mentionPattern) {
|
|
|
23
24
|
return mentionPattern.test(stripped);
|
|
24
25
|
}
|
|
25
26
|
function markdownToMrkdwn(markdown) {
|
|
26
|
-
return markdown
|
|
27
|
+
return slackifyMarkdown(markdown).trim();
|
|
27
28
|
}
|
|
28
29
|
var SlackConnector = class _SlackConnector {
|
|
29
30
|
channelType = "slack";
|
|
@@ -95,7 +96,7 @@ var SlackConnector = class _SlackConnector {
|
|
|
95
96
|
const result = await this.web.chat.postMessage({
|
|
96
97
|
channel,
|
|
97
98
|
thread_ts,
|
|
98
|
-
text:
|
|
99
|
+
text: req.text,
|
|
99
100
|
unfurl_links: false,
|
|
100
101
|
unfurl_media: false
|
|
101
102
|
});
|
package/dist/core/git/index.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(git_exports, {
|
|
|
33
33
|
cleanWorktree: () => cleanWorktree,
|
|
34
34
|
cloneRepo: () => cloneRepo,
|
|
35
35
|
createWorktree: () => createWorktree,
|
|
36
|
+
deleteBranch: () => deleteBranch,
|
|
36
37
|
deleteRepoDirectory: () => deleteRepoDirectory,
|
|
37
38
|
deleteWorktreeDirectory: () => deleteWorktreeDirectory,
|
|
38
39
|
extractRepoName: () => extractRepoName,
|
|
@@ -208,6 +209,9 @@ function createGit(baseDir, env) {
|
|
|
208
209
|
baseDir,
|
|
209
210
|
binary: gitBinary,
|
|
210
211
|
config,
|
|
212
|
+
unsafe: {
|
|
213
|
+
allowUnsafeSshCommand: true
|
|
214
|
+
},
|
|
211
215
|
spawnOptions: env ? {
|
|
212
216
|
env: { ...process.env, ...env }
|
|
213
217
|
// biome-ignore lint/suspicious/noExplicitAny: simple-git types don't expose env in spawnOptions
|
|
@@ -394,7 +398,29 @@ async function createWorktree(repoPath, worktreePath, ref, createBranch = false,
|
|
|
394
398
|
} else {
|
|
395
399
|
args.push(ref);
|
|
396
400
|
}
|
|
397
|
-
|
|
401
|
+
try {
|
|
402
|
+
await git.raw(["worktree", "add", ...args]);
|
|
403
|
+
} catch (error) {
|
|
404
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
405
|
+
if (createBranch && errorMessage.includes("already exists")) {
|
|
406
|
+
console.warn(
|
|
407
|
+
`\u26A0\uFE0F Branch '${ref}' already exists. Checking if it's orphaned (stale from a deleted worktree)...`
|
|
408
|
+
);
|
|
409
|
+
const worktrees = await listWorktrees(repoPath);
|
|
410
|
+
const branchInUse = worktrees.some((wt) => wt.ref === ref);
|
|
411
|
+
if (branchInUse) {
|
|
412
|
+
throw new Error(
|
|
413
|
+
`A branch named '${ref}' already exists and is in use by another worktree. Please choose a different name.`
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
console.log(`\u{1F9F9} Deleting orphaned branch '${ref}' and retrying worktree creation...`);
|
|
417
|
+
await git.raw(["branch", "-D", ref]);
|
|
418
|
+
await git.raw(["worktree", "add", ...args]);
|
|
419
|
+
console.log(`\u2705 Successfully created worktree after cleaning up stale branch '${ref}'`);
|
|
420
|
+
} else {
|
|
421
|
+
throw error;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
398
424
|
try {
|
|
399
425
|
const worktreeGit = createGit(worktreePath, env);
|
|
400
426
|
await worktreeGit.addConfig("safe.directory", worktreePath, true, "global");
|
|
@@ -547,11 +573,25 @@ async function deleteWorktreeDirectory(worktreePath) {
|
|
|
547
573
|
}
|
|
548
574
|
await rm(resolvedWorktreePath, { recursive: true, force: true });
|
|
549
575
|
}
|
|
576
|
+
async function deleteBranch(repoPath, branchName) {
|
|
577
|
+
const git = createGit(repoPath);
|
|
578
|
+
try {
|
|
579
|
+
await git.raw(["branch", "-D", branchName]);
|
|
580
|
+
return true;
|
|
581
|
+
} catch (error) {
|
|
582
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
583
|
+
if (msg.includes("not found")) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
throw error;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
550
589
|
// Annotate the CommonJS export names for ESM import in node:
|
|
551
590
|
0 && (module.exports = {
|
|
552
591
|
cleanWorktree,
|
|
553
592
|
cloneRepo,
|
|
554
593
|
createWorktree,
|
|
594
|
+
deleteBranch,
|
|
555
595
|
deleteRepoDirectory,
|
|
556
596
|
deleteWorktreeDirectory,
|
|
557
597
|
extractRepoName,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { simpleGit } from 'simple-git';
|
|
2
|
-
export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-
|
|
3
|
-
import '../types-
|
|
2
|
+
export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-Dw2LXbKq.cjs';
|
|
3
|
+
import '../types-Cox7HmbB.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Git Utils for Agor
|
|
@@ -171,5 +171,16 @@ declare function deleteRepoDirectory(repoPath: string): Promise<void>;
|
|
|
171
171
|
* @throws Error if the path is not inside the configured worktrees directory (safety check)
|
|
172
172
|
*/
|
|
173
173
|
declare function deleteWorktreeDirectory(worktreePath: string): Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* Delete a local git branch
|
|
176
|
+
*
|
|
177
|
+
* Uses -D (force delete) to handle branches that haven't been merged.
|
|
178
|
+
* Silently succeeds if the branch doesn't exist.
|
|
179
|
+
*
|
|
180
|
+
* @param repoPath - Path to the repository
|
|
181
|
+
* @param branchName - Branch name to delete
|
|
182
|
+
* @returns true if branch was deleted, false if it didn't exist
|
|
183
|
+
*/
|
|
184
|
+
declare function deleteBranch(repoPath: string, branchName: string): Promise<boolean>;
|
|
174
185
|
|
|
175
|
-
export { type CloneOptions, type CloneProgress, type CloneResult, type WorktreeInfo, cleanWorktree, cloneRepo, createWorktree, deleteRepoDirectory, deleteWorktreeDirectory, extractRepoName, getCurrentBranch, getCurrentSha, getDefaultBranch, getGitState, getRemoteBranches, getRemoteUrl, hasRemoteBranch, isClean, isGitRepo, isValidGitRepo, listWorktrees, pruneWorktrees, removeWorktree };
|
|
186
|
+
export { type CloneOptions, type CloneProgress, type CloneResult, type WorktreeInfo, cleanWorktree, cloneRepo, createWorktree, deleteBranch, deleteRepoDirectory, deleteWorktreeDirectory, extractRepoName, getCurrentBranch, getCurrentSha, getDefaultBranch, getGitState, getRemoteBranches, getRemoteUrl, hasRemoteBranch, isClean, isGitRepo, isValidGitRepo, listWorktrees, pruneWorktrees, removeWorktree };
|
package/dist/core/git/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { simpleGit } from 'simple-git';
|
|
2
|
-
export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-
|
|
3
|
-
import '../types-
|
|
2
|
+
export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-BDJG7HPR.js';
|
|
3
|
+
import '../types-Cox7HmbB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Git Utils for Agor
|
|
@@ -171,5 +171,16 @@ declare function deleteRepoDirectory(repoPath: string): Promise<void>;
|
|
|
171
171
|
* @throws Error if the path is not inside the configured worktrees directory (safety check)
|
|
172
172
|
*/
|
|
173
173
|
declare function deleteWorktreeDirectory(worktreePath: string): Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* Delete a local git branch
|
|
176
|
+
*
|
|
177
|
+
* Uses -D (force delete) to handle branches that haven't been merged.
|
|
178
|
+
* Silently succeeds if the branch doesn't exist.
|
|
179
|
+
*
|
|
180
|
+
* @param repoPath - Path to the repository
|
|
181
|
+
* @param branchName - Branch name to delete
|
|
182
|
+
* @returns true if branch was deleted, false if it didn't exist
|
|
183
|
+
*/
|
|
184
|
+
declare function deleteBranch(repoPath: string, branchName: string): Promise<boolean>;
|
|
174
185
|
|
|
175
|
-
export { type CloneOptions, type CloneProgress, type CloneResult, type WorktreeInfo, cleanWorktree, cloneRepo, createWorktree, deleteRepoDirectory, deleteWorktreeDirectory, extractRepoName, getCurrentBranch, getCurrentSha, getDefaultBranch, getGitState, getRemoteBranches, getRemoteUrl, hasRemoteBranch, isClean, isGitRepo, isValidGitRepo, listWorktrees, pruneWorktrees, removeWorktree };
|
|
186
|
+
export { type CloneOptions, type CloneProgress, type CloneResult, type WorktreeInfo, cleanWorktree, cloneRepo, createWorktree, deleteBranch, deleteRepoDirectory, deleteWorktreeDirectory, extractRepoName, getCurrentBranch, getCurrentSha, getDefaultBranch, getGitState, getRemoteBranches, getRemoteUrl, hasRemoteBranch, isClean, isGitRepo, isValidGitRepo, listWorktrees, pruneWorktrees, removeWorktree };
|
package/dist/core/git/index.js
CHANGED
|
@@ -152,6 +152,9 @@ function createGit(baseDir, env) {
|
|
|
152
152
|
baseDir,
|
|
153
153
|
binary: gitBinary,
|
|
154
154
|
config,
|
|
155
|
+
unsafe: {
|
|
156
|
+
allowUnsafeSshCommand: true
|
|
157
|
+
},
|
|
155
158
|
spawnOptions: env ? {
|
|
156
159
|
env: { ...process.env, ...env }
|
|
157
160
|
// biome-ignore lint/suspicious/noExplicitAny: simple-git types don't expose env in spawnOptions
|
|
@@ -338,7 +341,29 @@ async function createWorktree(repoPath, worktreePath, ref, createBranch = false,
|
|
|
338
341
|
} else {
|
|
339
342
|
args.push(ref);
|
|
340
343
|
}
|
|
341
|
-
|
|
344
|
+
try {
|
|
345
|
+
await git.raw(["worktree", "add", ...args]);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
348
|
+
if (createBranch && errorMessage.includes("already exists")) {
|
|
349
|
+
console.warn(
|
|
350
|
+
`\u26A0\uFE0F Branch '${ref}' already exists. Checking if it's orphaned (stale from a deleted worktree)...`
|
|
351
|
+
);
|
|
352
|
+
const worktrees = await listWorktrees(repoPath);
|
|
353
|
+
const branchInUse = worktrees.some((wt) => wt.ref === ref);
|
|
354
|
+
if (branchInUse) {
|
|
355
|
+
throw new Error(
|
|
356
|
+
`A branch named '${ref}' already exists and is in use by another worktree. Please choose a different name.`
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
console.log(`\u{1F9F9} Deleting orphaned branch '${ref}' and retrying worktree creation...`);
|
|
360
|
+
await git.raw(["branch", "-D", ref]);
|
|
361
|
+
await git.raw(["worktree", "add", ...args]);
|
|
362
|
+
console.log(`\u2705 Successfully created worktree after cleaning up stale branch '${ref}'`);
|
|
363
|
+
} else {
|
|
364
|
+
throw error;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
342
367
|
try {
|
|
343
368
|
const worktreeGit = createGit(worktreePath, env);
|
|
344
369
|
await worktreeGit.addConfig("safe.directory", worktreePath, true, "global");
|
|
@@ -491,10 +516,24 @@ async function deleteWorktreeDirectory(worktreePath) {
|
|
|
491
516
|
}
|
|
492
517
|
await rm(resolvedWorktreePath, { recursive: true, force: true });
|
|
493
518
|
}
|
|
519
|
+
async function deleteBranch(repoPath, branchName) {
|
|
520
|
+
const git = createGit(repoPath);
|
|
521
|
+
try {
|
|
522
|
+
await git.raw(["branch", "-D", branchName]);
|
|
523
|
+
return true;
|
|
524
|
+
} catch (error) {
|
|
525
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
526
|
+
if (msg.includes("not found")) {
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
throw error;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
494
532
|
export {
|
|
495
533
|
cleanWorktree,
|
|
496
534
|
cloneRepo,
|
|
497
535
|
createWorktree,
|
|
536
|
+
deleteBranch,
|
|
498
537
|
deleteRepoDirectory,
|
|
499
538
|
deleteWorktreeDirectory,
|
|
500
539
|
extractRepoName,
|