astracode-agent 0.4.0 → 0.4.1
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 +36 -5
- package/dist/astracode-agent.cjs +1337 -458
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,8 +141,23 @@ Fields: `description` and `prompt` (required), `tools`, `disallowedTools`
|
|
|
141
141
|
`mcpServers` (names of configured servers), `hooks`, `background`,
|
|
142
142
|
`isolation: "worktree"`, `effort`, `color`, `memory`.
|
|
143
143
|
|
|
144
|
+
An agent file can declare its own MCP servers (`mcpServers:` with a
|
|
145
|
+
`command` or a `url`), started with the agent and stopped when it ends. Those
|
|
146
|
+
in your own files (`~/.astracode/agents`, `~/.claude/agents`) start. A
|
|
147
|
+
project's file is the repository's to write, so in a conversation its server
|
|
148
|
+
starts only in a folder you said you trust, after you have been shown exactly
|
|
149
|
+
what runs and said yes (remembered on this machine, and asked again if the
|
|
150
|
+
definition changes). With `-p` and `acp` nobody can be asked: they start only
|
|
151
|
+
with `--allow-agent-mcp`, for that run. Servers get exactly the environment
|
|
152
|
+
the file gives them.
|
|
153
|
+
|
|
154
|
+
The shared task list the agents work from is kept with the conversation, so
|
|
155
|
+
`--continue` and `/resume` bring it back.
|
|
156
|
+
|
|
144
157
|
**`--agent <name>`** runs the whole session as one agent: its prompt, its
|
|
145
|
-
tools and its model tier. It works with or without `-p`.
|
|
158
|
+
tools and its model tier. It works with or without `-p`. If its tools say
|
|
159
|
+
`Agent(explore, plan)`, those are the only agents the session can start; any
|
|
160
|
+
other is refused by name.
|
|
146
161
|
|
|
147
162
|
Your own commands and skills from `.astracode/commands` and
|
|
148
163
|
`.astracode/skills` appear in the `/` menu too. The skills that come with the
|
|
@@ -166,6 +181,7 @@ astracode-agent -p "<prompt>" [options]
|
|
|
166
181
|
| `--cwd <dir>` | The workspace. The default is the current directory. |
|
|
167
182
|
| `--agents <json\|file>` | Agent definitions for this run. See [Subagents](#subagents-and-background-tasks). |
|
|
168
183
|
| `--agent <name>` | Run as that agent: its prompt, tools and model. |
|
|
184
|
+
| `--allow-agent-mcp` | Start the MCP servers the project's agent files declare. See [Subagents](#subagents-and-background-tasks). |
|
|
169
185
|
| `--report-to <url>` | Post the run's progress to `<url>/events` as it goes. See [Reporting progress](#reporting-progress). |
|
|
170
186
|
| `-v, --verbose` | Prints the agent's log on stderr. |
|
|
171
187
|
|
|
@@ -263,9 +279,10 @@ instead of on your machine (`isolation: remote`) and come back as a pull
|
|
|
263
279
|
request. "AstraCode: Enable remote agents for this repository" writes
|
|
264
280
|
`.github/workflows/astracode-agent.yml` for you to review and commit; it runs
|
|
265
281
|
this CLI, at a pinned version, with `--report-to` the gateway, so the agent's
|
|
266
|
-
card in the editor follows each step. It needs
|
|
267
|
-
|
|
268
|
-
|
|
282
|
+
card in the editor follows each step. It needs Actions allowed to open pull
|
|
283
|
+
requests, and no secret: each run signs in with the identity token GitHub gives
|
|
284
|
+
the job. A repository secret `ASTRACODE_TOKEN` (an API key with the "Run agents"
|
|
285
|
+
scope), if set, is used instead. See [Remote agents](https://astracode.io/docs/agent/remote-agents/).
|
|
269
286
|
|
|
270
287
|
## In Zed or a JetBrains IDE
|
|
271
288
|
|
|
@@ -311,12 +328,26 @@ or runs a command. **Always allow** applies to that tool for the rest of the
|
|
|
311
328
|
session. Risky commands and requests to other machines are asked about every
|
|
312
329
|
time.
|
|
313
330
|
|
|
331
|
+
**Running as one of your agents.** Each session has an **Agent** option
|
|
332
|
+
(an ACP session config option, id `agent`): AstraCode itself, or any agent
|
|
333
|
+
from `.astracode/agents`, `.claude/agents`, your home folder's or `--agents`.
|
|
334
|
+
Pick one and, from the next prompt, the session runs as that agent, as
|
|
335
|
+
`--agent` does on the command line: its prompt, its tools, its model tier and
|
|
336
|
+
the agents it may start. An editor that does not show config options can set a
|
|
337
|
+
starting agent for every session in its `args`:
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
"args": ["acp", "--agents", "/Users/you/agents.json", "--agent", "reviewer"]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
`--allow-agent-mcp` in the same `args` lets the project's agent files start
|
|
344
|
+
the MCP servers they declare; without it, only your own agent files' do.
|
|
314
345
|
|
|
315
346
|
|
|
316
347
|
These are not available without an editor:
|
|
317
348
|
|
|
318
349
|
- diagnostics and language-server lookups
|
|
319
|
-
- MCP servers
|
|
350
|
+
- the MCP servers in your settings (an agent file's own servers do start, as above)
|
|
320
351
|
- the code index
|
|
321
352
|
- memories and checkpoints
|
|
322
353
|
|