@robota-sdk/agent-command 3.0.0-beta.83 → 3.0.0-beta.84

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +71 -62
  3. package/dist/node/index.cjs +75 -72
  4. package/dist/node/index.d.cts +37 -45
  5. package/dist/node/index.d.cts.map +1 -1
  6. package/dist/node/index.d.ts +37 -45
  7. package/dist/node/index.d.ts.map +1 -1
  8. package/dist/node/index.js +78 -75
  9. package/dist/node/index.js.map +1 -1
  10. package/package.json +9 -8
  11. package/src/agent/__tests__/agent-command.test.ts +62 -0
  12. package/src/agent/agent-command-parser.ts +2 -2
  13. package/src/agent/agent-command.ts +20 -0
  14. package/src/default/__tests__/__snapshots__/model-exposure.test.ts.snap +2 -2
  15. package/src/default/__tests__/default-command-modules.test.ts +5 -4
  16. package/src/default/__tests__/model-exposure.test.ts +2 -0
  17. package/src/default/default-command-modules.ts +8 -0
  18. package/src/effort/effort-command.test.ts +65 -2
  19. package/src/effort/effort-command.ts +19 -5
  20. package/src/git/__tests__/fake-git-port.ts +9 -2
  21. package/src/git/git-command-module.ts +3 -4
  22. package/src/git/git-commit.ts +6 -3
  23. package/src/git/index.ts +4 -1
  24. package/src/goal/goal-command.ts +3 -1
  25. package/src/index.ts +6 -0
  26. package/src/mcp-activation/__tests__/mcp-activation-command.test.ts +131 -0
  27. package/src/mcp-activation/mcp-activation-command-module.ts +6 -0
  28. package/src/mcp-activation/mcp-activation-command.ts +54 -1
  29. package/src/memory/__tests__/memory-command-module.test.ts +40 -2
  30. package/src/memory/__tests__/memory-command-unavailable.test.ts +63 -0
  31. package/src/memory/memory-command-module.ts +4 -2
  32. package/src/memory/memory-command.ts +42 -2
  33. package/src/mode/__tests__/mode-command-module.test.ts +40 -0
  34. package/src/mode/mode-command.ts +1 -1
  35. package/src/model/__tests__/model-command-module.test.ts +80 -0
  36. package/src/model/__tests__/model-command.test.ts +240 -0
  37. package/src/model/index.ts +6 -0
  38. package/src/model/model-command-module.ts +56 -0
  39. package/src/model/model-command.ts +223 -0
  40. package/src/plugin/__tests__/plugin-command-module.test.ts +81 -1
  41. package/src/plugin/plugin-command.ts +47 -4
  42. package/src/provider/__tests__/org-policy.test.ts +4 -0
  43. package/src/provider/__tests__/provider-command-module.test.ts +276 -14
  44. package/src/provider/__tests__/scripted-interaction.ts +12 -2
  45. package/src/provider/provider-command-execution.ts +54 -8
  46. package/src/provider/provider-command-profile-lifecycle.ts +48 -2
  47. package/src/provider/provider-command-profile-operations.ts +14 -0
  48. package/src/provider/provider-command-profile.ts +7 -4
  49. package/src/provider/provider-command-setup.ts +14 -1
  50. package/src/rewind/__tests__/rewind-command-module.test.ts +2 -1
  51. package/src/schedule/__tests__/loop-command-functional.test.ts +13 -0
  52. package/src/schedule/__tests__/loop-command.test.ts +238 -4
  53. package/src/schedule/loop-command.ts +95 -3
  54. package/src/schedule/schedule-command-module.ts +8 -4
  55. package/src/settings/settings-command-module.ts +2 -2
  56. package/src/git/__tests__/git-diff.test.ts +0 -125
  57. package/src/git/__tests__/git-process.test.ts +0 -221
  58. package/src/git/__tests__/git-status.test.ts +0 -117
  59. package/src/git/git-diff.ts +0 -129
  60. package/src/git/git-process.ts +0 -169
  61. package/src/git/git-status.ts +0 -134
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @robota-sdk/agent-command
2
2
 
3
+ ## 3.0.0-beta.84
4
+
5
+ ### Patch Changes
6
+
7
+ - e8d70ac: A first run finds a provider, instead of a dead end. `robota --serve` (and the daemon it starts) no
8
+ longer refuses when no provider is configured: it starts in setup mode, and the GUI's conversation area
9
+ shows a "Connect a model provider to start" panel with a "Set up provider" button in place of the
10
+ composer. Answering it configures and swaps in the first provider live, with no restart. A startup
11
+ failure now says why — `robota daemon start --json` and the desktop app's fatal screen report the
12
+ child's own reason instead of a generic "readiness channel closed", and the fatal screen gets a Try
13
+ again button. `trust status --json` and the desktop trust dialog list only sources whose state trust
14
+ would actually change, instead of naming one this platform could not determine; the dialog shows one
15
+ sentence and a collapsed Details section. `robota --serve --open` in an untrusted folder now asks at
16
+ the terminal (trust it, start Restricted, or quit) when someone is there to ask, instead of refusing
17
+ outright.
18
+ - Updated dependencies [9f46375]
19
+ - Updated dependencies [e8d70ac]
20
+ - Updated dependencies [9c6a8db]
21
+ - Updated dependencies [9c6a8db]
22
+ - Updated dependencies [9c6a8db]
23
+ - @robota-sdk/agent-core@3.0.0-beta.84
24
+ - @robota-sdk/agent-framework@3.0.0-beta.84
25
+ - @robota-sdk/agent-interface-session@3.0.0-beta.84
26
+ - @robota-sdk/agent-interface-execution@3.0.0-beta.84
27
+ - @robota-sdk/agent-interface-command@3.0.0-beta.84
28
+ - @robota-sdk/agent-preset@3.0.0-beta.84
29
+
3
30
  ## 3.0.0-beta.83
4
31
 
5
32
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # Agent Command
1
+ # @robota-sdk/agent-command
2
2
 
3
- Consolidated command module for the Robota CLI. Provides all slash-command (`/cmd`) implementations as a single importable package.
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 Start
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
- createAgentCommandModule,
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
- declare const providerOptions: IProviderCommandModuleOptions;
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
- ## Available Commands
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
- ```typescript
66
- import { createExitCommandModule, createHelpCommandModule } from '@robota-sdk/agent-command';
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
- const exitCmd = createExitCommandModule();
69
- const helpCmd = createHelpCommandModule();
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
- All command factory functions are re-exported from the root entry point. `createDefaultCommandModules`
73
- registers the default command modules, including `/effort` for the active model-effort selection.
79
+ ## Project access
74
80
 
75
- Project-aware command composition is capability-based. Supply framework contribution sources for
76
- skills and discriminated settings sources/stores for provider setup. The command package does not
77
- turn `cwd` into project read/write authority; requesting a project-local write without an
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` — core types and interfaces
83
- - `@robota-sdk/agent-framework` — `ICommandHostContext`, command registration
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
- ## Links
94
+ ## Documentation
86
95
 
87
- - [npm](https://www.npmjs.com/package/@robota-sdk/agent-command)
88
- - [GitHub](https://github.com/woojubb/robota)
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