Repository navigation
Commit 5b21b4d
committed
areev pack: validate, install, export (#178)
A pack is an installable agent: a manifest, the grains it seeds, and the code
blobs those grains name. It replaces the installer everyone deploying an agent
was otherwise writing -- blobs into the CAS, each `executor_uri` rewritten to
the address the bytes turned out to have, grains seeded in dependency order,
plan hashes checked -- with one verb, so self-hosters get the same door a
managed deployment does.
Three properties make it more than a script.
References are SYMBOLIC (`blob:<name>`, `grain:<id>`). An address is a
measurement of bytes, not something an author can write down: install stores
the blob, learns its address, rewrites the Definition, addresses *that*, and
rewrites the plan that binds it. Grains are addressed in manifest order and a
forward reference is refused rather than guessed at, which is why `grains` is
an ordered list and not a set. It also means editing a connector's wasm changes
the plan's hash -- the property that makes the next one worth having.
`expected_hash` is REFUSED, not warned, with nothing written. A plan installed
at a different address than the deployment expects has changed what runs, and
everything pointing at the old hash -- triggers above all, which do not follow
heads -- is now pointing elsewhere.
Install is validate plus a destination. Every grain is built and addressed with
NO store at all, since content addressing is a pure function of the serialized
grain, so `pack validate` opens no memory, creates no file, and can run in CI
on a pull request; a refused pack leaves the memory exactly as it found it
(half an agent is worse than none). Export writes either reviewable grain JSON,
refusing to write anything it cannot rebuild to the same address, or a bundle
plus a manifest of what it must contain. Saved queries and templates travel
too, or an installed agent loses the context assembly its triggers name.
The pins it prints are exactly the addresses some Definition names as its
`executor_uri` -- never the data blobs a pack also carries, since asking an
operator to authorize data as executable is asking for the wrong permission.
Every agent under `examples/agents/` now ships a `pack/`, EXPORTED from its own
freshly seeded memory rather than written by hand, because the grains a pack
installs and the grains a seeder writes have to be the same grains and the only
way to keep them the same is to derive one from the other. `run-smokes.sh`
gained a `pack` lane asserting each installs the plan its language stacks mint.
That lane immediately earned itself: `sanctions-screening` stamped its evalset
Fact -- the gate Rule E1 pins on the `screen` tool -- with the wall clock, so
the tool's hash and therefore the desk's plan hash differed on every seed.
Nothing had caught it because the cross-stack comparison needs two stacks and
that desk has one. The seeder now pins `created_at` like every other grain it
writes, and the desk records a wider `cold_grains` window beside its existing
`run_outcome` tuning: its evalset is reference data read by the gate at review
time, so "never recalled in 30 days" measures the wrong thing for it -- and
retiring an evalset would remove the gate a code revision has to pass.
Two hand-written packs land as examples, both keyless and offline and both in
CI. `examples/grain-connector/` is #185's acceptance: a polling trigger whose
connector is a pinned wasm blob, with no host connector script anywhere, and
the `TRG-E012` refusal a host that pinned nothing gets.
`examples/blessed-tools/` is #179's: a pack binding the shipped `http.call`
blob with declared hosts, one permitted call (200 -- and the stub 401s anything
without the exact bearer token, so that is the proof the broker attached a
credential the tool never held), one call to an undeclared host refused by the
broker with `RUN-E022`, and `areev tool provenance` chaining the blob.
Claude-Session: https://claude.ai/code/session_016YzyEfdWprezzATrZGNtg8
Signed-off-by: Sathish Kumar Palanisamy <sathish@mindgryd.com>1 parent e867c8d commit 5b21b4d
154 files changed
Lines changed: 143323 additions & 324 deletions
File tree
- .github/workflows
- crates/areev-cli
- src
- tests
- docs
- assets
- examples
- agents
- clinical-referrals/pack
- grains
- data-subject-requests/pack
- grains
- docs
- due-diligence/pack
- grains
- hiring-screening/pack
- grains
- incident-response/pack
- grains
- insurance-documents/pack
- grains
- invoice-to-accounting/pack
- grains
- rcm-optimization/pack
- grains
- sanctions-screening
- pack
- blobs
- grains
- python
- trade-surveillance/pack
- grains
- blessed-tools
- pack
- blobs
- grains
- grain-connector
- pack
- blobs
- fixtures
- grains
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
| |||
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
317 | 325 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
322 | 330 | | |
323 | 331 | | |
324 | | - | |
| 332 | + | |
325 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
326 | 351 | | |
327 | 352 | | |
328 | 353 | | |
| |||
386 | 411 | | |
387 | 412 | | |
388 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
389 | 420 | | |
390 | | - | |
| 421 | + | |
391 | 422 | | |
392 | 423 | | |
393 | 424 | | |
394 | 425 | | |
| 426 | + | |
| 427 | + | |
395 | 428 | | |
396 | 429 | | |
397 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
398 | 433 | | |
399 | 434 | | |
400 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
401 | 443 | | |
402 | 444 | | |
403 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1931 | 1931 | | |
1932 | 1932 | | |
1933 | 1933 | | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
1934 | 2004 | | |
1935 | 2005 | | |
1936 | 2006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
11 | 123 | | |
12 | 124 | | |
13 | 125 | | |
| |||
0 commit comments