dsh-mnemon 0.5.36 → 0.5.38

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.
@@ -1265,6 +1265,8 @@ var MemoryRuntime = class {
1265
1265
  disposalFailures = [];
1266
1266
  batchDepth = 0;
1267
1267
  batchSnapshot;
1268
+ committedListeners = /* @__PURE__ */ new Set();
1269
+ contributionsPending = false;
1268
1270
  reconciliations = /* @__PURE__ */ new Map();
1269
1271
  /** Host assembly transaction: existing leases stay served until all Fibers settle. */
1270
1272
  async batch(operation) {
@@ -1278,12 +1280,22 @@ var MemoryRuntime = class {
1278
1280
  const pending = [...this.reconciliations];
1279
1281
  this.reconciliations.clear();
1280
1282
  for (const [host, snapshot] of pending) host.reconcile(snapshot);
1283
+ if (this.contributionsPending) {
1284
+ this.contributionsPending = false;
1285
+ this.notifyCommitted();
1286
+ }
1281
1287
  }
1282
1288
  }
1283
1289
  }
1284
1290
  installContributions(value) {
1285
1291
  if (this.closed) throw new Error("Memory Runtime is disposed");
1286
- return this.contributions.install(value);
1292
+ const release = this.contributions.install(value);
1293
+ this.notifyCommitted();
1294
+ return () => {
1295
+ const revision = this.contributions.snapshot().revision;
1296
+ release();
1297
+ if (this.contributions.snapshot().revision !== revision) this.notifyCommitted();
1298
+ };
1287
1299
  }
1288
1300
  contributionSnapshot() {
1289
1301
  return this.contributions.snapshot();
@@ -1291,6 +1303,25 @@ var MemoryRuntime = class {
1291
1303
  onContributionsChanged(listener) {
1292
1304
  return this.contributions.subscribe(listener);
1293
1305
  }
1306
+ /** Global Host consumers see the baseline until the assembly transaction settles. */
1307
+ committedContributionSnapshot() {
1308
+ return this.batchSnapshot ?? this.contributions.snapshot();
1309
+ }
1310
+ onCommittedContributionsChanged(listener) {
1311
+ this.committedListeners.add(listener);
1312
+ return () => {
1313
+ this.committedListeners.delete(listener);
1314
+ };
1315
+ }
1316
+ notifyCommitted() {
1317
+ if (this.closed) return;
1318
+ if (this.batchDepth) {
1319
+ this.contributionsPending = true;
1320
+ return;
1321
+ }
1322
+ const snapshot = this.contributions.snapshot();
1323
+ for (const listener of [...this.committedListeners]) listener(snapshot);
1324
+ }
1294
1325
  /** Attach one Host runtime graph to the current definition set. */
1295
1326
  attachGeneration(options = {}) {
1296
1327
  if (this.closed) throw new Error("Memory Runtime is disposed");
@@ -1331,6 +1362,7 @@ var MemoryRuntime = class {
1331
1362
  dispose() {
1332
1363
  if (this.disposal !== void 0) return this.disposal;
1333
1364
  this.closed = true;
1365
+ this.committedListeners.clear();
1334
1366
  this.disposal = Promise.allSettled([...this.generationAttachments].map((attachment) => attachment.dispose())).then(() => {
1335
1367
  if (this.disposalFailures.length > 0) throw new AggregateError(this.disposalFailures, "Memory Runtime cleanup failed");
1336
1368
  });
@@ -5,7 +5,7 @@ var name = "dsh-mnemon";
5
5
  var dependencies = {
6
6
  "@deepseek-ai/cosmokit": "^1.8.5",
7
7
  "@deepseek-ai/schemastery": "^3.18.4",
8
- "dsh-mnemon-provider-byterover": "0.5.5",
8
+ "dsh-mnemon-provider-byterover": "0.5.6",
9
9
  "dsh-mnemon-provider-hindsight": "0.5.7",
10
10
  "dsh-mnemon-provider-holographic": "0.5.7",
11
11
  "dsh-mnemon-provider-honcho": "0.5.5",
@@ -14,10 +14,10 @@ var dependencies = {
14
14
  "dsh-mnemon-provider-openviking": "0.5.10",
15
15
  "dsh-mnemon-provider-retaindb": "0.5.6",
16
16
  "dsh-mnemon-provider-supermemory": "0.5.5",
17
- "dsh-mnemon-source-documents": "0.5.11",
18
- "dsh-mnemon-source-memory-spaces": "0.5.23",
19
- "dsh-mnemon-source-runtime": "0.5.16",
20
- "dsh-mnemon-source-skills": "0.5.3",
17
+ "dsh-mnemon-source-documents": "0.5.12",
18
+ "dsh-mnemon-source-memory-spaces": "0.5.25",
19
+ "dsh-mnemon-source-runtime": "0.5.17",
20
+ "dsh-mnemon-source-skills": "0.5.5",
21
21
  "dsh-mnemon-strategy-auto-capture": "0.5.5",
22
22
  "dsh-mnemon-strategy-default-three-tier": "0.5.11",
23
23
  "dsh-mnemon-strategy-general": "0.5.1",
package/lib/starter.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as prepareStarterResolution } from "./starter-resolution-BVUz3pw4.js";
1
+ import { t as prepareStarterResolution } from "./starter-resolution-XVFzvnV0.js";
2
2
  //#region src/starter.ts
3
3
  const name = "dsh-mnemon-starter";
4
4
  const provide = ["mnemonStarterReady"];
package/lib/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as provideMemoryRuntime } from "./runtime-zuuBe8x1.js";
1
+ import { t as provideMemoryRuntime } from "./runtime-0u6dOiF9.js";
2
2
  import { DEFAULT_MEMORY_VIEW_BUDGET } from "./contracts.js";
3
3
  import { c as jsonClone } from "./definitions-DU7MLBhu.js";
4
4
  import { Context } from "@deepseek-ai/cordis";
@@ -1,5 +1,6 @@
1
1
  export { installMemorySourceUI, memorySourcePageEntryId, MNEMON_SOURCE_PAGE_SLOT, MNEMON_SOURCE_CONFIGURATION_MUTATE, MNEMON_SOURCE_CONFIGURATION_READ, type MemorySourcePageComponent, type MemorySourcePageDefinition, type MemorySourcePageProps, type MemorySourceUIContribution, type MemorySourceUIContext, type MemorySourcePageNavigation, } from './source-pages.tsx';
2
2
  export type { MnemonSourceManagementClient, MemorySourcePageInstance } from './source-contracts.ts';
3
+ export type { TaskAgentModelCatalog, TaskAgentModelCatalogGroup, TaskAgentModelCatalogModel } from "../core/contracts/index.js";
3
4
  export { installMemoryComponentUI, MNEMON_COMPONENT_FALLBACK_PRIORITY, MNEMON_COMPONENT_SETTINGS_SLOT, MNEMON_COMPONENT_STATUS_SLOT, type MemoryComponentConfigurationSnapshot, type MemoryComponentHost, type MemoryComponentSettingsComponent, type MemoryComponentSettingsProps, type MemoryComponentStatusComponent, type MemoryComponentStatusProps, type MemoryComponentUIContext, type MemoryComponentUIContribution, } from './component-ui.tsx';
4
5
  export { memorySettingsStyles, ToggleRow } from './settings-controls.tsx';
5
6
  export { PanelActions, useLive, useStaged, WriteFailure } from './settings-panel.tsx';
@@ -12,6 +12,9 @@ export declare const zh: {
12
12
  'common.showMore': string;
13
13
  'header.backToConversation': string;
14
14
  'header.configure': string;
15
+ 'header.noticeSummary': string;
16
+ 'header.noticeRemoteReadOnly': string;
17
+ 'header.noticeIdleReview': string;
15
18
  'header.compositionHint': string;
16
19
  'header.checking': string;
17
20
  'header.connected': string;
@@ -130,6 +133,13 @@ export declare const zh: {
130
133
  'status.reviewFailedDetail': string;
131
134
  'status.reviewPartial': string;
132
135
  'status.reviewTeamPaused': string;
136
+ 'status.reviewToolAccessPaused': string;
137
+ 'status.reviewWatermarkUsage': string;
138
+ 'status.reviewWatermarkNext': string;
139
+ 'status.reviewWatermarkPaused': string;
140
+ 'status.reviewWatermarkRecovery': string;
141
+ 'config.reviewPersistWatermark': string;
142
+ 'config.reviewPersistWatermarkHint': string;
133
143
  'status.reviewRun': string;
134
144
  'status.reviewContextWindow': string;
135
145
  'config.reviewTitle': string;
@@ -344,6 +354,12 @@ export declare const zh: {
344
354
  'config.runtimeUserScopeStorageHint': string;
345
355
  'config.runtimeUserScopeGlobal': string;
346
356
  'config.runtimeUserScopeGlobalHint': string;
357
+ 'config.runtimeLimitsTitle': string;
358
+ 'config.runtimeLimitsHint': string;
359
+ 'config.runtime.userLimitBytes': string;
360
+ 'config.runtime.memoryLimitBytes': string;
361
+ 'config.runtimeLimitsApply': string;
362
+ 'config.runtimeLimitInvalid': string;
347
363
  'config.enhancementsRefreshFailed': string;
348
364
  'config.strategyTitle': string;
349
365
  'config.strategyFailed': string;
@@ -10,6 +10,8 @@ export declare function MemorySourcePageFrame(props: {
10
10
  export declare function createMemorySourcePageClient(management: MnemonSourceManagementClient): {
11
11
  canAssist: (operation: string) => boolean;
12
12
  assist: <T>(operation: string, input: MemoryJsonValue, confirmed: boolean) => Promise<T>;
13
- read: <T>(operation: string, input?: MemoryJsonValue) => Promise<T>;
13
+ read: <T>(operation: string, input?: MemoryJsonValue, options?: {
14
+ coalesce?: boolean;
15
+ }) => Promise<T>;
14
16
  mutate: <T>(operation: string, input: MemoryJsonValue, confirmed: true) => Promise<T>;
15
17
  };
@@ -32,6 +32,11 @@ export declare function SelectField<T extends string>(props: {
32
32
  /** A fuller name for assistive technology than the visible label. */
33
33
  ariaLabel?: string | undefined;
34
34
  className?: string | undefined;
35
+ /**
36
+ * Repeat the chosen option's detail under its name in the selector itself, as
37
+ * the menu shows it. Off by default: most fields have no room for a second line.
38
+ */
39
+ triggerDetail?: boolean | undefined;
35
40
  onChange: (value: T) => void;
36
41
  }): JSX.Element;
37
42
  /** How a task Agent's write ended, as the receipt names it. */
@@ -1,4 +1,4 @@
1
- import type { MemoryJsonValue, MemorySourceManagementInstance, MemorySourceManagementResult } from "../core/contracts/index.js";
1
+ import type { MemoryJsonValue, MemorySourceManagementInstance, MemorySourceManagementResult, TaskAgentModelCatalog } from "../core/contracts/index.js";
2
2
  /** Instance- and scope-bound capability; never the Host's raw transport. */
3
3
  export interface MnemonSourceManagementClient {
4
4
  readonly sourceInstanceKey: string;
@@ -11,11 +11,19 @@ export interface MnemonSourceManagementClient {
11
11
  confirmed: boolean;
12
12
  }): Promise<MemorySourceManagementResult>;
13
13
  };
14
- read(operation: string, input?: MemoryJsonValue): Promise<MemorySourceManagementResult>;
14
+ /** Automatic inspections may share an identical pending read; explicit actions remain fresh by default. */
15
+ read(operation: string, input?: MemoryJsonValue, options?: {
16
+ coalesce?: boolean;
17
+ }): Promise<MemorySourceManagementResult>;
15
18
  mutate(operation: string, input: MemoryJsonValue, options: {
16
19
  expectedRevision?: string;
17
20
  confirmed: true;
18
21
  }): Promise<MemorySourceManagementResult>;
22
+ /**
23
+ * The routes and model directory a page may offer as a per-run choice. Absent
24
+ * on a Host that offers none, and the page then hides its pickers.
25
+ */
26
+ readonly models?: () => Promise<TaskAgentModelCatalog>;
19
27
  }
20
28
  /** Browser metadata is display-only; the Host validates capability identifiers. */
21
29
  export type MemorySourcePageInstance = Omit<MemorySourceManagementInstance, 'capabilities'> & {
@@ -31,6 +39,8 @@ export interface MemorySourcePageProps {
31
39
  management?: MnemonSourceManagementClient;
32
40
  /** Presentation hint only; the Host still authenticates every mutation. */
33
41
  writable?: boolean;
42
+ /** False while a retained panel is hidden; pause polling and focus refreshes. Defaults to true. */
43
+ active?: boolean;
34
44
  sessionId?: string;
35
45
  workspaceId?: string;
36
46
  locale: string;
@@ -38,3 +38,4 @@ export interface MemoryWake {
38
38
  }
39
39
  export * from './plugin.ts';
40
40
  export * from './view.ts';
41
+ export * from './task-agent-model.ts';
@@ -0,0 +1,49 @@
1
+ export interface TaskAgentModelCatalogModel {
2
+ id: string;
3
+ name: string;
4
+ description?: string;
5
+ /** DSH's merge-extensible model modality ids; absent means capability is unknown. */
6
+ inputModalities?: string[];
7
+ }
8
+ export interface TaskAgentModelCatalogGroup {
9
+ id: string;
10
+ name: string;
11
+ models: TaskAgentModelCatalogModel[];
12
+ }
13
+ export interface TaskAgentModelCatalogFailure {
14
+ id: string;
15
+ name: string;
16
+ message: string;
17
+ }
18
+ export interface TaskAgentModelCatalog {
19
+ effective?: {
20
+ provider: string;
21
+ model: string;
22
+ source: 'fixed' | 'session' | 'dsh-default' | 'active-agent';
23
+ };
24
+ defaultSelection?: {
25
+ provider: string;
26
+ model: string;
27
+ };
28
+ /**
29
+ * The route the asking conversation's own delegated work takes while it is
30
+ * open: the model of its last request, or the one it was created with before
31
+ * its first. An inherited setting that follows its conversation takes it too;
32
+ * it is reported whether or not that switch is on.
33
+ */
34
+ session?: {
35
+ provider: string;
36
+ model: string;
37
+ };
38
+ /**
39
+ * The route an inherited setting takes without following a conversation: the
40
+ * DSH new-session default, else an open Agent's creation route.
41
+ */
42
+ inherited?: {
43
+ provider: string;
44
+ model: string;
45
+ source: 'dsh-default' | 'active-agent';
46
+ };
47
+ groups: TaskAgentModelCatalogGroup[];
48
+ failures: TaskAgentModelCatalogFailure[];
49
+ }
@@ -233,6 +233,7 @@ export type MnemonDisplayMode = 'sidebar' | 'builtin';
233
233
  export declare const DEFAULT_IDLE_REVIEW: {
234
234
  enabled: true;
235
235
  runtimeMemory: true;
236
+ persistWatermark: false;
236
237
  provider: "spawn";
237
238
  fallback: "spawn";
238
239
  agentTeams: "pause";
@@ -245,6 +246,8 @@ export interface ResolvedIdleReviewConfig {
245
246
  enabled: boolean;
246
247
  /** Whether review may change USER.md and MEMORY.md; it can create Documents either way. */
247
248
  runtimeMemory: boolean;
249
+ /** Preserve attempt quota and cooling time for the same persisted parent session. */
250
+ persistWatermark: boolean;
248
251
  provider: 'spawn' | 'fork';
249
252
  /** Applies only before a child starts; a failed run is never replayed. */
250
253
  fallback: 'spawn' | 'skip';
@@ -325,55 +328,7 @@ export interface ResolvedTaskAgentModelConfig {
325
328
  /** Present, and true, only on an inherited route that follows its conversation. */
326
329
  followConversation?: true;
327
330
  }
328
- export interface TaskAgentModelCatalogModel {
329
- id: string;
330
- name: string;
331
- description?: string;
332
- /** DSH's merge-extensible model modality ids; absent means capability is unknown. */
333
- inputModalities?: string[];
334
- }
335
- export interface TaskAgentModelCatalogGroup {
336
- id: string;
337
- name: string;
338
- models: TaskAgentModelCatalogModel[];
339
- }
340
- export interface TaskAgentModelCatalogFailure {
341
- id: string;
342
- name: string;
343
- message: string;
344
- }
345
- export interface TaskAgentModelCatalog {
346
- effective?: {
347
- provider: string;
348
- model: string;
349
- source: 'fixed' | 'session' | 'dsh-default' | 'active-agent';
350
- };
351
- defaultSelection?: {
352
- provider: string;
353
- model: string;
354
- };
355
- /**
356
- * The route the asking conversation's own delegated work takes while it is
357
- * open: the model of its last request, or the one it was created with before
358
- * its first. An inherited setting that follows its conversation takes it too;
359
- * it is reported whether or not that switch is on.
360
- */
361
- session?: {
362
- provider: string;
363
- model: string;
364
- };
365
- /**
366
- * The route an inherited setting takes without following a conversation: the
367
- * DSH new-session default, else an open Agent's creation route.
368
- */
369
- inherited?: {
370
- provider: string;
371
- model: string;
372
- source: 'dsh-default' | 'active-agent';
373
- };
374
- groups: TaskAgentModelCatalogGroup[];
375
- failures: TaskAgentModelCatalogFailure[];
376
- }
331
+ export type { TaskAgentModelCatalog, TaskAgentModelCatalogFailure, TaskAgentModelCatalogGroup, TaskAgentModelCatalogModel, } from '../core/contracts/task-agent-model.ts';
377
332
  export interface InteractionConfig {
378
333
  turnBar?: boolean;
379
334
  saveAction?: boolean;
@@ -668,7 +623,13 @@ export interface LifecycleAgentSnapshot {
668
623
  lastReviewScore?: number;
669
624
  lastReviewDocumentIds?: string[];
670
625
  idleReviewAttempts?: number;
671
- idleReviewBlocked?: 'agent-team';
626
+ idleReviewBlocked?: 'agent-team' | 'tool-access';
627
+ idleReviewWatermark?: {
628
+ state: 'ready' | 'error';
629
+ restoredAttempts: number;
630
+ maxPerSession: number;
631
+ error?: string;
632
+ };
672
633
  nextReviewAt?: string;
673
634
  lastReviewFailure?: IdleReviewFailure;
674
635
  lastAt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon",
3
- "version": "0.5.36",
3
+ "version": "0.5.38",
4
4
  "description": "Composable, view-based context for DeepSeek Harness. Pluggable sources and strategies, with layered memory and self-evolving skills out of the box.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -155,7 +155,7 @@
155
155
  "dependencies": {
156
156
  "@deepseek-ai/cosmokit": "^1.8.5",
157
157
  "@deepseek-ai/schemastery": "^3.18.4",
158
- "dsh-mnemon-provider-byterover": "0.5.5",
158
+ "dsh-mnemon-provider-byterover": "0.5.6",
159
159
  "dsh-mnemon-provider-hindsight": "0.5.7",
160
160
  "dsh-mnemon-provider-holographic": "0.5.7",
161
161
  "dsh-mnemon-provider-honcho": "0.5.5",
@@ -164,10 +164,10 @@
164
164
  "dsh-mnemon-provider-openviking": "0.5.10",
165
165
  "dsh-mnemon-provider-retaindb": "0.5.6",
166
166
  "dsh-mnemon-provider-supermemory": "0.5.5",
167
- "dsh-mnemon-source-documents": "0.5.11",
168
- "dsh-mnemon-source-memory-spaces": "0.5.23",
169
- "dsh-mnemon-source-runtime": "0.5.16",
170
- "dsh-mnemon-source-skills": "0.5.3",
167
+ "dsh-mnemon-source-documents": "0.5.12",
168
+ "dsh-mnemon-source-memory-spaces": "0.5.25",
169
+ "dsh-mnemon-source-runtime": "0.5.17",
170
+ "dsh-mnemon-source-skills": "0.5.5",
171
171
  "dsh-mnemon-strategy-auto-capture": "0.5.5",
172
172
  "dsh-mnemon-strategy-default-three-tier": "0.5.11",
173
173
  "dsh-mnemon-strategy-general": "0.5.1",