opencode-plugin-flow 4.3.4 → 4.3.6

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.
@@ -21,6 +21,11 @@ export declare const FlowPlanSaveSchema: z.ZodObject<{
21
21
  completed: "completed";
22
22
  blocked: "blocked";
23
23
  }>>;
24
+ reviewDepth: z.ZodOptional<z.ZodEnum<{
25
+ quick: "quick";
26
+ standard: "standard";
27
+ detailed: "detailed";
28
+ }>>;
24
29
  targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
30
  validation: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
31
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -29,6 +34,7 @@ export declare const FlowPlanSaveSchema: z.ZodObject<{
29
34
  }, z.core.$strict>;
30
35
  export declare const FlowRunStartSchema: z.ZodObject<{
31
36
  featureId: z.ZodOptional<z.ZodString>;
37
+ phaseBoundaryAck: z.ZodOptional<z.ZodBoolean>;
32
38
  }, z.core.$strict>;
33
39
  export declare const FlowFeatureResetSchema: z.ZodObject<{
34
40
  featureId: z.ZodString;
@@ -63,6 +69,11 @@ export declare const FlowFeatureCompleteToolSchema: z.ZodObject<{
63
69
  targeted: "targeted";
64
70
  broad: "broad";
65
71
  }>>;
72
+ featureReviewDepth: z.ZodOptional<z.ZodEnum<{
73
+ quick: "quick";
74
+ standard: "standard";
75
+ detailed: "detailed";
76
+ }>>;
66
77
  featureReview: z.ZodOptional<z.ZodObject<{
67
78
  status: z.ZodEnum<{
68
79
  passed: "passed";
@@ -26,6 +26,11 @@ export declare const ValidationScopeSchema: z.ZodEnum<{
26
26
  targeted: "targeted";
27
27
  broad: "broad";
28
28
  }>;
29
+ export declare const FeatureReviewDepthSchema: z.ZodEnum<{
30
+ quick: "quick";
31
+ standard: "standard";
32
+ detailed: "detailed";
33
+ }>;
29
34
  export declare const FinalReviewPolicySchema: z.ZodEnum<{
30
35
  broad: "broad";
31
36
  detailed: "detailed";
@@ -90,6 +95,11 @@ export declare const FeatureSchema: z.ZodObject<{
90
95
  completed: "completed";
91
96
  blocked: "blocked";
92
97
  }>>;
98
+ reviewDepth: z.ZodDefault<z.ZodEnum<{
99
+ quick: "quick";
100
+ standard: "standard";
101
+ detailed: "detailed";
102
+ }>>;
93
103
  targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
94
104
  validation: z.ZodDefault<z.ZodArray<z.ZodString>>;
95
105
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -113,6 +123,11 @@ export declare const PlanSchema: z.ZodObject<{
113
123
  completed: "completed";
114
124
  blocked: "blocked";
115
125
  }>>;
126
+ reviewDepth: z.ZodDefault<z.ZodEnum<{
127
+ quick: "quick";
128
+ standard: "standard";
129
+ detailed: "detailed";
130
+ }>>;
116
131
  targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
117
132
  validation: z.ZodDefault<z.ZodArray<z.ZodString>>;
118
133
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -137,6 +152,11 @@ export declare const PlanInputSchema: z.ZodObject<{
137
152
  completed: "completed";
138
153
  blocked: "blocked";
139
154
  }>>;
155
+ reviewDepth: z.ZodOptional<z.ZodEnum<{
156
+ quick: "quick";
157
+ standard: "standard";
158
+ detailed: "detailed";
159
+ }>>;
140
160
  targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
161
  validation: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
162
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -180,6 +200,11 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
180
200
  targeted: "targeted";
181
201
  broad: "broad";
182
202
  }>;
203
+ featureReviewDepth: z.ZodEnum<{
204
+ quick: "quick";
205
+ standard: "standard";
206
+ detailed: "detailed";
207
+ }>;
183
208
  featureReview: z.ZodObject<{
184
209
  status: z.ZodEnum<{
185
210
  passed: "passed";
@@ -241,6 +266,11 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
241
266
  targeted: "targeted";
242
267
  broad: "broad";
243
268
  }>>;
269
+ featureReviewDepth: z.ZodOptional<z.ZodEnum<{
270
+ quick: "quick";
271
+ standard: "standard";
272
+ detailed: "detailed";
273
+ }>>;
244
274
  featureReview: z.ZodOptional<z.ZodObject<{
245
275
  status: z.ZodEnum<{
246
276
  passed: "passed";
@@ -307,6 +337,11 @@ export declare const ExecutionHistoryEntrySchema: z.ZodObject<{
307
337
  targeted: "targeted";
308
338
  broad: "broad";
309
339
  }>>;
340
+ featureReviewDepth: z.ZodOptional<z.ZodEnum<{
341
+ quick: "quick";
342
+ standard: "standard";
343
+ detailed: "detailed";
344
+ }>>;
310
345
  featureReview: z.ZodOptional<z.ZodObject<{
311
346
  status: z.ZodEnum<{
312
347
  passed: "passed";
@@ -350,6 +385,51 @@ export declare const ExecutionHistoryEntrySchema: z.ZodObject<{
350
385
  resolutionHint: z.ZodOptional<z.ZodString>;
351
386
  }, z.core.$strict>>;
352
387
  }, z.core.$strict>;
388
+ export declare const TokenTelemetrySchema: z.ZodObject<{
389
+ source: z.ZodDefault<z.ZodEnum<{
390
+ host_unavailable: "host_unavailable";
391
+ reported: "reported";
392
+ }>>;
393
+ visibleTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
394
+ cacheReadTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
395
+ nonCacheTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
396
+ }, z.core.$strict>;
397
+ export declare const PhaseBoundarySchema: z.ZodObject<{
398
+ reason: z.ZodEnum<{
399
+ feature_limit: "feature_limit";
400
+ token_limit: "token_limit";
401
+ review_failure_limit: "review_failure_limit";
402
+ }>;
403
+ summary: z.ZodString;
404
+ resumeInstructions: z.ZodString;
405
+ recordedAt: z.ZodString;
406
+ }, z.core.$strict>;
407
+ export declare const BudgetTelemetrySchema: z.ZodObject<{
408
+ phaseStartedAt: z.ZodDefault<z.ZodString>;
409
+ completedFeaturesSinceBoundary: z.ZodDefault<z.ZodNumber>;
410
+ reviewCount: z.ZodDefault<z.ZodNumber>;
411
+ failedReviewCount: z.ZodDefault<z.ZodNumber>;
412
+ failedReviewAttemptsByFeature: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
413
+ tokenTelemetry: z.ZodDefault<z.ZodObject<{
414
+ source: z.ZodDefault<z.ZodEnum<{
415
+ host_unavailable: "host_unavailable";
416
+ reported: "reported";
417
+ }>>;
418
+ visibleTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
419
+ cacheReadTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
420
+ nonCacheTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
421
+ }, z.core.$strict>>;
422
+ phaseBoundary: z.ZodDefault<z.ZodNullable<z.ZodObject<{
423
+ reason: z.ZodEnum<{
424
+ feature_limit: "feature_limit";
425
+ token_limit: "token_limit";
426
+ review_failure_limit: "review_failure_limit";
427
+ }>;
428
+ summary: z.ZodString;
429
+ resumeInstructions: z.ZodString;
430
+ recordedAt: z.ZodString;
431
+ }, z.core.$strict>>>;
432
+ }, z.core.$strict>;
353
433
  export declare const SessionSchema: z.ZodObject<{
354
434
  version: z.ZodLiteral<2>;
355
435
  id: z.ZodString;
@@ -384,6 +464,11 @@ export declare const SessionSchema: z.ZodObject<{
384
464
  completed: "completed";
385
465
  blocked: "blocked";
386
466
  }>>;
467
+ reviewDepth: z.ZodDefault<z.ZodEnum<{
468
+ quick: "quick";
469
+ standard: "standard";
470
+ detailed: "detailed";
471
+ }>>;
387
472
  targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
388
473
  validation: z.ZodDefault<z.ZodArray<z.ZodString>>;
389
474
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -414,6 +499,11 @@ export declare const SessionSchema: z.ZodObject<{
414
499
  targeted: "targeted";
415
500
  broad: "broad";
416
501
  }>>;
502
+ featureReviewDepth: z.ZodOptional<z.ZodEnum<{
503
+ quick: "quick";
504
+ standard: "standard";
505
+ detailed: "detailed";
506
+ }>>;
417
507
  featureReview: z.ZodOptional<z.ZodObject<{
418
508
  status: z.ZodEnum<{
419
509
  passed: "passed";
@@ -457,6 +547,32 @@ export declare const SessionSchema: z.ZodObject<{
457
547
  resolutionHint: z.ZodOptional<z.ZodString>;
458
548
  }, z.core.$strict>>;
459
549
  }, z.core.$strict>>>;
550
+ budget: z.ZodDefault<z.ZodObject<{
551
+ phaseStartedAt: z.ZodDefault<z.ZodString>;
552
+ completedFeaturesSinceBoundary: z.ZodDefault<z.ZodNumber>;
553
+ reviewCount: z.ZodDefault<z.ZodNumber>;
554
+ failedReviewCount: z.ZodDefault<z.ZodNumber>;
555
+ failedReviewAttemptsByFeature: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
556
+ tokenTelemetry: z.ZodDefault<z.ZodObject<{
557
+ source: z.ZodDefault<z.ZodEnum<{
558
+ host_unavailable: "host_unavailable";
559
+ reported: "reported";
560
+ }>>;
561
+ visibleTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
562
+ cacheReadTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
563
+ nonCacheTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
564
+ }, z.core.$strict>>;
565
+ phaseBoundary: z.ZodDefault<z.ZodNullable<z.ZodObject<{
566
+ reason: z.ZodEnum<{
567
+ feature_limit: "feature_limit";
568
+ token_limit: "token_limit";
569
+ review_failure_limit: "review_failure_limit";
570
+ }>;
571
+ summary: z.ZodString;
572
+ resumeInstructions: z.ZodString;
573
+ recordedAt: z.ZodString;
574
+ }, z.core.$strict>>>;
575
+ }, z.core.$strict>>;
460
576
  closure: z.ZodNullable<z.ZodObject<{
461
577
  kind: z.ZodEnum<{
462
578
  completed: "completed";
@@ -479,9 +595,12 @@ export declare const SessionSchema: z.ZodObject<{
479
595
  }, z.core.$strict>;
480
596
  }, z.core.$strict>;
481
597
  export type Artifact = z.infer<typeof ArtifactSchema>;
598
+ export type BudgetTelemetry = z.infer<typeof BudgetTelemetrySchema>;
482
599
  export type ExecutionHistoryEntry = z.infer<typeof ExecutionHistoryEntrySchema>;
483
600
  export type Feature = z.infer<typeof FeatureSchema>;
601
+ export type FeatureReviewDepth = z.infer<typeof FeatureReviewDepthSchema>;
484
602
  export type FinalReview = z.infer<typeof FinalReviewSchema>;
603
+ export type PhaseBoundary = z.infer<typeof PhaseBoundarySchema>;
485
604
  export type Plan = z.infer<typeof PlanSchema>;
486
605
  export type PlanInput = z.input<typeof PlanInputSchema>;
487
606
  export type Review = z.infer<typeof ReviewSchema>;
@@ -11,7 +11,9 @@ export type TransitionResult<T> = {
11
11
  export declare function createSession(goal: string): Session;
12
12
  export declare function applyPlan(session: Session, planInput: PlanInput): TransitionResult<Session>;
13
13
  export declare function approvePlan(session: Session): TransitionResult<Session>;
14
- export declare function startRun(session: Session, featureId?: string): TransitionResult<{
14
+ export declare function startRun(session: Session, featureId?: string, options?: {
15
+ phaseBoundaryAck?: boolean;
16
+ }): TransitionResult<{
15
17
  session: Session;
16
18
  feature: Feature;
17
19
  }>;
@@ -22,11 +24,13 @@ export declare function summarizeSession(session: Session | null): {
22
24
  status: string;
23
25
  summary: string;
24
26
  nextAction: string;
27
+ statusSummary?: never;
25
28
  dataNote?: never;
26
29
  session?: never;
27
30
  } | {
28
31
  status: "completed" | "blocked" | "planning" | "ready" | "running";
29
32
  summary: string;
33
+ statusSummary: string;
30
34
  nextAction: string;
31
35
  dataNote: string;
32
36
  session: {
@@ -39,23 +43,83 @@ export declare function summarizeSession(session: Session | null): {
39
43
  title: string;
40
44
  summary: string;
41
45
  status: "pending" | "in_progress" | "completed" | "blocked";
46
+ reviewDepth: "quick" | "standard" | "detailed";
42
47
  targets: string[];
43
48
  validation: string[];
44
49
  dependsOn: string[];
45
50
  } | null;
51
+ nextFeature: {
52
+ id: string;
53
+ title: string;
54
+ summary: string;
55
+ status: "pending" | "in_progress" | "completed" | "blocked";
56
+ reviewDepth: "quick" | "standard" | "detailed";
57
+ targets: string[];
58
+ validation: string[];
59
+ dependsOn: string[];
60
+ } | null;
61
+ pendingFeatures: {
62
+ id: string;
63
+ title: string;
64
+ summary: string;
65
+ status: "pending" | "in_progress" | "completed" | "blocked";
66
+ reviewDepth: "quick" | "standard" | "detailed";
67
+ targets: string[];
68
+ validation: string[];
69
+ dependsOn: string[];
70
+ }[];
46
71
  progress: {
47
72
  completed: number;
48
73
  total: number;
74
+ remaining: number;
49
75
  };
50
76
  features: {
51
77
  id: string;
52
78
  title: string;
53
79
  summary: string;
54
80
  status: "pending" | "in_progress" | "completed" | "blocked";
81
+ reviewDepth: "quick" | "standard" | "detailed";
55
82
  targets: string[];
56
83
  validation: string[];
57
84
  dependsOn: string[];
58
85
  }[];
86
+ budget: {
87
+ phaseStartedAt: string;
88
+ completedFeaturesSinceBoundary: number;
89
+ reviewCount: number;
90
+ failedReviewCount: number;
91
+ failedReviewAttemptsByFeature: Record<string, number>;
92
+ tokenTelemetry: {
93
+ note: string | undefined;
94
+ source: "host_unavailable" | "reported";
95
+ visibleTokens: number | null;
96
+ cacheReadTokens: number | null;
97
+ nonCacheTokens: number | null;
98
+ };
99
+ phaseBoundary: {
100
+ reason: "feature_limit" | "token_limit" | "review_failure_limit";
101
+ summary: string;
102
+ resumeInstructions: string;
103
+ recordedAt: string;
104
+ } | null;
105
+ };
106
+ resumePacket: {
107
+ sessionId: string;
108
+ goal: string;
109
+ status: "completed" | "blocked" | "planning" | "ready" | "running";
110
+ activeFeatureId: string | null;
111
+ progress: {
112
+ completed: number;
113
+ total: number;
114
+ };
115
+ phaseBoundary: {
116
+ reason: "feature_limit" | "token_limit" | "review_failure_limit";
117
+ summary: string;
118
+ resumeInstructions: string;
119
+ recordedAt: string;
120
+ };
121
+ nextAction: string;
122
+ } | null;
59
123
  closure: {
60
124
  kind: "completed" | "deferred" | "abandoned";
61
125
  summary: string;
@@ -81,6 +145,7 @@ export declare function summarizeSession(session: Session | null): {
81
145
  summary: string;
82
146
  }[];
83
147
  validationScope?: "targeted" | "broad" | undefined;
148
+ featureReviewDepth?: "quick" | "standard" | "detailed" | undefined;
84
149
  featureReview?: {
85
150
  status: "passed" | "failed";
86
151
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-plugin-flow",
3
- "version": "4.3.4",
3
+ "version": "4.3.6",
4
4
  "description": "Stateful planning and execution workflow plugin for OpenCode",
5
5
  "type": "module",
6
6
  "repository": {
@@ -32,6 +32,7 @@
32
32
  "build:types": "tsc -p tsconfig.types.json",
33
33
  "lint": "bunx biome check src tests --files-ignore-unknown=true --vcs-use-ignore-file=true",
34
34
  "package:smoke": "bun test tests/package-smoke.test.ts",
35
+ "release:monitor": "node scripts/release-monitor.mjs",
35
36
  "smoke:live": "FLOW_LIVE_SMOKE=1 bun test tests/live-opencode-smoke.test.ts",
36
37
  "test": "bun test tests",
37
38
  "typecheck": "tsc --noEmit",