@bamptee/aia-code 0.4.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamptee/aia-code",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "AI Architecture Assistant - orchestrate AI-assisted development workflows via CLI tools (Claude, Codex, Gemini)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,10 +8,10 @@ export async function generate(prompt, model, { verbose = false, apply = false }
8
8
  if (apply) {
9
9
  args.push('--allowedTools', 'Edit', 'Write', 'Bash', 'Read', 'Glob', 'Grep');
10
10
  }
11
- if (verbose) {
11
+ if (verbose || apply) {
12
12
  args.push('--verbose');
13
13
  }
14
14
  args.push('-');
15
15
 
16
- return runCli('claude', args, { stdin: prompt, verbose });
16
+ return runCli('claude', args, { stdin: prompt, verbose: verbose || apply, apply });
17
17
  }
@@ -2,8 +2,12 @@ import { spawn } from 'node:child_process';
2
2
  import chalk from 'chalk';
3
3
 
4
4
  const DEFAULT_IDLE_TIMEOUT_MS = 180_000;
5
+ const AGENT_IDLE_TIMEOUT_MS = 600_000;
5
6
 
6
- export function runCli(command, args, { stdin: stdinData, verbose = false, idleTimeoutMs = DEFAULT_IDLE_TIMEOUT_MS } = {}) {
7
+ export function runCli(command, args, { stdin: stdinData, verbose = false, apply = false, idleTimeoutMs } = {}) {
8
+ if (!idleTimeoutMs) {
9
+ idleTimeoutMs = apply ? AGENT_IDLE_TIMEOUT_MS : DEFAULT_IDLE_TIMEOUT_MS;
10
+ }
7
11
  return new Promise((resolve, reject) => {
8
12
  const child = spawn(command, args, {
9
13
  stdio: ['pipe', 'pipe', 'pipe'],
@@ -10,5 +10,5 @@ export async function generate(prompt, model, { verbose = false, apply = false }
10
10
  }
11
11
  args.push('-');
12
12
 
13
- return runCli('gemini', args, { stdin: prompt, verbose });
13
+ return runCli('gemini', args, { stdin: prompt, verbose: verbose || apply, apply });
14
14
  }
@@ -6,9 +6,9 @@ export async function generate(prompt, model, { verbose = false, apply = false }
6
6
  args.push('-c', `model="${model}"`);
7
7
  }
8
8
  if (apply) {
9
- args.push('-c', 'approval_policy="auto-edit"');
9
+ args.push('-c', 'approval_policy="on-failure"');
10
10
  }
11
11
  args.push('-');
12
12
 
13
- return runCli('codex', args, { stdin: prompt, verbose });
13
+ return runCli('codex', args, { stdin: prompt, verbose: verbose || apply, apply });
14
14
  }