dsh-mnemon 0.4.7 → 0.5.0
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 +10 -20
- package/README.zh-CN.md +10 -20
- package/SECURITY.md +8 -8
- package/cordis.patch.yml +42 -0
- package/lib/client.js +2360 -6843
- package/lib/contracts.js +16 -17
- package/lib/core.js +11 -0
- package/lib/definitions-j0FLgE0-.js +251 -0
- package/lib/extension-sdk.js +93 -229
- package/lib/index.js +3730 -6330
- package/lib/runtime-AtIOTeP1.js +1316 -0
- package/lib/storage-lock-Bqrhkyag.js +20 -0
- package/lib/testing.js +231 -0
- package/lib/types/src/client/extension-sdk.d.ts +10 -0
- package/lib/types/src/client/index.d.ts +1 -0
- package/lib/types/src/client/locales.d.ts +84 -0
- package/lib/types/src/client/page-client.d.ts +15 -0
- package/lib/types/src/client/page-kit.d.ts +40 -0
- package/lib/types/src/client/source-contracts.d.ts +46 -0
- package/lib/types/src/client/source-pages.d.ts +83 -0
- package/lib/types/src/core/contracts/index.d.ts +40 -0
- package/lib/types/src/core/contracts/plugin.d.ts +32 -0
- package/lib/types/src/core/contracts/view.d.ts +416 -0
- package/lib/types/src/core/definitions.d.ts +16 -0
- package/lib/types/src/core/plugin.d.ts +6 -0
- package/lib/types/src/{config-values.d.ts → host/config-values.d.ts} +7 -7
- package/lib/types/src/{config.d.ts → host/config.d.ts} +4 -1
- package/lib/types/src/{shared → host}/display-mode.d.ts +1 -1
- package/lib/types/src/host/plugin.d.ts +8 -0
- package/lib/types/src/host/protocol.d.ts +549 -0
- package/lib/types/src/host/view-protocol.d.ts +123 -0
- package/lib/types/src/index.d.ts +2 -21
- package/lib/types/src/sdk/index.d.ts +9 -0
- package/lib/types/src/sdk/input.d.ts +11 -0
- package/lib/types/src/sdk/install.d.ts +7 -0
- package/lib/types/src/sdk/service.d.ts +31 -0
- package/lib/types/src/sdk/storage-lock.d.ts +6 -0
- package/lib/types/src/sdk/strategy-configuration.d.ts +31 -0
- package/lib/types/src/sdk/testing.d.ts +70 -0
- package/package.json +46 -35
- package/lib/kernel.js +0 -1173
- package/lib/layers/documents.js +0 -31
- package/lib/layers/memory-spaces.js +0 -34
- package/lib/layers/runtime.js +0 -27
- package/lib/provider-sdk.js +0 -2
- package/lib/registry-B9SdBRLo.js +0 -2423
- package/lib/strategy-default-three-tier.js +0 -99
- package/lib/strategy-sdk.js +0 -56
- package/lib/types/packages/contracts/src/index.d.ts +0 -221
- package/lib/types/packages/extension-sdk/src/index.d.ts +0 -54
- package/lib/types/packages/kernel/src/access.d.ts +0 -14
- package/lib/types/packages/kernel/src/catalog.d.ts +0 -42
- package/lib/types/packages/kernel/src/index.d.ts +0 -5
- package/lib/types/packages/kernel/src/kernel.d.ts +0 -46
- package/lib/types/packages/kernel/src/topology.d.ts +0 -25
- package/lib/types/packages/kernel/src/view.d.ts +0 -89
- package/lib/types/packages/layer-documents/src/index.d.ts +0 -4
- package/lib/types/packages/layer-memory-spaces/src/index.d.ts +0 -4
- package/lib/types/packages/layer-runtime/src/index.d.ts +0 -4
- package/lib/types/packages/provider-sdk/src/index.d.ts +0 -19
- package/lib/types/packages/strategy-default-three-tier/src/index.d.ts +0 -7
- package/lib/types/packages/strategy-sdk/src/index.d.ts +0 -35
- package/lib/types/src/activity.d.ts +0 -16
- package/lib/types/src/agent-memory-turn.d.ts +0 -42
- package/lib/types/src/channels.d.ts +0 -1
- package/lib/types/src/client/GlobalLocationSetting.d.ts +0 -19
- package/lib/types/src/client/MnemonPackSection.d.ts +0 -13
- package/lib/types/src/client/MnemonSaveAction.d.ts +0 -13
- package/lib/types/src/client/MnemonSettingsCard.d.ts +0 -16
- package/lib/types/src/client/MnemonTurnTail.d.ts +0 -21
- package/lib/types/src/client/MnemonView.d.ts +0 -26
- package/lib/types/src/client/ProviderIcon.d.ts +0 -8
- package/lib/types/src/client/ProviderSettingsSection.d.ts +0 -16
- package/lib/types/src/client/anchor.d.ts +0 -27
- package/lib/types/src/client/api.d.ts +0 -83
- package/lib/types/src/client/better-sidebar.d.ts +0 -13
- package/lib/types/src/client/dsh-compat.d.ts +0 -51
- package/lib/types/src/client/settings.d.ts +0 -23
- package/lib/types/src/client/sidebar-entry.d.ts +0 -5
- package/lib/types/src/client/subagent-token-usage.d.ts +0 -23
- package/lib/types/src/client/workspace-controller.d.ts +0 -14
- package/lib/types/src/client/workspace-mount.d.ts +0 -20
- package/lib/types/src/commands.d.ts +0 -13
- package/lib/types/src/contracts.d.ts +0 -316
- package/lib/types/src/documents.d.ts +0 -77
- package/lib/types/src/git-branch.d.ts +0 -6
- package/lib/types/src/guidance.d.ts +0 -29
- package/lib/types/src/lifecycle.d.ts +0 -80
- package/lib/types/src/live-runtime.d.ts +0 -92
- package/lib/types/src/memory-bodies.d.ts +0 -57
- package/lib/types/src/memory-receipts.d.ts +0 -21
- package/lib/types/src/memory-system/access.d.ts +0 -2
- package/lib/types/src/memory-system/catalog.d.ts +0 -2
- package/lib/types/src/memory-system/contracts.d.ts +0 -2
- package/lib/types/src/memory-system/defaults.d.ts +0 -6
- package/lib/types/src/memory-system/index.d.ts +0 -7
- package/lib/types/src/memory-system/kernel.d.ts +0 -2
- package/lib/types/src/memory-system/topology.d.ts +0 -2
- package/lib/types/src/memory-system/view.d.ts +0 -2
- package/lib/types/src/memory-view.d.ts +0 -21
- package/lib/types/src/pack.d.ts +0 -29
- package/lib/types/src/process.d.ts +0 -16
- package/lib/types/src/provider-placement.d.ts +0 -26
- package/lib/types/src/provider-sdk.d.ts +0 -4
- package/lib/types/src/providers/byterover.d.ts +0 -32
- package/lib/types/src/providers/catalog.d.ts +0 -23
- package/lib/types/src/providers/hindsight.d.ts +0 -20
- package/lib/types/src/providers/holographic.d.ts +0 -23
- package/lib/types/src/providers/honcho.d.ts +0 -18
- package/lib/types/src/providers/http.d.ts +0 -32
- package/lib/types/src/providers/mem0.d.ts +0 -18
- package/lib/types/src/providers/memory-system.d.ts +0 -6
- package/lib/types/src/providers/openviking.d.ts +0 -32
- package/lib/types/src/providers/provider.d.ts +0 -46
- package/lib/types/src/providers/registry.d.ts +0 -23
- package/lib/types/src/providers/retaindb.d.ts +0 -17
- package/lib/types/src/providers/supermemory.d.ts +0 -17
- package/lib/types/src/recall-quality/contracts.d.ts +0 -32
- package/lib/types/src/recall-quality/engine.d.ts +0 -13
- package/lib/types/src/recall-quality/index.d.ts +0 -4
- package/lib/types/src/recall-quality/policies.d.ts +0 -5
- package/lib/types/src/recall-quality/registry.d.ts +0 -10
- package/lib/types/src/review-activity.d.ts +0 -19
- package/lib/types/src/rpc.d.ts +0 -22
- package/lib/types/src/runner.d.ts +0 -41
- package/lib/types/src/runtime-memory.d.ts +0 -90
- package/lib/types/src/search-tokens.d.ts +0 -5
- package/lib/types/src/service.d.ts +0 -113
- package/lib/types/src/session-events.d.ts +0 -8
- package/lib/types/src/settings.d.ts +0 -6
- package/lib/types/src/shared/contracts.d.ts +0 -1008
- package/lib/types/src/storage-scope.d.ts +0 -12
- package/lib/types/src/subagent-token-usage.d.ts +0 -53
- package/lib/types/src/subagent.d.ts +0 -124
- package/lib/types/src/tools.d.ts +0 -10
- package/lib/types/src/version-updates.d.ts +0 -37
package/lib/contracts.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
//#region
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
//#region src/core/contracts/plugin.ts
|
|
2
|
+
/** Declarative identity and graph relations shared by every Mnemon plugin. */
|
|
3
|
+
const MEMORY_PLUGIN_API_VERSION = "dsh-mnemon/plugin/v1";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/core/contracts/view.ts
|
|
6
|
+
const COMPOSABLE_MEMORY_API_VERSION = "dsh-mnemon/v1";
|
|
7
|
+
const DEFAULT_MEMORY_VIEW_BUDGET = Object.freeze({
|
|
8
|
+
maxProjectionCharacters: 65536,
|
|
9
|
+
maxRoutes: 16,
|
|
10
|
+
maxActions: 16,
|
|
11
|
+
maxEvidenceResults: 16,
|
|
12
|
+
maxEvidenceCharacters: 16384
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/core/contracts/index.ts
|
|
7
16
|
const MEMORY_CAPABILITIES = [
|
|
8
17
|
"status",
|
|
9
18
|
"project",
|
|
@@ -21,16 +30,6 @@ const MEMORY_CAPABILITIES = [
|
|
|
21
30
|
"export",
|
|
22
31
|
"import"
|
|
23
32
|
];
|
|
24
|
-
const MEMORY_STRATEGY_HOOKS = [
|
|
25
|
-
"admission",
|
|
26
|
-
"placement",
|
|
27
|
-
"retrieval-planning",
|
|
28
|
-
"quality-fusion",
|
|
29
|
-
"projection",
|
|
30
|
-
"promotion-demotion",
|
|
31
|
-
"retention",
|
|
32
|
-
"maintenance"
|
|
33
|
-
];
|
|
34
33
|
const MEMORY_SOURCE_MODES = ["eager", "routed"];
|
|
35
34
|
//#endregion
|
|
36
|
-
export {
|
|
35
|
+
export { COMPOSABLE_MEMORY_API_VERSION, DEFAULT_MEMORY_VIEW_BUDGET, MEMORY_CAPABILITIES, MEMORY_PLUGIN_API_VERSION, MEMORY_SOURCE_MODES };
|
package/lib/core.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as provideMemoryRuntime } from "./runtime-AtIOTeP1.js";
|
|
2
|
+
//#region src/core/plugin.ts
|
|
3
|
+
const name = "dsh-mnemon-core";
|
|
4
|
+
const provide = ["mnemonMemory"];
|
|
5
|
+
const inject = [];
|
|
6
|
+
/** No built-in Source, Provider, filesystem, settings, tools, or Web dependency. */
|
|
7
|
+
function apply(context) {
|
|
8
|
+
provideMemoryRuntime(context);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { apply, inject, name, provide };
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { MEMORY_CAPABILITIES, MEMORY_PLUGIN_API_VERSION } from "./contracts.js";
|
|
2
|
+
//#region src/core/definitions.ts
|
|
3
|
+
const ID = /^[a-z][a-z0-9-]{0,127}$/u;
|
|
4
|
+
const PACKAGE = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u;
|
|
5
|
+
const CAPABILITIES = new Set(MEMORY_CAPABILITIES);
|
|
6
|
+
const PLUGIN_CAPABILITY = /^[a-z][a-z0-9.-]{0,127}$/u;
|
|
7
|
+
function requiredText(value, label, maximum = 500) {
|
|
8
|
+
if (typeof value !== "string") throw new Error(`${label} must be a string`);
|
|
9
|
+
const normalized = value.trim();
|
|
10
|
+
if (normalized === "") throw new Error(`${label} is required`);
|
|
11
|
+
if (normalized.length > maximum) throw new Error(`${label} is too long (max ${maximum} characters)`);
|
|
12
|
+
return normalized;
|
|
13
|
+
}
|
|
14
|
+
function id(value, label) {
|
|
15
|
+
const normalized = requiredText(value, label, 128);
|
|
16
|
+
if (!ID.test(normalized)) throw new Error(`${label} must match [a-z][a-z0-9-]{0,127}`);
|
|
17
|
+
return normalized;
|
|
18
|
+
}
|
|
19
|
+
function positiveInteger(value, label, maximum = 1e6) {
|
|
20
|
+
if (!Number.isInteger(value) || value < 1 || value > maximum) throw new Error(`${label} must be an integer within 1..${maximum}`);
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
/** Canonical JSON representation shared by validation, digest, and replay. */
|
|
24
|
+
function canonicalMemoryJson(value, label = "memory value", ancestors = /* @__PURE__ */ new Set(), depth = 0) {
|
|
25
|
+
if (depth > 48) throw new Error(`${label} is nested too deeply`);
|
|
26
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") return JSON.stringify(value);
|
|
27
|
+
if (typeof value === "number") {
|
|
28
|
+
if (!Number.isFinite(value)) throw new Error(`${label} contains a non-finite number`);
|
|
29
|
+
return JSON.stringify(value);
|
|
30
|
+
}
|
|
31
|
+
if (typeof value !== "object") throw new Error(`${label} contains a non-JSON value`);
|
|
32
|
+
if (ancestors.has(value)) throw new Error(`${label} contains a cycle`);
|
|
33
|
+
ancestors.add(value);
|
|
34
|
+
try {
|
|
35
|
+
if (Array.isArray(value)) return `[${value.map((item) => canonicalMemoryJson(item, label, ancestors, depth + 1)).join(",")}]`;
|
|
36
|
+
const prototype = Object.getPrototypeOf(value);
|
|
37
|
+
if (prototype !== Object.prototype && prototype !== null) throw new Error(`${label} contains a non-JSON object`);
|
|
38
|
+
return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${canonicalMemoryJson(item, label, ancestors, depth + 1)}`).join(",")}}`;
|
|
39
|
+
} finally {
|
|
40
|
+
ancestors.delete(value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function deepFreeze(value) {
|
|
44
|
+
if (typeof value !== "object" || value === null || Object.isFrozen(value)) return value;
|
|
45
|
+
for (const child of Object.values(value)) deepFreeze(child);
|
|
46
|
+
return Object.freeze(value);
|
|
47
|
+
}
|
|
48
|
+
/** Validate the JSON boundary without allocating a discarded canonical string. */
|
|
49
|
+
function assertMemoryJson(value, label, ancestors = /* @__PURE__ */ new Set(), depth = 0) {
|
|
50
|
+
if (depth > 48) throw new Error(`${label} is nested too deeply`);
|
|
51
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") return;
|
|
52
|
+
if (typeof value === "number") {
|
|
53
|
+
if (!Number.isFinite(value)) throw new Error(`${label} contains a non-finite number`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (typeof value !== "object") throw new Error(`${label} contains a non-JSON value`);
|
|
57
|
+
if (ancestors.has(value)) throw new Error(`${label} contains a cycle`);
|
|
58
|
+
ancestors.add(value);
|
|
59
|
+
try {
|
|
60
|
+
if (Array.isArray(value)) {
|
|
61
|
+
const length = value.length;
|
|
62
|
+
for (let index = 0; index < length; index++) if (index in value) assertMemoryJson(value[index], label, ancestors, depth + 1);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const prototype = Object.getPrototypeOf(value);
|
|
66
|
+
if (prototype !== Object.prototype && prototype !== null) throw new Error(`${label} contains a non-JSON object`);
|
|
67
|
+
const entries = Object.entries(value).sort(([left], [right]) => left.localeCompare(right));
|
|
68
|
+
for (const [, item] of entries) assertMemoryJson(item, label, ancestors, depth + 1);
|
|
69
|
+
} finally {
|
|
70
|
+
ancestors.delete(value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function jsonClone(value, label) {
|
|
74
|
+
assertMemoryJson(value, label);
|
|
75
|
+
return deepFreeze(structuredClone(value));
|
|
76
|
+
}
|
|
77
|
+
function uniqueIds(values, label) {
|
|
78
|
+
const output = [];
|
|
79
|
+
const seen = /* @__PURE__ */ new Set();
|
|
80
|
+
for (const value of values) {
|
|
81
|
+
const normalized = id(value, label);
|
|
82
|
+
if (seen.has(normalized)) throw new Error(`${label} is duplicated: ${normalized}`);
|
|
83
|
+
seen.add(normalized);
|
|
84
|
+
output.push(normalized);
|
|
85
|
+
}
|
|
86
|
+
return output;
|
|
87
|
+
}
|
|
88
|
+
function validateProvenance(value, expectedPackage) {
|
|
89
|
+
const packageName = requiredText(value.packageName, "memory package name", 214);
|
|
90
|
+
if (!PACKAGE.test(packageName)) throw new Error(`invalid memory package name: ${packageName}`);
|
|
91
|
+
if (packageName !== expectedPackage) throw new Error(`memory package provenance does not match manifest: ${packageName} != ${expectedPackage}`);
|
|
92
|
+
const entryId = requiredText(value.entryId, "memory Entry id", 300);
|
|
93
|
+
const artifactDigest = value.artifactDigest === void 0 ? void 0 : requiredText(value.artifactDigest, "memory artifact digest", 500);
|
|
94
|
+
return deepFreeze({
|
|
95
|
+
packageName,
|
|
96
|
+
entryId,
|
|
97
|
+
...artifactDigest === void 0 ? {} : { artifactDigest }
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function validateCapabilities(values, label) {
|
|
101
|
+
const normalized = uniqueIds(values, label);
|
|
102
|
+
for (const capability of normalized) if (!CAPABILITIES.has(capability)) throw new Error(`${label} contains unsupported capability: ${capability}`);
|
|
103
|
+
return normalized;
|
|
104
|
+
}
|
|
105
|
+
function localizedText(value, label) {
|
|
106
|
+
return deepFreeze({
|
|
107
|
+
en: requiredText(value.en, `${label} (English)`, 4e3),
|
|
108
|
+
"zh-CN": requiredText(value["zh-CN"], `${label} (Simplified Chinese)`, 4e3)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function pluginCapabilities(values, label) {
|
|
112
|
+
const output = [];
|
|
113
|
+
const seen = /* @__PURE__ */ new Set();
|
|
114
|
+
for (const value of values) {
|
|
115
|
+
const normalized = requiredText(value, label, 128);
|
|
116
|
+
if (!PLUGIN_CAPABILITY.test(normalized)) throw new Error(`${label} must match [a-z][a-z0-9.-]{0,127}`);
|
|
117
|
+
if (seen.has(normalized)) throw new Error(`${label} is duplicated: ${normalized}`);
|
|
118
|
+
seen.add(normalized);
|
|
119
|
+
output.push(normalized);
|
|
120
|
+
}
|
|
121
|
+
return output;
|
|
122
|
+
}
|
|
123
|
+
/** Validate a plugin node independently of whether its Fiber is active. */
|
|
124
|
+
function defineMemoryPlugin(value) {
|
|
125
|
+
if ("apiVersion" in value && value.apiVersion !== "dsh-mnemon/plugin/v1") throw new Error(`unsupported memory plugin API: ${String(value.apiVersion)}`);
|
|
126
|
+
const packageName = requiredText(value.packageName, "memory plugin packageName", 214);
|
|
127
|
+
if (!PACKAGE.test(packageName)) throw new Error(`invalid memory plugin packageName: ${packageName}`);
|
|
128
|
+
const roles = uniqueIds(value.roles, "memory plugin role");
|
|
129
|
+
if (roles.length === 0 || roles.some((role) => ![
|
|
130
|
+
"source",
|
|
131
|
+
"strategy",
|
|
132
|
+
"strategy-extension"
|
|
133
|
+
].includes(role))) throw new Error("memory plugin must declare at least one supported contribution role");
|
|
134
|
+
const providedIds = pluginCapabilities(value.provides.map((capability) => capability.id), "memory plugin provided capability");
|
|
135
|
+
const provides = value.provides.map((capability, index) => deepFreeze({
|
|
136
|
+
id: providedIds[index],
|
|
137
|
+
...capability.exclusive === true ? { exclusive: true } : {}
|
|
138
|
+
}));
|
|
139
|
+
if (provides.length === 0) throw new Error("memory plugin must provide at least one capability");
|
|
140
|
+
const requires = pluginCapabilities(value.requires ?? [], "memory plugin required capability");
|
|
141
|
+
const selfProvided = new Set(providedIds);
|
|
142
|
+
for (const requirement of requires) if (selfProvided.has(requirement)) throw new Error(`memory plugin cannot require its own capability: ${requirement}`);
|
|
143
|
+
return deepFreeze({
|
|
144
|
+
apiVersion: MEMORY_PLUGIN_API_VERSION,
|
|
145
|
+
packageName,
|
|
146
|
+
label: localizedText(value.label, "memory plugin label"),
|
|
147
|
+
description: localizedText(value.description, "memory plugin description"),
|
|
148
|
+
roles,
|
|
149
|
+
provides,
|
|
150
|
+
...requires.length === 0 ? {} : { requires }
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
function validateRoute(route) {
|
|
154
|
+
const normalized = {
|
|
155
|
+
id: id(route.id, "memory Source route id"),
|
|
156
|
+
description: requiredText(route.description, "memory Source route description", 2e3),
|
|
157
|
+
capability: id(route.capability, "memory Source route capability"),
|
|
158
|
+
inputSchema: jsonClone(route.inputSchema, "memory Source route input schema"),
|
|
159
|
+
maxCalls: positiveInteger(route.maxCalls, "memory Source route maxCalls", 100),
|
|
160
|
+
...route.maxResults === void 0 ? {} : { maxResults: positiveInteger(route.maxResults, "memory Source route maxResults", 1e4) },
|
|
161
|
+
...route.maxCharacters === void 0 ? {} : { maxCharacters: positiveInteger(route.maxCharacters, "memory Source route maxCharacters", 1e7) }
|
|
162
|
+
};
|
|
163
|
+
if (!CAPABILITIES.has(normalized.capability)) throw new Error(`unsupported memory Source route capability: ${normalized.capability}`);
|
|
164
|
+
return deepFreeze(normalized);
|
|
165
|
+
}
|
|
166
|
+
function validateAction(action) {
|
|
167
|
+
const normalized = {
|
|
168
|
+
id: id(action.id, "memory Source action id"),
|
|
169
|
+
description: requiredText(action.description, "memory Source action description", 2e3),
|
|
170
|
+
capability: id(action.capability, "memory Source action capability"),
|
|
171
|
+
inputSchema: jsonClone(action.inputSchema, "memory Source action input schema"),
|
|
172
|
+
...action.authority === void 0 ? {} : { authority: requiredText(action.authority, "memory Source action authority", 300) }
|
|
173
|
+
};
|
|
174
|
+
if (!CAPABILITIES.has(normalized.capability)) throw new Error(`unsupported memory Source action capability: ${normalized.capability}`);
|
|
175
|
+
return deepFreeze(normalized);
|
|
176
|
+
}
|
|
177
|
+
function defineMemorySource(definition) {
|
|
178
|
+
const manifest = definition.manifest;
|
|
179
|
+
if (manifest.apiVersion !== "dsh-mnemon/v1") throw new Error(`unsupported memory Source API: ${String(manifest.apiVersion)}`);
|
|
180
|
+
if (manifest.kind !== "source") throw new Error("memory Source manifest kind must be source");
|
|
181
|
+
const typeId = id(manifest.typeId, "memory Source typeId");
|
|
182
|
+
const packageName = requiredText(manifest.packageName, "memory Source packageName", 214);
|
|
183
|
+
if (!PACKAGE.test(packageName)) throw new Error(`invalid memory Source packageName: ${packageName}`);
|
|
184
|
+
const role = id(manifest.role, "memory Source role");
|
|
185
|
+
if (manifest.consistency !== "exact-snapshot" && manifest.consistency !== "namespace-pinned-live-read") throw new Error(`unsupported memory Source consistency: ${String(manifest.consistency)}`);
|
|
186
|
+
if (typeof definition.create !== "function") throw new Error(`memory Source create() is required: ${typeId}`);
|
|
187
|
+
const routes = (manifest.routes ?? []).map(validateRoute);
|
|
188
|
+
uniqueIds(routes.map((route) => route.id), "memory Source route id");
|
|
189
|
+
const actions = (manifest.actions ?? []).map(validateAction);
|
|
190
|
+
uniqueIds(actions.map((action) => action.id), "memory Source action id");
|
|
191
|
+
const normalizedManifest = jsonClone({
|
|
192
|
+
...manifest,
|
|
193
|
+
typeId,
|
|
194
|
+
packageName,
|
|
195
|
+
role,
|
|
196
|
+
capabilities: validateCapabilities(manifest.capabilities, "memory Source capability"),
|
|
197
|
+
routes,
|
|
198
|
+
actions
|
|
199
|
+
}, "memory Source manifest");
|
|
200
|
+
return Object.freeze({
|
|
201
|
+
manifest: normalizedManifest,
|
|
202
|
+
create: definition.create
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function defineMemoryStrategy(definition) {
|
|
206
|
+
const manifest = definition.manifest;
|
|
207
|
+
if (manifest.apiVersion !== "dsh-mnemon/v1") throw new Error(`unsupported memory Strategy API: ${String(manifest.apiVersion)}`);
|
|
208
|
+
if (manifest.kind !== "strategy") throw new Error("memory Strategy manifest kind must be strategy");
|
|
209
|
+
const typeId = id(manifest.typeId, "memory Strategy typeId");
|
|
210
|
+
const packageName = requiredText(manifest.packageName, "memory Strategy packageName", 214);
|
|
211
|
+
if (!PACKAGE.test(packageName)) throw new Error(`invalid memory Strategy packageName: ${packageName}`);
|
|
212
|
+
if (manifest.deterministic !== true) throw new Error("memory Strategy must declare deterministic: true");
|
|
213
|
+
if (typeof definition.compose !== "function") throw new Error(`memory Strategy compose() is required: ${typeId}`);
|
|
214
|
+
if (definition.createTurn !== void 0 && typeof definition.createTurn !== "function") throw new Error("memory Strategy createTurn must be a function");
|
|
215
|
+
const normalizedManifest = jsonClone({
|
|
216
|
+
...manifest,
|
|
217
|
+
typeId,
|
|
218
|
+
packageName,
|
|
219
|
+
supportedSourceRoles: uniqueIds(manifest.supportedSourceRoles, "memory Strategy supported Source role"),
|
|
220
|
+
maxSources: positiveInteger(manifest.maxSources, "memory Strategy maxSources", 1e3),
|
|
221
|
+
maxRoutes: positiveInteger(manifest.maxRoutes, "memory Strategy maxRoutes", 1e3),
|
|
222
|
+
maxActions: positiveInteger(manifest.maxActions, "memory Strategy maxActions", 1e3),
|
|
223
|
+
...manifest.extensionSlots === void 0 ? {} : { extensionSlots: uniqueIds(manifest.extensionSlots, "memory Strategy extension slot") }
|
|
224
|
+
}, "memory Strategy manifest");
|
|
225
|
+
return Object.freeze({
|
|
226
|
+
manifest: normalizedManifest,
|
|
227
|
+
compose: definition.compose,
|
|
228
|
+
...definition.createTurn === void 0 ? {} : { createTurn: definition.createTurn }
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function defineMemoryStrategyExtension(definition) {
|
|
232
|
+
const manifest = definition.manifest;
|
|
233
|
+
if (manifest.apiVersion !== "dsh-mnemon/v1") throw new Error(`unsupported memory Strategy extension API: ${String(manifest.apiVersion)}`);
|
|
234
|
+
if (manifest.kind !== "strategy-extension") throw new Error("memory Strategy extension kind must be strategy-extension");
|
|
235
|
+
const packageName = requiredText(manifest.packageName, "memory Strategy extension packageName", 214);
|
|
236
|
+
if (!PACKAGE.test(packageName)) throw new Error(`invalid memory Strategy extension packageName: ${packageName}`);
|
|
237
|
+
if (manifest.deterministic !== true) throw new Error("memory Strategy extension must declare deterministic: true");
|
|
238
|
+
if (typeof definition.contribute !== "function") throw new Error("memory Strategy extension contribute() is required");
|
|
239
|
+
return Object.freeze({
|
|
240
|
+
manifest: jsonClone({
|
|
241
|
+
...manifest,
|
|
242
|
+
packageName,
|
|
243
|
+
typeId: id(manifest.typeId, "memory Strategy extension typeId"),
|
|
244
|
+
strategyTypeId: id(manifest.strategyTypeId, "memory Strategy extension target"),
|
|
245
|
+
slot: id(manifest.slot, "memory Strategy extension slot")
|
|
246
|
+
}, "memory Strategy extension manifest"),
|
|
247
|
+
contribute: definition.contribute
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
export { defineMemoryStrategy as a, jsonClone as c, uniqueIds as d, validateCapabilities as f, defineMemorySource as i, positiveInteger as l, deepFreeze as n, defineMemoryStrategyExtension as o, validateProvenance as p, defineMemoryPlugin as r, id as s, canonicalMemoryJson as t, requiredText as u };
|
package/lib/extension-sdk.js
CHANGED
|
@@ -1,238 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
descriptor: deepFreeze(structuredClone(registration.descriptor)),
|
|
14
|
-
...registration.execute === void 0 ? {} : { execute: registration.execute }
|
|
15
|
-
}));
|
|
16
|
-
const adapters = extension.adapters?.map((registration) => Object.freeze({ descriptor: deepFreeze(structuredClone(registration.descriptor)) }));
|
|
17
|
-
const strategies = extension.strategies?.map((registration) => Object.freeze({
|
|
18
|
-
descriptor: deepFreeze(structuredClone(registration.descriptor)),
|
|
19
|
-
propose: registration.propose
|
|
20
|
-
}));
|
|
21
|
-
const sources = extension.sources?.map((source) => Object.freeze({
|
|
22
|
-
layerId: source.layerId,
|
|
23
|
-
mode: source.mode,
|
|
24
|
-
snapshot: source.snapshot
|
|
25
|
-
}));
|
|
26
|
-
const guards = extension.guards?.map((guard) => Object.freeze({
|
|
27
|
-
id: guard.id,
|
|
28
|
-
decide: guard.decide
|
|
29
|
-
}));
|
|
30
|
-
return Object.freeze({
|
|
31
|
-
descriptor: deepFreeze({
|
|
32
|
-
...structuredClone(extension.descriptor),
|
|
33
|
-
id
|
|
34
|
-
}),
|
|
35
|
-
...layers === void 0 ? {} : { layers: Object.freeze(layers) },
|
|
36
|
-
...adapters === void 0 ? {} : { adapters: Object.freeze(adapters) },
|
|
37
|
-
...strategies === void 0 ? {} : { strategies: Object.freeze(strategies) },
|
|
38
|
-
...sources === void 0 ? {} : { sources: Object.freeze(sources) },
|
|
39
|
-
...guards === void 0 ? {} : { guards: Object.freeze(guards) }
|
|
40
|
-
});
|
|
1
|
+
import { t as withMemoryStorageLock } from "./storage-lock-Bqrhkyag.js";
|
|
2
|
+
import { a as defineMemoryStrategy, i as defineMemorySource, o as defineMemoryStrategyExtension, r as defineMemoryPlugin, t as canonicalMemoryJson } from "./definitions-j0FLgE0-.js";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
+
//#region src/sdk/install.ts
|
|
5
|
+
function stableEntryId(ctx, explicit) {
|
|
6
|
+
const configured = explicit?.trim();
|
|
7
|
+
if (configured !== void 0 && configured !== "") return configured;
|
|
8
|
+
const located = ctx.get("loader", false)?.locate(ctx.fiber)?.trim();
|
|
9
|
+
if (located !== void 0 && located !== "") return located;
|
|
10
|
+
const entryId = ctx.fiber.entry?.options?.id;
|
|
11
|
+
if (typeof entryId === "string" && entryId.trim() !== "") return entryId.trim();
|
|
12
|
+
throw new Error("installMemory requires a stable Loader Entry id; pass options.instanceId for direct ctx.plugin() mounts");
|
|
41
13
|
}
|
|
42
14
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* TurnView state. Cordis remains responsible for lifecycle and isolation.
|
|
15
|
+
* Register a plugin's Source and/or Strategy definitions as one Fiber-owned batch.
|
|
16
|
+
* Contribution roles do not dictate package or repository boundaries.
|
|
46
17
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
18
|
+
function installMemory(ctx, contribution, options = {}) {
|
|
19
|
+
const entryId = stableEntryId(ctx, options.instanceId);
|
|
20
|
+
ctx.effect(() => ctx.mnemonMemory.installContributions(contribution, {
|
|
21
|
+
...options,
|
|
22
|
+
instanceId: entryId
|
|
23
|
+
}), `dsh-mnemon: install ${entryId}`);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/sdk/input.ts
|
|
27
|
+
/** Stable digest of validated configuration; raw values never enter diagnostics. */
|
|
28
|
+
function memoryConfigurationDigest(value) {
|
|
29
|
+
return `config:${createHash("sha256").update(canonicalMemoryJson(value, "memory configuration")).digest("hex")}`;
|
|
30
|
+
}
|
|
31
|
+
function record(value, label) {
|
|
32
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${label} must be an object`);
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
function text(value, label, maximum, required = true) {
|
|
36
|
+
if (value === void 0 && !required) return void 0;
|
|
37
|
+
if (typeof value !== "string") throw new Error(`${label} must be a string`);
|
|
38
|
+
const normalized = value.trim();
|
|
39
|
+
if (required && normalized === "") throw new Error(`${label} is required`);
|
|
40
|
+
if (normalized.length > maximum) throw new Error(`${label} is too long (max ${maximum} characters)`);
|
|
41
|
+
return normalized === "" ? void 0 : normalized;
|
|
42
|
+
}
|
|
43
|
+
function integer(value, fallback, minimum, maximum) {
|
|
44
|
+
if (value === void 0) return fallback;
|
|
45
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < minimum || value > maximum) throw new Error(`value must be an integer within ${minimum}..${maximum}`);
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
function stringArray(value, label, maximum = 50) {
|
|
49
|
+
if (value === void 0) return void 0;
|
|
50
|
+
if (!Array.isArray(value) || value.length > maximum || value.some((item) => typeof item !== "string")) throw new Error(`${label} must be a string array`);
|
|
51
|
+
return value.map((item) => item.trim()).filter(Boolean);
|
|
52
|
+
}
|
|
53
|
+
function truncate(value, maximum) {
|
|
54
|
+
if (maximum <= 0) return "";
|
|
55
|
+
if (value.length <= maximum) return value;
|
|
56
|
+
let end = maximum - 1;
|
|
57
|
+
if (end > 0 && /[\uD800-\uDBFF]/u.test(value[end - 1])) end--;
|
|
58
|
+
return `${value.slice(0, end)}…`;
|
|
59
|
+
}
|
|
60
|
+
function receipt(viewId, offerId, sourceInstanceKey, revision, details, completion = "unknown") {
|
|
61
|
+
return {
|
|
62
|
+
id: `receipt:${randomUUID()}`,
|
|
63
|
+
viewId,
|
|
64
|
+
offerId,
|
|
65
|
+
sourceInstanceKey,
|
|
66
|
+
status: completion === "failed" ? "failed" : completion === "partial" || completion === "unknown" ? "partial" : "succeeded",
|
|
67
|
+
completion,
|
|
68
|
+
...completion === "committed" ? { committedAt: (/* @__PURE__ */ new Date()).toISOString() } : {},
|
|
69
|
+
...revision === void 0 ? {} : { revision },
|
|
70
|
+
details
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Validate migration proof supplied by an authorized Source management caller. */
|
|
74
|
+
function migrationLineage(value) {
|
|
75
|
+
if (value === void 0) return [];
|
|
76
|
+
if (!Array.isArray(value) || value.length > 1e3) throw new Error("lineage must be an array of at most 1000 entries");
|
|
77
|
+
return value.map((item) => {
|
|
78
|
+
const entry = record(item, "lineage");
|
|
79
|
+
const endpoint = (value) => {
|
|
80
|
+
const fields = record(value, "lineage endpoint");
|
|
81
|
+
return {
|
|
82
|
+
layerId: text(fields.layerId, "lineage layerId", 300),
|
|
83
|
+
reference: text(fields.reference, "lineage reference", 2e3),
|
|
84
|
+
digest: text(fields.digest, "lineage digest", 300)
|
|
85
|
+
};
|
|
85
86
|
};
|
|
86
|
-
try {
|
|
87
|
-
for (const extension of this.extensions.values()) target.releases.set(extension.descriptor.id, this.apply(extension, target));
|
|
88
|
-
} catch (error) {
|
|
89
|
-
reverseDispose([...target.releases.values()]);
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
this.targets.add(target);
|
|
93
87
|
return {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (target.kernel !== void 0) throw new Error("memory extension attachment already has a kernel");
|
|
97
|
-
target.kernel = kernel;
|
|
98
|
-
const guardReleases = /* @__PURE__ */ new Map();
|
|
99
|
-
try {
|
|
100
|
-
for (const extension of this.extensions.values()) {
|
|
101
|
-
const disposers = [];
|
|
102
|
-
try {
|
|
103
|
-
for (const guard of extension.guards ?? []) disposers.push(kernel.registerGuard(guard));
|
|
104
|
-
guardReleases.set(extension.descriptor.id, () => reverseDispose(disposers));
|
|
105
|
-
} catch (error) {
|
|
106
|
-
reverseDispose(disposers);
|
|
107
|
-
throw error;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
for (const [id, releaseGuards] of guardReleases) {
|
|
111
|
-
const releaseCatalog = target.releases.get(id) ?? (() => {});
|
|
112
|
-
target.releases.set(id, () => {
|
|
113
|
-
releaseGuards();
|
|
114
|
-
releaseCatalog();
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
} catch (error) {
|
|
118
|
-
reverseDispose([...guardReleases.values()]);
|
|
119
|
-
delete target.kernel;
|
|
120
|
-
throw error;
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
bindTurnViews: (manager) => {
|
|
124
|
-
if (target.released) throw new Error("memory extension attachment is released");
|
|
125
|
-
if (target.viewManager !== void 0) throw new Error("memory Boot attachment already has a TurnView manager");
|
|
126
|
-
target.viewManager = manager;
|
|
127
|
-
const sourceReleases = /* @__PURE__ */ new Map();
|
|
128
|
-
try {
|
|
129
|
-
for (const extension of this.extensions.values()) {
|
|
130
|
-
const disposers = [];
|
|
131
|
-
try {
|
|
132
|
-
for (const source of extension.sources ?? []) {
|
|
133
|
-
if (target.catalog.layer(source.layerId) === void 0) throw new Error(`MemorySource layer is unavailable: ${source.layerId}`);
|
|
134
|
-
disposers.push(manager.registerSource(source));
|
|
135
|
-
}
|
|
136
|
-
sourceReleases.set(extension.descriptor.id, () => reverseDispose(disposers));
|
|
137
|
-
} catch (error) {
|
|
138
|
-
reverseDispose(disposers);
|
|
139
|
-
throw error;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
manager.assertSourcesReady();
|
|
143
|
-
for (const [id, releaseSources] of sourceReleases) {
|
|
144
|
-
const releasePrevious = target.releases.get(id) ?? (() => {});
|
|
145
|
-
target.releases.set(id, () => {
|
|
146
|
-
releaseSources();
|
|
147
|
-
releasePrevious();
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
} catch (error) {
|
|
151
|
-
reverseDispose([...sourceReleases.values()]);
|
|
152
|
-
delete target.viewManager;
|
|
153
|
-
throw error;
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
dispose: () => {
|
|
157
|
-
if (target.released) return;
|
|
158
|
-
target.released = true;
|
|
159
|
-
this.targets.delete(target);
|
|
160
|
-
reverseDispose([...target.releases.values()]);
|
|
161
|
-
target.releases.clear();
|
|
162
|
-
},
|
|
163
|
-
release: () => {
|
|
164
|
-
if (target.released) return;
|
|
165
|
-
target.released = true;
|
|
166
|
-
this.targets.delete(target);
|
|
167
|
-
target.releases.clear();
|
|
168
|
-
}
|
|
88
|
+
source: endpoint(entry.source),
|
|
89
|
+
destination: endpoint(entry.destination)
|
|
169
90
|
};
|
|
170
|
-
}
|
|
171
|
-
descriptors() {
|
|
172
|
-
return [...this.extensions.values()].map((extension) => ({ ...extension.descriptor })).sort((left, right) => left.id.localeCompare(right.id));
|
|
173
|
-
}
|
|
174
|
-
apply(extension, target) {
|
|
175
|
-
const disposers = [];
|
|
176
|
-
try {
|
|
177
|
-
for (const layer of extension.layers ?? []) disposers.push(target.catalog.registerLayer(layer));
|
|
178
|
-
for (const adapter of extension.adapters ?? []) disposers.push(target.catalog.registerAdapter(adapter));
|
|
179
|
-
for (const strategy of extension.strategies ?? []) disposers.push(target.catalog.registerStrategy(strategy));
|
|
180
|
-
if (target.kernel !== void 0) for (const guard of extension.guards ?? []) disposers.push(target.kernel.registerGuard(guard));
|
|
181
|
-
if (target.viewManager !== void 0) for (const source of extension.sources ?? []) {
|
|
182
|
-
if (target.catalog.layer(source.layerId) === void 0) throw new Error(`MemorySource layer is unavailable: ${source.layerId}`);
|
|
183
|
-
disposers.push(target.viewManager.registerSource(source));
|
|
184
|
-
}
|
|
185
|
-
return () => reverseDispose(disposers);
|
|
186
|
-
} catch (error) {
|
|
187
|
-
reverseDispose(disposers);
|
|
188
|
-
throw error;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
applyChecked(extension, target) {
|
|
192
|
-
const release = this.apply(extension, target);
|
|
193
|
-
try {
|
|
194
|
-
target.viewManager?.assertSourcesReady();
|
|
195
|
-
return release;
|
|
196
|
-
} catch (error) {
|
|
197
|
-
release();
|
|
198
|
-
throw error;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
/** Remove one global extension from every live graph, or restore it everywhere. */
|
|
202
|
-
unregister(extension) {
|
|
203
|
-
const id = extension.descriptor.id;
|
|
204
|
-
const removed = [];
|
|
205
|
-
try {
|
|
206
|
-
for (const target of this.targets) {
|
|
207
|
-
const release = target.releases.get(id);
|
|
208
|
-
if (release === void 0) continue;
|
|
209
|
-
release();
|
|
210
|
-
target.releases.delete(id);
|
|
211
|
-
removed.push(target);
|
|
212
|
-
target.viewManager?.assertSourcesReady();
|
|
213
|
-
}
|
|
214
|
-
} catch (error) {
|
|
215
|
-
const rollbackFailures = [];
|
|
216
|
-
for (const target of removed.reverse()) try {
|
|
217
|
-
target.releases.set(id, this.applyChecked(extension, target));
|
|
218
|
-
} catch (rollbackError) {
|
|
219
|
-
rollbackFailures.push(rollbackError);
|
|
220
|
-
}
|
|
221
|
-
if (rollbackFailures.length > 0) throw new AggregateError([error, ...rollbackFailures], `memory extension ${id} unload failed and could not be fully rolled back`);
|
|
222
|
-
throw error;
|
|
223
|
-
}
|
|
224
|
-
this.extensions.delete(id);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
function defineMemoryExtension(extension) {
|
|
228
|
-
return extension;
|
|
91
|
+
});
|
|
229
92
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/sdk/strategy-configuration.ts
|
|
95
|
+
function defineMemoryStrategyConfiguration(value) {
|
|
96
|
+
return Object.freeze({
|
|
97
|
+
...value,
|
|
98
|
+
apiVersion: "dsh-mnemon/strategy-configuration/v1"
|
|
99
|
+
});
|
|
236
100
|
}
|
|
237
101
|
//#endregion
|
|
238
|
-
export {
|
|
102
|
+
export { receipt as createMemoryMutationReceipt, defineMemoryPlugin, defineMemorySource, defineMemoryStrategy, defineMemoryStrategyConfiguration, defineMemoryStrategyExtension, installMemory, memoryConfigurationDigest, integer as memoryInputInteger, migrationLineage as memoryInputMigrationLineage, record as memoryInputRecord, stringArray as memoryInputStringArray, text as memoryInputText, truncate as truncateMemoryText, withMemoryStorageLock };
|