autodev-cli 1.4.40 → 1.4.42
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 +180 -99
- package/out/commands/init.js +22 -2
- package/out/commands/init.js.map +1 -1
- package/out/connect.js +21 -0
- package/out/connect.js.map +1 -1
- package/out/core/settingsLoader.js +30 -0
- package/out/core/settingsLoader.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,163 +1,237 @@
|
|
|
1
1
|
# autodev-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The AutoDev agent loop + connect CLI.** Bind a local folder to an AI coding agent, then
|
|
4
|
+
either run an autonomous loop that works through `TODO.md` with the provider of your choice,
|
|
5
|
+
or wire the folder up as an MCP-only operator so a plain chat client becomes a live office agent.
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
# Install globally
|
|
7
8
|
npm install -g autodev-cli
|
|
9
|
+
autodev init . # scaffold TODO.md + .autodev/settings.json
|
|
10
|
+
autodev start . # run the autonomous loop
|
|
11
|
+
```
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
autodev --ide=cursor .
|
|
13
|
+
Part of the **AutoDev** suite for running autonomous AI coding agents that appear as
|
|
14
|
+
characters in a live "office":
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
- **[pixel-office](../pixel-office)** — the hub/command center (Laravel + Vue + Pixi.js).
|
|
17
|
+
Live at <https://autodev.code.aioffice.works>. Hosts the office UI, the presence
|
|
18
|
+
WebSocket, and the MCP endpoints this CLI talks to.
|
|
19
|
+
- **autodev-cli** — *this repo* (`npm i -g autodev-cli`). The agent loop + `autodev` command.
|
|
20
|
+
- **[autodev-app](../autodev-app)** — the desktop app (`npx autodev-app`) that bundles this
|
|
21
|
+
CLI and drives agents in a GUI.
|
|
22
|
+
- **[autodev-vscode-extension](../autodev-vscode-extension)** — the AutoDev tasks/chat/sessions
|
|
23
|
+
panels inside VS Code.
|
|
24
|
+
- **[agent-vm-deployer](../agent-vm-deployer)** — spawns agents headlessly on SSH / Docker / K8s.
|
|
25
|
+
Live at <https://deployer.code.aioffice.works>.
|
|
15
26
|
|
|
16
|
-
|
|
17
|
-
autodev --connect='wss://pixel-office.tools.ooyes.net/ws?token=<api_key>&endpoint=<slug>' .
|
|
27
|
+
---
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
autodev --setup-url='…' --ide=vscode .
|
|
21
|
-
```
|
|
29
|
+
## What it does
|
|
22
30
|
|
|
23
|
-
|
|
31
|
+
`autodev` binds a workspace directory to a **pixel-office character** and runs it as an agent.
|
|
32
|
+
There are two operating modes:
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
5. (with `--setup-url` / `--connect`) writes the pixel-office credentials into `.autodev/settings.json`
|
|
34
|
+
| Mode | Command | What it is |
|
|
35
|
+
|------|---------|-----------|
|
|
36
|
+
| **Loop agent** | `autodev start` | A local process that reads `TODO.md`, drives a provider CLI to complete each task, and reports presence + progress over the office WebSocket. |
|
|
37
|
+
| **MCP-only agent** | `autodev connect --mcp-only` | No local loop. A stdio bridge (`autodev mcp-operate`) wires the office **operator MCP** into your provider's config, so a pure chat client (Claude Code, opencode, Copilot…) becomes a first-class online office agent with tasks + agent-to-agent messaging. |
|
|
30
38
|
|
|
31
39
|
---
|
|
32
40
|
|
|
33
|
-
## Install
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g autodev-cli
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or from source (this repo):
|
|
34
48
|
|
|
35
49
|
```bash
|
|
36
|
-
cd autodev-cli
|
|
37
50
|
npm install
|
|
38
|
-
npm run build
|
|
39
|
-
npm link
|
|
51
|
+
npm run build # tsc → out/
|
|
52
|
+
npm link # optional: put `autodev` on PATH
|
|
40
53
|
```
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
> ```bash
|
|
44
|
-
> cd ../autodev-vscode-extension
|
|
45
|
-
> npm install
|
|
46
|
-
> npm run compile
|
|
47
|
-
> ```
|
|
55
|
+
The `autodev` binary refuses to run until `out/` exists, so build first when working from source.
|
|
48
56
|
|
|
49
57
|
---
|
|
50
58
|
|
|
51
|
-
##
|
|
59
|
+
## Quickstart
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
```bash
|
|
62
|
+
# 1. Scaffold a workspace (creates TODO.md + .autodev/settings.json, adds .autodev/ to .gitignore)
|
|
63
|
+
autodev init . -p claude-cli
|
|
55
64
|
|
|
56
|
-
|
|
57
|
-
Init + launch in one step. Auto-installs the extension if missing.
|
|
65
|
+
# 2. Add tasks to TODO.md as "[ ] do the thing" checkboxes
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
autodev
|
|
61
|
-
autodev up --ide=cursor ~/myproject -p copilot-cli
|
|
62
|
-
autodev up --ide=vscode . --no-extension # skip extension install
|
|
67
|
+
# 3. Run the loop until the list drains
|
|
68
|
+
autodev start .
|
|
63
69
|
```
|
|
64
70
|
|
|
65
|
-
|
|
66
|
-
Open an existing workspace in an IDE. No init.
|
|
67
|
-
|
|
68
|
-
### `autodev connect --setup-url=<url> [path]` / `autodev connect --url=<wsurl> [path]`
|
|
69
|
-
Bind the workspace to a pixel-office agent.
|
|
71
|
+
Bind the workspace to a pixel-office character (so it shows up as a live agent):
|
|
70
72
|
|
|
71
73
|
```bash
|
|
72
|
-
# Signed URL from the pixel-office UI (preferred)
|
|
73
|
-
autodev connect --setup-url='https://
|
|
74
|
+
# Signed setup URL from the pixel-office UI (preferred — HMAC-signed, expires ~30 min)
|
|
75
|
+
autodev connect --setup-url='https://autodev.code.aioffice.works/api/cli/setup/<id>?expires=…&signature=…' .
|
|
74
76
|
|
|
75
|
-
#
|
|
76
|
-
autodev connect --url='wss://
|
|
77
|
+
# …or paste a full WebSocket URL
|
|
78
|
+
autodev connect --url='wss://autodev.code.aioffice.works/ws?token=<api_key>&endpoint=<slug>' .
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
Either form writes `wsUrl`, `serverApiKey`, `webhookSlug`, and `serverBaseUrl` into
|
|
81
|
+
Either form writes `wsUrl`, `serverApiKey`, `webhookSlug`, and `serverBaseUrl` into
|
|
82
|
+
`.autodev/settings.json`.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Commands
|
|
87
|
+
|
|
88
|
+
Run `autodev <command> --help` for the full option list. The main ones:
|
|
80
89
|
|
|
81
90
|
### `autodev init [path]`
|
|
82
|
-
Scaffold a workspace
|
|
83
|
-
Pass `--ide=vscode|cursor` to also open it after init.
|
|
91
|
+
Scaffold a workspace: `TODO.md` + `.autodev/settings.json`.
|
|
84
92
|
|
|
85
93
|
```bash
|
|
86
94
|
autodev init # current directory
|
|
87
|
-
autodev init ~/myproject
|
|
88
|
-
autodev init . --ide=vscode # also open in
|
|
89
|
-
autodev init . --
|
|
90
|
-
autodev init . --provider claude-cli # pick the default provider
|
|
95
|
+
autodev init ~/myproject -p grok-cli # pick the default provider
|
|
96
|
+
autodev init . --ide=vscode # also open in an IDE (installs the extension)
|
|
97
|
+
autodev init . --git --file-browser # enable git auto-commit + file-browser tab
|
|
91
98
|
```
|
|
92
99
|
|
|
100
|
+
Flags: `-p, --provider`, `--ide vscode|cursor`, `--no-launch`, `--no-extension`,
|
|
101
|
+
`--no-hooks`, `--session-name`, `--git`, `--file-browser`, `--profile <path>`, `--force`.
|
|
102
|
+
|
|
93
103
|
### `autodev start [path]`
|
|
94
|
-
Start the autonomous loop — reads `TODO.md` and drives the
|
|
104
|
+
Start the autonomous loop — reads `TODO.md` and drives the provider until every task is done.
|
|
95
105
|
|
|
96
106
|
```bash
|
|
97
|
-
autodev start
|
|
98
|
-
autodev start ~/
|
|
99
|
-
autodev start . --
|
|
107
|
+
autodev start # cwd, default provider
|
|
108
|
+
autodev start ~/proj -p copilot-cli
|
|
109
|
+
autodev start . --once # drain the TODO once, then exit (default: poll forever)
|
|
110
|
+
autodev start . --todo BACKLOG.md # use a different task file
|
|
100
111
|
```
|
|
101
112
|
|
|
102
113
|
Press **Ctrl+C** to stop gracefully.
|
|
103
114
|
|
|
104
|
-
### `autodev
|
|
105
|
-
|
|
115
|
+
### `autodev connect [path]`
|
|
116
|
+
Bind the workspace to a pixel-office endpoint.
|
|
106
117
|
|
|
107
118
|
```bash
|
|
108
|
-
autodev
|
|
109
|
-
autodev
|
|
119
|
+
autodev connect --setup-url='https://…/api/cli/setup/<id>?…' .
|
|
120
|
+
autodev connect --url='wss://host/ws?token=<key>&endpoint=<slug>' .
|
|
121
|
+
autodev connect --url='…' --mcp-only . # MCP-only agent (no loop) — see below
|
|
110
122
|
```
|
|
111
123
|
|
|
124
|
+
Flags: `--url`, `--setup-url`, `--session-name`, `--file-browser`, `--mcp-only`.
|
|
125
|
+
|
|
126
|
+
### `autodev mcp-operate [path]`
|
|
127
|
+
Run a stdio MCP server that operates a pixel-office agent, bridging to `…/api/office-mcp`
|
|
128
|
+
(presence + tasks + report + A2A). Usually attached automatically by `connect --mcp-only`,
|
|
129
|
+
but you can register it by hand:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
claude mcp add pixel-office -- autodev mcp-operate --key <api_key> --url <…/api/office-mcp>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Flags: `--url`, `--key`, `--no-socket`. When omitted, `--url`/`--key` are derived from the
|
|
136
|
+
workspace binding.
|
|
137
|
+
|
|
138
|
+
### `autodev status [path]`
|
|
139
|
+
`TODO.md` task summary. `--all` also lists completed tasks.
|
|
140
|
+
|
|
112
141
|
### `autodev config [path]`
|
|
113
|
-
Read or
|
|
142
|
+
Read or write `.autodev/settings.json`.
|
|
114
143
|
|
|
115
144
|
```bash
|
|
116
|
-
autodev config
|
|
117
|
-
autodev config get provider
|
|
118
|
-
autodev config set provider copilot-cli
|
|
145
|
+
autodev config # print all settings
|
|
146
|
+
autodev config get provider # read one key
|
|
147
|
+
autodev config set provider copilot-cli # write one key
|
|
119
148
|
autodev config set taskTimeoutMinutes 60
|
|
120
|
-
autodev config set discordToken TOKEN
|
|
121
149
|
```
|
|
122
150
|
|
|
151
|
+
### `autodev sessions [path]` / `autodev resume <sessionId> [path]`
|
|
152
|
+
List inspectable provider sessions (id, name, last updated) and mark one to resume on the
|
|
153
|
+
next `start`. `-p, --provider` filters to a family (`claude` | `opencode` | `grok`); `--json`
|
|
154
|
+
for machine output.
|
|
155
|
+
|
|
156
|
+
### `autodev export [path]` / `autodev import <zip> [dest]`
|
|
157
|
+
Export an agent backup ZIP (workspace state + portable session traces) and restore it
|
|
158
|
+
elsewhere. `import --ide=vscode` opens the restored workspace afterward.
|
|
159
|
+
|
|
160
|
+
### `autodev up` / `autodev launch` / `autodev init --ide=…`
|
|
161
|
+
IDE-launcher shortcuts. `up` = init + open in VS Code / Cursor (installs the
|
|
162
|
+
`AutoAIDev.autoaidev` extension unless `--no-extension`); `launch` opens an existing workspace
|
|
163
|
+
without init. The bare `autodev --ide=vscode .` / `autodev --setup-url=… .` top-level form
|
|
164
|
+
combines connect + init + launch in one call.
|
|
165
|
+
|
|
166
|
+
### `autodev tail-output [path]`
|
|
167
|
+
Print the agent CLI's most recent stdout (final message). `--raw` skips BOM stripping.
|
|
168
|
+
|
|
123
169
|
---
|
|
124
170
|
|
|
125
|
-
##
|
|
171
|
+
## Providers
|
|
172
|
+
|
|
173
|
+
Pick with `-p, --provider` on `init` / `start` / `up`, or `config set provider …`.
|
|
174
|
+
Each family ships in CLI and TUI/SDK flavors:
|
|
175
|
+
|
|
176
|
+
| Provider id | Backend |
|
|
177
|
+
|-------------|---------|
|
|
178
|
+
| `claude-cli`, `claude-tui` | Anthropic Claude (`claude`) |
|
|
179
|
+
| `grok-cli`, `grok-tui` | xAI Grok (`grok`) |
|
|
180
|
+
| `opencode-cli`, `opencode-sdk` | OpenCode (`opencode`, `@opencode-ai/sdk`) |
|
|
181
|
+
| `copilot-cli`, `copilot-sdk` | GitHub Copilot (`copilot`) |
|
|
126
182
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
| `vscode` | `code` (or `code-insiders`) on PATH | `AutoAIDev.autoaidev` |
|
|
130
|
-
| `cursor` | `cursor` on PATH | `AutoAIDev.autoaidev` |
|
|
183
|
+
Default: `claude-tui`. Set a `fallbackProvider` in settings to switch automatically on a
|
|
184
|
+
rate-limit.
|
|
131
185
|
|
|
132
|
-
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## How the loop works
|
|
133
189
|
|
|
134
|
-
|
|
190
|
+
1. Reads `TODO.md` from the workspace root.
|
|
191
|
+
2. Picks the first `[ ]` task and sends a prompt to the chosen provider CLI.
|
|
192
|
+
3. Watches `TODO.md` for the agent to mark the task `[x]`.
|
|
193
|
+
4. Loops while any `[ ]` / `[~]` tasks remain (unless `--once`).
|
|
194
|
+
5. Emits presence + progress over the office WebSocket and fires Discord / webhook
|
|
195
|
+
notifications at each step.
|
|
135
196
|
|
|
136
197
|
---
|
|
137
198
|
|
|
138
199
|
## Configuration
|
|
139
200
|
|
|
140
|
-
Settings live in
|
|
201
|
+
Settings live in **`.autodev/settings.json`** inside the workspace. The legacy path
|
|
202
|
+
`.vscode/autodev.json` is still read for back-compat and migrated on the next write.
|
|
203
|
+
Common keys:
|
|
141
204
|
|
|
142
205
|
| Key | Default | Description |
|
|
143
206
|
|-----|---------|-------------|
|
|
144
|
-
| `provider` | `claude-
|
|
207
|
+
| `provider` | `claude-tui` | Provider id (see table above) |
|
|
145
208
|
| `loopInterval` | `30` | Seconds between polling cycles |
|
|
146
|
-
| `taskTimeoutMinutes` | `30` |
|
|
147
|
-
| `taskCheckInMinutes` | `20` |
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `serverBaseUrl` | `""` |
|
|
151
|
-
| `
|
|
152
|
-
| `gitEnabled` | `false` |
|
|
209
|
+
| `taskTimeoutMinutes` | `30` | `TODO.md` inactivity before a task times out |
|
|
210
|
+
| `taskCheckInMinutes` | `20` | Session inactivity before a check-in reminder |
|
|
211
|
+
| `maxTaskAttempts` | `3` | Retries before giving up on a task |
|
|
212
|
+
| `fallbackProvider` / `fallbackProviderEnabled` | `opencode-cli` / `false` | Provider to switch to on rate-limit |
|
|
213
|
+
| `wsUrl` / `serverBaseUrl` / `serverApiKey` / `webhookSlug` | `""` | Office binding (written by `connect`) |
|
|
214
|
+
| `mcpOnly` | `false` | MCP-only agent (attaches the operator bridge instead of the loop) |
|
|
215
|
+
| `gitEnabled` | `false` | Commit after each task |
|
|
216
|
+
| `enableFileBrowser` | `false` | Expose the file-browser tab for this agent |
|
|
217
|
+
| `resumeSession` | `false` | Resume a prior provider session on next `start` |
|
|
218
|
+
| `profilePath` | `""` | Path to an `AUTODEV.md` profile |
|
|
219
|
+
| `discordToken` / `discordChannelId` / `discordOwners` | `""` | Discord notifications |
|
|
220
|
+
| `disabledBuiltinMcp` | `[]` | Built-in MCP servers to turn off |
|
|
221
|
+
|
|
222
|
+
Per-provider extras include `claudeModel`, `grokModel`, `copilotModel`, `opencodeModel`,
|
|
223
|
+
`opencodeTimeout`, `copilotGithubToken`, and more — see
|
|
224
|
+
[`src/core/settingsLoader.ts`](src/core/settingsLoader.ts) for the full schema.
|
|
153
225
|
|
|
154
226
|
---
|
|
155
227
|
|
|
156
228
|
## MCP servers
|
|
157
229
|
|
|
158
|
-
Project MCP servers live in `<workspace>/.mcp.json` and are fanned out to every provider's
|
|
159
|
-
|
|
160
|
-
Built-ins (`memory`, `playwright`, `sequential-thinking`,
|
|
230
|
+
Project MCP servers live in `<workspace>/.mcp.json` and are fanned out to every provider's
|
|
231
|
+
config (`.mcp.json` for Claude, `opencode.json`, `~/.copilot/mcp-config.json`,
|
|
232
|
+
`.vscode/mcp.json`) on each sync. Built-ins (`memory`, `playwright`, `sequential-thinking`,
|
|
233
|
+
`computer-use-mcp`) are added automatically; disable any with
|
|
234
|
+
`disabledBuiltinMcp: ["playwright", …]`.
|
|
161
235
|
|
|
162
236
|
Entries can be **stdio** or **remote (HTTP/SSE)**:
|
|
163
237
|
|
|
@@ -170,26 +244,33 @@ Entries can be **stdio** or **remote (HTTP/SSE)**:
|
|
|
170
244
|
}
|
|
171
245
|
```
|
|
172
246
|
|
|
173
|
-
**Pixel-office
|
|
247
|
+
**Pixel-office auto-attach:** when a workspace is bound to an office (`serverBaseUrl` +
|
|
248
|
+
`serverApiKey`) a `pixel-office` MCP server is added automatically:
|
|
249
|
+
|
|
250
|
+
- **Loop agents** get a remote A2A server at `<origin>/api/mcp/a2a` (agent-to-agent tools:
|
|
251
|
+
`list_agents`, `send_message`, `check_messages`), authenticated by the agent key.
|
|
252
|
+
- **MCP-only agents** (`mcpOnly: true`) get the operator bridge (`autodev mcp-operate`)
|
|
253
|
+
pointing at `<origin>/api/office-mcp` — the full agent toolkit (presence, tasks, report, A2A).
|
|
254
|
+
|
|
255
|
+
Opt out with `disabledBuiltinMcp: ["pixel-office"]`.
|
|
174
256
|
|
|
175
257
|
---
|
|
176
258
|
|
|
177
|
-
##
|
|
259
|
+
## Development & tests
|
|
178
260
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
261
|
+
```bash
|
|
262
|
+
npm install
|
|
263
|
+
npm run build # tsc -p ./ → out/
|
|
264
|
+
npm run dev # tsc --watch
|
|
265
|
+
npm test # runs the smoke-test suite in test/*.mjs
|
|
266
|
+
```
|
|
184
267
|
|
|
185
|
-
The
|
|
268
|
+
The test suite is a set of Node smoke tests (`node test/smoke.mjs && …`) covering the
|
|
269
|
+
provider config, live-narration normalizer, MCP-only operator, event filters, and init
|
|
270
|
+
template. No build step is required to run them individually.
|
|
186
271
|
|
|
187
272
|
---
|
|
188
273
|
|
|
189
|
-
##
|
|
274
|
+
## License
|
|
190
275
|
|
|
191
|
-
|
|
192
|
-
|----------|-------------|
|
|
193
|
-
| `claude-cli` | `claude` (Anthropic Claude CLI) |
|
|
194
|
-
| `copilot-cli` | `gh copilot` (GitHub Copilot CLI) |
|
|
195
|
-
| `opencode-cli` | `opencode` (OpenCode CLI) |
|
|
276
|
+
MIT.
|
package/out/commands/init.js
CHANGED
|
@@ -41,11 +41,31 @@ const logger_1 = require("../logger");
|
|
|
41
41
|
const settingsLoader_1 = require("../core/settingsLoader");
|
|
42
42
|
const hooksManager_1 = require("../hooksManager");
|
|
43
43
|
const launchIde_1 = require("../launchIde");
|
|
44
|
+
/**
|
|
45
|
+
* A brand-new agent's TODO.md.
|
|
46
|
+
*
|
|
47
|
+
* Two things here are load-bearing, both learned the hard way:
|
|
48
|
+
*
|
|
49
|
+
* 1. The heading MUST be "## Todo" — that is what appendTask() looks for
|
|
50
|
+
* (todo.ts). It used to say "## Tasks", so appendTask never found a section
|
|
51
|
+
* and created a SECOND one below, leaving every new workspace with two task
|
|
52
|
+
* lists.
|
|
53
|
+
*
|
|
54
|
+
* 2. There is NO example checkbox. The old template shipped
|
|
55
|
+
* "- [ ] Example task — replace with your real task", which is a real,
|
|
56
|
+
* executable task: pickNextTask() takes the first `todo` in file order, so a
|
|
57
|
+
* brand-new agent spent its FIRST LLM call doing nothing of value, and the
|
|
58
|
+
* customer's actual task ran second. The guidance below is prose for exactly
|
|
59
|
+
* this reason — the parser (/^\s*(?:-\s*)?\[\s+\]\s*(.+)$/) is whitespace-
|
|
60
|
+
* tolerant, so an example checkbox is executed even indented inside a comment.
|
|
61
|
+
*/
|
|
44
62
|
const TODO_TEMPLATE = `# TODO
|
|
45
63
|
|
|
46
|
-
##
|
|
64
|
+
## Todo
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
<!-- Add one task per line as a markdown checkbox: a dash, a space, empty
|
|
67
|
+
brackets, then the task text. Tasks run top to bottom. Assigning work from
|
|
68
|
+
the office appends it here automatically. -->
|
|
49
69
|
|
|
50
70
|
`;
|
|
51
71
|
function runInit(workspacePath, opts) {
|
package/out/commands/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,0BAiHC;AAED,kCAiBC;AA9LD,uCAAyB;AACzB,2CAA6B;AAE7B,sCAAgC;AAChC,2DAA2D;AAC3D,kDAAkE;AAClE,4CAOsB;AAEtB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,aAAa,GAAG;;;;;;;;CAQrB,CAAC;AAiBF,SAAgB,OAAO,CAAC,aAAiC,EAAE,IAAc;IACvE,MAAM,GAAG,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACxE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,YAAG,CAAC,IAAI,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,YAAG,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACpC,YAAG,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC;IAE9B,iBAAiB;IACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC3C,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3C,YAAG,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;IAChE,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,aAAa,EAA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O,CAAC,8BAA8B,CAAC,CAAC;IAC5C,YAAG,CAAC,IAAI,CAAC,mBAAmB,aAAa,IAAI,GAAG,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,WAAW,CAAC,OAAgB;IAC1C,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,mEAAmE,CAAC;SAChF,MAAM,CAAC,2BAA2B,EAAE,qBAAqB,EAAE,YAAY,CAAC;SACxE,MAAM,CAAC,aAAa,EAAE,wCAAwC,CAAC;SAC/D,MAAM,CAAC,aAAa,EAAE,yDAAyD,CAAC;SAChF,MAAM,CAAC,gBAAgB,EAAE,8CAA8C,CAAC;SACxE,MAAM,CAAC,YAAY,EAAE,kCAAkC,CAAC;SACxD,MAAM,CAAC,uBAAuB,EAAE,gFAAgF,CAAC;SACjH,MAAM,CAAC,OAAO,EAAE,+CAA+C,CAAC;SAChE,MAAM,CAAC,gBAAgB,EAAE,uDAAuD,CAAC;SACjF,MAAM,CAAC,kBAAkB,EAAE,gDAAgD,CAAC;SAC5E,MAAM,CAAC,SAAS,EAAE,0BAA0B,CAAC;SAC7C,MAAM,CAAC,CAAC,aAAiC,EAAE,IAAc,EAAE,EAAE;QAC5D,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/out/connect.js
CHANGED
|
@@ -43,6 +43,7 @@ const url_1 = require("url");
|
|
|
43
43
|
const logger_1 = require("./logger");
|
|
44
44
|
const settingsLoader_1 = require("./core/settingsLoader");
|
|
45
45
|
const hooksManager_1 = require("./hooksManager");
|
|
46
|
+
const configManager_1 = require("./configManager");
|
|
46
47
|
function configWritePath(cwd) {
|
|
47
48
|
return path.join(cwd, '.autodev', 'settings.json');
|
|
48
49
|
}
|
|
@@ -112,6 +113,13 @@ function applyWsUrl(cwd, wsUrl) {
|
|
|
112
113
|
settings.autoStartLoop = true;
|
|
113
114
|
saveSettings(cwd, settings);
|
|
114
115
|
ensureHooksInstalled(cwd);
|
|
116
|
+
// Same as applySetupUrl: write the office MCP server as part of binding.
|
|
117
|
+
try {
|
|
118
|
+
configManager_1.ConfigManager.syncProjectMcpServers(cwd, (m) => logger_1.log.gray(` ${m}`));
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
logger_1.log.warn(`MCP config sync skipped: ${e.message}`);
|
|
122
|
+
}
|
|
115
123
|
logger_1.log.success(`Connected → ${parsed.serverBaseUrl}`);
|
|
116
124
|
logger_1.log.gray(` endpoint: ${parsed.webhookSlug}`);
|
|
117
125
|
logger_1.log.gray(` saved to: ${configWritePath(cwd)}`);
|
|
@@ -161,6 +169,19 @@ async function applySetupUrl(cwd, setupUrl) {
|
|
|
161
169
|
settings.autoStartLoop = true;
|
|
162
170
|
saveSettings(cwd, settings);
|
|
163
171
|
ensureHooksInstalled(cwd);
|
|
172
|
+
// Write the office (pixel-office) MCP server into the provider configs NOW, as
|
|
173
|
+
// part of binding — not lazily on the first loop start. Settings were just
|
|
174
|
+
// saved, so serverApiKey + serverBaseUrl are present and the pixel-office entry
|
|
175
|
+
// passes its (origin && key) guard. Without this, `--setup-url` set up the
|
|
176
|
+
// credential-free built-ins (memory/playwright/…) but left the office MCP
|
|
177
|
+
// unconfigured until something happened to start the loop. Matches what the
|
|
178
|
+
// `autodev connect` command already does.
|
|
179
|
+
try {
|
|
180
|
+
configManager_1.ConfigManager.syncProjectMcpServers(cwd, (m) => logger_1.log.gray(` ${m}`));
|
|
181
|
+
}
|
|
182
|
+
catch (e) {
|
|
183
|
+
logger_1.log.warn(`MCP config sync skipped: ${e.message}`);
|
|
184
|
+
}
|
|
164
185
|
logger_1.log.success(`Connected → ${settings.serverBaseUrl}`);
|
|
165
186
|
logger_1.log.gray(` agent: ${d.agentName ?? d.agentId ?? d.slug}`);
|
|
166
187
|
logger_1.log.gray(` endpoint: ${d.slug ?? settings.webhookSlug}`);
|
package/out/connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,gCAyBC;AAcD,sCA0CC;AAtKD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA6B;AAC7B,6CAA+B;AAC/B,6BAA0B;AAC1B,qCAA+B;AAC/B,0DAA4G;AAC5G,iDAAiE;AACjE,mDAAgD;AA2BhD,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,YAAY,CAAC,GAAW,EAAE,QAAyB;IAC1D,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,GAAG,GAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAAC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAAC,CAAC;IACpE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,EAAE,GAAG,kCAAiB,EAAE,GAAG,IAAA,oCAAmB,EAAC,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,4EAA4E;AAC5E,SAAS,SAAS,CAAI,GAAW,EAAE,SAAS,GAAG,MAAM;IACnD,OAAO,IAAI,OAAO,CAAC,CAAC,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qBAAqB,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACtE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,YAAG,CAAC,IAAI,CAAC,4BAA6B,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,YAAG,CAAC,OAAO,CAAC,eAAe,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IACrD,YAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9D,YAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1D,YAAG,CAAC,IAAI,CAAC,eAAe,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -153,6 +153,28 @@ function settingsReadPath(root) {
|
|
|
153
153
|
}
|
|
154
154
|
return canonical; // doesn't exist; callers handle missing-file
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Field names the docs and the office UI have long told users to write by hand,
|
|
158
|
+
* mapped to the ones this loader actually reads.
|
|
159
|
+
*
|
|
160
|
+
* They never matched. The "Manual (raw creds)" instructions
|
|
161
|
+
* (AgentConnectCommands.vue, docs/CONNECT-A-LOCAL-AGENT.md) say to write
|
|
162
|
+
* `officeWsUrl` / `apiKey` / `slug`; the loader only ever read `wsUrl` /
|
|
163
|
+
* `serverApiKey` / `webhookSlug`. Following the documented steps therefore
|
|
164
|
+
* produced a settings.json the CLI silently ignored: no binding, no office, and
|
|
165
|
+
* NO ERROR — the agent just sat there looking fine.
|
|
166
|
+
*
|
|
167
|
+
* Accepting them as aliases (rather than only correcting the docs) is deliberate:
|
|
168
|
+
* it repairs every settings.json already written from those instructions, without
|
|
169
|
+
* the user having to discover that the guidance was wrong.
|
|
170
|
+
*
|
|
171
|
+
* Canonical keys always win; an alias only fills a field left empty.
|
|
172
|
+
*/
|
|
173
|
+
const SETTINGS_ALIASES = {
|
|
174
|
+
officeWsUrl: 'wsUrl',
|
|
175
|
+
apiKey: 'serverApiKey',
|
|
176
|
+
slug: 'webhookSlug',
|
|
177
|
+
};
|
|
156
178
|
/** Load settings, preferring `.autodev/settings.json` and falling back to the legacy `.vscode/autodev.json`. */
|
|
157
179
|
function loadSettingsForRoot(root) {
|
|
158
180
|
try {
|
|
@@ -162,6 +184,14 @@ function loadSettingsForRoot(root) {
|
|
|
162
184
|
}
|
|
163
185
|
const raw = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
164
186
|
const merged = { ...exports.SETTINGS_DEFAULTS, ...raw };
|
|
187
|
+
// Fold in the documented-but-unread names before anything derives from them.
|
|
188
|
+
const rawAny = raw;
|
|
189
|
+
for (const [alias, canonical] of Object.entries(SETTINGS_ALIASES)) {
|
|
190
|
+
const v = rawAny[alias];
|
|
191
|
+
if (typeof v === 'string' && v !== '' && !merged[canonical]) {
|
|
192
|
+
merged[canonical] = v;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
165
195
|
// If wsUrl is set, derive the three legacy fields from it (wsUrl takes priority).
|
|
166
196
|
const parsed = parseWsUrl(merged.wsUrl);
|
|
167
197
|
if (parsed) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settingsLoader.js","sourceRoot":"","sources":["../../src/core/settingsLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8SA,gCAWC;AAiBD,8CAEC;AAGD,4CAMC;
|
|
1
|
+
{"version":3,"file":"settingsLoader.js","sourceRoot":"","sources":["../../src/core/settingsLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8SA,gCAWC;AAiBD,8CAEC;AAGD,4CAMC;AA0BD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C,IAAI,EAAE,MAAM,CAAC,CAA6B,CAAC;QAClF,MAAM,MAAM,GAAG,EAAE,GAAG,yBAAiB,EAAE,GAAG,GAAG,EAAE,CAAC;QAEhD,6EAA6E;QAC7E,MAAM,MAAM,GAAG,GAA8B,CAAC;QAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAClE,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC3D,MAAkC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,kFAAkF;QAClF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;YAC5C,MAAM,CAAC,YAAY,GAAI,MAAM,CAAC,YAAY,CAAC;YAC3C,MAAM,CAAC,WAAW,GAAK,MAAM,CAAC,WAAW,CAAC;QAC5C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,GAAG,yBAAiB,EAAE,CAAC;IAClC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autodev-cli",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "AutoAIDev CLI
|
|
3
|
+
"version": "1.4.42",
|
|
4
|
+
"description": "AutoAIDev CLI \u2014 autonomous AI task loop with VS Code / Cursor launcher",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
7
|
"autodev": "./bin/autodev.js"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dev": "tsc -p ./ --watch",
|
|
30
30
|
"prepublishOnly": "npm run build",
|
|
31
31
|
"start": "node bin/autodev.js",
|
|
32
|
-
"test": "node test/smoke.mjs && node test/liveNarration.smoke.mjs && node test/liveNarration.edge.smoke.mjs && node test/normalizer.parity.smoke.mjs && node test/providerConfig.smoke.mjs && node test/mcpOnlyOperator.smoke.mjs && node test/opencodeEventFilter.smoke.mjs && node test/copilotMcpIsolation.smoke.mjs && node test/grokSpawnError.smoke.mjs"
|
|
32
|
+
"test": "node test/smoke.mjs && node test/liveNarration.smoke.mjs && node test/liveNarration.edge.smoke.mjs && node test/normalizer.parity.smoke.mjs && node test/providerConfig.smoke.mjs && node test/mcpOnlyOperator.smoke.mjs && node test/opencodeEventFilter.smoke.mjs && node test/copilotMcpIsolation.smoke.mjs && node test/grokSpawnError.smoke.mjs && node test/initTemplate.smoke.mjs && node test/settingsAliases.smoke.mjs && node test/setupWritesOfficeMcp.smoke.mjs"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"commander": "^12.1.0",
|