@agimon-ai/doompi-task 0.0.1-alpha.121 → 0.0.1-alpha.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands.cjs +1 -1
- package/dist/commands.d.mts +1 -1
- package/dist/commands.mjs +1 -1
- package/dist/extensions/mcp.cjs +208 -922
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.mjs +208 -922
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/pi.cjs +4 -4
- package/dist/extensions/pi.mjs +4 -4
- package/dist/extensions/server.cjs +2 -1
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +2 -1
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/{root.cli-swHZqusx.d.mts → root.cli-Brg0bUuN.d.mts} +2 -2
- package/dist/{root.cli-swHZqusx.d.mts.map → root.cli-Brg0bUuN.d.mts.map} +1 -1
- package/dist/{task-DKHKuems.mjs → task-BBy5LoRL.mjs} +15 -2
- package/dist/{task-DKHKuems.mjs.map → task-BBy5LoRL.mjs.map} +1 -1
- package/dist/{task-Dqy88_rr.cjs → task-BF91oQcx.cjs} +26 -1
- package/dist/{task-Dqy88_rr.cjs.map → task-BF91oQcx.cjs.map} +1 -1
- package/dist/{task-DHSvdK6E.d.mts → task-lCI3ZCI6.d.mts} +23 -2
- package/dist/task-lCI3ZCI6.d.mts.map +1 -0
- package/dist/{task-space.cli-BH4Iy_7m.cjs → task-space.cli-BJcRZleT.cjs} +2 -2
- package/dist/{task-space.cli-BH4Iy_7m.cjs.map → task-space.cli-BJcRZleT.cjs.map} +1 -1
- package/dist/{task-space.cli-CMYNjgOW.mjs → task-space.cli-DH6bLqsD.mjs} +2 -2
- package/dist/{task-space.cli-CMYNjgOW.mjs.map → task-space.cli-DH6bLqsD.mjs.map} +1 -1
- package/dist/{task.cli-CiTkjUaX.cjs → task.cli-CHZG08JZ.cjs} +2 -2
- package/dist/{task.cli-CiTkjUaX.cjs.map → task.cli-CHZG08JZ.cjs.map} +1 -1
- package/dist/{task.cli-BM34E7GG.mjs → task.cli-Co6KD4vF.mjs} +2 -2
- package/dist/{task.cli-BM34E7GG.mjs.map → task.cli-Co6KD4vF.mjs.map} +1 -1
- package/dist/{tasks.cli-BZj83YD_.mjs → tasks.cli-C6j3syEo.mjs} +2 -2
- package/dist/{tasks.cli-BZj83YD_.mjs.map → tasks.cli-C6j3syEo.mjs.map} +1 -1
- package/dist/{tasks.cli-8VvuN9YQ.cjs → tasks.cli-Ed2QpAyo.cjs} +2 -2
- package/dist/{tasks.cli-8VvuN9YQ.cjs.map → tasks.cli-Ed2QpAyo.cjs.map} +1 -1
- package/dist/toolSchema.cjs +3 -1
- package/dist/toolSchema.d.mts +2 -2
- package/dist/toolSchema.mjs +2 -2
- package/dist/toolTaskTool.cjs +1 -1
- package/dist/toolTaskTool.d.mts +1 -1
- package/dist/toolTaskTool.mjs +1 -1
- package/dist/tuiTaskSpace.cjs +1 -1
- package/dist/tuiTaskSpace.mjs +1 -1
- package/package.json +4 -4
- package/dist/task-DHSvdK6E.d.mts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as TOOL_NAME, h as taskActionAcceptsField, m as TaskParamsSchema, r as MSG_UPSERT_FIELD_MISPLACED, u as TOOL_LABEL } from "./task-BBy5LoRL.mjs";
|
|
2
2
|
import "./config-DmsCPDuF.mjs";
|
|
3
3
|
import { t as TASK_EVENT } from "./telemetry-PmX_1Y8a.mjs";
|
|
4
4
|
import { a as buildAssignmentResult, c as formatAssignmentResults, o as buildTextResult, s as buildToolResult, u as formatUpsertFailureText } from "./taskResult-edBAAKSH.mjs";
|
|
@@ -154,4 +154,4 @@ function createTaskTool(dependencies, renderers = {}) {
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { createTaskTool as n, task_cli_default as r, DEFAULT_PROMPT_SNIPPET as t };
|
|
156
156
|
|
|
157
|
-
//# sourceMappingURL=task.cli-
|
|
157
|
+
//# sourceMappingURL=task.cli-Co6KD4vF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.cli-BM34E7GG.mjs","names":[],"sources":["../src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.ts"],"sourcesContent":["import { defineCliTool, type WithRoot } from '@agimon-ai/doompi-core/extensionFile';\nimport { definePiTool, type PiPluginContext } from '@agimon-ai/doompi-core/piExtension';\nimport type { ToolDefinition, ExtensionContext } from '@earendil-works/pi-coding-agent';\n\nimport { DEFAULT_PROMPT_GUIDELINES } from '../../../../../../constants/promptGuidelines';\nimport type { TaskAction, TaskAssignment, TaskMutationParams } from '../../../../../../models/task';\nimport {\n MSG_UPSERT_FIELD_MISPLACED,\n TaskParamsSchema,\n TOOL_LABEL,\n TOOL_NAME,\n taskActionAcceptsField,\n} from '../../../../../../schemas/task';\nimport { DEFAULT_MAX_TASKS } from '../../../../../../services/config';\nimport type { AssignOptions, DelegationManager, DelegationOutcome } from '../../../../../../services/delegation';\nimport { applyTaskMutation, isCommittingOp, type ReducerAction } from '../../../../../../services/reducer';\nimport {\n type AssignmentItemResult,\n buildAssignmentResult,\n buildTextResult,\n buildToolResult,\n formatAssignmentResults,\n formatUpsertFailureText,\n type ToolResult,\n} from '../../../../../../services/taskResult';\nimport type { TaskStore } from '../../../../../../services/taskStore';\nimport { TASK_EVENT, type TaskFailureReporter } from '../../../../../../types/telemetry';\nimport type { TaskPiScope } from '../../_lib/root.cli';\n\nexport { DEFAULT_PROMPT_GUIDELINES } from '../../../../../../constants/promptGuidelines';\n\n/** @deprecated Task usage policy now lives only in the tool description. */\nexport const DEFAULT_PROMPT_SNIPPET =\n 'Track only complex, multi-step jobs that benefit from persistent progress or delegation; skip simple work';\n\nexport interface TaskToolDependencies {\n store: TaskStore;\n delegation: DelegationManager;\n maxTasks?: number;\n onChange?: () => void;\n report?: TaskFailureReporter;\n waitUntilReady?: (context: ExtensionContext, signal?: AbortSignal) => Promise<void>;\n}\n\nexport default defineCliTool((context: WithRoot<PiPluginContext, TaskPiScope>) =>\n definePiTool(createTaskTool(context.root.toolDependencies)),\n);\n\nconst ACTION_ATTRIBUTE = 'tool.action';\nconst TASK_ID_ATTRIBUTE = 'task.id';\nconst REDUCER_ACTIONS = new Set<TaskAction>(['upsert', 'list', 'get', 'delete', 'clear']);\n\nclass TaskToolExecutionError extends Error {}\n\nfunction actionableTaskError(action: TaskAction, message: string): TaskToolExecutionError {\n return new TaskToolExecutionError(\n [\n `Task ${action} failed: ${message}`,\n '',\n 'Options:',\n '- List the task board and inspect the current ids, states, and blockers.',\n '- Correct the arguments or state conflict, then retry once.',\n '- Ask the user before cancelling work or changing dependencies to recover.',\n ].join('\\n'),\n );\n}\n\n/**\n * Reject a field that belongs to a different action.\n *\n * The params schema is flat and shared across every action, so this is the only\n * place `{\"action\":\"upsert\",\"id\":3}` can be caught — and it must be, because\n * the entry it carries has no id and would silently create a duplicate task.\n */\nfunction rejectStrayFields(action: TaskAction, params: TaskMutationParams): void {\n const stray = Object.keys(params).filter((key) => params[key] !== undefined && !taskActionAcceptsField(action, key));\n if (stray.length === 0) return;\n const hint = action === 'upsert' ? ` ${MSG_UPSERT_FIELD_MISPLACED}` : '';\n throw actionableTaskError(action, `${action} does not accept ${stray.join(', ')}.${hint}`);\n}\n\n/** assignments[] is the only assign contract, even when it contains one task. */\nfunction resolveAssignments(params: TaskMutationParams): TaskAssignment[] {\n const assignments = params.assignments;\n if (!assignments || assignments.length === 0) {\n throw actionableTaskError('assign', 'assign requires a non-empty assignments[] array');\n }\n return assignments;\n}\n\nfunction assignOptions(request: TaskAssignment, signal: AbortSignal | undefined): AssignOptions {\n return {\n agent: request.agent,\n inlineAgent: request.inlineAgent,\n instructions: request.instructions,\n relevantFiles: request.relevantFiles,\n priorFindings: request.priorFindings,\n model: request.model,\n context: request.context,\n signal,\n };\n}\n\nasync function executeAssignmentBatch(\n delegation: DelegationManager,\n assignments: readonly TaskAssignment[],\n signal: AbortSignal | undefined,\n report: TaskFailureReporter | undefined,\n): Promise<AssignmentItemResult[]> {\n const results: AssignmentItemResult[] = [];\n for (const [index, assignment] of assignments.entries()) {\n let outcome: DelegationOutcome;\n try {\n outcome = await delegation.assign(assignment.id, assignOptions(assignment, signal));\n } catch (error) {\n report?.error(TASK_EVENT.toolFailed, error, {\n [ACTION_ATTRIBUTE]: 'assign',\n [TASK_ID_ATTRIBUTE]: assignment.id,\n });\n outcome = { ok: false, message: error instanceof Error ? error.message : String(error) };\n }\n results.push({ index, id: assignment.id, agent: assignment.agent, ...outcome });\n }\n return results;\n}\n\n/** Run an action through the reducer, persisting only when it produced a change. */\nasync function executeReducerAction(\n store: TaskStore,\n action: ReducerAction,\n params: TaskMutationParams,\n maxTasks: number,\n): Promise<ToolResult> {\n const { document, value } = await store.mutate((current) => {\n const result = applyTaskMutation(current, action, params, undefined, maxTasks);\n return {\n ...(isCommittingOp(result.op) ? { document: result.document } : {}),\n value: result,\n };\n });\n if (value.op.kind === 'error') throw actionableTaskError(action, value.op.message);\n // An upsert that applied nothing is a failed call: it wrote nothing and left\n // `rev` alone, so it must not read to the model as a success. A batch where\n // some entries landed returns normally — that is what partial apply means.\n if (value.op.kind === 'upsert' && value.op.applied === 0) {\n throw actionableTaskError(action, formatUpsertFailureText(value.op));\n }\n // `document` is the committed document, so `details.rev` matches what landed\n // on disk; `value.document` is the pre-write copy and lags by one.\n return buildToolResult(action, params, document, value.op);\n}\n\nexport function createTaskTool(\n dependencies: TaskToolDependencies,\n renderers: Pick<ToolDefinition<typeof TaskParamsSchema, ToolResult['details']>, 'renderCall' | 'renderResult'> = {},\n): ToolDefinition<typeof TaskParamsSchema, ToolResult['details']> {\n const { store, delegation, maxTasks = DEFAULT_MAX_TASKS } = dependencies;\n\n return {\n name: TOOL_NAME,\n label: TOOL_LABEL,\n description:\n 'Shared task list for complex jobs, plus delegation of tracked tasks to background subagents. Use it only when persistent coordination pays off: dependencies, parallel workstreams, or a long-running plan. Do not use it for simple requests, routine edits, straightforward command sequences, or merely because the user listed multiple steps. Actions: upsert (create and change tasks), list, get, delete (tombstone), clear (close the list), assign (delegate through assignments[]), cancel (stop a delegated run). The list is shared across the current session tree, including delegated subagents, while unrelated sessions start empty and stores persist until retention cleanup.',\n promptGuidelines: DEFAULT_PROMPT_GUIDELINES,\n parameters: TaskParamsSchema,\n // Task rows carry their own status colors. Owning the shell prevents Pi's\n // pending/success/error background fill from obscuring those row states.\n renderShell: 'self',\n\n async execute(_toolCallId, params, signal, onUpdate, ctx) {\n const action = params.action as TaskAction;\n const mutationParams = params as TaskMutationParams;\n\n try {\n await dependencies.waitUntilReady?.(ctx, signal);\n rejectStrayFields(action, mutationParams);\n if (REDUCER_ACTIONS.has(action)) {\n const result = await executeReducerAction(store, action as ReducerAction, mutationParams, maxTasks);\n dependencies.onChange?.();\n return result;\n }\n\n if (action === 'assign') {\n const assignments = resolveAssignments(mutationParams);\n const first = assignments[0];\n const progress =\n assignments.length === 1 && first\n ? `Delegating task #${first.id}...`\n : `Delegating ${assignments.length} tasks...`;\n onUpdate?.(buildTextResult(action, mutationParams, store.snapshot, progress));\n const results = await executeAssignmentBatch(delegation, assignments, signal, dependencies.report);\n dependencies.onChange?.();\n const text = formatAssignmentResults(results);\n const assigned = results.flatMap((item) => (item.ok ? [item.id] : []));\n if (assigned.length === 0) throw actionableTaskError(action, text);\n return buildAssignmentResult(mutationParams, store.snapshot, text, {\n assigned,\n failed: results.length - assigned.length,\n });\n }\n\n onUpdate?.(\n buildTextResult(\n action,\n mutationParams,\n store.snapshot,\n `Requesting cancellation for task #${mutationParams.id ?? 'unknown'}...`,\n ),\n );\n const outcome = await delegation.cancel(mutationParams.id ?? Number.NaN);\n dependencies.onChange?.();\n if (!outcome.ok) throw actionableTaskError(action, outcome.message);\n return buildTextResult(action, mutationParams, store.snapshot, outcome.message, undefined);\n } catch (error) {\n // Rethrown so pi still renders the failure to the model; recorded\n // because this is where a store fault becomes visible to the user.\n dependencies.report?.error(TASK_EVENT.toolFailed, error, {\n [ACTION_ATTRIBUTE]: action,\n ...(mutationParams.id === undefined ? {} : { [TASK_ID_ATTRIBUTE]: mutationParams.id }),\n });\n if (error instanceof TaskToolExecutionError) throw error;\n throw actionableTaskError(action, error instanceof Error ? error.message : String(error));\n }\n },\n\n ...renderers,\n };\n}\n"],"mappings":";;;;;;;;;;AAgCA,MAAa,yBACX;AAWF,IAAA,mBAAe,eAAe,YAC5B,aAAa,eAAe,QAAQ,KAAK,gBAAgB,CAAC,CAC5D;AAEA,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,kCAAkB,IAAI,IAAgB;CAAC;CAAU;CAAQ;CAAO;CAAU;AAAO,CAAC;AAExF,IAAM,yBAAN,cAAqC,MAAM,CAAC;AAE5C,SAAS,oBAAoB,QAAoB,SAAyC;CACxF,OAAO,IAAI,uBACT;EACE,QAAQ,OAAO,WAAW;EAC1B;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI,CACb;AACF;;;;;;;;AASA,SAAS,kBAAkB,QAAoB,QAAkC;CAC/E,MAAM,QAAQ,OAAO,KAAK,MAAM,CAAC,CAAC,QAAQ,QAAQ,OAAO,SAAS,KAAA,KAAa,CAAC,uBAAuB,QAAQ,GAAG,CAAC;CACnH,IAAI,MAAM,WAAW,GAAG;CACxB,MAAM,OAAO,WAAW,WAAW,IAAI,+BAA+B;CACtE,MAAM,oBAAoB,QAAQ,GAAG,OAAO,mBAAmB,MAAM,KAAK,IAAI,EAAE,GAAG,MAAM;AAC3F;;AAGA,SAAS,mBAAmB,QAA8C;CACxE,MAAM,cAAc,OAAO;CAC3B,IAAI,CAAC,eAAe,YAAY,WAAW,GACzC,MAAM,oBAAoB,UAAU,iDAAiD;CAEvF,OAAO;AACT;AAEA,SAAS,cAAc,SAAyB,QAAgD;CAC9F,OAAO;EACL,OAAO,QA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AAQ,gBAAgB,MAAM,UAAU,QAAQ,SAAS,KAAA,CAAS;GAC3F,SAAS,OAAO;IAGd,aAAa,QAAQ,MAAM,WAAW,YAAY,OAAO;MACtD,mBAAmB;KACpB,GAAI,eAAe,OAAO,KAAA,IAAY,CAAC,IAAI,GAAG,oBAAoB,eAAe,GAAG;IACtF,CAAC;IACD,IAAI,iBAAiB,wBAAwB,MAAM;IACnD,MAAM,oBAAoB,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;GAC1F;EACF;EAEA,GAAG;CACL;AACF"}
|
|
1
|
+
{"version":3,"file":"task.cli-Co6KD4vF.mjs","names":[],"sources":["../src/extensions/workspaces/sessions/(backend)/tool/_lib/task.cli.ts"],"sourcesContent":["import { defineCliTool, type WithRoot } from '@agimon-ai/doompi-core/extensionFile';\nimport { definePiTool, type PiPluginContext } from '@agimon-ai/doompi-core/piExtension';\nimport type { ToolDefinition, ExtensionContext } from '@earendil-works/pi-coding-agent';\n\nimport { DEFAULT_PROMPT_GUIDELINES } from '../../../../../../constants/promptGuidelines';\nimport type { TaskAction, TaskAssignment, TaskMutationParams } from '../../../../../../models/task';\nimport {\n MSG_UPSERT_FIELD_MISPLACED,\n TaskParamsSchema,\n TOOL_LABEL,\n TOOL_NAME,\n taskActionAcceptsField,\n} from '../../../../../../schemas/task';\nimport { DEFAULT_MAX_TASKS } from '../../../../../../services/config';\nimport type { AssignOptions, DelegationManager, DelegationOutcome } from '../../../../../../services/delegation';\nimport { applyTaskMutation, isCommittingOp, type ReducerAction } from '../../../../../../services/reducer';\nimport {\n type AssignmentItemResult,\n buildAssignmentResult,\n buildTextResult,\n buildToolResult,\n formatAssignmentResults,\n formatUpsertFailureText,\n type ToolResult,\n} from '../../../../../../services/taskResult';\nimport type { TaskStore } from '../../../../../../services/taskStore';\nimport { TASK_EVENT, type TaskFailureReporter } from '../../../../../../types/telemetry';\nimport type { TaskPiScope } from '../../_lib/root.cli';\n\nexport { DEFAULT_PROMPT_GUIDELINES } from '../../../../../../constants/promptGuidelines';\n\n/** @deprecated Task usage policy now lives only in the tool description. */\nexport const DEFAULT_PROMPT_SNIPPET =\n 'Track only complex, multi-step jobs that benefit from persistent progress or delegation; skip simple work';\n\nexport interface TaskToolDependencies {\n store: TaskStore;\n delegation: DelegationManager;\n maxTasks?: number;\n onChange?: () => void;\n report?: TaskFailureReporter;\n waitUntilReady?: (context: ExtensionContext, signal?: AbortSignal) => Promise<void>;\n}\n\nexport default defineCliTool((context: WithRoot<PiPluginContext, TaskPiScope>) =>\n definePiTool(createTaskTool(context.root.toolDependencies)),\n);\n\nconst ACTION_ATTRIBUTE = 'tool.action';\nconst TASK_ID_ATTRIBUTE = 'task.id';\nconst REDUCER_ACTIONS = new Set<TaskAction>(['upsert', 'list', 'get', 'delete', 'clear']);\n\nclass TaskToolExecutionError extends Error {}\n\nfunction actionableTaskError(action: TaskAction, message: string): TaskToolExecutionError {\n return new TaskToolExecutionError(\n [\n `Task ${action} failed: ${message}`,\n '',\n 'Options:',\n '- List the task board and inspect the current ids, states, and blockers.',\n '- Correct the arguments or state conflict, then retry once.',\n '- Ask the user before cancelling work or changing dependencies to recover.',\n ].join('\\n'),\n );\n}\n\n/**\n * Reject a field that belongs to a different action.\n *\n * The params schema is flat and shared across every action, so this is the only\n * place `{\"action\":\"upsert\",\"id\":3}` can be caught — and it must be, because\n * the entry it carries has no id and would silently create a duplicate task.\n */\nfunction rejectStrayFields(action: TaskAction, params: TaskMutationParams): void {\n const stray = Object.keys(params).filter((key) => params[key] !== undefined && !taskActionAcceptsField(action, key));\n if (stray.length === 0) return;\n const hint = action === 'upsert' ? ` ${MSG_UPSERT_FIELD_MISPLACED}` : '';\n throw actionableTaskError(action, `${action} does not accept ${stray.join(', ')}.${hint}`);\n}\n\n/** assignments[] is the only assign contract, even when it contains one task. */\nfunction resolveAssignments(params: TaskMutationParams): TaskAssignment[] {\n const assignments = params.assignments;\n if (!assignments || assignments.length === 0) {\n throw actionableTaskError('assign', 'assign requires a non-empty assignments[] array');\n }\n return assignments;\n}\n\nfunction assignOptions(request: TaskAssignment, signal: AbortSignal | undefined): AssignOptions {\n return {\n agent: request.agent,\n inlineAgent: request.inlineAgent,\n instructions: request.instructions,\n relevantFiles: request.relevantFiles,\n priorFindings: request.priorFindings,\n model: request.model,\n context: request.context,\n signal,\n };\n}\n\nasync function executeAssignmentBatch(\n delegation: DelegationManager,\n assignments: readonly TaskAssignment[],\n signal: AbortSignal | undefined,\n report: TaskFailureReporter | undefined,\n): Promise<AssignmentItemResult[]> {\n const results: AssignmentItemResult[] = [];\n for (const [index, assignment] of assignments.entries()) {\n let outcome: DelegationOutcome;\n try {\n outcome = await delegation.assign(assignment.id, assignOptions(assignment, signal));\n } catch (error) {\n report?.error(TASK_EVENT.toolFailed, error, {\n [ACTION_ATTRIBUTE]: 'assign',\n [TASK_ID_ATTRIBUTE]: assignment.id,\n });\n outcome = { ok: false, message: error instanceof Error ? error.message : String(error) };\n }\n results.push({ index, id: assignment.id, agent: assignment.agent, ...outcome });\n }\n return results;\n}\n\n/** Run an action through the reducer, persisting only when it produced a change. */\nasync function executeReducerAction(\n store: TaskStore,\n action: ReducerAction,\n params: TaskMutationParams,\n maxTasks: number,\n): Promise<ToolResult> {\n const { document, value } = await store.mutate((current) => {\n const result = applyTaskMutation(current, action, params, undefined, maxTasks);\n return {\n ...(isCommittingOp(result.op) ? { document: result.document } : {}),\n value: result,\n };\n });\n if (value.op.kind === 'error') throw actionableTaskError(action, value.op.message);\n // An upsert that applied nothing is a failed call: it wrote nothing and left\n // `rev` alone, so it must not read to the model as a success. A batch where\n // some entries landed returns normally — that is what partial apply means.\n if (value.op.kind === 'upsert' && value.op.applied === 0) {\n throw actionableTaskError(action, formatUpsertFailureText(value.op));\n }\n // `document` is the committed document, so `details.rev` matches what landed\n // on disk; `value.document` is the pre-write copy and lags by one.\n return buildToolResult(action, params, document, value.op);\n}\n\nexport function createTaskTool(\n dependencies: TaskToolDependencies,\n renderers: Pick<ToolDefinition<typeof TaskParamsSchema, ToolResult['details']>, 'renderCall' | 'renderResult'> = {},\n): ToolDefinition<typeof TaskParamsSchema, ToolResult['details']> {\n const { store, delegation, maxTasks = DEFAULT_MAX_TASKS } = dependencies;\n\n return {\n name: TOOL_NAME,\n label: TOOL_LABEL,\n description:\n 'Shared task list for complex jobs, plus delegation of tracked tasks to background subagents. Use it only when persistent coordination pays off: dependencies, parallel workstreams, or a long-running plan. Do not use it for simple requests, routine edits, straightforward command sequences, or merely because the user listed multiple steps. Actions: upsert (create and change tasks), list, get, delete (tombstone), clear (close the list), assign (delegate through assignments[]), cancel (stop a delegated run). The list is shared across the current session tree, including delegated subagents, while unrelated sessions start empty and stores persist until retention cleanup.',\n promptGuidelines: DEFAULT_PROMPT_GUIDELINES,\n parameters: TaskParamsSchema,\n // Task rows carry their own status colors. Owning the shell prevents Pi's\n // pending/success/error background fill from obscuring those row states.\n renderShell: 'self',\n\n async execute(_toolCallId, params, signal, onUpdate, ctx) {\n const action = params.action as TaskAction;\n const mutationParams = params as TaskMutationParams;\n\n try {\n await dependencies.waitUntilReady?.(ctx, signal);\n rejectStrayFields(action, mutationParams);\n if (REDUCER_ACTIONS.has(action)) {\n const result = await executeReducerAction(store, action as ReducerAction, mutationParams, maxTasks);\n dependencies.onChange?.();\n return result;\n }\n\n if (action === 'assign') {\n const assignments = resolveAssignments(mutationParams);\n const first = assignments[0];\n const progress =\n assignments.length === 1 && first\n ? `Delegating task #${first.id}...`\n : `Delegating ${assignments.length} tasks...`;\n onUpdate?.(buildTextResult(action, mutationParams, store.snapshot, progress));\n const results = await executeAssignmentBatch(delegation, assignments, signal, dependencies.report);\n dependencies.onChange?.();\n const text = formatAssignmentResults(results);\n const assigned = results.flatMap((item) => (item.ok ? [item.id] : []));\n if (assigned.length === 0) throw actionableTaskError(action, text);\n return buildAssignmentResult(mutationParams, store.snapshot, text, {\n assigned,\n failed: results.length - assigned.length,\n });\n }\n\n onUpdate?.(\n buildTextResult(\n action,\n mutationParams,\n store.snapshot,\n `Requesting cancellation for task #${mutationParams.id ?? 'unknown'}...`,\n ),\n );\n const outcome = await delegation.cancel(mutationParams.id ?? Number.NaN);\n dependencies.onChange?.();\n if (!outcome.ok) throw actionableTaskError(action, outcome.message);\n return buildTextResult(action, mutationParams, store.snapshot, outcome.message, undefined);\n } catch (error) {\n // Rethrown so pi still renders the failure to the model; recorded\n // because this is where a store fault becomes visible to the user.\n dependencies.report?.error(TASK_EVENT.toolFailed, error, {\n [ACTION_ATTRIBUTE]: action,\n ...(mutationParams.id === undefined ? {} : { [TASK_ID_ATTRIBUTE]: mutationParams.id }),\n });\n if (error instanceof TaskToolExecutionError) throw error;\n throw actionableTaskError(action, error instanceof Error ? error.message : String(error));\n }\n },\n\n ...renderers,\n };\n}\n"],"mappings":";;;;;;;;;;AAgCA,MAAa,yBACX;AAWF,IAAA,mBAAe,eAAe,YAC5B,aAAa,eAAe,QAAQ,KAAK,gBAAgB,CAAC,CAC5D;AAEA,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,kCAAkB,IAAI,IAAgB;CAAC;CAAU;CAAQ;CAAO;CAAU;AAAO,CAAC;AAExF,IAAM,yBAAN,cAAqC,MAAM,CAAC;AAE5C,SAAS,oBAAoB,QAAoB,SAAyC;CACxF,OAAO,IAAI,uBACT;EACE,QAAQ,OAAO,WAAW;EAC1B;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI,CACb;AACF;;;;;;;;AASA,SAAS,kBAAkB,QAAoB,QAAkC;CAC/E,MAAM,QAAQ,OAAO,KAAK,MAAM,CAAC,CAAC,QAAQ,QAAQ,OAAO,SAAS,KAAA,KAAa,CAAC,uBAAuB,QAAQ,GAAG,CAAC;CACnH,IAAI,MAAM,WAAW,GAAG;CACxB,MAAM,OAAO,WAAW,WAAW,IAAI,+BAA+B;CACtE,MAAM,oBAAoB,QAAQ,GAAG,OAAO,mBAAmB,MAAM,KAAK,IAAI,EAAE,GAAG,MAA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BACA,MAAM,UACN,qCAAqC,eAAe,MAAM,UAAU,IACtE,CACF;IACA,MAAM,UAAU,MAAM,WAAW,OAAO,eAAe,MAAM,GAAU;IACvE,aAAa,WAAW;IACxB,IAAI,CAAC,QAAQ,IAAI,MAAM,oBAAoB,QAAQ,QAAQ,OAAO;IAClE,OAAO,gBAAgB,QAAQ,gBAAgB,MAAM,UAAU,QAAQ,SAAS,KAAA,CAAS;GAC3F,SAAS,OAAO;IAGd,aAAa,QAAQ,MAAM,WAAW,YAAY,OAAO;MACtD,mBAAmB;KACpB,GAAI,eAAe,OAAO,KAAA,IAAY,CAAC,IAAI,GAAG,oBAAoB,eAAe,GAAG;IACtF,CAAC;IACD,IAAI,iBAAiB,wBAAwB,MAAM;IACnD,MAAM,oBAAoB,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;GAC1F;EACF;EAEA,GAAG;CACL;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as COMMAND_NAME } from "./task-B4aF5J9s.mjs";
|
|
2
|
-
import { t as ERR_REQUIRES_INTERACTIVE } from "./task-
|
|
2
|
+
import { t as ERR_REQUIRES_INTERACTIVE } from "./task-BBy5LoRL.mjs";
|
|
3
3
|
//#region src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.ts
|
|
4
4
|
const createTasksContribution = (openTaskSpace) => (context) => createTasksCommand(context.root.taskStore, openTaskSpace, context.root.waitForSessionReadiness);
|
|
5
5
|
/**
|
|
@@ -26,4 +26,4 @@ function createTasksCommand(store, openTaskSpace, waitUntilReady) {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { createTasksContribution as n, createTasksCommand as t };
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=tasks.cli-
|
|
29
|
+
//# sourceMappingURL=tasks.cli-C6j3syEo.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.cli-
|
|
1
|
+
{"version":3,"file":"tasks.cli-C6j3syEo.mjs","names":[],"sources":["../src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.ts"],"sourcesContent":["import type { WithRoot } from '@agimon-ai/doompi-core/extensionFile';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/piExtension';\nimport type { ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent';\n\nimport { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE } from '../../../../../../schemas/task';\nimport type { TaskStore } from '../../../../../../services/taskStore';\nimport type { TaskPiScope } from '../../_lib/root.cli';\n\ntype OpenTaskSpace = (context: ExtensionContext, options: { store: TaskStore }) => Promise<void>;\n\nexport const createTasksContribution =\n (openTaskSpace: OpenTaskSpace) => (context: WithRoot<PiPluginContext, TaskPiScope>) =>\n createTasksCommand(context.root.taskStore, openTaskSpace, context.root.waitForSessionReadiness);\n\n/**\n * `/tasks`, reachable from the leader palette as `SPC t l`.\n *\n * The command opens the Task Space overlay rather than printing a listing: the\n * overlay is the readable surface and it can edit, while a transcript dump could\n * only be read.\n */\nexport function createTasksCommand(\n store: TaskStore,\n openTaskSpace: OpenTaskSpace,\n waitUntilReady?: (context: ExtensionContext) => Promise<void>,\n): readonly [string, Parameters<ExtensionAPI['registerCommand']>[1]] {\n return [\n COMMAND_NAME,\n {\n description: 'Open Task Space for this session tree',\n handler: async (_args, ctx) => {\n if (!ctx.hasUI) {\n ctx.ui.notify(ERR_REQUIRES_INTERACTIVE, 'error');\n return;\n }\n\n await waitUntilReady?.(ctx);\n store.read();\n await openTaskSpace(ctx, { store });\n },\n },\n ];\n}\n"],"mappings":";;;AAUA,MAAa,2BACV,mBAAkC,YACjC,mBAAmB,QAAQ,KAAK,WAAW,eAAe,QAAQ,KAAK,uBAAuB;;;;;;;;AASlG,SAAgB,mBACd,OACA,eACA,gBACmE;CACnE,OAAO,CACL,cACA;EACE,aAAa;EACb,SAAS,OAAO,OAAO,QAAQ;GAC7B,IAAI,CAAC,IAAI,OAAO;IACd,IAAI,GAAG,OAAO,0BAA0B,OAAO;IAC/C;GACF;GAEA,MAAM,iBAAiB,GAAG;GAC1B,MAAM,KAAK;GACX,MAAM,cAAc,KAAK,EAAE,MAAM,CAAC;EACpC;CACF,CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_task = require("./task-DaagqdPK.cjs");
|
|
2
|
-
const require_task$1 = require("./task-
|
|
2
|
+
const require_task$1 = require("./task-BF91oQcx.cjs");
|
|
3
3
|
//#region src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.ts
|
|
4
4
|
const createTasksContribution = (openTaskSpace) => (context) => createTasksCommand(context.root.taskStore, openTaskSpace, context.root.waitForSessionReadiness);
|
|
5
5
|
/**
|
|
@@ -37,4 +37,4 @@ Object.defineProperty(exports, "createTasksContribution", {
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
//# sourceMappingURL=tasks.cli-
|
|
40
|
+
//# sourceMappingURL=tasks.cli-Ed2QpAyo.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.cli-
|
|
1
|
+
{"version":3,"file":"tasks.cli-Ed2QpAyo.cjs","names":["COMMAND_NAME","ERR_REQUIRES_INTERACTIVE"],"sources":["../src/extensions/workspaces/sessions/(backend)/command/_lib/tasks.cli.ts"],"sourcesContent":["import type { WithRoot } from '@agimon-ai/doompi-core/extensionFile';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/piExtension';\nimport type { ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent';\n\nimport { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE } from '../../../../../../schemas/task';\nimport type { TaskStore } from '../../../../../../services/taskStore';\nimport type { TaskPiScope } from '../../_lib/root.cli';\n\ntype OpenTaskSpace = (context: ExtensionContext, options: { store: TaskStore }) => Promise<void>;\n\nexport const createTasksContribution =\n (openTaskSpace: OpenTaskSpace) => (context: WithRoot<PiPluginContext, TaskPiScope>) =>\n createTasksCommand(context.root.taskStore, openTaskSpace, context.root.waitForSessionReadiness);\n\n/**\n * `/tasks`, reachable from the leader palette as `SPC t l`.\n *\n * The command opens the Task Space overlay rather than printing a listing: the\n * overlay is the readable surface and it can edit, while a transcript dump could\n * only be read.\n */\nexport function createTasksCommand(\n store: TaskStore,\n openTaskSpace: OpenTaskSpace,\n waitUntilReady?: (context: ExtensionContext) => Promise<void>,\n): readonly [string, Parameters<ExtensionAPI['registerCommand']>[1]] {\n return [\n COMMAND_NAME,\n {\n description: 'Open Task Space for this session tree',\n handler: async (_args, ctx) => {\n if (!ctx.hasUI) {\n ctx.ui.notify(ERR_REQUIRES_INTERACTIVE, 'error');\n return;\n }\n\n await waitUntilReady?.(ctx);\n store.read();\n await openTaskSpace(ctx, { store });\n },\n },\n ];\n}\n"],"mappings":";;;AAUA,MAAa,2BACV,mBAAkC,YACjC,mBAAmB,QAAQ,KAAK,WAAW,eAAe,QAAQ,KAAK,uBAAuB;;;;;;;;AASlG,SAAgB,mBACd,OACA,eACA,gBACmE;CACnE,OAAO,CACLA,aAAAA,cACA;EACE,aAAa;EACb,SAAS,OAAO,OAAO,QAAQ;GAC7B,IAAI,CAAC,IAAI,OAAO;IACd,IAAI,GAAG,OAAOC,eAAAA,0BAA0B,OAAO;IAC/C;GACF;GAEA,MAAM,iBAAiB,GAAG;GAC1B,MAAM,KAAK;GACX,MAAM,cAAc,KAAK,EAAE,MAAM,CAAC;EACpC;CACF,CACF;AACF"}
|
package/dist/toolSchema.cjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_task = require("./task-DaagqdPK.cjs");
|
|
3
|
-
const require_task$1 = require("./task-
|
|
3
|
+
const require_task$1 = require("./task-BF91oQcx.cjs");
|
|
4
4
|
exports.COMMAND_NAME = require_task.COMMAND_NAME;
|
|
5
5
|
exports.ERR_REQUIRES_INTERACTIVE = require_task$1.ERR_REQUIRES_INTERACTIVE;
|
|
6
6
|
exports.MSG_NO_TASKS = require_task$1.MSG_NO_TASKS;
|
|
7
7
|
exports.MSG_UPSERT_FIELD_MISPLACED = require_task$1.MSG_UPSERT_FIELD_MISPLACED;
|
|
8
|
+
exports.REMOTE_TASK_ACTIONS = require_task$1.REMOTE_TASK_ACTIONS;
|
|
9
|
+
exports.RemoteTaskParamsSchema = require_task$1.RemoteTaskParamsSchema;
|
|
8
10
|
exports.TASK_ACTIONS = require_task$1.TASK_ACTIONS;
|
|
9
11
|
exports.TASK_ACTION_FIELDS = require_task$1.TASK_ACTION_FIELDS;
|
|
10
12
|
exports.TASK_CONTEXTS = require_task$1.TASK_CONTEXTS;
|
package/dist/toolSchema.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as COMMAND_NAME } from "./task-CkFjC3Fo.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskAssignmentParams, TaskAssignmentSchema, TaskItemParams, TaskItemSchema, TaskParams, TaskParamsSchema, taskActionAcceptsField };
|
|
2
|
+
import { _ as TaskParamsSchema, a as RemoteTaskParamsSchema, c as TASK_CONTEXTS, d as TOOL_NAME, f as TaskAssignmentParams, g as TaskParams, h as TaskItemSchema, i as REMOTE_TASK_ACTIONS, l as TASK_STATUSES, m as TaskItemParams, n as MSG_NO_TASKS, o as TASK_ACTIONS, p as TaskAssignmentSchema, r as MSG_UPSERT_FIELD_MISPLACED, s as TASK_ACTION_FIELDS, t as ERR_REQUIRES_INTERACTIVE, u as TOOL_LABEL, v as taskActionAcceptsField } from "./task-lCI3ZCI6.mjs";
|
|
3
|
+
export { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, REMOTE_TASK_ACTIONS, RemoteTaskParamsSchema, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskAssignmentParams, TaskAssignmentSchema, TaskItemParams, TaskItemSchema, TaskParams, TaskParamsSchema, taskActionAcceptsField };
|
package/dist/toolSchema.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as COMMAND_NAME } from "./task-B4aF5J9s.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskAssignmentSchema, TaskItemSchema, TaskParamsSchema, taskActionAcceptsField };
|
|
2
|
+
import { a as RemoteTaskParamsSchema, c as TASK_CONTEXTS, d as TOOL_NAME, f as TaskAssignmentSchema, h as taskActionAcceptsField, i as REMOTE_TASK_ACTIONS, l as TASK_STATUSES, m as TaskParamsSchema, n as MSG_NO_TASKS, o as TASK_ACTIONS, p as TaskItemSchema, r as MSG_UPSERT_FIELD_MISPLACED, s as TASK_ACTION_FIELDS, t as ERR_REQUIRES_INTERACTIVE, u as TOOL_LABEL } from "./task-BBy5LoRL.mjs";
|
|
3
|
+
export { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, REMOTE_TASK_ACTIONS, RemoteTaskParamsSchema, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskAssignmentSchema, TaskItemSchema, TaskParamsSchema, taskActionAcceptsField };
|
package/dist/toolTaskTool.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_promptGuidelines = require("./promptGuidelines-j_SZTzlH.cjs");
|
|
3
|
-
const require_task_cli = require("./task.cli-
|
|
3
|
+
const require_task_cli = require("./task.cli-CHZG08JZ.cjs");
|
|
4
4
|
exports.DEFAULT_PROMPT_GUIDELINES = require_promptGuidelines.DEFAULT_PROMPT_GUIDELINES;
|
|
5
5
|
exports.DEFAULT_PROMPT_SNIPPET = require_task_cli.DEFAULT_PROMPT_SNIPPET;
|
|
6
6
|
exports.createTaskTool = require_task_cli.createTaskTool;
|
package/dist/toolTaskTool.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as DEFAULT_PROMPT_GUIDELINES } from "./promptGuidelines-DaxWrqud.mjs";
|
|
2
|
-
import { i as createTaskTool, n as DEFAULT_PROMPT_SNIPPET, r as TaskToolDependencies } from "./root.cli-
|
|
2
|
+
import { i as createTaskTool, n as DEFAULT_PROMPT_SNIPPET, r as TaskToolDependencies } from "./root.cli-Brg0bUuN.mjs";
|
|
3
3
|
export { DEFAULT_PROMPT_GUIDELINES, DEFAULT_PROMPT_SNIPPET, TaskToolDependencies, createTaskTool };
|
package/dist/toolTaskTool.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as DEFAULT_PROMPT_GUIDELINES } from "./promptGuidelines-g4QT8GNM.mjs";
|
|
2
|
-
import { n as createTaskTool, t as DEFAULT_PROMPT_SNIPPET } from "./task.cli-
|
|
2
|
+
import { n as createTaskTool, t as DEFAULT_PROMPT_SNIPPET } from "./task.cli-Co6KD4vF.mjs";
|
|
3
3
|
export { DEFAULT_PROMPT_GUIDELINES, DEFAULT_PROMPT_SNIPPET, createTaskTool };
|
package/dist/tuiTaskSpace.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_task_space_cli = require("./task-space.cli-
|
|
2
|
+
const require_task_space_cli = require("./task-space.cli-BJcRZleT.cjs");
|
|
3
3
|
exports.TASK_SPACE_OVERLAY_OPTIONS = require_task_space_cli.TASK_SPACE_OVERLAY_OPTIONS;
|
|
4
4
|
exports.TaskSpaceComponent = require_task_space_cli.TaskSpaceComponent;
|
|
5
5
|
exports.openTaskSpace = require_task_space_cli.openTaskSpace;
|
package/dist/tuiTaskSpace.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TaskSpaceComponent, r as openTaskSpace, t as TASK_SPACE_OVERLAY_OPTIONS } from "./task-space.cli-
|
|
1
|
+
import { n as TaskSpaceComponent, r as openTaskSpace, t as TASK_SPACE_OVERLAY_OPTIONS } from "./task-space.cli-DH6bLqsD.mjs";
|
|
2
2
|
export { TASK_SPACE_OVERLAY_OPTIONS, TaskSpaceComponent, openTaskSpace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-task",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.122",
|
|
4
4
|
"description": "Persistent, dependency-aware task graphs and subagent delegation for Pi coding sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -161,10 +161,10 @@
|
|
|
161
161
|
"registry": "https://registry.npmjs.org/"
|
|
162
162
|
},
|
|
163
163
|
"dependencies": {
|
|
164
|
-
"@agimon-ai/doompi-core": "0.0.1-alpha.
|
|
164
|
+
"@agimon-ai/doompi-core": "0.0.1-alpha.122",
|
|
165
165
|
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.103",
|
|
166
|
-
"@agimon-ai/doompi-ui": "0.0.1-alpha.
|
|
167
|
-
"@agimon-ai/doompi-web-components": "0.0.1-alpha.
|
|
166
|
+
"@agimon-ai/doompi-ui": "0.0.1-alpha.122",
|
|
167
|
+
"@agimon-ai/doompi-web-components": "0.0.1-alpha.80",
|
|
168
168
|
"@deepseek-ai/cordis": "4.0.4",
|
|
169
169
|
"typebox": "1.3.34"
|
|
170
170
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-DHSvdK6E.d.mts","names":[],"sources":["../src/schemas/task.ts"],"mappings":";;;cAOa;cACA;cACA;cAEA;cACA;cAEA;cACA;;;;;;;;;cAUA;;;;;;;;;iBAUG,uBAAuB,QAAQ,YAAY;;cAK9C;;;;;;cAcA,gBAAc,KAAA;;;;;;;;;;;;;;cA2Dd,sBAAoB,KAAA;;;;;;;;;;;;;;;;cA6BpB,kBAAgB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCjB,iBAAiB,cAAc;KAC/B,uBAAuB,cAAc;KACrC,aAAa,cAAc"}
|