@agimon-ai/doompi-task 0.0.1-alpha.0
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/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/commands.cjs +2 -0
- package/dist/commands.cjs.map +1 -0
- package/dist/commands.d.cts +14 -0
- package/dist/commands.d.cts.map +1 -0
- package/dist/commands.d.mts +14 -0
- package/dist/commands.d.mts.map +1 -0
- package/dist/commands.mjs +2 -0
- package/dist/commands.mjs.map +1 -0
- package/dist/config.cjs +2 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +38 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +38 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +2 -0
- package/dist/config.mjs.map +1 -0
- package/dist/delegation/manager.cjs +5 -0
- package/dist/delegation/manager.cjs.map +1 -0
- package/dist/delegation/manager.d.cts +189 -0
- package/dist/delegation/manager.d.cts.map +1 -0
- package/dist/delegation/manager.d.mts +189 -0
- package/dist/delegation/manager.d.mts.map +1 -0
- package/dist/delegation/manager.mjs +5 -0
- package/dist/delegation/manager.mjs.map +1 -0
- package/dist/extension.cjs +3 -0
- package/dist/extension.cjs.map +1 -0
- package/dist/extension.d.cts +12 -0
- package/dist/extension.d.cts.map +1 -0
- package/dist/extension.d.mts +12 -0
- package/dist/extension.d.mts.map +1 -0
- package/dist/extension.mjs +3 -0
- package/dist/extension.mjs.map +1 -0
- package/dist/extensions/doom.cjs +2 -0
- package/dist/extensions/doom.cjs.map +1 -0
- package/dist/extensions/doom.d.cts +6 -0
- package/dist/extensions/doom.d.cts.map +1 -0
- package/dist/extensions/doom.d.mts +7 -0
- package/dist/extensions/doom.d.mts.map +1 -0
- package/dist/extensions/doom.mjs +2 -0
- package/dist/extensions/doom.mjs.map +1 -0
- package/dist/extensions/pi.cjs +2 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +2 -0
- package/dist/extensions/pi.d.mts +2 -0
- package/dist/extensions/pi.mjs +2 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.mjs +1 -0
- package/dist/logSinkTelemetry.cjs +2 -0
- package/dist/logSinkTelemetry.cjs.map +1 -0
- package/dist/logSinkTelemetry.d.cts +51 -0
- package/dist/logSinkTelemetry.d.cts.map +1 -0
- package/dist/logSinkTelemetry.d.mts +51 -0
- package/dist/logSinkTelemetry.d.mts.map +1 -0
- package/dist/logSinkTelemetry.mjs +2 -0
- package/dist/logSinkTelemetry.mjs.map +1 -0
- package/dist/store/invariants.cjs +2 -0
- package/dist/store/invariants.cjs.map +1 -0
- package/dist/store/invariants.d.cts +14 -0
- package/dist/store/invariants.d.cts.map +1 -0
- package/dist/store/invariants.d.mts +14 -0
- package/dist/store/invariants.d.mts.map +1 -0
- package/dist/store/invariants.mjs +2 -0
- package/dist/store/invariants.mjs.map +1 -0
- package/dist/store/paths.cjs +2 -0
- package/dist/store/paths.cjs.map +1 -0
- package/dist/store/paths.d.cts +23 -0
- package/dist/store/paths.d.cts.map +1 -0
- package/dist/store/paths.d.mts +23 -0
- package/dist/store/paths.d.mts.map +1 -0
- package/dist/store/paths.mjs +2 -0
- package/dist/store/paths.mjs.map +1 -0
- package/dist/store/processLiveness.cjs +2 -0
- package/dist/store/processLiveness.cjs.map +1 -0
- package/dist/store/processLiveness.d.cts +12 -0
- package/dist/store/processLiveness.d.cts.map +1 -0
- package/dist/store/processLiveness.d.mts +12 -0
- package/dist/store/processLiveness.d.mts.map +1 -0
- package/dist/store/processLiveness.mjs +2 -0
- package/dist/store/processLiveness.mjs.map +1 -0
- package/dist/store/reconcile.cjs +2 -0
- package/dist/store/reconcile.cjs.map +1 -0
- package/dist/store/reconcile.d.cts +34 -0
- package/dist/store/reconcile.d.cts.map +1 -0
- package/dist/store/reconcile.d.mts +34 -0
- package/dist/store/reconcile.d.mts.map +1 -0
- package/dist/store/reconcile.mjs +2 -0
- package/dist/store/reconcile.mjs.map +1 -0
- package/dist/store/reducer.cjs +3 -0
- package/dist/store/reducer.cjs.map +1 -0
- package/dist/store/reducer.d.cts +72 -0
- package/dist/store/reducer.d.cts.map +1 -0
- package/dist/store/reducer.d.mts +72 -0
- package/dist/store/reducer.d.mts.map +1 -0
- package/dist/store/reducer.mjs +3 -0
- package/dist/store/reducer.mjs.map +1 -0
- package/dist/store/taskGraph.cjs +2 -0
- package/dist/store/taskGraph.cjs.map +1 -0
- package/dist/store/taskGraph.d.cts +25 -0
- package/dist/store/taskGraph.d.cts.map +1 -0
- package/dist/store/taskGraph.d.mts +25 -0
- package/dist/store/taskGraph.d.mts.map +1 -0
- package/dist/store/taskGraph.mjs +2 -0
- package/dist/store/taskGraph.mjs.map +1 -0
- package/dist/store/taskStore.cjs +2 -0
- package/dist/store/taskStore.cjs.map +1 -0
- package/dist/store/taskStore.d.cts +77 -0
- package/dist/store/taskStore.d.cts.map +1 -0
- package/dist/store/taskStore.d.mts +77 -0
- package/dist/store/taskStore.d.mts.map +1 -0
- package/dist/store/taskStore.mjs +2 -0
- package/dist/store/taskStore.mjs.map +1 -0
- package/dist/store/types.cjs +2 -0
- package/dist/store/types.cjs.map +1 -0
- package/dist/store/types.d.cts +165 -0
- package/dist/store/types.d.cts.map +1 -0
- package/dist/store/types.d.mts +165 -0
- package/dist/store/types.d.mts.map +1 -0
- package/dist/store/types.mjs +2 -0
- package/dist/store/types.mjs.map +1 -0
- package/dist/tool/promptGuidelines.cjs +2 -0
- package/dist/tool/promptGuidelines.cjs.map +1 -0
- package/dist/tool/promptGuidelines.d.cts +5 -0
- package/dist/tool/promptGuidelines.d.cts.map +1 -0
- package/dist/tool/promptGuidelines.d.mts +5 -0
- package/dist/tool/promptGuidelines.d.mts.map +1 -0
- package/dist/tool/promptGuidelines.mjs +2 -0
- package/dist/tool/promptGuidelines.mjs.map +1 -0
- package/dist/tool/responseEnvelope.cjs +6 -0
- package/dist/tool/responseEnvelope.cjs.map +1 -0
- package/dist/tool/responseEnvelope.d.cts +39 -0
- package/dist/tool/responseEnvelope.d.cts.map +1 -0
- package/dist/tool/responseEnvelope.d.mts +39 -0
- package/dist/tool/responseEnvelope.d.mts.map +1 -0
- package/dist/tool/responseEnvelope.mjs +6 -0
- package/dist/tool/responseEnvelope.mjs.map +1 -0
- package/dist/tool/schema.cjs +2 -0
- package/dist/tool/schema.cjs.map +1 -0
- package/dist/tool/schema.d.cts +86 -0
- package/dist/tool/schema.d.cts.map +1 -0
- package/dist/tool/schema.d.mts +86 -0
- package/dist/tool/schema.d.mts.map +1 -0
- package/dist/tool/schema.mjs +2 -0
- package/dist/tool/schema.mjs.map +1 -0
- package/dist/tool/taskTool.cjs +3 -0
- package/dist/tool/taskTool.cjs.map +1 -0
- package/dist/tool/taskTool.d.cts +17 -0
- package/dist/tool/taskTool.d.cts.map +1 -0
- package/dist/tool/taskTool.d.mts +17 -0
- package/dist/tool/taskTool.d.mts.map +1 -0
- package/dist/tool/taskTool.mjs +3 -0
- package/dist/tool/taskTool.mjs.map +1 -0
- package/dist/tui/format.cjs +4 -0
- package/dist/tui/format.cjs.map +1 -0
- package/dist/tui/format.d.cts +62 -0
- package/dist/tui/format.d.cts.map +1 -0
- package/dist/tui/format.d.mts +62 -0
- package/dist/tui/format.d.mts.map +1 -0
- package/dist/tui/format.mjs +4 -0
- package/dist/tui/format.mjs.map +1 -0
- package/dist/tui/selectors.cjs +2 -0
- package/dist/tui/selectors.cjs.map +1 -0
- package/dist/tui/selectors.d.cts +45 -0
- package/dist/tui/selectors.d.cts.map +1 -0
- package/dist/tui/selectors.d.mts +45 -0
- package/dist/tui/selectors.d.mts.map +1 -0
- package/dist/tui/selectors.mjs +2 -0
- package/dist/tui/selectors.mjs.map +1 -0
- package/dist/tui/taskOverlay.cjs +2 -0
- package/dist/tui/taskOverlay.cjs.map +1 -0
- package/dist/tui/taskOverlay.d.cts +38 -0
- package/dist/tui/taskOverlay.d.cts.map +1 -0
- package/dist/tui/taskOverlay.d.mts +38 -0
- package/dist/tui/taskOverlay.d.mts.map +1 -0
- package/dist/tui/taskOverlay.mjs +2 -0
- package/dist/tui/taskOverlay.mjs.map +1 -0
- package/dist/tui/taskSpace.cjs +5 -0
- package/dist/tui/taskSpace.cjs.map +1 -0
- package/dist/tui/taskSpace.d.cts +61 -0
- package/dist/tui/taskSpace.d.cts.map +1 -0
- package/dist/tui/taskSpace.d.mts +61 -0
- package/dist/tui/taskSpace.d.mts.map +1 -0
- package/dist/tui/taskSpace.mjs +5 -0
- package/dist/tui/taskSpace.mjs.map +1 -0
- package/package.json +185 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{isBlocked as e}from"../store/taskGraph.mjs";import{MSG_NO_TASKS as t,TASK_STATUSES as n}from"../tool/schema.mjs";import{applyTaskMutation as r,isCommittingOp as i,singleItemOutcome as a}from"../store/reducer.mjs";import{STATUS_LABEL as o,overlayStatusGlyph as s}from"./format.mjs";import{countTasks as c,visibleTasks as l}from"./selectors.mjs";import{matchesKey as u,truncateToWidth as d,visibleWidth as f}from"@earendil-works/pi-tui";import{homedir as p}from"node:os";import{DOOM_FULLSCREEN_UI_OPTIONS as m,DOOM_OVERLAY_ACCENT as h,DoomOverlay as g}from"@agimon-ai/doompi-ui/components/doomOverlay";const _=m.overlayOptions;function v(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return!0}return!1}function y(e,t){let n=p(),r=n&&e.startsWith(n)?`~${e.slice(n.length)}`:e;if(f(r)<=t)return r;let i=r.split(`/`),a=i.pop()??r;for(;i.length>0;){let e=`${i[i.length-1]}/${a}`;if(f(`…/${e}`)>t)break;a=e,i.pop()}return d(`…/${a}`,t,``)}const b=`none`,x=[[`↑↓`,`select`],[`enter`,`edit subject`],[`s`,`status`],[`esc`,`close`]];function S(e,t){let n=d(e,Math.max(0,t),`…`);return n+` `.repeat(Math.max(0,t-f(n)))}function C(e,t,n){let r=f(t),i=Math.max(0,n-r-1);return S(e,i)+` `.repeat(Math.max(1,n-i-r))+S(t,r)}function w(e,t){if(t<=0)return[];let n=[],r=``;for(let i of e.split(/\s+/).filter(Boolean))r.length===0?r=i:r.length+1+i.length<=t?r+=` ${i}`:(n.push(r),r=i);return r.length>0&&n.push(r),n}var T=class extends g{options;done;unwatch;mode=`browse`;selected=0;statusIndex=0;draft=``;notice;bodyHeight=1;constructor(e,t,n,r){super(e,t),this.options=n,this.done=r,this.unwatch=n.store.onExternalChange(()=>this.tui.requestRender())}tasks(){return l(this.options.store.snapshot.tasks)}selectedTask(){let e=this.tasks();if(e.length!==0)return e[Math.min(this.selected,e.length-1)]}move(e){let t=this.tasks();t.length!==0&&(this.selected=Math.max(0,Math.min(t.length-1,this.selected+e)),this.tui.requestRender())}commit(e){this.options.store.mutate(t=>{let n=r(t,`upsert`,{tasks:[e]});return i(n.op)?{document:n.document,value:n.op}:{value:n.op}}).then(e=>{let t=a(e.value);this.notice=t?.kind===`failed`?t.message:void 0,this.tui.requestRender()}).catch(e=>{this.notice=e instanceof Error?e.message:String(e),this.tui.requestRender()})}handleStatusInput(e){let t=this.selectedTask();u(e,`up`)?this.statusIndex=Math.max(0,this.statusIndex-1):u(e,`down`)?this.statusIndex=Math.min(n.length-1,this.statusIndex+1):e===`s`?this.statusIndex=(this.statusIndex+1)%n.length:e===`\r`||e===`
|
|
2
|
+
`?(this.mode=`browse`,t&&this.commit({id:t.id,status:n[this.statusIndex]})):u(e,`escape`)&&(this.mode=`browse`),this.tui.requestRender()}handleSubjectInput(e){let t=this.selectedTask();e===`\r`||e===`
|
|
3
|
+
`?(this.mode=`browse`,t&&this.commit({id:t.id,subject:this.draft})):u(e,`escape`)?this.mode=`browse`:e===``?this.draft=this.draft.slice(0,-1):v(e)||(this.draft+=e),this.tui.requestRender()}handleInput(e){if(this.mode===`status`)return this.handleStatusInput(e);if(this.mode===`subject`)return this.handleSubjectInput(e);if(u(e,`escape`)||u(e,`ctrl+c`)){this.done(void 0);return}if(u(e,`up`))return this.move(-1);if(u(e,`down`))return this.move(1);let t=this.selectedTask();if(t){if(e===`s`){this.mode=`status`,this.statusIndex=Math.max(0,n.indexOf(t.status)),this.tui.requestRender();return}(e===`\r`||e===`
|
|
4
|
+
`)&&(this.mode=`subject`,this.draft=t.subject,this.tui.requestRender())}}badge(e,t,n=`text`){return this.theme.bg(t,this.theme.fg(n,` ${e} `))}hintLine(e){return e.map(([e,t])=>`${this.badge(e,`selectedBg`)}${this.theme.fg(`dim`,` ${t}`)}`).join(this.theme.fg(`dim`,` `))}listLines(n){let r=this.tasks(),i=this.theme.bold(`TASKS`),a=Math.max(0,n-f(`TASKS`)-2),c=[`${i} ${this.theme.fg(`dim`,y(this.options.store.storePath,a))}`,``];if(r.length===0)return c.push(this.theme.fg(`dim`,t)),c;let l=Math.max(1,Math.floor((this.bodyHeight-c.length)/2)),u=Math.max(0,Math.min(this.selected-l+1,Math.max(0,r.length-l)));for(let[t,i]of r.slice(u,u+l).entries()){let a=u+t===Math.min(this.selected,r.length-1),l=a?this.theme.fg(`accent`,`›`):` `,d=a?this.theme.bold(i.subject):i.subject,f=s(i.status,this.theme),p=i.owner??i.delegation?.agent??b,m=i.status===`pending`&&e(this.options.store.snapshot.tasks,i)?this.theme.fg(`warning`,`blocked by ${(i.blockedBy??[]).map(e=>`#${e}`).join(`, `)}`):this.theme.fg(`dim`,o[i.status]),h=`${l} ${f} ${this.theme.fg(`dim`,`#${i.id}`)} ${d}`,g=`${` `.repeat(6)}${this.badge(p,`userMessageBg`,`muted`)} ${m}`,_=a?`selectedBg`:`userMessageBg`;for(let e of[h,g])c.push(this.theme.bg(_,S(e,n)))}return c}statusLines(e,t){if(this.mode!==`status`){let t=s(e.status,this.theme);return[this.theme.fg(`dim`,`STATUS`),`${t} ${o[e.status]}`]}let r=[this.theme.fg(`dim`,`STATUS s cycles · enter commits`)];for(let[i,a]of n.entries()){let n=i===this.statusIndex,o=n?this.theme.fg(`accent`,`▸`):` `,s=n?this.theme.bold(this.theme.fg(`accent`,a)):this.theme.fg(`muted`,a),c=a===e.status?this.theme.fg(`dim`,`current`):``,l=C(` ${o} ${s}`,c,t);r.push(this.theme.bg(n?`selectedBg`:`userMessageBg`,l))}return r}subjectField(e,t){let n=this.mode===`subject`,r=n?`${this.draft}█`:e.subject;return[this.theme.fg(`dim`,n?`SUBJECT enter commits · esc cancels`:`SUBJECT`),this.theme.bg(n?`selectedBg`:`userMessageBg`,S(` ${r}`,t))]}detailLines(e){let t=this.selectedTask();if(!t)return[this.theme.fg(`dim`,`No task selected`)];let n=this.mode===`subject`||this.mode===`status`?this.badge(`EDIT`,`toolSuccessBg`,`warning`):``,r=[C(this.theme.bold(this.theme.fg(`accent`,`TASK #${t.id}`)),n,e),``];r.push(...this.subjectField(t,e)),r.push(``,...this.statusLines(t,e),``),t.activeForm&&r.push(this.theme.fg(`dim`,`ACTIVE FORM`),t.activeForm,``);let i=t.owner??t.delegation?.agent??b,a=t.delegation?.runId?this.theme.fg(`success`,`delegated run ${t.delegation.runId}`):``;return r.push(this.theme.fg(`dim`,`OWNER`),a?`${i} ${this.theme.fg(`dim`,`·`)} ${a}`:i,``),r.push(this.theme.fg(`dim`,`BLOCKED BY`),t.blockedBy?.length?t.blockedBy.map(e=>`#${e}`).join(` · `):b),t.description&&r.push(``,this.theme.fg(`dim`,`DESCRIPTION`),...w(t.description,e)),this.notice&&r.push(``,this.theme.fg(`error`,this.notice)),r}headerSummary(){let e=c(this.options.store.snapshot.tasks),t=[`${e.completed}/${e.total} completed`];return e.inProgress>0&&t.push(`${e.inProgress} in progress`),e.blocked>0&&t.push(`${e.blocked} blocked`),e.failed>0&&t.push(`${e.failed} failed`),t.join(` · `)}getChrome(){return{title:`TASK SPACE`,accent:h,breadcrumb:`SPC › t › t / tasks`,headerRight:`${this.headerSummary()} · esc close`,footer:this.hintLine(x)}}renderBody(e,t){if(this.bodyHeight=t,e<48)return this.renderStacked(e,t);let n=Math.max(18,Math.floor((e-1)*.3333333333333333)),r=Math.max(1,e-n-1),i=Math.max(1,n-1),a=Math.max(1,r-1),o=this.listLines(i),s=this.detailLines(a),c=this.theme.fg(`borderMuted`,`│`);return Array.from({length:t},(t,n)=>{let r=`${S(o[n]??``,i)} ${c} ${S(s[n]??``,a)}`;return d(r,e,`…`)})}renderStacked(e,t){let n=Math.max(1,Math.floor((t-1)/2)),r=Math.max(0,t-n-1);this.bodyHeight=n;let i=this.listLines(e),a=this.detailLines(e);return[...i.slice(0,n),...Array.from({length:Math.max(0,n-i.length)},()=>``),this.theme.fg(`borderMuted`,`─`.repeat(e)),...a.slice(0,r)]}dispose(){this.unwatch()}};async function E(e,t){await e.ui.custom((e,n,r,i)=>new T(e,n,t,i),m)}export{_ as TASK_SPACE_OVERLAY_OPTIONS,T as TaskSpaceComponent,E as openTaskSpace};
|
|
5
|
+
//# sourceMappingURL=taskSpace.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskSpace.mjs","names":[],"sources":["../../src/tui/taskSpace.ts"],"sourcesContent":["/**\n * Task Space: the `SPC t t` overlay.\n *\n * The task list and detail pane render from plain values so the whole surface\n * can be asserted as text without a live terminal.\n *\n * The overlay reads the store on every render rather than caching rows, so an\n * external write by a delegated child shows up without closing the overlay.\n *\n * Every commit it makes is a single-entry `upsert` that carries the selected\n * task's id. That id is what keeps creating a task a tool-only path: an entry\n * without one would create rather than be rejected.\n */\n\nimport { homedir } from 'node:os';\nimport type { ExtensionContext, Theme } from '@earendil-works/pi-coding-agent';\nimport {\n DOOM_OVERLAY_ACCENT,\n DoomOverlay,\n type DoomOverlayChrome,\n type DoomOverlayTui,\n DOOM_FULLSCREEN_UI_OPTIONS,\n} from '@agimon-ai/doompi-ui/components/doomOverlay';\nimport { matchesKey, truncateToWidth, visibleWidth } from '@earendil-works/pi-tui';\nimport { applyTaskMutation, isCommittingOp, type Op, singleItemOutcome } from '../store/reducer.ts';\nimport { isBlocked } from '../store/taskGraph.ts';\nimport type { TaskStore } from '../store/taskStore.ts';\nimport type { Task, TaskItemMutation } from '../store/types.ts';\nimport { MSG_NO_TASKS, TASK_STATUSES } from '../tool/schema.ts';\nimport { overlayStatusGlyph, STATUS_LABEL } from './format.ts';\nimport { countTasks, visibleTasks } from './selectors.ts';\n\nexport const TASK_SPACE_OVERLAY_OPTIONS = DOOM_FULLSCREEN_UI_OPTIONS.overlayOptions;\n\nexport interface TaskSpaceOptions {\n store: TaskStore;\n}\n\ntype EditMode = 'browse' | 'status' | 'subject';\n\nconst KEY_BACKSPACE = '\\x7f';\nconst KEY_ENTER = '\\r';\nconst KEY_NEWLINE = '\\n';\nconst FIRST_PRINTABLE_CODE_POINT = 0x20;\nconst DELETE_CODE_POINT = 0x7f;\n\n/**\n * Keystrokes that carry no text: escape sequences, control keys, delete.\n * Indexed rather than iterated so surrogate pairs stay intact; both halves sit\n * far above the control range, so no emoji is ever mistaken for one.\n */\nfunction isControlInput(data: string): boolean {\n for (let index = 0; index < data.length; index++) {\n const code = data.charCodeAt(index);\n if (code < FIRST_PRINTABLE_CODE_POINT || code === DELETE_CODE_POINT) return true;\n }\n return false;\n}\n\n/**\n * Store path for the list heading: home collapses to `~`, and an over-long path\n * loses leading segments rather than its tail, because the file name identifies\n * the store while `/var/folders/...` does not.\n */\nfunction storeLabel(storePath: string, width: number): string {\n const home = homedir();\n const abbreviated = home && storePath.startsWith(home) ? `~${storePath.slice(home.length)}` : storePath;\n if (visibleWidth(abbreviated) <= width) return abbreviated;\n\n const segments = abbreviated.split('/');\n let tail = segments.pop() ?? abbreviated;\n while (segments.length > 0) {\n const candidate = `${segments[segments.length - 1]}/${tail}`;\n if (visibleWidth(`…/${candidate}`) > width) break;\n tail = candidate;\n segments.pop();\n }\n return truncateToWidth(`…/${tail}`, width, '');\n}\n\n/** Neither palette name is exported, so take both from the theme's methods. */\ntype ThemeBg = Parameters<Theme['bg']>[0];\ntype ThemeColor = Parameters<Theme['fg']>[0];\n\n/** Each task occupies a heading row and a metadata row beneath it. */\nconst ROWS_PER_TASK = 2;\n/** Hanging indent for the metadata row: clears marker, glyph and id. */\nconst META_INDENT = 6;\n\nconst MIN_WIDTH = 48;\n/** A third for the list, two thirds for the task being read or edited. */\nconst LIST_PANE_RATIO = 1 / 3;\n/** One blank column each side of the pane divider so neither column touches it. */\nconst PANE_GUTTER = 1;\nconst MIN_PANE_WIDTH = 18;\nconst SELECTION_MARKER = '›';\nconst CURRENT_MARKER = '▸';\nconst CURSOR_BLOCK = '█';\nconst ELLIPSIS = '…';\nconst NO_VALUE = 'none';\n\nconst TITLE = 'TASK SPACE';\nconst BREADCRUMB = 'SPC › t › t / tasks';\n/** Key/label pairs rendered as capped keys, matching the mockup's footer. */\nconst LIST_HINTS: readonly (readonly [string, string])[] = [\n ['↑↓', 'select'],\n ['enter', 'edit subject'],\n ['s', 'status'],\n ['esc', 'close'],\n];\nconst LIST_HEADER_RIGHT = 'esc close';\nconst STATUS_HINT = 'STATUS s cycles · enter commits';\nconst SUBJECT_HINT = 'SUBJECT enter commits · esc cancels';\nfunction fit(text: string, width: number): string {\n const clipped = truncateToWidth(text, Math.max(0, width), ELLIPSIS);\n return clipped + ' '.repeat(Math.max(0, width - visibleWidth(clipped)));\n}\n\nfunction rightAligned(left: string, right: string, width: number): string {\n const rightWidth = visibleWidth(right);\n const leftWidth = Math.max(0, width - rightWidth - 1);\n return fit(left, leftWidth) + ' '.repeat(Math.max(1, width - leftWidth - rightWidth)) + fit(right, rightWidth);\n}\n\nfunction wrap(text: string, width: number): string[] {\n if (width <= 0) return [];\n const lines: string[] = [];\n let current = '';\n for (const word of text.split(/\\s+/).filter(Boolean)) {\n if (current.length === 0) current = word;\n else if (current.length + 1 + word.length <= width) current += ` ${word}`;\n else {\n lines.push(current);\n current = word;\n }\n }\n if (current.length > 0) lines.push(current);\n return lines;\n}\n\n/**\n * Task Space overlay component.\n *\n * Rendering is pure: `render(width)` reads the live store and returns lines with\n * no side effects, so the fidelity job can capture it and unit tests can assert on it.\n */\nexport class TaskSpaceComponent extends DoomOverlay {\n private readonly options: TaskSpaceOptions;\n private readonly done: (result: undefined) => void;\n private readonly unwatch: () => void;\n\n private mode: EditMode = 'browse';\n private selected = 0;\n private statusIndex = 0;\n private draft = '';\n private notice: string | undefined;\n private bodyHeight = 1;\n\n constructor(tui: DoomOverlayTui, theme: Theme, options: TaskSpaceOptions, done: (result: undefined) => void) {\n super(tui, theme);\n this.options = options;\n this.done = done;\n this.unwatch = options.store.onExternalChange(() => this.tui.requestRender());\n }\n\n private tasks(): Task[] {\n return visibleTasks(this.options.store.snapshot.tasks);\n }\n\n private selectedTask(): Task | undefined {\n const tasks = this.tasks();\n if (tasks.length === 0) return undefined;\n return tasks[Math.min(this.selected, tasks.length - 1)];\n }\n\n private move(delta: number): void {\n const tasks = this.tasks();\n if (tasks.length === 0) return;\n this.selected = Math.max(0, Math.min(tasks.length - 1, this.selected + delta));\n this.tui.requestRender();\n }\n\n /** Commits through the same reducer the task tool uses, so both paths share every invariant. */\n private commit(item: TaskItemMutation): void {\n this.options.store\n .mutate<Op>((document) => {\n const result = applyTaskMutation(document, 'upsert', { tasks: [item] });\n // A rejected mutation must not reach the writer: committing it would\n // bump `rev` for an edit that never happened.\n if (!isCommittingOp(result.op)) return { value: result.op };\n return { document: result.document, value: result.op };\n })\n .then((outcome) => {\n // The reducer's message is unprefixed, so the notice reads\n // \"subject must not be blank\" rather than \"item[0] failed: ...\".\n const single = singleItemOutcome(outcome.value);\n this.notice = single?.kind === 'failed' ? single.message : undefined;\n this.tui.requestRender();\n })\n .catch((error: unknown) => {\n // Shown in the overlay rather than swallowed: a rejected write means the\n // edit the operator just made never landed.\n this.notice = error instanceof Error ? error.message : String(error);\n this.tui.requestRender();\n });\n }\n\n private handleStatusInput(data: string): void {\n const task = this.selectedTask();\n if (matchesKey(data, 'up')) this.statusIndex = Math.max(0, this.statusIndex - 1);\n else if (matchesKey(data, 'down')) this.statusIndex = Math.min(TASK_STATUSES.length - 1, this.statusIndex + 1);\n else if (data === 's') this.statusIndex = (this.statusIndex + 1) % TASK_STATUSES.length;\n else if (data === KEY_ENTER || data === KEY_NEWLINE) {\n this.mode = 'browse';\n if (task) this.commit({ id: task.id, status: TASK_STATUSES[this.statusIndex] });\n } else if (matchesKey(data, 'escape')) this.mode = 'browse';\n this.tui.requestRender();\n }\n\n private handleSubjectInput(data: string): void {\n const task = this.selectedTask();\n if (data === KEY_ENTER || data === KEY_NEWLINE) {\n this.mode = 'browse';\n if (task) this.commit({ id: task.id, subject: this.draft });\n } else if (matchesKey(data, 'escape')) this.mode = 'browse';\n else if (data === KEY_BACKSPACE) this.draft = this.draft.slice(0, -1);\n else if (!isControlInput(data)) this.draft += data;\n this.tui.requestRender();\n }\n\n handleInput(data: string): void {\n if (this.mode === 'status') return this.handleStatusInput(data);\n if (this.mode === 'subject') return this.handleSubjectInput(data);\n\n if (matchesKey(data, 'escape') || matchesKey(data, 'ctrl+c')) {\n this.done(undefined);\n return;\n }\n if (matchesKey(data, 'up')) return this.move(-1);\n if (matchesKey(data, 'down')) return this.move(1);\n\n const task = this.selectedTask();\n if (!task) return;\n if (data === 's') {\n this.mode = 'status';\n this.statusIndex = Math.max(0, TASK_STATUSES.indexOf(task.status));\n this.tui.requestRender();\n return;\n }\n if (data === KEY_ENTER || data === KEY_NEWLINE) {\n this.mode = 'subject';\n this.draft = task.subject;\n this.tui.requestRender();\n }\n }\n\n /**\n * A padded, background-filled chip. Foreground is applied inside the fill so\n * the colour closes with it, rather than a reset stripping the background\n * partway through the label.\n */\n private badge(text: string, background: ThemeBg, colour: ThemeColor = 'text'): string {\n return this.theme.bg(background, this.theme.fg(colour, ` ${text} `));\n }\n\n /** Footer hints as capped keys: `[ enter ] edit subject`, per the mockup. */\n private hintLine(hints: readonly (readonly [string, string])[]): string {\n return hints\n .map(([key, label]) => `${this.badge(key, 'selectedBg')}${this.theme.fg('dim', ` ${label}`)}`)\n .join(this.theme.fg('dim', ' '));\n }\n\n private listLines(width: number): string[] {\n const tasks = this.tasks();\n const label = this.theme.bold('TASKS');\n const pathWidth = Math.max(0, width - visibleWidth('TASKS') - 2);\n const lines = [`${label} ${this.theme.fg('dim', storeLabel(this.options.store.storePath, pathWidth))}`, ''];\n if (tasks.length === 0) {\n lines.push(this.theme.fg('dim', MSG_NO_TASKS));\n return lines;\n }\n\n // Two rows per task: at a third of the width a single row left the subject\n // with a handful of columns once owner and state took their share.\n const budget = Math.max(1, Math.floor((this.bodyHeight - lines.length) / ROWS_PER_TASK));\n const start = Math.max(0, Math.min(this.selected - budget + 1, Math.max(0, tasks.length - budget)));\n for (const [offset, task] of tasks.slice(start, start + budget).entries()) {\n const index = start + offset;\n const active = index === Math.min(this.selected, tasks.length - 1);\n const marker = active ? this.theme.fg('accent', SELECTION_MARKER) : ' ';\n const subject = active ? this.theme.bold(task.subject) : task.subject;\n const glyph = overlayStatusGlyph(task.status, this.theme);\n const owner = task.owner ?? task.delegation?.agent ?? NO_VALUE;\n const blocked = task.status === 'pending' && isBlocked(this.options.store.snapshot.tasks, task);\n const state = blocked\n ? this.theme.fg('warning', `blocked by ${(task.blockedBy ?? []).map((id) => `#${id}`).join(', ')}`)\n : this.theme.fg('dim', STATUS_LABEL[task.status]);\n // Subject owns the first row outright; the metadata hangs under it.\n const heading = `${marker} ${glyph} ${this.theme.fg('dim', `#${task.id}`)} ${subject}`;\n const meta = `${' '.repeat(META_INDENT)}${this.badge(owner, 'userMessageBg', 'muted')} ${state}`;\n // Every task sits on a band, the selected one a shade lighter, as in the\n // mockup; the marker stays so selection survives themes with no background.\n const background: ThemeBg = active ? 'selectedBg' : 'userMessageBg';\n for (const row of [heading, meta]) {\n lines.push(this.theme.bg(background, fit(row, width)));\n }\n }\n return lines;\n }\n\n private statusLines(task: Task, width: number): string[] {\n if (this.mode !== 'status') {\n const glyph = overlayStatusGlyph(task.status, this.theme);\n return [this.theme.fg('dim', 'STATUS'), `${glyph} ${STATUS_LABEL[task.status]}`];\n }\n // Editing draws the picker as a filled panel, so the whole option list reads\n // as one surface rather than five loose rows.\n const lines = [this.theme.fg('dim', STATUS_HINT)];\n for (const [index, status] of TASK_STATUSES.entries()) {\n const selected = index === this.statusIndex;\n const marker = selected ? this.theme.fg('accent', CURRENT_MARKER) : ' ';\n const label = selected ? this.theme.bold(this.theme.fg('accent', status)) : this.theme.fg('muted', status);\n const current = status === task.status ? this.theme.fg('dim', 'current') : '';\n const row = rightAligned(` ${marker} ${label}`, current, width);\n lines.push(this.theme.bg(selected ? 'selectedBg' : 'userMessageBg', row));\n }\n return lines;\n }\n\n /** The subject as an input: a filled field with a caret, as in the mockup. */\n private subjectField(task: Task, width: number): string[] {\n const editing = this.mode === 'subject';\n const value = editing ? `${this.draft}${CURSOR_BLOCK}` : task.subject;\n return [\n this.theme.fg('dim', editing ? SUBJECT_HINT : 'SUBJECT'),\n this.theme.bg(editing ? 'selectedBg' : 'userMessageBg', fit(` ${value}`, width)),\n ];\n }\n\n private detailLines(width: number): string[] {\n const task = this.selectedTask();\n if (!task) return [this.theme.fg('dim', 'No task selected')];\n\n const editing = this.mode === 'subject' || this.mode === 'status';\n const badge = editing ? this.badge('EDIT', 'toolSuccessBg', 'warning') : '';\n const lines = [rightAligned(this.theme.bold(this.theme.fg('accent', `TASK #${task.id}`)), badge, width), ''];\n lines.push(...this.subjectField(task, width));\n lines.push('', ...this.statusLines(task, width), '');\n\n if (task.activeForm) lines.push(this.theme.fg('dim', 'ACTIVE FORM'), task.activeForm, '');\n const owner = task.owner ?? task.delegation?.agent ?? NO_VALUE;\n const delegated = task.delegation?.runId ? this.theme.fg('success', `delegated run ${task.delegation.runId}`) : '';\n lines.push(\n this.theme.fg('dim', 'OWNER'),\n delegated ? `${owner} ${this.theme.fg('dim', '·')} ${delegated}` : owner,\n '',\n );\n lines.push(\n this.theme.fg('dim', 'BLOCKED BY'),\n task.blockedBy?.length ? task.blockedBy.map((id) => `#${id}`).join(' · ') : NO_VALUE,\n );\n if (task.description) lines.push('', this.theme.fg('dim', 'DESCRIPTION'), ...wrap(task.description, width));\n if (this.notice) lines.push('', this.theme.fg('error', this.notice));\n return lines;\n }\n\n private headerSummary(): string {\n const counts = countTasks(this.options.store.snapshot.tasks);\n const summary = [`${counts.completed}/${counts.total} completed`];\n if (counts.inProgress > 0) summary.push(`${counts.inProgress} in progress`);\n if (counts.blocked > 0) summary.push(`${counts.blocked} blocked`);\n if (counts.failed > 0) summary.push(`${counts.failed} failed`);\n return summary.join(' · ');\n }\n\n protected getChrome(): DoomOverlayChrome {\n return {\n title: TITLE,\n accent: DOOM_OVERLAY_ACCENT,\n breadcrumb: BREADCRUMB,\n headerRight: `${this.headerSummary()} · ${LIST_HEADER_RIGHT}`,\n footer: this.hintLine(LIST_HINTS),\n };\n }\n\n protected renderBody(width: number, height: number): string[] {\n this.bodyHeight = height;\n if (width < MIN_WIDTH) return this.renderStacked(width, height);\n\n const leftWidth = Math.max(MIN_PANE_WIDTH, Math.floor((width - 1) * LIST_PANE_RATIO));\n const rightWidth = Math.max(1, width - leftWidth - 1);\n // Each column gives up one column to the gutter, so content never abuts the\n // divider: a long store path used to run straight into the detail heading.\n const leftContent = Math.max(1, leftWidth - PANE_GUTTER);\n const rightContent = Math.max(1, rightWidth - PANE_GUTTER);\n const left = this.listLines(leftContent);\n const right = this.detailLines(rightContent);\n\n const divider = this.theme.fg('borderMuted', '│');\n return Array.from({ length: height }, (_, index) => {\n const row = `${fit(left[index] ?? '', leftContent)} ${divider} ${fit(right[index] ?? '', rightContent)}`;\n return truncateToWidth(row, width, ELLIPSIS);\n });\n }\n\n private renderStacked(width: number, height: number): string[] {\n const topHeight = Math.max(1, Math.floor((height - 1) / 2));\n const bottomHeight = Math.max(0, height - topHeight - 1);\n this.bodyHeight = topHeight;\n const top = this.listLines(width);\n const bottom = this.detailLines(width);\n return [\n ...top.slice(0, topHeight),\n ...Array.from({ length: Math.max(0, topHeight - top.length) }, () => ''),\n this.theme.fg('borderMuted', '─'.repeat(width)),\n ...bottom.slice(0, bottomHeight),\n ];\n }\n\n dispose(): void {\n this.unwatch();\n }\n}\n\nexport async function openTaskSpace(ctx: ExtensionContext, options: TaskSpaceOptions): Promise<void> {\n await ctx.ui.custom<undefined>(\n (tui, theme, _keybindings, done) => new TaskSpaceComponent(tui, theme, options, done),\n DOOM_FULLSCREEN_UI_OPTIONS,\n );\n}\n"],"mappings":"+lBAgCA,MAAa,EAA6B,EAA2B,eAmBrE,SAAS,EAAe,EAAuB,CAC7C,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAK,OAAQ,IAAS,CAChD,IAAM,EAAO,EAAK,WAAW,CAAK,EAClC,GAAI,EAAO,IAA8B,IAAS,IAAmB,MAAO,EAC9E,CACA,MAAO,EACT,CAOA,SAAS,EAAW,EAAmB,EAAuB,CAC5D,IAAM,EAAO,EAAQ,EACf,EAAc,GAAQ,EAAU,WAAW,CAAI,EAAI,IAAI,EAAU,MAAM,EAAK,MAAM,IAAM,EAC9F,GAAI,EAAa,CAAW,GAAK,EAAO,OAAO,EAE/C,IAAM,EAAW,EAAY,MAAM,GAAG,EAClC,EAAO,EAAS,IAAI,GAAK,EAC7B,KAAO,EAAS,OAAS,GAAG,CAC1B,IAAM,EAAY,GAAG,EAAS,EAAS,OAAS,GAAG,GAAG,IACtD,GAAI,EAAa,KAAK,GAAW,EAAI,EAAO,MAC5C,EAAO,EACP,EAAS,IAAI,CACf,CACA,OAAO,EAAgB,KAAK,IAAQ,EAAO,EAAE,CAC/C,CAOA,MAcM,EAAW,OAKX,EAAqD,CACzD,CAAC,KAAM,QAAQ,EACf,CAAC,QAAS,cAAc,EACxB,CAAC,IAAK,QAAQ,EACd,CAAC,MAAO,OAAO,CACjB,EAIA,SAAS,EAAI,EAAc,EAAuB,CAChD,IAAM,EAAU,EAAgB,EAAM,KAAK,IAAI,EAAG,CAAK,EAAG,GAAQ,EAClE,OAAO,EAAU,IAAI,OAAO,KAAK,IAAI,EAAG,EAAQ,EA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M,KAAK,UAAU,CAAK,EAC1B,EAAS,KAAK,YAAY,CAAK,EACrC,MAAO,CACL,GAAG,EAAI,MAAM,EAAG,CAAS,EACzB,GAAG,MAAM,KAAK,CAAE,OAAQ,KAAK,IAAI,EAAG,EAAY,EAAI,MAAM,CAAE,MAAS,EAAE,EACvE,KAAK,MAAM,GAAG,cAAe,IAAI,OAAO,CAAK,CAAC,EAC9C,GAAG,EAAO,MAAM,EAAG,CAAY,CACjC,CACF,CAEA,SAAgB,CACd,KAAK,QAAQ,CACf,CACF,EAEA,eAAsB,EAAc,EAAuB,EAA0C,CACnG,MAAM,EAAI,GAAG,QACV,EAAK,EAAO,EAAc,IAAS,IAAI,EAAmB,EAAK,EAAO,EAAS,CAAI,EACpF,CACF,CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agimon-ai/doompi-task",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "Pi task tracking extension with file-backed tasks and subagent delegation",
|
|
5
|
+
"homepage": "https://agimon.ai",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Vuong Ngo",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"package.json"
|
|
11
|
+
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"jsnext:main": "./dist/index.mjs",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"import": "./dist/index.mjs",
|
|
20
|
+
"require": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./commands": {
|
|
23
|
+
"types": "./dist/commands.d.mts",
|
|
24
|
+
"import": "./dist/commands.mjs",
|
|
25
|
+
"require": "./dist/commands.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./config": {
|
|
28
|
+
"types": "./dist/config.d.mts",
|
|
29
|
+
"import": "./dist/config.mjs",
|
|
30
|
+
"require": "./dist/config.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./delegation/manager": {
|
|
33
|
+
"types": "./dist/delegation/manager.d.mts",
|
|
34
|
+
"import": "./dist/delegation/manager.mjs",
|
|
35
|
+
"require": "./dist/delegation/manager.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./extension": {
|
|
38
|
+
"types": "./dist/extension.d.mts",
|
|
39
|
+
"import": "./dist/extension.mjs",
|
|
40
|
+
"require": "./dist/extension.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./extensions/pi": {
|
|
43
|
+
"types": "./dist/extensions/pi.d.mts",
|
|
44
|
+
"import": "./dist/extensions/pi.mjs",
|
|
45
|
+
"require": "./dist/extensions/pi.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./extensions/doom": {
|
|
48
|
+
"types": "./dist/extensions/doom.d.mts",
|
|
49
|
+
"import": "./dist/extensions/doom.mjs",
|
|
50
|
+
"require": "./dist/extensions/doom.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./logSinkTelemetry": {
|
|
53
|
+
"types": "./dist/logSinkTelemetry.d.mts",
|
|
54
|
+
"import": "./dist/logSinkTelemetry.mjs",
|
|
55
|
+
"require": "./dist/logSinkTelemetry.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./store/invariants": {
|
|
58
|
+
"types": "./dist/store/invariants.d.mts",
|
|
59
|
+
"import": "./dist/store/invariants.mjs",
|
|
60
|
+
"require": "./dist/store/invariants.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./store/paths": {
|
|
63
|
+
"types": "./dist/store/paths.d.mts",
|
|
64
|
+
"import": "./dist/store/paths.mjs",
|
|
65
|
+
"require": "./dist/store/paths.cjs"
|
|
66
|
+
},
|
|
67
|
+
"./store/processLiveness": {
|
|
68
|
+
"types": "./dist/store/processLiveness.d.mts",
|
|
69
|
+
"import": "./dist/store/processLiveness.mjs",
|
|
70
|
+
"require": "./dist/store/processLiveness.cjs"
|
|
71
|
+
},
|
|
72
|
+
"./store/reconcile": {
|
|
73
|
+
"types": "./dist/store/reconcile.d.mts",
|
|
74
|
+
"import": "./dist/store/reconcile.mjs",
|
|
75
|
+
"require": "./dist/store/reconcile.cjs"
|
|
76
|
+
},
|
|
77
|
+
"./store/reducer": {
|
|
78
|
+
"types": "./dist/store/reducer.d.mts",
|
|
79
|
+
"import": "./dist/store/reducer.mjs",
|
|
80
|
+
"require": "./dist/store/reducer.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./store/taskGraph": {
|
|
83
|
+
"types": "./dist/store/taskGraph.d.mts",
|
|
84
|
+
"import": "./dist/store/taskGraph.mjs",
|
|
85
|
+
"require": "./dist/store/taskGraph.cjs"
|
|
86
|
+
},
|
|
87
|
+
"./store/taskStore": {
|
|
88
|
+
"types": "./dist/store/taskStore.d.mts",
|
|
89
|
+
"import": "./dist/store/taskStore.mjs",
|
|
90
|
+
"require": "./dist/store/taskStore.cjs"
|
|
91
|
+
},
|
|
92
|
+
"./store/types": {
|
|
93
|
+
"types": "./dist/store/types.d.mts",
|
|
94
|
+
"import": "./dist/store/types.mjs",
|
|
95
|
+
"require": "./dist/store/types.cjs"
|
|
96
|
+
},
|
|
97
|
+
"./tool/promptGuidelines": {
|
|
98
|
+
"types": "./dist/tool/promptGuidelines.d.mts",
|
|
99
|
+
"import": "./dist/tool/promptGuidelines.mjs",
|
|
100
|
+
"require": "./dist/tool/promptGuidelines.cjs"
|
|
101
|
+
},
|
|
102
|
+
"./tool/responseEnvelope": {
|
|
103
|
+
"types": "./dist/tool/responseEnvelope.d.mts",
|
|
104
|
+
"import": "./dist/tool/responseEnvelope.mjs",
|
|
105
|
+
"require": "./dist/tool/responseEnvelope.cjs"
|
|
106
|
+
},
|
|
107
|
+
"./tool/schema": {
|
|
108
|
+
"types": "./dist/tool/schema.d.mts",
|
|
109
|
+
"import": "./dist/tool/schema.mjs",
|
|
110
|
+
"require": "./dist/tool/schema.cjs"
|
|
111
|
+
},
|
|
112
|
+
"./tool/taskTool": {
|
|
113
|
+
"types": "./dist/tool/taskTool.d.mts",
|
|
114
|
+
"import": "./dist/tool/taskTool.mjs",
|
|
115
|
+
"require": "./dist/tool/taskTool.cjs"
|
|
116
|
+
},
|
|
117
|
+
"./tui/format": {
|
|
118
|
+
"types": "./dist/tui/format.d.mts",
|
|
119
|
+
"import": "./dist/tui/format.mjs",
|
|
120
|
+
"require": "./dist/tui/format.cjs"
|
|
121
|
+
},
|
|
122
|
+
"./tui/selectors": {
|
|
123
|
+
"types": "./dist/tui/selectors.d.mts",
|
|
124
|
+
"import": "./dist/tui/selectors.mjs",
|
|
125
|
+
"require": "./dist/tui/selectors.cjs"
|
|
126
|
+
},
|
|
127
|
+
"./tui/taskOverlay": {
|
|
128
|
+
"types": "./dist/tui/taskOverlay.d.mts",
|
|
129
|
+
"import": "./dist/tui/taskOverlay.mjs",
|
|
130
|
+
"require": "./dist/tui/taskOverlay.cjs"
|
|
131
|
+
},
|
|
132
|
+
"./tui/taskSpace": {
|
|
133
|
+
"types": "./dist/tui/taskSpace.d.mts",
|
|
134
|
+
"import": "./dist/tui/taskSpace.mjs",
|
|
135
|
+
"require": "./dist/tui/taskSpace.cjs"
|
|
136
|
+
},
|
|
137
|
+
"./package.json": "./package.json"
|
|
138
|
+
},
|
|
139
|
+
"publishConfig": {
|
|
140
|
+
"access": "public",
|
|
141
|
+
"registry": "https://registry.npmjs.org/"
|
|
142
|
+
},
|
|
143
|
+
"dependencies": {
|
|
144
|
+
"typebox": "1.1.38",
|
|
145
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.0",
|
|
146
|
+
"@agimon-ai/doompi-ui": "0.0.1-alpha.0",
|
|
147
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.0"
|
|
148
|
+
},
|
|
149
|
+
"devDependencies": {
|
|
150
|
+
"@earendil-works/pi-coding-agent": "0.84.1",
|
|
151
|
+
"@earendil-works/pi-tui": "0.84.1",
|
|
152
|
+
"@types/node": "26.1.1",
|
|
153
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
154
|
+
"tsdown": "0.22.14",
|
|
155
|
+
"typescript": "6.0.3",
|
|
156
|
+
"vitest": "4.1.10"
|
|
157
|
+
},
|
|
158
|
+
"peerDependencies": {
|
|
159
|
+
"@earendil-works/pi-coding-agent": "0.84.1",
|
|
160
|
+
"@earendil-works/pi-tui": "0.84.1"
|
|
161
|
+
},
|
|
162
|
+
"peerDependenciesMeta": {
|
|
163
|
+
"@earendil-works/pi-coding-agent": {
|
|
164
|
+
"optional": true
|
|
165
|
+
},
|
|
166
|
+
"@earendil-works/pi-tui": {
|
|
167
|
+
"optional": true
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"engines": {
|
|
171
|
+
"node": ">=22.19.0"
|
|
172
|
+
},
|
|
173
|
+
"pi": {
|
|
174
|
+
"extensions": [
|
|
175
|
+
"./dist/extensions/pi.mjs"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"scripts": {
|
|
179
|
+
"build": "tsdown",
|
|
180
|
+
"test": "vitest --run",
|
|
181
|
+
"typecheck": "tsc --noEmit",
|
|
182
|
+
"lint": "oxlint . && oxfmt . --check",
|
|
183
|
+
"fixcode": "oxlint . --fix && oxfmt ."
|
|
184
|
+
}
|
|
185
|
+
}
|