dsh-daoing-memory 0.1.15 → 0.1.16

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.
Files changed (41) hide show
  1. package/LICENSE +21 -21
  2. package/cordis.patch.yml +22 -22
  3. package/lib/index.js +1 -1
  4. package/lib/invariant.js +33 -33
  5. package/lib/tools.js +1472 -1472
  6. package/lib/typert.host.d.ts +3 -3
  7. package/lib/typert.host.js +4600 -4600
  8. package/lib/typert.remote-client.d.ts +176 -176
  9. package/lib/typert.remote-client.js +3670 -3670
  10. package/lib/types/client/ExperiencePage.d.ts +14 -14
  11. package/lib/types/client/ExperiencePage.js +116 -116
  12. package/lib/types/client/FactDiaryPage.d.ts +16 -16
  13. package/lib/types/client/FactDiaryPage.js +154 -154
  14. package/lib/types/client/HumanOpsPage.d.ts +15 -15
  15. package/lib/types/client/HumanOpsPage.js +207 -207
  16. package/lib/types/client/LedgerPage.d.ts +12 -12
  17. package/lib/types/client/LedgerPage.js +112 -112
  18. package/lib/types/client/MemoryFooterAction.d.ts +21 -21
  19. package/lib/types/client/MemoryFooterAction.js +14 -14
  20. package/lib/types/client/Workbench.d.ts +24 -24
  21. package/lib/types/client/Workbench.js +142 -142
  22. package/lib/types/client/actions.d.ts +164 -164
  23. package/lib/types/client/actions.js +50 -50
  24. package/lib/types/client/index.d.ts +23 -23
  25. package/lib/types/client/index.js +102 -102
  26. package/lib/types/client/navStore.d.ts +44 -44
  27. package/lib/types/client/navStore.js +35 -35
  28. package/lib/types/core.d.ts +263 -263
  29. package/lib/types/core.js +1543 -1543
  30. package/lib/types/invariant.d.ts +20 -20
  31. package/lib/types/invariant.js +32 -32
  32. package/lib/types/service.d.ts +185 -185
  33. package/lib/types/service.js +688 -688
  34. package/lib/types/store.d.ts +271 -271
  35. package/lib/types/store.js +983 -983
  36. package/lib/types/tools.d.ts +24 -24
  37. package/lib/types/tools.js +1143 -1143
  38. package/lib/types/types.d.ts +909 -909
  39. package/lib/types/types.js +20 -20
  40. package/package.json +116 -116
  41. package/skill/memory-extraction.md +82 -62
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 daoing
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daoing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/cordis.patch.yml CHANGED
@@ -1,22 +1,22 @@
1
- # dsh-daoing-memory bundle patch
2
- #
3
- # Inserts the self-evolving memory plugin into a DSH profile composition.
4
- # Applied as a patch layer by `dsh plugin add` (the CLI reconciles this
5
- # package into `dsh.profile.bundles` because its manifest declares
6
- # `dsh.bundle.patch`).
7
- #
8
- # Row ids `memory` / `memory-tools` follow the DSH memory convention. Patch
9
- # rows are last-write-wins per id, so if the profile's base bundle already
10
- # carries an in-box memory row, installing this plugin re-points that row to
11
- # the dsh-daoing-memory implementation instead of duplicating it. If the
12
- # profile has no memory row yet, this patch simply adds one.
13
- #
14
- # The browser workbench half rides the `memory` row's dsh.client declaration
15
- # in package.json; the model-facing tools live behind the `memory-tools` row.
16
-
17
- - insert:
18
- - id: memory
19
- name: 'dsh-daoing-memory'
20
-
21
- - id: memory-tools
22
- name: 'dsh-daoing-memory/tools'
1
+ # dsh-daoing-memory bundle patch
2
+ #
3
+ # Inserts the self-evolving memory plugin into a DSH profile composition.
4
+ # Applied as a patch layer by `dsh plugin add` (the CLI reconciles this
5
+ # package into `dsh.profile.bundles` because its manifest declares
6
+ # `dsh.bundle.patch`).
7
+ #
8
+ # Row ids `memory` / `memory-tools` follow the DSH memory convention. Patch
9
+ # rows are last-write-wins per id, so if the profile's base bundle already
10
+ # carries an in-box memory row, installing this plugin re-points that row to
11
+ # the dsh-daoing-memory implementation instead of duplicating it. If the
12
+ # profile has no memory row yet, this patch simply adds one.
13
+ #
14
+ # The browser workbench half rides the `memory` row's dsh.client declaration
15
+ # in package.json; the model-facing tools live behind the `memory-tools` row.
16
+
17
+ - insert:
18
+ - id: memory
19
+ name: 'dsh-daoing-memory'
20
+
21
+ - id: memory-tools
22
+ name: 'dsh-daoing-memory/tools'
package/lib/index.js CHANGED
@@ -4776,5 +4776,5 @@ function apply(ctx, config = {}) {
4776
4776
  }, "memory: SQLite store lifetime");
4777
4777
  }
4778
4778
  //#endregion
4779
- export const inject = ['llm', 'agentDefaultModel'];
4779
+ export const inject = ['llm', 'agentDefaultModel'];
4780
4780
  export { DEFAULT_CORE_CONFIG, MEMORY_SCHEMA_VERSION, MemoryCore, MemoryService, MemoryStore, apply, resolveConfig };
package/lib/invariant.js CHANGED
@@ -1,33 +1,33 @@
1
- //#region lib/types/invariant.js
2
- /**
3
- * Package-owned memory invariants. Asserts the append-only ledger's owned
4
- * relationship — every block's hash chains to its predecessor, recomputed
5
- * from the block content — against the durable store at companion attach
6
- * time. Ledger appends happen in-process through MemoryCore, which chains
7
- * each new block to the live head, so a broken chain at attach time means
8
- * the persisted file was corrupted or tampered with externally.
9
- * @module dsh-daoing-memory/invariant
10
- */
11
- const PACKAGE_NAME = "dsh-daoing-memory";
12
- /** Cordis companion plugin name. */
13
- const name = "memory-invariant";
14
- /** Service required before the companion can reserve package ownership. */
15
- const inject = ["invariants"];
16
- /** Verify the ledger hash chain end to end against the live store. */
17
- const install = Object.assign((ctx, fail) => {
18
- const memory = ctx.get("memory");
19
- if (memory === void 0) {
20
- fail("memory invariant: the memory service is not provided");
21
- return;
22
- }
23
- const result = memory.verifyLedgerIntegrity();
24
- if (!result.ok) fail(`memory ledger hash chain broken at seq ${String(result.brokenAt ?? 0)} (checked ${String(result.checked)} blocks)`);
25
- }, { inject: ["memory"] });
26
- /**
27
- * Register the memory invariant companion.
28
- * @param ctx - Cordis context carrying the invariant service.
29
- * @returns the installed registration's disposer after setup succeeds.
30
- */
31
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
32
- //#endregion
33
- export { apply, inject, name };
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned memory invariants. Asserts the append-only ledger's owned
4
+ * relationship — every block's hash chains to its predecessor, recomputed
5
+ * from the block content — against the durable store at companion attach
6
+ * time. Ledger appends happen in-process through MemoryCore, which chains
7
+ * each new block to the live head, so a broken chain at attach time means
8
+ * the persisted file was corrupted or tampered with externally.
9
+ * @module dsh-daoing-memory/invariant
10
+ */
11
+ const PACKAGE_NAME = "dsh-daoing-memory";
12
+ /** Cordis companion plugin name. */
13
+ const name = "memory-invariant";
14
+ /** Service required before the companion can reserve package ownership. */
15
+ const inject = ["invariants"];
16
+ /** Verify the ledger hash chain end to end against the live store. */
17
+ const install = Object.assign((ctx, fail) => {
18
+ const memory = ctx.get("memory");
19
+ if (memory === void 0) {
20
+ fail("memory invariant: the memory service is not provided");
21
+ return;
22
+ }
23
+ const result = memory.verifyLedgerIntegrity();
24
+ if (!result.ok) fail(`memory ledger hash chain broken at seq ${String(result.brokenAt ?? 0)} (checked ${String(result.checked)} blocks)`);
25
+ }, { inject: ["memory"] });
26
+ /**
27
+ * Register the memory invariant companion.
28
+ * @param ctx - Cordis context carrying the invariant service.
29
+ * @returns the installed registration's disposer after setup succeeds.
30
+ */
31
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
32
+ //#endregion
33
+ export { apply, inject, name };