dsh-mnemon-strategy-default-three-tier 0.5.9 → 0.5.11
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/README.md +16 -9
- package/lib/extension-sdk.d.ts +4 -1
- package/lib/extension-sdk.js +4 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# dsh-mnemon-strategy-default-three-tier
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The **Layered strategy** (分层策略 in the Chinese interface), dsh-mnemon's default
|
|
4
|
+
main strategy: runtime memory stays resident, while Project Documents and Memory
|
|
5
|
+
Spaces are read on demand. It is one ordinary Cordis Strategy plugin that consumes
|
|
6
|
+
public Source facts and proposes that View; it imports no Source implementation
|
|
7
|
+
and grants no authority. Its type id is `default-three-tier`.
|
|
5
8
|
|
|
6
9
|
`compose` is pure. `createTurn` owns the executing turn's retrieval policy:
|
|
7
10
|
one Documents query (4 results / 6,000 content characters), two different Recall
|
|
@@ -14,16 +17,20 @@ Source schemas and provenance are the public read protocol. This plugin formats
|
|
|
14
17
|
the familiar compact model response; Core retains the evidence/authority envelope
|
|
15
18
|
for auditing without serializing it again into every model tool result.
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
This plugin also owns the Layered strategy's instructions and reminders.
|
|
18
21
|
They are pinned in `ViewSpec.guidance`, separately from Source projections. The
|
|
19
22
|
Host renders them for the selected turn; a different Strategy does not inherit
|
|
20
23
|
this plugin's instructions. DSH-assisted write/archival workflows remain Host
|
|
21
24
|
adapters over Source operations; Core does not schedule autonomous maintenance.
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
Its manifest declares `workflows: ['idle-review', 'runtime-capacity']`, the
|
|
27
|
+
background work the dsh-mnemon Host runs for the turns it composes: idle review,
|
|
28
|
+
and Runtime capacity maintenance, which the Host applies to named tools, generic
|
|
29
|
+
View Actions, child writes and browser management. A Strategy built by spreading
|
|
30
|
+
this manifest copies the declaration; `workflows: []` keeps it out of both.
|
|
31
|
+
`threeTierActionWorkflow` in `./extension-sdk` is kept for existing callers and
|
|
32
|
+
deprecated; the Host reads the declaration instead. A maintenance operation
|
|
33
|
+
retains its exact Source instance, scope, revision and authority;
|
|
27
34
|
archive destinations stay within the selected writable Source and pinned
|
|
28
35
|
namespaces. A browser write needs no conversation. One eligible destination
|
|
29
36
|
requires no model; routing and local profile compaction use a clean workspace
|
|
@@ -55,7 +62,7 @@ Replay and Related admission include the exact Source instance identity. Writes
|
|
|
55
62
|
still require an offered Action and Host authorization, including implicit
|
|
56
63
|
capacity maintenance. Explicit operator management is a separate channel.
|
|
57
64
|
|
|
58
|
-
With no extensions the original
|
|
65
|
+
With no extensions the Layered strategy's original composition is retained. Disabling
|
|
59
66
|
one extension only removes its contribution for new turns; running turns keep
|
|
60
67
|
their pinned View. If disabling explicit selection leaves multiple Sources in
|
|
61
68
|
the same role, the original ambiguity check applies rather than silently
|
|
@@ -71,7 +78,7 @@ no auto-activation patch; installing it does not override a configured Strategy.
|
|
|
71
78
|
|
|
72
79
|
## Installation and verification
|
|
73
80
|
|
|
74
|
-
The default Starter already mounts and selects
|
|
81
|
+
The default Starter already mounts and selects the Layered strategy. In an independent Profile, install the package, mount its Entry and explicitly select `default-three-tier`; another installed Strategy does not win by import order.
|
|
75
82
|
|
|
76
83
|
Installing an npm package is not the same as activating a contribution. From a source checkout, run `pnpm verify` with declared public peers installed; use a packed peer for unreleased SDK work.
|
|
77
84
|
|
package/lib/extension-sdk.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ import { MemoryAvailableSource, MemoryJsonValue, MemoryStrategyContribution, Mem
|
|
|
3
3
|
/** The three-tier slots are Core's standard View extension slots. */
|
|
4
4
|
type ThreeTierExtensionValues = MemoryViewExtensionValues;
|
|
5
5
|
type ThreeTierExtensionSlot = MemoryViewExtensionSlot;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Pure default-product policy. The Host executes it through public Source protocols.
|
|
8
|
+
* @deprecated The Host runs the workflows a Strategy declares in its manifest's `workflows`.
|
|
9
|
+
*/
|
|
7
10
|
declare function threeTierActionWorkflow(strategyTypeId: string, sourceTypeId: string, actionId: string): 'runtime-capacity' | undefined;
|
|
8
11
|
declare function validateThreeTierExtension<K extends ThreeTierExtensionSlot>(slot: K, value: MemoryJsonValue): ThreeTierExtensionValues[K];
|
|
9
12
|
/** An extension only for this Strategy; `defineMemoryViewExtension` also follows other Strategies. */
|
package/lib/extension-sdk.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { defineMemoryStrategyExtension, memoryViewExtensionValues, validateMemoryViewExtension } from "dsh-mnemon/extension-sdk";
|
|
2
2
|
import { COMPOSABLE_MEMORY_API_VERSION } from "dsh-mnemon/contracts";
|
|
3
3
|
//#region src/extension-sdk.ts
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Pure default-product policy. The Host executes it through public Source protocols.
|
|
6
|
+
* @deprecated The Host runs the workflows a Strategy declares in its manifest's `workflows`.
|
|
7
|
+
*/
|
|
5
8
|
function threeTierActionWorkflow(strategyTypeId, sourceTypeId, actionId) {
|
|
6
9
|
return strategyTypeId === "default-three-tier" && sourceTypeId === "runtime" && actionId === "mutate" ? "runtime-capacity" : void 0;
|
|
7
10
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare const DEFAULT_THREE_TIER_VIEW_STRATEGY: {
|
|
|
15
15
|
maxRoutes: number;
|
|
16
16
|
maxActions: number;
|
|
17
17
|
extensionSlots: string[];
|
|
18
|
+
workflows: ("idle-review" | "runtime-capacity")[];
|
|
18
19
|
};
|
|
19
20
|
compose(request: MemoryViewRequest, sources: readonly MemoryAvailableSource[], contributions?: readonly import("dsh-mnemon/extension-sdk").MemoryStrategyContribution[] | undefined): MemoryViewSpec;
|
|
20
21
|
};
|
package/lib/index.js
CHANGED
|
@@ -532,7 +532,8 @@ const DEFAULT_THREE_TIER_VIEW_STRATEGY = defineMemoryStrategy({
|
|
|
532
532
|
"selection",
|
|
533
533
|
"projection",
|
|
534
534
|
"capture"
|
|
535
|
-
]
|
|
535
|
+
],
|
|
536
|
+
workflows: ["idle-review", "runtime-capacity"]
|
|
536
537
|
},
|
|
537
538
|
compose(request, sources, contributions = []) {
|
|
538
539
|
if (contributions.length === 0) return composeThreeTier(request, sources);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon-strategy-default-three-tier",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"description": "Explicit three-tier View Strategy for Composable View Memory.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|
|
39
|
-
"dsh-mnemon": "^0.5.
|
|
39
|
+
"dsh-mnemon": "^0.5.35",
|
|
40
40
|
"tsdown": "^0.22.0",
|
|
41
41
|
"typescript": "^5.9.0",
|
|
42
42
|
"vitest": "^3.2.0"
|