dsh-aurorix-agentbook 1.8.6 → 1.9.1

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 (3) hide show
  1. package/lib/client.js +203 -0
  2. package/lib/web.js +3 -227
  3. package/package.json +18 -3
package/lib/client.js ADDED
@@ -0,0 +1,203 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "dsh-aurorix-agentbook",
3
+ factory: (require) => {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ let react = require("react");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+
10
+ // 入口挂到会话顶栏的 utilities 槽位。宿主的分享按钮也在同一个槽里
11
+ // (order 30),我们排在它前面,于是落在宿主自己的按钮组中,
12
+ // 而不是靠几何位置去猜「最右那个按钮在哪」。
13
+ const SLOT = "conversation.session.header.utilities";
14
+ const ENTRY_ID = "aurorix-memory";
15
+ const PANEL_PATH = "/aurorix/";
16
+
17
+ /**
18
+ * 图标:一本打开的书,和状态条上的记忆入口保持同一个符号。
19
+ * @returns 16×16 描边图标。
20
+ */
21
+ function BookIcon() {
22
+ return react_jsx_runtime.jsxs("svg", {
23
+ viewBox: "0 0 24 24",
24
+ width: 16,
25
+ height: 16,
26
+ fill: "none",
27
+ stroke: "currentColor",
28
+ strokeWidth: 1.7,
29
+ strokeLinecap: "round",
30
+ strokeLinejoin: "round",
31
+ "aria-hidden": "true",
32
+ children: [
33
+ react_jsx_runtime.jsx("path", { d: "M4 5.5A1.5 1.5 0 0 1 5.5 4H10a2 2 0 0 1 2 2v14a1.5 1.5 0 0 0-1.5-1.5H5.5A1.5 1.5 0 0 1 4 17V5.5Z" }),
34
+ react_jsx_runtime.jsx("path", { d: "M20 5.5A1.5 1.5 0 0 0 18.5 4H14a2 2 0 0 0-2 2v14a1.5 1.5 0 0 1 1.5-1.5h5A1.5 1.5 0 0 0 20 17V5.5Z" }),
35
+ ],
36
+ });
37
+ }
38
+
39
+ /**
40
+ * 顶栏的记忆入口:按钮紧跟宿主自己的按钮,点开用覆盖层装载面板。
41
+ * 面板本身仍是 /aurorix/ 那个页面,因此和原生面板共用同一套接口。
42
+ * @param props - 宿主注入的槽位属性。
43
+ * @returns 入口按钮与(打开时的)覆盖层。
44
+ */
45
+ function MemoryEntry(props) {
46
+ const [open, setOpen] = react.useState(false);
47
+ const boxRef = react.useRef(null);
48
+
49
+ // Esc 关闭:与宿主自己的弹层行为一致
50
+ react.useEffect(() => {
51
+ if (!open) return undefined;
52
+ const onKey = (e) => {
53
+ if (e.key === "Escape") setOpen(false);
54
+ };
55
+ window.addEventListener("keydown", onKey);
56
+ return () => window.removeEventListener("keydown", onKey);
57
+ }, [open]);
58
+
59
+ const label = "记忆库";
60
+
61
+ const button = react_jsx_runtime.jsxs("button", {
62
+ type: "button",
63
+ "data-aurorix-entry": "",
64
+ "aria-label": label,
65
+ title: label,
66
+ "aria-expanded": open ? "true" : "false",
67
+ onClick: () => setOpen((v) => !v),
68
+ style: {
69
+ display: "inline-flex",
70
+ alignItems: "center",
71
+ gap: 6,
72
+ height: 28,
73
+ padding: "0 8px",
74
+ border: 0,
75
+ borderRadius: 6,
76
+ background: open ? "var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,.14))" : "transparent",
77
+ color: "var(--dsw-alias-label-primary, inherit)",
78
+ font: "inherit",
79
+ fontSize: 13,
80
+ lineHeight: "1.2",
81
+ cursor: "pointer",
82
+ whiteSpace: "nowrap",
83
+ },
84
+ children: [
85
+ react_jsx_runtime.jsx(BookIcon, {}),
86
+ react_jsx_runtime.jsx("span", { children: label }),
87
+ ],
88
+ });
89
+
90
+ if (!open) return button;
91
+
92
+ return react_jsx_runtime.jsxs(react.Fragment, {
93
+ children: [
94
+ button,
95
+ react_jsx_runtime.jsx("div", {
96
+ "data-aurorix-mask": "",
97
+ onClick: () => setOpen(false),
98
+ style: {
99
+ position: "fixed",
100
+ inset: 0,
101
+ zIndex: 2147483001,
102
+ background: "var(--dsw-alias-bg-mask-1, rgba(0,0,0,.42))",
103
+ },
104
+ }),
105
+ react_jsx_runtime.jsxs("div", {
106
+ ref: boxRef,
107
+ role: "dialog",
108
+ "aria-label": label,
109
+ "data-aurorix-panel": "",
110
+ style: {
111
+ position: "fixed",
112
+ zIndex: 2147483002,
113
+ top: 52,
114
+ right: 16,
115
+ width: "min(560px, calc(100vw - 32px))",
116
+ height: "min(720px, calc(100vh - 96px))",
117
+ display: "flex",
118
+ flexDirection: "column",
119
+ overflow: "hidden",
120
+ borderRadius: "var(--dsw-radius-panel, 14px)",
121
+ background: "var(--dsw-alias-bg-layer-2, #17181b)",
122
+ color: "var(--dsw-alias-label-primary, inherit)",
123
+ border: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.28))",
124
+ boxShadow: "var(--dsw-elevation-prominent, 0 24px 64px rgba(0,0,0,.45))",
125
+ },
126
+ children: [
127
+ react_jsx_runtime.jsxs("div", {
128
+ style: {
129
+ display: "flex",
130
+ alignItems: "center",
131
+ justifyContent: "space-between",
132
+ gap: 10,
133
+ padding: "9px 12px",
134
+ borderBottom: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.22))",
135
+ flex: "0 0 auto",
136
+ },
137
+ children: [
138
+ react_jsx_runtime.jsx("div", {
139
+ style: { fontWeight: 600, fontSize: 13.5 },
140
+ children: label,
141
+ }),
142
+ react_jsx_runtime.jsx("button", {
143
+ type: "button",
144
+ "aria-label": "关闭",
145
+ onClick: () => setOpen(false),
146
+ style: {
147
+ display: "inline-flex",
148
+ alignItems: "center",
149
+ justifyContent: "center",
150
+ width: 26,
151
+ height: 26,
152
+ border: 0,
153
+ borderRadius: 6,
154
+ background: "transparent",
155
+ color: "inherit",
156
+ cursor: "pointer",
157
+ opacity: 0.7,
158
+ },
159
+ children: react_jsx_runtime.jsxs("svg", {
160
+ width: 15,
161
+ height: 15,
162
+ viewBox: "0 0 24 24",
163
+ fill: "none",
164
+ stroke: "currentColor",
165
+ strokeWidth: 2,
166
+ strokeLinecap: "round",
167
+ children: [react_jsx_runtime.jsx("path", { d: "M6 6l12 12M18 6L6 18" })],
168
+ }),
169
+ }),
170
+ ],
171
+ }),
172
+ react_jsx_runtime.jsx("iframe", {
173
+ src: PANEL_PATH,
174
+ title: label,
175
+ style: { flex: "1 1 auto", width: "100%", border: 0, background: "transparent" },
176
+ }),
177
+ ],
178
+ }),
179
+ ],
180
+ });
181
+ }
182
+
183
+ /** Required client services: the slot registry only. */
184
+ const inject = ["slots"];
185
+
186
+ /**
187
+ * Client plugin body: register the header entry into the utilities slot.
188
+ * @param ctx - client root context.
189
+ */
190
+ function apply(ctx) {
191
+ ctx.effect(() => ctx.slots.inject(SLOT, () => ctx.slots.register({
192
+ name: SLOT,
193
+ id: ENTRY_ID,
194
+ // 排在宿主分享按钮(order 30)之前,落在它左手边
195
+ order: 20,
196
+ }, MemoryEntry)), "aurorix: header entry");
197
+ }
198
+
199
+ exports.apply = apply;
200
+ exports.inject = inject;
201
+ return module.exports;
202
+ },
203
+ });
package/lib/web.js CHANGED
@@ -2,14 +2,13 @@
2
2
  //
3
3
  // 两条挂载方式(都来自 @deepseek-ai/dsh-host-webserver):
4
4
  // webServer.register({ kind:'prefix', path, handler }) 自己拥有 HTTP 响应
5
- // webCtx.on('webserver/index-inject', table => table.push({ kind:'script', ... }))
5
+ // 顶栏入口见 lib/client.js(注册到宿主的 header utilities 槽位)
6
6
  // 往 index.html 里塞一段脚本——侧边栏按钮就是这么加进去的
7
7
  //
8
8
  // 页面本身是一份自带样式的 HTML,数据和 dsh-go 原生面板同源(同一个 backend)。
9
9
  import { randomBytes } from 'node:crypto'
10
10
  import { PLANES } from './abook.js'
11
11
 
12
- const PAGE_TITLE = '记忆库'
13
12
 
14
13
  /** 页面 HTML。结构与 dsh-go 原生面板逐块对齐:插件内容 → 召回 → 存进记忆 → 保险箱 → 存进保险箱。 */
15
14
  export function pageHtml(locale = 'zh-CN', scriptNonce = randomBytes(18).toString('base64')) {
@@ -387,224 +386,6 @@ refreshVault();
387
386
  </script></body></html>`
388
387
  }
389
388
 
390
- /** 往页面里塞一个侧边栏入口。等 SPA 把导航渲染出来再插,避免插到还没生成的容器里。 */
391
- /**
392
- * 网页端的入口:插到页面右上角那组操作按钮里,点开是 iframe 弹层。
393
- *
394
- * 两步定位,都不依赖宿主每次构建都会变的类名:
395
- * 1. **按几何位置找那组按钮**——在页面顶部高度范围内、水平靠右的 button,取最右的那个当锚点。
396
- * 宿主改类名、改层级、改组件结构都不影响,只要"顶部右侧有操作按钮"这个事实还在。
397
- * 2. **克隆锚点**——沿用宿主自己的 padding、圆角、hover 与图标尺寸,看起来就是原生的一个。
398
- * 图标只换内容不动容器,所以尺寸和描边粗细自动对齐。
399
- *
400
- * 宿主重新渲染会把我们插进去的节点冲掉,所以用 MutationObserver 盯住,掉了就补回去;
401
- * 同时留一个低频兜底轮询,防止观察器本身也被替换。找不到锚点时退回固定定位,
402
- * 至少保证入口还在,不会因为宿主改版把功能整个弄丢。
403
- */
404
- export function floatButtonScript(prefix, title) {
405
- return `(function(){
406
- if (window.__AURORIX_ENTRY__) return; window.__AURORIX_ENTRY__ = true;
407
- var HREF = ${JSON.stringify(prefix + '/')}, NAME = ${JSON.stringify(title)};
408
- // 到达标记:脚本是否注入、是否跑到挂载、挂在哪个锚点,都能从页面直接读出来。
409
- // 之前入口不出现时无法区分「没注入」和「注入了但挂不上」,只能猜。
410
- var SELF = 'aurorix-entry';
411
- function note(stage){
412
- if (!document.documentElement) return;
413
- document.documentElement.setAttribute('data-aurorix-stage', stage);
414
- }
415
- note('script');
416
-
417
- var ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5.5A1.5 1.5 0 0 1 5.5 4H10a2 2 0 0 1 2 2v14a1.5 1.5 0 0 0-1.5-1.5H5.5A1.5 1.5 0 0 1 4 17V5.5Z"/><path d="M20 5.5A1.5 1.5 0 0 0 18.5 4H14a2 2 0 0 0-2 2v14a1.5 1.5 0 0 1 1.5-1.5h5A1.5 1.5 0 0 0 20 17V5.5Z"/></svg>';
418
- var CLOSE = '<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg>';
419
-
420
- // 令牌名必须是宿主真实存在的那一套(--dsw-alias-*),写错的后果不是"样式没生效"
421
- // 而是落到硬编码的浅色值上:浅色主题下就成了白底白字,按钮存在但看不见。
422
- // 文字与图标一律走 label-primary;拿不到就继承宿主自身的 color,不写死颜色。
423
- var CSS = ''
424
- + '.ax-mask{position:fixed;inset:0;z-index:2147483001;background:var(--dsw-alias-bg-mask-1,rgba(0,0,0,.42));display:none}'
425
- + '.ax-mask.ax-on{display:block}'
426
- + '.ax-panel{position:fixed;z-index:2147483002;display:none;overflow:hidden;'
427
- + 'border-radius:var(--dsw-radius-panel,14px);background:var(--dsw-alias-bg-layer-2,#17181b);'
428
- + 'color:var(--dsw-alias-label-primary,inherit);'
429
- + 'border:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.28));box-shadow:var(--dsw-elevation-prominent,0 24px 64px rgba(0,0,0,.45))}'
430
- + '.ax-panel.ax-on{display:flex;flex-direction:column}'
431
- + '.ax-head{display:flex;align-items:center;justify-content:space-between;gap:10px;'
432
- + 'padding:9px 12px;border-bottom:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.22));flex:0 0 auto}'
433
- + '.ax-title{font:600 13.5px/1.2 -apple-system,system-ui,"PingFang SC",sans-serif;color:inherit}'
434
- + '.ax-x{display:flex;align-items:center;justify-content:center;width:26px;height:26px;'
435
- + 'border-radius:var(--dsw-radius-sm,8px);border:0;background:transparent;color:inherit;cursor:pointer;opacity:.7}'
436
- + '.ax-x:hover{opacity:1;background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.14))}'
437
- + '.ax-frame{flex:1 1 auto;width:100%;border:0;background:transparent}'
438
- // 找不到宿主锚点时的退路:固定贴在右上角,样式尽量贴近宿主按钮。
439
- // color 用 inherit 而不是写死浅色:主题深浅由宿主决定,写死就会在浅色下白底白字。
440
- + '.ax-fab-fallback{position:fixed;top:12px;right:64px;z-index:2147483000;display:flex;align-items:center;'
441
- + 'justify-content:center;width:32px;height:32px;padding:0;border-radius:var(--dsw-radius-md,8px);border:0;cursor:pointer;'
442
- + 'background:transparent;color:var(--dsw-alias-label-primary,inherit);opacity:.72}'
443
- + '.ax-fab-fallback:hover{opacity:1;background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.14))}'
444
- + '.ax-fab-fallback svg{width:18px;height:18px}';
445
-
446
- function boot(){
447
- if (document.querySelector('[data-aurorix-entry]')) return;
448
-
449
- var style = document.createElement('style');
450
- style.setAttribute('data-aurorix-style','');
451
- style.textContent = CSS;
452
- document.head.appendChild(style);
453
-
454
- var mask = document.createElement('div'); mask.className = 'ax-mask';
455
- var panel = document.createElement('div'); panel.className = 'ax-panel';
456
- panel.setAttribute('role','dialog'); panel.setAttribute('aria-label', NAME);
457
-
458
- var head = document.createElement('div'); head.className = 'ax-head';
459
- var ttl = document.createElement('div'); ttl.className = 'ax-title'; ttl.textContent = NAME;
460
- var x = document.createElement('button'); x.className = 'ax-x'; x.type = 'button';
461
- x.setAttribute('aria-label','关闭'); x.innerHTML = CLOSE;
462
- head.appendChild(ttl); head.appendChild(x);
463
- var frame = document.createElement('iframe'); frame.className = 'ax-frame'; frame.title = NAME;
464
- panel.appendChild(head); panel.appendChild(frame);
465
- document.body.appendChild(mask);
466
- document.body.appendChild(panel);
467
-
468
- var loaded = false;
469
- function place(){
470
- // 面板贴着触发按钮的右上角展开,宽度不超过视口
471
- var vw = window.innerWidth || document.documentElement.clientWidth || 0;
472
- var r = entry ? entry.getBoundingClientRect() : { right: vw - 64, bottom: 44, top: 0 };
473
- var vh = window.innerHeight || document.documentElement.clientHeight || 0;
474
- var w = Math.min(560, vw - 36);
475
- var h = Math.min(760, vh - 140);
476
- var left = Math.max(12, Math.min(r.right - w, vw - w - 12));
477
- panel.style.width = w + 'px';
478
- panel.style.height = h + 'px';
479
- panel.style.left = left + 'px';
480
- panel.style.top = Math.max(12, r.bottom + 8) + 'px';
481
- }
482
- function open(){
483
- if (!loaded) { frame.src = HREF; loaded = true; }
484
- place();
485
- mask.classList.add('ax-on'); panel.classList.add('ax-on');
486
- x.focus();
487
- }
488
- function close(){
489
- mask.classList.remove('ax-on'); panel.classList.remove('ax-on');
490
- if (entry) entry.focus();
491
- }
492
- x.onclick = close;
493
- mask.onclick = close;
494
- document.addEventListener('keydown', function(e){
495
- if (e.key === 'Escape' && panel.classList.contains('ax-on')) close();
496
- });
497
- addEventListener('resize', function(){ if (panel.classList.contains('ax-on')) place(); });
498
-
499
- var entry = null;
500
-
501
- // 在页面顶部、水平靠右的按钮里找最右那个当锚点。用几何位置而不是类名:
502
- // 宿主每次构建都会把类名换成新的哈希,位置关系却一直成立。
503
- function findAnchor(){
504
- var best = null, bestRight = -1;
505
- var all = document.querySelectorAll('button, [role="button"], a[role="button"]');
506
- for (var i = 0; i < all.length; i++) {
507
- var el = all[i];
508
- if (el.hasAttribute('data-aurorix-entry')) continue;
509
- if (el.closest && el.closest('.ax-panel, .ax-mask')) continue;
510
- var r = el.getBoundingClientRect();
511
- if (r.width <= 0 || r.height <= 0) continue;
512
- if (r.top > 90) continue; // 只要顶部那一条
513
- if (r.left < (window.innerWidth || 0) * 0.5) continue; // 只要右半边
514
- if (r.right > bestRight) { bestRight = r.right; best = el; }
515
- }
516
- return best;
517
- }
518
-
519
- function makeEntry(anchor){
520
- // 先试着沿用宿主那个按钮的壳(尺寸、圆角、hover 全部对齐)。
521
- // 克隆可能失败——宿主控件也可能不是普通 DOM——失败就退回自绘按钮,
522
- // 入口不能因为"长得不像宿主"就整个不见。
523
- var el = null;
524
- if (anchor) {
525
- try { el = anchor.cloneNode(true); } catch (err) { el = null; }
526
- }
527
- if (el) {
528
- el.removeAttribute('aria-current');
529
- el.removeAttribute('data-active');
530
- el.removeAttribute('data-state');
531
- if (el.className && typeof el.className === 'string') {
532
- el.className = el.className.replace(/\b(active|selected|open)\b/g, '').trim();
533
- }
534
- } else {
535
- el = document.createElement('button');
536
- el.className = 'ax-fab-fallback';
537
- }
538
-
539
- try {
540
- el.setAttribute('data-aurorix-entry','');
541
- el.setAttribute('type','button');
542
- el.setAttribute('aria-label', NAME);
543
- el.setAttribute('title', NAME);
544
-
545
- // 图标只换内容不动容器,尺寸与描边自动跟宿主对齐
546
- var svg = el.querySelector('svg');
547
- if (svg) {
548
- var box = document.createElementNS('http://www.w3.org/2000/svg','svg');
549
- box.innerHTML = ICON;
550
- var next = box.firstChild;
551
- for (var i = 0; i < svg.attributes.length; i++) {
552
- var a = svg.attributes[i];
553
- if (a.name !== 'viewBox') next.setAttribute(a.name, a.value);
554
- }
555
- svg.replaceWith(next);
556
- } else {
557
- el.innerHTML = ICON;
558
- }
559
-
560
- // 文字标签留给屏幕阅读器(aria-label),视觉上只显示图标,和宿主那组按钮一致
561
- var walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT);
562
- var node;
563
- while ((node = walker.nextNode())) {
564
- if (node.textContent.trim() === '') continue;
565
- node.textContent = '';
566
- }
567
- } catch (err) {
568
- // 改壳失败:整块换成一个干净的自绘按钮
569
- el = document.createElement('button');
570
- el.className = 'ax-fab-fallback';
571
- el.setAttribute('data-aurorix-entry','');
572
- el.setAttribute('aria-label', NAME);
573
- el.setAttribute('title', NAME);
574
- el.innerHTML = ICON;
575
- }
576
-
577
- el.onclick = function(e){ e.preventDefault(); e.stopPropagation(); open(); };
578
- return el;
579
- }
580
-
581
- function mount(){
582
- if (entry && document.contains(entry)) return true;
583
- var anchor = findAnchor();
584
- entry = makeEntry(anchor);
585
- note(anchor ? 'mounted-anchored' : 'mounted-fallback');
586
- // 放在最右那个按钮之后,成为这一组的最后一个,和宿主自己的排列一致
587
- if (anchor && anchor.parentNode) anchor.parentNode.insertBefore(entry, anchor.nextSibling || null);
588
- else document.body.appendChild(entry);
589
- return true;
590
- }
591
-
592
- mount();
593
- // 宿主重渲染会冲掉我们的节点:盯着 DOM,掉了立刻补回去。
594
- try {
595
- new MutationObserver(function(){ mount(); }).observe(document.body, { childList: true, subtree: true });
596
- } catch (e) {}
597
- var tries = 0;
598
- var timer = setInterval(function(){
599
- mount();
600
- if (++tries > 150) clearInterval(timer); // 兜底轮询,防观察器被替换
601
- }, 400);
602
- }
603
-
604
- if (document.body) boot();
605
- else document.addEventListener('DOMContentLoaded', boot);
606
- })();`
607
- }
608
389
 
609
390
  /** 最大 JSON 请求体:阻止误操作和跨站请求导致的大体量内存占用。 */
610
391
  const MAX_REQUEST_BYTES = 1024 * 1024
@@ -885,15 +666,10 @@ export function attachWeb(ctx, { backend }) {
885
666
  path: PREFIX,
886
667
  handler: createWebHandler({ backend, connection: webCtx.connection }),
887
668
  }), 'dsh-aurorix-agentbook: web route')
888
- // 挂在 webCtx 上只为与 client-connection / api-remote-access / client-modules 三个
889
- // 自带插件保持一致。A/B 实测(1.8.4 挂根 ctx、1.8.5 挂 webCtx)注入条数都是 1,
890
- // Cordis 的事件会广播到整棵树——所以这里不是入口不出现的根因,别再往这儿找。
891
- const off = webCtx.effect(() => webCtx.on('webserver/index-inject', (table) => {
892
- table.push({ kind: 'script', placement: 'body-end', text: floatButtonScript(PREFIX, PAGE_TITLE) })
893
- }), 'dsh-aurorix-agentbook: entry injection')
669
+ // 顶栏入口由 lib/client.js 注册到 conversation.session.header.utilities 槽位,
670
+ // 不再往 index.html 里注入脚本——那样只能靠几何位置猜宿主按钮在哪。
894
671
  return () => {
895
672
  try { dispose() } catch {}
896
- try { off() } catch {}
897
673
  }
898
674
  })
899
675
  }
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "dsh-aurorix-agentbook",
3
- "version": "1.8.6",
4
- "description": "dsh-aurorix-agentbook:给 dsh-go 接通 Aurorix 记忆库——原生界面(状态条/胶囊/菜单/面板/保险箱)加宿主侧提示词注入、分层快照与四个工具。",
3
+ "version": "1.9.1",
4
+ "description": "dsh-aurorix-agentbook:给 dsh-go 与 Harness Web 接通 Aurorix 记忆库——原生界面(状态条/胶囊/菜单/面板/保险箱)与 Web 顶栏槽位面板,加宿主侧提示词注入、分层快照与八个工具。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "dsh": {
8
8
  "bundle": {
9
9
  "patch": "./cordis.patch.yml"
10
+ },
11
+ "client": {
12
+ "platform": "web",
13
+ "inject": [
14
+ "@deepseek-ai/dsh-client-ui-conversation"
15
+ ]
10
16
  }
11
17
  },
12
18
  "engines": {
@@ -94,5 +100,14 @@
94
100
  "cordis.patch.yml",
95
101
  "README.md",
96
102
  "CLI.md"
97
- ]
103
+ ],
104
+ "exports": {
105
+ ".": {
106
+ "default": "./lib/index.js"
107
+ },
108
+ "./client": {
109
+ "default": "./lib/client.js"
110
+ },
111
+ "./package.json": "./package.json"
112
+ }
98
113
  }