agentdir-cli 0.7.5__tar.gz → 0.7.7__tar.gz
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.
- {agentdir_cli-0.7.5/src/agentdir_cli.egg-info → agentdir_cli-0.7.7}/PKG-INFO +30 -5
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/README.md +29 -4
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/AGENTIC_CODING.md +7 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/INSTALL.md +107 -11
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/PI_PACKAGE.md +2 -2
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/RELEASING.md +14 -14
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/TECH_BRIEF.md +21 -1
- agentdir_cli-0.7.7/docs/releases/v0.7.6.md +39 -0
- agentdir_cli-0.7.7/docs/releases/v0.7.7.md +57 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/package.json +2 -2
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/pyproject.toml +1 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/scripts/install.sh +1 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/scripts/rollback.sh +1 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/skills/agentdir/SKILL.md +8 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/__init__.py +1 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/audit.py +27 -6
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/capture.py +69 -6
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/cli.py +405 -73
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/context.py +7 -6
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/control.py +8 -5
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/daemon.py +4 -3
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/doctor.py +7 -0
- agentdir_cli-0.7.7/src/agentdir/environment.py +177 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/federation.py +77 -49
- agentdir_cli-0.7.7/src/agentdir/fsutil.py +51 -0
- agentdir_cli-0.7.7/src/agentdir/hooks.py +355 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/index.py +130 -17
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/mailbox.py +1 -13
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/memory.py +6 -1
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/retention.py +9 -2
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/review.py +21 -4
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/secrets.py +3 -21
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/sessions.py +9 -4
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/skills.py +85 -22
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/store.py +29 -4
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7/src/agentdir_cli.egg-info}/PKG-INFO +30 -5
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir_cli.egg-info/SOURCES.txt +7 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/tests/test_agent_first.py +58 -9
- agentdir_cli-0.7.7/tests/test_agent_trust.py +406 -0
- agentdir_cli-0.7.7/tests/test_environment.py +388 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/tests/test_pi_package.py +2 -2
- agentdir_cli-0.7.7/tests/test_truncation.py +251 -0
- agentdir_cli-0.7.5/src/agentdir/hooks.py +0 -215
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/LICENSE +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/MANIFEST.in +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/DEMO.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/PRD.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/assets/agentdir-overview.png +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/investigations/2026-05-12-cross-repo-ergonomics-lanes.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/investigations/2026-05-12-rag-vector-scenarios.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.1.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.1.1.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.2.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.3.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.3.1.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.3.2.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.3.3.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.3.4.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.4.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.5.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.5.1.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.5.2.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.5.3.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.6.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.0.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.1.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.2.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.3.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.4.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/docs/releases/v0.7.5.md +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/examples/dogfood-session.sh +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/setup.cfg +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/__main__.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/actors.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/artifacts.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/envelope.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/events.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/git.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/gitignore.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/query.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/redaction.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/rendering.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/replay.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir/upgrade.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir_cli.egg-info/dependency_links.txt +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir_cli.egg-info/entry_points.txt +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir_cli.egg-info/requires.txt +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/src/agentdir_cli.egg-info/top_level.txt +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/tests/test_audit.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/tests/test_v1_behavior.py +0 -0
- {agentdir_cli-0.7.5 → agentdir_cli-0.7.7}/tests/test_vector_memory.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentdir-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.7
|
|
4
4
|
Summary: Local-first Maildir-inspired work mailstore for software agents
|
|
5
5
|
Author: AgentDir Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -34,7 +34,7 @@ Dynamic: license-file
|
|
|
34
34
|
# AgentDir
|
|
35
35
|
|
|
36
36
|
<p align="center">
|
|
37
|
-
<img src="docs/assets/agentdir-overview.png" alt="AgentDir turns agent work into a saved trail, searchable memory, and proof for engineers." />
|
|
37
|
+
<img src="https://raw.githubusercontent.com/jstxn/agentdir/main/docs/assets/agentdir-overview.png" alt="AgentDir turns agent work into a saved trail, searchable memory, and proof for engineers." />
|
|
38
38
|
</p>
|
|
39
39
|
|
|
40
40
|
<p align="center">
|
|
@@ -137,6 +137,16 @@ agentdir --version
|
|
|
137
137
|
agentdir --help
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
Update an existing install to the latest release and refresh adoption for the
|
|
141
|
+
current repository:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
agentdir update
|
|
145
|
+
agentdir update --dry-run
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The older `agentdir --upgrade` interface remains supported for compatibility.
|
|
149
|
+
|
|
140
150
|
## Pi Package
|
|
141
151
|
|
|
142
152
|
Pi users can install this repository as a Pi package so the AgentDir skill is
|
|
@@ -145,7 +155,7 @@ available automatically during coding tasks:
|
|
|
145
155
|
Package page: [@jstxn/agentdir-pi](https://pi.dev/packages/@jstxn/agentdir-pi)
|
|
146
156
|
|
|
147
157
|
```bash
|
|
148
|
-
pi install npm:@jstxn/agentdir-pi@0.7.
|
|
158
|
+
pi install npm:@jstxn/agentdir-pi@0.7.7
|
|
149
159
|
# or install directly from a local checkout / release tag:
|
|
150
160
|
pi install /absolute/path/to/agentdir
|
|
151
161
|
pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
@@ -191,6 +201,16 @@ instead of project instruction files:
|
|
|
191
201
|
agentdir adopt --install-skill store --install-generic store --integration-target store
|
|
192
202
|
```
|
|
193
203
|
|
|
204
|
+
Adoption adapts to repos where other tools own these files. When
|
|
205
|
+
[rulesync](https://github.com/dyoshikawa/rulesync) generates the guidance
|
|
206
|
+
files, the managed rule is written to `.rulesync/rules/agentdir.md` instead so
|
|
207
|
+
it survives regeneration, and files with generated-file headers are never
|
|
208
|
+
edited without `--force`. When lefthook, husky, or pre-commit own the Git
|
|
209
|
+
hooks, adopt warns up front, `agentdir doctor` flags hook shims those tools
|
|
210
|
+
later overwrite, and `agentdir hooks install` restores them. See
|
|
211
|
+
[docs/INSTALL.md](docs/INSTALL.md#coexisting-with-rule-generators-and-hook-managers)
|
|
212
|
+
for details.
|
|
213
|
+
|
|
194
214
|
For non-interactive installs, choose the ignore destination explicitly:
|
|
195
215
|
|
|
196
216
|
```bash
|
|
@@ -212,17 +232,22 @@ Default adoption writes only local files:
|
|
|
212
232
|
|
|
213
233
|
```text
|
|
214
234
|
<repo>/.agentdir/ # evidence, artifacts, indexes, state
|
|
215
|
-
<repo>/.
|
|
235
|
+
<repo>/.agentdir/hooks.json # installed-hook drift manifest
|
|
236
|
+
<active-hooks-directory>/* # managed hook shims with backups
|
|
216
237
|
<repo>/AGENTS.md # generic / Codex-readable guidance
|
|
217
238
|
<repo>/CLAUDE.md # Claude Code guidance
|
|
218
239
|
<repo>/.github/copilot-instructions.md # Copilot guidance
|
|
219
240
|
<repo>/.cursor/rules/agentdir.mdc # Cursor guidance
|
|
220
241
|
<repo>/.windsurf/rules/agentdir.md # Windsurf guidance
|
|
242
|
+
<repo>/.rulesync/rules/agentdir.md # rulesync source, when detected
|
|
221
243
|
~/.codex/skills/agentdir/SKILL.md # Codex skill, by default
|
|
222
244
|
```
|
|
223
245
|
|
|
224
246
|
Managed guidance is wrapped in AgentDir markers. Existing unmanaged content is
|
|
225
|
-
preserved where the target format supports managed blocks.
|
|
247
|
+
preserved where the target format supports managed blocks. The active hooks
|
|
248
|
+
directory is `.git/hooks` by default and follows `core.hooksPath` or linked
|
|
249
|
+
worktree configuration. In rulesync repos, the source rule replaces the listed
|
|
250
|
+
project guidance files as the managed source of truth.
|
|
226
251
|
|
|
227
252
|
## Inspect A Session
|
|
228
253
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AgentDir
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="docs/assets/agentdir-overview.png" alt="AgentDir turns agent work into a saved trail, searchable memory, and proof for engineers." />
|
|
4
|
+
<img src="https://raw.githubusercontent.com/jstxn/agentdir/main/docs/assets/agentdir-overview.png" alt="AgentDir turns agent work into a saved trail, searchable memory, and proof for engineers." />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
@@ -104,6 +104,16 @@ agentdir --version
|
|
|
104
104
|
agentdir --help
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
Update an existing install to the latest release and refresh adoption for the
|
|
108
|
+
current repository:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
agentdir update
|
|
112
|
+
agentdir update --dry-run
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The older `agentdir --upgrade` interface remains supported for compatibility.
|
|
116
|
+
|
|
107
117
|
## Pi Package
|
|
108
118
|
|
|
109
119
|
Pi users can install this repository as a Pi package so the AgentDir skill is
|
|
@@ -112,7 +122,7 @@ available automatically during coding tasks:
|
|
|
112
122
|
Package page: [@jstxn/agentdir-pi](https://pi.dev/packages/@jstxn/agentdir-pi)
|
|
113
123
|
|
|
114
124
|
```bash
|
|
115
|
-
pi install npm:@jstxn/agentdir-pi@0.7.
|
|
125
|
+
pi install npm:@jstxn/agentdir-pi@0.7.7
|
|
116
126
|
# or install directly from a local checkout / release tag:
|
|
117
127
|
pi install /absolute/path/to/agentdir
|
|
118
128
|
pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
@@ -158,6 +168,16 @@ instead of project instruction files:
|
|
|
158
168
|
agentdir adopt --install-skill store --install-generic store --integration-target store
|
|
159
169
|
```
|
|
160
170
|
|
|
171
|
+
Adoption adapts to repos where other tools own these files. When
|
|
172
|
+
[rulesync](https://github.com/dyoshikawa/rulesync) generates the guidance
|
|
173
|
+
files, the managed rule is written to `.rulesync/rules/agentdir.md` instead so
|
|
174
|
+
it survives regeneration, and files with generated-file headers are never
|
|
175
|
+
edited without `--force`. When lefthook, husky, or pre-commit own the Git
|
|
176
|
+
hooks, adopt warns up front, `agentdir doctor` flags hook shims those tools
|
|
177
|
+
later overwrite, and `agentdir hooks install` restores them. See
|
|
178
|
+
[docs/INSTALL.md](docs/INSTALL.md#coexisting-with-rule-generators-and-hook-managers)
|
|
179
|
+
for details.
|
|
180
|
+
|
|
161
181
|
For non-interactive installs, choose the ignore destination explicitly:
|
|
162
182
|
|
|
163
183
|
```bash
|
|
@@ -179,17 +199,22 @@ Default adoption writes only local files:
|
|
|
179
199
|
|
|
180
200
|
```text
|
|
181
201
|
<repo>/.agentdir/ # evidence, artifacts, indexes, state
|
|
182
|
-
<repo>/.
|
|
202
|
+
<repo>/.agentdir/hooks.json # installed-hook drift manifest
|
|
203
|
+
<active-hooks-directory>/* # managed hook shims with backups
|
|
183
204
|
<repo>/AGENTS.md # generic / Codex-readable guidance
|
|
184
205
|
<repo>/CLAUDE.md # Claude Code guidance
|
|
185
206
|
<repo>/.github/copilot-instructions.md # Copilot guidance
|
|
186
207
|
<repo>/.cursor/rules/agentdir.mdc # Cursor guidance
|
|
187
208
|
<repo>/.windsurf/rules/agentdir.md # Windsurf guidance
|
|
209
|
+
<repo>/.rulesync/rules/agentdir.md # rulesync source, when detected
|
|
188
210
|
~/.codex/skills/agentdir/SKILL.md # Codex skill, by default
|
|
189
211
|
```
|
|
190
212
|
|
|
191
213
|
Managed guidance is wrapped in AgentDir markers. Existing unmanaged content is
|
|
192
|
-
preserved where the target format supports managed blocks.
|
|
214
|
+
preserved where the target format supports managed blocks. The active hooks
|
|
215
|
+
directory is `.git/hooks` by default and follows `core.hooksPath` or linked
|
|
216
|
+
worktree configuration. In rulesync repos, the source rule replaces the listed
|
|
217
|
+
project guidance files as the managed source of truth.
|
|
193
218
|
|
|
194
219
|
## Inspect A Session
|
|
195
220
|
|
|
@@ -87,7 +87,7 @@ agentdir memory backend list
|
|
|
87
87
|
agentdir memory daemon status
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
`agentdir memory search`
|
|
90
|
+
`agentdir memory search` incrementally updates the index by default (new and deleted envelopes only; pass `--no-rebuild` to skip even that), then ranks matching envelopes and derived session summaries by vector similarity. `agentdir memory explain` shows why a hit matched. `agentdir context build` combines memory, current-session evidence, and recent session summaries into an agent-ready context pack. The raw Maildir envelopes remain the source of truth, so the memory layer can always be deleted and rebuilt.
|
|
91
91
|
|
|
92
92
|
When retrieved context materially influences a plan, tool call, answer, or handoff,
|
|
93
93
|
emit an auditable context pack:
|
|
@@ -157,6 +157,12 @@ agentdir run -- git diff --check
|
|
|
157
157
|
|
|
158
158
|
`agentdir run` streams command output to the terminal and records both the call and the result. Stored output is truncated at a bounded size and common secret-like patterns are redacted in the stored envelope. AgentDir also redacts common secret-like patterns from emitted message bodies before persistence. Agents should use this automatically for commands they run as evidence.
|
|
159
159
|
|
|
160
|
+
When captured output is truncated, `agentdir run` prints a warning to stderr and the stored `tool.result` carries an `X-AgentDir-Truncated` header. Downstream surfaces treat the evidence as partial: `evidence` marks the row `truncated=true`, `audit session` reports a `truncated_evidence` warning, and `audit claims` downgrades claims resting on truncated successful evidence from `supported` to `partial` (which fails `--strict`). Raise the limit with `--max-capture-bytes` when full output matters for a claim.
|
|
161
|
+
|
|
162
|
+
`agentdir run` supports `--timeout <seconds>` (kills the command and records exit 124), `--session require|create|auto|<id>` to control session placement, and `--json` for a machine-readable run summary after the streamed output.
|
|
163
|
+
|
|
164
|
+
Exit codes are structured for agents: 2 = user error, 3 = state error (no root or no active session — the error message names the recovery command), 4 = missing dependency, 5 = configuration error. With `--json`, failures also print `{"success": false, "exit_code": ..., "error": ..., "error_code": ...}` to stdout. Every command accepts `--quiet` for exit-code-only checks.
|
|
165
|
+
|
|
160
166
|
Do not wrap routine exploration commands such as `rg`, `sed`, `nl`, `cat`, `ls`, `find`, or quick read-only `git status` checks. Use plain shell commands while reading files, mapping code, or gathering low-level context. The evidence trail should capture verification, reproduced failures, important diagnostics, and final support for claims, not every glance at a file.
|
|
161
167
|
|
|
162
168
|
## Capturing Diffs As Artifacts
|
|
@@ -48,27 +48,30 @@ If `~/.local/bin` is not on PATH, add it:
|
|
|
48
48
|
export PATH="$HOME/.local/bin:$PATH"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Update Existing Installs
|
|
52
52
|
|
|
53
53
|
From any repo where AgentDir should stay adopted:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
agentdir
|
|
56
|
+
agentdir update
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
The
|
|
59
|
+
The update command resolves the latest GitHub Release, reinstalls AgentDir,
|
|
60
60
|
then re-runs adoption for the current git repository. It refreshes hooks, the
|
|
61
61
|
Codex skill, and broad project guidance by default, then runs `doctor`.
|
|
62
62
|
|
|
63
63
|
Useful variants:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
agentdir
|
|
67
|
-
agentdir
|
|
68
|
-
agentdir
|
|
69
|
-
agentdir
|
|
66
|
+
agentdir update --install-skill none
|
|
67
|
+
agentdir update --no-adopt
|
|
68
|
+
agentdir update --version v0.7.7
|
|
69
|
+
agentdir update --dry-run
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
The older `agentdir --upgrade` interface and its `--upgrade-*` options remain
|
|
73
|
+
supported for compatibility.
|
|
74
|
+
|
|
72
75
|
## Verify Install
|
|
73
76
|
|
|
74
77
|
```bash
|
|
@@ -96,13 +99,13 @@ agentdir work finish --json
|
|
|
96
99
|
If you already have the wheel asset:
|
|
97
100
|
|
|
98
101
|
```bash
|
|
99
|
-
AGENTDIR_WHEEL=/path/to/agentdir_cli-0.7.
|
|
102
|
+
AGENTDIR_WHEEL=/path/to/agentdir_cli-0.7.7-py3-none-any.whl bash scripts/install.sh
|
|
100
103
|
```
|
|
101
104
|
|
|
102
105
|
To force the virtual environment installer even when `pipx` is present:
|
|
103
106
|
|
|
104
107
|
```bash
|
|
105
|
-
AGENTDIR_FORCE_VENV=1 AGENTDIR_WHEEL=/path/to/agentdir_cli-0.7.
|
|
108
|
+
AGENTDIR_FORCE_VENV=1 AGENTDIR_WHEEL=/path/to/agentdir_cli-0.7.7-py3-none-any.whl bash scripts/install.sh
|
|
106
109
|
```
|
|
107
110
|
|
|
108
111
|
## Roll Back To The Previous Release
|
|
@@ -119,13 +122,13 @@ curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollbac
|
|
|
119
122
|
To choose a specific release:
|
|
120
123
|
|
|
121
124
|
```bash
|
|
122
|
-
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash -s -- v0.7.
|
|
125
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash -s -- v0.7.6
|
|
123
126
|
```
|
|
124
127
|
|
|
125
128
|
The equivalent manual rollback is:
|
|
126
129
|
|
|
127
130
|
```bash
|
|
128
|
-
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | AGENTDIR_VERSION=v0.7.
|
|
131
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | AGENTDIR_VERSION=v0.7.6 bash
|
|
129
132
|
```
|
|
130
133
|
|
|
131
134
|
## Optional Extras
|
|
@@ -143,6 +146,34 @@ pipx inject agentdir-cli 'agentdir-cli[team]'
|
|
|
143
146
|
`semantic` adds local embeddings and the embedded vector backend configuration
|
|
144
147
|
surface. `team` adds optional shared-memory backend clients.
|
|
145
148
|
|
|
149
|
+
### When The Semantic Extra Is Worth It
|
|
150
|
+
|
|
151
|
+
The default retrieval backend (`local-hybrid`) combines lexical passage
|
|
152
|
+
matching with lightweight hashed vectors. It needs no model download and is
|
|
153
|
+
usually enough when memory queries reuse the project's own vocabulary: error
|
|
154
|
+
strings, subsystem names, command names, file paths.
|
|
155
|
+
|
|
156
|
+
Install the `semantic` extra and opt in when retrieval quality matters more
|
|
157
|
+
than setup weight:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pipx inject agentdir-cli 'agentdir-cli[semantic]'
|
|
161
|
+
agentdir memory embeddings configure fastembed # one-time model download
|
|
162
|
+
agentdir memory backend configure sqlite-vec # optional: faster large stores
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Reach for it when:
|
|
166
|
+
|
|
167
|
+
- queries are paraphrases rather than the recorded wording ("auth timeouts"
|
|
168
|
+
should match "login requests hang for 30s"),
|
|
169
|
+
- memory is federated across several repos with different vocabularies,
|
|
170
|
+
- the store has grown past tens of thousands of passages and `sqlite-vec`
|
|
171
|
+
lookup speed starts to matter.
|
|
172
|
+
|
|
173
|
+
Skip it for single-repo stores with recent, literally-worded memory - the
|
|
174
|
+
default backend retrieves those well without the model download.
|
|
175
|
+
`agentdir memory backend status` shows which backends are active.
|
|
176
|
+
|
|
146
177
|
## Store Location Scopes
|
|
147
178
|
|
|
148
179
|
AgentDir stores mailboxes, artifacts, and indexes in an AgentDir root. You can choose the root explicitly or use a scope.
|
|
@@ -233,6 +264,71 @@ agentdir integrations install all --target project
|
|
|
233
264
|
agentdir integrations doctor --json
|
|
234
265
|
```
|
|
235
266
|
|
|
267
|
+
## Coexisting With Rule Generators And Hook Managers
|
|
268
|
+
|
|
269
|
+
Some repos generate their agent guidance files and Git hooks from another
|
|
270
|
+
source of truth. Adoption detects the common tools and adapts so managed
|
|
271
|
+
content is not silently wiped.
|
|
272
|
+
|
|
273
|
+
### Rule generators (rulesync)
|
|
274
|
+
|
|
275
|
+
When a repo uses [rulesync](https://github.com/dyoshikawa/rulesync)
|
|
276
|
+
(`.rulesync/` or `rulesync.jsonc` present), `CLAUDE.md`, `AGENTS.md`,
|
|
277
|
+
`.cursor/rules/`, and friends are generated files: the next
|
|
278
|
+
`rulesync generate` (often wired into `pnpm rulesync`) rewrites them and drops
|
|
279
|
+
any managed block. `agentdir adopt` therefore writes the managed rule to the
|
|
280
|
+
rulesync source instead:
|
|
281
|
+
|
|
282
|
+
```text
|
|
283
|
+
.rulesync/rules/agentdir.md # root: false, targets: ["*"]
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Run `rulesync generate` afterwards to propagate it into every generated tool
|
|
287
|
+
file; it now survives regeneration. The skipped generated files are listed in
|
|
288
|
+
the adopt output. To select the classic project-file destinations, use
|
|
289
|
+
`agentdir adopt --install-integrations project-files`. Existing files with
|
|
290
|
+
generated headers remain protected; add `--force` only when you intentionally
|
|
291
|
+
want to edit those files directly.
|
|
292
|
+
|
|
293
|
+
Independent of rulesync, adoption refuses to insert managed blocks into any
|
|
294
|
+
existing file whose header marks it as generated (`DO NOT EDIT`,
|
|
295
|
+
`@generated`, `generated by ...`) unless `--force` is given.
|
|
296
|
+
|
|
297
|
+
### Git hook managers (lefthook, husky, pre-commit)
|
|
298
|
+
|
|
299
|
+
AgentDir hook shims chain whatever hook they replace, so they coexist with a
|
|
300
|
+
hook manager - until the manager reinstalls itself. `lefthook install` and
|
|
301
|
+
`pre-commit install` rewrite `.git/hooks/*` (package installs typically
|
|
302
|
+
trigger lefthook via a postinstall script), and husky points
|
|
303
|
+
`core.hooksPath` at a directory it regenerates. Any of these silently stops
|
|
304
|
+
AgentDir's git recording.
|
|
305
|
+
|
|
306
|
+
Adoption now defends against that:
|
|
307
|
+
|
|
308
|
+
- adopt and `agentdir hooks install` detect lefthook, husky, pre-commit, and a
|
|
309
|
+
configured `core.hooksPath`, and warn about the overwrite behavior up front;
|
|
310
|
+
- installed shims are recorded in `.agentdir/hooks.json`, and `agentdir
|
|
311
|
+
doctor` (also run by `status`, `adopt`, and `work finish`) warns when a
|
|
312
|
+
recorded shim was overwritten or removed, naming the tool that did it;
|
|
313
|
+
- rerunning `agentdir hooks install` restores the shims without `--force` when
|
|
314
|
+
the clobbering script came from a known hook manager, and chains the
|
|
315
|
+
manager's hook so both keep running;
|
|
316
|
+
- shims are installed into the hooks directory git actually consults
|
|
317
|
+
(`core.hooksPath` and linked worktrees included).
|
|
318
|
+
|
|
319
|
+
After a `pnpm install` or similar in a lefthook repo, either rerun
|
|
320
|
+
`agentdir hooks install` or let the next doctor run flag it. If the churn is
|
|
321
|
+
unwelcome, adopt with `--no-hooks` and rely on session recording without git
|
|
322
|
+
hook events, or run the recorder from the hook manager itself, e.g. in
|
|
323
|
+
`lefthook.yml`:
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
post-commit:
|
|
327
|
+
jobs:
|
|
328
|
+
- name: agentdir-record
|
|
329
|
+
run: agentdir hooks record --hook post-commit --original-exit-code 0 || true
|
|
330
|
+
```
|
|
331
|
+
|
|
236
332
|
## Install From Source
|
|
237
333
|
|
|
238
334
|
For local development:
|
|
@@ -34,7 +34,7 @@ pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
|
34
34
|
If the npm package has been published:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
pi install npm:@jstxn/agentdir-pi@0.7.
|
|
37
|
+
pi install npm:@jstxn/agentdir-pi@0.7.7
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Use `pi config` to enable or disable the bundled skill after installation.
|
|
@@ -48,7 +48,7 @@ The root `package.json` declares the Pi resources:
|
|
|
48
48
|
"keywords": ["pi-package"],
|
|
49
49
|
"pi": {
|
|
50
50
|
"skills": ["./skills"],
|
|
51
|
-
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.
|
|
51
|
+
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.7/docs/assets/agentdir-overview.png"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
```
|
|
@@ -31,9 +31,9 @@ chmod +x dist/rollback-agentdir.sh
|
|
|
31
31
|
Expected assets (substitute the release version):
|
|
32
32
|
|
|
33
33
|
```text
|
|
34
|
-
dist/agentdir_cli-0.7.
|
|
35
|
-
dist/agentdir_cli-0.7.
|
|
36
|
-
dist/jstxn-agentdir-pi-0.7.
|
|
34
|
+
dist/agentdir_cli-0.7.7-py3-none-any.whl
|
|
35
|
+
dist/agentdir_cli-0.7.7.tar.gz
|
|
36
|
+
dist/jstxn-agentdir-pi-0.7.7.tgz
|
|
37
37
|
dist/install-agentdir.sh
|
|
38
38
|
dist/rollback-agentdir.sh
|
|
39
39
|
```
|
|
@@ -41,19 +41,19 @@ dist/rollback-agentdir.sh
|
|
|
41
41
|
## Tag And Release
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
git tag -a v0.7.
|
|
44
|
+
git tag -a v0.7.7 -m "Release AgentDir v0.7.7"
|
|
45
45
|
git push origin main
|
|
46
|
-
git push origin v0.7.
|
|
46
|
+
git push origin v0.7.7
|
|
47
47
|
|
|
48
|
-
gh release create v0.7.
|
|
49
|
-
dist/agentdir_cli-0.7.
|
|
50
|
-
dist/agentdir_cli-0.7.
|
|
51
|
-
dist/jstxn-agentdir-pi-0.7.
|
|
48
|
+
gh release create v0.7.7 \
|
|
49
|
+
dist/agentdir_cli-0.7.7-py3-none-any.whl \
|
|
50
|
+
dist/agentdir_cli-0.7.7.tar.gz \
|
|
51
|
+
dist/jstxn-agentdir-pi-0.7.7.tgz \
|
|
52
52
|
dist/install-agentdir.sh \
|
|
53
53
|
dist/rollback-agentdir.sh \
|
|
54
54
|
--repo jstxn/agentdir \
|
|
55
|
-
--title "AgentDir v0.7.
|
|
56
|
-
--notes-file docs/releases/v0.7.
|
|
55
|
+
--title "AgentDir v0.7.7" \
|
|
56
|
+
--notes-file docs/releases/v0.7.7.md
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Publishing the release triggers `publish.yml`, which rebuilds the sdist and
|
|
@@ -65,7 +65,7 @@ Use a disposable environment:
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
tmp="$(mktemp -d)"
|
|
68
|
-
gh release download v0.7.
|
|
68
|
+
gh release download v0.7.7 --repo jstxn/agentdir --pattern install-agentdir.sh --dir "$tmp"
|
|
69
69
|
AGENTDIR_PREFIX="$tmp/prefix" AGENTDIR_HOME="$tmp/home" bash "$tmp/install-agentdir.sh"
|
|
70
70
|
"$tmp/prefix/bin/agentdir" --help
|
|
71
71
|
"$tmp/prefix/bin/agentdir" --version
|
|
@@ -101,13 +101,13 @@ tmp="$(mktemp -d)"
|
|
|
101
101
|
AGENTDIR_PREFIX="$tmp/prefix" \
|
|
102
102
|
AGENTDIR_HOME="$tmp/home" \
|
|
103
103
|
AGENTDIR_FORCE_VENV=1 \
|
|
104
|
-
AGENTDIR_WHEEL="$PWD/dist/agentdir_cli-0.7.
|
|
104
|
+
AGENTDIR_WHEEL="$PWD/dist/agentdir_cli-0.7.7-py3-none-any.whl" \
|
|
105
105
|
bash dist/install-agentdir.sh
|
|
106
106
|
|
|
107
107
|
AGENTDIR_PREFIX="$tmp/prefix" \
|
|
108
108
|
AGENTDIR_HOME="$tmp/home" \
|
|
109
109
|
AGENTDIR_FORCE_VENV=1 \
|
|
110
|
-
bash dist/rollback-agentdir.sh v0.7.
|
|
110
|
+
bash dist/rollback-agentdir.sh v0.7.6
|
|
111
111
|
|
|
112
112
|
"$tmp/prefix/bin/agentdir" --help
|
|
113
113
|
```
|
|
@@ -411,7 +411,7 @@ agentdir session ensure [--id <id>] [--title <title>]
|
|
|
411
411
|
agentdir session start [--id <id>] [--title <title>]
|
|
412
412
|
agentdir session current
|
|
413
413
|
agentdir session end [--summary <file-or-text>]
|
|
414
|
-
agentdir run [--session
|
|
414
|
+
agentdir run [--session auto|require|create|<id>] [--name <tool>] [--timeout <seconds>] [--json] -- <command> [args...]
|
|
415
415
|
agentdir emit [--root <root>] [--scope <scope>] [--session <id>] --type <type> --body <file>
|
|
416
416
|
agentdir actor create [--root <root>] [--scope <scope>] <actor-id>
|
|
417
417
|
agentdir send [--root <root>] [--scope <scope>] --from <actor> --to <actor> --type <type> --body <file>
|
|
@@ -487,6 +487,26 @@ The memory daemon is an opt-in warm indexer. It records process state under
|
|
|
487
487
|
roots, and can use `watchfiles` when that extra is installed. Commands remain
|
|
488
488
|
correct without the daemon because the index is still rebuildable on demand.
|
|
489
489
|
|
|
490
|
+
## Exit Codes
|
|
491
|
+
|
|
492
|
+
`agentdir` commands use a small exit-code taxonomy so agents can branch on
|
|
493
|
+
failure class without parsing stderr:
|
|
494
|
+
|
|
495
|
+
```text
|
|
496
|
+
0 success
|
|
497
|
+
1 command-specific failure result (doctor unhealthy, strict audit violations,
|
|
498
|
+
secrets found); agentdir run passes through the wrapped command's exit code,
|
|
499
|
+
with 124 reserved for --timeout kills
|
|
500
|
+
2 user error: bad arguments or flags
|
|
501
|
+
3 state error: not an AgentDir root, or no active session
|
|
502
|
+
4 missing dependency: e.g. git repository required
|
|
503
|
+
5 configuration error: unsupported store version, corrupted config
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
With `--json`, failures also print a structured error envelope to stdout:
|
|
507
|
+
`{"success": false, "exit_code": <n>, "error": "...", "error_code": "<class>", "data": null}`.
|
|
508
|
+
All commands accept `--quiet` to suppress stdout for exit-code-only checks.
|
|
509
|
+
|
|
490
510
|
## 14. Implementation Recommendation
|
|
491
511
|
|
|
492
512
|
The current implementation uses Python.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# AgentDir v0.7.6
|
|
2
|
+
|
|
3
|
+
AgentDir v0.7.6 fixes the project page rendering on PyPI.
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
- Use an absolute URL for the README overview image. PyPI renders the README
|
|
8
|
+
as the `agentdir-cli` project description but does not resolve
|
|
9
|
+
repository-relative image paths, so the overview image rendered as a broken
|
|
10
|
+
icon on the project page.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
From PyPI:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install agentdir-cli
|
|
18
|
+
# or
|
|
19
|
+
pipx install agentdir-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or with the release installer:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | bash
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Install the Pi package from npm or the release tag:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pi install npm:@jstxn/agentdir-pi@0.7.6
|
|
32
|
+
pi install git:github.com/jstxn/agentdir@v0.7.6
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Rollback to v0.7.5 is one command:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash
|
|
39
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AgentDir v0.7.7
|
|
2
|
+
|
|
3
|
+
AgentDir v0.7.7 makes self-updates easier to discover and keeps adoption
|
|
4
|
+
reliable in repositories where other tools generate agent guidance or Git
|
|
5
|
+
hooks.
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Add `agentdir update` as the canonical self-update command. It uses the
|
|
10
|
+
existing upgrade implementation, supports `--version`, `--repo`,
|
|
11
|
+
`--install-skill`, `--no-adopt`, `--no-hooks`, `--dry-run`, and `--json`, and
|
|
12
|
+
keeps the older `agentdir --upgrade` interface working for compatibility.
|
|
13
|
+
- Coexist with rulesync by installing AgentDir guidance at
|
|
14
|
+
`.rulesync/rules/agentdir.md` instead of editing generated tool files. Files
|
|
15
|
+
with generated headers are protected unless `--force` is explicitly used.
|
|
16
|
+
- Detect lefthook, husky, pre-commit, and `core.hooksPath`; record installed
|
|
17
|
+
shims in `.agentdir/hooks.json`; warn when another tool replaces them; and
|
|
18
|
+
safely restore known hook-manager scripts without discarding custom hooks.
|
|
19
|
+
- Install hooks into the directory Git actually uses, including linked
|
|
20
|
+
worktrees and repositories configured with `core.hooksPath`.
|
|
21
|
+
- Clarify the README's generated-file and active-hooks-directory layout, and
|
|
22
|
+
document when the optional semantic retrieval dependencies are worthwhile.
|
|
23
|
+
|
|
24
|
+
## Install Or Update
|
|
25
|
+
|
|
26
|
+
Install from PyPI:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uv tool install agentdir-cli
|
|
30
|
+
# or
|
|
31
|
+
pipx install agentdir-cli
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Update an existing installation:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
agentdir update
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or use the release installer:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | bash
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Install the Pi package from npm or the release tag:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pi install npm:@jstxn/agentdir-pi@0.7.7
|
|
50
|
+
pi install git:github.com/jstxn/agentdir@v0.7.7
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Rollback to v0.7.6 is one command:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash
|
|
57
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jstxn/agentdir-pi",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Pi package for AgentDir local-first coding-agent memory and evidence capture.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"skills": [
|
|
30
30
|
"./skills"
|
|
31
31
|
],
|
|
32
|
-
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.
|
|
32
|
+
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.7/docs/assets/agentdir-overview.png"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
-
AGENTDIR_VERSION="${AGENTDIR_VERSION:-v0.7.
|
|
4
|
+
AGENTDIR_VERSION="${AGENTDIR_VERSION:-v0.7.7}"
|
|
5
5
|
AGENTDIR_REPO="${AGENTDIR_REPO:-jstxn/agentdir}"
|
|
6
6
|
AGENTDIR_PACKAGE_VERSION="${AGENTDIR_VERSION#v}"
|
|
7
7
|
# Releases after v0.7.4 ship the wheel under the agentdir-cli distribution
|
|
@@ -56,6 +56,14 @@ Use `agentdir evidence --brief` and `agentdir timeline` to skim what has been re
|
|
|
56
56
|
|
|
57
57
|
Emit important plans, blockers, diffs, review decisions, and final handoffs as immutable events when they matter for future replay or audit.
|
|
58
58
|
|
|
59
|
+
## Exit Codes And Structured Errors
|
|
60
|
+
|
|
61
|
+
- 0 success; `agentdir run` passes through the wrapped command's exit code (124 = `--timeout` kill).
|
|
62
|
+
- 2 user error, 3 state error (no root / no active session), 4 missing dependency, 5 configuration error.
|
|
63
|
+
- State errors name the recovery command in the message (`agentdir adopt`, `agentdir work start`).
|
|
64
|
+
- Add `--json` to get a `{"success": false, "exit_code": ..., "error_code": ...}` envelope on failure; add `--quiet` for exit-code-only checks.
|
|
65
|
+
- `agentdir run --session require` fails fast instead of auto-creating a session; `--session create` forces a fresh one.
|
|
66
|
+
|
|
59
67
|
## Finish Work
|
|
60
68
|
|
|
61
69
|
Before the final response, run `agentdir work finish --json` when practical. Read the `agent_handoff` object before making final verification claims.
|