neurastream 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/README.md +57 -8
  2. package/package.json +8 -2
package/README.md CHANGED
@@ -1,19 +1,54 @@
1
1
  # neurastream
2
2
 
3
- Agent orchestration (queue, guards, blockers, scoring, ledger) as one installable package. The core does not name a harness. Adapters translate harness events into core calls. The first adapter is omp.
3
+ Guardrails for running many AI coding agents at once.
4
4
 
5
- ## Install
5
+ One "main" agent plans the work and reviews it; cheaper "helper" agents do the coding. neurastream is the set of checks between them. It keeps a queue of written plans, refuses helper actions a plan forbids, limits how many helpers run per provider, scores each helper by accepted work per dollar, and only lets a plan leave the queue once its branch is really merged.
6
+
7
+ The core does not depend on one agent tool. Adapters translate a tool's events into core calls. The first adapter is [omp](https://github.com/can1357/oh-my-pi).
8
+
9
+ ```mermaid
10
+ flowchart LR
11
+ O[Owner message] --> P[Plan file in docs/plans]
12
+ P --> Q[queue-check]
13
+ Q --> S[Spawn checks<br/>ledger cap, score gate, brief-lint]
14
+ S --> H[Helper agent<br/>blockers + call budget]
15
+ H --> R[Main review<br/>agent-score accept]
16
+ R --> M[Merge to main]
17
+ M --> C[queue-close<br/>merged proof + done check]
18
+ ```
19
+
20
+ ## What it does
6
21
 
7
- Do not install into the real home while this package is still being built. Use a sandbox home.
22
+ | Part | What it enforces |
23
+ |---|---|
24
+ | Queue (`queue-check`, `queue-close`, `queue-cancel`) | Every open plan is listed in an index and follows a template. A plan leaves the queue only when its branch is merged into remote main and its done check passes; a failing check reopens it. A cancelled plan's unmerged work is saved under `refs/queue-archive/`. |
25
+ | Blockers | Each plan's phase 0 lists what helpers may not do: push, touch a path, run a command, or write a text. The guard refuses those calls. |
26
+ | Guards | Helpers may only edit their plan's `## Progress`; they get a warning at call 90 and are stopped at call 100. Protected files need an owner unlock (a file the owner touches, valid 30 minutes). |
27
+ | Ledger (`agent-ledger`) | Tokens, cost, state and exit reason per agent; `--cap` refuses a spawn when a provider already runs 2. |
28
+ | Scoring (`agent-score`) | Points only for work Main accepted by commit, times the phase difficulty. Ranked per dollar and per hour. |
29
+ | Brief lint (`brief-lint`) | Refuses a helper brief that misses a required rule (acceptance, stop condition, no push, call budget). |
30
+ | Machine health (`machine-guard`, `main-start`, `heavy-run`) | Load, free memory, disk and `/tmp` limits; one heavy test run at a time. |
31
+ | Unlanded work (`wip-check`, `wip-snapshot`, `wip-backup`) | Lists branches on no remote and dirty worktrees; snapshots them as hidden commits; can push them to a backup repo. |
32
+ | Session rollover | When the main session file passes 10 MB, the next owner message starts a fresh session from a handoff note. |
33
+
34
+ ## Requirements
35
+
36
+ - [Bun](https://bun.sh) 1.x
37
+ - git
38
+ - omp, for the guards and rollover (the command-line tools work without it)
39
+
40
+ ## Install
8
41
 
9
42
  ```sh
10
- export HOME=/tmp/neurastream-home-dev
11
43
  bun add -g neurastream
12
44
  neurastream init
13
45
  neurastream adapter install omp
46
+ neurastream doctor
14
47
  ```
15
48
 
16
- `init` writes `~/.config/neurastream/config.yml` from the defaults in `docs/config.md`, plus an empty index, notes, the queue template, blocker wrappers, and the state directories. A second run changes nothing. `adapter install omp` links the extension under that same home (`~/.omp/agent/extensions` and `omp plugin link`). Neither command touches `~/.omp` or `~/.local` of the real user.
49
+ `init` writes `~/.config/neurastream/config.yml` from the defaults in [docs/config.md](docs/config.md), plus an empty index, notes, the queue template, blocker wrappers, and the state directories. A second run changes nothing. `adapter install omp` links the extension (`~/.omp/agent/extensions` and `omp plugin link`). `doctor` exits 0 when the install matches the package.
50
+
51
+ The defaults are the author's setup (paths, the backup repo, provider names). Edit `config.yml` before relying on them. To try it without touching your real home, set `HOME=/tmp/neurastream-home-dev` first.
17
52
 
18
53
  Check the merged result:
19
54
 
@@ -21,11 +56,21 @@ Check the merged result:
21
56
  neurastream config --json
22
57
  ```
23
58
 
24
- Compatibility bins keep today's names (`agent-score`, `agent-ledger`, `brief-lint`, `oc-run`, `wip-check`, `wip-backup`, `wip-snapshot`, `pm-fail-facts`, `main-health`, `queue-check`, `queue-close`, `queue-cancel`, `main-start`, `machine-guard`, `glm-reset`, `priority-watch`, `resource-alerts`, `tmp-snapshot`, `heavy-run`). They are the same program, selected by the bin name.
59
+ Every tool is one program, selected by the name it was called with: `agent-score`, `agent-ledger`, `brief-lint`, `oc-run`, `wip-check`, `wip-backup`, `wip-snapshot`, `pm-fail-facts`, `main-health`, `queue-check`, `queue-close`, `queue-cancel`, `main-start`, `machine-guard`, `glm-reset`, `priority-watch`, `resource-alerts`, `tmp-snapshot`, `heavy-run`.
60
+
61
+ ## Develop
62
+
63
+ ```sh
64
+ bun install
65
+ bun run typecheck
66
+ bun test
67
+ ```
68
+
69
+ Green is both exiting 0.
25
70
 
26
- Scoring: `agent-score accept` records accepted work by commit; `agent-score validate <Agent> --plan <plan.md> --phase <P> --evidence <report.md> --section "<heading prefix>"` records a validation phase (checks/tests ran, report section written, no commits) with proof Main cannot fake by typing: the plan line must be ticked `- [x]`, the cited section body must name a heavy-run label run by that agent (from `paths.heavy_log`), and the phase must not be scored already. The ranking board counts it in `Accepted (diag/val)` as `N (d/v)`.
71
+ ## Scoring details
27
72
 
28
- Green is `bun run typecheck` and `bun test`, both exit 0.
73
+ `agent-score accept` records accepted work by commit; `agent-score validate <Agent> --plan <plan.md> --phase <P> --evidence <report.md> --section "<heading prefix>"` records a validation phase (checks/tests ran, report section written, no commits) with proof Main cannot fake by typing: the plan line must be ticked `- [x]`, the cited section body must name a heavy-run label run by that agent (from `paths.heavy_log`), and the phase must not be scored already. The ranking board counts it in `Accepted (diag/val)` as `N (d/v)`.
29
74
 
30
75
  ## Main reads the code for its plans
31
76
 
@@ -64,3 +109,7 @@ neurastream adapter install omp
64
109
  ```
65
110
 
66
111
  Live copies are never hand-edited. `neurastream doctor` names each hand-edited or foreign installed file, and a stale install (the installed version is not `npm view neurastream version`). If the registry cannot be reached, that check is a warning, not a failure.
112
+
113
+ ## License
114
+
115
+ MIT. See [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "neurastream",
3
- "version": "0.1.8",
4
- "description": "Harness-agnostic agent orchestration: queue, guards, blockers, scoring, ledger.",
3
+ "version": "0.1.9",
4
+ "description": "Guardrails for running many AI coding agents at once: plan queue, blockers, call budgets, provider caps, scoring, merge-verified close.",
5
+ "keywords": ["ai-agents", "coding-agents", "orchestration", "guardrails", "omp", "bun", "cli"],
6
+ "homepage": "https://github.com/umiddey/neurastream#readme",
7
+ "bugs": "https://github.com/umiddey/neurastream/issues",
5
8
  "type": "module",
6
9
  "license": "MIT",
7
10
  "repository": {
8
11
  "type": "git",
9
12
  "url": "git+https://github.com/umiddey/neurastream.git"
10
13
  },
14
+ "engines": {
15
+ "bun": ">=1.0"
16
+ },
11
17
  "publishConfig": {
12
18
  "access": "public"
13
19
  },