dsh-daoing-memory 0.1.14 → 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.
- package/LICENSE +21 -21
- package/cordis.patch.yml +22 -22
- package/lib/index.js +1 -0
- package/lib/invariant.js +33 -33
- package/lib/tools.js +1472 -1472
- package/lib/typert.host.d.ts +3 -3
- package/lib/typert.host.js +4600 -4600
- package/lib/typert.remote-client.d.ts +176 -176
- package/lib/typert.remote-client.js +3670 -3670
- package/lib/types/client/ExperiencePage.d.ts +14 -14
- package/lib/types/client/ExperiencePage.js +116 -116
- package/lib/types/client/FactDiaryPage.d.ts +16 -16
- package/lib/types/client/FactDiaryPage.js +154 -154
- package/lib/types/client/HumanOpsPage.d.ts +15 -15
- package/lib/types/client/HumanOpsPage.js +207 -207
- package/lib/types/client/LedgerPage.d.ts +12 -12
- package/lib/types/client/LedgerPage.js +112 -112
- package/lib/types/client/MemoryFooterAction.d.ts +21 -21
- package/lib/types/client/MemoryFooterAction.js +14 -14
- package/lib/types/client/Workbench.d.ts +24 -24
- package/lib/types/client/Workbench.js +142 -142
- package/lib/types/client/actions.d.ts +164 -164
- package/lib/types/client/actions.js +50 -50
- package/lib/types/client/index.d.ts +23 -23
- package/lib/types/client/index.js +102 -102
- package/lib/types/client/navStore.d.ts +44 -44
- package/lib/types/client/navStore.js +35 -35
- package/lib/types/core.d.ts +263 -263
- package/lib/types/core.js +1543 -1543
- package/lib/types/invariant.d.ts +20 -20
- package/lib/types/invariant.js +32 -32
- package/lib/types/service.d.ts +185 -185
- package/lib/types/service.js +688 -688
- package/lib/types/store.d.ts +271 -271
- package/lib/types/store.js +983 -983
- package/lib/types/tools.d.ts +24 -24
- package/lib/types/tools.js +1143 -1143
- package/lib/types/types.d.ts +909 -909
- package/lib/types/types.js +20 -20
- package/package.json +116 -116
- 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,4 +4776,5 @@ function apply(ctx, config = {}) {
|
|
|
4776
4776
|
}, "memory: SQLite store lifetime");
|
|
4777
4777
|
}
|
|
4778
4778
|
//#endregion
|
|
4779
|
+
export const inject = ['llm', 'agentDefaultModel'];
|
|
4779
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 };
|