@robota-sdk/agent-command 3.0.0-beta.83 → 3.0.0-beta.85
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/CHANGELOG.md +69 -0
- package/README.md +71 -62
- package/dist/node/index.cjs +75 -72
- package/dist/node/index.d.cts +37 -45
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +37 -45
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +78 -75
- package/dist/node/index.js.map +1 -1
- package/package.json +9 -8
- package/src/agent/__tests__/agent-command.test.ts +62 -0
- package/src/agent/agent-command-parser.ts +2 -2
- package/src/agent/agent-command.ts +20 -0
- package/src/default/__tests__/__snapshots__/model-exposure.test.ts.snap +2 -2
- package/src/default/__tests__/default-command-modules.test.ts +5 -4
- package/src/default/__tests__/model-exposure.test.ts +2 -0
- package/src/default/default-command-modules.ts +8 -0
- package/src/doctor/__tests__/doctor-fixture.ts +1 -0
- package/src/doctor/__tests__/doctor-runner.test.ts +26 -6
- package/src/doctor/doctor-extensions-probe.ts +36 -12
- package/src/effort/effort-command.test.ts +65 -2
- package/src/effort/effort-command.ts +19 -5
- package/src/git/__tests__/fake-git-port.ts +9 -2
- package/src/git/git-command-module.ts +3 -4
- package/src/git/git-commit.ts +6 -3
- package/src/git/index.ts +4 -1
- package/src/goal/goal-command.ts +3 -1
- package/src/index.ts +6 -0
- package/src/mcp-activation/__tests__/mcp-activation-command.test.ts +225 -1
- package/src/mcp-activation/mcp-activation-command-module.ts +6 -0
- package/src/mcp-activation/mcp-activation-command.ts +77 -2
- package/src/memory/__tests__/memory-command-module.test.ts +40 -2
- package/src/memory/__tests__/memory-command-unavailable.test.ts +63 -0
- package/src/memory/memory-command-module.ts +4 -2
- package/src/memory/memory-command.ts +42 -2
- package/src/mode/__tests__/mode-command-module.test.ts +40 -0
- package/src/mode/mode-command.ts +1 -1
- package/src/model/__tests__/model-command-module.test.ts +80 -0
- package/src/model/__tests__/model-command.test.ts +240 -0
- package/src/model/index.ts +6 -0
- package/src/model/model-command-module.ts +56 -0
- package/src/model/model-command.ts +223 -0
- package/src/plugin/__tests__/plugin-command-module.test.ts +84 -3
- package/src/plugin/plugin-command.ts +50 -8
- package/src/provider/__tests__/org-policy.test.ts +4 -0
- package/src/provider/__tests__/provider-command-module.test.ts +276 -14
- package/src/provider/__tests__/scripted-interaction.ts +12 -2
- package/src/provider/provider-command-execution.ts +54 -8
- package/src/provider/provider-command-profile-lifecycle.ts +48 -2
- package/src/provider/provider-command-profile-operations.ts +14 -0
- package/src/provider/provider-command-profile.ts +7 -4
- package/src/provider/provider-command-setup.ts +14 -1
- package/src/rewind/__tests__/rewind-command-module.test.ts +2 -1
- package/src/schedule/__tests__/loop-command-functional.test.ts +13 -0
- package/src/schedule/__tests__/loop-command.test.ts +238 -4
- package/src/schedule/loop-command.ts +95 -3
- package/src/schedule/schedule-command-module.ts +8 -4
- package/src/settings/settings-command-module.ts +2 -2
- package/src/git/__tests__/git-diff.test.ts +0 -125
- package/src/git/__tests__/git-process.test.ts +0 -221
- package/src/git/__tests__/git-status.test.ts +0 -117
- package/src/git/git-diff.ts +0 -129
- package/src/git/git-process.ts +0 -169
- package/src/git/git-status.ts +0 -134
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @robota-sdk/agent-command
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.85
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3c1967f: Reloading plugins updates the live session's skill routing and model skill catalogue together
|
|
8
|
+
with command completion. Disabled plugins stop being executable after reload, and unreadable
|
|
9
|
+
settings clear the plugin skill snapshot. Hook changes require a new session.
|
|
10
|
+
- db35dcd: MCP approvals now outlive the process, and an approval takes effect at once. The `robota` CLI keeps
|
|
11
|
+
activation decisions in `~/.robota/mcp-approvals.json` (owner-only) unless the host passes its own
|
|
12
|
+
`mcpApprovalStore`, so an approved server connects at later starts until its definition changes.
|
|
13
|
+
`/mcp approve <server>` now also connects the server in the running session, the way `/mcp reload`
|
|
14
|
+
does, instead of waiting for a restart. A remote server without OAuth therefore connects once
|
|
15
|
+
approved; stdio servers still need a host-supplied authority.
|
|
16
|
+
- 4cee6fb: Report unsupported MCP transports at startup and reload instead of silently skipping them,
|
|
17
|
+
and distinguish plugin MCP declaration inspection from a runtime connection.
|
|
18
|
+
- 043fd27: In `plan` mode the model can no longer save project memory with `/memory add`. The command is auto-approved, so it ran in plan mode while `Write` and `Edit` were denied there. Reading memory, and adding it by hand, still work in plan mode.
|
|
19
|
+
- 6ee8725: A user settings file that does not parse no longer reads as "no plugin is disabled". Plugin settings
|
|
20
|
+
now refuse to read it: no plugin loads (skills, commands, hooks and themes alike), a plugin command
|
|
21
|
+
such as `/plugin enable` fails instead of rewriting the whole settings file with the plugin keys
|
|
22
|
+
alone, and `robota doctor` reports the plugin check as failed while still inspecting each installed
|
|
23
|
+
plugin. The CLI already refuses to start with such a file; this covers a session started later in
|
|
24
|
+
the same process.
|
|
25
|
+
- Updated dependencies [4e11579]
|
|
26
|
+
- Updated dependencies [41cca13]
|
|
27
|
+
- Updated dependencies [193a0bc]
|
|
28
|
+
- Updated dependencies [54e2848]
|
|
29
|
+
- Updated dependencies [3c1967f]
|
|
30
|
+
- Updated dependencies [ada3841]
|
|
31
|
+
- Updated dependencies [5093a30]
|
|
32
|
+
- Updated dependencies [5684612]
|
|
33
|
+
- Updated dependencies [6ee8725]
|
|
34
|
+
- Updated dependencies [6072e9a]
|
|
35
|
+
- Updated dependencies [94b2c87]
|
|
36
|
+
- Updated dependencies [3ab2eca]
|
|
37
|
+
- Updated dependencies [2e07cad]
|
|
38
|
+
- @robota-sdk/agent-framework@3.0.0-beta.85
|
|
39
|
+
- @robota-sdk/agent-core@3.0.0-beta.85
|
|
40
|
+
- @robota-sdk/agent-interface-command@3.0.0-beta.85
|
|
41
|
+
- @robota-sdk/agent-preset@3.0.0-beta.85
|
|
42
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.85
|
|
43
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.85
|
|
44
|
+
|
|
45
|
+
## 3.0.0-beta.84
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- e8d70ac: A first run finds a provider, instead of a dead end. `robota --serve` (and the daemon it starts) no
|
|
50
|
+
longer refuses when no provider is configured: it starts in setup mode, and the GUI's conversation area
|
|
51
|
+
shows a "Connect a model provider to start" panel with a "Set up provider" button in place of the
|
|
52
|
+
composer. Answering it configures and swaps in the first provider live, with no restart. A startup
|
|
53
|
+
failure now says why — `robota daemon start --json` and the desktop app's fatal screen report the
|
|
54
|
+
child's own reason instead of a generic "readiness channel closed", and the fatal screen gets a Try
|
|
55
|
+
again button. `trust status --json` and the desktop trust dialog list only sources whose state trust
|
|
56
|
+
would actually change, instead of naming one this platform could not determine; the dialog shows one
|
|
57
|
+
sentence and a collapsed Details section. `robota --serve --open` in an untrusted folder now asks at
|
|
58
|
+
the terminal (trust it, start Restricted, or quit) when someone is there to ask, instead of refusing
|
|
59
|
+
outright.
|
|
60
|
+
- Updated dependencies [9f46375]
|
|
61
|
+
- Updated dependencies [e8d70ac]
|
|
62
|
+
- Updated dependencies [9c6a8db]
|
|
63
|
+
- Updated dependencies [9c6a8db]
|
|
64
|
+
- Updated dependencies [9c6a8db]
|
|
65
|
+
- @robota-sdk/agent-core@3.0.0-beta.84
|
|
66
|
+
- @robota-sdk/agent-framework@3.0.0-beta.84
|
|
67
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.84
|
|
68
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.84
|
|
69
|
+
- @robota-sdk/agent-interface-command@3.0.0-beta.84
|
|
70
|
+
- @robota-sdk/agent-preset@3.0.0-beta.84
|
|
71
|
+
|
|
3
72
|
## 3.0.0-beta.83
|
|
4
73
|
|
|
5
74
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @robota-sdk/agent-command
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The slash-command (`/cmd`) implementations for Robota agents, as command modules you register with an
|
|
4
|
+
`agent-framework` runtime. The `robota` CLI builds its command set from this package; your own agent can
|
|
5
|
+
take the whole default set, a filtered subset, or individual modules.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -8,81 +10,88 @@ Consolidated command module for the Robota CLI. Provides all slash-command (`/cm
|
|
|
8
10
|
npm install @robota-sdk/agent-command
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
## Quick
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
`createDefaultCommandModules` builds the default command set. It returns the selected `modules` and any
|
|
16
|
+
`enabledCommandModules`/`disabledCommandModules` names that matched no module, so a host can report a
|
|
17
|
+
typo instead of silently ignoring it.
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { createDefaultCommandModules } from '@robota-sdk/agent-command';
|
|
21
|
+
import type { IProviderCommandSettingsAdapter } from '@robota-sdk/agent-command';
|
|
22
|
+
import type { IAIProvider, IProviderDefinition } from '@robota-sdk/agent-core';
|
|
23
|
+
import { createAgentRuntime } from '@robota-sdk/agent-framework';
|
|
24
|
+
|
|
25
|
+
declare const provider: IAIProvider;
|
|
26
|
+
declare const providerDefinitions: readonly IProviderDefinition[]; // e.g. agent-builtin-providers
|
|
27
|
+
declare const providerSettingsAdapter: IProviderCommandSettingsAdapter; // reads/writes provider profiles
|
|
28
|
+
declare const userLocalStorageRoot: string; // host-chosen directory for user-local state
|
|
29
|
+
|
|
30
|
+
const cwd = process.cwd();
|
|
31
|
+
const { modules, unknownModuleNames } = createDefaultCommandModules({
|
|
32
|
+
cwd,
|
|
33
|
+
userLocalStorageRoot,
|
|
34
|
+
providerDefinitions,
|
|
35
|
+
providerSettingsAdapter,
|
|
36
|
+
disabledCommandModules: ['agent-command-remote-control'],
|
|
37
|
+
});
|
|
38
|
+
void unknownModuleNames;
|
|
39
|
+
|
|
40
|
+
const runtime = createAgentRuntime({ cwd, provider, commandModules: modules });
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each module also has its own factory, so you can compose a smaller set by hand:
|
|
12
44
|
|
|
13
45
|
```typescript
|
|
14
46
|
import {
|
|
15
|
-
|
|
47
|
+
createExitCommandModule,
|
|
48
|
+
createHelpCommandModule,
|
|
16
49
|
createModeCommandModule,
|
|
17
|
-
createProviderCommandModule,
|
|
18
50
|
} from '@robota-sdk/agent-command';
|
|
19
|
-
import type { IProviderCommandModuleOptions } from '@robota-sdk/agent-command';
|
|
20
51
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// Register commands with a CommandRegistry (owned by agent-framework)
|
|
24
|
-
const modules = [
|
|
25
|
-
createAgentCommandModule(),
|
|
26
|
-
createModeCommandModule(),
|
|
27
|
-
createProviderCommandModule(providerOptions),
|
|
28
|
-
];
|
|
52
|
+
const modules = [createHelpCommandModule(), createModeCommandModule(), createExitCommandModule()];
|
|
29
53
|
```
|
|
30
54
|
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
| Command | Description |
|
|
34
|
-
| -------------- | ---------------------------------------------- |
|
|
35
|
-
| `/agent` | Agent creation and management |
|
|
36
|
-
| `/background` | Background task execution |
|
|
37
|
-
| `/compact` | Conversation compaction |
|
|
38
|
-
| `/context` | Context window management |
|
|
39
|
-
| `/editor` | Compose a message in `$EDITOR`, then return it |
|
|
40
|
-
| `/effort` | Show or change the model effort level |
|
|
41
|
-
| `/exit` | Session exit / quit |
|
|
42
|
-
| `/goal` | Assign an autonomous goal pursued across turns |
|
|
43
|
-
| `/help` | Help display |
|
|
44
|
-
| `/language` | Language switching |
|
|
45
|
-
| `/memory` | Memory read/write |
|
|
46
|
-
| `/mode` | Interaction mode switching |
|
|
47
|
-
| `/permissions` | Permission management |
|
|
48
|
-
| `/plugin` | Plugin enable/disable |
|
|
49
|
-
| `/preset` | Agent preset selection / switching |
|
|
50
|
-
| `/provider` | AI provider configuration |
|
|
51
|
-
| `/reset` | Session reset |
|
|
52
|
-
| `/rewind` | Conversation history rewind |
|
|
53
|
-
| `/schedule` | Scheduled / deferred task management |
|
|
54
|
-
| `/session` | Session lifecycle (rename, resume, fork, list) |
|
|
55
|
-
| `/settings` | Settings management |
|
|
56
|
-
| `/shell` | Drop to an interactive shell, then return |
|
|
57
|
-
| `/skills` | Skills management |
|
|
58
|
-
| `/statusline` | Status bar configuration |
|
|
59
|
-
| `/user-local` | User-local command storage |
|
|
60
|
-
|
|
61
|
-
## API
|
|
62
|
-
|
|
63
|
-
Each command is exposed via a factory function that returns an `ICommandModule`:
|
|
55
|
+
## Commands
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
The default set covers these commands. Modules, which `enabledCommandModules` and
|
|
58
|
+
`disabledCommandModules` select by name, are named `agent-command-<area>`: for example,
|
|
59
|
+
`agent-command-session` provides `/clear` through `/validate-session`, and `agent-command-schedule`
|
|
60
|
+
provides `/schedule`, `/monitor`, and `/loop`.
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
| Area | Commands |
|
|
63
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| Help and exit | `/help`, `/exit` |
|
|
65
|
+
| Session | `/clear`, `/rename`, `/cd`, `/resume`, `/cost`, `/validate-session`, `/fork`, `/rewind`, `/compact`, `/context` |
|
|
66
|
+
| Model and behavior | `/provider`, `/effort`, `/advisor`, `/preset`, `/output-style`, `/language`, `/mode`, `/permissions`, `/sandbox` |
|
|
67
|
+
| Agents and work | `/agent`, `/background`, `/goal`, `/plan`, `/schedule`, `/monitor`, `/loop` |
|
|
68
|
+
| Terminal | `/shell`, `/editor`, `/keybindings`, `/theme`, `/statusline` |
|
|
69
|
+
| Project and tools | `/git`, `/memory`, `/skills`, `/mcp`, `/plugin`, `/reload-plugins` |
|
|
70
|
+
| Settings and state | `/settings`, `/reset`, `/user-local`, `/doctor` |
|
|
71
|
+
| Other sessions | `/peers`, `/handoff`, `/events`, `/remote-control`, `/devices` |
|
|
72
|
+
|
|
73
|
+
`/doctor` and `/devices` are registered only when the host supplies their inputs (`doctorInputs`,
|
|
74
|
+
`devicesPort`). `/shell`, `/editor`, `/keybindings` and `/theme` belong to the terminal the user sits at:
|
|
75
|
+
a terminal attached to a workspace daemon runs them itself (see `createTerminalClientCommands`).
|
|
76
|
+
|
|
77
|
+
For what each command does and its arguments, see the [CLI guide](../../content/guide/cli.md#slash-commands).
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
registers the default command modules, including `/effort` for the active model-effort selection.
|
|
79
|
+
## Project access
|
|
74
80
|
|
|
75
|
-
Project-aware
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
Project-aware commands are capability-based. Skills come only from the contribution sources and skill
|
|
82
|
+
roots the host passes in, and provider setup writes through the injected settings adapter. The package
|
|
83
|
+
never turns `cwd` into permission to read or write the project; a project-local write without an
|
|
78
84
|
authority-backed store is refused explicitly.
|
|
79
85
|
|
|
80
86
|
## Dependencies
|
|
81
87
|
|
|
82
|
-
- `@robota-sdk/agent-core` —
|
|
83
|
-
- `@robota-sdk/agent-framework` — `
|
|
88
|
+
- `@robota-sdk/agent-core` — provider and tool types
|
|
89
|
+
- `@robota-sdk/agent-framework` — `ICommandModule`, command host contracts, and the shared command APIs
|
|
90
|
+
- `@robota-sdk/agent-interface-command`, `@robota-sdk/agent-interface-execution`,
|
|
91
|
+
`@robota-sdk/agent-interface-session` — command, execution, and session contracts
|
|
92
|
+
- `@robota-sdk/agent-preset` — presets listed and switched by `/preset`
|
|
84
93
|
|
|
85
|
-
##
|
|
94
|
+
## Documentation
|
|
86
95
|
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
96
|
+
- [docs/SPEC.md](./docs/SPEC.md) — package contract and per-command guarantees
|
|
97
|
+
- [CLI guide](../../content/guide/cli.md) — using the commands in the `robota` CLI
|