@agent-plan/core 0.2.19-next.0 → 0.2.19-next.10
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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/naming.d.ts +9 -0
- package/dist/naming.d.ts.map +1 -1
- package/dist/naming.js +8 -0
- package/dist/plan-store.d.ts +92 -16
- package/dist/plan-store.d.ts.map +1 -1
- package/dist/plan-store.js +376 -214
- package/dist/recap.d.ts +32 -0
- package/dist/recap.d.ts.map +1 -0
- package/dist/recap.js +119 -0
- package/dist/refs.d.ts +23 -0
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +72 -1
- package/dist/schema.d.ts +152 -27
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +33 -2
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -133,6 +133,10 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
133
133
|
currentPhaseId: z.ZodDefault<z.ZodString>;
|
|
134
134
|
inProgressTaskIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
135
135
|
nextSteps: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
136
|
+
/** When `nextSteps` last changed (free-text can go stale; the recap surfaces
|
|
137
|
+
* this so staleness is visible). Preserved across refreshResume (which keeps
|
|
138
|
+
* existing nextSteps); bumped only when saveResume receives new nextSteps. */
|
|
139
|
+
nextStepsUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
136
140
|
blockers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
137
141
|
notes: z.ZodDefault<z.ZodString>;
|
|
138
142
|
lastSessionSummary: z.ZodDefault<z.ZodString>;
|
|
@@ -142,6 +146,7 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
142
146
|
currentPhaseId: string;
|
|
143
147
|
inProgressTaskIds: string[];
|
|
144
148
|
nextSteps: string[];
|
|
149
|
+
nextStepsUpdatedAt: string;
|
|
145
150
|
blockers: string[];
|
|
146
151
|
notes: string;
|
|
147
152
|
lastSessionSummary: string;
|
|
@@ -151,6 +156,7 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
151
156
|
currentPhaseId?: string | undefined;
|
|
152
157
|
inProgressTaskIds?: string[] | undefined;
|
|
153
158
|
nextSteps?: string[] | undefined;
|
|
159
|
+
nextStepsUpdatedAt?: string | undefined;
|
|
154
160
|
blockers?: string[] | undefined;
|
|
155
161
|
notes?: string | undefined;
|
|
156
162
|
lastSessionSummary?: string | undefined;
|
|
@@ -314,6 +320,10 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
314
320
|
rationale?: string | undefined;
|
|
315
321
|
implementationNotes?: string | undefined;
|
|
316
322
|
}>, "many">>;
|
|
323
|
+
/** Monotonic global sequence counters — assigned at creation, never reused (gaps on delete). */
|
|
324
|
+
nextFeatureNumber: z.ZodDefault<z.ZodNumber>;
|
|
325
|
+
nextPhaseNumber: z.ZodDefault<z.ZodNumber>;
|
|
326
|
+
nextTaskNumber: z.ZodDefault<z.ZodNumber>;
|
|
317
327
|
}, "strip", z.ZodTypeAny, {
|
|
318
328
|
name: string;
|
|
319
329
|
goal: string;
|
|
@@ -340,6 +350,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
340
350
|
implementationNotes: string;
|
|
341
351
|
acceptedAt: string;
|
|
342
352
|
}[];
|
|
353
|
+
nextFeatureNumber: number;
|
|
354
|
+
nextPhaseNumber: number;
|
|
355
|
+
nextTaskNumber: number;
|
|
343
356
|
}, {
|
|
344
357
|
name: string;
|
|
345
358
|
workflowRules: {
|
|
@@ -366,6 +379,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
366
379
|
rationale?: string | undefined;
|
|
367
380
|
implementationNotes?: string | undefined;
|
|
368
381
|
}[] | undefined;
|
|
382
|
+
nextFeatureNumber?: number | undefined;
|
|
383
|
+
nextPhaseNumber?: number | undefined;
|
|
384
|
+
nextTaskNumber?: number | undefined;
|
|
369
385
|
}>;
|
|
370
386
|
export declare const SubtaskStatusSchema: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
371
387
|
export declare const TaskStatusSchema: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
@@ -441,6 +457,7 @@ export declare const StatusLogEntrySchema: z.ZodObject<{
|
|
|
441
457
|
export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
442
458
|
id: z.ZodString;
|
|
443
459
|
phaseId: z.ZodString;
|
|
460
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
444
461
|
number: z.ZodDefault<z.ZodNumber>;
|
|
445
462
|
shortId: z.ZodDefault<z.ZodString>;
|
|
446
463
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -719,15 +736,30 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
719
736
|
startedAt?: string | undefined;
|
|
720
737
|
completedAt?: string | undefined;
|
|
721
738
|
}>;
|
|
739
|
+
export declare const HandoffHistoryEntrySchema: z.ZodObject<{
|
|
740
|
+
/** Relative path under .planner/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
741
|
+
file: z.ZodDefault<z.ZodString>;
|
|
742
|
+
clearedAt: z.ZodString;
|
|
743
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
744
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
745
|
+
}, "strip", z.ZodTypeAny, {
|
|
746
|
+
file: string;
|
|
747
|
+
clearedAt: string;
|
|
748
|
+
reason: string;
|
|
749
|
+
}, {
|
|
750
|
+
clearedAt: string;
|
|
751
|
+
file?: string | undefined;
|
|
752
|
+
reason?: string | undefined;
|
|
753
|
+
}>;
|
|
722
754
|
export declare const PhaseSchema: z.ZodObject<{
|
|
723
755
|
id: z.ZodString;
|
|
724
756
|
featureId: z.ZodOptional<z.ZodString>;
|
|
757
|
+
/** Global project-wide phase sequence (assigned once at creation from project.nextPhaseNumber; stable, gaps on delete). Bare P00x is unambiguous. */
|
|
725
758
|
number: z.ZodNumber;
|
|
726
759
|
shortId: z.ZodDefault<z.ZodString>;
|
|
727
760
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
728
761
|
slug: z.ZodString;
|
|
729
762
|
title: z.ZodString;
|
|
730
|
-
status: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
731
763
|
discussedAt: z.ZodDefault<z.ZodString>;
|
|
732
764
|
contextReady: z.ZodDefault<z.ZodBoolean>;
|
|
733
765
|
contextReadyReason: z.ZodDefault<z.ZodString>;
|
|
@@ -768,6 +800,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
768
800
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
769
801
|
id: z.ZodString;
|
|
770
802
|
phaseId: z.ZodString;
|
|
803
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
771
804
|
number: z.ZodDefault<z.ZodNumber>;
|
|
772
805
|
shortId: z.ZodDefault<z.ZodString>;
|
|
773
806
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1050,9 +1083,32 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1050
1083
|
updatedAt: z.ZodString;
|
|
1051
1084
|
handoff: z.ZodDefault<z.ZodString>;
|
|
1052
1085
|
handoffUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
1086
|
+
/** When the handoff was last read/acknowledged on recap (ISO). Non-empty means
|
|
1087
|
+
* the agent has seen it; the recap won't re-prompt every turn. The handoff
|
|
1088
|
+
* content is KEPT until a task in the phase starts (auto-clear) or the phase
|
|
1089
|
+
* completes — so a restart between read and resume does not lose context. */
|
|
1090
|
+
handoffReadAt: z.ZodDefault<z.ZodString>;
|
|
1091
|
+
/** Metadata for recently-cleared handoffs (newest-first, capped at 5). The
|
|
1092
|
+
* full content lives as .md files in .planner/handoff-archive/ (gitignored);
|
|
1093
|
+
* this array only holds the pointer + clear reason + timestamp, so the phase
|
|
1094
|
+
* JSON stays lean and the archive is recoverable. */
|
|
1095
|
+
handoffHistory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1096
|
+
/** Relative path under .planner/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
1097
|
+
file: z.ZodDefault<z.ZodString>;
|
|
1098
|
+
clearedAt: z.ZodString;
|
|
1099
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
1100
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
1101
|
+
}, "strip", z.ZodTypeAny, {
|
|
1102
|
+
file: string;
|
|
1103
|
+
clearedAt: string;
|
|
1104
|
+
reason: string;
|
|
1105
|
+
}, {
|
|
1106
|
+
clearedAt: string;
|
|
1107
|
+
file?: string | undefined;
|
|
1108
|
+
reason?: string | undefined;
|
|
1109
|
+
}>, "many">>;
|
|
1053
1110
|
}, "strip", z.ZodTypeAny, {
|
|
1054
1111
|
number: number;
|
|
1055
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1056
1112
|
dependencies: string[];
|
|
1057
1113
|
updatedAt: string;
|
|
1058
1114
|
notes: string;
|
|
@@ -1132,10 +1188,15 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1132
1188
|
}[];
|
|
1133
1189
|
handoff: string;
|
|
1134
1190
|
handoffUpdatedAt: string;
|
|
1191
|
+
handoffReadAt: string;
|
|
1192
|
+
handoffHistory: {
|
|
1193
|
+
file: string;
|
|
1194
|
+
clearedAt: string;
|
|
1195
|
+
reason: string;
|
|
1196
|
+
}[];
|
|
1135
1197
|
featureId?: string | undefined;
|
|
1136
1198
|
}, {
|
|
1137
1199
|
number: number;
|
|
1138
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1139
1200
|
updatedAt: string;
|
|
1140
1201
|
id: string;
|
|
1141
1202
|
createdAt: string;
|
|
@@ -1216,15 +1277,21 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1216
1277
|
}[] | undefined;
|
|
1217
1278
|
handoff?: string | undefined;
|
|
1218
1279
|
handoffUpdatedAt?: string | undefined;
|
|
1280
|
+
handoffReadAt?: string | undefined;
|
|
1281
|
+
handoffHistory?: {
|
|
1282
|
+
clearedAt: string;
|
|
1283
|
+
file?: string | undefined;
|
|
1284
|
+
reason?: string | undefined;
|
|
1285
|
+
}[] | undefined;
|
|
1219
1286
|
}>;
|
|
1220
1287
|
export declare const FeatureSchema: z.ZodObject<{
|
|
1221
1288
|
id: z.ZodString;
|
|
1289
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1222
1290
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1223
1291
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1224
1292
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
1225
1293
|
name: z.ZodString;
|
|
1226
1294
|
description: z.ZodDefault<z.ZodString>;
|
|
1227
|
-
status: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1228
1295
|
discussedAt: z.ZodDefault<z.ZodString>;
|
|
1229
1296
|
contextReady: z.ZodDefault<z.ZodBoolean>;
|
|
1230
1297
|
contextReadyReason: z.ZodDefault<z.ZodString>;
|
|
@@ -1260,7 +1327,6 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1260
1327
|
updatedAt: z.ZodString;
|
|
1261
1328
|
}, "strip", z.ZodTypeAny, {
|
|
1262
1329
|
number: number;
|
|
1263
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1264
1330
|
name: string;
|
|
1265
1331
|
updatedAt: string;
|
|
1266
1332
|
id: string;
|
|
@@ -1286,7 +1352,6 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1286
1352
|
workRemaining: string;
|
|
1287
1353
|
phaseIds: string[];
|
|
1288
1354
|
}, {
|
|
1289
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1290
1355
|
name: string;
|
|
1291
1356
|
updatedAt: string;
|
|
1292
1357
|
id: string;
|
|
@@ -1316,12 +1381,12 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1316
1381
|
export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
1317
1382
|
features: z.ZodArray<z.ZodObject<{
|
|
1318
1383
|
id: z.ZodString;
|
|
1384
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1319
1385
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1320
1386
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1321
1387
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
1322
1388
|
name: z.ZodString;
|
|
1323
1389
|
description: z.ZodDefault<z.ZodString>;
|
|
1324
|
-
status: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1325
1390
|
discussedAt: z.ZodDefault<z.ZodString>;
|
|
1326
1391
|
contextReady: z.ZodDefault<z.ZodBoolean>;
|
|
1327
1392
|
contextReadyReason: z.ZodDefault<z.ZodString>;
|
|
@@ -1357,7 +1422,6 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1357
1422
|
updatedAt: z.ZodString;
|
|
1358
1423
|
}, "strip", z.ZodTypeAny, {
|
|
1359
1424
|
number: number;
|
|
1360
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1361
1425
|
name: string;
|
|
1362
1426
|
updatedAt: string;
|
|
1363
1427
|
id: string;
|
|
@@ -1383,7 +1447,6 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1383
1447
|
workRemaining: string;
|
|
1384
1448
|
phaseIds: string[];
|
|
1385
1449
|
}, {
|
|
1386
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1387
1450
|
name: string;
|
|
1388
1451
|
updatedAt: string;
|
|
1389
1452
|
id: string;
|
|
@@ -1413,7 +1476,6 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1413
1476
|
}, "strip", z.ZodTypeAny, {
|
|
1414
1477
|
features: {
|
|
1415
1478
|
number: number;
|
|
1416
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1417
1479
|
name: string;
|
|
1418
1480
|
updatedAt: string;
|
|
1419
1481
|
id: string;
|
|
@@ -1441,7 +1503,6 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1441
1503
|
}[];
|
|
1442
1504
|
}, {
|
|
1443
1505
|
features: {
|
|
1444
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1445
1506
|
name: string;
|
|
1446
1507
|
updatedAt: string;
|
|
1447
1508
|
id: string;
|
|
@@ -1723,6 +1784,10 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1723
1784
|
rationale?: string | undefined;
|
|
1724
1785
|
implementationNotes?: string | undefined;
|
|
1725
1786
|
}>, "many">>;
|
|
1787
|
+
/** Monotonic global sequence counters — assigned at creation, never reused (gaps on delete). */
|
|
1788
|
+
nextFeatureNumber: z.ZodDefault<z.ZodNumber>;
|
|
1789
|
+
nextPhaseNumber: z.ZodDefault<z.ZodNumber>;
|
|
1790
|
+
nextTaskNumber: z.ZodDefault<z.ZodNumber>;
|
|
1726
1791
|
}, "strip", z.ZodTypeAny, {
|
|
1727
1792
|
name: string;
|
|
1728
1793
|
goal: string;
|
|
@@ -1749,6 +1814,9 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1749
1814
|
implementationNotes: string;
|
|
1750
1815
|
acceptedAt: string;
|
|
1751
1816
|
}[];
|
|
1817
|
+
nextFeatureNumber: number;
|
|
1818
|
+
nextPhaseNumber: number;
|
|
1819
|
+
nextTaskNumber: number;
|
|
1752
1820
|
}, {
|
|
1753
1821
|
name: string;
|
|
1754
1822
|
workflowRules: {
|
|
@@ -1775,16 +1843,19 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1775
1843
|
rationale?: string | undefined;
|
|
1776
1844
|
implementationNotes?: string | undefined;
|
|
1777
1845
|
}[] | undefined;
|
|
1846
|
+
nextFeatureNumber?: number | undefined;
|
|
1847
|
+
nextPhaseNumber?: number | undefined;
|
|
1848
|
+
nextTaskNumber?: number | undefined;
|
|
1778
1849
|
}>;
|
|
1779
1850
|
features: z.ZodObject<{
|
|
1780
1851
|
features: z.ZodArray<z.ZodObject<{
|
|
1781
1852
|
id: z.ZodString;
|
|
1853
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1782
1854
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1783
1855
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1784
1856
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
1785
1857
|
name: z.ZodString;
|
|
1786
1858
|
description: z.ZodDefault<z.ZodString>;
|
|
1787
|
-
status: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1788
1859
|
discussedAt: z.ZodDefault<z.ZodString>;
|
|
1789
1860
|
contextReady: z.ZodDefault<z.ZodBoolean>;
|
|
1790
1861
|
contextReadyReason: z.ZodDefault<z.ZodString>;
|
|
@@ -1820,7 +1891,6 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1820
1891
|
updatedAt: z.ZodString;
|
|
1821
1892
|
}, "strip", z.ZodTypeAny, {
|
|
1822
1893
|
number: number;
|
|
1823
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1824
1894
|
name: string;
|
|
1825
1895
|
updatedAt: string;
|
|
1826
1896
|
id: string;
|
|
@@ -1846,7 +1916,6 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1846
1916
|
workRemaining: string;
|
|
1847
1917
|
phaseIds: string[];
|
|
1848
1918
|
}, {
|
|
1849
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1850
1919
|
name: string;
|
|
1851
1920
|
updatedAt: string;
|
|
1852
1921
|
id: string;
|
|
@@ -1876,7 +1945,6 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1876
1945
|
}, "strip", z.ZodTypeAny, {
|
|
1877
1946
|
features: {
|
|
1878
1947
|
number: number;
|
|
1879
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1880
1948
|
name: string;
|
|
1881
1949
|
updatedAt: string;
|
|
1882
1950
|
id: string;
|
|
@@ -1904,7 +1972,6 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1904
1972
|
}[];
|
|
1905
1973
|
}, {
|
|
1906
1974
|
features: {
|
|
1907
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1908
1975
|
name: string;
|
|
1909
1976
|
updatedAt: string;
|
|
1910
1977
|
id: string;
|
|
@@ -2036,12 +2103,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2036
2103
|
phases: z.ZodArray<z.ZodObject<{
|
|
2037
2104
|
id: z.ZodString;
|
|
2038
2105
|
featureId: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
/** Global project-wide phase sequence (assigned once at creation from project.nextPhaseNumber; stable, gaps on delete). Bare P00x is unambiguous. */
|
|
2039
2107
|
number: z.ZodNumber;
|
|
2040
2108
|
shortId: z.ZodDefault<z.ZodString>;
|
|
2041
2109
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
2042
2110
|
slug: z.ZodString;
|
|
2043
2111
|
title: z.ZodString;
|
|
2044
|
-
status: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
2045
2112
|
discussedAt: z.ZodDefault<z.ZodString>;
|
|
2046
2113
|
contextReady: z.ZodDefault<z.ZodBoolean>;
|
|
2047
2114
|
contextReadyReason: z.ZodDefault<z.ZodString>;
|
|
@@ -2082,6 +2149,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2082
2149
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
2083
2150
|
id: z.ZodString;
|
|
2084
2151
|
phaseId: z.ZodString;
|
|
2152
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
2085
2153
|
number: z.ZodDefault<z.ZodNumber>;
|
|
2086
2154
|
shortId: z.ZodDefault<z.ZodString>;
|
|
2087
2155
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2364,9 +2432,32 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2364
2432
|
updatedAt: z.ZodString;
|
|
2365
2433
|
handoff: z.ZodDefault<z.ZodString>;
|
|
2366
2434
|
handoffUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
2435
|
+
/** When the handoff was last read/acknowledged on recap (ISO). Non-empty means
|
|
2436
|
+
* the agent has seen it; the recap won't re-prompt every turn. The handoff
|
|
2437
|
+
* content is KEPT until a task in the phase starts (auto-clear) or the phase
|
|
2438
|
+
* completes — so a restart between read and resume does not lose context. */
|
|
2439
|
+
handoffReadAt: z.ZodDefault<z.ZodString>;
|
|
2440
|
+
/** Metadata for recently-cleared handoffs (newest-first, capped at 5). The
|
|
2441
|
+
* full content lives as .md files in .planner/handoff-archive/ (gitignored);
|
|
2442
|
+
* this array only holds the pointer + clear reason + timestamp, so the phase
|
|
2443
|
+
* JSON stays lean and the archive is recoverable. */
|
|
2444
|
+
handoffHistory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2445
|
+
/** Relative path under .planner/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
2446
|
+
file: z.ZodDefault<z.ZodString>;
|
|
2447
|
+
clearedAt: z.ZodString;
|
|
2448
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
2449
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
2450
|
+
}, "strip", z.ZodTypeAny, {
|
|
2451
|
+
file: string;
|
|
2452
|
+
clearedAt: string;
|
|
2453
|
+
reason: string;
|
|
2454
|
+
}, {
|
|
2455
|
+
clearedAt: string;
|
|
2456
|
+
file?: string | undefined;
|
|
2457
|
+
reason?: string | undefined;
|
|
2458
|
+
}>, "many">>;
|
|
2367
2459
|
}, "strip", z.ZodTypeAny, {
|
|
2368
2460
|
number: number;
|
|
2369
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2370
2461
|
dependencies: string[];
|
|
2371
2462
|
updatedAt: string;
|
|
2372
2463
|
notes: string;
|
|
@@ -2446,10 +2537,15 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2446
2537
|
}[];
|
|
2447
2538
|
handoff: string;
|
|
2448
2539
|
handoffUpdatedAt: string;
|
|
2540
|
+
handoffReadAt: string;
|
|
2541
|
+
handoffHistory: {
|
|
2542
|
+
file: string;
|
|
2543
|
+
clearedAt: string;
|
|
2544
|
+
reason: string;
|
|
2545
|
+
}[];
|
|
2449
2546
|
featureId?: string | undefined;
|
|
2450
2547
|
}, {
|
|
2451
2548
|
number: number;
|
|
2452
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2453
2549
|
updatedAt: string;
|
|
2454
2550
|
id: string;
|
|
2455
2551
|
createdAt: string;
|
|
@@ -2530,12 +2626,17 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2530
2626
|
}[] | undefined;
|
|
2531
2627
|
handoff?: string | undefined;
|
|
2532
2628
|
handoffUpdatedAt?: string | undefined;
|
|
2629
|
+
handoffReadAt?: string | undefined;
|
|
2630
|
+
handoffHistory?: {
|
|
2631
|
+
clearedAt: string;
|
|
2632
|
+
file?: string | undefined;
|
|
2633
|
+
reason?: string | undefined;
|
|
2634
|
+
}[] | undefined;
|
|
2533
2635
|
}>, "many">;
|
|
2534
2636
|
}, "strip", z.ZodTypeAny, {
|
|
2535
2637
|
features: {
|
|
2536
2638
|
features: {
|
|
2537
2639
|
number: number;
|
|
2538
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2539
2640
|
name: string;
|
|
2540
2641
|
updatedAt: string;
|
|
2541
2642
|
id: string;
|
|
@@ -2614,10 +2715,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2614
2715
|
implementationNotes: string;
|
|
2615
2716
|
acceptedAt: string;
|
|
2616
2717
|
}[];
|
|
2718
|
+
nextFeatureNumber: number;
|
|
2719
|
+
nextPhaseNumber: number;
|
|
2720
|
+
nextTaskNumber: number;
|
|
2617
2721
|
};
|
|
2618
2722
|
phases: {
|
|
2619
2723
|
number: number;
|
|
2620
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2621
2724
|
dependencies: string[];
|
|
2622
2725
|
updatedAt: string;
|
|
2623
2726
|
notes: string;
|
|
@@ -2697,12 +2800,17 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2697
2800
|
}[];
|
|
2698
2801
|
handoff: string;
|
|
2699
2802
|
handoffUpdatedAt: string;
|
|
2803
|
+
handoffReadAt: string;
|
|
2804
|
+
handoffHistory: {
|
|
2805
|
+
file: string;
|
|
2806
|
+
clearedAt: string;
|
|
2807
|
+
reason: string;
|
|
2808
|
+
}[];
|
|
2700
2809
|
featureId?: string | undefined;
|
|
2701
2810
|
}[];
|
|
2702
2811
|
}, {
|
|
2703
2812
|
features: {
|
|
2704
2813
|
features: {
|
|
2705
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2706
2814
|
name: string;
|
|
2707
2815
|
updatedAt: string;
|
|
2708
2816
|
id: string;
|
|
@@ -2782,10 +2890,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2782
2890
|
rationale?: string | undefined;
|
|
2783
2891
|
implementationNotes?: string | undefined;
|
|
2784
2892
|
}[] | undefined;
|
|
2893
|
+
nextFeatureNumber?: number | undefined;
|
|
2894
|
+
nextPhaseNumber?: number | undefined;
|
|
2895
|
+
nextTaskNumber?: number | undefined;
|
|
2785
2896
|
};
|
|
2786
2897
|
phases: {
|
|
2787
2898
|
number: number;
|
|
2788
|
-
status: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2789
2899
|
updatedAt: string;
|
|
2790
2900
|
id: string;
|
|
2791
2901
|
createdAt: string;
|
|
@@ -2866,6 +2976,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2866
2976
|
}[] | undefined;
|
|
2867
2977
|
handoff?: string | undefined;
|
|
2868
2978
|
handoffUpdatedAt?: string | undefined;
|
|
2979
|
+
handoffReadAt?: string | undefined;
|
|
2980
|
+
handoffHistory?: {
|
|
2981
|
+
clearedAt: string;
|
|
2982
|
+
file?: string | undefined;
|
|
2983
|
+
reason?: string | undefined;
|
|
2984
|
+
}[] | undefined;
|
|
2869
2985
|
}[];
|
|
2870
2986
|
}>;
|
|
2871
2987
|
export type Timestamp = z.infer<typeof TimestampSchema>;
|
|
@@ -2876,8 +2992,12 @@ export type ActivityEntry = z.infer<typeof ActivityEntrySchema>;
|
|
|
2876
2992
|
export type ActivityLog = z.infer<typeof ActivityLogSchema>;
|
|
2877
2993
|
export type ResumeFocus = z.infer<typeof ResumeFocusSchema>;
|
|
2878
2994
|
export type FeatureStatus = z.infer<typeof FeatureStatusSchema>;
|
|
2879
|
-
export type Feature = z.infer<typeof FeatureSchema
|
|
2880
|
-
|
|
2995
|
+
export type Feature = z.infer<typeof FeatureSchema> & {
|
|
2996
|
+
status: FeatureStatus;
|
|
2997
|
+
};
|
|
2998
|
+
export type FeaturesDocument = {
|
|
2999
|
+
features: Feature[];
|
|
3000
|
+
};
|
|
2881
3001
|
export type PhaseStatus = z.infer<typeof PhaseStatusSchema>;
|
|
2882
3002
|
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
2883
3003
|
export type RequirementStatus = z.infer<typeof RequirementStatusSchema>;
|
|
@@ -2890,9 +3010,14 @@ export type Subtask = z.infer<typeof SubtaskSchema>;
|
|
|
2890
3010
|
export type ChecklistItem = z.infer<typeof ChecklistItemSchema>;
|
|
2891
3011
|
export type StatusLogEntry = z.infer<typeof StatusLogEntrySchema>;
|
|
2892
3012
|
export type Task = z.infer<typeof TaskSchema>;
|
|
2893
|
-
export type Phase = z.infer<typeof PhaseSchema
|
|
3013
|
+
export type Phase = z.infer<typeof PhaseSchema> & {
|
|
3014
|
+
status: PhaseStatus;
|
|
3015
|
+
};
|
|
2894
3016
|
export type MacroTask = z.infer<typeof MacroTaskSchema>;
|
|
2895
3017
|
export type Requirement = z.infer<typeof RequirementSchema>;
|
|
2896
3018
|
export type RequirementsDocument = z.infer<typeof RequirementsDocumentSchema>;
|
|
2897
|
-
export type PlanWorkspace = z.infer<typeof PlanWorkspaceSchema
|
|
3019
|
+
export type PlanWorkspace = Omit<z.infer<typeof PlanWorkspaceSchema>, "phases" | "features"> & {
|
|
3020
|
+
phases: Phase[];
|
|
3021
|
+
features: FeaturesDocument;
|
|
3022
|
+
};
|
|
2898
3023
|
//# sourceMappingURL=schema.d.ts.map
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhC,CAAC;AAEH,eAAO,MAAM,iBAAiB
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;IAK5B;;mFAE+E;;;;;;;;;;;;;;;;;;;;;;;;;;EAM/E,CAA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AAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC,GAAG;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAA;CAAE,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -37,6 +37,10 @@ export const ResumeFocusSchema = z.object({
|
|
|
37
37
|
currentPhaseId: z.string().default(""),
|
|
38
38
|
inProgressTaskIds: z.array(z.string().min(1)).default([]),
|
|
39
39
|
nextSteps: z.array(z.string().min(1)).default([]),
|
|
40
|
+
/** When `nextSteps` last changed (free-text can go stale; the recap surfaces
|
|
41
|
+
* this so staleness is visible). Preserved across refreshResume (which keeps
|
|
42
|
+
* existing nextSteps); bumped only when saveResume receives new nextSteps. */
|
|
43
|
+
nextStepsUpdatedAt: z.string().default(""),
|
|
40
44
|
blockers: z.array(z.string().min(1)).default([]),
|
|
41
45
|
notes: z.string().default(""),
|
|
42
46
|
lastSessionSummary: z.string().default(""),
|
|
@@ -87,6 +91,10 @@ export const ProjectSchema = z.object({
|
|
|
87
91
|
chatLanguage: z.string().default(""),
|
|
88
92
|
workflowRules: WorkflowRulesSchema,
|
|
89
93
|
acceptedDecisions: z.array(AcceptedDecisionSchema).default([]),
|
|
94
|
+
/** Monotonic global sequence counters — assigned at creation, never reused (gaps on delete). */
|
|
95
|
+
nextFeatureNumber: z.number().int().positive().default(1),
|
|
96
|
+
nextPhaseNumber: z.number().int().positive().default(1),
|
|
97
|
+
nextTaskNumber: z.number().int().positive().default(1),
|
|
90
98
|
});
|
|
91
99
|
export const SubtaskStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
92
100
|
export const TaskStatusSchema = z.enum(["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]);
|
|
@@ -137,6 +145,7 @@ export const StatusLogEntrySchema = z.object({
|
|
|
137
145
|
export const TaskSchema = z.object({
|
|
138
146
|
id: z.string(),
|
|
139
147
|
phaseId: z.string(),
|
|
148
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
140
149
|
number: z.number().int().nonnegative().default(0),
|
|
141
150
|
shortId: z.string().regex(/^(|[A-Z2-9]{5})$/).default(""),
|
|
142
151
|
priority: z.number().int().nonnegative().default(0),
|
|
@@ -163,15 +172,25 @@ export const TaskSchema = z.object({
|
|
|
163
172
|
: { ...item, id: item.id || createChecklistItemId(task.id, index + 1, item.title), title: item.title.trim(), checked: item.checked ?? false })
|
|
164
173
|
.filter((item) => item.title.length > 0),
|
|
165
174
|
}));
|
|
175
|
+
export const HandoffHistoryEntrySchema = z.object({
|
|
176
|
+
/** Relative path under .planner/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
177
|
+
file: z.string().default(""),
|
|
178
|
+
clearedAt: TimestampSchema,
|
|
179
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
180
|
+
reason: z.string().default(""),
|
|
181
|
+
});
|
|
166
182
|
export const PhaseSchema = z.object({
|
|
167
183
|
id: z.string(),
|
|
168
184
|
featureId: z.string().optional(),
|
|
185
|
+
/** Global project-wide phase sequence (assigned once at creation from project.nextPhaseNumber; stable, gaps on delete). Bare P00x is unambiguous. */
|
|
169
186
|
number: z.number().int().positive(),
|
|
170
187
|
shortId: z.string().regex(/^(|[A-Z2-9]{5})$/).default(""),
|
|
171
188
|
priority: z.number().int().nonnegative().default(0),
|
|
172
189
|
slug: SlugSchema,
|
|
173
190
|
title: z.string().min(1),
|
|
174
|
-
|
|
191
|
+
// NOTE: `status` is intentionally ABSENT from the schema — it is a DERIVED
|
|
192
|
+
// value (computed from child tasks at read time) and is never persisted.
|
|
193
|
+
// The runtime `Phase` type re-adds it as a non-optional field (see below).
|
|
175
194
|
discussedAt: z.string().default(""),
|
|
176
195
|
contextReady: z.boolean().default(false),
|
|
177
196
|
contextReadyReason: z.string().default(""),
|
|
@@ -193,15 +212,27 @@ export const PhaseSchema = z.object({
|
|
|
193
212
|
updatedAt: TimestampSchema,
|
|
194
213
|
handoff: z.string().default(""),
|
|
195
214
|
handoffUpdatedAt: z.string().default(""),
|
|
215
|
+
/** When the handoff was last read/acknowledged on recap (ISO). Non-empty means
|
|
216
|
+
* the agent has seen it; the recap won't re-prompt every turn. The handoff
|
|
217
|
+
* content is KEPT until a task in the phase starts (auto-clear) or the phase
|
|
218
|
+
* completes — so a restart between read and resume does not lose context. */
|
|
219
|
+
handoffReadAt: z.string().default(""),
|
|
220
|
+
/** Metadata for recently-cleared handoffs (newest-first, capped at 5). The
|
|
221
|
+
* full content lives as .md files in .planner/handoff-archive/ (gitignored);
|
|
222
|
+
* this array only holds the pointer + clear reason + timestamp, so the phase
|
|
223
|
+
* JSON stays lean and the archive is recoverable. */
|
|
224
|
+
handoffHistory: z.array(HandoffHistoryEntrySchema).default([]),
|
|
196
225
|
});
|
|
197
226
|
export const FeatureSchema = z.object({
|
|
198
227
|
id: z.string(),
|
|
228
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
199
229
|
number: z.number().int().nonnegative().default(0),
|
|
200
230
|
shortId: z.string().regex(/^(|[A-Z2-9]{5})$/).default(""),
|
|
201
231
|
priority: z.number().int().nonnegative().default(0),
|
|
202
232
|
name: z.string().min(1),
|
|
203
233
|
description: z.string().default(""),
|
|
204
|
-
|
|
234
|
+
// NOTE: `status` is intentionally ABSENT — it is DERIVED from child phases
|
|
235
|
+
// at read time and never persisted. The runtime `Feature` type re-adds it.
|
|
205
236
|
discussedAt: z.string().default(""),
|
|
206
237
|
contextReady: z.boolean().default(false),
|
|
207
238
|
contextReadyReason: z.string().default(""),
|
package/package.json
CHANGED