notesoup 0.61.0 → 0.62.0
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/.agents/plugins/marketplace.json +15 -0
- package/README.md +14 -11
- package/dist/plugins/antigravity/src/cli.d.ts +1 -0
- package/dist/plugins/antigravity/src/cli.js +23 -0
- package/dist/plugins/antigravity/src/hooks.d.ts +18 -0
- package/dist/plugins/antigravity/src/hooks.js +53 -0
- package/dist/plugins/antigravity/src/identity.d.ts +26 -0
- package/dist/plugins/antigravity/src/identity.js +129 -0
- package/dist/plugins/claude/src/helper.js +2 -1
- package/dist/plugins/codex/src/hooks.js +1 -0
- package/dist/plugins/codex/src/identity.d.ts +6 -1
- package/dist/plugins/codex/src/identity.js +13 -1
- package/dist/plugins/codex/src/mcp.d.ts +35 -7
- package/dist/plugins/codex/src/mcp.js +26 -88
- package/dist/plugins/codex/src/text.js +3 -3
- package/dist/plugins/dsh/tools.js +8 -4
- package/dist/plugins/mcp/operations.d.ts +15 -0
- package/dist/plugins/mcp/operations.js +43 -0
- package/dist/plugins/mcp/server.d.ts +14 -0
- package/dist/plugins/mcp/server.js +13 -0
- package/dist/plugins/pi/budget.d.ts +1 -1
- package/dist/plugins/pi/budget.js +3 -2
- package/dist/plugins/pi/entries.d.ts +1 -0
- package/dist/plugins/pi/entries.js +1 -0
- package/dist/plugins/pi/history-tools.js +2 -1
- package/dist/plugins/pi/history.js +18 -1
- package/dist/plugins/pi/notes/tools.js +7 -3
- package/dist/plugins/pi/render.d.ts +7 -1
- package/dist/plugins/pi/render.js +2 -2
- package/dist/plugins/pi/reset/lifecycle.d.ts +1 -1
- package/dist/plugins/pi/reset/lifecycle.js +8 -9
- package/dist/plugins/pi/runtime.js +102 -61
- package/dist/plugins/pi/tool-result.js +7 -7
- package/dist/plugins/pi/window.d.ts +33 -3
- package/dist/plugins/pi/window.js +209 -9
- package/dist/src/boot/render.js +18 -15
- package/dist/src/boot/text.d.ts +3 -1
- package/dist/src/boot/text.js +22 -20
- package/dist/src/budget/text.d.ts +2 -2
- package/dist/src/budget/text.js +13 -13
- package/dist/src/history/claude.d.ts +2 -0
- package/dist/src/history/claude.js +46 -0
- package/dist/src/history/codex-transcript.js +7 -5
- package/dist/src/history/codex.js +3 -0
- package/dist/src/history/corpus.d.ts +28 -1
- package/dist/src/history/corpus.js +40 -0
- package/dist/src/history/history.d.ts +37 -46
- package/dist/src/history/history.js +21 -40
- package/dist/src/history/local.js +67 -32
- package/dist/src/history/pi.d.ts +2 -1
- package/dist/src/history/pi.js +122 -48
- package/dist/src/history/prefilter.js +76 -19
- package/dist/src/history/query.d.ts +28 -49
- package/dist/src/history/query.js +83 -68
- package/dist/src/history/summary-cache.d.ts +8 -1
- package/dist/src/history/summary-cache.js +138 -12
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/notes/errors.d.ts +1 -1
- package/dist/src/notes/frontmatter.d.ts +0 -2
- package/dist/src/notes/frontmatter.js +0 -2
- package/dist/src/notes/index.d.ts +1 -1
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/policy.d.ts +15 -1
- package/dist/src/notes/policy.js +46 -5
- package/dist/src/notes/store.d.ts +12 -0
- package/dist/src/notes/store.js +16 -20
- package/dist/src/text-match.d.ts +10 -1
- package/dist/src/text-match.js +42 -3
- package/dist/src/tools/dream.d.ts +22 -93
- package/dist/src/tools/dream.js +30 -27
- package/dist/src/tools/history.d.ts +33 -26
- package/dist/src/tools/history.js +257 -163
- package/dist/src/tools/notes.d.ts +51 -163
- package/dist/src/tools/notes.js +146 -100
- package/dist/src/tools/output.d.ts +2 -1
- package/dist/src/tools/output.js +2 -1
- package/dist/src/tools/result.d.ts +4 -7
- package/dist/src/tools/result.js +8 -9
- package/dist/src/tools/schema.d.ts +4 -1
- package/dist/src/tools/schema.js +25 -1
- package/dist/test/agent-loop.test.js +198 -16
- package/dist/test/antigravity-live.test.d.ts +1 -0
- package/dist/test/antigravity-live.test.js +142 -0
- package/dist/test/antigravity-plugin.test.d.ts +1 -0
- package/dist/test/antigravity-plugin.test.js +101 -0
- package/dist/test/boot.integration.test.js +133 -14
- package/dist/test/claude-history.test.js +14 -13
- package/dist/test/claude-mod.test.js +9 -6
- package/dist/test/codex-history.test.js +15 -3
- package/dist/test/codex-plugin.test.js +76 -38
- package/dist/test/dependencies.test.js +7 -3
- package/dist/test/dream-skill.test.js +3 -3
- package/dist/test/dream-tools.test.js +101 -56
- package/dist/test/dsh.test.js +34 -19
- package/dist/test/helpers/dependency-graph.js +2 -2
- package/dist/test/helpers/extension.d.ts +65 -2
- package/dist/test/helpers/extension.js +72 -3
- package/dist/test/history-corpus.test.js +79 -77
- package/dist/test/history-summary-cache.test.js +97 -9
- package/dist/test/history.integration.test.js +234 -168
- package/dist/test/host-neutral.test.js +69 -19
- package/dist/test/marker.test.js +1 -1
- package/dist/test/note-policy.test.js +96 -77
- package/dist/test/notes.integration.test.js +212 -94
- package/dist/test/notes.test.js +184 -113
- package/dist/test/pi-render.test.js +20 -12
- package/dist/test/project-namespace.test.js +3 -2
- package/dist/test/reset-lifecycle.test.js +2 -2
- package/docs/antigravity.md +44 -0
- package/docs/architecture.md +6 -4
- package/docs/claude-code-mod.md +2 -2
- package/docs/codex.md +36 -38
- package/docs/dsh.md +3 -3
- package/docs/history-sessions.md +28 -50
- package/docs/notes-library.md +4 -4
- package/docs/skills.md +3 -3
- package/docs/tool-results.md +47 -28
- package/package.json +3 -2
- package/playbook.md +1 -1
- package/plugins/antigravity/dist/antigravity/notesoup.js +26886 -0
- package/plugins/antigravity/hooks.json +7 -0
- package/plugins/antigravity/mcp_config.json +8 -0
- package/plugins/antigravity/plugin.json +6 -0
- package/plugins/antigravity/src/cli.ts +22 -0
- package/plugins/antigravity/src/hooks.ts +51 -0
- package/plugins/antigravity/src/identity.ts +127 -0
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/dist/claude/helper.js +1059 -534
- package/plugins/claude/hooks/register.ts +2 -2
- package/plugins/claude/playbook.md +1 -1
- package/plugins/claude/skills/dream/SKILL.md +1 -1
- package/plugins/claude/skills/notesoup/SKILL.md +92 -0
- package/plugins/claude/src/helper.ts +2 -1
- package/plugins/codex/.codex-plugin/plugin.json +8 -0
- package/plugins/codex/.mcp.json +11 -0
- package/plugins/codex/README.md +5 -21
- package/plugins/codex/dist/codex/notesoup.js +18480 -17946
- package/plugins/codex/src/hooks.ts +1 -0
- package/plugins/codex/src/identity.ts +14 -1
- package/plugins/codex/src/mcp.ts +28 -98
- package/plugins/codex/src/text.ts +3 -3
- package/plugins/dsh/tools.ts +8 -4
- package/plugins/mcp/operations.ts +50 -0
- package/plugins/mcp/server.ts +23 -0
- package/plugins/paseo/README.md +5 -10
- package/plugins/paseo/client/brain-empty-card.tsx +3 -3
- package/plugins/paseo/client/markdown.tsx +50 -38
- package/plugins/paseo/client/notes-op-card.tsx +12 -9
- package/plugins/paseo/client/paper-card.tsx +6 -5
- package/plugins/paseo/client/paper-palette.ts +2 -9
- package/plugins/paseo/client/sticky-card.tsx +2 -2
- package/plugins/paseo/client/tool-result.ts +7 -14
- package/plugins/paseo/package-lock.json +3406 -0
- package/plugins/paseo/package.json +1 -0
- package/plugins/paseo/test/markdown-core.test.ts +73 -66
- package/plugins/pi/budget.ts +3 -3
- package/plugins/pi/entries.ts +1 -0
- package/plugins/pi/history-tools.ts +2 -1
- package/plugins/pi/history.ts +30 -1
- package/plugins/pi/notes/tools.ts +7 -3
- package/plugins/pi/render.ts +6 -6
- package/plugins/pi/reset/lifecycle.ts +9 -10
- package/plugins/pi/runtime.ts +96 -60
- package/plugins/pi/tool-result.ts +8 -8
- package/plugins/pi/window.ts +198 -9
- package/skills/dream/SKILL.md +1 -1
- package/skills/notesoup/SKILL.md +92 -0
- package/src/boot/render.ts +18 -15
- package/src/boot/text.ts +23 -19
- package/src/budget/text.ts +13 -13
- package/src/history/claude.ts +41 -0
- package/src/history/codex-transcript.ts +6 -4
- package/src/history/codex.ts +2 -0
- package/src/history/corpus.ts +51 -2
- package/src/history/history.ts +35 -44
- package/src/history/local.ts +67 -27
- package/src/history/pi.ts +113 -35
- package/src/history/prefilter.ts +73 -15
- package/src/history/query.ts +93 -73
- package/src/history/summary-cache.ts +142 -17
- package/src/index.ts +1 -1
- package/src/notes/errors.ts +1 -1
- package/src/notes/frontmatter.ts +0 -3
- package/src/notes/index.ts +1 -1
- package/src/notes/policy.ts +44 -5
- package/src/notes/store.ts +17 -20
- package/src/text-match.ts +46 -4
- package/src/tools/dream.ts +29 -31
- package/src/tools/history.ts +249 -142
- package/src/tools/notes.ts +145 -113
- package/src/tools/output.ts +2 -1
- package/src/tools/result.ts +12 -11
- package/src/tools/schema.ts +24 -1
- package/plugins/claude/skills/memory/SKILL.md +0 -69
- package/plugins/codex/mcp.json +0 -10
- package/plugins/codex/plugin.json +0 -6
- package/plugins/paseo/client/markdown-core.tsx +0 -189
- package/plugins/paseo/client/typography.ts +0 -24
- package/skills/memory/SKILL.md +0 -69
|
@@ -458,7 +458,7 @@ export function register(on: On) {
|
|
|
458
458
|
const wipe = await $.tool.register({
|
|
459
459
|
name: "empty_brain",
|
|
460
460
|
description: "Clear your in-context memory and start a fresh context window. Your session, notes, and history survive. Pass `last_word` to stick a tiny note on your forehead for after the wipe.",
|
|
461
|
-
inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note
|
|
461
|
+
inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note (at most 300 characters), slapped on your forehead after the wipe." }, terminate: { type: "boolean", description: "Stop after the wipe.", default: false } }, additionalProperties: false },
|
|
462
462
|
isDeferred: false,
|
|
463
463
|
} satisfies ToolSpec)
|
|
464
464
|
registered.add(wipe.tool)
|
|
@@ -620,7 +620,7 @@ async function callNotesTool($: Engine, state: ResetState, e: ToolCallInput): Pr
|
|
|
620
620
|
if (state.flow.requestReset({ lastWord, terminate: terminate === true })) state.continuation = undefined
|
|
621
621
|
return { result: `Brain reset requested. This tool batch will finish, then the turn stops before its next model request unless it has new user input to handle. Your notes and sticky note survive the reset.${state.flow.request!.resume ? " You will continue in a fresh window after the reset." : " No automatic continuation will be submitted."}` }
|
|
622
622
|
}
|
|
623
|
-
const history = name === "history_list" || name === "history_read"
|
|
623
|
+
const history = name === "history_list" || name === "history_search" || name === "history_read"
|
|
624
624
|
if (history && agentId !== undefined) return errorResult("history is unavailable for subagents; main-session history is not their transcript")
|
|
625
625
|
const result = await run($, { op: "tool", tool: name, params, identity, history: state.history }, history ? HISTORY_TIMEOUT_MS : TIMEOUT_MS)
|
|
626
626
|
if (!result.ok) return errorResult(result.error)
|
|
@@ -27,7 +27,7 @@ Durable notes hold decisions, constraints, and lessons that stay true after the
|
|
|
27
27
|
5. **Relocate misfiled notes.** When a standing ruling or the note's own `description` already names its proper notebook, move it there, preserving its metadata, and keep its `description` true. Do it, don't propose it. Propose only when the destination notebook itself is unclear.
|
|
28
28
|
6. **Preserve meaning and provenance.** Keep facts, conditions, exceptions, uncertainty, authorship, and sources. When promoting a finding, cite its source. Do not relabel agent-authored material as human-authored. If its destination or authority is unclear, propose the promotion instead.
|
|
29
29
|
7. **Keep notes manageable.** Aim below about 200 lines / 8KB per note. Split oversized notes by topic with one-line cross-links.
|
|
30
|
-
8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds standing reminders
|
|
30
|
+
8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds compact standing reminders; it is the one default-pinned page and loads every window when live unless explicitly unpinned. Every durable note gets a short one-line `description` saying what it holds and when to open it — boot lists each notebook's unpinned notes newest first from these, so a missing, stale, or vague description hides the page. A hand-written `MAP.md` is an ordinary note now; once its lines live in `description`s, crumple it. Do not create empty pages. Pin slots per notebook are capped, and each page carries a UTF-8 byte budget (4 KB for `CHEATSHEET.md`, 8 KB for ordinary notes; overridable in frontmatter); overflow warns, and boot truncates over-budget pinned bodies. Preserve standing rules and keep descriptions true as notes are promoted or retired.
|
|
31
31
|
|
|
32
32
|
## Deleting
|
|
33
33
|
|
|
@@ -5,7 +5,7 @@ description: Review and consolidate durable notes using notesoup's shared dream
|
|
|
5
5
|
|
|
6
6
|
# Dream
|
|
7
7
|
|
|
8
|
-
Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate `CHEATSHEET.md
|
|
8
|
+
Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate compact `CHEATSHEET.md`, the one default-pinned page; it loads every window when live unless explicitly unpinned. Every durable note carries a short one-line `description` saying what it holds and when to open it — boot renders each notebook's index from these, so a missing or stale description is an index defect. Pages carry UTF-8 byte budgets (4 KB for `CHEATSHEET.md`, 8 KB for ordinary notes, overridable in frontmatter); overflow warns, and boot truncates over-budget pinned bodies. Respect soft readonly locks; explicitly unlock with `readonly:false` before changing a locked note.
|
|
9
9
|
|
|
10
10
|
Dream in this agent's current session. Do not start another agent or model unless the human asks.
|
|
11
11
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notesoup
|
|
3
|
+
description: How notesoup's `notes_*` and `history_*` tools fit together — note addresses and notebooks, finding things again, and saving recovery state. Use when the context-window protocol is missing or unclear, or when unsure where a note belongs or how to find something again.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Notesoup
|
|
7
|
+
|
|
8
|
+
Two stores outlive the context window. Anything in neither is lost when the window ends or is wiped.
|
|
9
|
+
|
|
10
|
+
- **Notes** (`notes_*`) — what you choose to keep. Plain markdown, written on purpose.
|
|
11
|
+
- **History** (`history_*`) — recorded messages, tool calls and summaries. Current session by default; other local sessions/harnesses through `session`. Read-only.
|
|
12
|
+
|
|
13
|
+
Each tool's own description covers its parameters and paging. This guide covers what the descriptions cannot: where notes belong, and how the tools work together.
|
|
14
|
+
|
|
15
|
+
## Addresses
|
|
16
|
+
|
|
17
|
+
The address decides who a note belongs to and how long it lasts.
|
|
18
|
+
|
|
19
|
+
| Address | Note | Keep there |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<path>`, no `@` | session note | current task state and loose ends; gone with the session |
|
|
22
|
+
| `@project/<path>` | project note | decisions and constraints future work must respect |
|
|
23
|
+
| `@human/<path>` | human note | how to work with this human, across projects |
|
|
24
|
+
| `@self/<path>` | self note | your reminders; yours alone if you have a name, shared by everyone nameless |
|
|
25
|
+
| `@model/<path>` | model note | what applies to this model only |
|
|
26
|
+
| `@projects/<name>/<path>` | named project, read-only | discover names and root paths with `notes_list` glob `@projects/*/**` |
|
|
27
|
+
| `@sessions/<id>/<path>` | named session, read-only | recover earlier task state; discover with glob `@sessions/*/**` |
|
|
28
|
+
|
|
29
|
+
When notes conflict, the one most relevant to what you're doing applies. If that doesn't settle it, judge the case.
|
|
30
|
+
|
|
31
|
+
Any other `@` prefix is refused. A path is relative and `/`-separated, with no empty, `.` or `..` segments.
|
|
32
|
+
|
|
33
|
+
`@` addresses are not file paths: never pass them to file tools like `read`, `write`, `edit`, or `bash`. That creates a stray directory instead of a note.
|
|
34
|
+
|
|
35
|
+
`CHEATSHEET.md` at each notebook's root is the default-pinned page you wake up with; absent or crumpled pages are skipped. Set `pinned`, `readonly`, and `description` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page; each page carries a UTF-8 byte budget (4 KB for root `CHEATSHEET.md`, 8 KB for ordinary notes; overridable in frontmatter). Overflow on body budget or an oversized description warns but still saves; boot truncates over-budget pinned bodies and oversized descriptions. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep `CHEATSHEET.md` compact with short bullets. Give each durable note a short one-line `description`: boot lists every notebook's unpinned pages newest first as address, age, and description, so it is the only index. Do not create empty pages.
|
|
36
|
+
|
|
37
|
+
Keep notes focused on what is true now; if a piece of past context still matters (such as why an approach was ruled out), keep only a brief summary rather than a blow-by-blow log. Crumple notes that are no longer true; a stale note is worse than none.
|
|
38
|
+
|
|
39
|
+
## Finding things again
|
|
40
|
+
|
|
41
|
+
### Notes
|
|
42
|
+
|
|
43
|
+
In `notes_list`, omit `glob` for this session and the current shared notebooks. Use `**` for all notebooks or `@sessions/*/**` for all sessions.
|
|
44
|
+
|
|
45
|
+
- **A note**: add `glob` to narrow where `notes_list` looks, and `query` if you remember a phrase. Then use `notes_read` with the address and, for a match, its `offset_chars`.
|
|
46
|
+
- **Older notes**: when `notes_list` ends with `→ older: {…}`, call it again with that object to see older matches. Continue until the line is gone.
|
|
47
|
+
### Shared search and read conventions
|
|
48
|
+
|
|
49
|
+
Queries look for literal text, ignoring case. A list of phrases matches any one of them.
|
|
50
|
+
|
|
51
|
+
Both list tools report omissions and partial previews. A truncated result is not the whole
|
|
52
|
+
record.
|
|
53
|
+
|
|
54
|
+
Read offsets count characters relative to the body or event document, not the
|
|
55
|
+
presentation header.
|
|
56
|
+
|
|
57
|
+
Continue an incomplete read at the offset named in its trailing notice. A concurrent edit can
|
|
58
|
+
change a note's offsets.
|
|
59
|
+
|
|
60
|
+
All shared tools return text. On supported hosts, `notes_read` also returns the note body
|
|
61
|
+
`text` without presentation markers, plus `next_offset_chars`, metadata and warnings.
|
|
62
|
+
|
|
63
|
+
When carrying a reference into another window, save its full address or event identity, not just
|
|
64
|
+
a quotation; you can retrieve the text again.
|
|
65
|
+
|
|
66
|
+
### History
|
|
67
|
+
|
|
68
|
+
- **Browse a known timeline**: `history_list({ before: 190 })` uses exclusive integer seq bounds (see the boot window tree for earlier windows), with optional ISO 8601 `since` / `until`. With `after` (or `since` alone) you page forward; otherwise take the newest events. Follow the older/newer and expand recipes.
|
|
69
|
+
- **List sessions**: pass a wildcard such as `session: "*"` or `"pi:*"` to `history_list` for one representative event per session (default 20 sessions), optionally narrowed with `roles` and `since` / `until`.
|
|
70
|
+
- **Find a passage**: `history_search({ query: "remembered phrase", context: 1 })` searches all roles in the current session, one named session, or a wildcard such as `session: "*"`, with optional neighboring events, `roles`, and ISO 8601 `since` / `until`. `query` is required (an empty query returns no matches).
|
|
71
|
+
- **Target one session**: all three tools accept an ID or prefix, optionally qualified with `pi:`, `claude:`, `codex:` or `dsh:`. Omit `session` for this session. If ambiguous, pass a longer or qualified ID. DSH sessions are available only from DSH.
|
|
72
|
+
- **Open a passage**: `history_read({ seq: 42 })` reads one event. If a session heading is shown above the event, include the full session ID; if a preview offset is shown, pass it as `offset_chars`. Follow the continuation to read more.
|
|
73
|
+
|
|
74
|
+
Save the seq and full session ID together when carrying a cross-session reference into another window. An empty search is not proof an event never happened: wildcard searches skip sessions that cannot be read.
|
|
75
|
+
|
|
76
|
+
## Saving recovery state
|
|
77
|
+
|
|
78
|
+
Before a long or risky step, or when room runs low, keep session notes named for what they hold (not `current.md`) and rewrite them in place with short sections and bullets instead of starting new ones or appending a timeline. Skip standing rules already in `@project`/`@human`/`@self`/`@model` and commit details git can show; record only the live delta:
|
|
79
|
+
|
|
80
|
+
- current status, blockers, and the next action
|
|
81
|
+
- what the human decided (in their words)
|
|
82
|
+
- what failed, and why
|
|
83
|
+
- where half-done work and unrecorded findings live (branches, worktrees, scratch paths, drafts, running tasks, key facts not saved elsewhere)
|
|
84
|
+
- skills, notes, files, or already-found history seqs to reopen
|
|
85
|
+
|
|
86
|
+
`get_context_remaining` reports the room left. `empty_brain` starts a fresh window, so save the note first.
|
|
87
|
+
|
|
88
|
+
## When a tool is missing or refuses
|
|
89
|
+
|
|
90
|
+
A refusal displays `error: <code>: <message>`; read the message before retrying. `notes_read` also supplies `{ error, code }` where structured results are available.
|
|
91
|
+
|
|
92
|
+
If a `notes_*` or `history_*` tool is absent or fails at the host level, do not imitate it: no filesystem tools on `@` addresses, and no reading or editing note storage or session files directly. Use the tools that remain, tell the human which one is missing, and keep essential state in the reply.
|
|
@@ -4,7 +4,7 @@ import type { Static, TSchema } from "typebox";
|
|
|
4
4
|
import { Check } from "typebox/value";
|
|
5
5
|
import { paramProblem } from "../../../src/tools/schema.js";
|
|
6
6
|
import { notesList, notesRead, notesUpdate, notesWrite } from "../../../src/tools/notes.js";
|
|
7
|
-
import { historyList, historyRead, type HistoryTextWrapper } from "../../../src/tools/history.js";
|
|
7
|
+
import { historyList, historySearch, historyRead, type HistoryTextWrapper } from "../../../src/tools/history.js";
|
|
8
8
|
import { localHistoryCorpus, type LocalHistoryOptions } from "../../../src/history/local.js";
|
|
9
9
|
import { readClaudeHistory, type ClaudeHistorySource } from "./history.js";
|
|
10
10
|
import { loadNotesSnapshot } from "../../../src/boot/snapshot.js";
|
|
@@ -58,6 +58,7 @@ const OPERATIONS: Record<string, BoundOperation<[NotesToolContext]>> = {
|
|
|
58
58
|
|
|
59
59
|
const HISTORY_OPERATIONS = {
|
|
60
60
|
history_list: boundOperation(historyList),
|
|
61
|
+
history_search: boundOperation(historySearch),
|
|
61
62
|
history_read: boundOperation(historyRead),
|
|
62
63
|
};
|
|
63
64
|
function historySource(value: unknown, sessionId: string): ClaudeHistorySource {
|
package/plugins/codex/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
# notesoup for Codex
|
|
2
2
|
|
|
3
|
-
Native notes and history for Codex
|
|
3
|
+
Native model-context boot, notes and history for Codex. Validated against real root and independent child turns on Codex 0.171.0. Rollout support is shape-checked, not pinned to a CLI version.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Build the bundle, add this repository as a marketplace, install the plugin, and approve its hooks:
|
|
5
|
+
Build, add the checkout as a marketplace, and install the native plugin:
|
|
8
6
|
|
|
9
7
|
```sh
|
|
10
8
|
npm ci && npm run build
|
|
@@ -12,7 +10,7 @@ codex plugin marketplace add /absolute/path/to/notesoup
|
|
|
12
10
|
codex plugin add notesoup@notesoup
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
Review and trust the notesoup hooks and MCP tool permissions in Codex. Merge the native feature configuration into your existing `config.toml`:
|
|
16
14
|
|
|
17
15
|
```toml
|
|
18
16
|
[features]
|
|
@@ -24,20 +22,6 @@ enabled = true
|
|
|
24
22
|
use_history_notes_extension = false
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## What it does
|
|
30
|
-
|
|
31
|
-
- The `SessionStart` hook reads the native rollout, binds thread identity from hook facts, and returns the notes boot for the current native window. A restart, resume or compact without an existing boot for that window gets one.
|
|
32
|
-
- `notes_*` uses `NOTESOUP_HOME` (default `~/.agents/notes`) and the current turn's model for `@model`.
|
|
33
|
-
- `history_*` reads the local rollout: root windows and a child's own ancestry. Window ids are `codex:<thread>:<native-window-uuid>`.
|
|
34
|
-
- Stale roots, missing windows, missing turn models and missing bindings are refusals. Resume or compact once to rebind.
|
|
35
|
-
- A child `PreCompact` is stopped with `continue: false`: Codex 0.160.1 has no child post-compact recovery hook. Save a handoff and start a fresh child.
|
|
36
|
-
|
|
37
|
-
Requires Node **>=22.15** for compressed `.jsonl.zst` rollouts.
|
|
38
|
-
|
|
39
|
-
## Limits
|
|
40
|
-
|
|
41
|
-
128 KiB boot cap (host spilling disabled), 32 KiB tool results, local rollout history only, no MCP reset or budget fallback, no dream backend, no notifications or commands. Codex versions other than 0.160.1 are refused.
|
|
25
|
+
Root and child first-turn hooks inject their respective boots before any tool call. Native `new_context` and `get_context_remaining` stay Codex's own tools. Child post-compact recovery is not supported by the native hook contract: save a handoff and start a new child instead.
|
|
42
26
|
|
|
43
|
-
|
|
27
|
+
Requires Node >=22.15 for compressed rollouts. See [docs/codex.md](../../docs/codex.md) for installation, identity rules, test coverage and limits.
|