notesoup 0.51.0 → 0.51.1

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/src/index.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * This is the deliberate embedding surface for a host adapter — a curated list, not a re-export
10
10
  * of every internal module. The notes family is also published as `notesoup/notes`; the Pi
11
- * extension is `notesoup/pi` and the dsh plugins are `notesoup/dsh` and `notesoup/dsh/engine`.
11
+ * extension is loaded through the Pi manifest; dsh uses `notesoup/dsh` and `notesoup/dsh/engine`.
12
12
  */
13
13
 
14
14
  // Notes: the standalone filesystem library, addressed by an explicit identity.
@@ -1,39 +0,0 @@
1
- # SDK integration
2
-
3
- SDK hosts that create a session directly can bind notesoup to the exact same public `SettingsManager` authority as the session:
4
-
5
- ```ts
6
- import {
7
- createAgentSession,
8
- DefaultResourceLoader,
9
- SettingsManager,
10
- } from "@earendil-works/pi-coding-agent";
11
- import { createNotesoup } from "notesoup/pi";
12
-
13
- const cwd = process.cwd();
14
- const agentDir = "/tmp/my-pi-agent";
15
- const settingsManager = SettingsManager.inMemory({
16
- compaction: { enabled: true, reserveTokens: 16_384 },
17
- });
18
- const resourceLoader = new DefaultResourceLoader({
19
- cwd,
20
- agentDir,
21
- settingsManager,
22
- noExtensions: true,
23
- extensionFactories: [createNotesoup({ settingsManager })],
24
- });
25
- await resourceLoader.reload();
26
-
27
- const { session } = await createAgentSession({
28
- cwd,
29
- agentDir,
30
- settingsManager,
31
- resourceLoader,
32
- });
33
- ```
34
-
35
- The package root exports the host-neutral core (the notes library, the boot snapshot/renderer and bindings, the shared operations, and the budget prose); the Pi plugin entry is `notesoup/pi`, which exports the default Pi extension and `createNotesoup`. This is a breaking source/API refactor: `NotesContext` is replaced by `NotesIdentity`; old internal export bags, root history helpers and the `./dist/src/index.js` export alias are removed. Import `notesoup/pi` for Pi integration and `/notes` for the standalone library. The configured dream executable is now `dist/plugins/pi/dream/cli.js`. Stored notes, session paths, metadata and raw histories are unchanged; no migration runs.
36
-
37
- The manager must be shared by the resource loader's factory and `createAgentSession`. If the host replaces its settings authority, it must create and bind a new `createNotesoup({ settingsManager })` factory together with the replacement manager; an existing factory remains bound to the manager it was created with.
38
-
39
- The default extension export is file-backed: it reads Pi's standard global settings directory plus the trusted project's `.pi/settings.json`, with project values winning per key. It cannot discover an arbitrary SDK session manager from `cwd`, environment variables, session IDs, or private SDK fields. For an injected manager, compaction settings come from the manager's public `getCompactionSettings(model)` getter, including the active model's `modelOverrides`; notesoup margins are read from the public `getGlobalSettings()` and `getProjectSettings()` scopes. Opaque runtime overrides that those public scope getters do not expose are intentionally not treated as notesoup configuration. Live public manager changes apply on the next policy query/turn, and the extension does not drain the manager's settings I/O diagnostics.