agent-procedures 0.4.1 → 0.4.2
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 +3 -1
- package/dist/runtime.js +1 -1
- package/lib/init.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,9 @@ The key gets checked before it's saved, so a typo fails right away instead of a
|
|
|
66
66
|
|
|
67
67
|
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.
|
|
68
68
|
|
|
69
|
-
Init ignores everything under `.reflex/` except `config.json`, `procedures.jsonl`, `runs.jsonl`, and `runtime.js`. **Commit those
|
|
69
|
+
Init ignores everything under `.reflex/` except `config.json`, `package.json`, `procedures.jsonl`, `runs.jsonl`, and `runtime.js`. **Commit those five files**, plus the harness wiring (`.claude/settings.json` for Claude Code, and/or `.cursor/hooks.json` for Cursor), so anyone who clones the repo gets the same memory. If you upgrade the package, run `init` again. That overwrites `runtime.js`.
|
|
70
|
+
|
|
71
|
+
You can wire both harnesses in one repo if you use Claude Code and Cursor. Cursor may also load Claude’s hooks via third-party compatibility — if you see double hook runs, turn that off in Cursor settings and keep `.cursor/hooks.json` for Cursor / `.claude/settings.json` for Claude Code.
|
|
70
72
|
|
|
71
73
|
## Secrets
|
|
72
74
|
|
package/dist/runtime.js
CHANGED
package/lib/init.js
CHANGED
|
@@ -42,6 +42,7 @@ function ensureGitignore(cwd) {
|
|
|
42
42
|
"# Reflex: ignore runtime state; commit only the shared allowlist",
|
|
43
43
|
".reflex/*",
|
|
44
44
|
"!.reflex/config.json",
|
|
45
|
+
"!.reflex/package.json",
|
|
45
46
|
"!.reflex/procedures.jsonl",
|
|
46
47
|
"!.reflex/runs.jsonl",
|
|
47
48
|
"!.reflex/runtime.js",
|
|
@@ -77,6 +78,12 @@ function installRuntime(reflexDir) {
|
|
|
77
78
|
throw new Error("Missing dist/runtime.js. Run `npm run build` in the agent-procedures repo first.");
|
|
78
79
|
}
|
|
79
80
|
fs.copyFileSync(RUNTIME_SRC, path.join(reflexDir, "runtime.js"));
|
|
81
|
+
// Host apps are often "type":"commonjs". Without this, Node treats runtime.js as
|
|
82
|
+
// CJS and the .mjs shim's `import { run }` crashes before any event is handled.
|
|
83
|
+
writeAlways(
|
|
84
|
+
path.join(reflexDir, "package.json"),
|
|
85
|
+
`${JSON.stringify({ type: "module", private: true }, null, 2)}\n`,
|
|
86
|
+
);
|
|
80
87
|
const engineDir = path.join(reflexDir, "engine");
|
|
81
88
|
if (fs.existsSync(engineDir)) fs.rmSync(engineDir, { recursive: true, force: true });
|
|
82
89
|
return "updated";
|