notesoup 0.45.0 → 0.45.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/src/boot/text.d.ts +7 -0
- package/dist/src/boot/text.js +7 -0
- package/dist/src/budget/text.d.ts +4 -2
- package/dist/src/budget/text.js +4 -2
- package/dist/src/claude/helper.js +3 -8
- package/dist/src/dsh/engine.d.ts +6 -0
- package/dist/src/dsh/engine.js +34 -1
- package/dist/src/dsh/index.js +1 -1
- package/dist/src/dsh/tools.d.ts +1 -1
- package/dist/src/dsh/tools.js +2 -2
- package/dist/src/dsh/window.d.ts +1 -1
- package/dist/src/dsh/window.js +4 -6
- package/dist/src/notes/index.d.ts +4 -2
- package/dist/src/notes/index.js +4 -1
- package/dist/src/notes/paths.d.ts +0 -1
- package/dist/src/notes/paths.js +0 -1
- package/dist/src/pi/boot.d.ts +0 -5
- package/dist/src/pi/boot.js +4 -30
- package/dist/src/pi/budget.js +3 -3
- package/dist/src/pi/entries.d.ts +1 -0
- package/dist/src/pi/entries.js +1 -0
- package/dist/src/pi/notes/adapter.d.ts +1 -1
- package/dist/src/pi/notes/adapter.js +1 -1
- package/dist/src/pi/reset/artifacts.d.ts +6 -2
- package/dist/src/pi/reset/artifacts.js +14 -3
- package/dist/src/pi/reset/lifecycle.d.ts +6 -2
- package/dist/src/pi/reset/lifecycle.js +28 -18
- package/dist/src/pi/runtime.js +33 -8
- package/dist/src/pi/tool-result.d.ts +9 -0
- package/dist/src/pi/tool-result.js +4 -0
- package/dist/src/tools/notes.d.ts +1 -1
- package/dist/src/tools/notes.js +1 -1
- package/dist/src/tools/output.d.ts +1 -14
- package/dist/src/tools/output.js +1 -9
- package/dist/test/dependencies.test.js +53 -17
- package/dist/test/dsh.test.js +1 -1
- package/dist/test/helpers/dependency-graph.d.ts +3 -3
- package/dist/test/helpers/dependency-graph.js +64 -14
- package/dist/test/helpers/extension.js +2 -2
- package/dist/test/host-neutral.test.js +5 -0
- package/dist/test/notes.integration.test.js +4 -4
- package/dist/test/notes.test.js +1 -1
- package/dist/test/reset-lifecycle.test.js +47 -3
- package/mods/notesoup/.claude-plugin/plugin.json +1 -1
- package/mods/notesoup/dist/claude/helper.js +166 -166
- package/package.json +1 -1
- package/src/boot/text.ts +8 -0
- package/src/budget/text.ts +5 -2
- package/src/claude/helper.ts +3 -10
- package/src/dsh/engine.ts +27 -1
- package/src/dsh/index.ts +1 -1
- package/src/dsh/tools.ts +2 -3
- package/src/dsh/window.ts +4 -6
- package/src/notes/index.ts +4 -2
- package/src/notes/paths.ts +0 -1
- package/src/pi/boot.ts +4 -33
- package/src/pi/budget.ts +3 -3
- package/src/pi/entries.ts +1 -0
- package/src/pi/notes/adapter.ts +1 -2
- package/src/pi/notes/tools.ts +1 -1
- package/src/pi/reset/artifacts.ts +15 -2
- package/src/pi/reset/lifecycle.ts +34 -21
- package/src/pi/runtime.ts +36 -8
- package/src/pi/tool-result.ts +5 -0
- package/src/tools/notes.ts +1 -1
- package/src/tools/output.ts +1 -10
- package/dist/src/dsh/preflight.d.ts +0 -8
- package/dist/src/dsh/preflight.js +0 -35
- package/dist/src/pi/tool-names.d.ts +0 -7
- package/dist/src/pi/tool-names.js +0 -7
- package/src/dsh/preflight.ts +0 -29
- package/src/pi/tool-names.ts +0 -9
package/src/dsh/preflight.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
import type {} from "@deepseek-ai/cordis-plugin-loader";
|
|
3
|
-
import { NotesoupCompactionEngine } from "./engine.js";
|
|
4
|
-
|
|
5
|
-
export class PreflightError extends Error {
|
|
6
|
-
constructor(readonly code: string, message: string) { super(`notesoup: ${message}`); }
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** Probe capabilities and the public loader/registry, not preview-version strings or private hooks. */
|
|
10
|
-
export function preflight(ctx: Context): NotesoupCompactionEngine {
|
|
11
|
-
for (const [service, method] of [["systemPrompt", "section"], ["tools", "register"], ["sessionQuery", "readSession"], ["tokenMeter", "measure"], ["llm", "resolveModelInfo"]] as const) {
|
|
12
|
-
const mounted = ctx.get(service) as unknown as Record<string, unknown> | undefined;
|
|
13
|
-
if (typeof mounted?.[method] !== "function") throw new PreflightError("CAPABILITY", `${service}.${method} is unavailable; enable that service in the profile before using notesoup.`);
|
|
14
|
-
}
|
|
15
|
-
const engine = ctx.get("compaction");
|
|
16
|
-
if (!(engine instanceof NotesoupCompactionEngine)) throw new PreflightError("ENGINE", "ctx.compaction must be NotesoupCompactionEngine; disable compaction-basic and enable the notesoup-engine row, then restart dsh.");
|
|
17
|
-
const loader = ctx.get("loader");
|
|
18
|
-
if (loader) {
|
|
19
|
-
if (typeof loader.entries !== "function") throw new PreflightError("CAPABILITY", "loader.entries is unavailable; this profile cannot be checked for two engines.");
|
|
20
|
-
for (const entry of loader.entries()) {
|
|
21
|
-
if ((entry.options.id === "compaction-basic" || /(?:^|\/)dsh-compaction-basic$/.test(entry.options.name)) && !entry.disabled) throw new PreflightError("DOUBLE_ENGINE", "compaction-basic is enabled; set disabled: true on that profile row and restart dsh.");
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
for (const [callback, runtime] of ctx.registry.entries()) {
|
|
25
|
-
if (callback.name === "BasicCompactionEngine" && runtime.fibers.length > 0) throw new PreflightError("DOUBLE_ENGINE", "a BasicCompactionEngine fiber is mounted; remove it before starting notesoup.");
|
|
26
|
-
}
|
|
27
|
-
if (!engine.automaticListenerPresent) throw new PreflightError("AUTO_LISTENER", "the automatic reset listener is missing; reload notesoup-engine before sending another request.");
|
|
28
|
-
return engine;
|
|
29
|
-
}
|
package/src/pi/tool-names.ts
DELETED