lcagent-cli 0.1.0 → 0.1.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/bin/cli.js CHANGED
@@ -1,14 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import { stdin as input, stdout as output } from 'node:process';
4
- import { createInterface } from 'node:readline/promises';
4
+ import { createInterface } from 'node:readline';
5
5
  import { createApp } from '../app/bootstrap.js';
6
+ import { fetch } from '../core/http.js';
6
7
  import { agentConfigSchema } from '../config/schema.js';
7
8
  import { getConfigPath, loadConfig, updateConfig } from '../config/store.js';
8
9
  import { getDefaultTools } from '../tools/registry.js';
9
10
  function trimTrailingSlash(value) {
10
11
  return value.replace(/\/+$/, '');
11
12
  }
13
+ function questionAsync(rl, prompt) {
14
+ return new Promise(resolve => {
15
+ rl.question(prompt, answer => {
16
+ resolve(answer);
17
+ });
18
+ });
19
+ }
12
20
  async function probeUrl(url) {
13
21
  try {
14
22
  const response = await fetch(url, {
@@ -119,7 +127,7 @@ async function runChat() {
119
127
  const rl = createInterface({ input, output });
120
128
  try {
121
129
  while (true) {
122
- const line = (await rl.question('> ')).trim();
130
+ const line = (await questionAsync(rl, '> ')).trim();
123
131
  if (!line) {
124
132
  continue;
125
133
  }
@@ -0,0 +1,2 @@
1
+ import { fetch as undiciFetch } from 'undici';
2
+ export declare const fetch: typeof undiciFetch;
@@ -0,0 +1,2 @@
1
+ import { fetch as undiciFetch } from 'undici';
2
+ export const fetch = undiciFetch;
@@ -1,3 +1,4 @@
1
+ import { fetch } from './http.js';
1
2
  import { toAnthropicTool, toOpenAICompatibleTool, } from '../tools/types.js';
2
3
  function textFromBlocks(blocks) {
3
4
  return blocks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lcagent-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A minimal coding agent CLI for terminal-based coding workflows.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "engines": {
25
- "node": ">=18"
25
+ "node": ">=16.17"
26
26
  },
27
27
  "keywords": [
28
28
  "agent",
@@ -31,7 +31,8 @@
31
31
  "terminal"
32
32
  ],
33
33
  "dependencies": {
34
- "commander": "^14.0.0",
34
+ "commander": "^11.1.0",
35
+ "undici": "^5.28.5",
35
36
  "zod": "^4.1.5"
36
37
  },
37
38
  "devDependencies": {