@robota-sdk/agent-cli 3.0.0-beta.59 → 3.0.0-beta.60
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/README.md +29 -22
- package/dist/node/bin.js +3 -4
- package/dist/node/{chunk-4ZX5RLIX.js → chunk-6XQKLNRF.js} +20 -29
- package/dist/node/{chunk-B522YHTK.js → chunk-GHQHUBHC.js} +703 -919
- package/dist/node/index.cjs +747 -997
- package/dist/node/index.d.cts +5 -0
- package/dist/node/index.d.ts +5 -0
- package/dist/node/index.js +2 -2
- package/dist/node/subagents/child-process-subagent-worker.js +1 -1
- package/package.json +27 -11
package/README.md
CHANGED
|
@@ -136,16 +136,18 @@ Non-interactive/headless mode never prompts. Configure a provider ahead of time
|
|
|
136
136
|
|
|
137
137
|
## Built-in Tools
|
|
138
138
|
|
|
139
|
-
The AI agent can invoke
|
|
140
|
-
|
|
141
|
-
| Tool
|
|
142
|
-
|
|
|
143
|
-
| `Bash`
|
|
144
|
-
| `Read`
|
|
145
|
-
| `Write`
|
|
146
|
-
| `Edit`
|
|
147
|
-
| `Glob`
|
|
148
|
-
| `Grep`
|
|
139
|
+
The AI agent can invoke 8 local tools:
|
|
140
|
+
|
|
141
|
+
| Tool | Description | Primary Argument |
|
|
142
|
+
| ----------- | ------------------------------------ | ---------------- |
|
|
143
|
+
| `Bash` | Execute shell commands | `command` |
|
|
144
|
+
| `Read` | Read file contents with line numbers | `filePath` |
|
|
145
|
+
| `Write` | Write content to a file | `filePath` |
|
|
146
|
+
| `Edit` | Replace a string in a file | `filePath` |
|
|
147
|
+
| `Glob` | Find files matching a pattern | `pattern` |
|
|
148
|
+
| `Grep` | Search file contents with regex | `pattern` |
|
|
149
|
+
| `WebFetch` | Fetch URL content as text | `url` |
|
|
150
|
+
| `WebSearch` | Search the internet | `query` |
|
|
149
151
|
|
|
150
152
|
## Recent TUI Capabilities
|
|
151
153
|
|
|
@@ -273,8 +275,9 @@ When a session has a name, it appears in three places:
|
|
|
273
275
|
| `/compact [instructions]` | Compress context window |
|
|
274
276
|
| `/cost` | Show session info |
|
|
275
277
|
| `/context` | Context window details |
|
|
278
|
+
| `/agent` | Run and manage background subagent jobs |
|
|
276
279
|
| `/permissions` | Show permission rules |
|
|
277
|
-
| `/plugin [subcommand]` | Plugin management
|
|
280
|
+
| `/plugin [subcommand]` | Plugin management |
|
|
278
281
|
| `/resume` | List recent sessions and resume one |
|
|
279
282
|
| `/rename <name>` | Rename the current session |
|
|
280
283
|
| `/exit` | Exit CLI |
|
|
@@ -283,16 +286,19 @@ Typing `/` triggers an autocomplete popup with arrow-key navigation and Esc to d
|
|
|
283
286
|
|
|
284
287
|
## Plugin Management
|
|
285
288
|
|
|
286
|
-
The `/plugin` command opens an interactive TUI
|
|
289
|
+
The `/plugin` command opens an interactive TUI or runs plugin operations through the injected plugin command module:
|
|
287
290
|
|
|
288
|
-
| Subcommand
|
|
289
|
-
|
|
|
290
|
-
| `/plugin
|
|
291
|
-
| `/plugin
|
|
292
|
-
| `/plugin
|
|
293
|
-
| `/plugin
|
|
294
|
-
| `/plugin
|
|
295
|
-
| `/plugin marketplace
|
|
291
|
+
| Subcommand | Description |
|
|
292
|
+
| ---------------------------------------- | ------------------------------------- |
|
|
293
|
+
| `/plugin` or `/plugin manage` | Open the plugin manager TUI |
|
|
294
|
+
| `/plugin install <name>@<marketplace>` | Install a plugin from a marketplace |
|
|
295
|
+
| `/plugin uninstall <name>@<marketplace>` | Remove an installed plugin |
|
|
296
|
+
| `/plugin enable <name>@<marketplace>` | Enable a disabled plugin |
|
|
297
|
+
| `/plugin disable <name>@<marketplace>` | Disable a plugin without uninstalling |
|
|
298
|
+
| `/plugin marketplace add <source>` | Add a marketplace source |
|
|
299
|
+
| `/plugin marketplace remove <name>` | Remove a marketplace source |
|
|
300
|
+
| `/plugin marketplace update <name>` | Update a marketplace source |
|
|
301
|
+
| `/plugin marketplace list` | List configured marketplace sources |
|
|
296
302
|
|
|
297
303
|
## Configuration
|
|
298
304
|
|
|
@@ -385,9 +391,10 @@ bin.ts → cli.ts (arg parsing)
|
|
|
385
391
|
├── useInteractiveSession (ONLY React↔SDK bridge)
|
|
386
392
|
│ ├── InteractiveSession (SDK)
|
|
387
393
|
│ ├── CommandRegistry (SDK, re-exported by CLI)
|
|
388
|
-
│ │ ├── BuiltinCommandSource (SDK)
|
|
394
|
+
│ │ ├── BuiltinCommandSource (SDK, empty by default)
|
|
389
395
|
│ │ ├── SkillCommandSource (SDK, discovers from 4 paths)
|
|
390
|
-
│ │
|
|
396
|
+
│ │ ├── PluginCommandSource (SDK, plugin skills)
|
|
397
|
+
│ │ └── ICommandModule sources (/help, /compact, ...)
|
|
391
398
|
│ └── SystemCommandExecutor (SDK)
|
|
392
399
|
├── plugin-hooks-merger.ts (merges plugin hooks into SDK config)
|
|
393
400
|
├── MessageList.tsx
|
package/dist/node/bin.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startCli
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-GHQHUBHC.js";
|
|
5
|
+
import "./chunk-6XQKLNRF.js";
|
|
6
6
|
|
|
7
7
|
// src/bin.ts
|
|
8
|
-
import { createAgentCommandModule } from "@robota-sdk/agent-command-agent";
|
|
9
8
|
process.on("uncaughtException", (err) => {
|
|
10
9
|
const msg = err.message ?? "";
|
|
11
10
|
const isLikelyIME = msg.includes("string-width") || msg.includes("setCursorPosition") || msg.includes("getStringWidth") || msg.includes("slice") || msg.includes("charCodeAt");
|
|
@@ -16,7 +15,7 @@ process.on("uncaughtException", (err) => {
|
|
|
16
15
|
}
|
|
17
16
|
throw err;
|
|
18
17
|
});
|
|
19
|
-
startCli(
|
|
18
|
+
startCli().catch((err) => {
|
|
20
19
|
const message = err instanceof Error ? err.message : String(err);
|
|
21
20
|
process.stderr.write(message + "\n");
|
|
22
21
|
process.exit(1);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/utils/provider-factory.ts
|
|
2
2
|
import { readFileSync, existsSync } from "fs";
|
|
3
3
|
import { join } from "path";
|
|
4
|
-
import { homedir } from "os";
|
|
5
4
|
|
|
6
5
|
// src/utils/provider-default-definitions.ts
|
|
7
6
|
import { createAnthropicProviderDefinition } from "@robota-sdk/agent-provider-anthropic";
|
|
@@ -21,31 +20,12 @@ var DEFAULT_PROVIDER_DEFINITIONS = [
|
|
|
21
20
|
import { findProviderDefinition, formatSupportedProviderTypes } from "@robota-sdk/agent-core";
|
|
22
21
|
|
|
23
22
|
// src/utils/env-ref.ts
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return void 0;
|
|
31
|
-
}
|
|
32
|
-
const envName = value.slice(ENV_REFERENCE_PREFIX.length).trim();
|
|
33
|
-
return envName.length > 0 ? envName : void 0;
|
|
34
|
-
}
|
|
35
|
-
function resolveEnvReference(value) {
|
|
36
|
-
const envName = getEnvReferenceName(value);
|
|
37
|
-
if (envName === void 0) {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
const resolved = process.env[envName];
|
|
41
|
-
return resolved !== void 0 && resolved.length > 0 ? resolved : void 0;
|
|
42
|
-
}
|
|
43
|
-
function hasUsableSecretReference(value) {
|
|
44
|
-
if (value === void 0 || value.length === 0) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
return resolveEnvReference(value) !== void 0;
|
|
48
|
-
}
|
|
23
|
+
import {
|
|
24
|
+
formatEnvReference,
|
|
25
|
+
hasUsableSecretReference,
|
|
26
|
+
isEnvReference,
|
|
27
|
+
resolveEnvReference
|
|
28
|
+
} from "@robota-sdk/agent-sdk";
|
|
49
29
|
|
|
50
30
|
// src/utils/provider-factory.ts
|
|
51
31
|
function readProviderSettings(cwd, options = {}) {
|
|
@@ -61,14 +41,23 @@ function readProviderSettings(cwd, options = {}) {
|
|
|
61
41
|
throw new Error("No provider configuration found. Run `robota` to set up.");
|
|
62
42
|
}
|
|
63
43
|
function readMergedProviderSettings(cwd) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
return readMergedProviderSettingsFromPaths(getProviderSettingsPaths(cwd));
|
|
45
|
+
}
|
|
46
|
+
function getProviderSettingsPaths(cwd) {
|
|
47
|
+
const userHome = getUserHome();
|
|
48
|
+
return [
|
|
49
|
+
join(userHome, ".robota", "settings.json"),
|
|
50
|
+
join(userHome, ".claude", "settings.json"),
|
|
67
51
|
join(cwd, ".robota", "settings.json"),
|
|
68
52
|
join(cwd, ".robota", "settings.local.json"),
|
|
69
53
|
join(cwd, ".claude", "settings.json"),
|
|
70
54
|
join(cwd, ".claude", "settings.local.json")
|
|
71
55
|
];
|
|
56
|
+
}
|
|
57
|
+
function getUserHome() {
|
|
58
|
+
return process.env.HOME ?? process.env.USERPROFILE ?? "/";
|
|
59
|
+
}
|
|
60
|
+
function readMergedProviderSettingsFromPaths(paths) {
|
|
72
61
|
return paths.reduce((settings, filePath) => {
|
|
73
62
|
const parsed = readSettingsFile(filePath);
|
|
74
63
|
if (parsed === void 0) {
|
|
@@ -269,6 +258,8 @@ export {
|
|
|
269
258
|
hasUsableSecretReference,
|
|
270
259
|
readProviderSettings,
|
|
271
260
|
readMergedProviderSettings,
|
|
261
|
+
getProviderSettingsPaths,
|
|
262
|
+
readMergedProviderSettingsFromPaths,
|
|
272
263
|
createProviderFromSettings,
|
|
273
264
|
createProviderFromProfile,
|
|
274
265
|
isSubagentWorkerParentMessage,
|