agent-procedures 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/bin/cli.js +1 -1
- package/dist/runtime.js +942 -0
- package/lib/engine.js +54 -45
- package/lib/groomer.js +108 -72
- package/lib/harnesses/claude.js +3 -1
- package/lib/init.js +41 -42
- package/lib/main.js +6 -5
- package/lib/recall.js +108 -0
- package/lib/sanitize.js +181 -0
- package/lib/store.js +178 -5
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -52,13 +52,26 @@ The key gets checked before it's saved, so a typo fails right away instead of a
|
|
|
52
52
|
```
|
|
53
53
|
.reflex/
|
|
54
54
|
config.json # settings, not memory
|
|
55
|
-
procedures.jsonl #
|
|
55
|
+
procedures.jsonl # stable memory (commit this)
|
|
56
56
|
runs.jsonl # optional run outcomes
|
|
57
|
-
|
|
57
|
+
runtime.js # the engine, one bundled file — do not edit
|
|
58
|
+
pending.jsonl # ingest buffer (local, gitignored)
|
|
59
|
+
processing.jsonl # batch the groomer is reviewing right now (local)
|
|
60
|
+
groomer.lock # single-flight guard for the groomer (local)
|
|
58
61
|
traces/ # scratch for the current turn
|
|
59
62
|
```
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
The hot path only appends to `pending.jsonl`. A background groomer renames that buffer to `processing.jsonl`, reviews it, and merges keepers into `procedures.jsonl`. Recall reads all three, so memory works before grooming finishes.
|
|
65
|
+
|
|
66
|
+
Init ignores everything under `.reflex/` except `config.json`, `procedures.jsonl`, `runs.jsonl`, and `runtime.js`. **Commit those four files**, plus `.claude/settings.json` (the hook wiring), so anyone who clones the repo gets the same memory. If you upgrade the package, run `init` again. That overwrites `runtime.js`.
|
|
67
|
+
|
|
68
|
+
## Secrets
|
|
69
|
+
|
|
70
|
+
Reflex sanitizes prompts and tool targets before writing traces. Inline credentials it can identify are promoted to environment requirements, so a stored procedure keeps `npm run migrate` and records that it needs `DATABASE_URL` instead of storing the URL value. Recall tells the agent which variables must already be set.
|
|
71
|
+
|
|
72
|
+
Reflex also checks for common provider credentials using signatures ported from Gitleaks. If it detects a secret that it cannot safely parameterize, it drops that turn instead of writing a procedure or sending it to the groomer.
|
|
73
|
+
|
|
74
|
+
Secret detection is defense in depth, not a guarantee. Do not put credentials directly in prompts or command lines; use environment variables or a secret manager.
|
|
62
75
|
|
|
63
76
|
## Adding a harness
|
|
64
77
|
|
package/bin/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ if (command === "init") {
|
|
|
25
25
|
console.log(` .reflex/config.json ${results.config}`);
|
|
26
26
|
console.log(` .reflex/procedures.jsonl ${results.procedures}`);
|
|
27
27
|
console.log(` .reflex/runs.jsonl ${results.runs}`);
|
|
28
|
-
console.log(` .reflex/
|
|
28
|
+
console.log(` .reflex/runtime.js ${results.runtime}`);
|
|
29
29
|
console.log(` .gitignore ${results.gitignore}`);
|
|
30
30
|
console.log(` hooks (${harness || "claude"}) ${results.hooks}`);
|
|
31
31
|
process.exit(0);
|