Repository navigation
Commit c231449
committed
feat(organize): expose the organizer to agents as memory_organize (#231)
The engine landed in v0.8 with an explicit "not in the tool list yet" note, and
nothing outside test/organize.test.js could reach it: no tool registration, no
hit on either API surface, no `.organize(` call site in the repo. This is the
throttle: a `memory_organize` tool (mode dryRun|apply) behind a flat
`organizeEnabled` switch, off by default and off in the lightMode preset.
Hidden-by-default reuses the v0.8.5 lever — a model that cannot see the tool
does not call it. Light mode presets it off for a protocol reason, not a cost
one: apply must carry the previous report's run_id, which is the step weak
models drop. Preset only; an explicit user switch still wins.
apply's `opts.hiddenIds` finally gets a producer. Without one the organizer
would be a second path around scope governance, so the tool layer computes it
with the #170 rule-4 idiom (same shape as register_document's
hiddenEvidenceIds); invisible rows stay "unknown, archived or out of scope", so
no existence leak. Candidates are stamped from the session identity like
memory_save — otherwise rows written through organize would all land unscoped.
Guards updated in the same pass: #195 matrix (both branches; its list and
structure checks now run with exposure gates on, since an opt-in tool is absent
from the default registry), tools.test.js schema subset, api.test.js flag count
lock 103 -> 104, CONFIGURATION.md key + light-mode list.1 parent 4abb257 commit c231449
16 files changed
Lines changed: 763 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| 324 | + | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
852 | 865 | | |
853 | 866 | | |
854 | 867 | | |
| |||
966 | 979 | | |
967 | 980 | | |
968 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
969 | 986 | | |
970 | 987 | | |
971 | 988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2568 | 2568 | | |
2569 | 2569 | | |
2570 | 2570 | | |
2571 | | - | |
2572 | | - | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
2573 | 2574 | | |
2574 | 2575 | | |
2575 | 2576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| |||
0 commit comments