sage-mem 2.33.4 → 3.1.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.
@@ -25,6 +25,8 @@ import {
25
25
  rollbackResultSchema, modelListSchema, autodreamOptsSchema, conflictIdSchema, conflictOptsSchema, conflictItemBase,
26
26
  conflictItemSchema, conflictRecordSchema, conflictCountsSchema, conflictWroteSchema, conflictListSchema, conflictReadResultSchema,
27
27
  conflictInvalidateResultSchema, conflictDismissResultSchema, conflictUndoResultSchema, conflictRemoveResultSchema,
28
+ conflictApplyArgsSchema, conflictApplyResultSchema,
29
+ syncDevicesResultSchema, syncRunArgsSchema, syncRunResultSchema,
28
30
  } from './typert/schemas.js'
29
31
  export const TYPERT = {
30
32
  package: 'sage-mem',
@@ -566,6 +568,51 @@ export const TYPERT = {
566
568
  result: { mode: 'strict', typeSymbol: 'sage-mem/types#ConflictRemoveResult', schema: conflictRemoveResultSchema, create: () => conflictRemoveResultSchema },
567
569
  sourceLocation: { "file": "lib/index.js", "line": 1, "column": 1 },
568
570
  },
571
+ {
572
+ // 3.0.0:跨设备冲突的裁决(留本地 / 留远端 / 手工合并)。入参与其余六条不同 ——
573
+ // 它多一个 `choice`,所以用自己的一份参数 schema,而不是往 ConflictOpts 里塞可选字段
574
+ // (那个 schema 是六条方法共用的,塞一个「只有一条方法认」的键会让另外六条的入参含义变模糊)。
575
+ id: 'sage-mem#conflict/applyResolution',
576
+ service: 'conflict',
577
+ namespace: 'conflict',
578
+ method: 'applyResolution',
579
+ invocation: { kind: 'direct' },
580
+ parameters: [
581
+ { name: 'opts', wire: 'opts', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#ConflictApplyArgs', schema: conflictApplyArgsSchema, create: () => conflictApplyArgsSchema } },
582
+ ],
583
+ result: { mode: 'strict', typeSymbol: 'sage-mem/types#ConflictApplyResult', schema: conflictApplyResultSchema, create: () => conflictApplyResultSchema },
584
+ sourceLocation: { "file": "lib/index.js", "line": 1, "column": 1 },
585
+ },
586
+ // ── 3.1.0:跨设备同步的面板入口(`sync.*` 服务)──
587
+ // 与 `conflict.*` 同一套写法:业务判断全在 `lib/sync/`(devices.js / panel.js),
588
+ // 这里只声明传输形状。`sourceLocation` 同样硬编码 lib/index.js(见 D21)。
589
+ {
590
+ // 设备候选(`tailscale status --json` → 面板上的一排按钮)。无入参:超时 / 注入点
591
+ // 都是测试用的,不值得占一个 wire 参数。
592
+ id: 'sage-mem#sync/devices',
593
+ service: 'sync',
594
+ namespace: 'sync',
595
+ method: 'devices',
596
+ invocation: { kind: 'direct' },
597
+ parameters: [],
598
+ result: { mode: 'strict', typeSymbol: 'sage-mem/types#SyncDevicesResult', schema: syncDevicesResultSchema, create: () => syncDevicesResultSchema },
599
+ sourceLocation: { "file": "lib/index.js", "line": 1, "column": 1 },
600
+ },
601
+ {
602
+ // 一次同步动作:check(看清楚)/ pull(搬回来)/ push(推上去)。
603
+ // 入参是**一个** opts 对象 —— 与 conflict 那七条同一个姿势,面板只传它认识的那几个键。
604
+ // 结果 schema 刻意不含 summary / plan / results(三个动作形状各异,见 schemas.js 的注释)。
605
+ id: 'sage-mem#sync/run',
606
+ service: 'sync',
607
+ namespace: 'sync',
608
+ method: 'run',
609
+ invocation: { kind: 'direct' },
610
+ parameters: [
611
+ { name: 'opts', wire: 'opts', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#SyncRunArgs', schema: syncRunArgsSchema, create: () => syncRunArgsSchema } },
612
+ ],
613
+ result: { mode: 'strict', typeSymbol: 'sage-mem/types#SyncRunResult', schema: syncRunResultSchema, create: () => syncRunResultSchema },
614
+ sourceLocation: { "file": "lib/index.js", "line": 1, "column": 1 },
615
+ },
569
616
  ],
570
617
  model: {
571
618
  "services": [],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sage-mem",
3
3
  "description": "Cross-session memory for DeepSeek Harness — plain markdown files, no database, no worker.",
4
- "version": "2.33.4",
4
+ "version": "3.1.0",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "icon": "./icon.png",