agentdir-cli 0.10.0__tar.gz → 0.11.0__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.10.0 → agentdir_cli-0.11.0}/MANIFEST.in +1 -2
- {agentdir_cli-0.10.0/src/agentdir_cli.egg-info → agentdir_cli-0.11.0}/PKG-INFO +74 -30
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/README.md +73 -23
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/INSTALL.md +13 -12
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/PI_PACKAGE.md +2 -2
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/RELEASING.md +14 -14
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/TECH_BRIEF.md +23 -5
- agentdir_cli-0.11.0/docs/assets/agentdir-agent-trace-demo.gif +0 -0
- agentdir_cli-0.11.0/docs/releases/v0.11.0.md +76 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/package.json +2 -2
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/pyproject.toml +1 -8
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/scripts/install.sh +97 -4
- agentdir_cli-0.11.0/scripts/rollback.sh +89 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/skills/agentdir/SKILL.md +1 -1
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/__init__.py +1 -1
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/actors.py +12 -9
- agentdir_cli-0.11.0/src/agentdir/artifacts.py +74 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/audit.py +87 -50
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/capture.py +229 -31
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/claims.py +1 -1
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/cli.py +607 -370
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context.py +273 -205
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context_expansion.py +198 -48
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context_repository.py +87 -64
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context_review.py +152 -34
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context_selection.py +18 -2
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/control.py +414 -147
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/daemon.py +148 -33
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/doctor.py +71 -15
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/envelope.py +67 -17
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/environment.py +86 -42
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/events.py +11 -13
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/federation.py +39 -15
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/git.py +3 -7
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/gitignore.py +43 -1
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/hooks.py +139 -44
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/index.py +356 -77
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/jev.py +75 -9
- agentdir_cli-0.11.0/src/agentdir/locking.py +116 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/memory.py +163 -105
- agentdir_cli-0.11.0/src/agentdir/query.py +126 -0
- agentdir_cli-0.11.0/src/agentdir/redaction.py +230 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/rendering.py +7 -2
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/replay.py +3 -3
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/retention.py +135 -43
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/review.py +91 -30
- agentdir_cli-0.11.0/src/agentdir/secrets.py +275 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/sessions.py +300 -51
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/skills.py +326 -153
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/store.py +8 -11
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/upgrade.py +84 -50
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0/src/agentdir_cli.egg-info}/PKG-INFO +74 -30
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir_cli.egg-info/SOURCES.txt +10 -0
- agentdir_cli-0.11.0/src/agentdir_cli.egg-info/requires.txt +8 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_agent_first.py +14 -6
- agentdir_cli-0.11.0/tests/test_audit_fixes_audit_control_cli.py +1195 -0
- agentdir_cli-0.11.0/tests/test_audit_fixes_context.py +1117 -0
- agentdir_cli-0.11.0/tests/test_audit_fixes_hooks_skills_upgrade.py +1106 -0
- agentdir_cli-0.11.0/tests/test_audit_fixes_index_memory_daemon.py +1072 -0
- agentdir_cli-0.11.0/tests/test_audit_fixes_security_capture.py +827 -0
- agentdir_cli-0.11.0/tests/test_audit_fixes_storage_sessions.py +722 -0
- agentdir_cli-0.11.0/tests/test_cli_integrations_perf.py +264 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_context_concurrency.py +125 -7
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_environment.py +19 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_pi_package.py +2 -2
- agentdir_cli-0.11.0/tests/test_redaction.py +146 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_v1_behavior.py +6 -1
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_worktrees.py +104 -0
- agentdir_cli-0.10.0/scripts/rollback.sh +0 -61
- agentdir_cli-0.10.0/src/agentdir/artifacts.py +0 -56
- agentdir_cli-0.10.0/src/agentdir/locking.py +0 -48
- agentdir_cli-0.10.0/src/agentdir/query.py +0 -65
- agentdir_cli-0.10.0/src/agentdir/redaction.py +0 -42
- agentdir_cli-0.10.0/src/agentdir/secrets.py +0 -140
- agentdir_cli-0.10.0/src/agentdir_cli.egg-info/requires.txt +0 -15
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/LICENSE +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/AGENTIC_CODING.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/DEMO.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/PRD.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/assets/agentdir-overview.png +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/investigations/2026-05-12-cross-repo-ergonomics-lanes.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/investigations/2026-05-12-rag-vector-scenarios.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/investigations/2026-08-19-agentdir-read-loop-dogfood.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/investigations/2026-09-21-jev-evaluation.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/investigations/2026-09-21-jev-integration.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.1.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.1.1.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.10.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.2.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.3.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.3.1.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.3.2.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.3.3.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.3.4.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.4.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.5.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.5.1.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.5.2.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.5.3.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.6.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.1.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.2.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.3.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.4.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.5.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.6.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.7.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.7.8.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.8.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/docs/releases/v0.9.0.md +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/examples/dogfood-session.sh +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/setup.cfg +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/__main__.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/context_projection.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/fsutil.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir/mailbox.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir_cli.egg-info/dependency_links.txt +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir_cli.egg-info/entry_points.txt +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/src/agentdir_cli.egg-info/top_level.txt +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_agent_trust.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_audit.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_claim_polarity.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_context_expansion.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_context_federation.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_context_protocol.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_context_review.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_evidence_classification.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_fsutil.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_header_folding.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_install_script.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_jev.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_structured_claims.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_truncation.py +0 -0
- {agentdir_cli-0.10.0 → agentdir_cli-0.11.0}/tests/test_vector_memory.py +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
include LICENSE
|
|
2
2
|
include README.md
|
|
3
3
|
include package.json
|
|
4
|
-
recursive-include docs *.md
|
|
4
|
+
recursive-include docs *.md *.png *.gif
|
|
5
5
|
recursive-include skills *.md
|
|
6
|
-
recursive-include docs *.png
|
|
7
6
|
recursive-include examples *.sh
|
|
8
7
|
recursive-include scripts *.sh
|
|
9
8
|
recursive-include tests *.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentdir-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Local-first Maildir-inspired work mailstore for software agents
|
|
5
5
|
Author: AgentDir Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,12 +23,6 @@ Provides-Extra: watch
|
|
|
23
23
|
Requires-Dist: watchfiles>=0.21; extra == "watch"
|
|
24
24
|
Provides-Extra: semantic
|
|
25
25
|
Requires-Dist: fastembed>=0.4; extra == "semantic"
|
|
26
|
-
Requires-Dist: sqlite-vec>=0.1; extra == "semantic"
|
|
27
|
-
Provides-Extra: team
|
|
28
|
-
Requires-Dist: qdrant-client>=1.9; extra == "team"
|
|
29
|
-
Requires-Dist: lancedb>=0.9; extra == "team"
|
|
30
|
-
Requires-Dist: opentelemetry-api>=1.24; extra == "team"
|
|
31
|
-
Requires-Dist: opentelemetry-sdk>=1.24; extra == "team"
|
|
32
26
|
Dynamic: license-file
|
|
33
27
|
|
|
34
28
|
# AgentDir
|
|
@@ -128,6 +122,7 @@ agentdir work start "fix checkout failure"
|
|
|
128
122
|
agentdir work context --expand 1
|
|
129
123
|
agentdir work context --use 1 --reason "prior checkout pattern informs the plan"
|
|
130
124
|
agentdir run -- pytest -q
|
|
125
|
+
agentdir claim test --passed
|
|
131
126
|
agentdir audit session
|
|
132
127
|
agentdir work finish --json --brief
|
|
133
128
|
```
|
|
@@ -179,7 +174,7 @@ available automatically during coding tasks:
|
|
|
179
174
|
Package page: [@jstxn/agentdir-pi](https://pi.dev/packages/@jstxn/agentdir-pi)
|
|
180
175
|
|
|
181
176
|
```bash
|
|
182
|
-
pi install npm:@jstxn/agentdir-pi@0.
|
|
177
|
+
pi install npm:@jstxn/agentdir-pi@0.11.0
|
|
183
178
|
# or install directly from a local checkout / release tag:
|
|
184
179
|
pi install /absolute/path/to/agentdir
|
|
185
180
|
pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
@@ -209,7 +204,7 @@ This is intentionally boring setup. It prepares the repository once, then agents
|
|
|
209
204
|
operate AgentDir during normal coding work:
|
|
210
205
|
|
|
211
206
|
- creates the repo-local `.agentdir` store
|
|
212
|
-
- installs AgentDir-managed git hook shims
|
|
207
|
+
- installs non-blocking AgentDir-managed git hook shims
|
|
213
208
|
- installs the Codex skill into the user skill directory
|
|
214
209
|
- writes managed project guidance for common agent tools
|
|
215
210
|
- asks interactive users whether `.agentdir/` should be added to the project or
|
|
@@ -281,8 +276,11 @@ Default adoption writes only local files:
|
|
|
281
276
|
Managed guidance is wrapped in AgentDir markers. Existing unmanaged content is
|
|
282
277
|
preserved where the target format supports managed blocks. The active hooks
|
|
283
278
|
directory is `.git/hooks` by default and follows `core.hooksPath` or linked
|
|
284
|
-
worktree configuration.
|
|
285
|
-
|
|
279
|
+
worktree configuration. Hook shims record events asynchronously in the
|
|
280
|
+
background so Git commits, pushes, checkouts, and merges do not stall; set
|
|
281
|
+
`AGENTDIR_HOOK_SYNC=1` when synchronous hook recording is needed. In rulesync
|
|
282
|
+
repos, the source rule replaces the listed project guidance files as the managed
|
|
283
|
+
source of truth.
|
|
286
284
|
|
|
287
285
|
## Git Worktrees
|
|
288
286
|
|
|
@@ -291,8 +289,11 @@ run inside a linked worktree resolve to the main working tree's `.agentdir`, so
|
|
|
291
289
|
evidence and memory from all worktrees stay searchable together instead of
|
|
292
290
|
fragmenting into one store per branch.
|
|
293
291
|
|
|
294
|
-
Each worktree
|
|
295
|
-
different worktrees
|
|
292
|
+
Each worktree keeps its own active session and workspace-scoped lifecycle
|
|
293
|
+
locks, so parallel agents in different worktrees can start, expand context, and
|
|
294
|
+
finish sessions concurrently without overwriting or blocking each other.
|
|
295
|
+
Contended locks fail cleanly after a bounded timeout (`10s` by default;
|
|
296
|
+
configurable with `AGENTDIR_LOCK_TIMEOUT`) instead of hanging indefinitely.
|
|
296
297
|
|
|
297
298
|
Agents should probe the resolved store instead of checking whether the current
|
|
298
299
|
checkout contains a physical `.agentdir`:
|
|
@@ -364,7 +365,10 @@ raw envelopes -> SQLite index -> memory/search/audit/report
|
|
|
364
365
|
directory layout. These files are the source of truth.
|
|
365
366
|
2. **Derived indexes**
|
|
366
367
|
SQLite indexes, search tables, memory passages, context packs, and audit
|
|
367
|
-
views are derived from the raw event files and can be rebuilt.
|
|
368
|
+
views are derived from the raw event files and can be rebuilt. SQLite runs in
|
|
369
|
+
WAL mode so concurrent readers and writers do not block each other, rebuilds
|
|
370
|
+
update healthy databases safely via online backup, and incremental updates
|
|
371
|
+
use per-mailbox `mtime` watermarks to skip unchanged directories on disk.
|
|
368
372
|
|
|
369
373
|
Default project layout:
|
|
370
374
|
|
|
@@ -589,8 +593,9 @@ summaries, while preserving source tiers, diversity limits, original retrieval
|
|
|
589
593
|
scores, current evidence, and the agent's review requirement. Derived session
|
|
590
594
|
summaries are not sent for scoring. Missing credentials, request failures,
|
|
591
595
|
malformed responses, or the three-second worker deadline retain local selection
|
|
592
|
-
and report a fallback reason. There are no retries.
|
|
593
|
-
|
|
596
|
+
and report a fallback reason. There are no retries. Context retrieval and the
|
|
597
|
+
optional Jev request run before `work start` acquires its commit locks, so the
|
|
598
|
+
worker deadline does not block other sessions or worktrees.
|
|
594
599
|
|
|
595
600
|
Context JSON and persisted manifests include `reranking` metadata: status,
|
|
596
601
|
model, rubric version, cutoff, candidate identities and sanitized-text hashes,
|
|
@@ -613,18 +618,46 @@ agentdir memory search --federated "release evidence"
|
|
|
613
618
|
|
|
614
619
|
Each repository remains the canonical owner of its own `.agentdir` store.
|
|
615
620
|
|
|
616
|
-
## Safety
|
|
617
|
-
|
|
618
|
-
AgentDir is local-first
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
-
|
|
626
|
-
|
|
627
|
-
|
|
621
|
+
## Safety & Sandboxing Scope
|
|
622
|
+
|
|
623
|
+
AgentDir is a local-first, cooperative flight recorder—not an execution sandbox
|
|
624
|
+
or a tamper-proof enforcement boundary. It records what agents choose to record,
|
|
625
|
+
sends nothing to a hosted AgentDir service, and complements rather than replaces
|
|
626
|
+
code review, sandboxing, or CI.
|
|
627
|
+
|
|
628
|
+
What AgentDir does:
|
|
629
|
+
|
|
630
|
+
- **Keeps raw envelopes recoverable.** Immutable local envelopes are the source
|
|
631
|
+
of truth; derived SQLite indexes can be rebuilt anytime.
|
|
632
|
+
- **Redacts common secrets before persistence.** Command arguments, captured
|
|
633
|
+
output, and emitted envelope subjects, headers, and bodies are scanned and
|
|
634
|
+
redacted before writing to disk (`--no-redact` disables this per run), with
|
|
635
|
+
`secrets scan` and `secrets redact --apply` for cleaning up older records.
|
|
636
|
+
- **Bounds captured output.** `agentdir run` caps stored stdout and stderr at
|
|
637
|
+
`--max-capture-bytes` (256 KiB per stream by default) and marks partial
|
|
638
|
+
evidence in session and claim audits.
|
|
639
|
+
- **Bounds runaway commands.** `agentdir run --timeout <seconds>` terminates
|
|
640
|
+
the command's process group after the deadline and records exit code `124`.
|
|
641
|
+
- **Supports opt-in environment scrubbing.** `agentdir run --scrub-env` strips
|
|
642
|
+
common credential environment variables from the child process without
|
|
643
|
+
modifying the parent shell environment:
|
|
644
|
+
- Case-insensitive suffixes (bare or `*_`-prefixed): `API_KEY`, `APIKEY`,
|
|
645
|
+
`TOKEN`, `SECRET`, `SECRET_KEY`, `ACCESS_KEY`, `ACCESS_KEY_ID`,
|
|
646
|
+
`PASSWORD`, `PASSWD`, `PASSPHRASE`, `PRIVATE_KEY`, `CREDENTIAL`,
|
|
647
|
+
`CREDENTIALS`, `AUTH_HEADER`, `AUTHORIZATION`.
|
|
648
|
+
- Prefixes: `OPENAI_*`, `ANTHROPIC_*`.
|
|
649
|
+
- Exact names: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,
|
|
650
|
+
`AWS_SESSION_TOKEN`, `AWS_SECURITY_TOKEN`, `DATABASE_URL`, `GH_TOKEN`,
|
|
651
|
+
`GITHUB_TOKEN`, `JEV_API_KEY`, `PGPASSWORD`, `TYPESAFE_API_KEY`.
|
|
652
|
+
- Standard runtime variables (`PATH`, `HOME`, `USER`, `TERM`, `SHELL`,
|
|
653
|
+
`LANG`, `LC_*`, `TMPDIR`, `VIRTUAL_ENV`, `PYTHONPATH`, `XDG_*`,
|
|
654
|
+
`SSH_AUTH_SOCK`, and `AGENTDIR_*` including `AGENTDIR_SESSION`) are
|
|
655
|
+
preserved.
|
|
656
|
+
- Event headers record only the scrubbed count (`X-AgentDir-Env-Scrubbed`)
|
|
657
|
+
and stripped variable names (`X-AgentDir-Env-Scrubbed-Keys`), never
|
|
658
|
+
values.
|
|
659
|
+
|
|
660
|
+
Useful health and cleanup commands:
|
|
628
661
|
|
|
629
662
|
```bash
|
|
630
663
|
agentdir doctor
|
|
@@ -633,14 +666,25 @@ agentdir secrets redact
|
|
|
633
666
|
agentdir secrets redact --apply
|
|
634
667
|
```
|
|
635
668
|
|
|
669
|
+
What AgentDir intentionally leaves to the outer environment:
|
|
670
|
+
|
|
671
|
+
- **Filesystem, network, process, and privilege isolation.** Use your agent
|
|
672
|
+
harness, container, or VM to restrict what commands can read, write, execute,
|
|
673
|
+
or reach over the network.
|
|
674
|
+
- **Mandatory or tamper-proof enforcement.** Wrapped commands still run as your
|
|
675
|
+
local user, and `.agentdir` stores plain files protected by local filesystem
|
|
676
|
+
permissions.
|
|
677
|
+
|
|
636
678
|
## Upgrade And Rollback
|
|
637
679
|
|
|
638
|
-
|
|
680
|
+
Update an existing install and refresh current repo adoption:
|
|
639
681
|
|
|
640
682
|
```bash
|
|
641
|
-
agentdir
|
|
683
|
+
agentdir update
|
|
642
684
|
```
|
|
643
685
|
|
|
686
|
+
(`agentdir --upgrade` remains supported as a legacy alias.)
|
|
687
|
+
|
|
644
688
|
Rollback to the previous stable release:
|
|
645
689
|
|
|
646
690
|
```bash
|
|
@@ -95,6 +95,7 @@ agentdir work start "fix checkout failure"
|
|
|
95
95
|
agentdir work context --expand 1
|
|
96
96
|
agentdir work context --use 1 --reason "prior checkout pattern informs the plan"
|
|
97
97
|
agentdir run -- pytest -q
|
|
98
|
+
agentdir claim test --passed
|
|
98
99
|
agentdir audit session
|
|
99
100
|
agentdir work finish --json --brief
|
|
100
101
|
```
|
|
@@ -146,7 +147,7 @@ available automatically during coding tasks:
|
|
|
146
147
|
Package page: [@jstxn/agentdir-pi](https://pi.dev/packages/@jstxn/agentdir-pi)
|
|
147
148
|
|
|
148
149
|
```bash
|
|
149
|
-
pi install npm:@jstxn/agentdir-pi@0.
|
|
150
|
+
pi install npm:@jstxn/agentdir-pi@0.11.0
|
|
150
151
|
# or install directly from a local checkout / release tag:
|
|
151
152
|
pi install /absolute/path/to/agentdir
|
|
152
153
|
pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
@@ -176,7 +177,7 @@ This is intentionally boring setup. It prepares the repository once, then agents
|
|
|
176
177
|
operate AgentDir during normal coding work:
|
|
177
178
|
|
|
178
179
|
- creates the repo-local `.agentdir` store
|
|
179
|
-
- installs AgentDir-managed git hook shims
|
|
180
|
+
- installs non-blocking AgentDir-managed git hook shims
|
|
180
181
|
- installs the Codex skill into the user skill directory
|
|
181
182
|
- writes managed project guidance for common agent tools
|
|
182
183
|
- asks interactive users whether `.agentdir/` should be added to the project or
|
|
@@ -248,8 +249,11 @@ Default adoption writes only local files:
|
|
|
248
249
|
Managed guidance is wrapped in AgentDir markers. Existing unmanaged content is
|
|
249
250
|
preserved where the target format supports managed blocks. The active hooks
|
|
250
251
|
directory is `.git/hooks` by default and follows `core.hooksPath` or linked
|
|
251
|
-
worktree configuration.
|
|
252
|
-
|
|
252
|
+
worktree configuration. Hook shims record events asynchronously in the
|
|
253
|
+
background so Git commits, pushes, checkouts, and merges do not stall; set
|
|
254
|
+
`AGENTDIR_HOOK_SYNC=1` when synchronous hook recording is needed. In rulesync
|
|
255
|
+
repos, the source rule replaces the listed project guidance files as the managed
|
|
256
|
+
source of truth.
|
|
253
257
|
|
|
254
258
|
## Git Worktrees
|
|
255
259
|
|
|
@@ -258,8 +262,11 @@ run inside a linked worktree resolve to the main working tree's `.agentdir`, so
|
|
|
258
262
|
evidence and memory from all worktrees stay searchable together instead of
|
|
259
263
|
fragmenting into one store per branch.
|
|
260
264
|
|
|
261
|
-
Each worktree
|
|
262
|
-
different worktrees
|
|
265
|
+
Each worktree keeps its own active session and workspace-scoped lifecycle
|
|
266
|
+
locks, so parallel agents in different worktrees can start, expand context, and
|
|
267
|
+
finish sessions concurrently without overwriting or blocking each other.
|
|
268
|
+
Contended locks fail cleanly after a bounded timeout (`10s` by default;
|
|
269
|
+
configurable with `AGENTDIR_LOCK_TIMEOUT`) instead of hanging indefinitely.
|
|
263
270
|
|
|
264
271
|
Agents should probe the resolved store instead of checking whether the current
|
|
265
272
|
checkout contains a physical `.agentdir`:
|
|
@@ -331,7 +338,10 @@ raw envelopes -> SQLite index -> memory/search/audit/report
|
|
|
331
338
|
directory layout. These files are the source of truth.
|
|
332
339
|
2. **Derived indexes**
|
|
333
340
|
SQLite indexes, search tables, memory passages, context packs, and audit
|
|
334
|
-
views are derived from the raw event files and can be rebuilt.
|
|
341
|
+
views are derived from the raw event files and can be rebuilt. SQLite runs in
|
|
342
|
+
WAL mode so concurrent readers and writers do not block each other, rebuilds
|
|
343
|
+
update healthy databases safely via online backup, and incremental updates
|
|
344
|
+
use per-mailbox `mtime` watermarks to skip unchanged directories on disk.
|
|
335
345
|
|
|
336
346
|
Default project layout:
|
|
337
347
|
|
|
@@ -556,8 +566,9 @@ summaries, while preserving source tiers, diversity limits, original retrieval
|
|
|
556
566
|
scores, current evidence, and the agent's review requirement. Derived session
|
|
557
567
|
summaries are not sent for scoring. Missing credentials, request failures,
|
|
558
568
|
malformed responses, or the three-second worker deadline retain local selection
|
|
559
|
-
and report a fallback reason. There are no retries.
|
|
560
|
-
|
|
569
|
+
and report a fallback reason. There are no retries. Context retrieval and the
|
|
570
|
+
optional Jev request run before `work start` acquires its commit locks, so the
|
|
571
|
+
worker deadline does not block other sessions or worktrees.
|
|
561
572
|
|
|
562
573
|
Context JSON and persisted manifests include `reranking` metadata: status,
|
|
563
574
|
model, rubric version, cutoff, candidate identities and sanitized-text hashes,
|
|
@@ -580,18 +591,46 @@ agentdir memory search --federated "release evidence"
|
|
|
580
591
|
|
|
581
592
|
Each repository remains the canonical owner of its own `.agentdir` store.
|
|
582
593
|
|
|
583
|
-
## Safety
|
|
584
|
-
|
|
585
|
-
AgentDir is local-first
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
-
|
|
593
|
-
|
|
594
|
-
|
|
594
|
+
## Safety & Sandboxing Scope
|
|
595
|
+
|
|
596
|
+
AgentDir is a local-first, cooperative flight recorder—not an execution sandbox
|
|
597
|
+
or a tamper-proof enforcement boundary. It records what agents choose to record,
|
|
598
|
+
sends nothing to a hosted AgentDir service, and complements rather than replaces
|
|
599
|
+
code review, sandboxing, or CI.
|
|
600
|
+
|
|
601
|
+
What AgentDir does:
|
|
602
|
+
|
|
603
|
+
- **Keeps raw envelopes recoverable.** Immutable local envelopes are the source
|
|
604
|
+
of truth; derived SQLite indexes can be rebuilt anytime.
|
|
605
|
+
- **Redacts common secrets before persistence.** Command arguments, captured
|
|
606
|
+
output, and emitted envelope subjects, headers, and bodies are scanned and
|
|
607
|
+
redacted before writing to disk (`--no-redact` disables this per run), with
|
|
608
|
+
`secrets scan` and `secrets redact --apply` for cleaning up older records.
|
|
609
|
+
- **Bounds captured output.** `agentdir run` caps stored stdout and stderr at
|
|
610
|
+
`--max-capture-bytes` (256 KiB per stream by default) and marks partial
|
|
611
|
+
evidence in session and claim audits.
|
|
612
|
+
- **Bounds runaway commands.** `agentdir run --timeout <seconds>` terminates
|
|
613
|
+
the command's process group after the deadline and records exit code `124`.
|
|
614
|
+
- **Supports opt-in environment scrubbing.** `agentdir run --scrub-env` strips
|
|
615
|
+
common credential environment variables from the child process without
|
|
616
|
+
modifying the parent shell environment:
|
|
617
|
+
- Case-insensitive suffixes (bare or `*_`-prefixed): `API_KEY`, `APIKEY`,
|
|
618
|
+
`TOKEN`, `SECRET`, `SECRET_KEY`, `ACCESS_KEY`, `ACCESS_KEY_ID`,
|
|
619
|
+
`PASSWORD`, `PASSWD`, `PASSPHRASE`, `PRIVATE_KEY`, `CREDENTIAL`,
|
|
620
|
+
`CREDENTIALS`, `AUTH_HEADER`, `AUTHORIZATION`.
|
|
621
|
+
- Prefixes: `OPENAI_*`, `ANTHROPIC_*`.
|
|
622
|
+
- Exact names: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,
|
|
623
|
+
`AWS_SESSION_TOKEN`, `AWS_SECURITY_TOKEN`, `DATABASE_URL`, `GH_TOKEN`,
|
|
624
|
+
`GITHUB_TOKEN`, `JEV_API_KEY`, `PGPASSWORD`, `TYPESAFE_API_KEY`.
|
|
625
|
+
- Standard runtime variables (`PATH`, `HOME`, `USER`, `TERM`, `SHELL`,
|
|
626
|
+
`LANG`, `LC_*`, `TMPDIR`, `VIRTUAL_ENV`, `PYTHONPATH`, `XDG_*`,
|
|
627
|
+
`SSH_AUTH_SOCK`, and `AGENTDIR_*` including `AGENTDIR_SESSION`) are
|
|
628
|
+
preserved.
|
|
629
|
+
- Event headers record only the scrubbed count (`X-AgentDir-Env-Scrubbed`)
|
|
630
|
+
and stripped variable names (`X-AgentDir-Env-Scrubbed-Keys`), never
|
|
631
|
+
values.
|
|
632
|
+
|
|
633
|
+
Useful health and cleanup commands:
|
|
595
634
|
|
|
596
635
|
```bash
|
|
597
636
|
agentdir doctor
|
|
@@ -600,14 +639,25 @@ agentdir secrets redact
|
|
|
600
639
|
agentdir secrets redact --apply
|
|
601
640
|
```
|
|
602
641
|
|
|
642
|
+
What AgentDir intentionally leaves to the outer environment:
|
|
643
|
+
|
|
644
|
+
- **Filesystem, network, process, and privilege isolation.** Use your agent
|
|
645
|
+
harness, container, or VM to restrict what commands can read, write, execute,
|
|
646
|
+
or reach over the network.
|
|
647
|
+
- **Mandatory or tamper-proof enforcement.** Wrapped commands still run as your
|
|
648
|
+
local user, and `.agentdir` stores plain files protected by local filesystem
|
|
649
|
+
permissions.
|
|
650
|
+
|
|
603
651
|
## Upgrade And Rollback
|
|
604
652
|
|
|
605
|
-
|
|
653
|
+
Update an existing install and refresh current repo adoption:
|
|
606
654
|
|
|
607
655
|
```bash
|
|
608
|
-
agentdir
|
|
656
|
+
agentdir update
|
|
609
657
|
```
|
|
610
658
|
|
|
659
|
+
(`agentdir --upgrade` remains supported as a legacy alias.)
|
|
660
|
+
|
|
611
661
|
Rollback to the previous stable release:
|
|
612
662
|
|
|
613
663
|
```bash
|
|
@@ -76,7 +76,7 @@ Useful variants:
|
|
|
76
76
|
```bash
|
|
77
77
|
agentdir update --install-skill none
|
|
78
78
|
agentdir update --no-adopt
|
|
79
|
-
agentdir update --version v0.
|
|
79
|
+
agentdir update --version v0.10.0
|
|
80
80
|
agentdir update --dry-run
|
|
81
81
|
```
|
|
82
82
|
|
|
@@ -110,19 +110,20 @@ agentdir work finish --json --brief
|
|
|
110
110
|
If you already have the wheel asset:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
AGENTDIR_WHEEL=/path/to/agentdir_cli-0.
|
|
113
|
+
AGENTDIR_WHEEL=/path/to/agentdir_cli-0.11.0-py3-none-any.whl bash scripts/install.sh
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
To force the virtual environment installer even when `pipx` is present:
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
AGENTDIR_FORCE_VENV=1 AGENTDIR_WHEEL=/path/to/agentdir_cli-0.
|
|
119
|
+
AGENTDIR_FORCE_VENV=1 AGENTDIR_WHEEL=/path/to/agentdir_cli-0.11.0-py3-none-any.whl bash scripts/install.sh
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
## Roll Back To The Previous Release
|
|
123
123
|
|
|
124
|
-
Rollback does not rely on the installed `agentdir` binary. It
|
|
125
|
-
installer
|
|
124
|
+
Rollback does not rely on the installed `agentdir` binary. It runs the current
|
|
125
|
+
installer targeting the requested GitHub Release tag and verifies the installed
|
|
126
|
+
version.
|
|
126
127
|
|
|
127
128
|
To return to the previous stable release:
|
|
128
129
|
|
|
@@ -133,13 +134,13 @@ curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollbac
|
|
|
133
134
|
To choose a specific release:
|
|
134
135
|
|
|
135
136
|
```bash
|
|
136
|
-
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash -s -- v0.
|
|
137
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/rollback.sh | bash -s -- v0.10.0
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
The equivalent manual rollback is:
|
|
140
141
|
|
|
141
142
|
```bash
|
|
142
|
-
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | AGENTDIR_VERSION=v0.
|
|
143
|
+
curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install.sh | AGENTDIR_VERSION=v0.10.0 bash
|
|
143
144
|
```
|
|
144
145
|
|
|
145
146
|
## Optional Extras
|
|
@@ -171,7 +172,6 @@ than setup weight:
|
|
|
171
172
|
```bash
|
|
172
173
|
pipx inject agentdir-cli 'agentdir-cli[semantic]'
|
|
173
174
|
agentdir memory embeddings configure fastembed # one-time model download
|
|
174
|
-
agentdir memory backend configure sqlite-vec # optional: faster large stores
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
Once FastEmbed is configured and importable, normal automatic callers fuse its
|
|
@@ -186,13 +186,14 @@ Reach for it when:
|
|
|
186
186
|
|
|
187
187
|
- queries are paraphrases rather than the recorded wording ("auth timeouts"
|
|
188
188
|
should match "login requests hang for 30s"),
|
|
189
|
-
- memory is federated across several repos with different vocabularies
|
|
190
|
-
- the store has grown past tens of thousands of passages and `sqlite-vec`
|
|
191
|
-
lookup speed starts to matter.
|
|
189
|
+
- memory is federated across several repos with different vocabularies.
|
|
192
190
|
|
|
193
191
|
Skip it for single-repo stores with recent, literally-worded memory; automatic
|
|
194
192
|
retrieval will continue using the built-in backend without a model download.
|
|
195
|
-
`agentdir memory backend
|
|
193
|
+
`agentdir memory backend list` shows which backends are active. Note that
|
|
194
|
+
`agentdir memory backend configure sqlite-vec` records backend configuration
|
|
195
|
+
intent, while `sqlite-vec` retrieval currently reports `not-implemented` and
|
|
196
|
+
active searches run on the built-in hybrid/FastEmbed SQLite index.
|
|
196
197
|
|
|
197
198
|
## Store Location Scopes
|
|
198
199
|
|
|
@@ -36,7 +36,7 @@ pi install git:github.com/jstxn/agentdir@<tag-or-commit>
|
|
|
36
36
|
If the npm package has been published:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
pi install npm:@jstxn/agentdir-pi@0.
|
|
39
|
+
pi install npm:@jstxn/agentdir-pi@0.11.0
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Use `pi config` to enable or disable the bundled skill after installation.
|
|
@@ -50,7 +50,7 @@ The root `package.json` declares the Pi resources:
|
|
|
50
50
|
"keywords": ["pi-package"],
|
|
51
51
|
"pi": {
|
|
52
52
|
"skills": ["./skills"],
|
|
53
|
-
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.
|
|
53
|
+
"image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.11.0/docs/assets/agentdir-overview.png"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
```
|
|
@@ -45,9 +45,9 @@ chmod +x dist/rollback-agentdir.sh
|
|
|
45
45
|
Expected assets (substitute the release version):
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
|
-
dist/agentdir_cli-0.
|
|
49
|
-
dist/agentdir_cli-0.
|
|
50
|
-
dist/jstxn-agentdir-pi-0.
|
|
48
|
+
dist/agentdir_cli-0.11.0-py3-none-any.whl
|
|
49
|
+
dist/agentdir_cli-0.11.0.tar.gz
|
|
50
|
+
dist/jstxn-agentdir-pi-0.11.0.tgz
|
|
51
51
|
dist/install-agentdir.sh
|
|
52
52
|
dist/rollback-agentdir.sh
|
|
53
53
|
```
|
|
@@ -55,19 +55,19 @@ dist/rollback-agentdir.sh
|
|
|
55
55
|
## Tag And Release
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
git tag -a v0.
|
|
58
|
+
git tag -a v0.11.0 -m "Release AgentDir v0.11.0"
|
|
59
59
|
git push origin main
|
|
60
|
-
git push origin v0.
|
|
60
|
+
git push origin v0.11.0
|
|
61
61
|
|
|
62
|
-
gh release create v0.
|
|
63
|
-
dist/agentdir_cli-0.
|
|
64
|
-
dist/agentdir_cli-0.
|
|
65
|
-
dist/jstxn-agentdir-pi-0.
|
|
62
|
+
gh release create v0.11.0 \
|
|
63
|
+
dist/agentdir_cli-0.11.0-py3-none-any.whl \
|
|
64
|
+
dist/agentdir_cli-0.11.0.tar.gz \
|
|
65
|
+
dist/jstxn-agentdir-pi-0.11.0.tgz \
|
|
66
66
|
dist/install-agentdir.sh \
|
|
67
67
|
dist/rollback-agentdir.sh \
|
|
68
68
|
--repo jstxn/agentdir \
|
|
69
|
-
--title "AgentDir v0.
|
|
70
|
-
--notes-file docs/releases/v0.
|
|
69
|
+
--title "AgentDir v0.11.0" \
|
|
70
|
+
--notes-file docs/releases/v0.11.0.md
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
Publishing the release triggers `publish.yml`, which rebuilds the sdist and
|
|
@@ -94,7 +94,7 @@ Use a disposable environment:
|
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
96
|
tmp="$(mktemp -d)"
|
|
97
|
-
gh release download v0.
|
|
97
|
+
gh release download v0.11.0 --repo jstxn/agentdir --pattern install-agentdir.sh --dir "$tmp"
|
|
98
98
|
AGENTDIR_PREFIX="$tmp/prefix" AGENTDIR_HOME="$tmp/home" AGENTDIR_FORCE_VENV=1 bash "$tmp/install-agentdir.sh"
|
|
99
99
|
"$tmp/prefix/bin/agentdir" --help
|
|
100
100
|
"$tmp/prefix/bin/agentdir" --version
|
|
@@ -130,13 +130,13 @@ tmp="$(mktemp -d)"
|
|
|
130
130
|
AGENTDIR_PREFIX="$tmp/prefix" \
|
|
131
131
|
AGENTDIR_HOME="$tmp/home" \
|
|
132
132
|
AGENTDIR_FORCE_VENV=1 \
|
|
133
|
-
AGENTDIR_WHEEL="$PWD/dist/agentdir_cli-0.
|
|
133
|
+
AGENTDIR_WHEEL="$PWD/dist/agentdir_cli-0.11.0-py3-none-any.whl" \
|
|
134
134
|
bash dist/install-agentdir.sh
|
|
135
135
|
|
|
136
136
|
AGENTDIR_PREFIX="$tmp/prefix" \
|
|
137
137
|
AGENTDIR_HOME="$tmp/home" \
|
|
138
138
|
AGENTDIR_FORCE_VENV=1 \
|
|
139
|
-
bash dist/rollback-agentdir.sh v0.
|
|
139
|
+
bash dist/rollback-agentdir.sh v0.10.0
|
|
140
140
|
|
|
141
141
|
"$tmp/prefix/bin/agentdir" --help
|
|
142
142
|
```
|
|
@@ -413,7 +413,7 @@ agentdir session ensure [--id <id>] [--title <title>]
|
|
|
413
413
|
agentdir session start [--id <id>] [--title <title>]
|
|
414
414
|
agentdir session current
|
|
415
415
|
agentdir session end [--summary <file-or-text>]
|
|
416
|
-
agentdir run [--session auto|require|create|<id>] [--name <tool>] [--timeout <seconds>] [--json] -- <command> [args...]
|
|
416
|
+
agentdir run [--session auto|require|create|<id>] [--name <tool>] [--timeout <seconds>] [--scrub-env] [--json] -- <command> [args...]
|
|
417
417
|
agentdir emit [--root <root>] [--scope <scope>] [--session <id>] --type <type> --body <file>
|
|
418
418
|
agentdir actor create [--root <root>] [--scope <scope>] <actor-id>
|
|
419
419
|
agentdir send [--root <root>] [--scope <scope>] --from <actor> --to <actor> --type <type> --body <file>
|
|
@@ -626,19 +626,37 @@ No new dependency should be added without an explicit decision record.
|
|
|
626
626
|
|
|
627
627
|
## 17. Security Model
|
|
628
628
|
|
|
629
|
-
|
|
629
|
+
### Security & Sandboxing Scope
|
|
630
|
+
|
|
631
|
+
AgentDir is a cooperative local flight recorder, not an execution sandbox or a tamper-proof enforcement boundary.
|
|
632
|
+
|
|
633
|
+
Responsibilities inside AgentDir:
|
|
630
634
|
|
|
631
635
|
- local filesystem permissions protect records
|
|
632
636
|
- AgentDir does not promise complete secret detection
|
|
633
637
|
- `agentdir run` avoids environment capture by default
|
|
634
|
-
- `agentdir run` redacts common secret-like patterns in stored command output
|
|
635
|
-
-
|
|
638
|
+
- `agentdir run` redacts common secret-like patterns in stored command arguments and output
|
|
639
|
+
- `agentdir run` bounds captured stdout and stderr per stream (`--max-capture-bytes`, 256 KiB default) and marks partial captures in evidence and audits
|
|
640
|
+
- `agentdir run --timeout <seconds>` terminates the wrapped command's process group after the deadline and records exit code `124`
|
|
641
|
+
- `agentdir run --scrub-env` opts in to stripping common credential environment variables from the child process without mutating the parent environment:
|
|
642
|
+
- case-insensitive suffixes (bare or `*_`-prefixed): `API_KEY`, `APIKEY`, `TOKEN`, `SECRET`, `SECRET_KEY`, `ACCESS_KEY`, `ACCESS_KEY_ID`, `PASSWORD`, `PASSWD`, `PASSPHRASE`, `PRIVATE_KEY`, `CREDENTIAL`, `CREDENTIALS`, `AUTH_HEADER`, `AUTHORIZATION`
|
|
643
|
+
- prefixes: `OPENAI_*`, `ANTHROPIC_*`
|
|
644
|
+
- exact names: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, `AWS_SECURITY_TOKEN`, `DATABASE_URL`, `GH_TOKEN`, `GITHUB_TOKEN`, `JEV_API_KEY`, `PGPASSWORD`, `TYPESAFE_API_KEY`
|
|
645
|
+
- preserves standard runtime variables (`PATH`, `HOME`, `USER`, `TERM`, `SHELL`, `LANG`, `LC_*`, `TMPDIR`, `VIRTUAL_ENV`, `PYTHONPATH`, `XDG_*`, `SSH_AUTH_SOCK`, and `AGENTDIR_*` including `AGENTDIR_SESSION`)
|
|
646
|
+
- records only the scrubbed count (`X-AgentDir-Env-Scrubbed`) and stripped variable names (`X-AgentDir-Env-Scrubbed-Keys`) in event headers, never values
|
|
647
|
+
- emitted envelope subjects, redactable headers, and bodies are redacted for common secret-like patterns before persistence
|
|
636
648
|
- `doctor` errors on persisted secret-like envelope bodies
|
|
637
649
|
- `agentdir secrets scan` reports only affected paths and pattern labels
|
|
638
650
|
- `agentdir secrets redact --apply` redacts affected bodies and rebuilds the derived index
|
|
639
651
|
- configurable redaction policy is future work
|
|
640
652
|
- signing and encryption are future work
|
|
641
653
|
|
|
654
|
+
Responsibilities intentionally left to the outer environment:
|
|
655
|
+
|
|
656
|
+
- filesystem, network, process, syscall, and privilege isolation belong to the surrounding agent harness, container, or VM
|
|
657
|
+
- wrapped commands run with the invoking user's local permissions and host access
|
|
658
|
+
- because envelopes live as plain files owned by that user, AgentDir relies on cooperative agents and local filesystem permissions rather than kernel-enforced tamper prevention
|
|
659
|
+
|
|
642
660
|
Future security features:
|
|
643
661
|
|
|
644
662
|
- signed envelopes
|
|
@@ -653,7 +671,7 @@ Future security features:
|
|
|
653
671
|
| --- | --- |
|
|
654
672
|
| Directory scan race | Idempotent indexing, duplicate detection, periodic rebuild. |
|
|
655
673
|
| Index drift | Raw envelopes canonical, rebuild command required. |
|
|
656
|
-
| Secret leakage | No environment capture by default, bounded command output, stored-output redaction, and `doctor` warnings. |
|
|
674
|
+
| Secret leakage | No environment capture by default, opt-in `--scrub-env` child filtering, bounded command output, stored-output redaction, and `doctor` warnings. |
|
|
657
675
|
| Overbuilt queue semantics | Task state is append-only, no distributed lease promise. |
|
|
658
676
|
| Large directory performance | Shard by session and actor. |
|
|
659
677
|
| Metadata inconsistency | Required header schema plus doctor command. |
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# AgentDir v0.11.0
|
|
2
|
+
|
|
3
|
+
AgentDir v0.11.0 improves concurrency across parallel worktrees and agents,
|
|
4
|
+
speeds up CLI commands, Git hooks, and incremental indexing, expands secret
|
|
5
|
+
redaction, and adds opt-in credential environment scrubbing for `agentdir run`.
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- **`agentdir run --scrub-env`:** Opt-in flag that strips common secret and
|
|
10
|
+
credential environment variables (`*_API_KEY`, `*_TOKEN`, `*_SECRET`,
|
|
11
|
+
`*_PASSWORD`, `AWS_*`, `OPENAI_*`, `ANTHROPIC_*`, `DATABASE_URL`, etc.) from
|
|
12
|
+
the child process without mutating the parent shell environment. Event headers
|
|
13
|
+
record only the scrubbed count and key names, never values.
|
|
14
|
+
- **SQLite WAL mode and incremental mailbox watermarks:** Derived indexes now
|
|
15
|
+
run in SQLite WAL mode with unified `busy_timeout` handling across query,
|
|
16
|
+
doctor, and index connections. Healthy rebuilds use SQLite online `backup()`
|
|
17
|
+
to preserve WAL mode and cached semantic embeddings, while corrupt-index
|
|
18
|
+
recovery cleans up stale sidecars before swapping. Incremental `index update`
|
|
19
|
+
tracks per-mailbox `mtime` watermarks to skip unchanged Maildir directories.
|
|
20
|
+
- **Workspace-scoped locks and bounded timeouts:** `work start`,
|
|
21
|
+
`work context --expand`, and `work finish` now scope lifecycle locks by
|
|
22
|
+
canonical workspace so linked Git worktrees sharing one `.agentdir` store run
|
|
23
|
+
concurrently without serializing each other. Contended locks fail cleanly with
|
|
24
|
+
`AgentDirStateError` after a bounded timeout (`10s` by default; configurable
|
|
25
|
+
via `AGENTDIR_LOCK_TIMEOUT`) instead of blocking indefinitely.
|
|
26
|
+
- **Non-blocking Git hooks:** Managed Git hook shims now record events in a
|
|
27
|
+
detached background subshell by default so commits, pushes, checkouts, and
|
|
28
|
+
merges do not stall. Set `AGENTDIR_HOOK_SYNC=1` when synchronous recording is
|
|
29
|
+
needed.
|
|
30
|
+
- **Explicit safety and sandboxing scope docs:** Added a dedicated section in
|
|
31
|
+
`README.md` and `docs/TECH_BRIEF.md` clarifying that AgentDir is a cooperative
|
|
32
|
+
local flight recorder rather than an execution sandbox.
|
|
33
|
+
|
|
34
|
+
## Improved
|
|
35
|
+
|
|
36
|
+
- **Faster CLI startup:** `agentdir` lazily imports command dependencies so
|
|
37
|
+
lightweight commands (`--version`, `root --require`, `emit`, `run`,
|
|
38
|
+
`hooks record`) avoid loading heavy subsystems on startup.
|
|
39
|
+
- **Unlocked context retrieval in `work start`:** `update_index()` and
|
|
40
|
+
`build_context_pack()` (including FastEmbed and optional Jev requests) now run
|
|
41
|
+
before `work start` acquires commit locks, keeping lock hold times short.
|
|
42
|
+
- **Declarative integration and environment registries:** Replaced scattered
|
|
43
|
+
per-tool branching in `skills.py` and `environment.py` with declarative
|
|
44
|
+
`IntegrationSpec`, `RuleGeneratorSpec`, and `HookManagerSpec` tables.
|
|
45
|
+
|
|
46
|
+
## Security and Reliability Fixes
|
|
47
|
+
|
|
48
|
+
- **Expanded secret redaction:** Added detection for `Authorization: Bearer`
|
|
49
|
+
tokens, standalone `sk-...` API keys, `SECRET_KEY` / `SECRET_ACCESS_KEY`
|
|
50
|
+
variants, PGP private key blocks, and JSON-escaped private keys. Fixed
|
|
51
|
+
truncated private keys so they no longer swallow trailing non-key logs, and
|
|
52
|
+
added cleanup for partially redacted keys left by older AgentDir versions.
|
|
53
|
+
- **Hardening and scaling fixes (#22):** Validated Git hook names and quoted
|
|
54
|
+
hook shim arguments, enforced project-root containment against symlink
|
|
55
|
+
traversal in integration and gitignore writes, hardened artifact SHA-256 path
|
|
56
|
+
validation and streaming hashing in `doctor`, improved daemon lock/PID
|
|
57
|
+
liveness handling, and fixed session, context, and upgrade edge cases.
|
|
58
|
+
- **Async hook session safety:** Serialized `record_hook_event()` across
|
|
59
|
+
ephemeral session creation, event emission, and session end under the
|
|
60
|
+
workspace session-pointer lock so detached background hooks cannot race with a
|
|
61
|
+
concurrent `work start`.
|
|
62
|
+
|
|
63
|
+
## Compatibility
|
|
64
|
+
|
|
65
|
+
- Existing v3 `.agentdir` stores upgrade automatically on the next
|
|
66
|
+
`agentdir index update` or `agentdir status`; no manual migration is required.
|
|
67
|
+
- Run `agentdir hooks install` in existing adopted repositories (or
|
|
68
|
+
`agentdir update`) to refresh Git hook shims to the new non-blocking version.
|
|
69
|
+
- The public installer defaults to `v0.11.0`. The bundled rollback script
|
|
70
|
+
defaults to `v0.10.0`.
|
|
71
|
+
|
|
72
|
+
## Upgrade
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
agentdir update
|
|
76
|
+
```
|