issue-flow 0.9.0 → 0.10.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/{analyze-VSWAEVN3.js → analyze-UZYJAWAP.js} +6 -6
- package/dist/{chunk-66ZGYXTH.js → chunk-2LNQL4XH.js} +7 -7
- package/dist/{chunk-X7XBF5TS.js → chunk-2Z7OEZZT.js} +6 -6
- package/dist/{chunk-VNKSMWDN.js → chunk-652DJBCN.js} +3 -3
- package/dist/{chunk-DP43WJY4.js → chunk-67ZO5ROQ.js} +5 -5
- package/dist/{chunk-TLSIK656.js → chunk-EWA3OGCM.js} +6 -6
- package/dist/{chunk-M72ZEPWD.js → chunk-EZMOEBLU.js} +2 -2
- package/dist/{chunk-JGKPSWOA.js → chunk-MXTGCD5C.js} +2 -2
- package/dist/{chunk-DTNM3LTO.js → chunk-PPLIXZI5.js} +2 -2
- package/dist/{chunk-KXAG24DD.js → chunk-S67Q4I2O.js} +3 -3
- package/dist/{chunk-TJMZWRS6.js → chunk-SP7DD4ID.js} +7 -7
- package/dist/{chunk-WHEU55ZP.js → chunk-UH4KAJBJ.js} +7 -7
- package/dist/{chunk-NB6WKTBL.js → chunk-UUY4PCWW.js} +2 -2
- package/dist/{chunk-57MH6RYJ.js → chunk-V5OHFSW4.js} +229 -181
- package/dist/chunk-V5OHFSW4.js.map +1 -0
- package/dist/{chunk-M37YZYDO.js → chunk-VOKNTBOO.js} +3 -3
- package/dist/{chunk-MTJQOOMG.js → chunk-VYFKOUUR.js} +119 -4
- package/dist/chunk-VYFKOUUR.js.map +1 -0
- package/dist/cli.js +22 -15
- package/dist/cli.js.map +1 -1
- package/dist/{config-J5DW6HSY.js → config-YCF3HIKR.js} +7 -3
- package/dist/execute-QYXA225W.js +14 -0
- package/dist/{generate-ERDPOTKX.js → generate-TW6QKSW5.js} +6 -6
- package/dist/init-G57UXKDG.js +9 -0
- package/dist/plan-YJLGBYBQ.js +16 -0
- package/dist/policy-NP4ZAVF6.js +1013 -0
- package/dist/policy-NP4ZAVF6.js.map +1 -0
- package/dist/pr-V5H65MRW.js +20 -0
- package/dist/pr-review-RCMXKXVP.js +16 -0
- package/dist/prd-3XR5KYJS.js +16 -0
- package/dist/review-ZZG3CSUO.js +14 -0
- package/dist/{run-BRBFHVUO.js → run-DIBC3YKX.js} +16 -16
- package/dist/{web-WQISLO66.js → web-O2FVOYZW.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-57MH6RYJ.js.map +0 -1
- package/dist/chunk-MTJQOOMG.js.map +0 -1
- package/dist/execute-Z2DKGVLR.js +0 -14
- package/dist/init-UY6ZCIFT.js +0 -9
- package/dist/plan-REMAMCX4.js +0 -16
- package/dist/pr-KERP52TI.js +0 -20
- package/dist/pr-review-IU4N3TEK.js +0 -16
- package/dist/prd-SHVQW6RM.js +0 -16
- package/dist/review-L5F77QAC.js +0 -14
- /package/dist/{analyze-VSWAEVN3.js.map → analyze-UZYJAWAP.js.map} +0 -0
- /package/dist/{chunk-66ZGYXTH.js.map → chunk-2LNQL4XH.js.map} +0 -0
- /package/dist/{chunk-X7XBF5TS.js.map → chunk-2Z7OEZZT.js.map} +0 -0
- /package/dist/{chunk-VNKSMWDN.js.map → chunk-652DJBCN.js.map} +0 -0
- /package/dist/{chunk-DP43WJY4.js.map → chunk-67ZO5ROQ.js.map} +0 -0
- /package/dist/{chunk-TLSIK656.js.map → chunk-EWA3OGCM.js.map} +0 -0
- /package/dist/{chunk-M72ZEPWD.js.map → chunk-EZMOEBLU.js.map} +0 -0
- /package/dist/{chunk-JGKPSWOA.js.map → chunk-MXTGCD5C.js.map} +0 -0
- /package/dist/{chunk-DTNM3LTO.js.map → chunk-PPLIXZI5.js.map} +0 -0
- /package/dist/{chunk-KXAG24DD.js.map → chunk-S67Q4I2O.js.map} +0 -0
- /package/dist/{chunk-TJMZWRS6.js.map → chunk-SP7DD4ID.js.map} +0 -0
- /package/dist/{chunk-WHEU55ZP.js.map → chunk-UH4KAJBJ.js.map} +0 -0
- /package/dist/{chunk-NB6WKTBL.js.map → chunk-UUY4PCWW.js.map} +0 -0
- /package/dist/{chunk-M37YZYDO.js.map → chunk-VOKNTBOO.js.map} +0 -0
- /package/dist/{config-J5DW6HSY.js.map → config-YCF3HIKR.js.map} +0 -0
- /package/dist/{execute-Z2DKGVLR.js.map → execute-QYXA225W.js.map} +0 -0
- /package/dist/{generate-ERDPOTKX.js.map → generate-TW6QKSW5.js.map} +0 -0
- /package/dist/{init-UY6ZCIFT.js.map → init-G57UXKDG.js.map} +0 -0
- /package/dist/{plan-REMAMCX4.js.map → plan-YJLGBYBQ.js.map} +0 -0
- /package/dist/{pr-KERP52TI.js.map → pr-V5H65MRW.js.map} +0 -0
- /package/dist/{pr-review-IU4N3TEK.js.map → pr-review-RCMXKXVP.js.map} +0 -0
- /package/dist/{prd-SHVQW6RM.js.map → prd-3XR5KYJS.js.map} +0 -0
- /package/dist/{review-L5F77QAC.js.map → review-ZZG3CSUO.js.map} +0 -0
- /package/dist/{run-BRBFHVUO.js.map → run-DIBC3YKX.js.map} +0 -0
- /package/dist/{web-WQISLO66.js.map → web-O2FVOYZW.js.map} +0 -0
|
@@ -1,16 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// src/schemas.ts
|
|
3
|
+
// src/policy/schemas.ts
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
var policyDiscoveryConfigSchema = z.object({
|
|
6
|
+
issueTemplates: z.boolean().default(true),
|
|
7
|
+
pullRequestTemplate: z.boolean().default(true),
|
|
8
|
+
docs: z.boolean().default(true),
|
|
9
|
+
codeowners: z.boolean().default(true),
|
|
10
|
+
labels: z.boolean().default(true),
|
|
11
|
+
issueTypes: z.boolean().default(true)
|
|
12
|
+
});
|
|
13
|
+
var policyIssuesDeclarationSchema = z.object({
|
|
14
|
+
titleConvention: z.string().min(1).optional()
|
|
15
|
+
});
|
|
16
|
+
var policyPullRequestsDeclarationSchema = z.object({
|
|
17
|
+
baseBranch: z.string().min(1).optional(),
|
|
18
|
+
titleConvention: z.string().min(1).optional()
|
|
19
|
+
});
|
|
20
|
+
var policyGitDeclarationSchema = z.object({
|
|
21
|
+
branchConvention: z.string().min(1).optional(),
|
|
22
|
+
commitConvention: z.string().min(1).optional()
|
|
23
|
+
});
|
|
24
|
+
var policyConfigSchema = z.object({
|
|
25
|
+
enabled: z.boolean().default(true),
|
|
26
|
+
discovery: policyDiscoveryConfigSchema.prefault({}),
|
|
27
|
+
issues: policyIssuesDeclarationSchema.prefault({}),
|
|
28
|
+
pullRequests: policyPullRequestsDeclarationSchema.prefault({}),
|
|
29
|
+
git: policyGitDeclarationSchema.prefault({})
|
|
30
|
+
});
|
|
31
|
+
var policyConfigInputSchema = z.object({
|
|
32
|
+
enabled: z.boolean().optional(),
|
|
33
|
+
// Spelled out rather than `policyDiscoveryConfigSchema.partial()`: in zod 4
|
|
34
|
+
// a `.default()` survives `.partial()`, so every toggle would come back
|
|
35
|
+
// materialized and the input layer would stop meaning "what the user wrote".
|
|
36
|
+
discovery: z.object({
|
|
37
|
+
issueTemplates: z.boolean().optional(),
|
|
38
|
+
pullRequestTemplate: z.boolean().optional(),
|
|
39
|
+
docs: z.boolean().optional(),
|
|
40
|
+
codeowners: z.boolean().optional(),
|
|
41
|
+
labels: z.boolean().optional(),
|
|
42
|
+
issueTypes: z.boolean().optional()
|
|
43
|
+
}).optional(),
|
|
44
|
+
issues: z.object({ titleConvention: z.string().nullish() }).optional(),
|
|
45
|
+
pullRequests: z.object({ baseBranch: z.string().nullish(), titleConvention: z.string().nullish() }).optional(),
|
|
46
|
+
git: z.object({ branchConvention: z.string().nullish(), commitConvention: z.string().nullish() }).optional()
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// src/schemas.ts
|
|
50
|
+
import { z as z2 } from "zod";
|
|
51
|
+
var claudeUsageSchema = z2.object({
|
|
52
|
+
inputTokens: z2.number().optional(),
|
|
53
|
+
outputTokens: z2.number().optional(),
|
|
54
|
+
cacheReadTokens: z2.number().optional(),
|
|
55
|
+
cacheCreationTokens: z2.number().optional(),
|
|
56
|
+
costUsd: z2.number().optional()
|
|
11
57
|
});
|
|
12
|
-
var userStoryStatusSchema =
|
|
13
|
-
var storyStageSchema =
|
|
58
|
+
var userStoryStatusSchema = z2.enum(["backlog", "in_progress", "in_review", "done"]);
|
|
59
|
+
var storyStageSchema = z2.enum([
|
|
14
60
|
"pending",
|
|
15
61
|
"executing",
|
|
16
62
|
"awaiting_review",
|
|
@@ -19,195 +65,195 @@ var storyStageSchema = z.enum([
|
|
|
19
65
|
"done",
|
|
20
66
|
"failed"
|
|
21
67
|
]);
|
|
22
|
-
var userStorySchema =
|
|
23
|
-
id:
|
|
24
|
-
title:
|
|
25
|
-
description:
|
|
26
|
-
acceptanceCriteria:
|
|
27
|
-
priority:
|
|
28
|
-
passes:
|
|
29
|
-
notes:
|
|
68
|
+
var userStorySchema = z2.object({
|
|
69
|
+
id: z2.string(),
|
|
70
|
+
title: z2.string(),
|
|
71
|
+
description: z2.string(),
|
|
72
|
+
acceptanceCriteria: z2.array(z2.string()),
|
|
73
|
+
priority: z2.number().int().positive(),
|
|
74
|
+
passes: z2.boolean(),
|
|
75
|
+
notes: z2.string(),
|
|
30
76
|
...claudeUsageSchema.shape,
|
|
31
|
-
durationSeconds:
|
|
77
|
+
durationSeconds: z2.number().optional(),
|
|
32
78
|
status: userStoryStatusSchema.optional(),
|
|
33
|
-
dependencies:
|
|
79
|
+
dependencies: z2.array(z2.string()).optional(),
|
|
34
80
|
stage: storyStageSchema.optional(),
|
|
35
|
-
stageSince:
|
|
36
|
-
stageDetail:
|
|
81
|
+
stageSince: z2.string().optional(),
|
|
82
|
+
stageDetail: z2.string().optional()
|
|
37
83
|
});
|
|
38
|
-
var pipelineStateSchema =
|
|
39
|
-
analyzeCompleted:
|
|
40
|
-
prdCompleted:
|
|
41
|
-
jsonCompleted:
|
|
42
|
-
executionCompleted:
|
|
43
|
-
reviewCompleted:
|
|
44
|
-
prCreated:
|
|
45
|
-
prReviewCompleted:
|
|
84
|
+
var pipelineStateSchema = z2.object({
|
|
85
|
+
analyzeCompleted: z2.boolean().optional(),
|
|
86
|
+
prdCompleted: z2.boolean(),
|
|
87
|
+
jsonCompleted: z2.boolean(),
|
|
88
|
+
executionCompleted: z2.boolean(),
|
|
89
|
+
reviewCompleted: z2.boolean(),
|
|
90
|
+
prCreated: z2.boolean(),
|
|
91
|
+
prReviewCompleted: z2.boolean().optional()
|
|
46
92
|
});
|
|
47
|
-
var pullRequestRefSchema =
|
|
48
|
-
number:
|
|
49
|
-
url:
|
|
50
|
-
headBranch:
|
|
51
|
-
createdAt:
|
|
93
|
+
var pullRequestRefSchema = z2.object({
|
|
94
|
+
number: z2.number().int().positive(),
|
|
95
|
+
url: z2.string(),
|
|
96
|
+
headBranch: z2.string(),
|
|
97
|
+
createdAt: z2.string()
|
|
52
98
|
});
|
|
53
|
-
var prReviewRecommendationSchema =
|
|
99
|
+
var prReviewRecommendationSchema = z2.enum([
|
|
54
100
|
"APPROVE",
|
|
55
101
|
"APPROVE_WITH_SUGGESTIONS",
|
|
56
102
|
"REQUEST_CHANGES"
|
|
57
103
|
]);
|
|
58
|
-
var prReviewStateSchema =
|
|
59
|
-
enabled:
|
|
60
|
-
pullRequestNumber:
|
|
61
|
-
rounds:
|
|
104
|
+
var prReviewStateSchema = z2.object({
|
|
105
|
+
enabled: z2.boolean().default(false),
|
|
106
|
+
pullRequestNumber: z2.number().int().positive().optional(),
|
|
107
|
+
rounds: z2.number().int().min(0).default(0),
|
|
62
108
|
lastRecommendation: prReviewRecommendationSchema.optional(),
|
|
63
|
-
lastReviewedAt:
|
|
109
|
+
lastReviewedAt: z2.string().optional()
|
|
64
110
|
});
|
|
65
|
-
var lastErrorSchema =
|
|
66
|
-
category:
|
|
67
|
-
message:
|
|
68
|
-
at:
|
|
111
|
+
var lastErrorSchema = z2.object({
|
|
112
|
+
category: z2.string(),
|
|
113
|
+
message: z2.string(),
|
|
114
|
+
at: z2.string()
|
|
69
115
|
});
|
|
70
|
-
var issueMetadataSchema =
|
|
71
|
-
schemaVersion:
|
|
72
|
-
id:
|
|
73
|
-
number:
|
|
74
|
-
source:
|
|
75
|
-
title:
|
|
76
|
-
labels:
|
|
77
|
-
state:
|
|
78
|
-
createdAt:
|
|
79
|
-
updatedAt:
|
|
80
|
-
contentHash:
|
|
81
|
-
remote:
|
|
82
|
-
provider:
|
|
83
|
-
ref:
|
|
84
|
-
syncedAt:
|
|
85
|
-
syncedContentHash:
|
|
116
|
+
var issueMetadataSchema = z2.object({
|
|
117
|
+
schemaVersion: z2.literal(1),
|
|
118
|
+
id: z2.string().min(1),
|
|
119
|
+
number: z2.number().int().positive().nullable(),
|
|
120
|
+
source: z2.enum(["github", "local"]),
|
|
121
|
+
title: z2.string(),
|
|
122
|
+
labels: z2.array(z2.string()),
|
|
123
|
+
state: z2.enum(["open", "closed"]),
|
|
124
|
+
createdAt: z2.string(),
|
|
125
|
+
updatedAt: z2.string(),
|
|
126
|
+
contentHash: z2.string(),
|
|
127
|
+
remote: z2.object({
|
|
128
|
+
provider: z2.enum(["github", "local"]),
|
|
129
|
+
ref: z2.string(),
|
|
130
|
+
syncedAt: z2.string(),
|
|
131
|
+
syncedContentHash: z2.string()
|
|
86
132
|
}).optional()
|
|
87
133
|
});
|
|
88
|
-
var taskPlanSchema =
|
|
89
|
-
project:
|
|
90
|
-
issueNumber:
|
|
91
|
-
issueUrl:
|
|
92
|
-
branchName:
|
|
93
|
-
noBranch:
|
|
94
|
-
description:
|
|
95
|
-
issueStatus:
|
|
96
|
-
completedAt:
|
|
97
|
-
lastAttemptAt:
|
|
134
|
+
var taskPlanSchema = z2.object({
|
|
135
|
+
project: z2.string(),
|
|
136
|
+
issueNumber: z2.union([z2.number().int().positive(), z2.string().min(1)]),
|
|
137
|
+
issueUrl: z2.string().optional().default(""),
|
|
138
|
+
branchName: z2.string(),
|
|
139
|
+
noBranch: z2.boolean().optional().default(false),
|
|
140
|
+
description: z2.string(),
|
|
141
|
+
issueStatus: z2.enum(["pending", "in_progress", "completed"]),
|
|
142
|
+
completedAt: z2.string().nullable(),
|
|
143
|
+
lastAttemptAt: z2.string().nullable(),
|
|
98
144
|
lastError: lastErrorSchema.nullable(),
|
|
99
|
-
correctionCycle:
|
|
100
|
-
maxCorrectionCycles:
|
|
145
|
+
correctionCycle: z2.number().int().min(0),
|
|
146
|
+
maxCorrectionCycles: z2.number().int().min(0),
|
|
101
147
|
/**
|
|
102
148
|
* Findings from the most recent failed review, verbatim. Non-null means the
|
|
103
149
|
* issue has a pending correction even if every userStories[].passes is
|
|
104
150
|
* already true — the execute phase must address these before the field is
|
|
105
151
|
* cleared back to null. See core/engine.ts's early-return guards.
|
|
106
152
|
*/
|
|
107
|
-
lastReviewFindings:
|
|
153
|
+
lastReviewFindings: z2.string().nullable().optional().default(null),
|
|
108
154
|
pipeline: pipelineStateSchema,
|
|
109
155
|
pullRequest: pullRequestRefSchema.optional(),
|
|
110
156
|
prReview: prReviewStateSchema.optional(),
|
|
111
|
-
userStories:
|
|
157
|
+
userStories: z2.array(userStorySchema)
|
|
112
158
|
});
|
|
113
|
-
var headlessResultSchema =
|
|
114
|
-
success:
|
|
115
|
-
result:
|
|
159
|
+
var headlessResultSchema = z2.object({
|
|
160
|
+
success: z2.boolean(),
|
|
161
|
+
result: z2.string(),
|
|
116
162
|
cost: claudeUsageSchema.nullable(),
|
|
117
|
-
error:
|
|
163
|
+
error: z2.string().nullable()
|
|
118
164
|
});
|
|
119
|
-
var sessionLogEntrySchema =
|
|
120
|
-
at:
|
|
121
|
-
level:
|
|
122
|
-
message:
|
|
165
|
+
var sessionLogEntrySchema = z2.object({
|
|
166
|
+
at: z2.string(),
|
|
167
|
+
level: z2.enum(["info", "warn", "error"]),
|
|
168
|
+
message: z2.string()
|
|
123
169
|
});
|
|
124
170
|
var sessionUsageShape = {
|
|
125
|
-
inputTokens:
|
|
126
|
-
outputTokens:
|
|
127
|
-
cacheReadTokens:
|
|
128
|
-
cacheCreationTokens:
|
|
129
|
-
costUsd:
|
|
171
|
+
inputTokens: z2.number().nullable().default(null),
|
|
172
|
+
outputTokens: z2.number().nullable().default(null),
|
|
173
|
+
cacheReadTokens: z2.number().nullable().default(null),
|
|
174
|
+
cacheCreationTokens: z2.number().nullable().default(null),
|
|
175
|
+
costUsd: z2.number().nullable().default(null)
|
|
130
176
|
};
|
|
131
|
-
var sessionPhaseSchema =
|
|
132
|
-
name:
|
|
133
|
-
status:
|
|
134
|
-
startedAt:
|
|
135
|
-
endedAt:
|
|
136
|
-
durationSeconds:
|
|
137
|
-
error:
|
|
177
|
+
var sessionPhaseSchema = z2.object({
|
|
178
|
+
name: z2.string(),
|
|
179
|
+
status: z2.enum(["pending", "running", "completed", "failed"]),
|
|
180
|
+
startedAt: z2.string().nullable(),
|
|
181
|
+
endedAt: z2.string().nullable(),
|
|
182
|
+
durationSeconds: z2.number().nullable(),
|
|
183
|
+
error: z2.string().nullable(),
|
|
138
184
|
...sessionUsageShape
|
|
139
185
|
});
|
|
140
|
-
var sessionStorySchema =
|
|
141
|
-
id:
|
|
142
|
-
title:
|
|
143
|
-
priority:
|
|
144
|
-
passes:
|
|
145
|
-
completedAt:
|
|
186
|
+
var sessionStorySchema = z2.object({
|
|
187
|
+
id: z2.string(),
|
|
188
|
+
title: z2.string(),
|
|
189
|
+
priority: z2.number(),
|
|
190
|
+
passes: z2.boolean(),
|
|
191
|
+
completedAt: z2.string().nullable(),
|
|
146
192
|
// Also introduced with the metrics, hence the same tolerant default.
|
|
147
|
-
durationSeconds:
|
|
193
|
+
durationSeconds: z2.number().nullable().default(null),
|
|
148
194
|
// Snapshot fields are always present on output and defaulted on input, so a
|
|
149
195
|
// session.json written before they existed still parses. This is the mirror
|
|
150
196
|
// image of userStorySchema, where the same two fields are plainly optional.
|
|
151
197
|
status: userStoryStatusSchema.default("backlog"),
|
|
152
|
-
dependencies:
|
|
198
|
+
dependencies: z2.array(z2.string()).default([]),
|
|
153
199
|
// Published for the panel's story detail view. Same tolerant default as the
|
|
154
200
|
// fields above: absent (older session.json) and empty resolve to the same
|
|
155
201
|
// value, so the client never has to tell them apart.
|
|
156
|
-
description:
|
|
157
|
-
acceptanceCriteria:
|
|
202
|
+
description: z2.string().default(""),
|
|
203
|
+
acceptanceCriteria: z2.array(z2.string()).default([]),
|
|
158
204
|
// Additive like the rest of this schema: a session.json written before
|
|
159
205
|
// `stage` existed parses into 'pending'/null, the same values a fresh
|
|
160
206
|
// snapshot starts a story at.
|
|
161
207
|
stage: storyStageSchema.default("pending"),
|
|
162
|
-
stageSince:
|
|
163
|
-
stageDetail:
|
|
208
|
+
stageSince: z2.string().nullable().default(null),
|
|
209
|
+
stageDetail: z2.string().nullable().default(null),
|
|
164
210
|
...sessionUsageShape
|
|
165
211
|
});
|
|
166
|
-
var sessionSnapshotSchema =
|
|
167
|
-
schemaVersion:
|
|
168
|
-
sessionId:
|
|
169
|
-
readOnly:
|
|
170
|
-
capabilities:
|
|
171
|
-
issue:
|
|
172
|
-
number:
|
|
173
|
-
url:
|
|
212
|
+
var sessionSnapshotSchema = z2.object({
|
|
213
|
+
schemaVersion: z2.literal(1),
|
|
214
|
+
sessionId: z2.string().nullable(),
|
|
215
|
+
readOnly: z2.literal(true),
|
|
216
|
+
capabilities: z2.array(z2.string()),
|
|
217
|
+
issue: z2.object({
|
|
218
|
+
number: z2.number().nullable(),
|
|
219
|
+
url: z2.string().nullable(),
|
|
174
220
|
// Additive: a session.json written before the Issue section was enriched
|
|
175
221
|
// parses into the same "not reported" values createInitialSnapshot() uses.
|
|
176
|
-
title:
|
|
177
|
-
description:
|
|
178
|
-
labels:
|
|
179
|
-
state:
|
|
222
|
+
title: z2.string().nullable().default(null),
|
|
223
|
+
description: z2.string().nullable().default(null),
|
|
224
|
+
labels: z2.array(z2.string()).default([]),
|
|
225
|
+
state: z2.string().nullable().default(null)
|
|
180
226
|
}),
|
|
181
|
-
status:
|
|
182
|
-
startedAt:
|
|
183
|
-
updatedAt:
|
|
184
|
-
endedAt:
|
|
185
|
-
elapsedSeconds:
|
|
186
|
-
estimatedRemainingSeconds:
|
|
187
|
-
progress:
|
|
188
|
-
percent:
|
|
189
|
-
phasesCompleted:
|
|
190
|
-
phasesTotal:
|
|
191
|
-
storiesCompleted:
|
|
192
|
-
storiesTotal:
|
|
227
|
+
status: z2.enum(["idle", "running", "completed", "failed"]),
|
|
228
|
+
startedAt: z2.string().nullable(),
|
|
229
|
+
updatedAt: z2.string().nullable(),
|
|
230
|
+
endedAt: z2.string().nullable(),
|
|
231
|
+
elapsedSeconds: z2.number().nullable(),
|
|
232
|
+
estimatedRemainingSeconds: z2.number().nullable(),
|
|
233
|
+
progress: z2.object({
|
|
234
|
+
percent: z2.number(),
|
|
235
|
+
phasesCompleted: z2.number(),
|
|
236
|
+
phasesTotal: z2.number(),
|
|
237
|
+
storiesCompleted: z2.number(),
|
|
238
|
+
storiesTotal: z2.number()
|
|
193
239
|
}),
|
|
194
|
-
currentPhase:
|
|
195
|
-
currentActivity:
|
|
196
|
-
story:
|
|
197
|
-
tool:
|
|
198
|
-
detail:
|
|
199
|
-
since:
|
|
240
|
+
currentPhase: z2.string().nullable(),
|
|
241
|
+
currentActivity: z2.object({
|
|
242
|
+
story: z2.string().nullable(),
|
|
243
|
+
tool: z2.string().nullable(),
|
|
244
|
+
detail: z2.string().nullable(),
|
|
245
|
+
since: z2.string()
|
|
200
246
|
}).nullable(),
|
|
201
|
-
phases:
|
|
202
|
-
stories:
|
|
247
|
+
phases: z2.array(sessionPhaseSchema),
|
|
248
|
+
stories: z2.array(sessionStorySchema),
|
|
203
249
|
// The whole aggregate is additive: a snapshot from before it existed parses
|
|
204
250
|
// into the same "nothing reported" object the reducer starts from.
|
|
205
|
-
metrics:
|
|
206
|
-
totalInputTokens:
|
|
207
|
-
totalOutputTokens:
|
|
208
|
-
totalCacheReadTokens:
|
|
209
|
-
totalCacheCreationTokens:
|
|
210
|
-
totalCostUsd:
|
|
251
|
+
metrics: z2.object({
|
|
252
|
+
totalInputTokens: z2.number().nullable().default(null),
|
|
253
|
+
totalOutputTokens: z2.number().nullable().default(null),
|
|
254
|
+
totalCacheReadTokens: z2.number().nullable().default(null),
|
|
255
|
+
totalCacheCreationTokens: z2.number().nullable().default(null),
|
|
256
|
+
totalCostUsd: z2.number().nullable().default(null)
|
|
211
257
|
}).default({
|
|
212
258
|
totalInputTokens: null,
|
|
213
259
|
totalOutputTokens: null,
|
|
@@ -215,51 +261,51 @@ var sessionSnapshotSchema = z.object({
|
|
|
215
261
|
totalCacheCreationTokens: null,
|
|
216
262
|
totalCostUsd: null
|
|
217
263
|
}),
|
|
218
|
-
execution:
|
|
219
|
-
iteration:
|
|
220
|
-
retries:
|
|
221
|
-
correctionCycle:
|
|
222
|
-
maxCorrectionCycles:
|
|
264
|
+
execution: z2.object({
|
|
265
|
+
iteration: z2.number(),
|
|
266
|
+
retries: z2.number(),
|
|
267
|
+
correctionCycle: z2.number(),
|
|
268
|
+
maxCorrectionCycles: z2.number().nullable()
|
|
223
269
|
}),
|
|
224
|
-
git:
|
|
225
|
-
branch:
|
|
226
|
-
baseBranch:
|
|
227
|
-
commits:
|
|
270
|
+
git: z2.object({
|
|
271
|
+
branch: z2.string().nullable(),
|
|
272
|
+
baseBranch: z2.string().nullable(),
|
|
273
|
+
commits: z2.array(z2.object({ hash: z2.string(), subject: z2.string() }))
|
|
228
274
|
}),
|
|
229
275
|
// Additive like the metrics aggregate: a session.json written before the
|
|
230
276
|
// repository section existed parses into the same all-null object
|
|
231
277
|
// createInitialSnapshot() starts from.
|
|
232
|
-
repository:
|
|
233
|
-
name:
|
|
234
|
-
remoteUrl:
|
|
235
|
-
branch:
|
|
236
|
-
headCommit:
|
|
237
|
-
root:
|
|
278
|
+
repository: z2.object({
|
|
279
|
+
name: z2.string().nullable().default(null),
|
|
280
|
+
remoteUrl: z2.string().nullable().default(null),
|
|
281
|
+
branch: z2.string().nullable().default(null),
|
|
282
|
+
headCommit: z2.string().nullable().default(null),
|
|
283
|
+
root: z2.string().nullable().default(null)
|
|
238
284
|
}).default({ name: null, remoteUrl: null, branch: null, headCommit: null, root: null }),
|
|
239
|
-
pullRequests:
|
|
240
|
-
logs:
|
|
241
|
-
errors:
|
|
242
|
-
warnings:
|
|
243
|
-
lastError:
|
|
244
|
-
nextSteps:
|
|
245
|
-
environment:
|
|
285
|
+
pullRequests: z2.array(z2.object({ number: z2.number(), url: z2.string(), title: z2.string() })),
|
|
286
|
+
logs: z2.array(sessionLogEntrySchema),
|
|
287
|
+
errors: z2.array(sessionLogEntrySchema),
|
|
288
|
+
warnings: z2.array(sessionLogEntrySchema),
|
|
289
|
+
lastError: z2.object({ message: z2.string(), at: z2.string() }).nullable(),
|
|
290
|
+
nextSteps: z2.array(z2.string()),
|
|
291
|
+
environment: z2.object({ node: z2.string(), platform: z2.string() }).nullable()
|
|
246
292
|
});
|
|
247
|
-
var webConfigSchema =
|
|
248
|
-
enabled:
|
|
249
|
-
port:
|
|
250
|
-
host:
|
|
251
|
-
refreshSeconds:
|
|
252
|
-
logLimit:
|
|
253
|
-
includeLogs:
|
|
293
|
+
var webConfigSchema = z2.object({
|
|
294
|
+
enabled: z2.boolean().default(false),
|
|
295
|
+
port: z2.number().int().min(1).max(65535).default(3737),
|
|
296
|
+
host: z2.string().min(1).default("0.0.0.0"),
|
|
297
|
+
refreshSeconds: z2.number().positive().default(5),
|
|
298
|
+
logLimit: z2.number().int().positive().default(200),
|
|
299
|
+
includeLogs: z2.boolean().default(true)
|
|
254
300
|
});
|
|
255
|
-
var issuesConfigSchema =
|
|
256
|
-
defaultGenerateTarget:
|
|
257
|
-
preferredProvider:
|
|
258
|
-
conflictPolicy:
|
|
259
|
-
requireConfirmation:
|
|
301
|
+
var issuesConfigSchema = z2.object({
|
|
302
|
+
defaultGenerateTarget: z2.enum(["github", "local", "both"]).default("github"),
|
|
303
|
+
preferredProvider: z2.enum(["github", "local"]).default("github"),
|
|
304
|
+
conflictPolicy: z2.enum(["ask", "prefer-local", "prefer-github"]).default("ask"),
|
|
305
|
+
requireConfirmation: z2.boolean().default(true)
|
|
260
306
|
});
|
|
261
|
-
var prReviewConfigSchema =
|
|
262
|
-
publisher:
|
|
307
|
+
var prReviewConfigSchema = z2.object({
|
|
308
|
+
publisher: z2.enum(["local"]).default("local")
|
|
263
309
|
});
|
|
264
310
|
|
|
265
311
|
// src/core/session-state.ts
|
|
@@ -1259,6 +1305,8 @@ var ElapsedTimer = class {
|
|
|
1259
1305
|
};
|
|
1260
1306
|
|
|
1261
1307
|
export {
|
|
1308
|
+
policyConfigSchema,
|
|
1309
|
+
policyConfigInputSchema,
|
|
1262
1310
|
pullRequestRefSchema,
|
|
1263
1311
|
issueMetadataSchema,
|
|
1264
1312
|
taskPlanSchema,
|
|
@@ -1312,4 +1360,4 @@ export {
|
|
|
1312
1360
|
formatDuration,
|
|
1313
1361
|
ElapsedTimer
|
|
1314
1362
|
};
|
|
1315
|
-
//# sourceMappingURL=chunk-
|
|
1363
|
+
//# sourceMappingURL=chunk-V5OHFSW4.js.map
|