wiggum-cli 0.17.1 → 0.17.2
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/agent/orchestrator.js +8 -2
- package/dist/agent/tools/backlog.d.ts +1 -0
- package/dist/agent/tools/backlog.js +4 -1
- package/dist/agent/types.d.ts +1 -0
- package/dist/commands/agent.d.ts +1 -0
- package/dist/commands/agent.js +1 -0
- package/dist/index.js +13 -0
- package/dist/tui/app.d.ts +1 -0
- package/dist/tui/app.js +1 -0
- package/dist/tui/hooks/useAgentOrchestrator.d.ts +1 -0
- package/dist/tui/hooks/useAgentOrchestrator.js +1 -0
- package/dist/tui/screens/AgentScreen.js +1 -0
- package/package.json +1 -1
|
@@ -152,6 +152,9 @@ export function buildConstraints(config) {
|
|
|
152
152
|
if (config.labels?.length) {
|
|
153
153
|
lines.push(`- Only work on issues with these labels: ${config.labels.join(', ')}. Ignore all others.`);
|
|
154
154
|
}
|
|
155
|
+
if (config.issues?.length) {
|
|
156
|
+
lines.push(`- ONLY work on these specific issues: ${config.issues.map(n => `#${n}`).join(', ')}. Ignore all others.`);
|
|
157
|
+
}
|
|
155
158
|
if (config.dryRun) {
|
|
156
159
|
lines.push('- DRY RUN MODE: Plan what you would do but do NOT execute. Execution and reporting tools return simulated results.');
|
|
157
160
|
}
|
|
@@ -165,6 +168,7 @@ export function createAgentOrchestrator(config) {
|
|
|
165
168
|
const store = new MemoryStore(memoryDir);
|
|
166
169
|
const backlog = createBacklogTools(owner, repo, {
|
|
167
170
|
defaultLabels: config.labels,
|
|
171
|
+
issueNumbers: config.issues,
|
|
168
172
|
});
|
|
169
173
|
const memory = createMemoryTools(store, projectRoot);
|
|
170
174
|
const execution = config.dryRun
|
|
@@ -185,7 +189,9 @@ export function createAgentOrchestrator(config) {
|
|
|
185
189
|
...introspection,
|
|
186
190
|
...featureState,
|
|
187
191
|
};
|
|
188
|
-
const
|
|
192
|
+
const effectiveMaxItems = config.maxItems ?? (config.issues?.length ? config.issues.length : undefined);
|
|
193
|
+
const constraintConfig = { ...config, maxItems: effectiveMaxItems };
|
|
194
|
+
const constraints = buildConstraints(constraintConfig);
|
|
189
195
|
const runtimeConfig = buildRuntimeConfig(config);
|
|
190
196
|
const fullPrompt = AGENT_SYSTEM_PROMPT + runtimeConfig + constraints;
|
|
191
197
|
const completedIssues = new Set();
|
|
@@ -205,7 +211,7 @@ export function createAgentOrchestrator(config) {
|
|
|
205
211
|
stopWhen: ({ steps }) => {
|
|
206
212
|
if (steps.length >= maxSteps)
|
|
207
213
|
return true;
|
|
208
|
-
if (
|
|
214
|
+
if (effectiveMaxItems != null && completedIssues.size >= effectiveMaxItems)
|
|
209
215
|
return true;
|
|
210
216
|
return false;
|
|
211
217
|
},
|
|
@@ -30,7 +30,10 @@ export function createBacklogTools(owner, repo, options = {}) {
|
|
|
30
30
|
return { issues: [], error: result.error };
|
|
31
31
|
// Sort by issue number ascending — lower numbers are typically more foundational
|
|
32
32
|
const sorted = [...result.issues].sort((a, b) => a.number - b.number);
|
|
33
|
-
|
|
33
|
+
const filtered = options.issueNumbers?.length
|
|
34
|
+
? sorted.filter(i => options.issueNumbers.includes(i.number))
|
|
35
|
+
: sorted;
|
|
36
|
+
return { issues: filtered };
|
|
34
37
|
},
|
|
35
38
|
});
|
|
36
39
|
const readIssue = tool({
|
package/dist/agent/types.d.ts
CHANGED
package/dist/commands/agent.d.ts
CHANGED
package/dist/commands/agent.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export function parseCliArgs(argv) {
|
|
|
49
49
|
'--max-items',
|
|
50
50
|
'--max-steps',
|
|
51
51
|
'--labels',
|
|
52
|
+
'--issues',
|
|
52
53
|
]);
|
|
53
54
|
// Flags that can be specified multiple times, accumulating into an array
|
|
54
55
|
const repeatableFlagSet = new Set(['--issue', '--context']);
|
|
@@ -261,6 +262,7 @@ Options for agent:
|
|
|
261
262
|
--max-items <n> Max issues to process before stopping
|
|
262
263
|
--max-steps <n> Max agent steps before stopping
|
|
263
264
|
--labels <l1,l2> Only work on issues with these labels (comma-separated)
|
|
265
|
+
--issues <n1,n2,...> Only work on these specific issue numbers (comma-separated)
|
|
264
266
|
--review-mode <mode> Review mode: 'manual', 'auto', or 'merge' (default: manual)
|
|
265
267
|
--dry-run Plan what would be done without executing
|
|
266
268
|
--stream Stream output in real-time (default: wait for completion)
|
|
@@ -410,6 +412,16 @@ Press Esc to cancel any operation.
|
|
|
410
412
|
maxItems: typeof parsed.flags.maxItems === 'string' ? parseIntFlag(parsed.flags.maxItems, '--max-items') : undefined,
|
|
411
413
|
maxSteps: typeof parsed.flags.maxSteps === 'string' ? parseIntFlag(parsed.flags.maxSteps, '--max-steps') : undefined,
|
|
412
414
|
labels: typeof parsed.flags.labels === 'string' ? parsed.flags.labels.split(',').map(l => l.trim()).filter(Boolean) : undefined,
|
|
415
|
+
issues: typeof parsed.flags.issues === 'string'
|
|
416
|
+
? parsed.flags.issues.split(',').map(s => {
|
|
417
|
+
const n = parseInt(s.trim(), 10);
|
|
418
|
+
if (Number.isNaN(n) || n < 1) {
|
|
419
|
+
console.error(`Error: Invalid issue number '${s.trim()}' in --issues`);
|
|
420
|
+
process.exit(1);
|
|
421
|
+
}
|
|
422
|
+
return n;
|
|
423
|
+
})
|
|
424
|
+
: undefined,
|
|
413
425
|
reviewMode: reviewModeFlag,
|
|
414
426
|
dryRun: parsed.flags.dryRun === true,
|
|
415
427
|
stream: parsed.flags.stream === true,
|
|
@@ -427,6 +439,7 @@ Press Esc to cancel any operation.
|
|
|
427
439
|
maxItems: agentOpts.maxItems,
|
|
428
440
|
maxSteps: agentOpts.maxSteps,
|
|
429
441
|
labels: agentOpts.labels,
|
|
442
|
+
issues: agentOpts.issues,
|
|
430
443
|
reviewMode: agentOpts.reviewMode,
|
|
431
444
|
dryRun: agentOpts.dryRun,
|
|
432
445
|
},
|
package/dist/tui/app.d.ts
CHANGED
package/dist/tui/app.js
CHANGED
|
@@ -220,6 +220,7 @@ interviewProps, runProps, agentProps, onComplete, onExit, }) {
|
|
|
220
220
|
...(screenProps?.dryRun != null ? { dryRun: screenProps.dryRun } : {}),
|
|
221
221
|
...(screenProps?.maxItems != null ? { maxItems: screenProps.maxItems } : {}),
|
|
222
222
|
...(screenProps?.reviewMode != null ? { reviewMode: screenProps.reviewMode } : {}),
|
|
223
|
+
...(screenProps?.issues != null ? { issues: screenProps.issues } : {}),
|
|
223
224
|
};
|
|
224
225
|
return (_jsx(AgentScreen, { header: headerElement, projectRoot: sessionState.projectRoot, agentOptions: resolvedAgentOptions, onExit: () => {
|
|
225
226
|
if (initialScreen === 'agent') {
|
|
@@ -384,6 +384,7 @@ export function useAgentOrchestrator(options) {
|
|
|
384
384
|
maxSteps: options.maxSteps,
|
|
385
385
|
maxItems: options.maxItems,
|
|
386
386
|
labels: options.labels,
|
|
387
|
+
issues: options.issues,
|
|
387
388
|
reviewMode: options.reviewMode,
|
|
388
389
|
dryRun: options.dryRun,
|
|
389
390
|
onStepUpdate: (event) => {
|
|
@@ -151,6 +151,7 @@ export function AgentScreen({ header, projectRoot, agentOptions, onExit, }) {
|
|
|
151
151
|
maxItems: agentOptions?.maxItems,
|
|
152
152
|
maxSteps: agentOptions?.maxSteps,
|
|
153
153
|
labels: agentOptions?.labels,
|
|
154
|
+
issues: agentOptions?.issues,
|
|
154
155
|
reviewMode: agentOptions?.reviewMode,
|
|
155
156
|
dryRun: agentOptions?.dryRun,
|
|
156
157
|
});
|