neurastream 0.2.64 → 0.2.66

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.
@@ -1,61 +1,61 @@
1
1
  paths:
2
- home: "~"
2
+ home: "~" # the HOME every other path expands from
3
3
  work_roots: [] # set your own roots
4
- config_dir: "~/.config/neurastream"
5
- agent_dir: "~/.config/neurastream"
6
- score_state: "~/.local/state/agent-score"
7
- queue_state: "~/.local/state/queue"
8
- queue_index: "~/.config/neurastream/INDEX.md"
9
- blockers: "~/.config/neurastream/blockers"
10
- notes: "~/.config/neurastream/notes"
11
- ranking_board: "~/.config/neurastream/notes/subagent-ranking.md"
12
- subagents: "~/.config/neurastream/notes/subagents.md"
13
- cancelled: "~/.config/neurastream/CANCELLED.md"
14
- unlock: "~/.config/neurastream/.guard-unlock"
15
- guard_log: "~/.local/state/main-guard.log"
16
- plan_guard_log: "~/.local/state/plan-guard.log"
17
- heavy_lock: "~/.local/state/neurastream/heavy-run.lock"
18
- heavy_owner: "~/.local/state/neurastream/heavy-run.owner"
19
- heavy_log: "~/.local/state/neurastream/heavy-run.log"
20
- heavy_idle_state: "~/.local/state/neurastream/heavy-run.idle-state"
21
- alert_state: "~/.cache/resource-alerts"
22
- snapshot_lock: "~/.cache/tmp-snapshot.lock"
4
+ config_dir: "~/.config/neurastream" # the config file's dir
5
+ agent_dir: "~/.config/neurastream" # the index, notes and blockers dir
6
+ score_state: "~/.local/state/agent-score" # agent-score state dir
7
+ queue_state: "~/.local/state/queue" # queue state dir (mr-cache.json lives here)
8
+ queue_index: "~/.config/neurastream/INDEX.md" # the main queue index
9
+ blockers: "~/.config/neurastream/blockers" # blocker files dir
10
+ notes: "~/.config/neurastream/notes" # notes dir
11
+ ranking_board: "~/.config/neurastream/notes/subagent-ranking.md" # subagent ranking board
12
+ subagents: "~/.config/neurastream/notes/subagents.md" # subagent allow-list (## Allowed)
13
+ cancelled: "~/.config/neurastream/CANCELLED.md" # cancelled-work log
14
+ unlock: "~/.config/neurastream/.guard-unlock" # guard unlock file
15
+ guard_log: "~/.local/state/main-guard.log" # main-guard log
16
+ plan_guard_log: "~/.local/state/plan-guard.log" # plan-guard log
17
+ heavy_lock: "~/.local/state/neurastream/heavy-run.lock" # heavy-run lock file
18
+ heavy_owner: "~/.local/state/neurastream/heavy-run.owner" # heavy-run owner record
19
+ heavy_log: "~/.local/state/neurastream/heavy-run.log" # heavy-run log
20
+ heavy_idle_state: "~/.local/state/neurastream/heavy-run.idle-state" # heavy-run idle state
21
+ alert_state: "~/.cache/resource-alerts" # resource-alert cooldown state
22
+ snapshot_lock: "~/.cache/tmp-snapshot.lock" # tmp-snapshot lock
23
23
 
24
24
  # Which adapter (docs/adapter.md) serves runs, traces, launch, install and doctor.
25
- harness: omp
25
+ harness: omp # the adapter that serves runs, traces, launch, install and doctor
26
26
 
27
27
  # Live project rules (src/core/repo-rules.ts): the repo's own AGENTS.md, handed to the agent that
28
28
  # works in it — a subagent on its plan's repo, Main the first time a session touches the repo.
29
29
  # max_bytes caps the injected text; past it the text is cut and one line names the file to read.
30
30
  rules:
31
- max_bytes: 24000
31
+ max_bytes: 24000 # cap on the injected repo-rules text
32
32
 
33
33
  score:
34
- default_repo: ""
34
+ default_repo: "" # default repo for agent-score (empty = none)
35
35
  default_branch: "" # no default: pass --branch (agent-score refuses to guess a branch)
36
36
  penalties:
37
- false-claim: 5
38
- rule-break: 2
39
- escaped-defect: 8
40
- unreported-finding: 5
41
- diagnose_weight: 4
42
- gate_days: 7
43
- board_days: 7
44
- min_dollars: 0.01
37
+ false-claim: 5 # score penalty per false claim
38
+ rule-break: 2 # score penalty per rule break
39
+ escaped-defect: 8 # score penalty per escaped defect
40
+ unreported-finding: 5 # score penalty per unreported finding
41
+ diagnose_weight: 4 # rank weight of diagnose findings
42
+ gate_days: 7 # days of history the spawn gate reads
43
+ board_days: 7 # days of history on the board
44
+ min_dollars: 0.01 # spend below this is not ranked
45
45
  waste_weight: 0 # rank multiplier for wasted-call rate (0 disables)
46
- min_hours: 0.05
46
+ min_hours: 0.05 # hours below this are not ranked
47
47
 
48
48
  ledger:
49
- default_hours: 24
50
- idle_show_min: 5
51
- idle_not_live_min: 60
52
- max_running_per_provider: 2
53
- max_slots: 2
49
+ default_hours: 24 # the ledger's default window in hours
50
+ idle_show_min: 5 # idle minutes before a run is shown
51
+ idle_not_live_min: 60 # idle minutes before a run that is not live is flagged
52
+ max_running_per_provider: 2 # concurrent running agents allowed per provider
53
+ max_slots: 2 # concurrent agent slots
54
54
  # The owner's pick order (plan 20261025_1700 P3): agent names, first = preferred; empty = off.
55
55
  # The spawn gates refuse a later agent while an earlier one is free and under its provider cap
56
56
  # unless the brief carries "Pick note: <why>"; agent-score gate ranks inside this order.
57
- prefer: []
58
- providers:
57
+ prefer: [] # agent names in preferred order (empty = off)
58
+ providers: # providers the agents run on
59
59
  - zai
60
60
  - openai-codex
61
61
  - anthropic
@@ -66,13 +66,13 @@ ledger:
66
66
 
67
67
  brief:
68
68
  method_marker: "" # empty = no method read required
69
- heavy_marker: "heavy-run"
70
- max_keys: 10
71
- warn_chars: 12000
72
- aim_chars: 8000
73
- path_prefixes: ["$HOME/"]
74
- method_read: ""
75
- heavy_path: "heavy-run"
69
+ heavy_marker: "heavy-run" # brief text that marks a heavy run
70
+ max_keys: 10 # keys a brief may name
71
+ warn_chars: 12000 # brief length that draws a warning
72
+ aim_chars: 8000 # target brief length
73
+ path_prefixes: ["$HOME/"] # path prefixes a brief may cite
74
+ method_read: "" # method file a brief must read (empty = none)
75
+ heavy_path: "heavy-run" # path of the heavy-run bin in a brief
76
76
  repo_rules: [] # optional repo-specific lint rules; each fires when `match` (regex, whole brief) hits and the body lacks `require`:
77
77
  # - match: 'legacy-api' # trigger anywhere in the brief (case-insensitive)
78
78
  # first: 'Refactor' # optional: also require this on the title line
@@ -81,68 +81,69 @@ brief:
81
81
  # message: 'legacy-api work must name its regression test'
82
82
 
83
83
  oc:
84
- model_prefix: "opencode/"
85
- tail_lines: 40
86
- tail_chars: 600
84
+ model_prefix: "opencode/" # prefix that routes a model to oc-run
85
+ tail_lines: 40 # output lines kept from an oc run
86
+ tail_chars: 600 # output chars kept from an oc run
87
87
 
88
88
  wip:
89
- limit: 6
90
- days: 14
89
+ limit: 6 # open WIP items the check allows
90
+ days: 14 # WIP age window in days
91
91
  backup_url: "" # your own private backup repo; wip-backup refuses to invent one
92
- backup_log: "~/.local/state/neurastream/WIP-BACKUP.md"
92
+ backup_log: "~/.local/state/neurastream/WIP-BACKUP.md" # backup log file
93
93
  backup_hook_off: [] # origin name fragments whose pre-push hook wip-backup may bypass
94
- backup_max_repo_mb: 1000
95
- secret_gate: "~/.local/bin/git-secret-gate"
96
- snapshot_max_mb: 5
97
- status_log: "~/.local/state/neurastream/WIP-STATUS.md"
98
- secret_file: '(?i)(^|/)(\.env(\.(?!example$|sample$|template$|dist$)[\w-]+)?|[^/]*\.env|env\.json|[^/]*\.(pem|p12|pfx|jks|keystore|key)|id_(rsa|dsa|ecdsa|ed25519)|credentials(\.json)?|\.netrc|\.pgpass|\.htpasswd|local-run\.env)$'
94
+ backup_max_repo_mb: 1000 # largest repo wip-backup will back up
95
+ secret_gate: "~/.local/bin/git-secret-gate" # secret scanner run before a backup
96
+ snapshot_max_mb: 5 # largest file a snapshot keeps
97
+ status_log: "~/.local/state/neurastream/WIP-STATUS.md" # WIP status file
98
+ secret_file: '(?i)(^|/)(\.env(\.(?!example$|sample$|template$|dist$)[\w-]+)?|[^/]*\.env|env\.json|[^/]*\.(pem|p12|pfx|jks|keystore|key)|id_(rsa|dsa|ecdsa|ed25519)|credentials(\.json)?|\.netrc|\.pgpass|\.htpasswd|local-run\.env)$' # file names that count as secrets
99
99
 
100
100
  health:
101
- warn_ctx: 150000
102
- tail_calls: 50
103
- default_hours: 12
101
+ warn_ctx: 150000 # context size that draws a health warning
102
+ tail_calls: 50 # calls in the health tail
103
+ default_hours: 12 # default health window in hours
104
104
 
105
105
  queue:
106
- archive_days: 30
107
- background_max_lines: 40
108
- progress_keep: 6
109
- priority_id: '^[A-Z]{2}[0-9]{2}$'
110
- cancel_min_words: 3
111
- auto_close_min: 15
112
- repo_index: "INDEX.md"
113
- cancelled_rel: "docs/plans/CANCELLED.md"
106
+ archive_days: 30 # days before a queue item is archived
107
+ background_max_lines: 40 # declared only; no code reads it yet
108
+ progress_keep: 6 # progress entries kept
109
+ priority_id: '^[A-Z]{2}[0-9]{2}$' # declared only; no code reads it yet
110
+ cancel_min_words: 3 # declared only; no code reads it yet
111
+ auto_close_min: 15 # minutes before an item auto-closes
112
+ repo_index: "INDEX.md" # declared only; no code reads it yet
113
+ cancelled_rel: "docs/plans/CANCELLED.md" # declared only; no code reads it yet
114
114
  waiting_check_ttl_sec: 600 # a hold's `still true if` result is reused this long (key: plan mtime, command, HEAD)
115
115
  waiting_check_timeout_sec: 60 # one check may run this long; a timeout is "unknown" (card stays, no incident)
116
+ claim_ttl_min: 30 # minutes without a claim heartbeat before another Main may take the plan
116
117
 
117
118
  guards:
118
- sub_warn_calls: 90
119
- sub_max_calls: 100
120
- sub_max_calls_cap: 200
119
+ sub_warn_calls: 90 # subagent tool calls that draw the wrap-up warning
120
+ sub_max_calls: 100 # subagent tool calls before refusal
121
+ sub_max_calls_cap: 200 # ceiling for sub_max_calls
121
122
  main_warn_calls: 12 # Main tool calls per turn that draw the wrap-up warning
122
123
  main_max_calls: 15 # Main tool calls per turn before refusal; 0 = off
123
124
  main_call_exempt_tools: [task, todo, ask, wait] # never counted, never refused at the cap: delegating, tracking and asking stay open
124
- main_edit_limit: 5
125
- main_window_min: 15
126
- unlock_minutes: 30
125
+ main_edit_limit: 5 # Main project-file edits allowed per main_window_min
126
+ main_window_min: 15 # window in minutes for the edit limit
127
+ unlock_minutes: 30 # minutes a guard unlock lasts
127
128
  chat_unlock: false # the owner's whole chat message "unlock"/"unlock N"/"lock" moves the guard unlock file
128
- plan_read_max_hours: 24
129
- idle_stops: 3
129
+ plan_read_max_hours: 24 # hours a plan read stays valid
130
+ idle_stops: 3 # idle stops before the guard intervenes
130
131
  plan_offer: 'want me to (write|make) a plan|should i plan|shall i plan|if you want, i(''ll)? plan|plan it or|\bi will\b|\bi(''|’)ll\b' # refused: don't promise or offer it — do it now, or write the plan and index it
131
132
  rate_limit:
132
133
  patterns: ["429", "rate_limit", "rate limit", "overloaded", "529"] # error-text substrings (case-insensitive) that mark a provider rate limit
133
134
  default_wait_s: 300 # wait when the error text names no retry-after
134
135
  max_wait_s: 3600 # cap for the parsed (or doubled) wait, before slack
135
136
  slack_s: 15 # added on top of every wait
136
- blocker_timeout_ms: 10000
137
- skip_tools: [todo, wait, ask, web_search, job, cancel_job]
138
- read_tools: [read, grep, glob, find]
139
- shell_tools: [bash, eval]
140
- write_tools: [write, edit, ast_edit]
141
- free_ext: '\.(md|txt)$'
137
+ blocker_timeout_ms: 10000 # timeout for blocker checks in milliseconds
138
+ skip_tools: [todo, wait, ask, web_search, job, cancel_job] # tools the guard never counts
139
+ read_tools: [read, grep, glob, find] # tools counted as reads
140
+ shell_tools: [bash, eval] # tools counted as shell calls
141
+ write_tools: [write, edit, ast_edit] # tools counted as writes
142
+ free_ext: '\.(md|txt)$' # file extensions the write guard always allows
142
143
  free_prefixes: [] # path prefixes the write guard allows without an unlock
143
- bypass_spawn: ["opencode run"]
144
- protected: []
145
- ledger_command: "agent-ledger --hours 12"
144
+ bypass_spawn: ["opencode run"] # spawn command prefixes the guard lets through
145
+ protected: [] # paths the write guard protects (empty = none)
146
+ ledger_command: "agent-ledger --hours 12" # command the guard runs for the ledger
146
147
 
147
148
  autonomy:
148
149
  tier: opinionated # strict | opinionated | full: how much Main does without asking; the owner moves it with `tier <name>` in chat or a button on the phone page
@@ -161,27 +162,27 @@ approval: # plan approval hard gate (plan 20261029_1455 P3): do
161
162
 
162
163
  ui:
163
164
  enabled: false # the owner's phone page (neurastream ui); binds the tailnet address only
164
- port: 7787
165
+ port: 7787 # owner page port (neurastream ui)
165
166
  owner_login: "" # the tailscale login that may open the page; empty = the page refuses to start
166
167
  allow_this_machine: false # admit this machine (loopback and its own tailnet IP) as the owner; any local process can then press the buttons
167
168
 
168
169
 
169
170
  pages:
170
- enabled: false
171
- port: 7788
172
- dir: "~/.local/share/neurastream/pages"
171
+ enabled: false # the pages server (neurastream pages on|off)
172
+ port: 7788 # pages server port
173
+ dir: "~/.local/share/neurastream/pages" # published pages dir
173
174
  keep_days: 15 # delete a published page this many days later; publish --keep is permanent
174
175
  knowledge: # repo-local HTML explainers (docs/knowledge/<topic>.html) on the phone page's Knowledge tab
175
176
  roots: ["$HOME/projects", "$HOME/Work"] # scanned for git repos; $HOME expands to the config's home
176
177
  max_age_s: 300 # rebuild the topic list when older, so a git pull shows up on the next reload
177
178
  rollover:
178
- enabled: true
179
- max_session_mb: 5
180
- exit_grace_s: 20
179
+ enabled: true # session rollover on or off
180
+ max_session_mb: 5 # session size that triggers a rollover
181
+ exit_grace_s: 20 # seconds allowed for a clean exit
181
182
 
182
183
  metrics:
183
- report_days: 7
184
- correction_patterns: ['\bno\b', 'wrong', 'why did', 'properly', 'not what', 'stop', 'bullshit', 'fuck']
184
+ report_days: 7 # days in the metrics report
185
+ correction_patterns: ['\bno\b', 'wrong', 'why did', 'properly', 'not what', 'stop', 'bullshit', 'fuck'] # regexes that count a correction
185
186
  ci_pipelines_cmd: "" # command run in the repo dir with {mr} replaced; stdout must be a JSON array; "" = not set
186
187
  product_cmds: {} # {<repo path>: {<name>: shell command printing one number}}, run in that repo after every `metrics ci` merge
187
188
  # product_cmds:
@@ -220,21 +221,21 @@ watch: # the watcher (src/core/watch.ts): heartbeats, fail
220
221
  release_min_calls: 300 # release verdict: fewer Main tool calls on either side reads "not enough data yet", no verdict
221
222
 
222
223
  machine:
223
- load_over_cores: 4
224
- load_max: 0
225
- avail_min_mb: 3072
226
- disk_min_gb: 15
227
- disk_path: "$HOME"
228
- tmp_max_mb: 4096
229
- idle_max_min: 20
230
- idle_min_ticks: 300
231
- watch_sec: 60
232
- watch_streak: 3
224
+ load_over_cores: 4 # load above the core count that draws a warning (used when load_max is 0)
225
+ load_max: 0 # load ceiling; 0 = core count + load_over_cores
226
+ avail_min_mb: 3072 # minimum available memory in MB
227
+ disk_min_gb: 15 # minimum free disk in GB
228
+ disk_path: "$HOME" # path whose free space is checked
229
+ tmp_max_mb: 4096 # /tmp size limit in MB
230
+ idle_max_min: 20 # minutes idle before the machine is flagged
231
+ idle_min_ticks: 300 # idle ticks before the flag
232
+ watch_sec: 60 # seconds between machine watches
233
+ watch_streak: 3 # consecutive watches before the flag
233
234
 
234
235
  quota:
235
- reset_tz: "Asia/Shanghai"
236
- reset_pattern: 'reset at (\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)\s*(Z|UTC|GMT|[+-]\d{2}:?\d{2}|[A-Z]{2,5}\b)?'
237
- label: "quota"
236
+ reset_tz: "Asia/Shanghai" # timezone of the quota reset time
237
+ reset_pattern: 'reset at (\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)\s*(Z|UTC|GMT|[+-]\d{2}:?\d{2}|[A-Z]{2,5}\b)?' # regex that reads the reset time from the error text
238
+ label: "quota" # label used in quota messages
238
239
 
239
240
  notify:
240
241
  discord_webhook_file: "" # file holding the Discord webhook URL; "" = off (README: Notify the owner)
@@ -254,7 +255,7 @@ write_check: # write-time lint checks (src/core/write-check.ts):
254
255
  timeout_ms: 5000 # per linter run; a timeout, crash or missing linter allows the edit and logs a note
255
256
  suppress: '(#|//|/\*)\s*(noqa|type:\s*ignore|oxlint-disable|eslint-disable|biome-ignore|@ts-ignore|@ts-expect-error|@ts-nocheck)' # a new match counts as a new problem; the word only counts inside a comment
256
257
  defer_rules: ["no-unused-vars", "F401", "F841"] # a new finding of one of these rules is allowed with a logged note and only reported at turn end if still present (I-20261028-166); [] turns the deferral off
257
- linters:
258
+ linters: # linters run on each edit
258
259
  - ext: [".py"]
259
260
  argv: ["ruff", "check", "--no-cache", "--output-format=concise", "{file}"]
260
261
  pattern: '^.+?:\d+:\d+: (?<rule>\S+) (?<message>.+)$'
@@ -265,19 +266,19 @@ write_check: # write-time lint checks (src/core/write-check.ts):
265
266
  only_with_config: [".oxlintrc.json", ".oxlintrc.jsonc", ".oxlintrc.js", ".oxlintrc.mjs", ".oxlintrc.cjs", "eslint.config.js", "eslint.config.mjs", "eslint.config.cjs", "eslint.config.mts", "eslint.config.cts"]
266
267
 
267
268
  priority:
268
- sleep_sec: 120
269
+ sleep_sec: 120 # seconds between priority checks
269
270
 
270
271
  alerts:
271
- temp_c: 90
272
- mem_psi: 30
273
- io_psi: 40
274
- cooldown_sec: 600
272
+ temp_c: 90 # temperature alert threshold in C
273
+ mem_psi: 30 # memory pressure alert threshold (PSI)
274
+ io_psi: 40 # IO pressure alert threshold (PSI)
275
+ cooldown_sec: 600 # seconds between repeat alerts
275
276
 
276
277
  snapshot:
277
- tmp_dest: "~/.local/state/neurastream/tmp-snapshot"
278
+ tmp_dest: "~/.local/state/neurastream/tmp-snapshot" # where the tmp snapshot lands
278
279
  git_repo: "" # optional: a repo whose git worktrees get patch snapshots (git worktree list)
279
280
  git_backup: "" # where the patch snapshot lands (only used when snapshot.git_repo is set)
280
- excludes:
281
+ excludes: # names the snapshot skips
281
282
  - "playwright-transform-cache-*"
282
283
  - "pytest-of-*"
283
284
  - "systemd-private-*"
@@ -296,9 +297,9 @@ traces:
296
297
  # sampled defaults live in README.md. prices maps a model to $ per million tokens; a model
297
298
  # without an entry is not priced. allow_tools: tools a run may call even when no result in
298
299
  # the run proves the tool was offered.
299
- id_patterns: {}
300
- prices: {}
301
- allow_tools: []
300
+ id_patterns: {} # provider id patterns (empty = none)
301
+ prices: {} # model prices per million tokens (empty = none)
302
+ allow_tools: [] # tools a run may call without a proof of being offered
302
303
  allowed_hosts: # hosts a network command may touch without a finding
303
304
  - localhost
304
305
  - 127.0.0.1
@@ -308,14 +309,14 @@ traces:
308
309
  # prompt (input + cacheRead + cacheWrite tokens) a healthy run may open with. Any call
309
310
  # whose prompt passes ratio_of_limit × its model's context_limits entry is bloat too; a
310
311
  # model without an entry is not limit-checked (the map is open: add your models).
311
- first_call_max: 150000
312
- ratio_of_limit: 0.8
313
- context_limits: {}
312
+ first_call_max: 150000 # largest first-call prompt a healthy run may open with
313
+ ratio_of_limit: 0.8 # share of a model's context limit that counts as bloat
314
+ context_limits: {} # model context limits in tokens (empty = none)
314
315
  # APIs whose usage aggregates multiple internal calls; these are not per-call sizes.
315
- aggregate_apis: ["cursor-agent"]
316
+ aggregate_apis: ["cursor-agent"] # APIs whose usage aggregates many calls
316
317
  # Bloat breakdown: the first capture of this regex on a tool name names its group
317
318
  # (no match = "builtin"). The leading _? keeps underscore-prefixed MCP names grouped.
318
- tool_group: '^_?mcp__([A-Za-z0-9]+)_'
319
+ tool_group: '^_?mcp__([A-Za-z0-9]+)_' # regex that names a tool's group
319
320
  owned_repos: [] # product names another product's run may not read quietly; the intended list lives in docs/config.md
320
321
  actions:
321
322
  secret_globs: # a read matching any glob is a high finding; evidence is masked either way
@@ -340,8 +341,8 @@ traces:
340
341
  - "main-guard:"
341
342
  poll_pattern: '^\s*(sleep\s+\d|ps\b|pgrep\b)' # shell commands that poll while nothing else runs
342
343
  briefs: # brief-quality rules (src/core/trace-briefs.ts): what a spawn brief names, and the report's length buckets
343
- verify_pattern: '\b(?:bun test|bun run typecheck|pytest|npm test|go test|cargo test)\b'
344
- phase_pattern: '\bP\d+[a-z]?\b'
345
- plan_pattern: 'docs/plans/\S+\.md'
344
+ verify_pattern: '\b(?:bun test|bun run typecheck|pytest|npm test|go test|cargo test)\b' # regex that spots a verify command in a brief
345
+ phase_pattern: '\bP\d+[a-z]?\b' # regex that spots a phase label
346
+ plan_pattern: 'docs/plans/\S+\.md' # regex that spots a plan path
346
347
  char_buckets: [1500, 4000] # brief length edges: <1500, 1500-3999, >=4000
347
348
  min_n: 5 # the report shows a mean only with at least this many rows on that side