@evoclock/pi-agentic-driver 0.4.3 → 0.6.0
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/PROVENANCE.md +5 -0
- package/README.md +336 -190
- package/config/microvm-target.v1.example.json +5 -0
- package/config/microvm-target.v1.json +5 -0
- package/extensions/herdr-dispatch.ts +27 -0
- package/extensions/linux-microvm.ts +11 -7
- package/package.json +31 -2
- package/scripts/enforcement/guest_containment_taxonomy.v1.json +26 -0
- package/scripts/enforcement/herdr_async_dispatch_pi.js +402 -0
- package/scripts/enforcement/linux_microvm_cutover_pi.js +512 -56
- package/scripts/enforcement/linux_microvm_remote_fixture.sh +2418 -19
package/README.md
CHANGED
|
@@ -1,71 +1,87 @@
|
|
|
1
|
-
# pi-agentic-driver v0.
|
|
1
|
+
# pi-agentic-driver v0.6.0
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="assets/Yamagane-origami.png" alt="pi-agentic-driver
|
|
4
|
+
<img src="assets/Yamagane-origami.png" alt="pi-agentic-driver, Yamagane origami mark" width="140"/>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL%20v3-blue?style=flat" alt="License: AGPL v3"/></a>
|
|
9
|
-
<img src="https://img.shields.io/
|
|
9
|
+
<a href="https://www.npmjs.com/package/@evoclock/pi-agentic-driver"><img src="https://img.shields.io/npm/v/@evoclock/pi-agentic-driver?style=flat" alt="npm version"/></a>
|
|
10
|
+
<img src="https://img.shields.io/badge/version-0.6.0-blue?style=flat" alt="Version 0.6.0"/>
|
|
10
11
|
<img src="https://img.shields.io/badge/status-active%20development%20%26%20testing-orange?style=flat" alt="Status"/>
|
|
11
12
|
<img src="https://img.shields.io/badge/JavaScript-F7DF1E?style=flat&logo=javascript&logoColor=black" alt="JavaScript"/>
|
|
12
13
|
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white" alt="TypeScript"/>
|
|
13
14
|
<img src="https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white" alt="Python"/>
|
|
14
15
|
</p>
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
success without evidence. Pi is
|
|
19
|
-
|
|
17
|
+
An agent without guardrails will rewrite code an existing abstraction already
|
|
18
|
+
covers. It will ship to the wrong remote. It will lose context and report
|
|
19
|
+
success without evidence. Pi is deliberately lean by design: the harness is yours to
|
|
20
|
+
shape. That philosophy is exactly what these extensions practice, they make them mine (and possibly yours too). They take
|
|
21
|
+
some concerns I consider worth addressing, and make them part of the
|
|
22
|
+
harness.
|
|
20
23
|
|
|
21
|
-
**pi-agentic-driver
|
|
22
|
-
work
|
|
23
|
-
before
|
|
24
|
+
**pi-agentic-driver makes agent work verifiable and controllable. The agent does
|
|
25
|
+
the work and each extension makes sure the work can be checked.** Review happens
|
|
26
|
+
before code is written. Communication carries reports without asserting authority that isn't granted.
|
|
24
27
|
Isolation proofs verify their own cleanup. Sessions survive compaction and
|
|
25
|
-
|
|
28
|
+
Git operations stay exact, confirmed, and protected.
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
checks, and independent model review before release.
|
|
29
|
-
extension's restrictions before release.
|
|
30
|
+
Every capability passes fixture-based acceptance, native tests, live-session
|
|
31
|
+
checks, and independent model review before release. I/we document each
|
|
32
|
+
extension's restrictions before release, not after.
|
|
30
33
|
|
|
31
34
|
Extensions for [Pi](https://github.com/earendil-works/pi-coding-agent):
|
|
32
|
-
advisory code review,
|
|
35
|
+
advisory code review, controlled role communication, and governed isolation
|
|
33
36
|
proofs for agentic workflows.
|
|
34
37
|
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="assets/agentic-driver-full-color.gif" alt="Full-color Agentic Driver control vault" width="768">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## Shipped features
|
|
43
|
+
|
|
44
|
+
| Tool | What it does | Status |
|
|
45
|
+
|------|--------------|--------|
|
|
46
|
+
| `code_phage` | Reviews a plan against a stated goal before code is written and advises your agent. | shipped |
|
|
47
|
+
| `agentic_herdr_communication` | Exchanges marked reports with worker agents; never grants authority. | shipped |
|
|
48
|
+
| `agentic_herdr_spawn_worker` | Starts one Pi worker in a pane or tab, with native confirmation. | shipped |
|
|
49
|
+
| `agentic_aidr` | A remedy for AI;DR. Reviews writing for clarity, simplicity, brevity, and humanity. | shipped |
|
|
50
|
+
| `agentic_linux_microvm_cutover` | Runs one job in a throwaway QEMU/KVM virtual machine on a Linux host, with a severity-tiered killswitch that stops escape attempts. | user-enabled, native confirmation |
|
|
51
|
+
| `agentic_worker_dispatch` | Runs controlled worker journeys and observes worker liveness. | shipped |
|
|
52
|
+
|
|
35
53
|
**Status: active development and testing.** Each extension ships only after
|
|
36
54
|
it passes fixture-based acceptance, native tests, live-session checks, and
|
|
37
|
-
independent model review. You can install released components.
|
|
38
|
-
|
|
55
|
+
independent model review. You can install released components. Pending
|
|
56
|
+
components are listed here for transparency and are not packaged.
|
|
39
57
|
|
|
40
|
-
##
|
|
58
|
+
## Code review and planning
|
|
41
59
|
|
|
42
|
-
*Extensions that review, route, and
|
|
60
|
+
*Extensions that review, route, and control what an agent does.*
|
|
43
61
|
|
|
44
62
|
<details>
|
|
45
|
-
<summary><strong>code-phage
|
|
63
|
+
<summary><strong>code-phage, advisory code review</strong> <em>(released, 0.1.1)</em></summary>
|
|
46
64
|
|
|
47
65
|
`code_phage` reviews a proposed change against a stated goal before the agent
|
|
48
|
-
writes or commits code.
|
|
49
|
-
and test paths
|
|
66
|
+
writes or commits code. Give it a goal, candidate files, accepted
|
|
67
|
+
requirements, and test paths. It will:
|
|
50
68
|
|
|
51
|
-
- **
|
|
52
|
-
signatures, and dependency imports against a repository inventory, so
|
|
69
|
+
- **Find prior art structurally.** It matches exported symbols, function
|
|
70
|
+
signatures, and dependency imports against a repository inventory, so the
|
|
53
71
|
agent reuses an existing abstraction instead of writing a parallel version.
|
|
54
|
-
Word overlap alone never counts.
|
|
55
|
-
|
|
56
|
-
- **
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- **
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- **Stays advisory** — it never mutates files, creates tasks, grants
|
|
68
|
-
authority, or blocks work; every result states `advisoryOnly: true`.
|
|
72
|
+
Word overlap alone never counts. When prior art informs the result, the
|
|
73
|
+
implementation records its source, version, and license.
|
|
74
|
+
- **Bind an implementation budget.** Goal, requirements, write set, and tests
|
|
75
|
+
become one reviewable budget. Coverage checks flag requirements nothing
|
|
76
|
+
binds and tests nothing covers.
|
|
77
|
+
- **Measure diagnostic signals.** Cognitive and cyclomatic complexity, line
|
|
78
|
+
counts, duplication, module-level mutable state, dependencies, test burden.
|
|
79
|
+
These are signals for human judgment, never rejection thresholds.
|
|
80
|
+
- **Redirect scope drift.** It names the files that support no accepted
|
|
81
|
+
requirement and recommends the smallest coherent write set. The deletion
|
|
82
|
+
test guards justified complexity: what would fail if we removed this?
|
|
83
|
+
- **Stay advisory.** It never mutates files, creates tasks, grants authority,
|
|
84
|
+
or blocks work. Every result says `advisoryOnly: true`.
|
|
69
85
|
|
|
70
86
|
Concept credit: Matty Stratton, "Cognitive Complexity" (2024-09-20, concept
|
|
71
87
|
only, no code copied); `flake8-cognitive-complexity` 0.1.0, MIT (concept
|
|
@@ -73,70 +89,63 @@ only, not a runtime dependency).
|
|
|
73
89
|
|
|
74
90
|
</details>
|
|
75
91
|
|
|
76
|
-
**Under development in this theme:**
|
|
77
92
|
|
|
78
|
-
- **prompted planning lifecycle
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- **native assignment selection
|
|
93
|
+
- **prompted planning lifecycle.** Natural-language goals become complete
|
|
94
|
+
semantic proposals with parent and scope choices at native boundaries. No
|
|
95
|
+
retry loops, no model-supplied identifiers.
|
|
96
|
+
- **native assignment selection.** Planned assignments are chosen through a
|
|
82
97
|
native UI over derived candidates, never by model-supplied targets.
|
|
83
|
-
- **inventory refresh
|
|
98
|
+
- **inventory refresh.** Git-aware codebase inventory regeneration with
|
|
84
99
|
verification receipts, so prior-art matching stays honest.
|
|
85
100
|
|
|
86
|
-
##
|
|
101
|
+
## Multi-agent communication
|
|
87
102
|
|
|
88
|
-
*Extensions for
|
|
103
|
+
*Extensions for controlled coordination between agents.*
|
|
89
104
|
|
|
90
105
|
<details>
|
|
91
|
-
<summary><strong>herdr-communication
|
|
92
|
-
|
|
93
|
-
`agentic_herdr_communication` exchanges
|
|
94
|
-
configured Pi worker roles running under [Herdr](https://herdr.dev/)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- **
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- **Scales to many workers** — the trusted registry accepts up to 32
|
|
113
|
-
worker repositories, and any dynamic non-coordinator role within them
|
|
114
|
-
is eligible; `list` observes every live agent in one call. Fan-out is
|
|
115
|
-
sequential by design: one role per prompt, one complete exchange, no
|
|
116
|
-
broadcast primitive.
|
|
106
|
+
<summary><strong>herdr-communication, controlled role communication</strong> <em>(released, 0.2.1)</em></summary>
|
|
107
|
+
|
|
108
|
+
`agentic_herdr_communication` exchanges controlled, marked reports with
|
|
109
|
+
configured Pi worker roles running under [Herdr](https://herdr.dev/) 0.8.2.
|
|
110
|
+
|
|
111
|
+
- **List and observe.** Worker roles are filtered to trusted repositories: a
|
|
112
|
+
checked-in registry plus canonical-path validation. Unlisted or
|
|
113
|
+
symlink-escaped repositories are denied.
|
|
114
|
+
- **Prompt exactly once.** The tool re-observes the role, sends one approved
|
|
115
|
+
prompt with a role-specific report contract, waits for terminal settlement,
|
|
116
|
+
and reads exactly one complete marked report. No retry, no target
|
|
117
|
+
substitution, no resend on timeout.
|
|
118
|
+
- **Wait and read.** The same trust checks apply to partial journeys.
|
|
119
|
+
- **Grant nothing.** Fixed argv, `shell: false`, a pinned executable, the
|
|
120
|
+
coordinator role class denied. Results come back as untrusted evidence. The
|
|
121
|
+
tool cannot control panes, start agents, run shells, or create authority.
|
|
122
|
+
- **Scale to many workers.** The trusted registry accepts up to 32 worker
|
|
123
|
+
repositories, and any dynamic non-coordinator role within them is eligible.
|
|
124
|
+
Fan-out is sequential by design: one role per prompt, one complete
|
|
125
|
+
exchange, no broadcast primitive.
|
|
117
126
|
|
|
118
127
|
</details>
|
|
119
128
|
|
|
120
129
|
<details>
|
|
121
|
-
<summary><strong>herdr-lifecycle
|
|
130
|
+
<summary><strong>herdr-lifecycle, role-labelled worker dispatch</strong> <em>(released, 0.2.1)</em></summary>
|
|
122
131
|
|
|
123
132
|
`agentic_herdr_spawn_worker` turns one natural-language request into Herdr's
|
|
124
|
-
native
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
native lifecycle. Choose a placement (`right`, `below`, or `tab`), a safe role
|
|
134
|
+
label, a model from the active Pi model roster, and a trusted repository. The
|
|
135
|
+
extension:
|
|
127
136
|
|
|
128
|
-
- creates
|
|
129
|
-
- starts exactly one Pi agent in
|
|
130
|
-
- verifies the role, model arguments, pane identity and canonical repository;
|
|
137
|
+
- creates the split pane or labelled tab;
|
|
138
|
+
- starts exactly one Pi agent in it;
|
|
139
|
+
- verifies the role, model arguments, pane identity, and canonical repository;
|
|
131
140
|
- requires native confirmation before changing layout or starting a process;
|
|
132
|
-
- uses fixed argv with `shell: false
|
|
141
|
+
- uses fixed argv with `shell: false` and no arbitrary Herdr or shell surface;
|
|
133
142
|
- returns explicit `pane_created`, `tab_created`, or `agent_started` partial
|
|
134
143
|
states when only part of the operation succeeds; and
|
|
135
144
|
- never retries, moves, closes, or deletes created state automatically.
|
|
136
145
|
|
|
137
146
|

|
|
138
147
|
|
|
139
|
-
The same request can place a worker below the coordinator or
|
|
148
|
+
The same request can place a worker below the coordinator or keep it in an
|
|
140
149
|
individual tab:
|
|
141
150
|
|
|
142
151
|
<p>
|
|
@@ -145,127 +154,233 @@ individual tab:
|
|
|
145
154
|
</p>
|
|
146
155
|
|
|
147
156
|
See [Dispatching a Multi-Model Workforce from Anywhere](https://evoclock.github.io/fieldnotes/articles/herdr-natural-language-agent-automation.html)
|
|
148
|
-
for the wider task
|
|
157
|
+
for the wider task and model-routing workflow.
|
|
158
|
+
|
|
159
|
+
</details>
|
|
160
|
+
|
|
161
|
+
<details>
|
|
162
|
+
<summary><strong>herdr-dispatch, continuous worker journeys</strong> <em>(released, 0.5.0)</em></summary>
|
|
163
|
+
|
|
164
|
+
`agentic_worker_dispatch` runs controlled worker journeys and observes worker
|
|
165
|
+
liveness. Two actions:
|
|
166
|
+
|
|
167
|
+
- **pulse** reports whether a worker role is alive, its current state, and
|
|
168
|
+
whether it is dispatch-eligible.
|
|
169
|
+
- **dispatch** runs one journey. The worker works through the existing task
|
|
170
|
+
sequence, one prompt-and-report exchange per task, at most `maxSteps`
|
|
171
|
+
steps (default 50, cap 200).
|
|
172
|
+
|
|
173
|
+
Continuous mode is the default: the journey keeps going until the worker
|
|
174
|
+
finishes the queue or reaches the step bound. Turn-by-turn mode stops after
|
|
175
|
+
each step and is explicit opt-in. Each journey emits one collated marked
|
|
176
|
+
report covering every step.
|
|
177
|
+
|
|
178
|
+
A worker that never reaches idle across the observed exchange cycle ends the
|
|
179
|
+
journey with an explicit unresponsive state. You can then spawn a replacement
|
|
180
|
+
through the guarded lifecycle boundary. The replacement resumes the same
|
|
181
|
+
pending tasks, reuses existing task cards, and never duplicates them. The
|
|
182
|
+
stuck exchange is never resent to the same worker.
|
|
183
|
+
|
|
184
|
+
Journeys never create, own, or complete task cards themselves, never retry
|
|
185
|
+
silently, and return results as untrusted evidence.
|
|
149
186
|
|
|
150
187
|
</details>
|
|
151
188
|
|
|
152
|
-
**Under development in this theme:**
|
|
153
189
|
|
|
154
|
-
- **project status and state review
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
model substitution. Routing grants no dispatch or shell authority.
|
|
164
|
-
- **worker pulse** — liveness observation and dispatch-eligibility
|
|
165
|
-
observation across role lanes: which agents are alive, what state they
|
|
166
|
-
are in, and what is ready for work. This observation grants no authority;
|
|
167
|
-
the system cannot dispatch planned work without it.
|
|
168
|
-
- **task-ledger integration for planned work** — agents read and act
|
|
169
|
-
within the task ledger's card states (what is dispatchable, in progress,
|
|
170
|
-
blocked) without owning board authority: no admission, completion,
|
|
190
|
+
- **project status and state review.** Read-only projections of workspace Git
|
|
191
|
+
state, formal records, and task-state health.
|
|
192
|
+
- **role-lane routing and warm sessions.** Separate lanes handle
|
|
193
|
+
implementation, planning, and review, and the router prefers a warm session
|
|
194
|
+
so context and cache survive across tasks. Route affinity is an
|
|
195
|
+
optimisation, never authority: an incompatible lane yields an explicit
|
|
196
|
+
review-required result, never silent model substitution.
|
|
197
|
+
- **task-ledger integration.** Agents read and act within the task ledger's
|
|
198
|
+
card states without owning board authority: no admission, completion,
|
|
171
199
|
reconciliation, or migration by the agent itself.
|
|
172
200
|
|
|
173
201
|
## Writing clearly
|
|
174
202
|
|
|
175
|
-
*AI;DR (AI; Didn't Read) keeps technical writing clear without flattening the
|
|
203
|
+
*AI;DR (AI; Didn't Read) keeps technical writing clear without flattening the
|
|
204
|
+
writer's voice.*
|
|
176
205
|
|
|
177
206
|
<details>
|
|
178
|
-
<summary><strong>AI;DR
|
|
207
|
+
<summary><strong>AI;DR, writing review</strong> <em>(released, 0.4.2)</em></summary>
|
|
179
208
|
|
|
180
209
|
`agentic_aidr` reviews the last assistant response, supplied prose, or a
|
|
181
|
-
Markdown
|
|
210
|
+
Markdown file. It checks four principles:
|
|
182
211
|
|
|
183
|
-
- **Clarity
|
|
184
|
-
- **Simplicity
|
|
185
|
-
- **Brevity
|
|
186
|
-
- **Humanity
|
|
212
|
+
- **Clarity.** Each sentence carries one useful idea.
|
|
213
|
+
- **Simplicity.** Clutter, pompous phrases, and needless jargon go.
|
|
214
|
+
- **Brevity.** Fewer words when they carry the same meaning.
|
|
215
|
+
- **Humanity.** An authentic human voice stays.
|
|
187
216
|
|
|
188
|
-
The `simple` and `ste` modes
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
217
|
+
The `simple` and `ste` modes add an ASD-STE100-informed profile: sentence
|
|
218
|
+
length, direct word choice, precise verbs, and clear requirements,
|
|
219
|
+
permissions, abilities, and conditions. It targets 20 words per procedural
|
|
220
|
+
sentence and 25 per descriptive one, and returns the rule and an example for
|
|
221
|
+
each finding.
|
|
193
222
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
Check final text against the licensed specification and your project
|
|
198
|
-
terminology list.
|
|
223
|
+
The profile is advisory. It does not include the licensed ASD-STE100
|
|
224
|
+
approved-word dictionary and does not certify conformance. Check final text
|
|
225
|
+
against the licensed specification and your project terminology list.
|
|
199
226
|
|
|
200
227
|
AI;DR also flags dense paragraphs, suggests bullets when they reduce working
|
|
201
228
|
memory load, and supports plain-language and analogy modes. Review is
|
|
202
|
-
read-only. An explicit file apply action shows a
|
|
203
|
-
exact
|
|
204
|
-
|
|
229
|
+
read-only. An explicit file apply action shows a git diff and writes the
|
|
230
|
+
exact replacement only after native confirmation. Release 0.4.2 adds controlled
|
|
231
|
+
inputs, atomic replacement, drift checks, and exact write verification.
|
|
205
232
|
|
|
206
233
|
</details>
|
|
207
234
|
|
|
208
|
-
##
|
|
235
|
+
## Sandboxed execution
|
|
209
236
|
|
|
210
|
-
*Extensions that
|
|
237
|
+
*Extensions that run agent jobs in a sealed environment and prove it.*
|
|
211
238
|
|
|
212
|
-
**
|
|
239
|
+
**Available in this release:**
|
|
213
240
|
|
|
214
241
|
<details>
|
|
215
|
-
<summary><strong>microVM
|
|
216
|
-
|
|
217
|
-
`agentic_linux_microvm_cutover`
|
|
218
|
-
QEMU/KVM
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
242
|
+
<summary><strong>microVM isolation</strong> <em>(user-enabled, native confirmation)</em></summary>
|
|
243
|
+
|
|
244
|
+
The `agentic_linux_microvm_cutover` tool runs a single job inside a throwaway
|
|
245
|
+
QEMU/KVM virtual machine on a Linux host. The job cannot reach the host, the
|
|
246
|
+
network, or anything else outside the machine. The system deletes the machine
|
|
247
|
+
after the job ends.
|
|
248
|
+
|
|
249
|
+
Isolation is off at the start of every session. You turn it on with
|
|
250
|
+
`/agentic-isolation-enable` in the Pi TUI, and confirm. The model cannot run
|
|
251
|
+
that command. Every cutover run asks for its own confirmation too. Nothing is
|
|
252
|
+
saved to settings, and headless sessions stay blocked.
|
|
253
|
+
|
|
254
|
+
### You choose the machine
|
|
255
|
+
|
|
256
|
+
The model can only relay your words. Saving a target, or running on one,
|
|
257
|
+
always requires your confirmation dialog first.
|
|
258
|
+
|
|
259
|
+
1. Tell the agent where to run the proof, for example "run the microVM proof
|
|
260
|
+
on deploy@192.168.1.50" or "run it on this machine". The first run asks
|
|
261
|
+
you to confirm. Your Yes saves the choice to your Pi config and the run
|
|
262
|
+
continues.
|
|
263
|
+
2. Run `/agentic-isolation-enable` and confirm.
|
|
264
|
+
3. Each cutover run asks for its own confirmation. Later runs reuse the saved
|
|
265
|
+
target without asking where the microVM runs again.
|
|
266
|
+
|
|
267
|
+
The tool discovers the technical details from the machine itself:
|
|
268
|
+
architecture, kernel, libvirt driver. You configure nothing. Before any run,
|
|
269
|
+
the probe checks three requirements: `/dev/kvm` is accessible, libvirt
|
|
270
|
+
reports the system-level driver, and a matching `qemu-system-<arch>` binary
|
|
271
|
+
exists. A failed check denies the run before anything happens. The shipped
|
|
272
|
+
fixture guest is x86_64-built, so the full proof currently needs an x86_64
|
|
273
|
+
KVM host.
|
|
274
|
+
|
|
275
|
+
### What example tests look like
|
|
276
|
+
|
|
277
|
+
We started with one payload: print a greeting, then call a network tool. The
|
|
278
|
+
greeting printed, the tool tripped the killswitch at the HIGH tier, and the
|
|
279
|
+
line after it never ran. A kill report landed in the state directory naming
|
|
280
|
+
the rule and tier, and the teardown proof showed the machine was gone with
|
|
281
|
+
nothing left behind.
|
|
282
|
+
|
|
283
|
+
From there we wrote a payload for every rule in the taxonomy: credential
|
|
284
|
+
probing behind chained commands, secret dumping inside subshells, package
|
|
285
|
+
installs, coordination files reaching for other agents, a forged receipt, a
|
|
286
|
+
write to the evidence channel, and ten unclassified commands in a row to push
|
|
287
|
+
the anomaly threshold to its limit.
|
|
288
|
+
|
|
289
|
+
The guest had no disk, no network, no host share, no credentials, and no GPU.
|
|
290
|
+
Nothing outside the kernel's virtual filesystems could be mounted. Every
|
|
291
|
+
attempt was denied and written to a log that survived the machine.
|
|
292
|
+
|
|
293
|
+
While this is a toy test of sorts my own personal work will be running on
|
|
294
|
+
these as well.
|
|
295
|
+
|
|
296
|
+
### What the containment layer defends against
|
|
297
|
+
|
|
298
|
+
Agent escapes tend to follow a playbook, and the published incidents from
|
|
299
|
+
frontier labs (the HuggingFace incident among them) read like one: grab
|
|
300
|
+
credentials, phone home, install something persistent, rewrite your tools,
|
|
301
|
+
stage payloads in caches, look for other agents to recruit, clean up the
|
|
302
|
+
evidence. The containment layer has a rule for each step:
|
|
303
|
+
|
|
304
|
+
- **Credential theft.** Reading SSH, cloud, or token material, or dumping
|
|
305
|
+
environment secrets, ends the session immediately.
|
|
306
|
+
- **Exfiltration and remote control.** Any network tool, any socket, ends the
|
|
307
|
+
session immediately.
|
|
308
|
+
- **Persistence through dependencies.** Package installs, registry writes,
|
|
309
|
+
and manifest tampering are denied and counted. Repeat the attempt and the
|
|
310
|
+
session ends.
|
|
311
|
+
- **Self-modification.** Rewriting the agent's own tools or the monitoring
|
|
312
|
+
layer is denied and counted.
|
|
313
|
+
- **Payload staging.** Growth in cache and package directories is sampled by
|
|
314
|
+
size; repeated growth ends the session.
|
|
315
|
+
- **Cross-agent escalation.** Coordination channels and shared paths used to
|
|
316
|
+
reach other agents end the session immediately.
|
|
317
|
+
- **Evidence tampering.** Editing logs, forging receipts, or writing to the
|
|
318
|
+
console channel ends the session immediately.
|
|
319
|
+
- **Reconnaissance.** Probing the sandbox to learn whether it is watched is
|
|
320
|
+
counted into a concealment index that ships in the run receipt.
|
|
321
|
+
|
|
322
|
+
Denials are written to a tamper-evident, digest-chained log that outlives the
|
|
323
|
+
session, and a trip produces a kill report naming what happened, with proof
|
|
324
|
+
that the cleanup completed.
|
|
325
|
+
|
|
326
|
+
### Proven against real machines
|
|
327
|
+
|
|
328
|
+
Every rule above has been run against a real QEMU/KVM guest with a payload
|
|
329
|
+
built to trigger it. The kill switches fired where they should, the denials
|
|
330
|
+
stopped the jobs, and the cleanup held. One boundary is worth stating: two
|
|
331
|
+
rules watch the same directories by design, and together they are stricter
|
|
332
|
+
than either alone, so the growth-sampling trip is covered by automated tests
|
|
333
|
+
rather than a live run.
|
|
334
|
+
|
|
335
|
+
The repository carries an acceptance matrix of 79 scenarios, one executable
|
|
336
|
+
test per row, covering every rule, every way a command can be invoked, and
|
|
337
|
+
every threshold boundary. It grows as new scenarios come to light.
|
|
338
|
+
|
|
339
|
+
### A note on review quality
|
|
340
|
+
|
|
341
|
+
A quantized GLM-5.3-Flash model running locally on an NVIDIA DGX Spark
|
|
342
|
+
reviewed this work alongside two frontier reviews at high reasoning. The
|
|
343
|
+
local model matched their coverage and found one issue they all missed.
|
|
344
|
+
Small models on your own desk are worth taking seriously as reviewers.
|
|
225
345
|
|
|
226
346
|
</details>
|
|
227
347
|
|
|
228
348
|
**Under development in this theme:**
|
|
229
349
|
|
|
230
|
-
- **native macOS container proof
|
|
231
|
-
passed a fixed local
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
the session continues, and the agent does not retry behind your back. In
|
|
241
|
-
headless runs where no human can confirm, the system refuses destructive
|
|
242
|
-
commands rather than silently allowing them.
|
|
350
|
+
- **native macOS container proof.** The native Apple Container runtime has
|
|
351
|
+
passed a fixed local isolation qualification: read-only repository mount,
|
|
352
|
+
no network, automatic removal. The native Pi adapter is not yet part of the
|
|
353
|
+
released package.
|
|
354
|
+
- **attended-authority guard.** The safety net between an agent and your
|
|
355
|
+
shell. When a model tries to delete, overwrite, or push, the guard stops it
|
|
356
|
+
and asks you. Safe commands pass through untouched. If you deny, you get a
|
|
357
|
+
clear reason and the session continues, and the agent does not retry behind
|
|
358
|
+
your back. In headless runs where no human can confirm, destructive
|
|
359
|
+
commands are refused rather than silently allowed.
|
|
243
360
|
|
|
244
|
-
##
|
|
361
|
+
## Session continuity
|
|
245
362
|
|
|
246
|
-
*
|
|
363
|
+
*Managing context pressure, compaction, and avoiding lossy handover.*
|
|
247
364
|
|
|
248
365
|
**In development:**
|
|
249
366
|
|
|
250
|
-
- **context-pressure handling
|
|
251
|
-
compaction completion without cancellation loops, and continuation of
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
repeated compactions; designed as an optional add-on, not yet
|
|
257
|
-
implemented.
|
|
367
|
+
- **context-pressure handling.** Pressure detection, non-lossy handover,
|
|
368
|
+
compaction completion without cancellation loops, and continuation of the
|
|
369
|
+
latest user goal. Development-only until the full live journey passes.
|
|
370
|
+
- **lossless session-reference compaction.** Selective, lossless retrieval of
|
|
371
|
+
exact pre-compaction content, addressing factual degradation across
|
|
372
|
+
repeated compactions. Designed as an optional add-on, not yet implemented.
|
|
258
373
|
|
|
259
374
|
**Planned in this theme:**
|
|
260
375
|
|
|
261
|
-
- **handover, checkpoint, and recovery
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
- **evidence ledger
|
|
376
|
+
- **handover, checkpoint, and recovery.** Durable repository-local handover
|
|
377
|
+
notes, governed checkpoint mutation, watchdog handoff, and fresh-session
|
|
378
|
+
resumption that identifies goal, changed files, checks, and next step
|
|
379
|
+
without executing anything.
|
|
380
|
+
- **evidence ledger.** Deterministic evidence indexing, lossless source
|
|
266
381
|
projection, universal checkpoint produce/store/recover, and run-ledger
|
|
267
382
|
records with crash and corruption vectors tested.
|
|
268
|
-
- **offline multihost evidence
|
|
383
|
+
- **offline multihost evidence.** Record run evidence on each host while
|
|
269
384
|
disconnected and reconcile it deterministically on reconnection, with no
|
|
270
385
|
host as sole authority.
|
|
271
386
|
|
|
@@ -275,50 +390,81 @@ activation remains deferred until the system enables those paths.
|
|
|
275
390
|
|
|
276
391
|
**In development:**
|
|
277
392
|
|
|
278
|
-
- **git workflow safeguards
|
|
393
|
+
- **git workflow safeguards.** Design only; the package contains no Git
|
|
279
394
|
extension yet. The planned capability covers exact-file staging, native
|
|
280
395
|
confirmation, post-confirmation drift checks, and protected-operation
|
|
281
396
|
boundaries.
|
|
282
|
-
- **assignment-aware Git journeys
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
##
|
|
287
|
-
|
|
288
|
-
*Extensions that keep the installed set honest and the record
|
|
289
|
-
|
|
290
|
-
- **security and integrity scanning
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
decisions. Built on the agent-scanner approach proven in
|
|
295
|
-
|
|
296
|
-
- **checkpoint storage lifecycle
|
|
297
|
-
and purging rules for capsule
|
|
298
|
-
session evidence has a managed lifetime instead of growing without
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
was built stays queryable after active development ends.
|
|
397
|
+
- **assignment-aware Git journeys.** Merge and protected-push flows bound to
|
|
398
|
+
a verified assignment, so consequential Git operations carry their own
|
|
399
|
+
recorded provenance.
|
|
400
|
+
|
|
401
|
+
## Package integrity
|
|
402
|
+
|
|
403
|
+
*Extensions that keep the installed set honest and the record controlled.*
|
|
404
|
+
|
|
405
|
+
- **security and integrity scanning.** Static scanning of MCP configs, agent
|
|
406
|
+
skills, and extension packages for hardcoded secrets, prompt and shell
|
|
407
|
+
injection, data-exfiltration endpoints, untrusted integrations, PII
|
|
408
|
+
leakage, and OWASP/MCP threat families, with accept/redact/reject
|
|
409
|
+
decisions. Built on the agent-scanner approach proven in Hillstar
|
|
410
|
+
Orchestrator and Testudo.
|
|
411
|
+
- **checkpoint storage lifecycle.** Compression, deduplication, retention,
|
|
412
|
+
and purging rules for capsule and index stores once a product ships, so
|
|
413
|
+
session evidence has a managed lifetime instead of growing without bound.
|
|
414
|
+
- **product knowledge graph.** Semantic graph projection of a shipped
|
|
415
|
+
product's checkpoints, decisions, and artifacts, so the record of what was
|
|
416
|
+
built stays queryable after active development ends.
|
|
303
417
|
|
|
304
418
|
Each item lands here as its own extension when its scenario passes
|
|
305
419
|
acceptance with all prohibited effects absent.
|
|
306
420
|
|
|
307
421
|
### Portable repository contract
|
|
308
422
|
|
|
309
|
-
`templates/AGENTS.md` is a
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
423
|
+
`templates/AGENTS.md` is a starting contract you can copy into any repository
|
|
424
|
+
that uses Pi agents. It asks for controlled tasks and realistic tests, and
|
|
425
|
+
treats agent reports as untrusted evidence. It never overwrites an existing
|
|
426
|
+
`AGENTS.md`; add your project rules below it.
|
|
313
427
|
|
|
314
428
|
## Install
|
|
315
429
|
|
|
430
|
+
From npm:
|
|
431
|
+
|
|
316
432
|
```sh
|
|
317
|
-
pi install
|
|
433
|
+
pi install npm:@evoclock/pi-agentic-driver
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Or from Git at a pinned tag:
|
|
437
|
+
|
|
438
|
+
```sh
|
|
439
|
+
pi install git:github.com/evoclock/pi-agentic-driver@v0.6.0
|
|
318
440
|
```
|
|
319
441
|
|
|
320
442
|
Released extensions load standalone; neither requires the other.
|
|
321
443
|
|
|
444
|
+
### Choose which extensions load
|
|
445
|
+
|
|
446
|
+
A normal install loads all six extensions by default. You can load only the
|
|
447
|
+
extensions you want with the object form in your Pi settings:
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"packages": [
|
|
452
|
+
{
|
|
453
|
+
"source": "npm:@evoclock/pi-agentic-driver@0.6.0",
|
|
454
|
+
"extensions": [
|
|
455
|
+
"extensions/aidr.ts",
|
|
456
|
+
"extensions/code-phage.js"
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
The package also includes `herdr-communication.ts`, `herdr-lifecycle.ts`,
|
|
464
|
+
`herdr-dispatch.ts`, and `linux-microvm.ts`. Use `pi config` to enable or
|
|
465
|
+
disable individual resources from an installed package. You are not required
|
|
466
|
+
to use every extension.
|
|
467
|
+
|
|
322
468
|
## License
|
|
323
469
|
|
|
324
470
|
AGPL-3.0-or-later with author-attribution additional terms (Section 7(b));
|