@morlay/better-session 0.1.1 → 0.1.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
@@ -1,12 +1,9 @@
1
1
  # @morlay/better-session
2
2
 
3
- profile 聚合 bundle:一次性装配 `@morlay/session-branch`、
4
- `@morlay/session-rdb`、`@morlay/ui-conversation-message-actions` 与对话外壳的
5
- **薄壳 fork 行**(只留我们改过的文件,其余引用上游源码)到 DeepSeek Harness web profile,
6
- 提供 **就地编辑 / 重试 / 撤回 / 分支**(rewind / retry / recall / fork)闭环。
7
-
8
- 显示元数据(插件管理页里的名字与说明)在 `locale/zh.json` 与 `locale/en.json`;patch 真源就是
9
- `tsdown.config.ts`,build 时由 `@local/devkit/patch` 的插件写出包根那份 `cordis.patch.yml`。
3
+ profile 聚合 bundle:一次性装配 `@morlay/session-branch`、`@morlay/session-rdb`、
4
+ `@morlay/ui-conversation-message-actions`、`@morlay/ui-conversation-manager`、`@morlay/dsh-reference` 与对话外壳的
5
+ **薄壳 fork 行**(只留我们改过的文件,其余引用上游源码)到 DeepSeek Harness 的 profile,提供
6
+ **就地编辑 / 重试 / 撤回 / 分支**(rewind / retry / recall / fork)闭环。
10
7
 
11
8
  ## 安装
12
9
 
@@ -14,39 +11,10 @@ profile 聚合 bundle:一次性装配 `@morlay/session-branch`、
14
11
  dsh plugin --profile web add "@morlay/better-session"
15
12
  ```
16
13
 
17
- 安装自动带上全部子包(`@morlay/session-branch`、`@morlay/session-rdb`、
18
- `@morlay/ui-conversation-message-actions`、`@morlay/ui-conversation-manager`、
19
- `@morlay/dsh-client-ui-conversation`、`@morlay/dsh-client-ui-primitives`、`@morlay/dsh-client-ui-primitives`、
20
- `@morlay/dsh-reference`),
21
- 并由 bundle 的 patch(`cordis.patch.yml`)自动装配:
22
-
23
- - `ctx.sessionPersistence` ← RDB(SQLite / PostgreSQL)持久化后端
24
- - `ctx.sessionBranch` ← rewind / fork 数据层
25
- - `ctx.sessionEditor` ← edit / retry / recall / fork 编排
26
- (HTTP:`POST /session-editor`,web 与桌面共用宿主的那一张 `webServer` 路由表)
27
- - `conversation.chat.node` ← 渲染替换(user 消息行内编辑 / 重试按钮)
28
- - `conversation.composer.dock` 的 `stats` 行 ← 覆盖注册(priority −1;承载修好的 token 口径)
29
- - 官方对话 UI 行里只有 `ui-conversation` 换成本仓库的 fork 行;`ui-chat` 与 `ui-input-trigger` 保持官方行
30
- - `ui-primitives-fork` ← css-in-js 样式层(styled / Token / 官方 token 消费),fork 外壳的样式基础
31
- - `ui-schema-form` ← 各插件 `Config` 的 volatile 字段按 schema 自动生成的**行配置页**(行级兜底:手写卡片用默认
32
- priority 遮住它),字段级自定义输入经 chain 槽 `settings.schema-form.field`
33
- - `ctx.sessionProjectionCache` ← 投影 checkpoint(替换官方插件,落 rdb 语义表)
34
- - `ctx.sessionQuery` ← 会话查询(替换官方 `session-query-sqlite`:精确读 / 过滤 /
35
- 血缘复用上游基类,全文检索维持 disabled,不引入派生索引库)
36
- - storage hub 的 `rdb` KV 后端 ← workspace 域落 rdb 语义表
37
-
38
- 同时禁用官方 `session-persistence-jsonl`、`storage-json`、
39
- `session-projection-cache`、`session-query-sqlite` 与 `ui-conversation`(「已归档会话」的管理动作收敛到
40
- `ui-conversation-manager` 的「对话管理」页;上游 0.1.7 自己删掉了设置页那份归档入口,不需要我们再按 id 禁用),
41
- 并把 `storage-domain` 的 backend 路由为 `rdb`:`$DSH_HOME/storages`
42
- 不再产生文件,storages 数据与事件日志同库
43
- ([ADR-20260917-接管storages到rdb语义表](../../session/session-rdb/.agents/adrs/20260917-接管storages到rdb语义表.md))。
44
-
45
- 官方两条外发通路(`session-telemetry-otel`、`session-log-deepseek`)**不在本 bundle 的范围内**:它们仍在装配里,
46
- 要不要关是部署层的取舍,不由会话编辑这一层替它决定。
47
-
48
- 装配面由 `src/__tests__/patch.spec.ts`(patch 行 ↔ 上游 bundle id)与
49
- `src/__tests__/assembly.spec.ts`(patch ↔ 依赖 ↔ client 声明)守护;逐行以 [`cordis.patch.yml`](./cordis.patch.yml) 为准。
14
+ 安装带上全部子包,bundle patch([`cordis.patch.yml`](./cordis.patch.yml))自动装配四层服务、接管官方对话 UI 行,
15
+ 并把官方 `session-persistence-jsonl` / `storage-json` / `session-projection-cache` / `session-query-sqlite` /
16
+ `ui-conversation` 那几行换掉。装了什么、为什么这么换、边界在哪,见
17
+ [设计 会话编辑闭环装配](./.agents/designs/20260917-会话编辑闭环装配.md)。
50
18
 
51
19
  ## 使用
52
20
 
@@ -68,8 +36,8 @@ await ctx.sessionBranch.forkFrom(sourceId, { atSeq: 6, childSessionId });
68
36
 
69
37
  ## 配置(rdb)
70
38
 
71
- 默认配置为 SQLite(`$DSH_HOME/sessions/sessions.sqlite`)。改配置就是改这一行的 config
72
- (bundle patch / profile patch / 设置页都可):
39
+ 默认配置为 SQLite(`$DSH_HOME/sessions/sessions.sqlite`)。改配置就是改这一行的 config(bundle patch / profile
40
+ patch / 设置页都可):
73
41
 
74
42
  ```yaml
75
43
  - id: session-rdb
@@ -79,12 +47,5 @@ await ctx.sessionBranch.forkFrom(sourceId, { atSeq: 6, childSessionId });
79
47
  path: /abs/path/to/sessions.sqlite
80
48
  ```
81
49
 
82
- > 上游 0.1.7 起 settings 不再覆盖插件 config(见
83
- > [ADR-配置经settings服务覆盖而非直接改cordis配置](.agents/adrs/20260917-配置经settings服务覆盖而非直接改cordis配置.md) 的状态说明)。
84
-
85
- ## 本地开发
86
-
87
- 本包是 monorepo(pnpm workspaces)的一员:命令入口见根
88
- [justfile](../../../justfile),约定见
89
- [`.agents/standards/`](../../../.agents/standards/README.md),架构见
90
- [设计 20260917-会话编辑闭环装配](./.agents/designs/20260917-会话编辑闭环装配.md)。
50
+ 上游 settings 只投影 volatile 字段做表单编辑,改动持久化回 entry config,不再覆盖插件 config,见
51
+ [ADR-20260922-跟随上游session-format-v4](../../session/session-rdb/.agents/adrs/20260922-跟随上游session-format-v4.md)。
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Session Editing",
4
- "description": "dsh profile bundle: assembles @morlay/session-branch, @morlay/session-rdb, @morlay/ui-conversation-message-actions and the thin-shell fork of the conversation shell into a web profile — the rewind / retry / recall / fork closed loop."
4
+ "description": "dsh profile bundle: assembles @morlay/session-branch, @morlay/session-rdb, @morlay/ui-conversation-message-actions, @morlay/ui-conversation-manager and @morlay/dsh-reference with the thin-shell fork of the conversation shell into a web profile — the rewind / retry / recall / fork closed loop."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "会话编辑装配",
4
- "description": "profile 聚合 bundle:把 @morlay/session-branch、@morlay/session-rdb、@morlay/ui-conversation-message-actions 与对话外壳的薄壳 fork 行装进 web profile,提供就地编辑 / 重试 / 撤回 / 分支(rewind / retry / recall / fork)闭环。"
4
+ "description": "profile 聚合 bundle:把 @morlay/session-branch、@morlay/session-rdb、@morlay/ui-conversation-message-actions、@morlay/ui-conversation-manager 与 @morlay/dsh-reference 连同对话外壳的薄壳 fork 行装进 web profile,提供就地编辑 / 重试 / 撤回 / 分支(rewind / retry / recall / fork)闭环。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@morlay/better-session",
3
- "version": "0.1.1",
4
- "description": "dsh profile bundle: assembles @morlay/session-branch, @morlay/session-rdb, @morlay/ui-conversation-message-actions and the thin-shell fork of the conversation shell (only the files we changed, the rest imported from upstream source) into a DeepSeek Harness web profile — the rewind / retry / recall / fork closed loop on RDB persistence.",
5
- "icon": "./icon.svg",
3
+ "version": "0.1.2",
4
+ "description": "dsh profile bundle: assembles @morlay/session-branch, @morlay/session-rdb, @morlay/ui-conversation-message-actions, @morlay/ui-conversation-manager and @morlay/dsh-reference with the thin-shell fork of the conversation shell (only the files we changed, the rest imported from upstream source) into a DeepSeek Harness web profile — the rewind / retry / recall / fork closed loop on RDB persistence.",
6
5
  "keywords": [
7
6
  "dsh",
8
7
  "dsh-bundle",
@@ -33,17 +32,18 @@
33
32
  "./locale/*.json": "./locale/*.json"
34
33
  },
35
34
  "dependencies": {
36
- "@morlay/dsh-client-ui-conversation": "0.1.1",
37
- "@morlay/dsh-client-ui-primitives": "0.0.4",
38
- "@morlay/dsh-reference": "0.0.2",
39
- "@morlay/session-branch": "0.1.1",
40
- "@morlay/session-rdb": "0.1.1",
41
- "@morlay/ui-conversation-manager": "0.1.1",
42
- "@morlay/ui-conversation-message-actions": "0.1.1"
35
+ "@morlay/dsh-client-ui-conversation": "0.1.2",
36
+ "@morlay/dsh-client-ui-primitives": "0.0.5",
37
+ "@morlay/dsh-reference": "0.0.3",
38
+ "@morlay/session-branch": "0.1.2",
39
+ "@morlay/session-rdb": "0.1.2",
40
+ "@morlay/ui-conversation-manager": "0.1.2",
41
+ "@morlay/ui-conversation-message-actions": "0.1.2"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "@deepseek-ai/cordis": "^4.0.4"
46
45
  },
46
+ "icon": "./icon.svg",
47
47
  "dsh": {
48
48
  "bundle": {
49
49
  "patch": "./cordis.patch.yml"