dsh-mnemon 0.5.30 → 0.5.32
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 +12 -12
- package/README.zh-CN.md +12 -12
- package/SECURITY.md +4 -4
- package/lib/bundle.js +1 -1
- package/lib/client.js +4021 -3355
- package/lib/contracts.js +3 -1
- package/lib/core.js +1 -1
- package/lib/{definitions-j9QPbrXb.js → definitions-DU7MLBhu.js} +3 -1
- package/lib/extension-sdk.js +2 -2
- package/lib/index.js +11049 -10764
- package/lib/{runtime-Bk6lFgxd.js → runtime-zuuBe8x1.js} +1 -1
- package/lib/{starter-resolution-CKedUNe4.js → starter-resolution-DoFp9FLr.js} +5 -5
- package/lib/starter.js +1 -1
- package/lib/{strategy-configuration-sVkKToSW.js → strategy-configuration-CLHxaPOb.js} +1 -1
- package/lib/testing.js +2 -2
- package/lib/types/src/client/GlobalLocationSetting.d.ts +19 -0
- package/lib/types/src/client/component-ui.d.ts +68 -0
- package/lib/types/src/client/extension-sdk.d.ts +5 -1
- package/lib/types/src/client/feedback.d.ts +65 -0
- package/lib/types/src/client/locales.d.ts +130 -127
- package/lib/types/src/client/page-controls.d.ts +7 -0
- package/lib/types/src/client/settings-controls.d.ts +66 -0
- package/lib/types/src/client/settings-panel.d.ts +58 -0
- package/lib/types/src/client/ui-icons.d.ts +0 -1
- package/lib/types/src/core/contracts/view.d.ts +9 -0
- package/lib/types/src/host/config-values.d.ts +1 -1
- package/lib/types/src/host/memory-tools.d.ts +139 -0
- package/lib/types/src/host/protocol.d.ts +112 -24
- package/lib/types/src/host/starter-components.d.ts +20 -0
- package/lib/types/src/host/sync-rules.d.ts +30 -0
- package/package.json +45 -45
package/lib/contracts.js
CHANGED
|
@@ -4,6 +4,8 @@ const MEMORY_PLUGIN_API_VERSION = "dsh-mnemon/plugin/v1";
|
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/core/contracts/view.ts
|
|
6
6
|
const COMPOSABLE_MEMORY_API_VERSION = "dsh-mnemon/v1";
|
|
7
|
+
/** Background work a Host runs for the turns of a Strategy that declares it. */
|
|
8
|
+
const MEMORY_STRATEGY_WORKFLOWS = ["idle-review", "runtime-capacity"];
|
|
7
9
|
/** Extension target for every selected Strategy that declares the extension's standard slot. */
|
|
8
10
|
const ANY_MEMORY_STRATEGY = "*";
|
|
9
11
|
/** Strategy role list entry for a role-agnostic Strategy that may select any Source. */
|
|
@@ -42,4 +44,4 @@ const MEMORY_CAPABILITIES = [
|
|
|
42
44
|
];
|
|
43
45
|
const MEMORY_SOURCE_MODES = ["eager", "routed"];
|
|
44
46
|
//#endregion
|
|
45
|
-
export { ANY_MEMORY_SOURCE_ROLE, ANY_MEMORY_STRATEGY, COMPOSABLE_MEMORY_API_VERSION, DEFAULT_MEMORY_VIEW_BUDGET, MEMORY_CAPABILITIES, MEMORY_PLUGIN_API_VERSION, MEMORY_SOURCE_MODES, MEMORY_VIEW_EXTENSION_SLOTS };
|
|
47
|
+
export { ANY_MEMORY_SOURCE_ROLE, ANY_MEMORY_STRATEGY, COMPOSABLE_MEMORY_API_VERSION, DEFAULT_MEMORY_VIEW_BUDGET, MEMORY_CAPABILITIES, MEMORY_PLUGIN_API_VERSION, MEMORY_SOURCE_MODES, MEMORY_STRATEGY_WORKFLOWS, MEMORY_VIEW_EXTENSION_SLOTS };
|
package/lib/core.js
CHANGED
|
@@ -225,6 +225,7 @@ function defineMemoryStrategy(definition) {
|
|
|
225
225
|
if (manifest.deterministic !== true) throw new Error("memory Strategy must declare deterministic: true");
|
|
226
226
|
if (typeof definition.compose !== "function") throw new Error(`memory Strategy compose() is required: ${typeId}`);
|
|
227
227
|
if (definition.createTurn !== void 0 && typeof definition.createTurn !== "function") throw new Error("memory Strategy createTurn must be a function");
|
|
228
|
+
if (manifest.workflows !== void 0 && !Array.isArray(manifest.workflows)) throw new Error("memory Strategy workflows must be a list");
|
|
228
229
|
const normalizedManifest = jsonClone({
|
|
229
230
|
...manifest,
|
|
230
231
|
typeId,
|
|
@@ -233,7 +234,8 @@ function defineMemoryStrategy(definition) {
|
|
|
233
234
|
maxSources: positiveInteger(manifest.maxSources, "memory Strategy maxSources", 1e3),
|
|
234
235
|
maxRoutes: positiveInteger(manifest.maxRoutes, "memory Strategy maxRoutes", 1e3),
|
|
235
236
|
maxActions: positiveInteger(manifest.maxActions, "memory Strategy maxActions", 1e3),
|
|
236
|
-
...manifest.extensionSlots === void 0 ? {} : { extensionSlots: uniqueIds(manifest.extensionSlots, "memory Strategy extension slot") }
|
|
237
|
+
...manifest.extensionSlots === void 0 ? {} : { extensionSlots: uniqueIds(manifest.extensionSlots, "memory Strategy extension slot") },
|
|
238
|
+
...manifest.workflows === void 0 ? {} : { workflows: uniqueIds(manifest.workflows, "memory Strategy workflow") }
|
|
237
239
|
}, "memory Strategy manifest");
|
|
238
240
|
return Object.freeze({
|
|
239
241
|
manifest: normalizedManifest,
|
package/lib/extension-sdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as memoryConfigurationDigest, c as record, d as truncate, f as withMemoryStorageLock, i as integer, l as stringArray, o as migrationLineage, s as receipt, t as defineMemoryStrategyConfiguration, u as text } from "./strategy-configuration-
|
|
1
|
+
import { a as memoryConfigurationDigest, c as record, d as truncate, f as withMemoryStorageLock, i as integer, l as stringArray, o as migrationLineage, s as receipt, t as defineMemoryStrategyConfiguration, u as text } from "./strategy-configuration-CLHxaPOb.js";
|
|
2
2
|
import { COMPOSABLE_MEMORY_API_VERSION, MEMORY_VIEW_EXTENSION_SLOTS } from "./contracts.js";
|
|
3
|
-
import { a as defineMemoryStrategy, i as defineMemorySource, o as defineMemoryStrategyExtension, r as defineMemoryPlugin } from "./definitions-
|
|
3
|
+
import { a as defineMemoryStrategy, i as defineMemorySource, o as defineMemoryStrategyExtension, r as defineMemoryPlugin } from "./definitions-DU7MLBhu.js";
|
|
4
4
|
//#region src/sdk/install.ts
|
|
5
5
|
function locatedEntryId(ctx) {
|
|
6
6
|
const located = ctx.get("loader", false)?.locate(ctx.fiber)?.trim();
|