cmdr-agent 2.5.0 → 2.5.1
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/bin/cmdr.js +117 -27
- package/dist/bin/cmdr.js.map +1 -1
- package/dist/package.json +9 -4
- package/dist/src/cli/ink/App.d.ts +2 -2
- package/dist/src/cli/ink/App.d.ts.map +1 -1
- package/dist/src/cli/ink/App.js +118 -65
- package/dist/src/cli/ink/App.js.map +1 -1
- package/dist/src/cli/ink/PromptInput.d.ts +17 -0
- package/dist/src/cli/ink/PromptInput.d.ts.map +1 -0
- package/dist/src/cli/ink/PromptInput.js +202 -0
- package/dist/src/cli/ink/PromptInput.js.map +1 -0
- package/dist/src/cli/ink/StatusBar.d.ts +1 -1
- package/dist/src/cli/ink/StatusBar.d.ts.map +1 -1
- package/dist/src/cli/ink/StatusBar.js +116 -21
- package/dist/src/cli/ink/StatusBar.js.map +1 -1
- package/dist/src/cli/ink/input-buffer.d.ts +34 -0
- package/dist/src/cli/ink/input-buffer.d.ts.map +1 -0
- package/dist/src/cli/ink/input-buffer.js +152 -0
- package/dist/src/cli/ink/input-buffer.js.map +1 -0
- package/dist/src/cli/progress.d.ts +6 -5
- package/dist/src/cli/progress.d.ts.map +1 -1
- package/dist/src/cli/progress.js +10 -17
- package/dist/src/cli/progress.js.map +1 -1
- package/dist/src/cli/renderer.d.ts +14 -3
- package/dist/src/cli/renderer.d.ts.map +1 -1
- package/dist/src/cli/renderer.js +93 -32
- package/dist/src/cli/renderer.js.map +1 -1
- package/dist/src/cli/repl.d.ts.map +1 -1
- package/dist/src/cli/repl.js +46 -28
- package/dist/src/cli/repl.js.map +1 -1
- package/dist/src/cli/spinner.d.ts +2 -1
- package/dist/src/cli/spinner.d.ts.map +1 -1
- package/dist/src/cli/spinner.js +16 -1
- package/dist/src/cli/spinner.js.map +1 -1
- package/dist/src/cli/theme.d.ts +14 -12
- package/dist/src/cli/theme.d.ts.map +1 -1
- package/dist/src/cli/theme.js +192 -123
- package/dist/src/cli/theme.js.map +1 -1
- package/dist/src/cli/themes.d.ts +17 -1
- package/dist/src/cli/themes.d.ts.map +1 -1
- package/dist/src/cli/themes.js +125 -27
- package/dist/src/cli/themes.js.map +1 -1
- package/dist/src/core/presets.d.ts.map +1 -1
- package/dist/src/core/presets.js +1 -0
- package/dist/src/core/presets.js.map +1 -1
- package/dist/src/tools/built-in/index.d.ts +2 -1
- package/dist/src/tools/built-in/index.d.ts.map +1 -1
- package/dist/src/tools/built-in/index.js +3 -1
- package/dist/src/tools/built-in/index.js.map +1 -1
- package/dist/src/tools/built-in/pdf-report.d.ts +39 -0
- package/dist/src/tools/built-in/pdf-report.d.ts.map +1 -0
- package/dist/src/tools/built-in/pdf-report.js +326 -0
- package/dist/src/tools/built-in/pdf-report.js.map +1 -0
- package/package.json +9 -4
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in pdf_report tool — generate structured multi-page PDF reports.
|
|
3
|
+
*
|
|
4
|
+
* Provides a high-level JSON API so the LLM doesn't need to write raw
|
|
5
|
+
* reportlab/Python code. The tool takes structured sections and produces
|
|
6
|
+
* a professional PDF with title page, TOC, headers, tables, and page numbers.
|
|
7
|
+
*/
|
|
8
|
+
import { writeFile, mkdir } from 'fs/promises';
|
|
9
|
+
import { resolve, dirname } from 'path';
|
|
10
|
+
import { spawn } from 'child_process';
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { defineTool } from '../registry.js';
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Schema
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
const tableSchema = z.object({
|
|
17
|
+
type: z.literal('table'),
|
|
18
|
+
headers: z.array(z.string()).describe('Column headers'),
|
|
19
|
+
rows: z.array(z.array(z.string())).describe('Row data'),
|
|
20
|
+
});
|
|
21
|
+
const textSchema = z.object({
|
|
22
|
+
type: z.literal('text'),
|
|
23
|
+
body: z.string().describe('Paragraph text (supports \\n for line breaks)'),
|
|
24
|
+
});
|
|
25
|
+
const bulletSchema = z.object({
|
|
26
|
+
type: z.literal('bullets'),
|
|
27
|
+
items: z.array(z.string()).describe('Bullet point items'),
|
|
28
|
+
});
|
|
29
|
+
const codeSchema = z.object({
|
|
30
|
+
type: z.literal('code'),
|
|
31
|
+
language: z.string().optional().describe('Language label'),
|
|
32
|
+
body: z.string().describe('Code block content'),
|
|
33
|
+
});
|
|
34
|
+
const keyValueSchema = z.object({
|
|
35
|
+
type: z.literal('key_value'),
|
|
36
|
+
pairs: z.array(z.object({
|
|
37
|
+
key: z.string(),
|
|
38
|
+
value: z.string(),
|
|
39
|
+
})).describe('Key-value pairs displayed as a two-column layout'),
|
|
40
|
+
});
|
|
41
|
+
const contentBlock = z.discriminatedUnion('type', [
|
|
42
|
+
tableSchema, textSchema, bulletSchema, codeSchema, keyValueSchema,
|
|
43
|
+
]);
|
|
44
|
+
const sectionSchema = z.object({
|
|
45
|
+
title: z.string().describe('Section heading'),
|
|
46
|
+
content: z.array(contentBlock).describe('Content blocks in this section'),
|
|
47
|
+
});
|
|
48
|
+
const reportInput = z.object({
|
|
49
|
+
title: z.string().describe('Report title for the cover page'),
|
|
50
|
+
subtitle: z.string().optional().describe('Subtitle or project name'),
|
|
51
|
+
author: z.string().optional().describe('Author name'),
|
|
52
|
+
date: z.string().optional().describe('Date string (defaults to today)'),
|
|
53
|
+
sections: z.array(sectionSchema).min(1).describe('Report sections in order'),
|
|
54
|
+
outputPath: z.string().describe('Output file path for the PDF'),
|
|
55
|
+
});
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
// Python generator template
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
function buildPythonScript() {
|
|
60
|
+
return `#!/usr/bin/env python3
|
|
61
|
+
"""Auto-generated PDF report script. Reads data from a JSON file."""
|
|
62
|
+
import json, sys, os
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
from reportlab.lib.pagesizes import letter
|
|
66
|
+
from reportlab.lib.units import inch
|
|
67
|
+
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
|
68
|
+
from reportlab.lib.colors import HexColor
|
|
69
|
+
from reportlab.lib.enums import TA_CENTER, TA_LEFT
|
|
70
|
+
from reportlab.platypus import (
|
|
71
|
+
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
|
|
72
|
+
PageBreak, Preformatted, ListFlowable, ListItem,
|
|
73
|
+
)
|
|
74
|
+
from reportlab.lib import colors
|
|
75
|
+
except ImportError:
|
|
76
|
+
print("ERROR: reportlab not installed. Run: pip install reportlab", file=sys.stderr)
|
|
77
|
+
sys.exit(1)
|
|
78
|
+
|
|
79
|
+
if len(sys.argv) < 3:
|
|
80
|
+
print("Usage: python3 report.py <data.json> <output.pdf>", file=sys.stderr)
|
|
81
|
+
sys.exit(1)
|
|
82
|
+
|
|
83
|
+
with open(sys.argv[1], 'r', encoding='utf-8') as f:
|
|
84
|
+
data = json.load(f)
|
|
85
|
+
output_path = sys.argv[2]
|
|
86
|
+
|
|
87
|
+
# ── Styles ──────────────────────────────────────────────
|
|
88
|
+
styles = getSampleStyleSheet()
|
|
89
|
+
styles.add(ParagraphStyle(
|
|
90
|
+
name='CoverTitle', fontSize=28, leading=34,
|
|
91
|
+
alignment=TA_CENTER, spaceAfter=12,
|
|
92
|
+
textColor=HexColor('#1a1a2e'),
|
|
93
|
+
))
|
|
94
|
+
styles.add(ParagraphStyle(
|
|
95
|
+
name='CoverSubtitle', fontSize=16, leading=20,
|
|
96
|
+
alignment=TA_CENTER, spaceAfter=8,
|
|
97
|
+
textColor=HexColor('#4a4a6a'),
|
|
98
|
+
))
|
|
99
|
+
styles.add(ParagraphStyle(
|
|
100
|
+
name='CoverMeta', fontSize=12, leading=16,
|
|
101
|
+
alignment=TA_CENTER, spaceAfter=4,
|
|
102
|
+
textColor=HexColor('#6a6a8a'),
|
|
103
|
+
))
|
|
104
|
+
styles.add(ParagraphStyle(
|
|
105
|
+
name='SectionHead', fontSize=18, leading=22,
|
|
106
|
+
spaceAfter=12, spaceBefore=20,
|
|
107
|
+
textColor=HexColor('#1a1a2e'),
|
|
108
|
+
borderWidth=1, borderColor=HexColor('#e0e0e0'),
|
|
109
|
+
borderPadding=(0, 0, 4, 0),
|
|
110
|
+
))
|
|
111
|
+
styles.add(ParagraphStyle(
|
|
112
|
+
name='BodyText2', fontSize=10, leading=14,
|
|
113
|
+
spaceAfter=8, spaceBefore=4,
|
|
114
|
+
))
|
|
115
|
+
styles.add(ParagraphStyle(
|
|
116
|
+
name='CodeBlock', fontName='Courier', fontSize=8, leading=10,
|
|
117
|
+
spaceAfter=8, spaceBefore=4, backColor=HexColor('#f5f5f5'),
|
|
118
|
+
borderWidth=0.5, borderColor=HexColor('#cccccc'),
|
|
119
|
+
borderPadding=6, leftIndent=12, rightIndent=12,
|
|
120
|
+
))
|
|
121
|
+
styles.add(ParagraphStyle(
|
|
122
|
+
name='BulletText', fontSize=10, leading=14,
|
|
123
|
+
spaceAfter=3, leftIndent=20, bulletIndent=10,
|
|
124
|
+
))
|
|
125
|
+
styles.add(ParagraphStyle(
|
|
126
|
+
name='TOCEntry', fontSize=11, leading=16,
|
|
127
|
+
spaceAfter=4, leftIndent=20,
|
|
128
|
+
textColor=HexColor('#333366'),
|
|
129
|
+
))
|
|
130
|
+
|
|
131
|
+
# ── Page numbering ──────────────────────────────────────
|
|
132
|
+
def add_page_number(canvas, doc):
|
|
133
|
+
page_num = canvas.getPageNumber()
|
|
134
|
+
text = f"Page {page_num}"
|
|
135
|
+
canvas.saveState()
|
|
136
|
+
canvas.setFont('Helvetica', 8)
|
|
137
|
+
canvas.setFillColor(HexColor('#888888'))
|
|
138
|
+
canvas.drawCentredString(letter[0] / 2, 0.5 * inch, text)
|
|
139
|
+
canvas.restoreState()
|
|
140
|
+
|
|
141
|
+
# ── Build story ─────────────────────────────────────────
|
|
142
|
+
story = []
|
|
143
|
+
|
|
144
|
+
# Cover page
|
|
145
|
+
story.append(Spacer(1, 2 * inch))
|
|
146
|
+
story.append(Paragraph(data['title'], styles['CoverTitle']))
|
|
147
|
+
if data.get('subtitle'):
|
|
148
|
+
story.append(Paragraph(data['subtitle'], styles['CoverSubtitle']))
|
|
149
|
+
story.append(Spacer(1, 0.5 * inch))
|
|
150
|
+
if data.get('author'):
|
|
151
|
+
story.append(Paragraph(f"Author: {data['author']}", styles['CoverMeta']))
|
|
152
|
+
story.append(Paragraph(f"Date: {data['date']}", styles['CoverMeta']))
|
|
153
|
+
story.append(PageBreak())
|
|
154
|
+
|
|
155
|
+
# Table of Contents
|
|
156
|
+
story.append(Paragraph("Table of Contents", styles['SectionHead']))
|
|
157
|
+
story.append(Spacer(1, 0.2 * inch))
|
|
158
|
+
for i, section in enumerate(data['sections'], 1):
|
|
159
|
+
story.append(Paragraph(f"{i}. {section['title']}", styles['TOCEntry']))
|
|
160
|
+
story.append(PageBreak())
|
|
161
|
+
|
|
162
|
+
# Sections
|
|
163
|
+
for section in data['sections']:
|
|
164
|
+
story.append(Paragraph(section['title'], styles['SectionHead']))
|
|
165
|
+
|
|
166
|
+
for block in section.get('content', []):
|
|
167
|
+
btype = block['type']
|
|
168
|
+
|
|
169
|
+
if btype == 'text':
|
|
170
|
+
for para in block['body'].split('\\n\\n'):
|
|
171
|
+
if para.strip():
|
|
172
|
+
story.append(Paragraph(para.strip().replace('\\n', '<br/>'), styles['BodyText2']))
|
|
173
|
+
|
|
174
|
+
elif btype == 'bullets':
|
|
175
|
+
items = []
|
|
176
|
+
for item in block['items']:
|
|
177
|
+
items.append(ListItem(Paragraph(item, styles['BodyText2']), bulletColor=HexColor('#333366')))
|
|
178
|
+
story.append(ListFlowable(items, bulletType='bullet', start='bulletchar'))
|
|
179
|
+
story.append(Spacer(1, 0.1 * inch))
|
|
180
|
+
|
|
181
|
+
elif btype == 'table':
|
|
182
|
+
headers = block['headers']
|
|
183
|
+
rows = block['rows']
|
|
184
|
+
all_data = [headers] + rows
|
|
185
|
+
t = Table(all_data, repeatRows=1)
|
|
186
|
+
t.setStyle(TableStyle([
|
|
187
|
+
('BACKGROUND', (0, 0), (-1, 0), HexColor('#1a1a2e')),
|
|
188
|
+
('TEXTCOLOR', (0, 0), (-1, 0), colors.white),
|
|
189
|
+
('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
|
|
190
|
+
('FONTSIZE', (0, 0), (-1, 0), 9),
|
|
191
|
+
('FONTSIZE', (0, 1), (-1, -1), 8),
|
|
192
|
+
('ALIGN', (0, 0), (-1, -1), 'LEFT'),
|
|
193
|
+
('GRID', (0, 0), (-1, -1), 0.5, HexColor('#cccccc')),
|
|
194
|
+
('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, HexColor('#f8f8ff')]),
|
|
195
|
+
('TOPPADDING', (0, 0), (-1, -1), 4),
|
|
196
|
+
('BOTTOMPADDING', (0, 0), (-1, -1), 4),
|
|
197
|
+
('LEFTPADDING', (0, 0), (-1, -1), 6),
|
|
198
|
+
('RIGHTPADDING', (0, 0), (-1, -1), 6),
|
|
199
|
+
]))
|
|
200
|
+
story.append(t)
|
|
201
|
+
story.append(Spacer(1, 0.15 * inch))
|
|
202
|
+
|
|
203
|
+
elif btype == 'code':
|
|
204
|
+
label = block.get('language', '')
|
|
205
|
+
if label:
|
|
206
|
+
story.append(Paragraph(f"<i>{label}</i>", styles['BodyText2']))
|
|
207
|
+
story.append(Preformatted(block['body'], styles['CodeBlock']))
|
|
208
|
+
|
|
209
|
+
elif btype == 'key_value':
|
|
210
|
+
kv_data = [[p['key'], p['value']] for p in block['pairs']]
|
|
211
|
+
t = Table(kv_data, colWidths=[2.2 * inch, 4.3 * inch])
|
|
212
|
+
t.setStyle(TableStyle([
|
|
213
|
+
('FONTNAME', (0, 0), (0, -1), 'Helvetica-Bold'),
|
|
214
|
+
('FONTSIZE', (0, 0), (-1, -1), 9),
|
|
215
|
+
('ALIGN', (0, 0), (0, -1), 'RIGHT'),
|
|
216
|
+
('ALIGN', (1, 0), (1, -1), 'LEFT'),
|
|
217
|
+
('GRID', (0, 0), (-1, -1), 0.3, HexColor('#e0e0e0')),
|
|
218
|
+
('ROWBACKGROUNDS', (0, 0), (-1, -1), [colors.white, HexColor('#f8f8ff')]),
|
|
219
|
+
('TOPPADDING', (0, 0), (-1, -1), 4),
|
|
220
|
+
('BOTTOMPADDING', (0, 0), (-1, -1), 4),
|
|
221
|
+
('LEFTPADDING', (0, 0), (-1, -1), 6),
|
|
222
|
+
('RIGHTPADDING', (0, 0), (-1, -1), 6),
|
|
223
|
+
]))
|
|
224
|
+
story.append(t)
|
|
225
|
+
story.append(Spacer(1, 0.15 * inch))
|
|
226
|
+
|
|
227
|
+
story.append(Spacer(1, 0.3 * inch))
|
|
228
|
+
|
|
229
|
+
# ── Generate ────────────────────────────────────────────
|
|
230
|
+
doc = SimpleDocTemplate(
|
|
231
|
+
output_path,
|
|
232
|
+
pagesize=letter,
|
|
233
|
+
topMargin=0.75 * inch,
|
|
234
|
+
bottomMargin=0.75 * inch,
|
|
235
|
+
leftMargin=0.75 * inch,
|
|
236
|
+
rightMargin=0.75 * inch,
|
|
237
|
+
title=data['title'],
|
|
238
|
+
author=data.get('author', ''),
|
|
239
|
+
)
|
|
240
|
+
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
|
|
241
|
+
print(f"Generated: {output_path} ({len(data['sections'])} sections, {sum(len(s.get('content',[])) for s in data['sections'])} content blocks)")
|
|
242
|
+
`;
|
|
243
|
+
}
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// Tool definition
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
export const pdfReportTool = defineTool({
|
|
248
|
+
name: 'pdf_report',
|
|
249
|
+
description: 'Generate a professional multi-page PDF report with structured sections. ' +
|
|
250
|
+
'Provide a title, sections (each with content blocks: text, bullets, tables, code, key_value), ' +
|
|
251
|
+
'and an output path. The tool handles formatting, cover page, table of contents, and page numbers. ' +
|
|
252
|
+
'Requires Python 3 and reportlab (auto-installs if missing).',
|
|
253
|
+
inputSchema: reportInput,
|
|
254
|
+
execute: async (input, context) => {
|
|
255
|
+
const cwd = context.cwd ?? process.cwd();
|
|
256
|
+
const outputPath = resolve(cwd, input.outputPath);
|
|
257
|
+
// Generate the Python script and write data as separate JSON file (avoids escaping issues)
|
|
258
|
+
const script = buildPythonScript();
|
|
259
|
+
const scriptPath = resolve(cwd, '.cmdr_report_gen.py');
|
|
260
|
+
const dataPath = resolve(cwd, '.cmdr_report_data.json');
|
|
261
|
+
try {
|
|
262
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
263
|
+
await writeFile(scriptPath, script, 'utf-8');
|
|
264
|
+
await writeFile(dataPath, JSON.stringify({
|
|
265
|
+
title: input.title,
|
|
266
|
+
subtitle: input.subtitle || '',
|
|
267
|
+
author: input.author || '',
|
|
268
|
+
date: input.date || new Date().toISOString().split('T')[0],
|
|
269
|
+
sections: input.sections,
|
|
270
|
+
}), 'utf-8');
|
|
271
|
+
// Ensure reportlab is installed (try with --break-system-packages for macOS PEP 668)
|
|
272
|
+
const check = await runPython(cwd, ['-c', 'import reportlab']);
|
|
273
|
+
if (check.exitCode !== 0) {
|
|
274
|
+
const install = await runPython(cwd, ['-m', 'pip', 'install', '--break-system-packages', 'reportlab', '-q']);
|
|
275
|
+
if (install.exitCode !== 0) {
|
|
276
|
+
// Fallback without --break-system-packages
|
|
277
|
+
await runPython(cwd, ['-m', 'pip', 'install', 'reportlab', '-q']);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Generate PDF
|
|
281
|
+
const result = await runPython(cwd, [scriptPath, dataPath, outputPath]);
|
|
282
|
+
// Clean up temp files
|
|
283
|
+
try {
|
|
284
|
+
const { unlink } = await import('fs/promises');
|
|
285
|
+
await unlink(scriptPath).catch(() => { });
|
|
286
|
+
await unlink(dataPath).catch(() => { });
|
|
287
|
+
}
|
|
288
|
+
catch { /* best effort */ }
|
|
289
|
+
if (result.exitCode !== 0) {
|
|
290
|
+
return { data: `PDF generation failed:\n${result.stderr || result.stdout}`, isError: true };
|
|
291
|
+
}
|
|
292
|
+
return { data: result.stdout.trim() || `Generated PDF: ${input.outputPath}` };
|
|
293
|
+
}
|
|
294
|
+
catch (err) {
|
|
295
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
296
|
+
return { data: `PDF generation error: ${msg}`, isError: true };
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
function runPython(cwd, args) {
|
|
301
|
+
return new Promise((resolve) => {
|
|
302
|
+
const stdoutChunks = [];
|
|
303
|
+
const stderrChunks = [];
|
|
304
|
+
const child = spawn('python3', args, {
|
|
305
|
+
cwd,
|
|
306
|
+
env: process.env,
|
|
307
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
308
|
+
});
|
|
309
|
+
child.stdout.on('data', (chunk) => stdoutChunks.push(chunk));
|
|
310
|
+
child.stderr.on('data', (chunk) => stderrChunks.push(chunk));
|
|
311
|
+
const timer = setTimeout(() => child.kill('SIGKILL'), 30_000);
|
|
312
|
+
child.on('close', (code) => {
|
|
313
|
+
clearTimeout(timer);
|
|
314
|
+
resolve({
|
|
315
|
+
stdout: Buffer.concat(stdoutChunks).toString('utf-8'),
|
|
316
|
+
stderr: Buffer.concat(stderrChunks).toString('utf-8'),
|
|
317
|
+
exitCode: code ?? 1,
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
child.on('error', (err) => {
|
|
321
|
+
clearTimeout(timer);
|
|
322
|
+
resolve({ stdout: '', stderr: err.message, exitCode: 1 });
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
//# sourceMappingURL=pdf-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-report.js","sourceRoot":"","sources":["../../../../src/tools/built-in/pdf-report.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,a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AAC,CAAA;QAEF,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QACpE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QAEpE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAA;QAE7D,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,YAAY,CAAC,KAAK,CAAC,CAAA;YACnB,OAAO,CAAC;gBACN,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACrD,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACrD,QAAQ,EAAE,IAAI,IAAI,CAAC;aACpB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxB,YAAY,CAAC,KAAK,CAAC,CAAA;YACnB,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAA;QAC3D,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmdr-agent",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Open-source multi-agent coding tool for your terminal. Powered by Ollama.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,18 +34,23 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"chalk": "^5.3.0",
|
|
37
|
-
"
|
|
37
|
+
"highlight.js": "^11.11.1",
|
|
38
|
+
"ink": "npm:@jrichman/ink@6.6.7",
|
|
39
|
+
"ink-spinner": "^5.0.0",
|
|
38
40
|
"ink-text-input": "^6.0.0",
|
|
41
|
+
"lowlight": "^3.3.0",
|
|
39
42
|
"marked": "^14.0.0",
|
|
40
43
|
"marked-terminal": "^7.2.0",
|
|
41
44
|
"ora": "^8.0.0",
|
|
42
|
-
"react": "^
|
|
45
|
+
"react": "^19.2.0",
|
|
43
46
|
"smol-toml": "^1.6.1",
|
|
47
|
+
"string-width": "^8.1.0",
|
|
48
|
+
"strip-ansi": "^7.1.0",
|
|
44
49
|
"zod": "^3.23.0"
|
|
45
50
|
},
|
|
46
51
|
"devDependencies": {
|
|
47
52
|
"@types/node": "^22.0.0",
|
|
48
|
-
"@types/react": "^
|
|
53
|
+
"@types/react": "^19.2.2",
|
|
49
54
|
"tsx": "^4.21.0",
|
|
50
55
|
"typescript": "^5.6.0",
|
|
51
56
|
"vitest": "^2.1.0"
|