@agent-plan/core 0.2.22 → 0.2.23-next.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/dist/display-status.d.ts +3 -5
- package/dist/display-status.d.ts.map +1 -1
- package/dist/display-status.js +5 -14
- package/dist/handoff-context.d.ts +60 -0
- package/dist/handoff-context.d.ts.map +1 -0
- package/dist/handoff-context.js +150 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/plan-store.d.ts +49 -9
- package/dist/plan-store.d.ts.map +1 -1
- package/dist/plan-store.js +376 -71
- package/dist/planner-rules.d.ts +21 -0
- package/dist/planner-rules.d.ts.map +1 -0
- package/dist/planner-rules.js +58 -0
- package/dist/read-tracking.d.ts +86 -0
- package/dist/read-tracking.d.ts.map +1 -0
- package/dist/read-tracking.js +192 -0
- package/dist/recap.d.ts.map +1 -1
- package/dist/recap.js +30 -24
- package/dist/schema.d.ts +551 -227
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +18 -6
- package/dist/task-selection.d.ts +38 -1
- package/dist/task-selection.d.ts.map +1 -1
- package/dist/task-selection.js +49 -11
- package/dist/task-start-outcome.d.ts +23 -0
- package/dist/task-start-outcome.d.ts.map +1 -0
- package/dist/task-start-outcome.js +23 -0
- package/package.json +1 -1
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe,aAAwB,CAAC;AACrD,eAAO,MAAM,UAAU,aAAiD,CAAC;AAEzE,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;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11 @@ export const ProjectSchema = z.object({
|
|
|
136
136
|
/** Ordered history of approved temporary work deviations; active entries form a resumable stack. */
|
|
137
137
|
workDeviations: z.array(WorkDeviationSchema).default([]),
|
|
138
138
|
});
|
|
139
|
-
export const SubtaskStatusSchema = z.enum(["planned", "in-progress", "
|
|
140
|
-
export const TaskStatusSchema = z.enum(["planned", "in-progress", "
|
|
141
|
-
export const PhaseStatusSchema = z.enum(["draft", "discovery", "planned", "in-progress", "
|
|
142
|
-
export const RequirementStatusSchema = z.enum(["planned", "in-progress", "
|
|
143
|
-
export const FeatureStatusSchema = z.enum(["planned", "in-progress", "
|
|
139
|
+
export const SubtaskStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
140
|
+
export const TaskStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
141
|
+
export const PhaseStatusSchema = z.enum(["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
142
|
+
export const RequirementStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
143
|
+
export const FeatureStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
144
144
|
export const SubtaskSchema = z.object({
|
|
145
145
|
id: z.string().min(1),
|
|
146
146
|
title: z.string().min(1),
|
|
@@ -161,7 +161,7 @@ export const ChecklistItemSchema = z.object({
|
|
|
161
161
|
const ChecklistInputSchema = z.union([z.string().min(1), ChecklistItemSchema]);
|
|
162
162
|
/** Status transitions that require a motivation note from the agent. */
|
|
163
163
|
export const STATUS_LOG_MOTIVATION_REQUIRED = new Set([
|
|
164
|
-
"
|
|
164
|
+
"blocked", "canceled", "deferred", "rejected", "waiting",
|
|
165
165
|
]);
|
|
166
166
|
/**
|
|
167
167
|
* Returns true when a status transition requires a written motivation.
|
|
@@ -178,6 +178,10 @@ export function needsMotivation(fromStatus, toStatus) {
|
|
|
178
178
|
return true;
|
|
179
179
|
return false;
|
|
180
180
|
}
|
|
181
|
+
export const SessionInfoSchema = z.object({
|
|
182
|
+
sessionId: z.string().min(1),
|
|
183
|
+
createdAt: TimestampSchema,
|
|
184
|
+
});
|
|
181
185
|
export const StatusLogEntrySchema = z.object({
|
|
182
186
|
id: z.string().min(1),
|
|
183
187
|
date: TimestampSchema,
|
|
@@ -226,6 +230,8 @@ export const TaskSchema = z.object({
|
|
|
226
230
|
completedAt: z.string().default(""),
|
|
227
231
|
createdAt: TimestampSchema,
|
|
228
232
|
updatedAt: TimestampSchema,
|
|
233
|
+
/** Durable attestations of completed full context reads by harness session. */
|
|
234
|
+
sessionInfo: z.array(SessionInfoSchema).default([]),
|
|
229
235
|
}).transform((task) => ({
|
|
230
236
|
...task,
|
|
231
237
|
checklist: task.checklist
|
|
@@ -291,6 +297,8 @@ export const PhaseSchema = z.object({
|
|
|
291
297
|
handoffHistory: z.array(HandoffHistoryEntrySchema).default([]),
|
|
292
298
|
/** Chronological audit trail of the DERIVED status (planned/in-progress/blocked/done/...). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted (still computed from child tasks at read time). Empty = no transition recorded yet (treated as "planned"). */
|
|
293
299
|
statusLog: z.array(PhaseStatusLogEntrySchema).default([]),
|
|
300
|
+
/** Durable attestations of completed full context reads by harness session. */
|
|
301
|
+
sessionInfo: z.array(SessionInfoSchema).default([]),
|
|
294
302
|
});
|
|
295
303
|
export const FeatureSchema = z.object({
|
|
296
304
|
id: z.string(),
|
|
@@ -318,6 +326,8 @@ export const FeatureSchema = z.object({
|
|
|
318
326
|
statusLog: z.array(StatusLogEntrySchema).default([]),
|
|
319
327
|
createdAt: TimestampSchema,
|
|
320
328
|
updatedAt: TimestampSchema,
|
|
329
|
+
/** Durable attestations of completed full context reads by harness session. */
|
|
330
|
+
sessionInfo: z.array(SessionInfoSchema).default([]),
|
|
321
331
|
});
|
|
322
332
|
export const FeaturesDocumentSchema = z.object({
|
|
323
333
|
features: z.array(FeatureSchema),
|
|
@@ -339,6 +349,8 @@ export const RequirementSchema = z.object({
|
|
|
339
349
|
linkedPhaseIds: z.array(z.string().min(1)).default([]),
|
|
340
350
|
createdAt: TimestampSchema,
|
|
341
351
|
updatedAt: TimestampSchema,
|
|
352
|
+
/** Durable attestations of completed full context reads by harness session. */
|
|
353
|
+
sessionInfo: z.array(SessionInfoSchema).default([]),
|
|
342
354
|
});
|
|
343
355
|
export const RequirementsDocumentSchema = z.object({
|
|
344
356
|
requirements: z.array(RequirementSchema),
|
package/dist/task-selection.d.ts
CHANGED
|
@@ -30,5 +30,42 @@ export declare function checkExplicitTaskStart(features: Feature[], phases: Phas
|
|
|
30
30
|
* may use its recommendation as a default while still allowing an explicitly
|
|
31
31
|
* approved temporary deviation.
|
|
32
32
|
*/
|
|
33
|
-
export declare function recommendNextTask(features: Feature[], phases: Phase[], deviations?: WorkDeviation[]): TaskRecommendation;
|
|
33
|
+
export declare function recommendNextTask(features: Feature[], phases: Phase[], deviations?: WorkDeviation[], currentPhaseId?: string): TaskRecommendation;
|
|
34
|
+
/**
|
|
35
|
+
* Snapshot fields surfaced in the explicit resume-required proposal. Derived
|
|
36
|
+
* from {@link TaskPauseSnapshot}; kept structural so adapters can build it
|
|
37
|
+
* without importing the full snapshot type.
|
|
38
|
+
*/
|
|
39
|
+
export interface ResumeRequiredSnapshot {
|
|
40
|
+
reason: string;
|
|
41
|
+
resumeLocation: string;
|
|
42
|
+
howToResume: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Structured, harness-agnostic resume-required proposal. A pending resume must
|
|
46
|
+
* be surfaced loudly (force awareness) but must NOT hard-block an explicit
|
|
47
|
+
* start of a different task. The caller keeps the start advisory/non-blocking;
|
|
48
|
+
* this only standardizes the human-readable message and the machine-readable
|
|
49
|
+
* payload so every harness (Pi, MCP, Web UI) proposes resume the same way.
|
|
50
|
+
*/
|
|
51
|
+
export interface ResumeRequiredProposal {
|
|
52
|
+
text: string;
|
|
53
|
+
structured: {
|
|
54
|
+
taskId: string;
|
|
55
|
+
phaseId: string;
|
|
56
|
+
snapshot: ResumeRequiredSnapshot | null;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build an explicit resume-required proposal. `ref` is the already-formatted
|
|
61
|
+
* composite reference (F00x/P00x/T00x) supplied by the caller; `snapshot` is
|
|
62
|
+
* the task's checkpoint (or the deviation's stored snapshot) when present.
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildResumeRequiredProposal(params: {
|
|
65
|
+
ref: string;
|
|
66
|
+
title: string;
|
|
67
|
+
taskId: string;
|
|
68
|
+
phaseId: string;
|
|
69
|
+
snapshot: ResumeRequiredSnapshot | null;
|
|
70
|
+
}): ResumeRequiredProposal;
|
|
34
71
|
//# sourceMappingURL=task-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-selection.d.ts","sourceRoot":"","sources":["../src/task-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAE5F,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;IACnC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mFAAm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,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,KAAK,EAAE,EACf,UAAU,GAAE,aAAa,EAAO,EAChC,cAAc,SAAK,GAClB,kBAAkB,CAoEpB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;KACzC,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACzC,GAAG,sBAAsB,CAuBzB"}
|
package/dist/task-selection.js
CHANGED
|
@@ -22,7 +22,6 @@ export function checkExplicitTaskStart(features, phases, taskId, deviations = []
|
|
|
22
22
|
|| deviation.state === "resolved")
|
|
23
23
|
&& deviation.resumeTaskId === taskId);
|
|
24
24
|
const startableStatus = candidate.task.status === "planned"
|
|
25
|
-
|| (candidate.task.status === "paused" && (isPreservedResumeTarget || candidate.task.pauseSnapshot !== null))
|
|
26
25
|
|| (candidate.task.status === "waiting" && isTemporaryOverride);
|
|
27
26
|
if (!startableStatus)
|
|
28
27
|
return { eligible: false, reason: `Task is not startable from ${candidate.task.status}.` };
|
|
@@ -42,7 +41,7 @@ export function checkExplicitTaskStart(features, phases, taskId, deviations = []
|
|
|
42
41
|
* may use its recommendation as a default while still allowing an explicitly
|
|
43
42
|
* approved temporary deviation.
|
|
44
43
|
*/
|
|
45
|
-
export function recommendNextTask(features, phases, deviations = []) {
|
|
44
|
+
export function recommendNextTask(features, phases, deviations = [], currentPhaseId = "") {
|
|
46
45
|
const featureById = new Map(features.map((feature) => [feature.id, feature]));
|
|
47
46
|
const candidates = phases.flatMap((phase) => phase.tasks.map((task) => ({ feature: phase.featureId ? featureById.get(phase.featureId) : undefined, phase, task })));
|
|
48
47
|
const byTaskId = new Map(candidates.map((candidate) => [candidate.task.id, candidate]));
|
|
@@ -53,7 +52,7 @@ export function recommendNextTask(features, phases, deviations = []) {
|
|
|
53
52
|
return { kind: "active", candidate: active[0], reason: "Resume the single active task." };
|
|
54
53
|
const newestFirst = (left, right) => right.createdAt.localeCompare(left.createdAt);
|
|
55
54
|
const resumable = (candidate) => candidate
|
|
56
|
-
&& (candidate.task.status === "planned" || candidate.task.status === "
|
|
55
|
+
&& (candidate.task.status === "planned" || candidate.task.status === "waiting");
|
|
57
56
|
const open = deviations
|
|
58
57
|
.filter((deviation) => deviation.state === "approved"
|
|
59
58
|
|| deviation.state === "active"
|
|
@@ -71,22 +70,22 @@ export function recommendNextTask(features, phases, deviations = []) {
|
|
|
71
70
|
return { kind: "resume", candidate: resume, deviation: top, reason: "Resume required: return to the task preserved by the most recent deviation." };
|
|
72
71
|
}
|
|
73
72
|
// A deviation explicitly makes its temporary task eligible while it is
|
|
74
|
-
// planned
|
|
73
|
+
// planned or waiting. Normal priority selection excludes these
|
|
75
74
|
// states unless the deviation deliberately selected them.
|
|
76
75
|
if (temporary && resumable(temporary)) {
|
|
77
76
|
return { kind: "resume", candidate: temporary, deviation: top, reason: "Continue the temporary task of the most recent approved deviation." };
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
// A
|
|
81
|
-
// new priority work. Select the most
|
|
82
|
-
const
|
|
83
|
-
.filter(({ task }) => task.status === "
|
|
79
|
+
// A saved checkpoint without a surviving deviation must never disappear
|
|
80
|
+
// behind new priority work. Select the most recent checkpoint (LIFO).
|
|
81
|
+
const checkpointed = candidates
|
|
82
|
+
.filter(({ task }) => task.status === "planned" && task.pauseSnapshot)
|
|
84
83
|
.sort((left, right) => right.task.pauseSnapshot.pausedAt.localeCompare(left.task.pauseSnapshot.pausedAt));
|
|
85
|
-
if (
|
|
84
|
+
if (checkpointed[0]) {
|
|
86
85
|
return {
|
|
87
86
|
kind: "resume",
|
|
88
|
-
candidate:
|
|
89
|
-
reason: "Resume the most
|
|
87
|
+
candidate: checkpointed[0],
|
|
88
|
+
reason: "Resume the most recent checkpoint before selecting new priority work.",
|
|
90
89
|
};
|
|
91
90
|
}
|
|
92
91
|
const ready = candidates.filter(({ feature, phase, task }) => {
|
|
@@ -96,8 +95,47 @@ export function recommendNextTask(features, phases, deviations = []) {
|
|
|
96
95
|
return false;
|
|
97
96
|
return task.dependsOn.every((id) => byTaskId.get(id)?.task.status === "done");
|
|
98
97
|
});
|
|
98
|
+
const currentPhaseReady = currentPhaseId
|
|
99
|
+
? ready.filter(({ phase }) => phase.id === currentPhaseId).sort((a, b) => compare(a.task, b.task))
|
|
100
|
+
: [];
|
|
101
|
+
if (currentPhaseReady[0]) {
|
|
102
|
+
return {
|
|
103
|
+
kind: "priority",
|
|
104
|
+
candidate: currentPhaseReady[0],
|
|
105
|
+
reason: "Continue the current phase before selecting new work elsewhere.",
|
|
106
|
+
};
|
|
107
|
+
}
|
|
99
108
|
ready.sort((a, b) => compare(a.feature ?? { priority: 0, number: 0 }, b.feature ?? { priority: 0, number: 0 }) || compare(a.phase, b.phase) || compare(a.task, b.task));
|
|
100
109
|
return ready[0]
|
|
101
110
|
? { kind: "priority", candidate: ready[0], reason: "Highest-priority ready task by feature, phase, then task." }
|
|
102
111
|
: { kind: "none", reason: "No ready task is available." };
|
|
103
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Build an explicit resume-required proposal. `ref` is the already-formatted
|
|
115
|
+
* composite reference (F00x/P00x/T00x) supplied by the caller; `snapshot` is
|
|
116
|
+
* the task's checkpoint (or the deviation's stored snapshot) when present.
|
|
117
|
+
*/
|
|
118
|
+
export function buildResumeRequiredProposal(params) {
|
|
119
|
+
const { ref, title, taskId, phaseId, snapshot } = params;
|
|
120
|
+
const reason = snapshot?.reason ?? "A preserved task is waiting to be resumed before new work begins.";
|
|
121
|
+
const resumeFrom = snapshot?.resumeLocation ?? "The preserved task's last checkpoint.";
|
|
122
|
+
const howToResume = snapshot?.howToResume ?? "Re-open the task detail and resume from its checkpoint.";
|
|
123
|
+
const text = [
|
|
124
|
+
`↩️ RESUME REQUIRED before starting a different task: ${ref} — ${title}`,
|
|
125
|
+
`Checkpoint reason: ${reason}`,
|
|
126
|
+
`Resume from: ${resumeFrom}`,
|
|
127
|
+
`How to resume: ${howToResume}`,
|
|
128
|
+
`Next action: task_start ${ref}`,
|
|
129
|
+
"Explicit task request honored — but resume the preserved work first, or explicitly confirm you intend to skip it.",
|
|
130
|
+
].join("\n");
|
|
131
|
+
return {
|
|
132
|
+
text,
|
|
133
|
+
structured: {
|
|
134
|
+
taskId,
|
|
135
|
+
phaseId,
|
|
136
|
+
snapshot: snapshot
|
|
137
|
+
? { reason: snapshot.reason, resumeLocation: snapshot.resumeLocation, howToResume: snapshot.howToResume }
|
|
138
|
+
: null,
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const TASK_START_ERROR_CODES: readonly ["PLAN_NOT_FOUND", "TASK_NOT_FOUND", "TASK_DONE", "CONTEXT_READ_REQUIRED", "REQUIREMENTS_READ_REQUIRED", "START_NOT_ALLOWED", "ACTIVE_TASK_CONFLICT", "PERSISTENCE_VERIFICATION_FAILED"];
|
|
2
|
+
export type TaskStartErrorCode = (typeof TASK_START_ERROR_CODES)[number];
|
|
3
|
+
export interface TaskStartDeniedOutcome {
|
|
4
|
+
started: false;
|
|
5
|
+
errorCode: TaskStartErrorCode;
|
|
6
|
+
message: string;
|
|
7
|
+
nextActions: string[];
|
|
8
|
+
taskId?: string;
|
|
9
|
+
requirementIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface TaskStartSucceededOutcome {
|
|
12
|
+
started: true;
|
|
13
|
+
taskId: string;
|
|
14
|
+
status: "in-progress";
|
|
15
|
+
alreadyStarted: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type TaskStartOutcome = TaskStartDeniedOutcome | TaskStartSucceededOutcome;
|
|
18
|
+
export declare function taskStartDenied(errorCode: TaskStartErrorCode, message: string, nextActions: string[], details?: {
|
|
19
|
+
taskId?: string;
|
|
20
|
+
requirementIds?: string[];
|
|
21
|
+
}): TaskStartDeniedOutcome;
|
|
22
|
+
export declare function taskStartSucceeded(taskId: string, alreadyStarted?: boolean): TaskStartSucceededOutcome;
|
|
23
|
+
//# sourceMappingURL=task-start-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-start-outcome.d.ts","sourceRoot":"","sources":["../src/task-start-outcome.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,mMASzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,yBAAyB,CAAC;AAElF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC3D,sBAAsB,CASxB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,UAAQ,GAAG,yBAAyB,CAEpG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const TASK_START_ERROR_CODES = [
|
|
2
|
+
"PLAN_NOT_FOUND",
|
|
3
|
+
"TASK_NOT_FOUND",
|
|
4
|
+
"TASK_DONE",
|
|
5
|
+
"CONTEXT_READ_REQUIRED",
|
|
6
|
+
"REQUIREMENTS_READ_REQUIRED",
|
|
7
|
+
"START_NOT_ALLOWED",
|
|
8
|
+
"ACTIVE_TASK_CONFLICT",
|
|
9
|
+
"PERSISTENCE_VERIFICATION_FAILED",
|
|
10
|
+
];
|
|
11
|
+
export function taskStartDenied(errorCode, message, nextActions, details = {}) {
|
|
12
|
+
return {
|
|
13
|
+
started: false,
|
|
14
|
+
errorCode,
|
|
15
|
+
message,
|
|
16
|
+
nextActions,
|
|
17
|
+
...(details.taskId ? { taskId: details.taskId } : {}),
|
|
18
|
+
...(details.requirementIds ? { requirementIds: details.requirementIds } : {}),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function taskStartSucceeded(taskId, alreadyStarted = false) {
|
|
22
|
+
return { started: true, taskId, status: "in-progress", alreadyStarted };
|
|
23
|
+
}
|
package/package.json
CHANGED