notesoup 0.61.0 → 0.63.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 +24 -5
- package/dist/plugins/claude/src/text.d.ts +7 -0
- package/dist/plugins/claude/src/text.js +12 -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 +4 -1
- package/dist/plugins/pi/budget.js +35 -8
- package/dist/plugins/pi/entries.d.ts +2 -0
- package/dist/plugins/pi/entries.js +2 -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/artifacts.d.ts +1 -1
- package/dist/plugins/pi/reset/artifacts.js +4 -4
- package/dist/plugins/pi/reset/lifecycle.d.ts +9 -2
- package/dist/plugins/pi/reset/lifecycle.js +109 -31
- package/dist/plugins/pi/runtime.js +104 -63
- package/dist/plugins/pi/tool-result.js +7 -7
- package/dist/plugins/pi/window.d.ts +25 -3
- package/dist/plugins/pi/window.js +219 -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 +7 -3
- package/dist/src/budget/text.js +24 -15
- 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 +2 -2
- 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 +394 -56
- 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 +156 -15
- package/dist/test/budget-settings.integration.test.js +4 -4
- package/dist/test/claude-history.test.js +14 -13
- package/dist/test/claude-mod.test.js +199 -16
- package/dist/test/claude-validation.test.js +69 -2
- 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 +68 -3
- package/dist/test/helpers/extension.js +74 -5
- 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/model-facing-text.test.js +13 -3
- 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 +12 -2
- package/docs/antigravity.md +44 -0
- package/docs/architecture.md +6 -4
- package/docs/claude-code-mod.md +7 -7
- 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/reset-lifecycle.md +1 -1
- 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 +1108 -539
- package/plugins/claude/hooks/register.ts +202 -62
- package/plugins/claude/playbook.md +1 -1
- package/plugins/claude/skills/dream/SKILL.md +1 -1
- package/plugins/claude/skills/notesoup-guide/SKILL.md +92 -0
- package/plugins/claude/src/helper.ts +24 -5
- package/plugins/claude/src/text.ts +14 -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 +31 -8
- package/plugins/pi/entries.ts +2 -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/artifacts.ts +4 -3
- package/plugins/pi/reset/lifecycle.ts +125 -32
- package/plugins/pi/runtime.ts +98 -62
- package/plugins/pi/tool-result.ts +8 -8
- package/plugins/pi/window.ts +210 -10
- package/skills/dream/SKILL.md +1 -1
- package/skills/notesoup-guide/SKILL.md +92 -0
- package/src/boot/render.ts +18 -15
- package/src/boot/text.ts +23 -19
- package/src/budget/text.ts +27 -15
- 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 +2 -2
- 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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { realpathSync } from "node:fs";
|
|
1
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
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";
|
|
11
11
|
import { renderBootBlock } from "../../../src/boot/render.js";
|
|
12
12
|
import type { BootToolNames } from "../../../src/boot/text.js";
|
|
13
13
|
import { selectContinuation } from "../../../src/budget/text.js";
|
|
14
|
-
import { claudeHistoryGapNotice, claudeHistoryUnconfirmedSeq, CLAUDE_HISTORY_UNKNOWN_WINDOW, CLAUDE_HISTORY_UNAVAILABLE_SENTENCE, CLAUDE_WARNING_PROMPT } from "./text.js";
|
|
14
|
+
import { claudeCommandWarningContent, claudeHistoryGapNotice, claudeHistoryUnconfirmedSeq, CLAUDE_COMMAND_PROMPTED_HEAD, CLAUDE_HISTORY_UNKNOWN_WINDOW, CLAUDE_HISTORY_UNAVAILABLE_SENTENCE, CLAUDE_WARNING_PROMPT } from "./text.js";
|
|
15
15
|
import { resolveClaudeLimits } from "./thresholds.js";
|
|
16
16
|
import { parseContextCap } from "../../../src/budget/cap.js";
|
|
17
17
|
import { projectKey, snapshotNotesIdentity, type NotesIdentity } from "../../../src/notes/index.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 {
|
|
@@ -67,6 +68,18 @@ function historySource(value: unknown, sessionId: string): ClaudeHistorySource {
|
|
|
67
68
|
return source;
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
function readPluginVersion(): string {
|
|
72
|
+
for (const candidate of ["../../.claude-plugin/plugin.json", "../../../../package.json", "../../../package.json"]) {
|
|
73
|
+
try {
|
|
74
|
+
const parsed = JSON.parse(readFileSync(new URL(candidate, import.meta.url), "utf8")) as { version?: unknown };
|
|
75
|
+
if (typeof parsed.version === "string" && parsed.version.length > 0) return parsed.version;
|
|
76
|
+
} catch { /* try the next layout */ }
|
|
77
|
+
}
|
|
78
|
+
return "dev";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const PLUGIN_VERSION = readPluginVersion();
|
|
82
|
+
|
|
70
83
|
export async function dispatch(request: unknown, historyOptions: Pick<LocalHistoryOptions, "roots" | "home" | "env"> = {}): Promise<unknown> {
|
|
71
84
|
if (!request || typeof request !== "object" || Array.isArray(request)) throw new Error("malformed request");
|
|
72
85
|
const value = request as Record<string, unknown>;
|
|
@@ -83,11 +96,17 @@ export async function dispatch(request: unknown, historyOptions: Pick<LocalHisto
|
|
|
83
96
|
if (value.op === "schemas") return [...Object.entries(OPERATIONS), ...Object.entries(HISTORY_OPERATIONS)].map(([name, operation]) => ({ name, description: operation.description, inputSchema: JSON.parse(JSON.stringify(operation.parameters)) }));
|
|
84
97
|
// The shared reset prose lives here, not in the sandboxed hooks module, so Pi and Claude
|
|
85
98
|
// cannot drift apart. The hooks module caches one copy per session.
|
|
86
|
-
if (value.op === "texts") return {
|
|
99
|
+
if (value.op === "texts") return {
|
|
100
|
+
version: PLUGIN_VERSION,
|
|
101
|
+
warning: CLAUDE_WARNING_PROMPT,
|
|
102
|
+
commandBare: claudeCommandWarningContent(),
|
|
103
|
+
commandPrompted: CLAUDE_COMMAND_PROMPTED_HEAD,
|
|
104
|
+
historyUnavailableSentence: CLAUDE_HISTORY_UNAVAILABLE_SENTENCE,
|
|
105
|
+
};
|
|
87
106
|
// The caller draws once per artifact and caches the answer; text reads never draw.
|
|
88
107
|
if (value.op === "continuation") {
|
|
89
108
|
if (value.origin !== "normal" && value.origin !== "forced") throw new Error("invalid reset origin");
|
|
90
|
-
return { text: selectContinuation(value.origin) };
|
|
109
|
+
return { text: selectContinuation(value.origin, { betweenTurns: value.betweenTurns === true }) };
|
|
91
110
|
}
|
|
92
111
|
// Threshold derivation crosses the boundary as raw facts: everything the engine could
|
|
93
112
|
// read, unvalidated. resolveClaudeLimits guards every field and never throws.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { warningNotice } from "../../../src/budget/text.js";
|
|
1
|
+
import { COUNTDOWN_LINE, GUIDANCE_CLOSE_TAG, GUIDANCE_OPEN_TAG, WARNING_BODY, WARNING_CALL, warningNotice } from "../../../src/budget/text.js";
|
|
2
2
|
|
|
3
3
|
/** Claude's boot says history is missing rather than naming tools it cannot serve. */
|
|
4
4
|
export const CLAUDE_HISTORY_UNAVAILABLE_SENTENCE = "History isn't available in this Claude session: no main transcript_path was supplied. Keep essential state in notes; don't pretend those notes are the missing transcript.";
|
|
@@ -6,6 +6,19 @@ export const CLAUDE_HISTORY_UNAVAILABLE_SENTENCE = "History isn't available in t
|
|
|
6
6
|
/** The same notice as Pi; empty_brain's result explains Claude's deferred reset. */
|
|
7
7
|
export const CLAUDE_WARNING_PROMPT = warningNotice();
|
|
8
8
|
|
|
9
|
+
/** Manual close-out notices omit budget timing and never claim Claude's chat view is erased. */
|
|
10
|
+
export const CLAUDE_COMMAND_NOTICE = {
|
|
11
|
+
prompted: "The human ran /empty. Save your notes now and call `empty_brain` immediately. The command below is context for your notes, not a task for the fresh window.",
|
|
12
|
+
bare: "The human ran /empty. Save your notes now and call `empty_brain` immediately.",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const CLAUDE_COMMAND_PROMPTED_HEAD = `${GUIDANCE_OPEN_TAG}\n${CLAUDE_COMMAND_NOTICE.prompted}\n${WARNING_BODY}\n${WARNING_CALL}\n${COUNTDOWN_LINE}\n${GUIDANCE_CLOSE_TAG}`;
|
|
16
|
+
|
|
17
|
+
export function claudeCommandWarningContent(commandLine?: string): string {
|
|
18
|
+
if (commandLine) return `${CLAUDE_COMMAND_PROMPTED_HEAD}\n${commandLine}`;
|
|
19
|
+
return `${GUIDANCE_OPEN_TAG}\n${CLAUDE_COMMAND_NOTICE.bare}\n${WARNING_BODY}\n${WARNING_CALL}\n${COUNTDOWN_LINE}\n${GUIDANCE_CLOSE_TAG}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
9
22
|
export const CLAUDE_HISTORY_UNKNOWN_WINDOW = "Claude history cannot determine the current window ordinal across a missing ancestor; restore the ancestry or use a retained notesoup boot to re-anchor it.";
|
|
10
23
|
export function claudeHistoryUnconfirmedSeq(seq: number): string {
|
|
11
24
|
return `Seq ${seq} is outside the confirmed selected history; it may be on another branch or beyond an unresolved ancestry gap.`;
|
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.
|