deepseek-coder-agent-cli 1.0.71 → 1.0.72
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/capabilities/hitlCapability.js +2 -2
- package/dist/capabilities/hitlCapability.js.map +1 -1
- package/dist/contracts/schemas/agent.schema.json +2 -1
- package/dist/contracts/schemas/tool-selection.schema.json +0 -1
- package/dist/contracts/v1/agent.d.ts +12 -2
- package/dist/contracts/v1/agent.d.ts.map +1 -1
- package/dist/contracts/v1/toolAccess.d.ts +1 -1
- package/dist/contracts/v1/toolAccess.d.ts.map +1 -1
- package/dist/core/hitl.d.ts +8 -0
- package/dist/core/hitl.d.ts.map +1 -1
- package/dist/core/hitl.js +37 -0
- package/dist/core/hitl.js.map +1 -1
- package/dist/headless/interactiveShell.js +26 -0
- package/dist/headless/interactiveShell.js.map +1 -1
- package/dist/runtime/agentController.d.ts.map +1 -1
- package/dist/runtime/agentController.js +10 -0
- package/dist/runtime/agentController.js.map +1 -1
- package/dist/tools/editTools.d.ts.map +1 -1
- package/dist/tools/editTools.js +35 -0
- package/dist/tools/editTools.js.map +1 -1
- package/dist/ui/PromptController.d.ts +4 -0
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +14 -0
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts +5 -2
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +25 -1
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +0 -29
- package/dist/ui/toolDisplay.js.map +1 -1
- package/package.json +1 -1
- package/dist/tools/humanOpsTools.d.ts +0 -3
- package/dist/tools/humanOpsTools.d.ts.map +0 -1
- package/dist/tools/humanOpsTools.js +0 -86
- package/dist/tools/humanOpsTools.js.map +0 -1
- package/dist/tools/planningTools.d.ts +0 -81
- package/dist/tools/planningTools.d.ts.map +0 -1
- package/dist/tools/planningTools.js +0 -370
- package/dist/tools/planningTools.js.map +0 -1
- package/dist/tools/unifiedOps.d.ts +0 -3
- package/dist/tools/unifiedOps.d.ts.map +0 -1
- package/dist/tools/unifiedOps.js +0 -57
- package/dist/tools/unifiedOps.js.map +0 -1
- package/dist/utils/planFormatter.d.ts +0 -34
- package/dist/utils/planFormatter.d.ts.map +0 -1
- package/dist/utils/planFormatter.js +0 -141
- package/dist/utils/planFormatter.js.map +0 -1
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Planning Tools - Claude Code-style planning with suggestions and user input
|
|
3
|
-
*
|
|
4
|
-
* Workflow: Explore → Plan → Execute
|
|
5
|
-
* Each plan step supports:
|
|
6
|
-
* - Pre-generated suggestions
|
|
7
|
-
* - User custom instructions
|
|
8
|
-
* - Editable step details
|
|
9
|
-
*/
|
|
10
|
-
let _planApprovalCallback = null;
|
|
11
|
-
let _currentPlan = null;
|
|
12
|
-
let _explorationComplete = false;
|
|
13
|
-
export function setPlanApprovalCallback(callback) {
|
|
14
|
-
_planApprovalCallback = callback;
|
|
15
|
-
}
|
|
16
|
-
export function getPlanApprovalCallback() {
|
|
17
|
-
return _planApprovalCallback;
|
|
18
|
-
}
|
|
19
|
-
export function setExplorationComplete(complete) {
|
|
20
|
-
_explorationComplete = complete;
|
|
21
|
-
}
|
|
22
|
-
export function isExplorationComplete() {
|
|
23
|
-
return _explorationComplete;
|
|
24
|
-
}
|
|
25
|
-
export function getCurrentPlan() {
|
|
26
|
-
return _currentPlan;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Generate suggestions for a plan step based on context
|
|
30
|
-
*/
|
|
31
|
-
function generateStepSuggestions(stepDescription, context) {
|
|
32
|
-
const suggestions = [];
|
|
33
|
-
const lower = stepDescription.toLowerCase();
|
|
34
|
-
// File/component creation suggestions
|
|
35
|
-
if (/create|add|new|implement/i.test(lower)) {
|
|
36
|
-
suggestions.push('Create with minimal implementation first, then iterate');
|
|
37
|
-
suggestions.push('Create with full implementation including tests');
|
|
38
|
-
suggestions.push('Create stub/placeholder, fill in details later');
|
|
39
|
-
}
|
|
40
|
-
// Modification suggestions
|
|
41
|
-
if (/update|modify|change|edit|refactor/i.test(lower)) {
|
|
42
|
-
suggestions.push('Make minimal changes to achieve the goal');
|
|
43
|
-
suggestions.push('Refactor comprehensively while making changes');
|
|
44
|
-
suggestions.push('Update with backward compatibility');
|
|
45
|
-
}
|
|
46
|
-
// Integration suggestions
|
|
47
|
-
if (/integrate|connect|link|api/i.test(lower)) {
|
|
48
|
-
suggestions.push('Implement with error handling and retry logic');
|
|
49
|
-
suggestions.push('Implement basic integration first, enhance later');
|
|
50
|
-
suggestions.push('Implement with full authentication flow');
|
|
51
|
-
}
|
|
52
|
-
// Testing suggestions
|
|
53
|
-
if (/test|verify|validate/i.test(lower)) {
|
|
54
|
-
suggestions.push('Add unit tests for core functionality');
|
|
55
|
-
suggestions.push('Add integration tests with mocks');
|
|
56
|
-
suggestions.push('Add end-to-end tests');
|
|
57
|
-
}
|
|
58
|
-
// UI suggestions
|
|
59
|
-
if (/ui|component|page|screen|view/i.test(lower)) {
|
|
60
|
-
suggestions.push('Create responsive layout with mobile-first approach');
|
|
61
|
-
suggestions.push('Create desktop layout, add mobile later');
|
|
62
|
-
suggestions.push('Create with accessibility (a11y) best practices');
|
|
63
|
-
}
|
|
64
|
-
// Documentation suggestions
|
|
65
|
-
if (/document|readme|explain/i.test(lower)) {
|
|
66
|
-
suggestions.push('Add inline code comments');
|
|
67
|
-
suggestions.push('Create comprehensive README');
|
|
68
|
-
suggestions.push('Add JSDoc/TSDoc annotations');
|
|
69
|
-
}
|
|
70
|
-
// Default suggestions if none matched
|
|
71
|
-
if (suggestions.length === 0) {
|
|
72
|
-
suggestions.push('Implement as described');
|
|
73
|
-
suggestions.push('Implement with additional error handling');
|
|
74
|
-
suggestions.push('Let me provide specific instructions');
|
|
75
|
-
}
|
|
76
|
-
return suggestions.slice(0, 4); // Max 4 suggestions
|
|
77
|
-
}
|
|
78
|
-
export function createPlanningTools(_workingDir) {
|
|
79
|
-
return [
|
|
80
|
-
{
|
|
81
|
-
name: 'MarkExplorationComplete',
|
|
82
|
-
description: 'Mark that codebase exploration is complete. MUST be called after exploring the codebase and BEFORE creating a plan. This ensures the plan is based on actual understanding of the code.',
|
|
83
|
-
parameters: {
|
|
84
|
-
type: 'object',
|
|
85
|
-
properties: {
|
|
86
|
-
summary: {
|
|
87
|
-
type: 'string',
|
|
88
|
-
description: 'Summary of what was learned during exploration (key files, architecture, patterns)',
|
|
89
|
-
},
|
|
90
|
-
keyFindings: {
|
|
91
|
-
type: 'array',
|
|
92
|
-
items: { type: 'string' },
|
|
93
|
-
description: 'Key findings from exploration',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
required: ['summary'],
|
|
97
|
-
},
|
|
98
|
-
handler: async (args) => {
|
|
99
|
-
const summary = args['summary'];
|
|
100
|
-
const keyFindings = args['keyFindings'];
|
|
101
|
-
_explorationComplete = true;
|
|
102
|
-
return JSON.stringify({
|
|
103
|
-
status: 'exploration_complete',
|
|
104
|
-
summary,
|
|
105
|
-
keyFindings: keyFindings || [],
|
|
106
|
-
message: 'Exploration marked complete. You may now create a plan using ProposePlan.',
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'ProposePlan',
|
|
112
|
-
description: `Propose a structured plan for user approval. Each step includes pre-generated suggestions that users can select from or override with their own instructions.
|
|
113
|
-
|
|
114
|
-
IMPORTANT: You MUST call MarkExplorationComplete BEFORE using this tool. Plans created without exploration will be rejected.
|
|
115
|
-
|
|
116
|
-
The plan should include:
|
|
117
|
-
- Clear step descriptions
|
|
118
|
-
- Suggestions for each step (auto-generated if not provided)
|
|
119
|
-
- Scope/files affected
|
|
120
|
-
- Complexity estimates
|
|
121
|
-
- Dependencies between steps`,
|
|
122
|
-
parameters: {
|
|
123
|
-
type: 'object',
|
|
124
|
-
properties: {
|
|
125
|
-
title: {
|
|
126
|
-
type: 'string',
|
|
127
|
-
description: 'Plan title/summary',
|
|
128
|
-
},
|
|
129
|
-
explanation: {
|
|
130
|
-
type: 'string',
|
|
131
|
-
description: 'Overall explanation of what this plan accomplishes',
|
|
132
|
-
},
|
|
133
|
-
steps: {
|
|
134
|
-
type: 'array',
|
|
135
|
-
items: {
|
|
136
|
-
type: 'object',
|
|
137
|
-
properties: {
|
|
138
|
-
description: { type: 'string', description: 'Step description' },
|
|
139
|
-
suggestions: {
|
|
140
|
-
type: 'array',
|
|
141
|
-
items: { type: 'string' },
|
|
142
|
-
description: 'Pre-generated suggestions for this step (2-4 options)',
|
|
143
|
-
},
|
|
144
|
-
affectedScope: {
|
|
145
|
-
type: 'array',
|
|
146
|
-
items: { type: 'string' },
|
|
147
|
-
description: 'Files or components affected by this step',
|
|
148
|
-
},
|
|
149
|
-
complexity: {
|
|
150
|
-
type: 'string',
|
|
151
|
-
enum: ['low', 'medium', 'high'],
|
|
152
|
-
description: 'Estimated complexity',
|
|
153
|
-
},
|
|
154
|
-
requiresConfirmation: {
|
|
155
|
-
type: 'boolean',
|
|
156
|
-
description: 'Whether this step needs explicit user confirmation',
|
|
157
|
-
},
|
|
158
|
-
dependsOn: {
|
|
159
|
-
type: 'array',
|
|
160
|
-
items: { type: 'number' },
|
|
161
|
-
description: 'Indices of steps this depends on (0-indexed)',
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
required: ['description'],
|
|
165
|
-
},
|
|
166
|
-
description: 'Plan steps with suggestions',
|
|
167
|
-
},
|
|
168
|
-
risks: {
|
|
169
|
-
type: 'array',
|
|
170
|
-
items: { type: 'string' },
|
|
171
|
-
description: 'Potential risks or concerns',
|
|
172
|
-
},
|
|
173
|
-
alternatives: {
|
|
174
|
-
type: 'array',
|
|
175
|
-
items: { type: 'string' },
|
|
176
|
-
description: 'Alternative approaches considered',
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
required: ['title', 'steps'],
|
|
180
|
-
},
|
|
181
|
-
handler: async (args) => {
|
|
182
|
-
// Enforce exploration before planning
|
|
183
|
-
if (!_explorationComplete) {
|
|
184
|
-
return JSON.stringify({
|
|
185
|
-
status: 'error',
|
|
186
|
-
error: 'EXPLORATION_REQUIRED',
|
|
187
|
-
message: 'You must call MarkExplorationComplete before creating a plan. Please explore the codebase first to understand the existing code structure, then mark exploration complete.',
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
const title = args['title'];
|
|
191
|
-
const explanation = args['explanation'] || '';
|
|
192
|
-
const rawSteps = args['steps'];
|
|
193
|
-
const risks = args['risks'];
|
|
194
|
-
const alternatives = args['alternatives'];
|
|
195
|
-
// Build plan with auto-generated suggestions where missing
|
|
196
|
-
const steps = rawSteps.map((step) => ({
|
|
197
|
-
description: step.description,
|
|
198
|
-
suggestions: step.suggestions?.length ? step.suggestions : generateStepSuggestions(step.description),
|
|
199
|
-
affectedScope: step.affectedScope,
|
|
200
|
-
complexity: step.complexity || 'medium',
|
|
201
|
-
requiresConfirmation: step.requiresConfirmation ?? false,
|
|
202
|
-
dependsOn: step.dependsOn,
|
|
203
|
-
}));
|
|
204
|
-
const plan = {
|
|
205
|
-
title,
|
|
206
|
-
explanation,
|
|
207
|
-
steps,
|
|
208
|
-
explorationComplete: true,
|
|
209
|
-
risks,
|
|
210
|
-
alternatives,
|
|
211
|
-
};
|
|
212
|
-
_currentPlan = plan;
|
|
213
|
-
if (_planApprovalCallback) {
|
|
214
|
-
return new Promise((resolve) => {
|
|
215
|
-
_planApprovalCallback(plan, (result) => {
|
|
216
|
-
if (result.approved) {
|
|
217
|
-
// Apply user inputs to steps
|
|
218
|
-
if (result.stepInputs) {
|
|
219
|
-
result.stepInputs.forEach((input, index) => {
|
|
220
|
-
if (index < plan.steps.length && input) {
|
|
221
|
-
if (input.skip) {
|
|
222
|
-
plan.steps[index].userInstruction = '[SKIPPED]';
|
|
223
|
-
}
|
|
224
|
-
else if (input.selectedSuggestion >= 0 && plan.steps[index].suggestions) {
|
|
225
|
-
plan.steps[index].userInstruction = plan.steps[index].suggestions[input.selectedSuggestion];
|
|
226
|
-
}
|
|
227
|
-
else if (input.customInstruction) {
|
|
228
|
-
plan.steps[index].userInstruction = input.customInstruction;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
resolve(JSON.stringify({
|
|
234
|
-
status: 'approved',
|
|
235
|
-
plan: plan,
|
|
236
|
-
feedback: result.feedback,
|
|
237
|
-
}));
|
|
238
|
-
}
|
|
239
|
-
else if (result.requestRePlan) {
|
|
240
|
-
resolve(JSON.stringify({
|
|
241
|
-
status: 're_plan_requested',
|
|
242
|
-
feedback: result.feedback,
|
|
243
|
-
message: 'User requested modifications to the plan. Please revise based on feedback.',
|
|
244
|
-
}));
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
resolve(JSON.stringify({
|
|
248
|
-
status: 'rejected',
|
|
249
|
-
feedback: result.feedback,
|
|
250
|
-
}));
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
// Auto-approve if no callback (headless mode)
|
|
256
|
-
return JSON.stringify({
|
|
257
|
-
status: 'approved',
|
|
258
|
-
plan: plan,
|
|
259
|
-
message: `Plan "${title}" with ${steps.length} steps approved (auto-approved in headless mode).`,
|
|
260
|
-
});
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
name: 'UpdatePlan',
|
|
265
|
-
description: 'Update the current plan with new information or modified steps',
|
|
266
|
-
parameters: {
|
|
267
|
-
type: 'object',
|
|
268
|
-
properties: {
|
|
269
|
-
stepIndex: {
|
|
270
|
-
type: 'number',
|
|
271
|
-
description: 'Index of step to update (0-indexed)',
|
|
272
|
-
},
|
|
273
|
-
newDescription: {
|
|
274
|
-
type: 'string',
|
|
275
|
-
description: 'New description for the step',
|
|
276
|
-
},
|
|
277
|
-
newSuggestions: {
|
|
278
|
-
type: 'array',
|
|
279
|
-
items: { type: 'string' },
|
|
280
|
-
description: 'New suggestions for the step',
|
|
281
|
-
},
|
|
282
|
-
markComplete: {
|
|
283
|
-
type: 'boolean',
|
|
284
|
-
description: 'Mark this step as complete',
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
required: ['stepIndex'],
|
|
288
|
-
},
|
|
289
|
-
handler: async (args) => {
|
|
290
|
-
if (!_currentPlan) {
|
|
291
|
-
return JSON.stringify({
|
|
292
|
-
status: 'error',
|
|
293
|
-
error: 'NO_ACTIVE_PLAN',
|
|
294
|
-
message: 'No active plan. Use ProposePlan first.',
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
const stepIndex = args['stepIndex'];
|
|
298
|
-
if (stepIndex < 0 || stepIndex >= _currentPlan.steps.length) {
|
|
299
|
-
return JSON.stringify({
|
|
300
|
-
status: 'error',
|
|
301
|
-
error: 'INVALID_STEP_INDEX',
|
|
302
|
-
message: `Step index ${stepIndex} is out of range (0-${_currentPlan.steps.length - 1})`,
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
const step = _currentPlan.steps[stepIndex];
|
|
306
|
-
if (args['newDescription']) {
|
|
307
|
-
step.description = args['newDescription'];
|
|
308
|
-
}
|
|
309
|
-
if (args['newSuggestions']) {
|
|
310
|
-
step.suggestions = args['newSuggestions'];
|
|
311
|
-
}
|
|
312
|
-
return JSON.stringify({
|
|
313
|
-
status: 'updated',
|
|
314
|
-
stepIndex,
|
|
315
|
-
step,
|
|
316
|
-
});
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
name: 'GetPlanStatus',
|
|
321
|
-
description: 'Get the current status of the plan and which steps are complete',
|
|
322
|
-
parameters: {
|
|
323
|
-
type: 'object',
|
|
324
|
-
properties: {},
|
|
325
|
-
},
|
|
326
|
-
handler: async () => {
|
|
327
|
-
if (!_currentPlan) {
|
|
328
|
-
return JSON.stringify({
|
|
329
|
-
status: 'no_plan',
|
|
330
|
-
explorationComplete: _explorationComplete,
|
|
331
|
-
message: _explorationComplete
|
|
332
|
-
? 'Exploration complete. Ready to create a plan.'
|
|
333
|
-
: 'No exploration or plan yet. Start by exploring the codebase.',
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
return JSON.stringify({
|
|
337
|
-
status: 'has_plan',
|
|
338
|
-
plan: _currentPlan,
|
|
339
|
-
explorationComplete: _explorationComplete,
|
|
340
|
-
});
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
name: 'ExitPlanMode',
|
|
345
|
-
description: 'Signal that planning is complete and ready to execute. Call this after the plan is approved.',
|
|
346
|
-
parameters: {
|
|
347
|
-
type: 'object',
|
|
348
|
-
properties: {
|
|
349
|
-
summary: {
|
|
350
|
-
type: 'string',
|
|
351
|
-
description: 'Summary of the approved plan',
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
},
|
|
355
|
-
handler: async (args) => {
|
|
356
|
-
const summary = args['summary'];
|
|
357
|
-
const plan = _currentPlan;
|
|
358
|
-
// Reset state
|
|
359
|
-
_explorationComplete = false;
|
|
360
|
-
_currentPlan = null;
|
|
361
|
-
return JSON.stringify({
|
|
362
|
-
status: 'plan_mode_exited',
|
|
363
|
-
summary: summary || (plan ? plan.title : 'No plan'),
|
|
364
|
-
message: 'Plan mode exited. Ready to execute the approved plan.',
|
|
365
|
-
});
|
|
366
|
-
},
|
|
367
|
-
},
|
|
368
|
-
];
|
|
369
|
-
}
|
|
370
|
-
//# sourceMappingURL=planningTools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planningTools.js","sourceRoot":"","sources":["../../src/tools/planningTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4EH,IAAI,qBAAqB,GAAgC,IAAI,CAAC;AAC9D,IAAI,YAAY,GAAgB,IAAI,CAAC;AACrC,IAAI,oBAAoB,GAAG,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,QAAQ;wBACd,WAAW,EAAE,8BAA8B;qBAC5C;iBACF;aACF;YACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBACtB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAuB,CAAC;gBACtD,MAAM,IAAI,GAAG,YAAY,CAAC;gBAE1B,cAAc;gBACd,oBAAoB,GAAG,KAAK,CAAC;gBAC7B,YAAY,GAAG,IAAI,CAAC;gBAEpB,OAAO,IAAI,CAAC,SAAS,CAAC;oBACpB,MAAM,EAAE,kBAAkB;oBAC1B,OAAO,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;oBACnD,OAAO,EAAE,uDAAuD;iBACjE,CAAC,CAAC;YACL,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unifiedOps.d.ts","sourceRoot":"","sources":["../../src/tools/unifiedOps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAwB7D,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,CA4C1E"}
|
package/dist/tools/unifiedOps.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { createHumanOpsTools } from './humanOpsTools.js';
|
|
2
|
-
function runGenerateTool(args) {
|
|
3
|
-
const name = typeof args['name'] === 'string' && args['name'].trim() ? args['name'].trim() : 'GeneratedTool';
|
|
4
|
-
const description = typeof args['description'] === 'string' ? args['description'] : 'Generated tool';
|
|
5
|
-
const intent = typeof args['intent'] === 'string' ? args['intent'] : 'general';
|
|
6
|
-
return {
|
|
7
|
-
name,
|
|
8
|
-
description,
|
|
9
|
-
intent,
|
|
10
|
-
toolDefinition: {
|
|
11
|
-
name,
|
|
12
|
-
description,
|
|
13
|
-
parameters: { type: 'object', properties: {}, additionalProperties: true },
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export function createUnifiedOpsTools(workingDir) {
|
|
18
|
-
const humanTools = createHumanOpsTools();
|
|
19
|
-
const humanIntegration = humanTools.find((t) => t.name === 'HumanIntegration');
|
|
20
|
-
return [
|
|
21
|
-
{
|
|
22
|
-
name: 'UnifiedOps',
|
|
23
|
-
description: 'Unified Ops router for developer + human-in-the-loop workflows.',
|
|
24
|
-
parameters: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {
|
|
27
|
-
tool: { type: 'string', description: 'Tool to invoke (list | GenerateTool | HumanIntegration | Bash)' },
|
|
28
|
-
args: { type: 'object', description: 'Arguments for the dispatched tool' },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
handler: async ({ tool, args }) => {
|
|
32
|
-
const target = (tool ?? '').toString();
|
|
33
|
-
if (!target || target === 'list') {
|
|
34
|
-
return [
|
|
35
|
-
'Available tools:',
|
|
36
|
-
'- Bash',
|
|
37
|
-
'- GenerateTool',
|
|
38
|
-
'- HumanIntegration',
|
|
39
|
-
].join('\n');
|
|
40
|
-
}
|
|
41
|
-
if (target === 'GenerateTool') {
|
|
42
|
-
return JSON.stringify(runGenerateTool(args ?? {}), null, 2);
|
|
43
|
-
}
|
|
44
|
-
if (target === 'HumanIntegration' && humanIntegration) {
|
|
45
|
-
return humanIntegration.handler?.(args ?? {});
|
|
46
|
-
}
|
|
47
|
-
if (target === 'Bash') {
|
|
48
|
-
const command = typeof args?.['command'] === 'string' ? args['command'] : '';
|
|
49
|
-
return `Bash command requested in ${workingDir}:\n${command}`;
|
|
50
|
-
}
|
|
51
|
-
return `Unknown tool: ${target}`;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
...humanTools,
|
|
55
|
-
];
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=unifiedOps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unifiedOps.js","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step: string;
|
|
4
|
-
status?: PlanStatus;
|
|
5
|
-
}
|
|
6
|
-
export type NormalizedPlanItem = PlanItem & {
|
|
7
|
-
status: PlanStatus;
|
|
8
|
-
};
|
|
9
|
-
export type PlanInput = Array<PlanItem | string | number | boolean | null | undefined>;
|
|
10
|
-
export interface PlanFormatOptions {
|
|
11
|
-
heading?: string;
|
|
12
|
-
bullet?: string;
|
|
13
|
-
width?: number;
|
|
14
|
-
statusSymbols?: Partial<Record<PlanStatus, string>>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Format a structured plan for display with compact tree-like layout.
|
|
18
|
-
*/
|
|
19
|
-
export declare function formatPlan(plan: PlanInput, options?: PlanFormatOptions): string;
|
|
20
|
-
export declare function formatPlan(plan: unknown, options?: PlanFormatOptions): string;
|
|
21
|
-
/**
|
|
22
|
-
* Normalize plan input into a typed list of steps with default statuses.
|
|
23
|
-
*/
|
|
24
|
-
export declare function normalizePlanItems(plan: PlanInput): NormalizedPlanItem[];
|
|
25
|
-
export declare function normalizePlanItems(plan: unknown): NormalizedPlanItem[];
|
|
26
|
-
/**
|
|
27
|
-
* Wrap plan text with a prefix, preserving indentation for continuations.
|
|
28
|
-
*/
|
|
29
|
-
export declare function wrapPlanText(text: string, prefix: string, width?: number): string[];
|
|
30
|
-
/**
|
|
31
|
-
* Determine the available plan width using the terminal size if available.
|
|
32
|
-
*/
|
|
33
|
-
export declare function resolvePlanWidth(padding?: number): number | undefined;
|
|
34
|
-
//# sourceMappingURL=planFormatter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planFormatter.d.ts","sourceRoot":"","sources":["../../src/utils/planFormatter.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;AAEjE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAA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formatPlan(plan, options = {}) {
|
|
7
|
-
const width = clampWidth(options.width);
|
|
8
|
-
const heading = (options.heading ?? 'Updated Plan').trim() || 'Updated Plan';
|
|
9
|
-
const bullet = (options.bullet ?? '•').trim() || '•';
|
|
10
|
-
const items = normalizePlanItems(plan);
|
|
11
|
-
const lines = [`${bullet} ${heading}`];
|
|
12
|
-
if (!items.length) {
|
|
13
|
-
lines.push(' (no steps provided)');
|
|
14
|
-
return lines.join('\n');
|
|
15
|
-
}
|
|
16
|
-
const statusSymbols = buildStatusSymbols(options.statusSymbols);
|
|
17
|
-
items.forEach((item, index) => {
|
|
18
|
-
const prefix = `${index === 0 ? ' └ ' : ' '}${statusSymbols[item.status]} `;
|
|
19
|
-
lines.push(...wrapPlanText(item.step, prefix, width));
|
|
20
|
-
});
|
|
21
|
-
return lines.join('\n');
|
|
22
|
-
}
|
|
23
|
-
export function normalizePlanItems(plan) {
|
|
24
|
-
if (!Array.isArray(plan)) {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
const items = [];
|
|
28
|
-
for (const entry of plan) {
|
|
29
|
-
if (entry === null || entry === undefined) {
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (typeof entry === 'string' || typeof entry === 'number' || typeof entry === 'boolean') {
|
|
33
|
-
const step = String(entry).trim();
|
|
34
|
-
if (!step) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
items.push({ step, status: 'pending' });
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (typeof entry === 'object') {
|
|
41
|
-
const rawStep = entry.step;
|
|
42
|
-
const step = typeof rawStep === 'string'
|
|
43
|
-
? rawStep.trim()
|
|
44
|
-
: typeof rawStep === 'number' || typeof rawStep === 'boolean'
|
|
45
|
-
? String(rawStep).trim()
|
|
46
|
-
: '';
|
|
47
|
-
if (!step) {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
const status = normalizeStatus(entry.status);
|
|
51
|
-
items.push({ step, status });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return items;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Wrap plan text with a prefix, preserving indentation for continuations.
|
|
58
|
-
*/
|
|
59
|
-
export function wrapPlanText(text, prefix, width) {
|
|
60
|
-
const normalizedWidth = clampWidth(width);
|
|
61
|
-
const cleanPrefix = prefix ?? '';
|
|
62
|
-
const prefixLength = visibleLength(cleanPrefix);
|
|
63
|
-
const available = Math.max(12, normalizedWidth - prefixLength);
|
|
64
|
-
const wrapped = wrapText(text, available);
|
|
65
|
-
if (!wrapped.length) {
|
|
66
|
-
return [cleanPrefix.trimEnd()];
|
|
67
|
-
}
|
|
68
|
-
const indent = ' '.repeat(prefixLength);
|
|
69
|
-
return wrapped.map((line, index) => (index === 0 ? `${cleanPrefix}${line}` : `${indent}${line}`));
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Determine the available plan width using the terminal size if available.
|
|
73
|
-
*/
|
|
74
|
-
export function resolvePlanWidth(padding = 4) {
|
|
75
|
-
if (typeof process !== 'undefined' &&
|
|
76
|
-
typeof process.stdout?.columns === 'number' &&
|
|
77
|
-
Number.isFinite(process.stdout.columns)) {
|
|
78
|
-
return Math.max(0, process.stdout.columns - padding);
|
|
79
|
-
}
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
function buildStatusSymbols(overrides) {
|
|
83
|
-
return {
|
|
84
|
-
pending: overrides?.pending?.trim() || '□',
|
|
85
|
-
in_progress: overrides?.in_progress?.trim() || '◐',
|
|
86
|
-
completed: overrides?.completed?.trim() || '✔',
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function normalizeStatus(status) {
|
|
90
|
-
if (typeof status !== 'string') {
|
|
91
|
-
return 'pending';
|
|
92
|
-
}
|
|
93
|
-
const normalized = status.trim().toLowerCase().replace(/[\s-]+/g, '_');
|
|
94
|
-
if (normalized === 'completed' || normalized === 'complete' || normalized === 'done') {
|
|
95
|
-
return 'completed';
|
|
96
|
-
}
|
|
97
|
-
if (normalized === 'in_progress' || normalized === 'inprogress') {
|
|
98
|
-
return 'in_progress';
|
|
99
|
-
}
|
|
100
|
-
return 'pending';
|
|
101
|
-
}
|
|
102
|
-
function wrapText(text, width) {
|
|
103
|
-
const normalized = (text || '').trim();
|
|
104
|
-
if (!normalized) {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
const words = normalized.split(/\s+/);
|
|
108
|
-
const lines = [];
|
|
109
|
-
let current = words.shift() ?? '';
|
|
110
|
-
for (const word of words) {
|
|
111
|
-
const candidate = `${current} ${word}`;
|
|
112
|
-
if (visibleLength(candidate) > width && current) {
|
|
113
|
-
lines.push(current);
|
|
114
|
-
current = word;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
current = candidate;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (current) {
|
|
121
|
-
lines.push(current);
|
|
122
|
-
}
|
|
123
|
-
return lines;
|
|
124
|
-
}
|
|
125
|
-
function clampWidth(width) {
|
|
126
|
-
if (typeof width !== 'number' || !Number.isFinite(width)) {
|
|
127
|
-
return DEFAULT_WIDTH;
|
|
128
|
-
}
|
|
129
|
-
const normalized = Math.floor(width);
|
|
130
|
-
if (normalized < MIN_WIDTH) {
|
|
131
|
-
return MIN_WIDTH;
|
|
132
|
-
}
|
|
133
|
-
if (normalized > MAX_WIDTH) {
|
|
134
|
-
return MAX_WIDTH;
|
|
135
|
-
}
|
|
136
|
-
return normalized;
|
|
137
|
-
}
|
|
138
|
-
function visibleLength(value) {
|
|
139
|
-
return value.replace(ANSI_REGEX, '').length;
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=planFormatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planFormatter.js","sourceRoot":"","sources":["../../src/utils/planFormatter.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,UAAU,GAAG,mBAAmB,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