@agntk/cli 0.3.0 → 0.3.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/args.d.ts +40 -0
- package/dist/args.d.ts.map +1 -0
- package/dist/args.js +90 -0
- package/dist/args.js.map +1 -0
- package/dist/cli-v2.d.ts +14 -0
- package/dist/cli-v2.d.ts.map +1 -0
- package/dist/cli-v2.js +848 -0
- package/dist/cli-v2.js.map +1 -0
- package/dist/cli.js +72 -17
- package/dist/cli.js.map +1 -1
- package/dist/repl.d.ts +31 -0
- package/dist/repl.d.ts.map +1 -0
- package/dist/repl.js +217 -0
- package/dist/repl.js.map +1 -0
- package/dist/runner.d.ts +38 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +218 -0
- package/dist/runner.js.map +1 -0
- package/package.json +2 -2
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One-shot execution runner for agntk CLI.
|
|
3
|
+
* Takes a resolved config + prompt, creates an agent, and streams output progressively to stdout.
|
|
4
|
+
*
|
|
5
|
+
* This is the "happy path": npx agntk "organize this folder by date"
|
|
6
|
+
*/
|
|
7
|
+
import type { ResolvedCLIConfig } from './config.js';
|
|
8
|
+
import type { EnvironmentContext } from './environment.js';
|
|
9
|
+
export interface RunResult {
|
|
10
|
+
/** Final text output from the agent */
|
|
11
|
+
text: string;
|
|
12
|
+
/** Number of tool steps executed */
|
|
13
|
+
steps: number;
|
|
14
|
+
/** Whether the run completed successfully */
|
|
15
|
+
success: boolean;
|
|
16
|
+
/** Error message if failed */
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface RunOptions {
|
|
20
|
+
/** Resolved CLI config */
|
|
21
|
+
config: ResolvedCLIConfig;
|
|
22
|
+
/** Environment context (for system prompt injection) */
|
|
23
|
+
environment: EnvironmentContext;
|
|
24
|
+
/** Where to write streaming output. Default: process.stdout */
|
|
25
|
+
output?: NodeJS.WritableStream;
|
|
26
|
+
/** Where to write status messages. Default: process.stderr */
|
|
27
|
+
statusOutput?: NodeJS.WritableStream;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Run the agent in one-shot mode.
|
|
31
|
+
* Creates an agent, sends the prompt, streams output to stdout.
|
|
32
|
+
*/
|
|
33
|
+
export declare function runOneShot(prompt: string, options: RunOptions): Promise<RunResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Read piped stdin (e.g., `cat file.log | agntk "explain this"`)
|
|
36
|
+
*/
|
|
37
|
+
export declare function readStdin(timeoutMs?: number): Promise<string | null>;
|
|
38
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAO3D,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,0BAA0B;IAC1B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,wDAAwD;IACxD,WAAW,EAAE,kBAAkB,CAAC;IAChC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC/B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CACtC;AAgCD;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,SAAS,CAAC,CAkKpB;AAMD;;GAEG;AACH,wBAAsB,SAAS,CAAC,SAAS,GAAE,MAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgC/E"}
|
package/dist/runner.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One-shot execution runner for agntk CLI.
|
|
3
|
+
* Takes a resolved config + prompt, creates an agent, and streams output progressively to stdout.
|
|
4
|
+
*
|
|
5
|
+
* This is the "happy path": npx agntk "organize this folder by date"
|
|
6
|
+
*/
|
|
7
|
+
import { createAgent } from '@agntk/core';
|
|
8
|
+
import { formatEnvironmentPrompt } from './environment.js';
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Config → AgentOptions mapping
|
|
11
|
+
// ============================================================================
|
|
12
|
+
function buildAgentOptions(config, environment) {
|
|
13
|
+
const agentOptions = {
|
|
14
|
+
role: config.role,
|
|
15
|
+
maxSteps: config.maxSteps,
|
|
16
|
+
toolPreset: config.toolPreset,
|
|
17
|
+
workspaceRoot: config.workspace,
|
|
18
|
+
enableMemory: config.memory,
|
|
19
|
+
systemPromptPrefix: formatEnvironmentPrompt(environment),
|
|
20
|
+
};
|
|
21
|
+
// If user provided a model string, pass it through
|
|
22
|
+
if (config.model && config.provider) {
|
|
23
|
+
agentOptions.modelProvider = config.provider;
|
|
24
|
+
agentOptions.modelName = config.model;
|
|
25
|
+
}
|
|
26
|
+
return agentOptions;
|
|
27
|
+
}
|
|
28
|
+
// ============================================================================
|
|
29
|
+
// One-Shot Runner
|
|
30
|
+
// ============================================================================
|
|
31
|
+
/**
|
|
32
|
+
* Run the agent in one-shot mode.
|
|
33
|
+
* Creates an agent, sends the prompt, streams output to stdout.
|
|
34
|
+
*/
|
|
35
|
+
export async function runOneShot(prompt, options) {
|
|
36
|
+
const { config, environment } = options;
|
|
37
|
+
const output = options.output ?? process.stdout;
|
|
38
|
+
const statusOutput = options.statusOutput ?? process.stderr;
|
|
39
|
+
// Validate
|
|
40
|
+
if (!prompt || prompt.trim().length === 0) {
|
|
41
|
+
return {
|
|
42
|
+
text: '',
|
|
43
|
+
steps: 0,
|
|
44
|
+
success: false,
|
|
45
|
+
error: 'No prompt provided. Use: agntk "your prompt here" or agntk -i for interactive mode.',
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (config.verbose) {
|
|
49
|
+
statusOutput.write(`[agntk] Role: ${config.role}\n`);
|
|
50
|
+
statusOutput.write(`[agntk] Provider: ${config.provider ?? 'auto-detect'}\n`);
|
|
51
|
+
statusOutput.write(`[agntk] Model: ${config.model ?? 'default'}\n`);
|
|
52
|
+
statusOutput.write(`[agntk] Workspace: ${config.workspace}\n`);
|
|
53
|
+
statusOutput.write(`[agntk] Max steps: ${config.maxSteps}\n`);
|
|
54
|
+
statusOutput.write(`[agntk] Tool preset: ${config.toolPreset}\n`);
|
|
55
|
+
statusOutput.write(`[agntk] Memory: ${config.memory ? 'enabled' : 'disabled'}\n`);
|
|
56
|
+
}
|
|
57
|
+
// Dry run — show what would happen without executing (no API key needed)
|
|
58
|
+
if (config.dryRun) {
|
|
59
|
+
const dryOutput = [
|
|
60
|
+
`[dry-run] Would create agent:`,
|
|
61
|
+
` Role: ${config.role}`,
|
|
62
|
+
` Provider: ${config.provider}`,
|
|
63
|
+
` Model: ${config.model ?? 'default'}`,
|
|
64
|
+
` Workspace: ${config.workspace}`,
|
|
65
|
+
` Max steps: ${config.maxSteps}`,
|
|
66
|
+
` Tool preset: ${config.toolPreset}`,
|
|
67
|
+
` Memory: ${config.memory ? 'enabled' : 'disabled'}`,
|
|
68
|
+
` Prompt: "${prompt}"`,
|
|
69
|
+
``,
|
|
70
|
+
].join('\n');
|
|
71
|
+
output.write(dryOutput);
|
|
72
|
+
return {
|
|
73
|
+
text: dryOutput,
|
|
74
|
+
steps: 0,
|
|
75
|
+
success: true,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// API key required for actual execution
|
|
79
|
+
if (!config.apiKey) {
|
|
80
|
+
return {
|
|
81
|
+
text: '',
|
|
82
|
+
steps: 0,
|
|
83
|
+
success: false,
|
|
84
|
+
error: 'No API key found.\n\n' +
|
|
85
|
+
' 1. Get a free key at https://openrouter.ai/keys\n' +
|
|
86
|
+
' 2. Add to your shell profile (~/.zshrc or ~/.bashrc):\n\n' +
|
|
87
|
+
' export OPENROUTER_API_KEY=sk-or-...\n\n' +
|
|
88
|
+
' Then restart your terminal or run: source ~/.zshrc',
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// Build agent options
|
|
92
|
+
const agentOptions = buildAgentOptions(config, environment);
|
|
93
|
+
try {
|
|
94
|
+
// Create the agent
|
|
95
|
+
const agent = createAgent(agentOptions);
|
|
96
|
+
if (config.verbose) {
|
|
97
|
+
statusOutput.write(`[agntk] Agent created (${agent.agentId})\n`);
|
|
98
|
+
statusOutput.write(`[agntk] Sending prompt...\n`);
|
|
99
|
+
}
|
|
100
|
+
// Stream output progressively so text appears as the model generates it
|
|
101
|
+
const streamResult = await agent.stream({ prompt });
|
|
102
|
+
// Track whether we need a leading newline before text (after tool output)
|
|
103
|
+
let afterToolResult = false;
|
|
104
|
+
// Write text chunks and tool activity as they arrive
|
|
105
|
+
for await (const chunk of streamResult.fullStream) {
|
|
106
|
+
if (chunk.type === 'tool-call') {
|
|
107
|
+
const toolChunk = chunk;
|
|
108
|
+
const argsStr = toolChunk.input ? JSON.stringify(toolChunk.input) : '';
|
|
109
|
+
statusOutput.write(`\n⚡ ${toolChunk.toolName}(${argsStr})\n`);
|
|
110
|
+
afterToolResult = false;
|
|
111
|
+
}
|
|
112
|
+
else if (chunk.type === 'tool-result') {
|
|
113
|
+
const resultChunk = chunk;
|
|
114
|
+
const raw = typeof resultChunk.output === 'string'
|
|
115
|
+
? resultChunk.output
|
|
116
|
+
: JSON.stringify(resultChunk.output);
|
|
117
|
+
// Parse tool output — tools return JSON with { success, output }
|
|
118
|
+
let displayOutput = raw;
|
|
119
|
+
try {
|
|
120
|
+
const parsed = JSON.parse(raw);
|
|
121
|
+
if (parsed && typeof parsed.output === 'string') {
|
|
122
|
+
displayOutput = parsed.output;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// Use raw output as-is
|
|
127
|
+
}
|
|
128
|
+
// Truncate very long output for display
|
|
129
|
+
const maxLen = 2000;
|
|
130
|
+
if (displayOutput.length > maxLen) {
|
|
131
|
+
displayOutput = displayOutput.slice(0, maxLen) + `\n... (${displayOutput.length} chars total)`;
|
|
132
|
+
}
|
|
133
|
+
statusOutput.write(`${displayOutput}\n`);
|
|
134
|
+
afterToolResult = true;
|
|
135
|
+
}
|
|
136
|
+
else if (chunk.type === 'text-delta') {
|
|
137
|
+
const textChunk = chunk;
|
|
138
|
+
if (afterToolResult) {
|
|
139
|
+
output.write('\n');
|
|
140
|
+
afterToolResult = false;
|
|
141
|
+
}
|
|
142
|
+
output.write(textChunk.text);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Get final results (already resolved since we consumed the full stream)
|
|
146
|
+
const finalText = await streamResult.text;
|
|
147
|
+
const steps = await streamResult.steps;
|
|
148
|
+
const stepCount = steps?.length ?? 0;
|
|
149
|
+
// Ensure trailing newline
|
|
150
|
+
if (finalText && !finalText.endsWith('\n')) {
|
|
151
|
+
output.write('\n');
|
|
152
|
+
}
|
|
153
|
+
if (config.verbose) {
|
|
154
|
+
statusOutput.write(`[agntk] Completed in ${stepCount} step(s)\n`);
|
|
155
|
+
const totalUsage = await streamResult.totalUsage;
|
|
156
|
+
if (totalUsage) {
|
|
157
|
+
const usage = totalUsage;
|
|
158
|
+
statusOutput.write(`[agntk] Tokens: ${usage.inputTokens ?? 0} in / ${usage.outputTokens ?? 0} out\n`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
text: finalText ?? '',
|
|
163
|
+
steps: stepCount,
|
|
164
|
+
success: true,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
169
|
+
if (config.verbose) {
|
|
170
|
+
statusOutput.write(`[agntk] Error: ${message}\n`);
|
|
171
|
+
if (error instanceof Error && error.stack) {
|
|
172
|
+
statusOutput.write(`[agntk] ${error.stack}\n`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
text: '',
|
|
177
|
+
steps: 0,
|
|
178
|
+
success: false,
|
|
179
|
+
error: message,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// ============================================================================
|
|
184
|
+
// Piped Input Handler
|
|
185
|
+
// ============================================================================
|
|
186
|
+
/**
|
|
187
|
+
* Read piped stdin (e.g., `cat file.log | agntk "explain this"`)
|
|
188
|
+
*/
|
|
189
|
+
export async function readStdin(timeoutMs = 100) {
|
|
190
|
+
// If stdin is a TTY (interactive terminal), there's no piped input
|
|
191
|
+
if (process.stdin.isTTY) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
return new Promise((resolve) => {
|
|
195
|
+
const chunks = [];
|
|
196
|
+
let resolved = false;
|
|
197
|
+
const finish = () => {
|
|
198
|
+
if (resolved)
|
|
199
|
+
return;
|
|
200
|
+
resolved = true;
|
|
201
|
+
if (chunks.length === 0) {
|
|
202
|
+
resolve(null);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
resolve(Buffer.concat(chunks).toString('utf-8'));
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
process.stdin.on('data', (chunk) => {
|
|
209
|
+
chunks.push(chunk);
|
|
210
|
+
});
|
|
211
|
+
process.stdin.on('end', finish);
|
|
212
|
+
process.stdin.on('error', () => finish());
|
|
213
|
+
// Safety timeout for edge cases
|
|
214
|
+
setTimeout(finish, timeoutMs);
|
|
215
|
+
process.stdin.resume();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=runner.js.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AAK,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAE1C,gCAAgC;QAChC,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAE9B,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agntk/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for agntk — portable AI agent you install and point at problems",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"dotenv": "^17.2.3",
|
|
21
|
-
"@agntk/core": "0.3.
|
|
21
|
+
"@agntk/core": "0.3.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.17.19",
|