dsh-mnemon-provider-openviking 0.5.3 → 0.5.4

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 CHANGED
@@ -18,10 +18,10 @@ providers:
18
18
 
19
19
  This is a **Memory Spaces child module**, not a top-level Source or a complete Strategy. It registers through `dsh-mnemon-source-memory-spaces/provider-sdk`; each parent Source owns its child Fibers, connection settings and lifetime. Credentials stay on the Host.
20
20
 
21
- [Provider setup and capability matrix](https://github.com/omdsh-dev/dsh-mnemon/blob/8466e3560a3b9de4e9f4b7302cbf005c84e8e69f/docs/en/guides/memory-providers.md) · [中文指南](https://github.com/omdsh-dev/dsh-mnemon/blob/8466e3560a3b9de4e9f4b7302cbf005c84e8e69f/docs/zh-CN/guides/memory-providers.md)
21
+ [Provider setup and capability matrix](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/guides/memory-providers.md) · [中文指南](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/guides/memory-providers.md)
22
22
 
23
23
  ## Develop independently
24
24
 
25
25
  From a source checkout with the declared dependencies installed, run `pnpm verify`. Tests, build and public exports belong to this package, without importing another package's controllers or repository configuration. Use the Source's public `/testing` fixtures for child registration and driver conformance; live service tests require a separately authorized environment.
26
26
 
27
- [Plugin author guide](https://github.com/omdsh-dev/dsh-mnemon/blob/8466e3560a3b9de4e9f4b7302cbf005c84e8e69f/docs/en/development/extensions.md)
27
+ [Plugin author guide](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/development/extensions.md)
package/lib/index.d.ts CHANGED
@@ -8,14 +8,14 @@ interface OpenVikingProviderOptions {
8
8
  pollIntervalMs?: number;
9
9
  }
10
10
  declare class OpenVikingProvider implements MemoryProviderAdapter {
11
- private readonly memoryBodies;
11
+ private readonly memorySpaces;
12
12
  readonly id: "openviking";
13
13
  readonly scoreSemantics: import("dsh-mnemon-source-memory-spaces/provider-sdk").ProviderScoreSemantics;
14
14
  private readonly requestFetch;
15
15
  private readonly requestTimeoutMs;
16
16
  private readonly settlementTimeoutMs;
17
17
  private readonly pollIntervalMs;
18
- constructor(memoryBodies: MemorySpaceAuthority, options?: OpenVikingProviderOptions);
18
+ constructor(memorySpaces: MemorySpaceAuthority, options?: OpenVikingProviderOptions);
19
19
  discover(connection: MemoryProviderConnection, signal?: AbortSignal): Promise<ProviderMemorySpace[]>;
20
20
  status(body: MemoryBody, signal?: AbortSignal): Promise<ProviderBodyStatus>;
21
21
  search(body: MemoryBody, request: SearchRequest, signal?: AbortSignal): Promise<ProviderSearchResult>;
package/lib/index.js CHANGED
@@ -30,15 +30,15 @@ function categoryFromUri(uri) {
30
30
  return (uri.includes(marker) ? uri.slice(uri.indexOf(marker) + 10) : "").split("/")[0]?.replace(/\.md$/u, "") || "general";
31
31
  }
32
32
  var OpenVikingProvider = class {
33
- memoryBodies;
33
+ memorySpaces;
34
34
  id = "openviking";
35
35
  scoreSemantics = NORMALIZED_RELEVANCE_SCORE;
36
36
  requestFetch;
37
37
  requestTimeoutMs;
38
38
  settlementTimeoutMs;
39
39
  pollIntervalMs;
40
- constructor(memoryBodies, options = {}) {
41
- this.memoryBodies = memoryBodies;
40
+ constructor(memorySpaces, options = {}) {
41
+ this.memorySpaces = memorySpaces;
42
42
  this.requestFetch = options.fetch ?? globalThis.fetch;
43
43
  this.requestTimeoutMs = options.requestTimeoutMs ?? 15e3;
44
44
  this.settlementTimeoutMs = options.settlementTimeoutMs ?? 12e4;
@@ -233,7 +233,7 @@ var OpenVikingProvider = class {
233
233
  }
234
234
  connection(body) {
235
235
  if ((body.provider.typeId ?? body.provider.id) !== this.id) throw new Error(`OpenViking cannot serve provider ${body.provider.id}`);
236
- const connection = this.memoryBodies.providerConnection(body.id, body.provider.id);
236
+ const connection = this.memorySpaces.providerConnection(body.id, body.provider.id);
237
237
  return {
238
238
  endpoint: String(connection.endpoint ?? ""),
239
239
  targetUri: String(connection.targetUri ?? ""),
@@ -302,7 +302,7 @@ const definition = defineMemorySpaceProviderDefinition({
302
302
  kind: "provider",
303
303
  typeId: descriptor.id,
304
304
  packageName: "dsh-mnemon-provider-openviking",
305
- version: "0.5.3",
305
+ version: "0.5.4",
306
306
  label: descriptor.label,
307
307
  icon: descriptor.icon,
308
308
  summary: descriptor.summary,
@@ -315,7 +315,7 @@ const definition = defineMemorySpaceProviderDefinition({
315
315
  secrets: descriptor.fields.filter((field) => field.input === "secret").map((field) => field.key),
316
316
  scoreSemantics: "normalized-relevance"
317
317
  },
318
- create: (context) => new OpenVikingProvider(context.memoryBodies, {
318
+ create: (context) => new OpenVikingProvider(context.memorySpaces ?? context.memoryBodies, {
319
319
  requestTimeoutMs: context.config.timeoutMs,
320
320
  settlementTimeoutMs: context.config.timeoutMs
321
321
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon-provider-openviking",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "OpenViking Provider child for the Memory Spaces Source.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^22.0.0",
37
- "dsh-mnemon-source-memory-spaces": "^0.5.3",
37
+ "dsh-mnemon-source-memory-spaces": "^0.5.4",
38
38
  "tsdown": "^0.22.0",
39
39
  "typescript": "^5.9.0",
40
40
  "vitest": "^3.2.0"