dsh-aurorix-agentbook 1.8.4 → 1.8.5

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.
Files changed (2) hide show
  1. package/lib/web.js +6 -3
  2. package/package.json +1 -1
package/lib/web.js CHANGED
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // 两条挂载方式(都来自 @deepseek-ai/dsh-host-webserver):
4
4
  // webServer.register({ kind:'prefix', path, handler }) 自己拥有 HTTP 响应
5
- // ctx.on('webserver/index-inject', table => table.push({ kind:'script', ... }))
5
+ // webCtx.on('webserver/index-inject', table => table.push({ kind:'script', ... }))
6
6
  // 往 index.html 里塞一段脚本——侧边栏按钮就是这么加进去的
7
7
  //
8
8
  // 页面本身是一份自带样式的 HTML,数据和 dsh-go 原生面板同源(同一个 backend)。
@@ -871,9 +871,12 @@ export function attachWeb(ctx, { backend }) {
871
871
  path: PREFIX,
872
872
  handler: createWebHandler({ backend, connection: webCtx.connection }),
873
873
  }), 'dsh-aurorix-agentbook: web route')
874
- const off = webCtx.effect(() => ctx.on('webserver/index-inject', (table) => {
874
+ // 注入监听必须挂在 webCtx 上:宿主在 webServer 这一层 emit 事件,
875
+ // 挂在根 ctx 上收不到(client-connection / api-remote-access / client-modules
876
+ // 三个插件都挂在 webCtx)。挂错的表现是入口永远不出现,而且不报任何错。
877
+ const off = webCtx.effect(() => webCtx.on('webserver/index-inject', (table) => {
875
878
  table.push({ kind: 'script', placement: 'body-end', text: floatButtonScript(PREFIX, PAGE_TITLE) })
876
- }), 'dsh-aurorix-agentbook: sidebar injection')
879
+ }), 'dsh-aurorix-agentbook: entry injection')
877
880
  return () => {
878
881
  try { dispose() } catch {}
879
882
  try { off() } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-aurorix-agentbook",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "dsh-aurorix-agentbook:给 dsh-go 接通 Aurorix 记忆库——原生界面(状态条/胶囊/菜单/面板/保险箱)加宿主侧提示词注入、分层快照与四个工具。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",