@agimon-ai/doompi-task 0.0.1-alpha.9 → 0.0.1-alpha.90
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/README.md +123 -15
- package/dist/apiContracts.cjs +54 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +53 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +49 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/commands.cjs +4 -2
- package/dist/commands.d.mts +12 -6
- package/dist/commands.d.mts.map +1 -1
- package/dist/commands.mjs +2 -2
- package/dist/config-BPNE_wEU.cjs +173 -0
- package/dist/config-BPNE_wEU.cjs.map +1 -0
- package/dist/config-DmsCPDuF.mjs +72 -0
- package/dist/config-DmsCPDuF.mjs.map +1 -0
- package/dist/config.cjs +19 -2
- package/dist/config.d.mts +2 -38
- package/dist/config.mjs +2 -2
- package/dist/delegation-3hMdTFXF.cjs +661 -0
- package/dist/delegation-3hMdTFXF.cjs.map +1 -0
- package/dist/delegation-BiOy3_7g.mjs +7 -0
- package/dist/delegation-BiOy3_7g.mjs.map +1 -0
- package/dist/delegation-CkGbRaOl.mjs +626 -0
- package/dist/delegation-CkGbRaOl.mjs.map +1 -0
- package/dist/delegation-LDpHP2CC.cjs +12 -0
- package/dist/delegation-LDpHP2CC.cjs.map +1 -0
- package/dist/delegation-Ot2xltLi.d.mts +6 -0
- package/dist/delegation-Ot2xltLi.d.mts.map +1 -0
- package/dist/delegationManager.cjs +10 -0
- package/dist/delegationManager.d.mts +3 -0
- package/dist/delegationManager.mjs +3 -0
- package/dist/delegationPlatform-Cfn-Lqew.cjs +95 -0
- package/dist/delegationPlatform-Cfn-Lqew.cjs.map +1 -0
- package/dist/delegationPlatform-DZ4SZ8a5.mjs +64 -0
- package/dist/delegationPlatform-DZ4SZ8a5.mjs.map +1 -0
- package/dist/extensions/mcp-ui.mjs +23 -0
- package/dist/extensions/mcp-ui.mjs.map +1 -0
- package/dist/extensions/mcp.cjs +1876 -0
- package/dist/extensions/mcp.cjs.map +1 -0
- package/dist/extensions/mcp.d.mts +5 -0
- package/dist/extensions/mcp.d.mts.map +1 -0
- package/dist/extensions/mcp.mjs +1846 -0
- package/dist/extensions/mcp.mjs.map +1 -0
- package/dist/extensions/pi.cjs +437 -1
- package/dist/extensions/pi.cjs.map +1 -1
- package/dist/extensions/pi.d.mts +5 -2
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +432 -1
- package/dist/extensions/pi.mjs.map +1 -1
- package/dist/extensions/server.cjs +380 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +375 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/web.mjs +1013 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/format.cli-ChQsP1MQ.cjs +393 -0
- package/dist/format.cli-ChQsP1MQ.cjs.map +1 -0
- package/dist/format.cli-Cnc591eb.mjs +322 -0
- package/dist/format.cli-Cnc591eb.mjs.map +1 -0
- package/dist/{delegation/manager.d.cts → index-3-3ZJlaH.d.mts} +42 -39
- package/dist/index-3-3ZJlaH.d.mts.map +1 -0
- package/dist/{store/taskStore.d.cts → index-B7oVjSey.d.mts} +16 -23
- package/dist/index-B7oVjSey.d.mts.map +1 -0
- package/dist/{store/reconcile.d.cts → index-BNMm9g0K.d.mts} +4 -4
- package/dist/index-BNMm9g0K.d.mts.map +1 -0
- package/dist/{tool/responseEnvelope.d.cts → index-C3DgOhEm.d.mts} +17 -5
- package/dist/index-C3DgOhEm.d.mts.map +1 -0
- package/dist/{config.d.cts → index-D4goIk4Z.d.mts} +8 -3
- package/dist/index-D4goIk4Z.d.mts.map +1 -0
- package/dist/{store/reducer.d.mts → index-DIpc6_uJ.d.mts} +5 -5
- package/dist/index-DIpc6_uJ.d.mts.map +1 -0
- package/dist/{store/paths.d.cts → index-XY9VPmfm.d.mts} +9 -6
- package/dist/index-XY9VPmfm.d.mts.map +1 -0
- package/dist/index.cjs +106 -1
- package/dist/index.d.mts +16 -15
- package/dist/index.mjs +16 -1
- package/dist/invariants-DhjEjBPU.cjs +79 -0
- package/dist/invariants-DhjEjBPU.cjs.map +1 -0
- package/dist/invariants-q_UamF7D.mjs +62 -0
- package/dist/invariants-q_UamF7D.mjs.map +1 -0
- package/dist/logSinkTelemetry-C5QjZipw.mjs +41 -0
- package/dist/logSinkTelemetry-C5QjZipw.mjs.map +1 -0
- package/dist/logSinkTelemetry-CqiTuh3a.cjs +52 -0
- package/dist/logSinkTelemetry-CqiTuh3a.cjs.map +1 -0
- package/dist/logSinkTelemetry.cjs +6 -2
- package/dist/logSinkTelemetry.d.mts +7 -35
- package/dist/logSinkTelemetry.d.mts.map +1 -1
- package/dist/logSinkTelemetry.mjs +3 -2
- package/dist/paths-Bg8EEbk1.mjs +218 -0
- package/dist/paths-Bg8EEbk1.mjs.map +1 -0
- package/dist/paths-BsFVRulr.cjs +320 -0
- package/dist/paths-BsFVRulr.cjs.map +1 -0
- package/dist/processLiveness-Ccd9wenT.mjs +20 -0
- package/dist/processLiveness-Ccd9wenT.mjs.map +1 -0
- package/dist/processLiveness-umpNgsPR.cjs +25 -0
- package/dist/processLiveness-umpNgsPR.cjs.map +1 -0
- package/dist/promptGuidelines-DaxWrqud.d.mts +14 -0
- package/dist/promptGuidelines-DaxWrqud.d.mts.map +1 -0
- package/dist/promptGuidelines-g4QT8GNM.mjs +26 -0
- package/dist/promptGuidelines-g4QT8GNM.mjs.map +1 -0
- package/dist/promptGuidelines-j_SZTzlH.cjs +31 -0
- package/dist/promptGuidelines-j_SZTzlH.cjs.map +1 -0
- package/dist/reconcile-BcD-hTbd.mjs +63 -0
- package/dist/reconcile-BcD-hTbd.mjs.map +1 -0
- package/dist/reconcile-cRL0NjDr.cjs +80 -0
- package/dist/reconcile-cRL0NjDr.cjs.map +1 -0
- package/dist/reducer-BEfJFM5L.mjs +345 -0
- package/dist/reducer-BEfJFM5L.mjs.map +1 -0
- package/dist/reducer-BV0YIZ2o.cjs +380 -0
- package/dist/reducer-BV0YIZ2o.cjs.map +1 -0
- package/dist/root.cli-swHZqusx.d.mts +56 -0
- package/dist/root.cli-swHZqusx.d.mts.map +1 -0
- package/dist/selectors-BaS6dObz.mjs +142 -0
- package/dist/selectors-BaS6dObz.mjs.map +1 -0
- package/dist/{tui/selectors.d.cts → selectors-DPDPPjH3.d.mts} +11 -4
- package/dist/selectors-DPDPPjH3.d.mts.map +1 -0
- package/dist/selectors-b-69vb4W.cjs +189 -0
- package/dist/selectors-b-69vb4W.cjs.map +1 -0
- package/dist/storeInvariants.cjs +5 -0
- package/dist/storeInvariants.d.mts +23 -0
- package/dist/storeInvariants.d.mts.map +1 -0
- package/dist/storeInvariants.mjs +2 -0
- package/dist/storePaths.cjs +14 -0
- package/dist/storePaths.d.mts +2 -0
- package/dist/storePaths.mjs +2 -0
- package/dist/storeProcessLiveness.cjs +3 -0
- package/dist/{store/processLiveness.d.mts → storeProcessLiveness.d.mts} +3 -4
- package/dist/storeProcessLiveness.d.mts.map +1 -0
- package/dist/storeProcessLiveness.mjs +2 -0
- package/dist/storeReconcile.cjs +5 -0
- package/dist/storeReconcile.d.mts +2 -0
- package/dist/storeReconcile.mjs +2 -0
- package/dist/storeReducer.cjs +8 -0
- package/dist/storeReducer.d.mts +2 -0
- package/dist/storeReducer.mjs +2 -0
- package/dist/storeTaskGraph.cjs +7 -0
- package/dist/storeTaskGraph.d.mts +2 -0
- package/dist/storeTaskGraph.mjs +2 -0
- package/dist/storeTaskStore.cjs +3 -0
- package/dist/storeTaskStore.d.mts +2 -0
- package/dist/storeTaskStore.mjs +2 -0
- package/dist/storeTypes.cjs +6 -0
- package/dist/storeTypes.d.mts +2 -0
- package/dist/storeTypes.mjs +2 -0
- package/dist/task-B4aF5J9s.mjs +6 -0
- package/dist/task-B4aF5J9s.mjs.map +1 -0
- package/dist/task-CXF9VULl.cjs +49 -0
- package/dist/task-CXF9VULl.cjs.map +1 -0
- package/dist/task-CkFjC3Fo.d.mts +5 -0
- package/dist/task-CkFjC3Fo.d.mts.map +1 -0
- package/dist/{tool/schema.d.cts → task-DHSvdK6E.d.mts} +34 -18
- package/dist/task-DHSvdK6E.d.mts.map +1 -0
- package/dist/task-DKHKuems.mjs +116 -0
- package/dist/task-DKHKuems.mjs.map +1 -0
- package/dist/task-DaagqdPK.cjs +11 -0
- package/dist/task-DaagqdPK.cjs.map +1 -0
- package/dist/task-Dqy88_rr.cjs +193 -0
- package/dist/task-Dqy88_rr.cjs.map +1 -0
- package/dist/task-giCbpKzV.mjs +26 -0
- package/dist/task-giCbpKzV.mjs.map +1 -0
- package/dist/{store/types.d.mts → task-hLh4BOO7.d.mts} +37 -15
- package/dist/task-hLh4BOO7.d.mts.map +1 -0
- package/dist/task-space.cli-BH4Iy_7m.cjs +372 -0
- package/dist/task-space.cli-BH4Iy_7m.cjs.map +1 -0
- package/dist/task-space.cli-CMYNjgOW.mjs +355 -0
- package/dist/task-space.cli-CMYNjgOW.mjs.map +1 -0
- package/dist/task.cli-BM34E7GG.mjs +157 -0
- package/dist/task.cli-BM34E7GG.mjs.map +1 -0
- package/dist/task.cli-CiTkjUaX.cjs +174 -0
- package/dist/task.cli-CiTkjUaX.cjs.map +1 -0
- package/dist/taskGraph-BOQvT0-M.mjs +63 -0
- package/dist/taskGraph-BOQvT0-M.mjs.map +1 -0
- package/dist/taskGraph-BskRslrr.cjs +92 -0
- package/dist/taskGraph-BskRslrr.cjs.map +1 -0
- package/dist/{store/taskGraph.d.cts → taskGraph-YQXCfXTn.d.mts} +4 -4
- package/dist/taskGraph-YQXCfXTn.d.mts.map +1 -0
- package/dist/taskOverlay-B5wJHiml.cjs +175 -0
- package/dist/taskOverlay-B5wJHiml.cjs.map +1 -0
- package/dist/taskOverlay-CljDoTj_.mjs +164 -0
- package/dist/taskOverlay-CljDoTj_.mjs.map +1 -0
- package/dist/taskResult-D2G7b4w-.cjs +224 -0
- package/dist/taskResult-D2G7b4w-.cjs.map +1 -0
- package/dist/taskResult-edBAAKSH.mjs +165 -0
- package/dist/taskResult-edBAAKSH.mjs.map +1 -0
- package/dist/taskStore-CFx12KJk.mjs +213 -0
- package/dist/taskStore-CFx12KJk.mjs.map +1 -0
- package/dist/taskStore-T1pPy-UJ.cjs +220 -0
- package/dist/taskStore-T1pPy-UJ.cjs.map +1 -0
- package/dist/tasks.cli-8VvuN9YQ.cjs +40 -0
- package/dist/tasks.cli-8VvuN9YQ.cjs.map +1 -0
- package/dist/tasks.cli-BZj83YD_.mjs +29 -0
- package/dist/tasks.cli-BZj83YD_.mjs.map +1 -0
- package/dist/telemetry-DOyZLj8E.d.mts +36 -0
- package/dist/telemetry-DOyZLj8E.d.mts.map +1 -0
- package/dist/telemetry-I4md7Xzz.cjs +31 -0
- package/dist/telemetry-I4md7Xzz.cjs.map +1 -0
- package/dist/telemetry-PmX_1Y8a.mjs +26 -0
- package/dist/telemetry-PmX_1Y8a.mjs.map +1 -0
- package/dist/toolPromptGuidelines.cjs +3 -0
- package/dist/toolPromptGuidelines.d.mts +2 -0
- package/dist/toolPromptGuidelines.mjs +2 -0
- package/dist/toolResponseEnvelope.cjs +12 -0
- package/dist/toolResponseEnvelope.d.mts +2 -0
- package/dist/toolResponseEnvelope.mjs +2 -0
- package/dist/toolSchema.cjs +17 -0
- package/dist/toolSchema.d.mts +3 -0
- package/dist/toolSchema.mjs +3 -0
- package/dist/toolTaskTool.cjs +6 -0
- package/dist/toolTaskTool.d.mts +3 -0
- package/dist/toolTaskTool.mjs +3 -0
- package/dist/tuiFormat.cjs +14 -0
- package/dist/tuiFormat.d.mts +61 -0
- package/dist/tuiFormat.d.mts.map +1 -0
- package/dist/tuiFormat.mjs +2 -0
- package/dist/tuiSelectors.cjs +10 -0
- package/dist/tuiSelectors.d.mts +2 -0
- package/dist/tuiSelectors.mjs +2 -0
- package/dist/tuiTaskOverlay.cjs +4 -0
- package/dist/{tui/taskOverlay.d.cts → tuiTaskOverlay.d.mts} +9 -8
- package/dist/tuiTaskOverlay.d.mts.map +1 -0
- package/dist/tuiTaskOverlay.mjs +2 -0
- package/dist/tuiTaskSpace.cjs +5 -0
- package/dist/{tui/taskSpace.d.cts → tuiTaskSpace.d.mts} +11 -12
- package/dist/tuiTaskSpace.d.mts.map +1 -0
- package/dist/tuiTaskSpace.mjs +2 -0
- package/package.json +175 -109
- package/src/types/webTasks.ts +24 -0
- package/dist/_virtual/_rolldown/runtime.cjs +0 -1
- package/dist/commands.cjs.map +0 -1
- package/dist/commands.d.cts +0 -14
- package/dist/commands.d.cts.map +0 -1
- package/dist/commands.mjs.map +0 -1
- package/dist/config.cjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/config.mjs.map +0 -1
- package/dist/delegation/manager.cjs +0 -6
- package/dist/delegation/manager.cjs.map +0 -1
- package/dist/delegation/manager.d.cts.map +0 -1
- package/dist/delegation/manager.d.mts +0 -189
- package/dist/delegation/manager.d.mts.map +0 -1
- package/dist/delegation/manager.mjs +0 -6
- package/dist/delegation/manager.mjs.map +0 -1
- package/dist/extension.cjs +0 -3
- package/dist/extension.cjs.map +0 -1
- package/dist/extension.d.cts +0 -12
- package/dist/extension.d.cts.map +0 -1
- package/dist/extension.d.mts +0 -12
- package/dist/extension.d.mts.map +0 -1
- package/dist/extension.mjs +0 -3
- package/dist/extension.mjs.map +0 -1
- package/dist/extensions/doom.cjs +0 -2
- package/dist/extensions/doom.cjs.map +0 -1
- package/dist/extensions/doom.d.cts +0 -6
- package/dist/extensions/doom.d.cts.map +0 -1
- package/dist/extensions/doom.d.mts +0 -7
- package/dist/extensions/doom.d.mts.map +0 -1
- package/dist/extensions/doom.mjs +0 -2
- package/dist/extensions/doom.mjs.map +0 -1
- package/dist/extensions/pi.d.cts +0 -2
- package/dist/index.d.cts +0 -15
- package/dist/logSinkTelemetry.cjs.map +0 -1
- package/dist/logSinkTelemetry.d.cts +0 -51
- package/dist/logSinkTelemetry.d.cts.map +0 -1
- package/dist/logSinkTelemetry.mjs.map +0 -1
- package/dist/store/invariants.cjs +0 -2
- package/dist/store/invariants.cjs.map +0 -1
- package/dist/store/invariants.d.cts +0 -14
- package/dist/store/invariants.d.cts.map +0 -1
- package/dist/store/invariants.d.mts +0 -14
- package/dist/store/invariants.d.mts.map +0 -1
- package/dist/store/invariants.mjs +0 -2
- package/dist/store/invariants.mjs.map +0 -1
- package/dist/store/paths.cjs +0 -2
- package/dist/store/paths.cjs.map +0 -1
- package/dist/store/paths.d.cts.map +0 -1
- package/dist/store/paths.d.mts +0 -23
- package/dist/store/paths.d.mts.map +0 -1
- package/dist/store/paths.mjs +0 -2
- package/dist/store/paths.mjs.map +0 -1
- package/dist/store/processLiveness.cjs +0 -2
- package/dist/store/processLiveness.cjs.map +0 -1
- package/dist/store/processLiveness.d.cts +0 -12
- package/dist/store/processLiveness.d.cts.map +0 -1
- package/dist/store/processLiveness.d.mts.map +0 -1
- package/dist/store/processLiveness.mjs +0 -2
- package/dist/store/processLiveness.mjs.map +0 -1
- package/dist/store/reconcile.cjs +0 -2
- package/dist/store/reconcile.cjs.map +0 -1
- package/dist/store/reconcile.d.cts.map +0 -1
- package/dist/store/reconcile.d.mts +0 -34
- package/dist/store/reconcile.d.mts.map +0 -1
- package/dist/store/reconcile.mjs +0 -2
- package/dist/store/reconcile.mjs.map +0 -1
- package/dist/store/reducer.cjs +0 -3
- package/dist/store/reducer.cjs.map +0 -1
- package/dist/store/reducer.d.cts +0 -72
- package/dist/store/reducer.d.cts.map +0 -1
- package/dist/store/reducer.d.mts.map +0 -1
- package/dist/store/reducer.mjs +0 -3
- package/dist/store/reducer.mjs.map +0 -1
- package/dist/store/taskGraph.cjs +0 -2
- package/dist/store/taskGraph.cjs.map +0 -1
- package/dist/store/taskGraph.d.cts.map +0 -1
- package/dist/store/taskGraph.d.mts +0 -25
- package/dist/store/taskGraph.d.mts.map +0 -1
- package/dist/store/taskGraph.mjs +0 -2
- package/dist/store/taskGraph.mjs.map +0 -1
- package/dist/store/taskStore.cjs +0 -2
- package/dist/store/taskStore.cjs.map +0 -1
- package/dist/store/taskStore.d.cts.map +0 -1
- package/dist/store/taskStore.d.mts +0 -77
- package/dist/store/taskStore.d.mts.map +0 -1
- package/dist/store/taskStore.mjs +0 -2
- package/dist/store/taskStore.mjs.map +0 -1
- package/dist/store/types.cjs +0 -2
- package/dist/store/types.cjs.map +0 -1
- package/dist/store/types.d.cts +0 -165
- package/dist/store/types.d.cts.map +0 -1
- package/dist/store/types.d.mts.map +0 -1
- package/dist/store/types.mjs +0 -2
- package/dist/store/types.mjs.map +0 -1
- package/dist/tool/promptGuidelines.cjs +0 -2
- package/dist/tool/promptGuidelines.cjs.map +0 -1
- package/dist/tool/promptGuidelines.d.cts +0 -5
- package/dist/tool/promptGuidelines.d.cts.map +0 -1
- package/dist/tool/promptGuidelines.d.mts +0 -5
- package/dist/tool/promptGuidelines.d.mts.map +0 -1
- package/dist/tool/promptGuidelines.mjs +0 -2
- package/dist/tool/promptGuidelines.mjs.map +0 -1
- package/dist/tool/responseEnvelope.cjs +0 -6
- package/dist/tool/responseEnvelope.cjs.map +0 -1
- package/dist/tool/responseEnvelope.d.cts.map +0 -1
- package/dist/tool/responseEnvelope.d.mts +0 -39
- package/dist/tool/responseEnvelope.d.mts.map +0 -1
- package/dist/tool/responseEnvelope.mjs +0 -6
- package/dist/tool/responseEnvelope.mjs.map +0 -1
- package/dist/tool/schema.cjs +0 -2
- package/dist/tool/schema.cjs.map +0 -1
- package/dist/tool/schema.d.cts.map +0 -1
- package/dist/tool/schema.d.mts +0 -86
- package/dist/tool/schema.d.mts.map +0 -1
- package/dist/tool/schema.mjs +0 -2
- package/dist/tool/schema.mjs.map +0 -1
- package/dist/tool/taskTool.cjs +0 -3
- package/dist/tool/taskTool.cjs.map +0 -1
- package/dist/tool/taskTool.d.cts +0 -17
- package/dist/tool/taskTool.d.cts.map +0 -1
- package/dist/tool/taskTool.d.mts +0 -17
- package/dist/tool/taskTool.d.mts.map +0 -1
- package/dist/tool/taskTool.mjs +0 -3
- package/dist/tool/taskTool.mjs.map +0 -1
- package/dist/tui/format.cjs +0 -4
- package/dist/tui/format.cjs.map +0 -1
- package/dist/tui/format.d.cts +0 -62
- package/dist/tui/format.d.cts.map +0 -1
- package/dist/tui/format.d.mts +0 -62
- package/dist/tui/format.d.mts.map +0 -1
- package/dist/tui/format.mjs +0 -4
- package/dist/tui/format.mjs.map +0 -1
- package/dist/tui/selectors.cjs +0 -2
- package/dist/tui/selectors.cjs.map +0 -1
- package/dist/tui/selectors.d.cts.map +0 -1
- package/dist/tui/selectors.d.mts +0 -53
- package/dist/tui/selectors.d.mts.map +0 -1
- package/dist/tui/selectors.mjs +0 -2
- package/dist/tui/selectors.mjs.map +0 -1
- package/dist/tui/taskOverlay.cjs +0 -2
- package/dist/tui/taskOverlay.cjs.map +0 -1
- package/dist/tui/taskOverlay.d.cts.map +0 -1
- package/dist/tui/taskOverlay.d.mts +0 -38
- package/dist/tui/taskOverlay.d.mts.map +0 -1
- package/dist/tui/taskOverlay.mjs +0 -2
- package/dist/tui/taskOverlay.mjs.map +0 -1
- package/dist/tui/taskSpace.cjs +0 -5
- package/dist/tui/taskSpace.cjs.map +0 -1
- package/dist/tui/taskSpace.d.cts.map +0 -1
- package/dist/tui/taskSpace.d.mts +0 -61
- package/dist/tui/taskSpace.d.mts.map +0 -1
- package/dist/tui/taskSpace.mjs +0 -5
- package/dist/tui/taskSpace.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,35 +1,143 @@
|
|
|
1
1
|
# @agimon-ai/doompi-task
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Track persistent, dependency-aware tasks in Pi and optionally delegate them through DoomPi Team.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
compaction because the store is on disk rather than in the transcript.
|
|
5
|
+
Part of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi).
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Task owns task records and `tasks.json`. Team owns agents and runs. When both are loaded, Task delegates pending work through Team without merging their stored state.
|
|
8
|
+
|
|
9
|
+
> **Alpha:** task and delegation contracts may change between releases.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- Node.js 22.19.0 or newer
|
|
14
|
+
- Pi 0.85.0 and Pi TUI 0.85.0
|
|
11
15
|
|
|
12
16
|
## Install
|
|
13
17
|
|
|
18
|
+
Define a layer and select it in `.doom/modes.yaml`:
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
layers:
|
|
22
|
+
task:
|
|
23
|
+
packages: ['@agimon-ai/doompi-task']
|
|
24
|
+
|
|
25
|
+
majorMode:
|
|
26
|
+
minimal:
|
|
27
|
+
description: Lean mode with persistent tasks.
|
|
28
|
+
layers: [task]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For standalone Pi:
|
|
32
|
+
|
|
14
33
|
```bash
|
|
15
|
-
|
|
34
|
+
pi install npm:@agimon-ai/doompi-task
|
|
16
35
|
```
|
|
17
36
|
|
|
18
|
-
|
|
37
|
+
Task works without Team for local graph management. Add `@agimon-ai/doompi-team` to the same
|
|
38
|
+
selected mode when `assign` and `cancel` should launch or control subagents.
|
|
39
|
+
|
|
40
|
+
## Use the `task` tool
|
|
19
41
|
|
|
20
|
-
|
|
21
|
-
`.doom/modes.yaml`: making it optional would only create broken configurations.
|
|
42
|
+
Supported actions are:
|
|
22
43
|
|
|
23
|
-
|
|
44
|
+
| Action | Purpose |
|
|
45
|
+
| ------------- | ------------------------------------------------------------------ |
|
|
46
|
+
| `upsert` | Create tasks or update status, metadata, dependencies, and details |
|
|
47
|
+
| `list`, `get` | Read the graph or one task |
|
|
48
|
+
| `delete` | Tombstone a task |
|
|
49
|
+
| `clear` | Close and reset the graph after active delegations stop |
|
|
50
|
+
| `assign` | Delegate a pending, unblocked task through Team |
|
|
51
|
+
| `cancel` | Stop a delegated run and return its task to pending |
|
|
24
52
|
|
|
25
|
-
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"action": "upsert",
|
|
56
|
+
"tasks": [
|
|
57
|
+
{ "ref": "design", "subject": "Design the API" },
|
|
58
|
+
{
|
|
59
|
+
"subject": "Implement the API",
|
|
60
|
+
"blockedBy": ["design"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The reducer enforces lifecycle transitions and rejects dependency cycles. A graph allows 15
|
|
67
|
+
non-deleted tasks by default; updates still apply when full, but new tasks are rejected until space
|
|
68
|
+
is freed.
|
|
69
|
+
|
|
70
|
+
## TUI
|
|
71
|
+
|
|
72
|
+
Use `/tasks` or `SPC t l` to open the interactive task view. These surfaces require a TUI. The
|
|
73
|
+
`task` tool remains available in headless sessions.
|
|
74
|
+
|
|
75
|
+
## Storage and cleanup
|
|
76
|
+
|
|
77
|
+
The default session-tree store is:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
~/.pi/agent/doom-task/<session>/tasks.json
|
|
81
|
+
```
|
|
26
82
|
|
|
27
|
-
|
|
83
|
+
Task is authoritative across transcript compaction because the graph is file-backed. This does not
|
|
84
|
+
mean Task persists Team membership, intercom, or child-process state.
|
|
28
85
|
|
|
29
|
-
|
|
86
|
+
Defaults and overrides:
|
|
30
87
|
|
|
31
|
-
|
|
88
|
+
| Setting | Default | Purpose |
|
|
89
|
+
| --------------------------------- | -------------- | ------------------------------------------ |
|
|
90
|
+
| `DOOM_TASK_MAX_TASKS` | `15` | Maximum non-deleted tasks |
|
|
91
|
+
| `DOOM_TASK_STORE_TTL_MS` | 30 days | Retention for inactive session-tree stores |
|
|
92
|
+
| `DOOM_TASK_DELEGATION_TIMEOUT_MS` | 20 minutes | Delegated-run result timeout |
|
|
93
|
+
| `DOOM_TASK_STORE` | Unset | Override the complete store file path |
|
|
94
|
+
| `DOOM_TASK_COLLAPSE_KEY` | `ctrl+shift+t` | Override the task-view collapse key |
|
|
95
|
+
|
|
96
|
+
Startup reconciliation removes expired stores and repairs delegation records whose owning process
|
|
97
|
+
is no longer live.
|
|
98
|
+
|
|
99
|
+
## Task and Team together
|
|
100
|
+
|
|
101
|
+
Task uses Team's delegation service and records its lifecycle events on the task. It also contributes
|
|
102
|
+
pending assignments through `doom/background-work`. Team discovers the selected agent, applies
|
|
103
|
+
model and tool policy, owns the run, and returns completion or failure. If Team unloads or is
|
|
104
|
+
replaced, both connections are removed and rebound without leaving a process-global registration.
|
|
105
|
+
Intercom and Team membership remain Team state; `tasks.json` remains Task state.
|
|
106
|
+
|
|
107
|
+
## Public API
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
import { detectCycle, isBlocked, TaskStore } from '@agimon-ai/doompi-task';
|
|
111
|
+
import type { Task, TaskStatus } from '@agimon-ai/doompi-task';
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Focused subpaths include `/tool-schema`, `/store-reducer`, `/store-task-store`,
|
|
115
|
+
`/delegation-manager`, and `/tui-selectors`. Pi loads `/extensions/pi` through package metadata.
|
|
116
|
+
|
|
117
|
+
## Source layout
|
|
118
|
+
|
|
119
|
+
The host entries are generated from `src/extensions`. Pi and headless session roots hold each
|
|
120
|
+
session's store, delegation manager, startup work, service injection, and cleanup. Their tools,
|
|
121
|
+
commands, hooks, and resources register from files beside the roots. The global backend channel
|
|
122
|
+
publishes task graph updates. The session frontend owns the cockpit channel and Activity dock
|
|
123
|
+
section, plus Task Space, the terminal widget, and the task tool renderer. Shared task rules and
|
|
124
|
+
persistence stay in `src/services`; the published compatibility APIs remain in `src/exports`.
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
Run from this package directory in the workspace:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm build
|
|
132
|
+
pnpm typecheck
|
|
133
|
+
pnpm test
|
|
134
|
+
pnpm lint
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Maintained by [Agimon](https://agimon.ai/about).
|
|
32
138
|
|
|
33
139
|
## License
|
|
34
140
|
|
|
35
141
|
MIT
|
|
142
|
+
|
|
143
|
+
Named Pi and server factories live in `src/extensions`. Controllers declare commands, tools consume services, and `models` contains the durable task document types and graph. Services own persistence, delegation, and configuration. Public entries are flat files in `src/exports`, with flat package subpaths. Pi shutdown aborts the factory signal to fence pending session initialization immediately; idempotent `onStop` and `onDispose` cleanup awaits pending work before disposing the store and telemetry.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let _agimon_ai_doompi_core_apiContracts = require("@agimon-ai/doompi-core/apiContracts");
|
|
6
|
+
let typebox = require("typebox");
|
|
7
|
+
//#region src/schemas/apiContracts.ts
|
|
8
|
+
const S = typebox.Type.String();
|
|
9
|
+
const N = typebox.Type.Number();
|
|
10
|
+
const O = typebox.Type.Optional;
|
|
11
|
+
const literals = (values) => typebox.Type.Union(values.map((value) => typebox.Type.Literal(value)));
|
|
12
|
+
const TasksPayloadSchema = typebox.Type.Object({
|
|
13
|
+
tasks: typebox.Type.Array(typebox.Type.Object({
|
|
14
|
+
id: N,
|
|
15
|
+
subject: S,
|
|
16
|
+
description: O(S),
|
|
17
|
+
activeForm: O(S),
|
|
18
|
+
status: literals([
|
|
19
|
+
"pending",
|
|
20
|
+
"in_progress",
|
|
21
|
+
"completed",
|
|
22
|
+
"failed",
|
|
23
|
+
"deleted"
|
|
24
|
+
]),
|
|
25
|
+
blockedBy: typebox.Type.Array(N),
|
|
26
|
+
owner: O(S),
|
|
27
|
+
updatedAt: O(S),
|
|
28
|
+
delegation: O(typebox.Type.Object({
|
|
29
|
+
agent: O(S),
|
|
30
|
+
state: O(S)
|
|
31
|
+
}))
|
|
32
|
+
})),
|
|
33
|
+
rev: N
|
|
34
|
+
});
|
|
35
|
+
const apiContracts = (0, _agimon_ai_doompi_core_apiContracts.defineApiContract)({
|
|
36
|
+
version: 1,
|
|
37
|
+
http: [],
|
|
38
|
+
dynamic: [],
|
|
39
|
+
sockets: ["global", "workspace"].map((scope) => ({
|
|
40
|
+
id: "tasks.channel",
|
|
41
|
+
scope,
|
|
42
|
+
service: "doompi.hub.v1",
|
|
43
|
+
member: "task_graph",
|
|
44
|
+
kind: "channel",
|
|
45
|
+
direction: "server-to-client",
|
|
46
|
+
description: "Task graph channel payload.",
|
|
47
|
+
input: TasksPayloadSchema
|
|
48
|
+
}))
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.apiContracts = apiContracts;
|
|
52
|
+
exports.default = apiContracts;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=apiContracts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/doompi-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'doompi.hub.v1',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqBA,QAAAA,KAAK,OAAO;CAC5C,OAAOA,QAAAA,KAAK,MACVA,QAAAA,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAWA,QAAAA,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAEA,QAAAA,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,gBAAA,GAAeC,oCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
//#region src/schemas/apiContracts.d.ts
|
|
3
|
+
export declare const apiContracts: {
|
|
4
|
+
version: 1;
|
|
5
|
+
protocols?: Record<string, string> | undefined;
|
|
6
|
+
schemas?: Record<string, boolean | object> | undefined;
|
|
7
|
+
http: {
|
|
8
|
+
id: string;
|
|
9
|
+
scope: "global" | "session" | "workspace";
|
|
10
|
+
basePath?: string | undefined;
|
|
11
|
+
path: string;
|
|
12
|
+
method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
|
|
13
|
+
description: string;
|
|
14
|
+
availability?: string | undefined;
|
|
15
|
+
authentication: "device" | "none" | "owner";
|
|
16
|
+
parameters?: {
|
|
17
|
+
name: string;
|
|
18
|
+
in: "header" | "path" | "query";
|
|
19
|
+
required: boolean;
|
|
20
|
+
schema: boolean | object;
|
|
21
|
+
}[] | undefined;
|
|
22
|
+
body?: {
|
|
23
|
+
contentType: string;
|
|
24
|
+
contentTypes?: string[] | undefined;
|
|
25
|
+
required: boolean;
|
|
26
|
+
schema: boolean | object;
|
|
27
|
+
} | undefined;
|
|
28
|
+
responses: Record<string, {
|
|
29
|
+
description: string;
|
|
30
|
+
contentType?: string | undefined;
|
|
31
|
+
schema?: boolean | object | undefined;
|
|
32
|
+
events?: Record<string, boolean | object> | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
}[];
|
|
35
|
+
sockets: {
|
|
36
|
+
id: string;
|
|
37
|
+
scope: "global" | "session" | "workspace";
|
|
38
|
+
description: string;
|
|
39
|
+
availability?: string | undefined;
|
|
40
|
+
service: string;
|
|
41
|
+
member: string;
|
|
42
|
+
direction: "client-to-server" | "server-to-client";
|
|
43
|
+
kind: "channel" | "method" | "state";
|
|
44
|
+
input: boolean | object;
|
|
45
|
+
output?: boolean | object | undefined;
|
|
46
|
+
errors?: boolean | object | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
dynamic: string[];
|
|
49
|
+
gaps?: string[] | undefined;
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { apiContracts as default };
|
|
53
|
+
//# sourceMappingURL=apiContracts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBAuBa"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineApiContract } from "@agimon-ai/doompi-core/apiContracts";
|
|
2
|
+
import { Type } from "typebox";
|
|
3
|
+
//#region src/schemas/apiContracts.ts
|
|
4
|
+
const S = Type.String();
|
|
5
|
+
const N = Type.Number();
|
|
6
|
+
const O = Type.Optional;
|
|
7
|
+
const literals = (values) => Type.Union(values.map((value) => Type.Literal(value)));
|
|
8
|
+
const TasksPayloadSchema = Type.Object({
|
|
9
|
+
tasks: Type.Array(Type.Object({
|
|
10
|
+
id: N,
|
|
11
|
+
subject: S,
|
|
12
|
+
description: O(S),
|
|
13
|
+
activeForm: O(S),
|
|
14
|
+
status: literals([
|
|
15
|
+
"pending",
|
|
16
|
+
"in_progress",
|
|
17
|
+
"completed",
|
|
18
|
+
"failed",
|
|
19
|
+
"deleted"
|
|
20
|
+
]),
|
|
21
|
+
blockedBy: Type.Array(N),
|
|
22
|
+
owner: O(S),
|
|
23
|
+
updatedAt: O(S),
|
|
24
|
+
delegation: O(Type.Object({
|
|
25
|
+
agent: O(S),
|
|
26
|
+
state: O(S)
|
|
27
|
+
}))
|
|
28
|
+
})),
|
|
29
|
+
rev: N
|
|
30
|
+
});
|
|
31
|
+
const apiContracts = defineApiContract({
|
|
32
|
+
version: 1,
|
|
33
|
+
http: [],
|
|
34
|
+
dynamic: [],
|
|
35
|
+
sockets: ["global", "workspace"].map((scope) => ({
|
|
36
|
+
id: "tasks.channel",
|
|
37
|
+
scope,
|
|
38
|
+
service: "doompi.hub.v1",
|
|
39
|
+
member: "task_graph",
|
|
40
|
+
kind: "channel",
|
|
41
|
+
direction: "server-to-client",
|
|
42
|
+
description: "Task graph channel payload.",
|
|
43
|
+
input: TasksPayloadSchema
|
|
44
|
+
}))
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { apiContracts, apiContracts as default };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=apiContracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/doompi-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'doompi.hub.v1',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK;AACf,MAAM,YAA8B,WAAgB,KAAK,MAAM,OAAO,KAAK,UAAU,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqB,KAAK,OAAO;CAC5C,OAAO,KAAK,MACV,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAW,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAE,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
|
package/dist/commands.cjs
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_tasks_cli = require("./tasks.cli-8VvuN9YQ.cjs");
|
|
3
|
+
exports.createTasksCommand = require_tasks_cli.createTasksCommand;
|
|
4
|
+
exports.createTasksContribution = require_tasks_cli.createTasksContribution;
|
package/dist/commands.d.mts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { TaskStore } from "./
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { t as TaskStore } from "./index-B7oVjSey.mjs";
|
|
2
|
+
import { t as TaskPiScope } from "./root.cli-swHZqusx.mjs";
|
|
3
|
+
import { WithRoot } from "@agimon-ai/doompi-core/extensionFile";
|
|
4
|
+
import { PiPluginContext } from "@agimon-ai/doompi-core/piExtension";
|
|
5
|
+
import { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
//#region src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.d.ts
|
|
7
|
+
type OpenTaskSpace = (context: ExtensionContext, options: {
|
|
8
|
+
store: TaskStore;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export declare const createTasksContribution: (openTaskSpace: OpenTaskSpace) => (context: WithRoot<PiPluginContext, TaskPiScope>) => readonly [string, Omit<import("@earendil-works/pi-coding-agent").RegisteredCommand, "name" | "sourceInfo">];
|
|
4
11
|
/**
|
|
5
|
-
* `/tasks`, reachable from the leader palette as `SPC t
|
|
12
|
+
* `/tasks`, reachable from the leader palette as `SPC t l`.
|
|
6
13
|
*
|
|
7
14
|
* The command opens the Task Space overlay rather than printing a listing: the
|
|
8
15
|
* overlay is the readable surface and it can edit, while a transcript dump could
|
|
9
16
|
* only be read.
|
|
10
17
|
*/
|
|
11
|
-
declare function
|
|
18
|
+
export declare function createTasksCommand(store: TaskStore, openTaskSpace: OpenTaskSpace, waitUntilReady?: (context: ExtensionContext) => Promise<void>): readonly [string, Parameters<ExtensionAPI['registerCommand']>[1]];
|
|
12
19
|
//#endregion
|
|
13
|
-
export { registerTasksCommand };
|
|
14
20
|
//# sourceMappingURL=commands.d.mts.map
|
package/dist/commands.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.mts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"commands.d.mts","names":[],"sources":["../src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.ts"],"mappings":";;;;;;KAQK,iBAAiB,SAAS,kBAAkB;EAAW,OAAO;MAAgB;qBAEtE,0BAAuB,eAClB,mBAAa,SAAe,SAAS,iBAAiB,mCAAY,+CAAA;;;;;;;;wBAUpE,mBACd,OAAO,WACP,eAAe,eACf,kBAAkB,SAAS,qBAAqB,kCAC7B,WAAW"}
|
package/dist/commands.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
1
|
+
import { n as createTasksContribution, t as createTasksCommand } from "./tasks.cli-BZj83YD_.mjs";
|
|
2
|
+
export { createTasksCommand, createTasksContribution };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
//#region src/services/config/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Extension configuration, read from the environment.
|
|
4
|
+
*
|
|
5
|
+
* Env rather than a config file: doom-pi already carries per-launch state to Pi
|
|
6
|
+
* through env vars, so this keeps doom-task consistent with how the harness
|
|
7
|
+
* configures the rest of the extension set.
|
|
8
|
+
*/
|
|
9
|
+
const MAX_WIDGET_LINES_ENV = "DOOM_TASK_MAX_WIDGET_LINES";
|
|
10
|
+
const MAX_TASKS_ENV = "DOOM_TASK_MAX_TASKS";
|
|
11
|
+
const COLLAPSE_KEY_ENV = "DOOM_TASK_COLLAPSE_KEY";
|
|
12
|
+
const STORE_TTL_MS_ENV = "DOOM_TASK_STORE_TTL_MS";
|
|
13
|
+
const DELEGATION_TIMEOUT_MS_ENV = "DOOM_TASK_DELEGATION_TIMEOUT_MS";
|
|
14
|
+
const DEFAULT_MAX_WIDGET_LINES = 12;
|
|
15
|
+
const DEFAULT_MAX_TASKS = 15;
|
|
16
|
+
const DEFAULT_COLLAPSE_KEY = "ctrl+shift+t";
|
|
17
|
+
const DEFAULT_STORE_TTL_MS = 2592e6;
|
|
18
|
+
/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless
|
|
19
|
+
* session still gets the failure and a model turn before draining gives up. */
|
|
20
|
+
const DEFAULT_DELEGATION_TIMEOUT_MS = 12e5;
|
|
21
|
+
const COLLAPSE_KEY_OFF = "off";
|
|
22
|
+
const MIN_WIDGET_LINES = 3;
|
|
23
|
+
const MAX_WIDGET_LINES = 60;
|
|
24
|
+
function configRecord(value) {
|
|
25
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
26
|
+
}
|
|
27
|
+
/** Parse configuration only after the Pi host has applied its project-trust policy. */
|
|
28
|
+
function parsePiTaskConfig(value) {
|
|
29
|
+
const config = configRecord(value);
|
|
30
|
+
const maxWidgetLines = typeof config.maxWidgetLines === "number" && Number.isFinite(config.maxWidgetLines) ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES) : 12;
|
|
31
|
+
const maxTasks = typeof config.maxTasks === "number" && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0 ? config.maxTasks : 15;
|
|
32
|
+
const storeTtlMs = typeof config.storeTtlMs === "number" && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0 ? config.storeTtlMs : DEFAULT_STORE_TTL_MS;
|
|
33
|
+
const delegationTimeoutMs = typeof config.delegationTimeoutMs === "number" && Number.isFinite(config.delegationTimeoutMs) && config.delegationTimeoutMs > 0 ? config.delegationTimeoutMs : DEFAULT_DELEGATION_TIMEOUT_MS;
|
|
34
|
+
return {
|
|
35
|
+
maxWidgetLines,
|
|
36
|
+
maxTasks,
|
|
37
|
+
storeTtlMs,
|
|
38
|
+
collapseKey: typeof config.collapseKey === "string" && config.collapseKey.trim() ? config.collapseKey.trim().toLowerCase() === "off" ? "off" : config.collapseKey.trim() : DEFAULT_COLLAPSE_KEY,
|
|
39
|
+
delegationTimeoutMs
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Rows the overlay may use for content, clamped to a sane range. */
|
|
43
|
+
function getMaxWidgetLines(env = process.env) {
|
|
44
|
+
const raw = Number.parseInt(env["DOOM_TASK_MAX_WIDGET_LINES"] ?? "", 10);
|
|
45
|
+
if (!Number.isFinite(raw)) return 12;
|
|
46
|
+
return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);
|
|
47
|
+
}
|
|
48
|
+
/** Maximum number of non-deleted tasks retained on one board. */
|
|
49
|
+
function getMaxTasks(env = process.env) {
|
|
50
|
+
const raw = Number(env[MAX_TASKS_ENV]);
|
|
51
|
+
return Number.isSafeInteger(raw) && raw > 0 ? raw : 15;
|
|
52
|
+
}
|
|
53
|
+
/** Retention window for inactive session-tree stores. */
|
|
54
|
+
function getStoreTtlMs(env = process.env) {
|
|
55
|
+
const raw = Number(env[STORE_TTL_MS_ENV]);
|
|
56
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;
|
|
57
|
+
}
|
|
58
|
+
/** How long a delegated run may go without reporting a result. */
|
|
59
|
+
function getDelegationTimeoutMs(env = process.env) {
|
|
60
|
+
const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);
|
|
61
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;
|
|
62
|
+
}
|
|
63
|
+
/** Collapse shortcut, or the `off` sentinel when the user disabled it. */
|
|
64
|
+
function resolveCollapseKey(env = process.env) {
|
|
65
|
+
const configured = env[COLLAPSE_KEY_ENV]?.trim();
|
|
66
|
+
if (!configured) return DEFAULT_COLLAPSE_KEY;
|
|
67
|
+
return configured.toLowerCase() === "off" ? "off" : configured;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
Object.defineProperty(exports, "COLLAPSE_KEY_ENV", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function() {
|
|
73
|
+
return COLLAPSE_KEY_ENV;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "COLLAPSE_KEY_OFF", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function() {
|
|
79
|
+
return COLLAPSE_KEY_OFF;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "DEFAULT_COLLAPSE_KEY", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function() {
|
|
85
|
+
return DEFAULT_COLLAPSE_KEY;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "DEFAULT_DELEGATION_TIMEOUT_MS", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function() {
|
|
91
|
+
return DEFAULT_DELEGATION_TIMEOUT_MS;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "DEFAULT_MAX_TASKS", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function() {
|
|
97
|
+
return DEFAULT_MAX_TASKS;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "DEFAULT_MAX_WIDGET_LINES", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function() {
|
|
103
|
+
return DEFAULT_MAX_WIDGET_LINES;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "DEFAULT_STORE_TTL_MS", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function() {
|
|
109
|
+
return DEFAULT_STORE_TTL_MS;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "DELEGATION_TIMEOUT_MS_ENV", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function() {
|
|
115
|
+
return DELEGATION_TIMEOUT_MS_ENV;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, "MAX_TASKS_ENV", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function() {
|
|
121
|
+
return MAX_TASKS_ENV;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "MAX_WIDGET_LINES_ENV", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function() {
|
|
127
|
+
return MAX_WIDGET_LINES_ENV;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, "STORE_TTL_MS_ENV", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function() {
|
|
133
|
+
return STORE_TTL_MS_ENV;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "getDelegationTimeoutMs", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function() {
|
|
139
|
+
return getDelegationTimeoutMs;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
Object.defineProperty(exports, "getMaxTasks", {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function() {
|
|
145
|
+
return getMaxTasks;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "getMaxWidgetLines", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function() {
|
|
151
|
+
return getMaxWidgetLines;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(exports, "getStoreTtlMs", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function() {
|
|
157
|
+
return getStoreTtlMs;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "parsePiTaskConfig", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function() {
|
|
163
|
+
return parsePiTaskConfig;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
Object.defineProperty(exports, "resolveCollapseKey", {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function() {
|
|
169
|
+
return resolveCollapseKey;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
//# sourceMappingURL=config-BPNE_wEU.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-BPNE_wEU.cjs","names":[],"sources":["../src/services/config/index.ts"],"sourcesContent":["/**\n * Extension configuration, read from the environment.\n *\n * Env rather than a config file: doom-pi already carries per-launch state to Pi\n * through env vars, so this keeps doom-task consistent with how the harness\n * configures the rest of the extension set.\n */\n\nexport const MAX_WIDGET_LINES_ENV = 'DOOM_TASK_MAX_WIDGET_LINES';\nexport const MAX_TASKS_ENV = 'DOOM_TASK_MAX_TASKS';\nexport const COLLAPSE_KEY_ENV = 'DOOM_TASK_COLLAPSE_KEY';\nexport const STORE_TTL_MS_ENV = 'DOOM_TASK_STORE_TTL_MS';\nexport const DELEGATION_TIMEOUT_MS_ENV = 'DOOM_TASK_DELEGATION_TIMEOUT_MS';\n\nexport const DEFAULT_MAX_WIDGET_LINES = 12;\nexport const DEFAULT_MAX_TASKS = 15;\nexport const DEFAULT_COLLAPSE_KEY = 'ctrl+shift+t';\nexport const DEFAULT_STORE_TTL_MS = 30 * 24 * 60 * 60 * 1000;\n/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless\n * session still gets the failure and a model turn before draining gives up. */\nexport const DEFAULT_DELEGATION_TIMEOUT_MS = 20 * 60 * 1000;\nexport const COLLAPSE_KEY_OFF = 'off';\n\nconst MIN_WIDGET_LINES = 3;\nconst MAX_WIDGET_LINES = 60;\n\nexport interface PiTaskConfig {\n maxWidgetLines: number;\n maxTasks: number;\n storeTtlMs: number;\n collapseKey: string;\n delegationTimeoutMs: number;\n}\n\nfunction configRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\n/** Parse configuration only after the Pi host has applied its project-trust policy. */\nexport function parsePiTaskConfig(value: unknown): PiTaskConfig {\n const config = configRecord(value);\n const maxWidgetLines =\n typeof config.maxWidgetLines === 'number' && Number.isFinite(config.maxWidgetLines)\n ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES)\n : DEFAULT_MAX_WIDGET_LINES;\n const maxTasks =\n typeof config.maxTasks === 'number' && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0\n ? config.maxTasks\n : DEFAULT_MAX_TASKS;\n const storeTtlMs =\n typeof config.storeTtlMs === 'number' && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0\n ? config.storeTtlMs\n : DEFAULT_STORE_TTL_MS;\n const delegationTimeoutMs =\n typeof config.delegationTimeoutMs === 'number' &&\n Number.isFinite(config.delegationTimeoutMs) &&\n config.delegationTimeoutMs > 0\n ? config.delegationTimeoutMs\n : DEFAULT_DELEGATION_TIMEOUT_MS;\n const collapseKey =\n typeof config.collapseKey === 'string' && config.collapseKey.trim()\n ? config.collapseKey.trim().toLowerCase() === COLLAPSE_KEY_OFF\n ? COLLAPSE_KEY_OFF\n : config.collapseKey.trim()\n : DEFAULT_COLLAPSE_KEY;\n\n return { maxWidgetLines, maxTasks, storeTtlMs, collapseKey, delegationTimeoutMs };\n}\n\n/** Rows the overlay may use for content, clamped to a sane range. */\nexport function getMaxWidgetLines(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number.parseInt(env[MAX_WIDGET_LINES_ENV] ?? '', 10);\n if (!Number.isFinite(raw)) return DEFAULT_MAX_WIDGET_LINES;\n return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);\n}\n\n/** Maximum number of non-deleted tasks retained on one board. */\nexport function getMaxTasks(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[MAX_TASKS_ENV]);\n return Number.isSafeInteger(raw) && raw > 0 ? raw : DEFAULT_MAX_TASKS;\n}\n\n/** Retention window for inactive session-tree stores. */\nexport function getStoreTtlMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[STORE_TTL_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;\n}\n\n/** How long a delegated run may go without reporting a result. */\nexport function getDelegationTimeoutMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;\n}\n\n/** Collapse shortcut, or the `off` sentinel when the user disabled it. */\nexport function resolveCollapseKey(env: NodeJS.ProcessEnv = process.env): string {\n const configured = env[COLLAPSE_KEY_ENV]?.trim();\n if (!configured) return DEFAULT_COLLAPSE_KEY;\n return configured.toLowerCase() === COLLAPSE_KEY_OFF ? COLLAPSE_KEY_OFF : configured;\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAC7B,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,4BAA4B;AAEzC,MAAa,2BAA2B;AACxC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;;;AAGpC,MAAa,gCAAgC;AAC7C,MAAa,mBAAmB;AAEhC,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAUzB,SAAS,aAAa,OAAyC;CAC7D,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,QAAoC,CAAC;AACtH;;AAGA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,iBACJ,OAAO,OAAO,mBAAmB,YAAY,OAAO,SAAS,OAAO,cAAc,IAC9E,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,gBAAgB,GAAG,gBAAgB,IAAA;CAElF,MAAM,WACJ,OAAO,OAAO,aAAa,YAAY,OAAO,cAAc,OAAO,QAAQ,KAAK,OAAO,WAAW,IAC9F,OAAO,WAAA;CAEb,MAAM,aACJ,OAAO,OAAO,eAAe,YAAY,OAAO,SAAS,OAAO,UAAU,KAAK,OAAO,aAAa,IAC/F,OAAO,aACP;CACN,MAAM,sBACJ,OAAO,OAAO,wBAAwB,YACtC,OAAO,SAAS,OAAO,mBAAmB,KAC1C,OAAO,sBAAsB,IACzB,OAAO,sBACP;CAQN,OAAO;EAAE;EAAgB;EAAU;EAAY,aAN7C,OAAO,OAAO,gBAAgB,YAAY,OAAO,YAAY,KAAK,IAC9D,OAAO,YAAY,KAAK,CAAC,CAAC,YAAY,MAAA,QAAA,QAEpC,OAAO,YAAY,KAAK,IAC1B;EAEsD;CAAoB;AAClF;;AAGA,SAAgB,kBAAkB,MAAyB,QAAQ,KAAa;CAC9E,MAAM,MAAM,OAAO,SAAS,IAAA,iCAA6B,IAAI,EAAE;CAC/D,IAAI,CAAC,OAAO,SAAS,GAAG,GAAG,OAAA;CAC3B,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,gBAAgB,GAAG,gBAAgB;AACnE;;AAGA,SAAgB,YAAY,MAAyB,QAAQ,KAAa;CACxE,MAAM,MAAM,OAAO,IAAI,cAAc;CACrC,OAAO,OAAO,cAAc,GAAG,KAAK,MAAM,IAAI,MAAA;AAChD;;AAGA,SAAgB,cAAc,MAAyB,QAAQ,KAAa;CAC1E,MAAM,MAAM,OAAO,IAAI,iBAAiB;CACxC,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,uBAAuB,MAAyB,QAAQ,KAAa;CACnF,MAAM,MAAM,OAAO,IAAI,0BAA0B;CACjD,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,mBAAmB,MAAyB,QAAQ,KAAa;CAC/E,MAAM,aAAa,IAAI,iBAAiB,EAAE,KAAK;CAC/C,IAAI,CAAC,YAAY,OAAO;CACxB,OAAO,WAAW,YAAY,MAAA,QAAA,QAA4C;AAC5E"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/services/config/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Extension configuration, read from the environment.
|
|
4
|
+
*
|
|
5
|
+
* Env rather than a config file: doom-pi already carries per-launch state to Pi
|
|
6
|
+
* through env vars, so this keeps doom-task consistent with how the harness
|
|
7
|
+
* configures the rest of the extension set.
|
|
8
|
+
*/
|
|
9
|
+
const MAX_WIDGET_LINES_ENV = "DOOM_TASK_MAX_WIDGET_LINES";
|
|
10
|
+
const MAX_TASKS_ENV = "DOOM_TASK_MAX_TASKS";
|
|
11
|
+
const COLLAPSE_KEY_ENV = "DOOM_TASK_COLLAPSE_KEY";
|
|
12
|
+
const STORE_TTL_MS_ENV = "DOOM_TASK_STORE_TTL_MS";
|
|
13
|
+
const DELEGATION_TIMEOUT_MS_ENV = "DOOM_TASK_DELEGATION_TIMEOUT_MS";
|
|
14
|
+
const DEFAULT_MAX_WIDGET_LINES = 12;
|
|
15
|
+
const DEFAULT_MAX_TASKS = 15;
|
|
16
|
+
const DEFAULT_COLLAPSE_KEY = "ctrl+shift+t";
|
|
17
|
+
const DEFAULT_STORE_TTL_MS = 2592e6;
|
|
18
|
+
/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless
|
|
19
|
+
* session still gets the failure and a model turn before draining gives up. */
|
|
20
|
+
const DEFAULT_DELEGATION_TIMEOUT_MS = 12e5;
|
|
21
|
+
const COLLAPSE_KEY_OFF = "off";
|
|
22
|
+
const MIN_WIDGET_LINES = 3;
|
|
23
|
+
const MAX_WIDGET_LINES = 60;
|
|
24
|
+
function configRecord(value) {
|
|
25
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
26
|
+
}
|
|
27
|
+
/** Parse configuration only after the Pi host has applied its project-trust policy. */
|
|
28
|
+
function parsePiTaskConfig(value) {
|
|
29
|
+
const config = configRecord(value);
|
|
30
|
+
const maxWidgetLines = typeof config.maxWidgetLines === "number" && Number.isFinite(config.maxWidgetLines) ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES) : 12;
|
|
31
|
+
const maxTasks = typeof config.maxTasks === "number" && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0 ? config.maxTasks : 15;
|
|
32
|
+
const storeTtlMs = typeof config.storeTtlMs === "number" && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0 ? config.storeTtlMs : DEFAULT_STORE_TTL_MS;
|
|
33
|
+
const delegationTimeoutMs = typeof config.delegationTimeoutMs === "number" && Number.isFinite(config.delegationTimeoutMs) && config.delegationTimeoutMs > 0 ? config.delegationTimeoutMs : DEFAULT_DELEGATION_TIMEOUT_MS;
|
|
34
|
+
return {
|
|
35
|
+
maxWidgetLines,
|
|
36
|
+
maxTasks,
|
|
37
|
+
storeTtlMs,
|
|
38
|
+
collapseKey: typeof config.collapseKey === "string" && config.collapseKey.trim() ? config.collapseKey.trim().toLowerCase() === "off" ? "off" : config.collapseKey.trim() : DEFAULT_COLLAPSE_KEY,
|
|
39
|
+
delegationTimeoutMs
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Rows the overlay may use for content, clamped to a sane range. */
|
|
43
|
+
function getMaxWidgetLines(env = process.env) {
|
|
44
|
+
const raw = Number.parseInt(env["DOOM_TASK_MAX_WIDGET_LINES"] ?? "", 10);
|
|
45
|
+
if (!Number.isFinite(raw)) return 12;
|
|
46
|
+
return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);
|
|
47
|
+
}
|
|
48
|
+
/** Maximum number of non-deleted tasks retained on one board. */
|
|
49
|
+
function getMaxTasks(env = process.env) {
|
|
50
|
+
const raw = Number(env[MAX_TASKS_ENV]);
|
|
51
|
+
return Number.isSafeInteger(raw) && raw > 0 ? raw : 15;
|
|
52
|
+
}
|
|
53
|
+
/** Retention window for inactive session-tree stores. */
|
|
54
|
+
function getStoreTtlMs(env = process.env) {
|
|
55
|
+
const raw = Number(env[STORE_TTL_MS_ENV]);
|
|
56
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;
|
|
57
|
+
}
|
|
58
|
+
/** How long a delegated run may go without reporting a result. */
|
|
59
|
+
function getDelegationTimeoutMs(env = process.env) {
|
|
60
|
+
const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);
|
|
61
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;
|
|
62
|
+
}
|
|
63
|
+
/** Collapse shortcut, or the `off` sentinel when the user disabled it. */
|
|
64
|
+
function resolveCollapseKey(env = process.env) {
|
|
65
|
+
const configured = env[COLLAPSE_KEY_ENV]?.trim();
|
|
66
|
+
if (!configured) return DEFAULT_COLLAPSE_KEY;
|
|
67
|
+
return configured.toLowerCase() === "off" ? "off" : configured;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { resolveCollapseKey as _, DEFAULT_MAX_TASKS as a, DELEGATION_TIMEOUT_MS_ENV as c, STORE_TTL_MS_ENV as d, getDelegationTimeoutMs as f, parsePiTaskConfig as g, getStoreTtlMs as h, DEFAULT_DELEGATION_TIMEOUT_MS as i, MAX_TASKS_ENV as l, getMaxWidgetLines as m, COLLAPSE_KEY_OFF as n, DEFAULT_MAX_WIDGET_LINES as o, getMaxTasks as p, DEFAULT_COLLAPSE_KEY as r, DEFAULT_STORE_TTL_MS as s, COLLAPSE_KEY_ENV as t, MAX_WIDGET_LINES_ENV as u };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=config-DmsCPDuF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-DmsCPDuF.mjs","names":[],"sources":["../src/services/config/index.ts"],"sourcesContent":["/**\n * Extension configuration, read from the environment.\n *\n * Env rather than a config file: doom-pi already carries per-launch state to Pi\n * through env vars, so this keeps doom-task consistent with how the harness\n * configures the rest of the extension set.\n */\n\nexport const MAX_WIDGET_LINES_ENV = 'DOOM_TASK_MAX_WIDGET_LINES';\nexport const MAX_TASKS_ENV = 'DOOM_TASK_MAX_TASKS';\nexport const COLLAPSE_KEY_ENV = 'DOOM_TASK_COLLAPSE_KEY';\nexport const STORE_TTL_MS_ENV = 'DOOM_TASK_STORE_TTL_MS';\nexport const DELEGATION_TIMEOUT_MS_ENV = 'DOOM_TASK_DELEGATION_TIMEOUT_MS';\n\nexport const DEFAULT_MAX_WIDGET_LINES = 12;\nexport const DEFAULT_MAX_TASKS = 15;\nexport const DEFAULT_COLLAPSE_KEY = 'ctrl+shift+t';\nexport const DEFAULT_STORE_TTL_MS = 30 * 24 * 60 * 60 * 1000;\n/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless\n * session still gets the failure and a model turn before draining gives up. */\nexport const DEFAULT_DELEGATION_TIMEOUT_MS = 20 * 60 * 1000;\nexport const COLLAPSE_KEY_OFF = 'off';\n\nconst MIN_WIDGET_LINES = 3;\nconst MAX_WIDGET_LINES = 60;\n\nexport interface PiTaskConfig {\n maxWidgetLines: number;\n maxTasks: number;\n storeTtlMs: number;\n collapseKey: string;\n delegationTimeoutMs: number;\n}\n\nfunction configRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\n/** Parse configuration only after the Pi host has applied its project-trust policy. */\nexport function parsePiTaskConfig(value: unknown): PiTaskConfig {\n const config = configRecord(value);\n const maxWidgetLines =\n typeof config.maxWidgetLines === 'number' && Number.isFinite(config.maxWidgetLines)\n ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES)\n : DEFAULT_MAX_WIDGET_LINES;\n const maxTasks =\n typeof config.maxTasks === 'number' && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0\n ? config.maxTasks\n : DEFAULT_MAX_TASKS;\n const storeTtlMs =\n typeof config.storeTtlMs === 'number' && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0\n ? config.storeTtlMs\n : DEFAULT_STORE_TTL_MS;\n const delegationTimeoutMs =\n typeof config.delegationTimeoutMs === 'number' &&\n Number.isFinite(config.delegationTimeoutMs) &&\n config.delegationTimeoutMs > 0\n ? config.delegationTimeoutMs\n : DEFAULT_DELEGATION_TIMEOUT_MS;\n const collapseKey =\n typeof config.collapseKey === 'string' && config.collapseKey.trim()\n ? config.collapseKey.trim().toLowerCase() === COLLAPSE_KEY_OFF\n ? COLLAPSE_KEY_OFF\n : config.collapseKey.trim()\n : DEFAULT_COLLAPSE_KEY;\n\n return { maxWidgetLines, maxTasks, storeTtlMs, collapseKey, delegationTimeoutMs };\n}\n\n/** Rows the overlay may use for content, clamped to a sane range. */\nexport function getMaxWidgetLines(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number.parseInt(env[MAX_WIDGET_LINES_ENV] ?? '', 10);\n if (!Number.isFinite(raw)) return DEFAULT_MAX_WIDGET_LINES;\n return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);\n}\n\n/** Maximum number of non-deleted tasks retained on one board. */\nexport function getMaxTasks(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[MAX_TASKS_ENV]);\n return Number.isSafeInteger(raw) && raw > 0 ? raw : DEFAULT_MAX_TASKS;\n}\n\n/** Retention window for inactive session-tree stores. */\nexport function getStoreTtlMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[STORE_TTL_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;\n}\n\n/** How long a delegated run may go without reporting a result. */\nexport function getDelegationTimeoutMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;\n}\n\n/** Collapse shortcut, or the `off` sentinel when the user disabled it. */\nexport function resolveCollapseKey(env: NodeJS.ProcessEnv = process.env): string {\n const configured = env[COLLAPSE_KEY_ENV]?.trim();\n if (!configured) return DEFAULT_COLLAPSE_KEY;\n return configured.toLowerCase() === COLLAPSE_KEY_OFF ? COLLAPSE_KEY_OFF : configured;\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAC7B,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,4BAA4B;AAEzC,MAAa,2BAA2B;AACxC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;;;AAGpC,MAAa,gCAAgC;AAC7C,MAAa,mBAAmB;AAEhC,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAUzB,SAAS,aAAa,OAAyC;CAC7D,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,QAAoC,CAAC;AACtH;;AAGA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,iBACJ,OAAO,OAAO,mBAAmB,YAAY,OAAO,SAAS,OAAO,cAAc,IAC9E,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,gBAAgB,GAAG,gBAAgB,IAAA;CAElF,MAAM,WACJ,OAAO,OAAO,aAAa,YAAY,OAAO,cAAc,OAAO,QAAQ,KAAK,OAAO,WAAW,IAC9F,OAAO,WAAA;CAEb,MAAM,aACJ,OAAO,OAAO,eAAe,YAAY,OAAO,SAAS,OAAO,UAAU,KAAK,OAAO,aAAa,IAC/F,OAAO,aACP;CACN,MAAM,sBACJ,OAAO,OAAO,wBAAwB,YACtC,OAAO,SAAS,OAAO,mBAAmB,KAC1C,OAAO,sBAAsB,IACzB,OAAO,sBACP;CAQN,OAAO;EAAE;EAAgB;EAAU;EAAY,aAN7C,OAAO,OAAO,gBAAgB,YAAY,OAAO,YAAY,KAAK,IAC9D,OAAO,YAAY,KAAK,CAAC,CAAC,YAAY,MAAA,QAAA,QAEpC,OAAO,YAAY,KAAK,IAC1B;EAEsD;CAAoB;AAClF;;AAGA,SAAgB,kBAAkB,MAAyB,QAAQ,KAAa;CAC9E,MAAM,MAAM,OAAO,SAAS,IAAA,iCAA6B,IAAI,EAAE;CAC/D,IAAI,CAAC,OAAO,SAAS,GAAG,GAAG,OAAA;CAC3B,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,gBAAgB,GAAG,gBAAgB;AACnE;;AAGA,SAAgB,YAAY,MAAyB,QAAQ,KAAa;CACxE,MAAM,MAAM,OAAO,IAAI,cAAc;CACrC,OAAO,OAAO,cAAc,GAAG,KAAK,MAAM,IAAI,MAAA;AAChD;;AAGA,SAAgB,cAAc,MAAyB,QAAQ,KAAa;CAC1E,MAAM,MAAM,OAAO,IAAI,iBAAiB;CACxC,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,uBAAuB,MAAyB,QAAQ,KAAa;CACnF,MAAM,MAAM,OAAO,IAAI,0BAA0B;CACjD,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,mBAAmB,MAAyB,QAAQ,KAAa;CAC/E,MAAM,aAAa,IAAI,iBAAiB,EAAE,KAAK;CAC/C,IAAI,CAAC,YAAY,OAAO;CACxB,OAAO,WAAW,YAAY,MAAA,QAAA,QAA4C;AAC5E"}
|