notesoup 0.53.0 → 0.53.2
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/dist/plugins/claude/src/history.js +2 -3
- package/dist/plugins/claude/src/thresholds.js +4 -2
- package/dist/plugins/pi/entries.d.ts +1 -0
- package/dist/plugins/pi/entries.js +1 -0
- package/dist/plugins/pi/marker.d.ts +9 -0
- package/dist/plugins/pi/marker.js +36 -0
- package/dist/plugins/pi/reset/artifacts.d.ts +2 -2
- package/dist/plugins/pi/reset/artifacts.js +2 -2
- package/dist/plugins/pi/runtime.js +9 -6
- package/dist/plugins/pi/text.d.ts +2 -0
- package/dist/plugins/pi/text.js +4 -0
- package/dist/src/boot/render.js +5 -5
- package/dist/src/boot/text.d.ts +2 -1
- package/dist/src/boot/text.js +2 -1
- package/dist/test/agent-loop.test.js +8 -8
- package/dist/test/boot.integration.test.js +4 -4
- package/dist/test/claude-history.test.js +26 -0
- package/dist/test/claude-mod.test.js +178 -53
- package/dist/test/marker.test.d.ts +1 -0
- package/dist/test/marker.test.js +78 -0
- package/dist/test/model-facing-text.test.js +11 -5
- package/dist/test/reset-lifecycle.test.js +12 -0
- package/docs/architecture.md +1 -1
- package/docs/claude-code-mod.md +7 -7
- package/package.json +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/dist/claude/helper.js +10 -7
- package/plugins/claude/hooks/register.ts +44 -56
- package/plugins/claude/src/history.ts +2 -3
- package/plugins/claude/src/thresholds.ts +4 -2
- package/plugins/codex/dist/codex/notesoup.js +6 -5
- package/plugins/pi/entries.ts +1 -0
- package/plugins/pi/marker.ts +39 -0
- package/plugins/pi/reset/artifacts.ts +2 -2
- package/plugins/pi/runtime.ts +7 -6
- package/plugins/pi/text.ts +5 -0
- package/src/boot/render.ts +5 -5
- package/src/boot/text.ts +2 -1
package/docs/claude-code-mod.md
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
The package also ships `plugins/claude/`, an early-access Claude Code Mod that registers five notes tools as `mcp__notesoup__notes_*`, three history tools as `mcp__notesoup__history_*`, and `mcp__notesoup__empty_brain` and attaches one host-scoped notes boot block through Claude's conversation-scoped `prompt.context` event; Claude persists it across resume and reload. The sandboxed hooks module delegates filesystem and shared-domain work to the plugin-local `plugins/claude/dist/claude/helper.js` through Claude's bounded `$.process.run` capability.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
There is no independent proactive automatic clear line: crossing a measured threshold, `session.measure`, or completing an unrequested turn never clears context. `turn.complete` resets only an explicit pending request from `empty_brain`, `/empty`, or `/fresh-window`. Budget warning timing is unchanged and is derived from Claude's own auto-compact threshold instead of a fixed percent, in `plugins/claude/src/thresholds.ts`, and reaches the sandboxed hooks module through the helper's `limits` operation:
|
|
6
6
|
|
|
7
|
-
1. `$.session.usage({breakdown:"summary"}).context.autoCompactThreshold` when it is a positive number, with `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` applied the way Claude applies it (it can only lower the point);
|
|
8
|
-
2. otherwise computed from `$.session.usage().context.window` plus `CLAUDE_CODE_AUTO_COMPACT_WINDOW`, `modelSettings.<model>.autoCompactWindow` and `autoCompactWindow` (the smallest configured window wins, capped at the model window), with Claude's 20000-token output reserve and 13000-token summary buffer;
|
|
7
|
+
1. `$.session.usage({breakdown:"summary"}).context.breakdown.autoCompactThreshold` when it is a positive number, with `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` applied the way Claude applies it (it can only lower the point);
|
|
8
|
+
2. otherwise computed from `$.session.usage().context.window` plus `CLAUDE_CODE_AUTO_COMPACT_WINDOW`, `modelSettings.<model>.autoCompactWindow` and `autoCompactWindow` (the smallest configured window wins, capped at the model window), with Claude's 20000-token output reserve and 13000-token summary buffer; `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` lowers this fallback point by the same formula. With auto-compaction off, the percent override is ignored;
|
|
9
9
|
3. otherwise the percent fallback, which expresses the same reserves on the classic 200K window.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The warning remains `resetMarginTokens` (default 8192) plus `warningRunwayTokens` (default `WARNING_RUNWAY_TOKENS`, 16384) below that point. The internal reset-derived intermediate is only warning math, not a clear trigger. With automatic compaction off (`autoCompactEnabled: false` in the merged settings, or `DISABLE_AUTO_COMPACT=1`) the point becomes the effective window minus the output reserve, so the same margins still apply. Every undocumented field is type-guarded and degrades to the next source; an unresolvable point, or missing usage, logs once and skips the budget warning. `DISABLE_COMPACT=1` is detected at `session.start`, logs once, suppresses budget warnings and explicit resets, and makes `/fresh-window` report that it cannot run. The margins are read from the `notesoup` object of Claude's merged `$.settings.read()` (`resetMarginTokens`, `warningRunwayTokens`); any other value is ignored. Setting `NOTESOUP_DISABLED` (presence-style, the same convention as `DISABLE_COMPACT`) turns the whole mod off: `session.start` registers no tools or commands and logs once, every event passes through untouched, and native compaction behaves as if the mod were absent.
|
|
12
12
|
|
|
13
|
-
Once per window, when the measured context crosses the warning point, main-agent tool results or prompt submission carry exactly the same budget warning as Pi, ending with `empty_brain` and the countdown. Delivery is consumed only when the downstream chain accepts the warning. The warned flag resets with the window ordinal. Its own `session.compact` hook answers native compaction in the main conversation instead of letting it summarize: an automatic compaction (threshold or prompt-too-long) becomes the freshly built notes boot followed by one randomly selected handoff paragraph (normal only when the model called `empty_brain`, otherwise forced), selected once for the new window and reused on retry — the same boot-then-handoff order as Pi — while `/compact` and precompute are vetoed with a one-line notice. `prompt.context` still recomputes but does not duplicate that retained boot. The boot's protocol block binds the shared reset sentence to `mcp__notesoup__empty_brain`; Pi's boot text is unchanged. Boot window IDs end in the ordinal `:0`, `:1`, etc.; retained boots restore the ordinal on resume/reload. Original transcript rows remain on disk. `session.end` forgets the old window, and identity is refreshed lazily from `$.session.id()`, `$.session.cwd()` and the documented `$.session.model()` (slugified, with `claude` only as a fallback). `/clear`, `/resume` and `/branch` therefore acquire a boot again without needing another `session.start`. A failed boot build falls back to Claude's own summary, which invalidates a removed retained boot; vetoes, subagent compaction and precompute leave it alone.
|
|
13
|
+
Once per window, when the measured context crosses the warning point, main-agent tool results or prompt submission carry exactly the same budget warning as Pi, ending with `empty_brain` and the countdown. Delivery is consumed only when the downstream chain accepts the warning. The warned flag resets with the window ordinal. Its own `session.compact` hook answers native compaction in the main conversation instead of letting it summarize: an automatic compaction (threshold or prompt-too-long) becomes the freshly built notes boot followed by one randomly selected handoff paragraph (normal only when the model called `empty_brain`, otherwise forced), selected once for the new window and reused on retry — the same boot-then-handoff order as Pi — while user `/compact` and precompute are vetoed with a one-line notice. `prompt.context` still recomputes but does not duplicate that retained boot. The boot's protocol block binds the shared reset sentence to `mcp__notesoup__empty_brain`; Pi's boot text is unchanged. Boot window IDs end in the ordinal `:0`, `:1`, etc.; retained boots restore the ordinal on resume/reload. Original transcript rows remain on disk. `session.end` forgets the old window, and identity is refreshed lazily from `$.session.id()`, `$.session.cwd()` and the documented `$.session.model()` (slugified, with `claude` only as a fallback). `/clear`, `/resume` and `/branch` therefore acquire a boot again without needing another `session.start`. A failed boot build falls back to Claude's own summary, which invalidates a removed retained boot; vetoes, subagent compaction and precompute leave it alone.
|
|
14
14
|
|
|
15
|
-
The model can request the same reset through `empty_brain`, optionally passing a short `last_word` that is retained after the boot and handoff. The tool queues the reset and tells the model to end its turn; compaction runs at main-agent `turn.complete`, never inside a running tool call. Subagents cannot reset the main brain, and
|
|
15
|
+
The model can request the same reset through `empty_brain`, optionally passing a short `last_word` that is retained after the boot and handoff. The tool queues the reset and tells the model to end its turn; compaction runs at main-agent `turn.complete`, never inside a running tool call. Subagents cannot reset the main brain, and `DISABLE_COMPACT` sessions refuse the tool without queuing a reset. Successful reset or session change clears the pending request and sticky note.
|
|
16
16
|
|
|
17
|
-
`/fresh-window`
|
|
17
|
+
`/empty` and its alias `/fresh-window` request the same reset. While idle it submits one hidden normal-model close-out turn to let the model save notes, then resets at `turn.complete`; while busy it waits for the current turn instead. The close-out prompt is the same shared warning text the automatic path shows. Interactive resets use `$.session.compact`. Headless (`-p` / SDK) resets instead queue the native command with `$.command.run({command:"compact"})` after `turn.complete`; Claude Code 2.1.299 runs this command non-interactively and invokes the same plugin's compact hook. Only that internally initiated command admits the manual trigger; user `/compact` remains vetoed. The command receipt is not a compaction result: successful completion also requires the hook to have prepared the notes boot. Rejected or vetoed resets keep their pending request and sticky note for retry. Native command/caveat/output rows remain in the next request alongside the fresh boot; no compaction model request is made. Boot acquisition failure vetoes reset, leaving the current window intact. A Claude dream backend is not implemented; budget reporting (`get_context_remaining`) remains Pi-only, while the one warning per window follows Claude's own configuration.
|
|
18
18
|
|
|
19
19
|
The notes tools also serve subagent calls, using the same session identity and shared operations. The plugin exposes the shared memory and dream skills and the dream playbook; the build keeps these copies byte-identical to the canonical files.
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -9715,7 +9715,7 @@ function blocksOf(value) {
|
|
|
9715
9715
|
});
|
|
9716
9716
|
}
|
|
9717
9717
|
function decode(row, seq) {
|
|
9718
|
-
if (row.type === "system" && row.
|
|
9718
|
+
if (row.type === "system" && row.content == null) return [];
|
|
9719
9719
|
const common = { windowId: "", ...typeof row.timestamp === "string" ? { createdAt: row.timestamp } : {} };
|
|
9720
9720
|
let blocks, role;
|
|
9721
9721
|
if (row.type === "user" || row.type === "assistant") {
|
|
@@ -9919,6 +9919,7 @@ async function loadNotesSnapshot(identity2, openedAt, loadHome) {
|
|
|
9919
9919
|
|
|
9920
9920
|
// src/boot/text.ts
|
|
9921
9921
|
var SHELF_FRESH_LIMIT = 3;
|
|
9922
|
+
var CHEATSHEET_BOOT_MAX_CHARS = 2048;
|
|
9922
9923
|
var MAP_BOOT_MAX_CHARS = 4096;
|
|
9923
9924
|
var WINDOW_IDENTITY_OPEN_TAG = "<notesoup:window_identity>";
|
|
9924
9925
|
var WINDOW_IDENTITY_CLOSE_TAG = "</notesoup:window_identity>";
|
|
@@ -10045,7 +10046,7 @@ function notesIndex(snapshot2, tools, agentName, modelName) {
|
|
|
10045
10046
|
if (pinned.length === 0 && fresh.length === 0) continue;
|
|
10046
10047
|
const parts = pinned.map((row) => `${row.path === "MAP.md" ? "map" : "cheatsheet"}
|
|
10047
10048
|
|
|
10048
|
-
${indent(pinnedBodyForBoot(row.address, row.body))}`);
|
|
10049
|
+
${indent(pinnedBodyForBoot(row.address, row.body, row.path === "MAP.md" ? MAP_BOOT_MAX_CHARS : CHEATSHEET_BOOT_MAX_CHARS))}`);
|
|
10049
10050
|
if (fresh.length > 0) parts.push(`recent
|
|
10050
10051
|
|
|
10051
10052
|
${fresh.join("\n\n")}`);
|
|
@@ -10053,11 +10054,11 @@ ${fresh.join("\n\n")}`);
|
|
|
10053
10054
|
}
|
|
10054
10055
|
return shelves.length > 0 ? ["YOUR NOTES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500", ...shelves].join("\n\n\n") : "YOUR NOTES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nNone yet. A blank slate is a fine place to start \u2014 just don't finish there.";
|
|
10055
10056
|
}
|
|
10056
|
-
function pinnedBodyForBoot(address, body) {
|
|
10057
|
+
function pinnedBodyForBoot(address, body, maxChars) {
|
|
10057
10058
|
const chars = Array.from(body);
|
|
10058
|
-
if (chars.length <=
|
|
10059
|
-
return `${chars.slice(0,
|
|
10060
|
-
[truncated at ${
|
|
10059
|
+
if (chars.length <= maxChars) return body;
|
|
10060
|
+
return `${chars.slice(0, maxChars).join("")}
|
|
10061
|
+
[truncated at ${maxChars} chars; slim this page down, full body at \`${address}\`]`;
|
|
10061
10062
|
}
|
|
10062
10063
|
function renderBootBlock(data) {
|
|
10063
10064
|
const shown2 = /* @__PURE__ */ new Set([0, data.tree.windows.length - 2, data.tree.windows.length - 1]);
|
|
@@ -10248,7 +10249,9 @@ function resolveClaudeLimits(facts) {
|
|
|
10248
10249
|
if (window !== void 0) {
|
|
10249
10250
|
const configured = configuredWindow(settings2, env, breakdown.model);
|
|
10250
10251
|
const effective = Math.min(configured ?? window, window);
|
|
10251
|
-
const
|
|
10252
|
+
const available = effective - CLAUDE_OUTPUT_RESERVE_TOKENS;
|
|
10253
|
+
const threshold2 = available - CLAUDE_AUTOCOMPACT_BUFFER_TOKENS;
|
|
10254
|
+
const native = autoCompact ? pct === void 0 ? threshold2 : Math.min(Math.floor(available * (pct / 100)), threshold2) : available;
|
|
10252
10255
|
return tokenLimits("window", autoCompact, native, resetMargin, warningRunway);
|
|
10253
10256
|
}
|
|
10254
10257
|
return percentLimits(autoCompact, pct, resetMargin, warningRunway);
|
|
@@ -8,7 +8,7 @@ const OUTPUT_LIMIT = 1024 * 1024
|
|
|
8
8
|
type Identity = { home: string; sessionId: string; cwd: string; agent: string; model: string }
|
|
9
9
|
type SchemaRow = { name: string; description: string; inputSchema: Record<string, unknown> }
|
|
10
10
|
type HistorySource = { sessionId: string; transcriptPath: string; headUuid?: string }
|
|
11
|
-
type Engine = Pick<EngineInterface, "process" | "session" | "ui" | "clock" | "prompt" | "env" | "settings">
|
|
11
|
+
type Engine = Pick<EngineInterface, "process" | "session" | "ui" | "clock" | "prompt" | "env" | "settings" | "command">
|
|
12
12
|
/** The measured context, as much of it as the engine reported. */
|
|
13
13
|
type ContextUsage = { tokens?: number; window?: number; percent?: number }
|
|
14
14
|
/** Shared reset prose, fetched once per session so Pi and Claude cannot drift apart. */
|
|
@@ -20,15 +20,14 @@ type ClaudeLimits = {
|
|
|
20
20
|
type ResetState = {
|
|
21
21
|
identity?: Identity; history?: HistorySource; historyWindowHead?: string; generation: number; window: number; disabled: boolean; turnRunning: boolean; resetting: boolean
|
|
22
22
|
manualPending: boolean; headless: boolean; usageFailureLogged: boolean; preparedBoot?: string; retainedBoot?: string
|
|
23
|
-
toolResetRequested?: boolean; lastWord?: string
|
|
23
|
+
toolResetRequested?: boolean; lastWord?: string; manualCompacting?: boolean
|
|
24
24
|
continuation?: string; continuationWindow?: number
|
|
25
25
|
compactDisabled: boolean; limitsFailureLogged: boolean; limitsAttempts: number; limitsWindow: number
|
|
26
26
|
limits?: ClaudeLimits; warnedWindow?: number; warningPending?: number; texts?: SharedTexts; settingsFailureLogged: boolean
|
|
27
27
|
}
|
|
28
|
-
const HEADLESS = "No brain when headless"
|
|
29
28
|
const COMPACT_DISABLED = "Brain can't be emptied with DISABLE_COMPACT"
|
|
30
29
|
const NOTESOUP_DISABLED = "Notesoup is off with NOTESOUP_DISABLED"
|
|
31
|
-
const THRESHOLDS_UNAVAILABLE = "Brain size unknown · no
|
|
30
|
+
const THRESHOLDS_UNAVAILABLE = "Brain size unknown · no budget warning"
|
|
32
31
|
const SETTINGS_UNAVAILABLE = "Notesoup settings unreadable · using the default flush margins"
|
|
33
32
|
/** Bounded retries: a transient helper failure must not disable thresholds for a whole window. */
|
|
34
33
|
const MAX_LIMITS_ATTEMPTS = 3
|
|
@@ -130,15 +129,15 @@ async function contextUsage($: Engine, state: ResetState): Promise<ContextUsage
|
|
|
130
129
|
} catch {
|
|
131
130
|
if (!state.usageFailureLogged) {
|
|
132
131
|
state.usageFailureLogged = true
|
|
133
|
-
log($, "Brain fullness unknown · no
|
|
132
|
+
log($, "Brain fullness unknown · no budget warning")
|
|
134
133
|
}
|
|
135
134
|
return undefined
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
137
|
async function breakdownContext($: Engine): Promise<Record<string, unknown> | undefined> {
|
|
139
138
|
try {
|
|
140
|
-
const
|
|
141
|
-
return typeof
|
|
139
|
+
const breakdown = (await $.session.usage({ breakdown: "summary" })).context.breakdown
|
|
140
|
+
return typeof breakdown === "object" && breakdown !== null ? breakdown as unknown as Record<string, unknown> : undefined
|
|
142
141
|
} catch { return undefined }
|
|
143
142
|
}
|
|
144
143
|
/** Everything the resolver may read: measured usage plus the raw settings and environment. */
|
|
@@ -255,6 +254,7 @@ function forgetSession(state: ResetState) {
|
|
|
255
254
|
state.historyWindowHead = undefined
|
|
256
255
|
state.window = 0
|
|
257
256
|
state.turnRunning = state.resetting = state.manualPending = state.usageFailureLogged = false
|
|
257
|
+
state.manualCompacting = false
|
|
258
258
|
state.preparedBoot = state.retainedBoot = undefined
|
|
259
259
|
state.texts = state.limits = undefined
|
|
260
260
|
state.continuation = undefined
|
|
@@ -345,8 +345,7 @@ export function register(on: On) {
|
|
|
345
345
|
keepMemory = envFlag(await $.env.get("NOTESOUP_KEEP_MEMORY").catch(() => undefined))
|
|
346
346
|
await refreshIdentity($, state)
|
|
347
347
|
state.headless = !e.isInteractive
|
|
348
|
-
|
|
349
|
-
// Compaction is the capability the reset is built on; without it, automatic resets stop here.
|
|
348
|
+
// Compaction is the capability explicit resets and budget warnings depend on.
|
|
350
349
|
state.compactDisabled = await compactDisabled($)
|
|
351
350
|
if (state.compactDisabled) log($, COMPACT_DISABLED)
|
|
352
351
|
registered.clear()
|
|
@@ -357,7 +356,7 @@ export function register(on: On) {
|
|
|
357
356
|
const wipe = await $.tool.register({
|
|
358
357
|
name: "empty_brain",
|
|
359
358
|
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.",
|
|
360
|
-
inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note, at most
|
|
359
|
+
inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note, at most 300 characters. After the wipe it is slapped on your forehead; longer notes are refused." } }, additionalProperties: false },
|
|
361
360
|
isDeferred: false,
|
|
362
361
|
} satisfies ToolSpec)
|
|
363
362
|
registered.add(wipe.tool)
|
|
@@ -398,30 +397,30 @@ export function register(on: On) {
|
|
|
398
397
|
if (state.disabled) return result
|
|
399
398
|
if (!await refreshIdentity($, state)) return result
|
|
400
399
|
state.turnRunning = false
|
|
401
|
-
await
|
|
402
|
-
return result
|
|
403
|
-
})
|
|
404
|
-
on("session.measure", async ($, e, next) => {
|
|
405
|
-
const result = await next(e)
|
|
406
|
-
if (!state.disabled && await refreshIdentity($, state)) await maybeReset($, state, false)
|
|
400
|
+
if (state.manualPending) await reset($, state)
|
|
407
401
|
return result
|
|
408
402
|
})
|
|
409
403
|
on("command.run", async ($, e, next) => {
|
|
410
404
|
if (state.disabled) return next(e)
|
|
405
|
+
// Only our queued native command admits manual compaction. A user's /compact
|
|
406
|
+
// still reaches the veto, even while a reset is pending.
|
|
407
|
+
if (e.command === "compact" && state.resetting && state.headless && e.origin.kind === "plugin" && e.origin.name === "notesoup") {
|
|
408
|
+
state.manualCompacting = true
|
|
409
|
+
try { return await next(e) } finally { state.manualCompacting = false }
|
|
410
|
+
}
|
|
411
411
|
if (e.command !== "empty" && e.command !== "fresh-window") return next(e)
|
|
412
412
|
if (!await refreshIdentity($, state)) return { text: "🥣 Different brain now · try /fresh-window again" }
|
|
413
|
-
if (state.headless) return { text: `🥣 ${HEADLESS}` }
|
|
414
413
|
if (state.compactDisabled) return { text: `🥣 ${COMPACT_DISABLED}` }
|
|
415
414
|
if (state.resetting || state.manualPending) return { text: "🥣 Brain already being emptied" }
|
|
416
415
|
if (state.turnRunning) {
|
|
417
416
|
state.manualPending = true
|
|
418
|
-
return { text: "🥣 Brain
|
|
417
|
+
return { text: "🥣 Dumping Brain" }
|
|
419
418
|
}
|
|
420
419
|
// command.run holds a turn even when idle. Start one hidden close-out
|
|
421
420
|
// turn after it returns; turn.complete is the verified self-hook path.
|
|
422
421
|
state.manualPending = true
|
|
423
422
|
manualSignal.wake?.()
|
|
424
|
-
return { text: "🥣 Brain
|
|
423
|
+
return { text: "🥣 Dumping Brain" }
|
|
425
424
|
})
|
|
426
425
|
on("session.compact", async ($, e, next) => {
|
|
427
426
|
// Disabled means fully transparent: native compaction runs exactly as if the mod were absent.
|
|
@@ -439,11 +438,11 @@ export function register(on: On) {
|
|
|
439
438
|
}
|
|
440
439
|
return result
|
|
441
440
|
}
|
|
442
|
-
// Native compaction never runs the summarizer while notesoup is on:
|
|
443
|
-
// precompute are vetoed
|
|
444
|
-
|
|
441
|
+
// Native compaction never runs the summarizer while notesoup is on: user
|
|
442
|
+
// manual and precompute are vetoed; auto becomes the notes-only reset.
|
|
443
|
+
const own = state.resetting && identity !== undefined && (e.trigger === "plugin" || (e.trigger === "manual" && state.manualCompacting === true))
|
|
444
|
+
if (e.trigger === "manual" && !own) return { skip: "No compacting brains here · use /fresh-window" }
|
|
445
445
|
if (e.trigger === "precompute") return { skip: "No precomputing brains here" }
|
|
446
|
-
const own = state.resetting && e.trigger === "plugin" && identity !== undefined
|
|
447
446
|
if (!own && e.trigger !== "auto") return passThrough()
|
|
448
447
|
if (identity === undefined) return passThrough()
|
|
449
448
|
const built = await resetMessages($, state, identity)
|
|
@@ -506,12 +505,11 @@ async function callNotesTool($: Engine, state: ResetState, e: ToolCallInput): Pr
|
|
|
506
505
|
const name = tool.slice(PREFIX.length)
|
|
507
506
|
if (name === "empty_brain") {
|
|
508
507
|
if (agentId !== undefined) return errorResult("only the main agent can empty this brain")
|
|
509
|
-
if (state.headless) return errorResult(HEADLESS)
|
|
510
508
|
if (state.compactDisabled) return errorResult(COMPACT_DISABLED)
|
|
511
509
|
if (params.last_word !== undefined && typeof params.last_word !== "string") return errorResult("last_word must be a string")
|
|
512
510
|
const lastWord = typeof params.last_word === "string" ? params.last_word.trim() || undefined : undefined
|
|
513
511
|
const length = lastWord ? Array.from(lastWord).length : 0
|
|
514
|
-
if (length >
|
|
512
|
+
if (length > 500) return errorResult(`last_word is ${length} characters; the sticky note holds 500. Shorten it and call again.`)
|
|
515
513
|
if (!state.toolResetRequested) {
|
|
516
514
|
state.toolResetRequested = true
|
|
517
515
|
state.lastWord = lastWord
|
|
@@ -531,7 +529,7 @@ async function callNotesTool($: Engine, state: ResetState, e: ToolCallInput): Pr
|
|
|
531
529
|
|
|
532
530
|
/** Read the warning without consuming this window's delivery. */
|
|
533
531
|
async function warningText($: Engine, state: ResetState): Promise<string | undefined> {
|
|
534
|
-
if (state.disabled || state.
|
|
532
|
+
if (state.disabled || state.compactDisabled || !state.identity || state.warnedWindow === state.window || state.warningPending === state.window) return undefined
|
|
535
533
|
const generation = state.generation
|
|
536
534
|
const usage = await contextUsage($, state)
|
|
537
535
|
if (generation !== state.generation || usage === undefined) return undefined
|
|
@@ -545,7 +543,7 @@ async function warningText($: Engine, state: ResetState): Promise<string | undef
|
|
|
545
543
|
|
|
546
544
|
/** Reserve across next(), but consume only context the chain actually accepted. */
|
|
547
545
|
async function withWarning<T extends { context?: readonly string[]; drop?: string; deny?: string }>($: Engine, state: ResetState, deliver: (warning?: string) => T | Promise<T>): Promise<T> {
|
|
548
|
-
if (state.disabled || state.
|
|
546
|
+
if (state.disabled || state.compactDisabled || !await refreshIdentity($, state)) return deliver()
|
|
549
547
|
const generation = state.generation, window = state.window
|
|
550
548
|
const warning = await warningText($, state)
|
|
551
549
|
if (warning === undefined || generation !== state.generation || window !== state.window || state.warnedWindow === window || state.warningPending === window) return deliver()
|
|
@@ -600,7 +598,6 @@ async function finishManual($: Engine, state: ResetState, signal: { wake?: () =>
|
|
|
600
598
|
const texts = await loadTexts($, state)
|
|
601
599
|
if (generation !== state.generation) return
|
|
602
600
|
if (texts?.warning === undefined) {
|
|
603
|
-
state.manualPending = false
|
|
604
601
|
log($, "Brain still full: the close-out prompt didn't load")
|
|
605
602
|
return
|
|
606
603
|
}
|
|
@@ -608,56 +605,47 @@ async function finishManual($: Engine, state: ResetState, signal: { wake?: () =>
|
|
|
608
605
|
}
|
|
609
606
|
} catch {
|
|
610
607
|
if (generation === state.generation) {
|
|
611
|
-
state.manualPending = false
|
|
612
608
|
log($, "Brain still full: the close-out turn didn't start")
|
|
613
609
|
}
|
|
614
610
|
} finally { armManual($, state, signal) }
|
|
615
611
|
}
|
|
616
612
|
|
|
617
613
|
// The sandbox permits $ forwarding only to file-top-level helpers.
|
|
618
|
-
async function maybeReset($: Engine, state: ResetState, complete: boolean) {
|
|
619
|
-
if (!state.identity || state.resetting || state.headless || state.compactDisabled) return
|
|
620
|
-
const generation = state.generation
|
|
621
|
-
const usage = await contextUsage($, state)
|
|
622
|
-
if (generation !== state.generation || state.turnRunning) return
|
|
623
|
-
let due = complete && state.manualPending
|
|
624
|
-
if (!due && usage !== undefined) {
|
|
625
|
-
const limits = await limitsOf($, state, usage)
|
|
626
|
-
const measured = limits === undefined ? undefined : measuredValue(limits, usage)
|
|
627
|
-
// Missing measurements do not trigger a reset.
|
|
628
|
-
if (limits !== undefined && measured !== undefined && measured >= limits.reset) due = true
|
|
629
|
-
}
|
|
630
|
-
if (due && generation === state.generation) {
|
|
631
|
-
state.manualPending = false
|
|
632
|
-
await reset($, state)
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
614
|
async function reset($: Engine, state: ResetState): Promise<void> {
|
|
636
|
-
if (!state.identity || state.
|
|
615
|
+
if (!state.identity || state.compactDisabled || state.resetting) return
|
|
637
616
|
const generation = state.generation
|
|
638
617
|
state.resetting = true
|
|
639
618
|
state.preparedBoot = undefined
|
|
640
619
|
try {
|
|
641
|
-
|
|
620
|
+
let failure: string | undefined
|
|
621
|
+
if (state.headless) {
|
|
622
|
+
const receipt = await $.command.run({ command: "compact" })
|
|
623
|
+
if (generation !== state.generation) return
|
|
624
|
+
// A command receipt is not SessionCompacted. Our admitted hook must have
|
|
625
|
+
// prepared the boot; session.messages() here still reads the completed
|
|
626
|
+
// turn's snapshot, not the next request's newly compacted context.
|
|
627
|
+
if (state.preparedBoot === undefined) failure = receipt.text ?? "notes boot was not retained"
|
|
628
|
+
} else {
|
|
629
|
+
const result = await $.session.compact({ instructions: RESET_INSTRUCTIONS })
|
|
630
|
+
failure = result.skip
|
|
631
|
+
}
|
|
642
632
|
if (generation !== state.generation) return
|
|
643
|
-
if (
|
|
644
|
-
|
|
633
|
+
if (failure !== undefined || state.preparedBoot === undefined) {
|
|
634
|
+
state.manualPending = true
|
|
635
|
+
log($, `Brain not emptied · ${failure ?? "notes boot was not retained"}`)
|
|
645
636
|
return
|
|
646
637
|
}
|
|
647
638
|
state.retainedBoot = state.preparedBoot
|
|
648
639
|
state.window++
|
|
640
|
+
state.manualPending = false
|
|
649
641
|
state.toolResetRequested = undefined
|
|
650
642
|
state.lastWord = undefined
|
|
651
643
|
log($, "Brain emptied")
|
|
652
644
|
} catch (error) {
|
|
653
645
|
if (generation !== state.generation) return
|
|
654
646
|
const text = String(error)
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
log($, HEADLESS)
|
|
658
|
-
} else if (/a turn is (running|in flight)/.test(text)) {
|
|
659
|
-
state.manualPending = true
|
|
660
|
-
} else {
|
|
647
|
+
state.manualPending = true
|
|
648
|
+
if (!/a turn is (running|in flight)/.test(text)) {
|
|
661
649
|
log($, `Brain still full: ${text.replace(/[\r\n].*$/s, "")}`)
|
|
662
650
|
}
|
|
663
651
|
} finally {
|
|
@@ -56,9 +56,8 @@ function blocksOf(value: unknown): Row[] {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
function decode(row: Row, seq: number): DecodedHistoryItem[] {
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
if (row.type === "system" && row.subtype === "turn_duration") return [];
|
|
59
|
+
// A system record without a body is graph metadata, not a message.
|
|
60
|
+
if (row.type === "system" && row.content == null) return [];
|
|
62
61
|
const common = { windowId: "", ...(typeof row.timestamp === "string" ? { createdAt: row.timestamp } : {}) };
|
|
63
62
|
let blocks: Row[], role: DecodedHistoryItem["role"];
|
|
64
63
|
if (row.type === "user" || row.type === "assistant") {
|
|
@@ -142,9 +142,11 @@ export function resolveClaudeLimits(facts: unknown): ClaudeLimits {
|
|
|
142
142
|
if (window !== undefined) {
|
|
143
143
|
const configured = configuredWindow(settings, env, breakdown.model);
|
|
144
144
|
const effective = Math.min(configured ?? window, window);
|
|
145
|
+
const available = effective - CLAUDE_OUTPUT_RESERVE_TOKENS;
|
|
146
|
+
const threshold = available - CLAUDE_AUTOCOMPACT_BUFFER_TOKENS;
|
|
145
147
|
const native = autoCompact
|
|
146
|
-
?
|
|
147
|
-
:
|
|
148
|
+
? pct === undefined ? threshold : Math.min(Math.floor(available * (pct / 100)), threshold)
|
|
149
|
+
: available;
|
|
148
150
|
return tokenLimits("window", autoCompact, native, resetMargin, warningRunway);
|
|
149
151
|
}
|
|
150
152
|
|
|
@@ -27190,6 +27190,7 @@ replacement_history is an inference checkpoint, not new conversation events.`);
|
|
|
27190
27190
|
|
|
27191
27191
|
// src/boot/text.ts
|
|
27192
27192
|
var SHELF_FRESH_LIMIT = 3;
|
|
27193
|
+
var CHEATSHEET_BOOT_MAX_CHARS = 2048;
|
|
27193
27194
|
var MAP_BOOT_MAX_CHARS = 4096;
|
|
27194
27195
|
var WINDOW_IDENTITY_OPEN_TAG = "<notesoup:window_identity>";
|
|
27195
27196
|
var WINDOW_IDENTITY_CLOSE_TAG = "</notesoup:window_identity>";
|
|
@@ -27323,7 +27324,7 @@ function notesIndex(snapshot2, tools2, agentName, modelName) {
|
|
|
27323
27324
|
if (pinned.length === 0 && fresh.length === 0) continue;
|
|
27324
27325
|
const parts = pinned.map((row) => `${row.path === "MAP.md" ? "map" : "cheatsheet"}
|
|
27325
27326
|
|
|
27326
|
-
${indent(pinnedBodyForBoot(row.address, row.body))}`);
|
|
27327
|
+
${indent(pinnedBodyForBoot(row.address, row.body, row.path === "MAP.md" ? MAP_BOOT_MAX_CHARS : CHEATSHEET_BOOT_MAX_CHARS))}`);
|
|
27327
27328
|
if (fresh.length > 0) parts.push(`recent
|
|
27328
27329
|
|
|
27329
27330
|
${fresh.join("\n\n")}`);
|
|
@@ -27331,11 +27332,11 @@ ${fresh.join("\n\n")}`);
|
|
|
27331
27332
|
}
|
|
27332
27333
|
return shelves.length > 0 ? ["YOUR NOTES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500", ...shelves].join("\n\n\n") : "YOUR NOTES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nNone yet. A blank slate is a fine place to start \u2014 just don't finish there.";
|
|
27333
27334
|
}
|
|
27334
|
-
function pinnedBodyForBoot(address, body) {
|
|
27335
|
+
function pinnedBodyForBoot(address, body, maxChars) {
|
|
27335
27336
|
const chars = Array.from(body);
|
|
27336
|
-
if (chars.length <=
|
|
27337
|
-
return `${chars.slice(0,
|
|
27338
|
-
[truncated at ${
|
|
27337
|
+
if (chars.length <= maxChars) return body;
|
|
27338
|
+
return `${chars.slice(0, maxChars).join("")}
|
|
27339
|
+
[truncated at ${maxChars} chars; slim this page down, full body at \`${address}\`]`;
|
|
27339
27340
|
}
|
|
27340
27341
|
function renderBootBlock(data) {
|
|
27341
27342
|
const shown2 = /* @__PURE__ */ new Set([0, data.tree.windows.length - 2, data.tree.windows.length - 1]);
|
package/plugins/pi/entries.ts
CHANGED
|
@@ -7,3 +7,4 @@ export const CONTINUATION_TYPE = "notesoup/continuation";
|
|
|
7
7
|
export const RESET_LAST_WORD_TYPE = "notesoup/reset-last-word";
|
|
8
8
|
export const CARRIED_INPUT_TYPE = "notesoup/carried-input";
|
|
9
9
|
export const NEXT_WINDOW_PROMPT_TYPE = "notesoup/next-window-prompt";
|
|
10
|
+
export const MARKER_TYPE = "notesoup/marker";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { MARKER_TYPE } from "./entries.js";
|
|
3
|
+
import { nextHistorySeq } from "./history.js";
|
|
4
|
+
import { inspectResetTail } from "./reset/artifacts.js";
|
|
5
|
+
import { markerContent } from "./text.js";
|
|
6
|
+
import { currentReset } from "./window.js";
|
|
7
|
+
|
|
8
|
+
/** Spacing between durable seq breadcrumbs, in projected history seq. */
|
|
9
|
+
export const MARKER_INTERVAL = 50;
|
|
10
|
+
|
|
11
|
+
/** Highest seq already stamped by a marker; 0 before the first. */
|
|
12
|
+
function lastMarkerSeq(ctx: ExtensionContext): number {
|
|
13
|
+
let last = 0;
|
|
14
|
+
for (const entry of ctx.sessionManager.getEntries()) {
|
|
15
|
+
if (entry.type !== "custom_message" || entry.customType !== MARKER_TYPE) continue;
|
|
16
|
+
const seq = (entry.details as { seq?: unknown } | undefined)?.seq;
|
|
17
|
+
if (typeof seq === "number" && seq > last) last = seq;
|
|
18
|
+
}
|
|
19
|
+
return last;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Stamp the current seq every MARKER_INTERVAL seqs. The marker names the seq it occupies, so a
|
|
24
|
+
* model paging history_list meets a breadcrumb that tells it where it is. Skipped while a reset
|
|
25
|
+
* tail still awaits boot or continuation: a foreign message there would close the repair shape.
|
|
26
|
+
*/
|
|
27
|
+
export function maybeSendMarker(pi: ExtensionAPI, ctx: ExtensionContext): void {
|
|
28
|
+
const reset = currentReset(ctx);
|
|
29
|
+
if (reset) {
|
|
30
|
+
const tail = inspectResetTail(ctx, reset.id, reset.data.windowId);
|
|
31
|
+
if (tail && (!tail.boot || !tail.continuation)) return;
|
|
32
|
+
}
|
|
33
|
+
const seq = nextHistorySeq(ctx);
|
|
34
|
+
if (seq - lastMarkerSeq(ctx) < MARKER_INTERVAL) return;
|
|
35
|
+
pi.sendMessage(
|
|
36
|
+
{ customType: MARKER_TYPE, content: markerContent(seq), display: false, details: { seq } },
|
|
37
|
+
{ triggerTurn: false },
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -19,10 +19,10 @@ export function isCarriedInputEntry(entry: SessionEntry): boolean {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/** Advertised size: the description quotes this softer limit so sloppy character counts still fit. */
|
|
22
|
-
export const LAST_WORD_ADVERTISED_CHARS =
|
|
22
|
+
export const LAST_WORD_ADVERTISED_CHARS = 300;
|
|
23
23
|
|
|
24
24
|
/** A sticky note, not a letter: over this, empty_brain refuses instead of truncating. */
|
|
25
|
-
export const MAX_LAST_WORD_CHARS =
|
|
25
|
+
export const MAX_LAST_WORD_CHARS = 500;
|
|
26
26
|
|
|
27
27
|
/** How the next window finds the note. */
|
|
28
28
|
export const LAST_WORD_PREFIX = "*You peel a sticky note off your forehead.*\n";
|
package/plugins/pi/runtime.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { buildResetDrafts, LAST_WORD_ADVERTISED_CHARS, MAX_LAST_WORD_CHARS, repa
|
|
|
11
11
|
import { BOOT_TYPE, MANUAL_WIPE_TYPE } from "./entries.js";
|
|
12
12
|
import { commandWarningContent } from "./text.js";
|
|
13
13
|
import { buildBootMessage, sendBoot, type IncompleteNotesNotifier } from "./boot.js";
|
|
14
|
+
import { maybeSendMarker } from "./marker.js";
|
|
14
15
|
import { nextHistorySeq } from "./history.js";
|
|
15
16
|
import { errorMessage } from "../../src/error-message.js";
|
|
16
17
|
|
|
@@ -73,13 +74,13 @@ export function registerContext(pi: ExtensionAPI, settingsManager?: SettingsMana
|
|
|
73
74
|
const marker = branch.find((entry): entry is WindowMarker => isWindowMarker(entry) && entry.data.windowId === windowId);
|
|
74
75
|
if (!marker || !isCheckpointBackedReset(ctx, marker) || !resetBoundaryCommitted(ctx, marker.id, windowId)) continue;
|
|
75
76
|
pendingResetNotices.delete(windowId);
|
|
76
|
-
|
|
77
|
-
// committed notice stays a one-line marker instead of repeating it.
|
|
78
|
-
const forced = markerResetOrigin(marker) === "forced";
|
|
79
|
-
ctx.ui.notify(forced ? "🥣 Brain forcibly emptied: overflow" : "🥣 Fresh brain", forced ? "warning" : "info");
|
|
77
|
+
if (markerResetOrigin(marker) === "forced") ctx.ui.notify("🥣 Brain forcibly emptied: overflow", "warning");
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
|
-
pi.on("turn_start", (_event, ctx) =>
|
|
80
|
+
pi.on("turn_start", (_event, ctx) => {
|
|
81
|
+
notifyCommittedResets(ctx);
|
|
82
|
+
if (enabled) maybeSendMarker(pi, ctx);
|
|
83
|
+
});
|
|
83
84
|
pi.on("agent_settled", (_event, ctx) => {
|
|
84
85
|
notifyCommittedResets(ctx);
|
|
85
86
|
pendingResetNotices.clear();
|
|
@@ -189,7 +190,7 @@ export function registerContext(pi: ExtensionAPI, settingsManager?: SettingsMana
|
|
|
189
190
|
cmdCtx.ui.notify("🥣 Brain already being emptied", "info");
|
|
190
191
|
return;
|
|
191
192
|
}
|
|
192
|
-
cmdCtx.ui.notify("🥣 Brain
|
|
193
|
+
cmdCtx.ui.notify("🥣 Dumping Brain", "info");
|
|
193
194
|
try {
|
|
194
195
|
pi.sendMessage({ customType: MANUAL_WIPE_TYPE, content: commandWarningContent(prompt !== undefined ? `/empty ${prompt}` : undefined), display: false }, { triggerTurn: true, deliverAs: "steer" });
|
|
195
196
|
} catch (error) {
|
package/plugins/pi/text.ts
CHANGED
|
@@ -11,6 +11,11 @@ Unless the human explicitly directs otherwise, decide for yourself when to call
|
|
|
11
11
|
|
|
12
12
|
export { warningNotice as warningContent } from "../../src/budget/text.js";
|
|
13
13
|
|
|
14
|
+
/** Odometer breadcrumb: the marker names its own seq, so history paging reads the landscape directly. */
|
|
15
|
+
export function markerContent(seq: number): string {
|
|
16
|
+
return `<notesoup:marker seq="${seq}" />`;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
/** The closing model sees deferred input as a bare next-window prompt block. */
|
|
15
20
|
export function promptBlock(commandLine: string): string {
|
|
16
21
|
return `<notesoup:next_window_prompt>\n${commandLine}\n</notesoup:next_window_prompt>`;
|
package/src/boot/render.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NotesHome, NotesSnapshot } from "./snapshot.js";
|
|
2
|
-
import { WINDOW_IDENTITY_OPEN_TAG, WINDOW_IDENTITY_CLOSE_TAG, MAPS_BLOCK, MAP_BOOT_MAX_CHARS, SHELF_FRESH_LIMIT, renderProtocolBlock, type BootToolNames } from "./text.js";
|
|
2
|
+
import { WINDOW_IDENTITY_OPEN_TAG, WINDOW_IDENTITY_CLOSE_TAG, MAPS_BLOCK, CHEATSHEET_BOOT_MAX_CHARS, MAP_BOOT_MAX_CHARS, SHELF_FRESH_LIMIT, renderProtocolBlock, type BootToolNames } from "./text.js";
|
|
3
3
|
|
|
4
4
|
function relativeTime(timestamp: number, now: number): string {
|
|
5
5
|
const seconds = Math.trunc((timestamp - now) / 1000);
|
|
@@ -65,7 +65,7 @@ function notesIndex(snapshot: NotesSnapshot, tools: BootToolNames, agentName: st
|
|
|
65
65
|
return title === undefined ? ` ${locator}` : ` ${title}\n ${locator}`;
|
|
66
66
|
});
|
|
67
67
|
if (pinned.length === 0 && fresh.length === 0) continue;
|
|
68
|
-
const parts = pinned.map((row) => `${row.path === "MAP.md" ? "map" : "cheatsheet"}\n\n${indent(pinnedBodyForBoot(row.address, row.body))}`);
|
|
68
|
+
const parts = pinned.map((row) => `${row.path === "MAP.md" ? "map" : "cheatsheet"}\n\n${indent(pinnedBodyForBoot(row.address, row.body, row.path === "MAP.md" ? MAP_BOOT_MAX_CHARS : CHEATSHEET_BOOT_MAX_CHARS))}`);
|
|
69
69
|
if (fresh.length > 0) parts.push(`recent\n\n${fresh.join("\n\n")}`);
|
|
70
70
|
shelves.push(section(home.label, parts.join("\n\n")));
|
|
71
71
|
}
|
|
@@ -76,10 +76,10 @@ function notesIndex(snapshot: NotesSnapshot, tools: BootToolNames, agentName: st
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/** Each pinned page is bounded; the cut names where the rest lives. */
|
|
79
|
-
function pinnedBodyForBoot(address: string, body: string): string {
|
|
79
|
+
function pinnedBodyForBoot(address: string, body: string, maxChars: number): string {
|
|
80
80
|
const chars = Array.from(body);
|
|
81
|
-
if (chars.length <=
|
|
82
|
-
return `${chars.slice(0,
|
|
81
|
+
if (chars.length <= maxChars) return body;
|
|
82
|
+
return `${chars.slice(0, maxChars).join("")}\n[truncated at ${maxChars} chars; slim this page down, full body at \`${address}\`]`;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export type BootWindowTree = {
|
package/src/boot/text.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Each shelf shows this many of its own freshest pages beneath its pinned pages. */
|
|
2
2
|
export const SHELF_FRESH_LIMIT = 3;
|
|
3
|
-
/** Each pinned page
|
|
3
|
+
/** Each pinned page has its own code-point cap; overflow keeps a lookup pointer. */
|
|
4
|
+
export const CHEATSHEET_BOOT_MAX_CHARS = 2048;
|
|
4
5
|
export const MAP_BOOT_MAX_CHARS = 4096;
|
|
5
6
|
export const WINDOW_IDENTITY_OPEN_TAG = "<notesoup:window_identity>";
|
|
6
7
|
export const WINDOW_IDENTITY_CLOSE_TAG = "</notesoup:window_identity>";
|