dsh-tabbit 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3
4
+
5
+ - Restored web-client compatibility with DSH `0.1.1-rc.2`. The client no
6
+ longer hard-injects either generation of the conversation service: it uses
7
+ `uiConversation.events` on DSH `0.1.2-alpha.1+` and falls back to
8
+ `conversationEvents` on `0.1.1`, so neither host remains pending while
9
+ waiting for the other generation's service name.
10
+
3
11
  ## 0.3.2
4
12
 
5
13
  - `tabbit_browser` gains `list_tasks: true`: a zero-side-effect readback of
package/client/client.js CHANGED
@@ -35,9 +35,11 @@ var module = { exports: {} }; var exports = module.exports;
35
35
  * dsh 客户端插件协议与服务端 Cordis 如出一辙:导出 {name, inject, apply(ctx)};
36
36
  * 这里注入的 'inputTriggers' 是 dsh-client-ui-input-trigger 提供的"输入框
37
37
  * 触发菜单"服务(package.json dsh.client.inject 里声明了要它一起装);
38
- * 'uiConversation'/'slots' 是 web 客户端核心恒定提供的服务,不用额外声明
39
- * ('uiConversation' 是宿主 0.1.2-alpha.1 客户端重构后 'conversationEvents'
40
- * 的新名字,注册入口相应从 service.register() 移到了 service.events.register())。
38
+ * 'slots' 是 web 客户端核心恒定提供的服务;会话节点注册服务在宿主
39
+ * 0.1.2-alpha.1 'conversationEvents' 政名为 'uiConversation',注册入口
40
+ * 也从 service.register() 移到了 service.events.register()。两者不能作为
41
+ * 硬注入,否则另一代宿主会让整个客户端插件永久 pending,故在 apply
42
+ * 中按新接口优先、旧接口兜底的顺序探测。
41
43
  * 共享的触发菜单负责渲染候选列表 UI——@tab 部分只提供数据,不需要 React。
42
44
  *
43
45
  * 功能三:把服务端 /tabbit-info 命令落下的 tabbit/status 会话事件折成
@@ -346,7 +348,7 @@ const tabbitStatusNode = {
346
348
 
347
349
  module.exports = {
348
350
  name: 'dsh-tabbit-client',
349
- inject: ['inputTriggers', 'uiConversation', 'slots'],
351
+ inject: ['inputTriggers', 'slots'],
350
352
  apply(ctx) {
351
353
  // 观看实例打点:告诉服务端"是哪个浏览器在看这个页面"。fire-and-forget
352
354
  // (不 await、双层吞错)——纯属锦上添花的提示,任何失败都不能影响页面。
@@ -371,14 +373,19 @@ module.exports = {
371
373
  }
372
374
  }
373
375
 
374
- // 功能三:/tabbit-info 状态卡。uiConversation/slots 已在 inject 里
375
- // 声明(apply 只会在它们就绪后运行),这里仍按本文件惯例做形状防御。
376
- // 两者内部都是 ctx.effect 式注册(随插件 fiber 卸载自动回收),直接调。
376
+ // 功能三:/tabbit-info 状态卡。新宿主使用 uiConversation.events,
377
+ // 0.1.1 宿主使用 conversationEvents;只要任一接口存在就注册状态卡。
378
+ // 服务内部都是 ctx.effect 式注册(随插件 fiber 卸载自动回收),直接调。
377
379
  const uiConversation = ctx.get('uiConversation');
380
+ const conversationEvents = ctx.get('conversationEvents');
378
381
  const slots = ctx.get('slots');
379
- if (uiConversation && typeof uiConversation.events?.register === 'function'
380
- && slots && typeof slots.inject === 'function') {
381
- uiConversation.events.register(tabbitStatusNode);
382
+ const registerStatusNode = typeof uiConversation?.events?.register === 'function'
383
+ ? (definition) => uiConversation.events.register(definition)
384
+ : typeof conversationEvents?.register === 'function'
385
+ ? (definition) => conversationEvents.register(definition)
386
+ : undefined;
387
+ if (registerStatusNode && slots && typeof slots.inject === 'function') {
388
+ registerStatusNode(tabbitStatusNode);
382
389
  slots.inject('conversation.chat.node', () => slots.register(
383
390
  { name: 'conversation.chat.node', key: 'tabbit-status' },
384
391
  TabbitStatusNodeView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-tabbit",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Tabbit Browser bundle for DeepSeek Harness: a code-first tabbit_browser tool, browser-backed web_fetch, @tab composer mentions, a dedicated page-access permission, an environment preflight with background installer download, and a daily plugin update check.",
5
5
  "repository": {
6
6
  "type": "git",