@dcrays/mbh-memory 0.1.0 → 0.1.1-beta.2

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
@@ -2,4 +2,4 @@
2
2
 
3
3
  书灵墨宝的 DSH 云端记忆接入插件。加载后注册 `get_memory` 与 `set_memory`,把模型工具映射到配置的 HTTP API;插件本身不持久化记忆。
4
4
 
5
- 本包对应 `mbh-memory` 环境。API 地址由 Cordis 插件配置下发,不读取 `.env`。
5
+ 单一发布包同时适用于生产与测试桌面。API 地址由 Cordis 插件配置下发,不读取 `.env`。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrays/mbh-memory",
3
- "version": "0.1.0",
4
- "description": "DeepSeek Harness memory plugin for Mobook (production)",
3
+ "version": "0.1.1-beta.2",
4
+ "description": "DeepSeek Harness memory plugin for Mobook",
5
5
  "type": "module",
6
6
  "main": "plugin/index.js",
7
7
  "types": "plugin/index.d.ts",
@@ -36,4 +36,4 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  }
39
- }
39
+ }
package/plugin/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import type { Context } from '@deepseek-ai/cordis';
2
2
  import { Service } from '@deepseek-ai/cordis';
3
3
  import z from '@deepseek-ai/schemastery';
4
4
  import { type MemoryApiValue } from '../src/index.js';
5
- export { DEFAULT_BUILD_ENV } from '../src/config/env-config.js';
6
5
  export declare const name = "mbh-memory";
7
6
  export declare const inject: string[];
8
7
  export interface Config {
package/plugin/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __mobookCreateRequire } from 'node:module'; const require = __mobookCreateRequire(import.meta.url);
2
2
 
3
- // dist-npm/plugin/index.js
3
+ // dist/plugin/index.js
4
4
  import { Service } from "@deepseek-ai/cordis";
5
5
  import z from "@deepseek-ai/schemastery";
6
6
 
7
- // dist-npm/src/api-client.js
7
+ // dist/src/api-client.js
8
8
  var MemoryApiError = class extends Error {
9
9
  code;
10
10
  constructor(code, message, options) {
@@ -133,7 +133,7 @@ var MemoryApiClient = class {
133
133
  }
134
134
  };
135
135
 
136
- // dist-npm/src/tools.js
136
+ // dist/src/tools.js
137
137
  import { defineTool } from "@deepseek-ai/dsh-tools";
138
138
  function render(value) {
139
139
  return typeof value === "string" ? value : JSON.stringify(value);
@@ -172,29 +172,10 @@ function createMemoryTools(memory) {
172
172
  return [getMemory, setMemory];
173
173
  }
174
174
 
175
- // dist-npm/src/index.js
175
+ // dist/src/index.js
176
176
  var MBH_MEMORY_SERVICE_KEY = "mbhMemory";
177
177
 
178
- // dist-npm/src/config/env-config.js
179
- var ENV_CONFIG = {
180
- production: {
181
- packageName: "@dcrays/mbh-memory",
182
- channelId: "mbh-memory"
183
- },
184
- test: {
185
- packageName: "@dcrays/mbh-memory-test",
186
- channelId: "mbh-memory-test"
187
- },
188
- uat: {
189
- packageName: "@dcrays/mbh-memory-uat",
190
- channelId: "mbh-memory-uat"
191
- }
192
- };
193
- var DEFAULT_BUILD_ENV = "production";
194
- var CONFIG_CHANNEL_ID = ENV_CONFIG[DEFAULT_BUILD_ENV].channelId;
195
- var CONFIG_PLUGIN_PATH = `plugins.${CONFIG_CHANNEL_ID}`;
196
-
197
- // dist-npm/plugin/index.js
178
+ // dist/plugin/index.js
198
179
  var name = "@dcrays/mbh-memory";
199
180
  var inject = ["tools"];
200
181
  var Config = z.object({
@@ -256,7 +237,6 @@ function apply(ctx, config) {
256
237
  }
257
238
  export {
258
239
  Config,
259
- DEFAULT_BUILD_ENV,
260
240
  MbhMemoryService,
261
241
  apply,
262
242
  inject,
@@ -1,9 +1,8 @@
1
- export type BuildEnv = 'production' | 'test' | 'uat';
2
- export interface EnvConfig {
3
- packageName: string;
4
- channelId: string;
5
- }
6
- export declare const ENV_CONFIG: Record<BuildEnv, EnvConfig>;
7
- export declare const DEFAULT_BUILD_ENV: BuildEnv;
8
- export declare const CONFIG_CHANNEL_ID: string;
9
- export declare const CONFIG_PLUGIN_PATH: `plugins.${string}`;
1
+ export declare const PACKAGE_NAME = "@dcrays/mbh-memory";
2
+ /**
3
+ * A single package ships for every desktop build. The channel identity stays
4
+ * constant; per-environment behavior is resolved at runtime from mobook.json by
5
+ * the plugins that need it.
6
+ */
7
+ export declare const CONFIG_CHANNEL_ID = "mbh-memory";
8
+ export declare const CONFIG_PLUGIN_PATH: "plugins.mbh-memory";
@@ -1,17 +1,8 @@
1
- export const ENV_CONFIG = {
2
- production: {
3
- packageName: '@dcrays/mbh-memory',
4
- channelId: 'mbh-memory'
5
- },
6
- test: {
7
- packageName: '@dcrays/mbh-memory-test',
8
- channelId: 'mbh-memory-test'
9
- },
10
- uat: {
11
- packageName: '@dcrays/mbh-memory-uat',
12
- channelId: 'mbh-memory-uat'
13
- }
14
- };
15
- export const DEFAULT_BUILD_ENV = 'production';
16
- export const CONFIG_CHANNEL_ID = ENV_CONFIG[DEFAULT_BUILD_ENV].channelId;
1
+ export const PACKAGE_NAME = '@dcrays/mbh-memory';
2
+ /**
3
+ * A single package ships for every desktop build. The channel identity stays
4
+ * constant; per-environment behavior is resolved at runtime from mobook.json by
5
+ * the plugins that need it.
6
+ */
7
+ export const CONFIG_CHANNEL_ID = 'mbh-memory';
17
8
  export const CONFIG_PLUGIN_PATH = `plugins.${CONFIG_CHANNEL_ID}`;