@xenosystem/agent-conversation 0.1.36 → 0.1.37

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 (86) hide show
  1. package/dist/adapters/xenoAgentHostCatalog.d.ts.map +1 -1
  2. package/dist/adapters/xenoAgentHostCatalog.js +20 -5
  3. package/dist/adapters/xenoAgentHostCatalog.js.map +1 -1
  4. package/dist/components/agent/AgentView.d.ts +9 -0
  5. package/dist/components/agent/AgentView.d.ts.map +1 -1
  6. package/dist/components/agent/AgentView.js +883 -1045
  7. package/dist/components/agent/AgentView.js.map +1 -1
  8. package/dist/components/agent/GhostTextArea.d.ts +6 -0
  9. package/dist/components/agent/GhostTextArea.d.ts.map +1 -1
  10. package/dist/components/agent/GhostTextArea.js +15 -5
  11. package/dist/components/agent/GhostTextArea.js.map +1 -1
  12. package/dist/components/agent/LiveConversationCollaboration.d.ts +3 -1
  13. package/dist/components/agent/LiveConversationCollaboration.d.ts.map +1 -1
  14. package/dist/components/agent/LiveConversationCollaboration.js +3 -1
  15. package/dist/components/agent/LiveConversationCollaboration.js.map +1 -1
  16. package/dist/components/agent/MessageText.d.ts +36 -0
  17. package/dist/components/agent/MessageText.d.ts.map +1 -0
  18. package/dist/components/agent/MessageText.js +76 -0
  19. package/dist/components/agent/MessageText.js.map +1 -0
  20. package/dist/components/agent/SdkSessionPanel.d.ts +2 -0
  21. package/dist/components/agent/SdkSessionPanel.d.ts.map +1 -1
  22. package/dist/components/agent/SdkSessionPanel.js +1 -1
  23. package/dist/components/agent/SdkSessionPanel.js.map +1 -1
  24. package/dist/components/agent/composer/Composer.d.ts +282 -0
  25. package/dist/components/agent/composer/Composer.d.ts.map +1 -0
  26. package/dist/components/agent/composer/Composer.js +393 -0
  27. package/dist/components/agent/composer/Composer.js.map +1 -0
  28. package/dist/components/agent/composer/EffortCells.d.ts +12 -0
  29. package/dist/components/agent/composer/EffortCells.d.ts.map +1 -0
  30. package/dist/components/agent/composer/EffortCells.js +146 -0
  31. package/dist/components/agent/composer/EffortCells.js.map +1 -0
  32. package/dist/components/agent/composer/Tip.d.ts +19 -0
  33. package/dist/components/agent/composer/Tip.d.ts.map +1 -0
  34. package/dist/components/agent/composer/Tip.js +78 -0
  35. package/dist/components/agent/composer/Tip.js.map +1 -0
  36. package/dist/components/agent/composer/TypedMenu.d.ts +56 -0
  37. package/dist/components/agent/composer/TypedMenu.d.ts.map +1 -0
  38. package/dist/components/agent/composer/TypedMenu.js +156 -0
  39. package/dist/components/agent/composer/TypedMenu.js.map +1 -0
  40. package/dist/components/agent/mainAssistant.d.ts +9 -2
  41. package/dist/components/agent/mainAssistant.d.ts.map +1 -1
  42. package/dist/components/agent/mainAssistant.js +9 -2
  43. package/dist/components/agent/mainAssistant.js.map +1 -1
  44. package/dist/components/agent/toolCallDerive.d.ts +82 -0
  45. package/dist/components/agent/toolCallDerive.d.ts.map +1 -0
  46. package/dist/components/agent/toolCallDerive.js +741 -0
  47. package/dist/components/agent/toolCallDerive.js.map +1 -0
  48. package/dist/components/agent/transcript/Transcript.d.ts +127 -0
  49. package/dist/components/agent/transcript/Transcript.d.ts.map +1 -0
  50. package/dist/components/agent/transcript/Transcript.js +544 -0
  51. package/dist/components/agent/transcript/Transcript.js.map +1 -0
  52. package/dist/components/agent/transcript/glyphs.d.ts +83 -0
  53. package/dist/components/agent/transcript/glyphs.d.ts.map +1 -0
  54. package/dist/components/agent/transcript/glyphs.js +124 -0
  55. package/dist/components/agent/transcript/glyphs.js.map +1 -0
  56. package/dist/components/agent/transcript/stepModel.d.ts +163 -0
  57. package/dist/components/agent/transcript/stepModel.d.ts.map +1 -0
  58. package/dist/components/agent/transcript/stepModel.js +701 -0
  59. package/dist/components/agent/transcript/stepModel.js.map +1 -0
  60. package/dist/components/agent/transcript/turnModel.d.ts +124 -0
  61. package/dist/components/agent/transcript/turnModel.d.ts.map +1 -0
  62. package/dist/components/agent/transcript/turnModel.js +166 -0
  63. package/dist/components/agent/transcript/turnModel.js.map +1 -0
  64. package/dist/components/agent/transcript/useAskActions.d.ts +23 -0
  65. package/dist/components/agent/transcript/useAskActions.d.ts.map +1 -0
  66. package/dist/components/agent/transcript/useAskActions.js +92 -0
  67. package/dist/components/agent/transcript/useAskActions.js.map +1 -0
  68. package/dist/parityFixture.d.ts +54 -0
  69. package/dist/parityFixture.d.ts.map +1 -0
  70. package/dist/parityFixture.js +195 -0
  71. package/dist/parityFixture.js.map +1 -0
  72. package/dist/platformApiTypes.d.ts +10 -1
  73. package/dist/platformApiTypes.d.ts.map +1 -1
  74. package/dist/stores/agentChatStore.d.ts +61 -1
  75. package/dist/stores/agentChatStore.d.ts.map +1 -1
  76. package/dist/stores/agentChatStore.js +63 -8
  77. package/dist/stores/agentChatStore.js.map +1 -1
  78. package/dist/types/agentPermissions.d.ts +3 -1
  79. package/dist/types/agentPermissions.d.ts.map +1 -1
  80. package/dist/utils/acpExecutionAuthority.d.ts.map +1 -1
  81. package/dist/utils/acpExecutionAuthority.js +2 -0
  82. package/dist/utils/acpExecutionAuthority.js.map +1 -1
  83. package/package.json +6 -5
  84. package/src/composer.css +334 -0
  85. package/src/styles.css +7 -0
  86. package/src/transcript.css +585 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EffortCells.js","sourceRoot":"","sources":["../../../../src/components/agent/composer/EffortCells.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AASvE,MAAM,KAAK,GAAG,CAAC,CAAA;AACf,MAAM,IAAI,GAAG,CAAC,CAAA;AAEd,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAInD;IACC,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC7C,MAAM,KAAK,GAAG,MAAM,CAAY,EAAE,CAAC,CAAA;IACnC,MAAM,EAAE,GAAG,IAA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K,YAAY;4BAAE,OAAM;wBACnE,KAAK,CAAC,cAAc,EAAE,CAAA;wBACtB,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;oBACjD,CAAC,YAEA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,eAEE,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EACpE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EACnC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,YAE7B,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IALxB,MAAM,CAAC,EAAE,CAMT,CACR,CAAC,GACE,GACF,IACL,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The composer's tooltip — PORTED from the LOCKED prototype: "sentence left, shortcut right, no
3
+ * tail". One element for the whole dock, driven by `data-tip` (and `data-key` for the shortcut),
4
+ * opening after 1000 ms of hover and anchored by the prototype's own arithmetic: it aligns to the
5
+ * near edge of the control, flips to the far edge past the column's midpoint, and is clamped inside
6
+ * the column so it can never hang off the panel.
7
+ *
8
+ * 🔴 A native `title` is NOT this control. It arrives when the OS decides, in the OS's font, with no
9
+ * shortcut column and no way to show ⌘ on a Mac and Ctrl on Windows — which is exactly what the
10
+ * prototype's `key()` does. Using `title` was the "something like it" this replaces.
11
+ */
12
+ import { type RefObject } from 'react';
13
+ /** ⌘ and ⇧ are the Mac spellings; every other platform reads Ctrl and Shift. */
14
+ export declare function shortcutFor(key: string): string;
15
+ export declare function Tip({ dockRef, suspended }: {
16
+ dockRef: RefObject<HTMLElement | null>;
17
+ suspended?: boolean;
18
+ }): import("react").JSX.Element;
19
+ //# sourceMappingURL=Tip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tip.d.ts","sourceRoot":"","sources":["../../../../src/components/agent/composer/Tip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnE,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;IAAE,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,+BAyD1G"}
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The composer's tooltip — PORTED from the LOCKED prototype: "sentence left, shortcut right, no
4
+ * tail". One element for the whole dock, driven by `data-tip` (and `data-key` for the shortcut),
5
+ * opening after 1000 ms of hover and anchored by the prototype's own arithmetic: it aligns to the
6
+ * near edge of the control, flips to the far edge past the column's midpoint, and is clamped inside
7
+ * the column so it can never hang off the panel.
8
+ *
9
+ * 🔴 A native `title` is NOT this control. It arrives when the OS decides, in the OS's font, with no
10
+ * shortcut column and no way to show ⌘ on a Mac and Ctrl on Windows — which is exactly what the
11
+ * prototype's `key()` does. Using `title` was the "something like it" this replaces.
12
+ */
13
+ import { useEffect, useRef, useState } from 'react';
14
+ /** ⌘ and ⇧ are the Mac spellings; every other platform reads Ctrl and Shift. */
15
+ export function shortcutFor(key) {
16
+ const mac = typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(navigator.platform);
17
+ return mac ? key : key.replace('⌘', 'Ctrl+').replace('⇧', 'Shift+');
18
+ }
19
+ export function Tip({ dockRef, suspended }) {
20
+ const tipRef = useRef(null);
21
+ const timer = useRef(null);
22
+ const [shown, setShown] = useState(null);
23
+ useEffect(() => {
24
+ const dock = dockRef.current;
25
+ if (!dock)
26
+ return;
27
+ const clear = () => { if (timer.current !== null) {
28
+ window.clearTimeout(timer.current);
29
+ timer.current = null;
30
+ } };
31
+ const hide = () => { clear(); setShown(null); };
32
+ const over = (event) => {
33
+ if (suspended)
34
+ return;
35
+ const target = event.target?.closest('[data-tip]');
36
+ if (!target)
37
+ return;
38
+ // with a chooser open, only the choice explains itself
39
+ if (dock.querySelector('.xa-lanepick, .xa-permpick') && !target.closest('.xa-mgrp, .xa-permgrp'))
40
+ return;
41
+ clear();
42
+ timer.current = window.setTimeout(() => {
43
+ const tip = tipRef.current;
44
+ const text = target.dataset.tip;
45
+ if (!tip || !text)
46
+ return;
47
+ setShown({ text, key: target.dataset.key || '' });
48
+ // the prototype's anchoring, unchanged: near edge, flipping past the column's midpoint,
49
+ // clamped inside the column, and seated 7px above the control
50
+ const d = dock.getBoundingClientRect();
51
+ const a = target.getBoundingClientRect();
52
+ const column = (dock.querySelector('.xa-dock-inner') || dock).getBoundingClientRect();
53
+ const rightSide = (a.left + a.right) / 2 > (column.left + column.right) / 2;
54
+ let left = rightSide ? a.right - d.left - tip.offsetWidth : a.left - d.left;
55
+ left = Math.max(column.left - d.left, Math.min(left, column.right - d.left - tip.offsetWidth));
56
+ tip.style.left = `${left}px`;
57
+ tip.style.bottom = `${d.height - (a.top - d.top) + 7}px`;
58
+ }, 1000);
59
+ };
60
+ const out = (event) => {
61
+ if (event.target?.closest('[data-tip]'))
62
+ hide();
63
+ };
64
+ dock.addEventListener('mouseover', over);
65
+ dock.addEventListener('mouseout', out);
66
+ dock.addEventListener('mousedown', hide);
67
+ return () => {
68
+ clear();
69
+ dock.removeEventListener('mouseover', over);
70
+ dock.removeEventListener('mouseout', out);
71
+ dock.removeEventListener('mousedown', hide);
72
+ };
73
+ }, [dockRef, suspended]);
74
+ useEffect(() => { if (suspended)
75
+ setShown(null); }, [suspended]);
76
+ return (_jsxs("div", { ref: tipRef, className: `xa-tip${shown ? ' xa-show' : ''}`, role: "tooltip", "aria-hidden": "true", children: [_jsx("span", { className: "xa-t", children: shown?.text || '' }), _jsx("span", { className: "xa-k", style: shown?.key ? undefined : { display: 'none' }, children: shown?.key ? shortcutFor(shown.key) : '' })] }));
77
+ }
78
+ //# sourceMappingURL=Tip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tip.js","sourceRoot":"","sources":["../../../../src/components/agent/composer/Tip.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAEnE,gFAAgF;AAChF,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,GAAG,GAAG,OAAO,SAAS,KAAK,WAAW,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAC1F,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AACrE,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,SAAS,EAAmE;IACzG,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAA;IACzC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAuC,IAAI,CAAC,CAAA;IAE9E,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,MAAM,KAAK,GAAG,GAAG,EAAE,GA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YACV,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;YAC3C,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;YACzC,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;QAC7C,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;IAExB,SAAS,CAAC,GAAG,EAAE,GAAG,IAAI,SAAS;QAAE,QAAQ,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAE/D,OAAO,CACL,eAAK,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAC,SAAS,iBAAa,MAAM,aAChG,eAAM,SAAS,EAAC,MAAM,YAAE,KAAK,EAAE,IAAI,IAAI,EAAE,GAAQ,EACjD,eAAM,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAQ,IACzH,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The typed popover — `/` do · `@` read · `#` for (D9), PORTED from the LOCKED prototype
3
+ * (artifact `XENO Agent Panel`, `xeno-agent-panel-proto.html`).
4
+ *
5
+ * One popover for the three prefixes, opening above the box and left-aligned to it, filtering on
6
+ * every keystroke, five rows per section, `↑↓` moving a 6 px square that GLIDES to the chosen row,
7
+ * `→` `↵` `⇥` taking, `←` removing the prefix and what was typed after it, `Esc` closing. A path row
8
+ * ellipsizes its DIRECTORY and never its NAME, because the name is what you are choosing by.
9
+ *
10
+ * 🔴 `/` only at the very START of the message — otherwise a path like `packages/ui` would open it —
11
+ * and `@`/`#` only at a word boundary, so an e-mail address never does.
12
+ *
13
+ * The prototype's rows are fixtures; a product's are its own. Every section here is fed from what
14
+ * the surface ACTUALLY has (the host's commands, the editor's open files, the conversation's own
15
+ * files, the connected MCP servers, the workspace's other conversations) and a section with nothing
16
+ * behind it is omitted rather than invented — `sec()` in the prototype does the same.
17
+ */
18
+ import { type RefObject } from 'react';
19
+ import type { GlyphName } from '../transcript/glyphs.js';
20
+ export interface TypedItem {
21
+ /** The glyph for the row, one per kind. */
22
+ glyph: GlyphName;
23
+ /** The token as it reads — `@packages/ui/`, `/clear`, `#482`. */
24
+ token: string;
25
+ desc?: string;
26
+ kind?: string;
27
+ /** What lands in the box, with its trailing space. */
28
+ insert: string;
29
+ }
30
+ export interface TypedSection {
31
+ header: string;
32
+ items: TypedItem[];
33
+ /** Shown INSTEAD of rows when the surface has no source for this section yet. */
34
+ empty?: string;
35
+ }
36
+ export interface TypedToken {
37
+ prefix: '/' | '@' | '#';
38
+ query: string;
39
+ start: number;
40
+ end: number;
41
+ }
42
+ /**
43
+ * The token under the caret, if it is one of ours. Verbatim from the prototype: a prefix at the
44
+ * start of a word, and `/` only at the very start of the message.
45
+ */
46
+ export declare function tokenAt(value: string, caret: number): TypedToken | null;
47
+ export declare function TypedMenu({ open, token, sections, onTake, onClose, boxRef, dock }: {
48
+ open: boolean;
49
+ token: TypedToken | null;
50
+ sections: TypedSection[];
51
+ onTake: (item: TypedItem) => void;
52
+ onClose: () => void;
53
+ boxRef: RefObject<HTMLElement | null>;
54
+ dock: HTMLElement | null;
55
+ }): import("react").JSX.Element | null;
56
+ //# sourceMappingURL=TypedMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/agent/composer/TypedMenu.tsx"],"names":[],"mappings":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;CACzB,sCA2HA"}
@@ -0,0 +1,156 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The typed popover — `/` do · `@` read · `#` for (D9), PORTED from the LOCKED prototype
4
+ * (artifact `XENO Agent Panel`, `xeno-agent-panel-proto.html`).
5
+ *
6
+ * One popover for the three prefixes, opening above the box and left-aligned to it, filtering on
7
+ * every keystroke, five rows per section, `↑↓` moving a 6 px square that GLIDES to the chosen row,
8
+ * `→` `↵` `⇥` taking, `←` removing the prefix and what was typed after it, `Esc` closing. A path row
9
+ * ellipsizes its DIRECTORY and never its NAME, because the name is what you are choosing by.
10
+ *
11
+ * 🔴 `/` only at the very START of the message — otherwise a path like `packages/ui` would open it —
12
+ * and `@`/`#` only at a word boundary, so an e-mail address never does.
13
+ *
14
+ * The prototype's rows are fixtures; a product's are its own. Every section here is fed from what
15
+ * the surface ACTUALLY has (the host's commands, the editor's open files, the conversation's own
16
+ * files, the connected MCP servers, the workspace's other conversations) and a section with nothing
17
+ * behind it is omitted rather than invented — `sec()` in the prototype does the same.
18
+ */
19
+ import { useEffect, useLayoutEffect, useRef, useState } from 'react';
20
+ import { Glyph } from '../transcript/Transcript.js';
21
+ /**
22
+ * The token under the caret, if it is one of ours. Verbatim from the prototype: a prefix at the
23
+ * start of a word, and `/` only at the very start of the message.
24
+ */
25
+ export function tokenAt(value, caret) {
26
+ const before = value.slice(0, caret);
27
+ const match = /(^|\s)([/@#])(\S*)$/.exec(before);
28
+ if (!match)
29
+ return null;
30
+ const prefix = match[2];
31
+ const query = match[3] || '';
32
+ const start = caret - prefix.length - query.length;
33
+ if (prefix === '/' && start !== 0)
34
+ return null;
35
+ return { prefix, query: query.toLowerCase(), start, end: caret };
36
+ }
37
+ /** A path splits at its last slash: the directory may shrink, the name may not. */
38
+ function TokenText({ token }) {
39
+ const at = token.replace(/\/$/, '').lastIndexOf('/');
40
+ if (at < 0)
41
+ return _jsx("span", { className: "xa-tok xa-mono", children: _jsx("span", { className: "xa-name", children: token }) });
42
+ return (_jsxs("span", { className: "xa-tok xa-mono", children: [_jsx("span", { className: "xa-dir", children: token.slice(0, at + 1) }), _jsx("span", { className: "xa-name", children: token.slice(at + 1) })] }));
43
+ }
44
+ export function TypedMenu({ open, token, sections, onTake, onClose, boxRef, dock }) {
45
+ const menuRef = useRef(null);
46
+ const rowsRef = useRef(null);
47
+ const markRef = useRef(null);
48
+ const [index, setIndex] = useState(0);
49
+ const [seat, setSeat] = useState(null);
50
+ // five per section; typing narrows it. Headers with nothing under them are dropped, which is why
51
+ // the flat list is built here rather than rendered section by section.
52
+ const rows = [];
53
+ const flat = [];
54
+ for (const section of sections) {
55
+ const capped = section.items.slice(0, 5);
56
+ if (!capped.length && !section.empty)
57
+ continue;
58
+ flat.push({ header: section.header });
59
+ if (!capped.length) {
60
+ flat.push({ empty: section.empty });
61
+ continue;
62
+ }
63
+ for (const item of capped) {
64
+ flat.push({ item, at: rows.length });
65
+ rows.push(item);
66
+ }
67
+ }
68
+ const prefix = token?.prefix;
69
+ useEffect(() => { setIndex(0); }, [prefix]);
70
+ useEffect(() => { setIndex((current) => Math.min(current, Math.max(0, rows.length - 1))); }, [rows.length]);
71
+ // the popover is the BOX's width and sits above it — not above the control that opened it
72
+ useLayoutEffect(() => {
73
+ if (!open || !dock)
74
+ return;
75
+ const place = () => {
76
+ const box = boxRef.current;
77
+ const node = menuRef.current;
78
+ if (!box || !node)
79
+ return;
80
+ const d = dock.getBoundingClientRect();
81
+ const b = box.getBoundingClientRect();
82
+ const column = (dock.querySelector('.xa-dock-inner') || dock).getBoundingClientRect();
83
+ setSeat({ left: b.left - d.left, bottom: d.height - (b.top - d.top) + 6, width: Math.min(380, column.width) });
84
+ };
85
+ place();
86
+ window.addEventListener('resize', place);
87
+ return () => window.removeEventListener('resize', place);
88
+ }, [boxRef, dock, open, flat.length]);
89
+ // the square sits on the chosen row's centre line; it glides there unless the list just opened,
90
+ // and steps aside while its row is scrolled out of view
91
+ const placeMark = (glide) => {
92
+ const mark = markRef.current;
93
+ const list = rowsRef.current;
94
+ const row = list?.querySelector(`[data-typed="${index}"]`);
95
+ if (!mark || !list)
96
+ return;
97
+ if (!row) {
98
+ mark.hidden = true;
99
+ return;
100
+ }
101
+ mark.hidden = false;
102
+ if (glide)
103
+ row.scrollIntoView({ block: 'nearest' });
104
+ const y = row.offsetTop - list.scrollTop + (row.offsetHeight - 6) / 2;
105
+ mark.style.opacity = (y < list.offsetTop - 2 || y + 6 > list.offsetTop + list.clientHeight + 2) ? '0' : '';
106
+ mark.classList.toggle('xa-still', !glide);
107
+ if (!glide)
108
+ void mark.offsetHeight; // commit the no-transition state before the move
109
+ mark.style.transform = `translateY(${y}px)`;
110
+ if (!glide)
111
+ requestAnimationFrame(() => mark.classList.remove('xa-still'));
112
+ };
113
+ useLayoutEffect(() => { if (open)
114
+ placeMark(false); }, [open, seat?.width, flat.length]);
115
+ useLayoutEffect(() => { if (open)
116
+ placeMark(true); }, [index]);
117
+ // the keyboard model is the textarea's, so the owner forwards its keydown here
118
+ useEffect(() => {
119
+ if (!open)
120
+ return;
121
+ const handler = (event) => {
122
+ if (!rows.length && event.key !== 'Escape')
123
+ return;
124
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
125
+ event.preventDefault();
126
+ setIndex((current) => (current + (event.key === 'ArrowDown' ? 1 : rows.length - 1)) % rows.length);
127
+ return;
128
+ }
129
+ if ((event.key === 'Enter' && !event.shiftKey) || event.key === 'Tab' || event.key === 'ArrowRight') {
130
+ const item = rows[index];
131
+ if (!item)
132
+ return;
133
+ event.preventDefault();
134
+ onTake(item);
135
+ return;
136
+ }
137
+ if (event.key === 'Escape') {
138
+ event.preventDefault();
139
+ onClose();
140
+ }
141
+ };
142
+ document.addEventListener('keydown', handler, true);
143
+ return () => document.removeEventListener('keydown', handler, true);
144
+ }, [index, onClose, onTake, open, rows]);
145
+ if (!open || !dock || !token)
146
+ return null;
147
+ return (_jsxs("div", { ref: menuRef, className: "xa-menu xa-typed xa-show", style: seat ? { left: seat.left, bottom: seat.bottom, width: seat.width } : { visibility: 'hidden' }, role: "listbox", "aria-label": token.prefix === '/' ? 'Commands' : token.prefix === '@' ? 'Files and sources' : 'Work items', children: [_jsxs("div", { ref: rowsRef, className: "xa-typed-rows", onScroll: () => placeMark(false), children: [flat.map((entry, i) => {
148
+ if ('header' in entry)
149
+ return _jsx("div", { className: "xa-h xa-label", children: entry.header }, `h${i}`);
150
+ if ('empty' in entry)
151
+ return _jsx("div", { className: "xa-none", children: entry.empty }, `e${i}`);
152
+ const { item, at } = entry;
153
+ return (_jsxs("button", { type: "button", role: "option", "aria-selected": at === index, "data-typed": at, className: `xa-mrow${at === index ? ' xa-on' : ''}`, onMouseOver: () => setIndex(at), onClick: () => onTake(item), children: [_jsx("span", { className: "xa-gl", children: _jsx(Glyph, { name: item.glyph, size: 12 }) }), _jsx(TokenText, { token: item.token }), item.desc && _jsx("span", { className: "xa-desc", children: item.desc }), item.kind && _jsx("span", { className: "xa-kind", children: item.kind })] }, `r${at}`));
154
+ }), !flat.length && _jsx("div", { className: "xa-none", children: "Nothing matches" })] }), _jsx("span", { ref: markRef, className: "xa-mark", hidden: true })] }));
155
+ }
156
+ //# sourceMappingURL=TypedMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedMenu.js","sourceRoot":"","sources":["../../../../src/components/agent/composer/TypedMenu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AA4BnD;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa,EAAE,KAAa;IAClD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACpC,MAAM,KAAK,GAAG,qBAAqB,CAAC,IA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,gCAAsB,IAC3D,EACN,eAAM,GAAG,EAAE,OAAO,EAAE,SAAS,EAAC,SAAS,EAAC,MAAM,SAAG,IAC7C,CACP,CAAA;AACH,CAAC"}
@@ -19,6 +19,13 @@ export declare const MAIN_ASSISTANT_ID = "__main_assistant__";
19
19
  export declare const MAIN_ASSISTANT_MODEL = "claude-sonnet-4-6";
20
20
  /** Display name for {@link MAIN_ASSISTANT_MODEL}. */
21
21
  export declare const MAIN_ASSISTANT_MODEL_NAME = "Claude Sonnet";
22
- /** What the personal assistant is called on screen. */
23
- export declare const MAIN_ASSISTANT_NAME = "XENO ASSISTANT";
22
+ /**
23
+ * What the personal assistant is called ON SCREEN — the product's name, in the product's casing.
24
+ *
25
+ * 🔴 This is a LABEL, not the {@link MAIN_ASSISTANT_ID} key: renaming it renames nothing on disk.
26
+ * It reads back to the person in the composer ("Message XENO Agent — / for commands…"), which is
27
+ * why it matches the Turn Modes Bench rather than the shouted form the system prompt once used.
28
+ * A team agent keeps its OWN name; only the personal assistant answers to this one.
29
+ */
30
+ export declare const MAIN_ASSISTANT_NAME = "XENO Agent";
24
31
  //# sourceMappingURL=mainAssistant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mainAssistant.d.ts","sourceRoot":"","sources":["../../../src/components/agent/mainAssistant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mGAAmG;AACnG,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AAErD,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,sBAAsB,CAAA;AAEvD,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,kBAAkB,CAAA;AAExD,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,mBAAmB,CAAA"}
1
+ {"version":3,"file":"mainAssistant.d.ts","sourceRoot":"","sources":["../../../src/components/agent/mainAssistant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mGAAmG;AACnG,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AAErD,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,sBAAsB,CAAA;AAEvD,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,kBAAkB,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAAe,CAAA"}
@@ -19,6 +19,13 @@ export const MAIN_ASSISTANT_ID = '__main_assistant__';
19
19
  export const MAIN_ASSISTANT_MODEL = 'claude-sonnet-4-6';
20
20
  /** Display name for {@link MAIN_ASSISTANT_MODEL}. */
21
21
  export const MAIN_ASSISTANT_MODEL_NAME = 'Claude Sonnet';
22
- /** What the personal assistant is called on screen. */
23
- export const MAIN_ASSISTANT_NAME = 'XENO ASSISTANT';
22
+ /**
23
+ * What the personal assistant is called ON SCREEN — the product's name, in the product's casing.
24
+ *
25
+ * 🔴 This is a LABEL, not the {@link MAIN_ASSISTANT_ID} key: renaming it renames nothing on disk.
26
+ * It reads back to the person in the composer ("Message XENO Agent — / for commands…"), which is
27
+ * why it matches the Turn Modes Bench rather than the shouted form the system prompt once used.
28
+ * A team agent keeps its OWN name; only the personal assistant answers to this one.
29
+ */
30
+ export const MAIN_ASSISTANT_NAME = 'XENO Agent';
24
31
  //# sourceMappingURL=mainAssistant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mainAssistant.js","sourceRoot":"","sources":["../../../src/components/agent/mainAssistant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mGAAmG;AACnG,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAA;AAErD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAA;AAEvD,qDAAqD;AACrD,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAA;AAExD,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAA"}
1
+ {"version":3,"file":"mainAssistant.js","sourceRoot":"","sources":["../../../src/components/agent/mainAssistant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mGAAmG;AACnG,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAA;AAErD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAA;AAEvD,qDAAqD;AACrD,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAA;AAExD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAA"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Pure derivations over a tool call — how the transcript READS a tool call, in one place.
3
+ *
4
+ * Moved out of `AgentView.tsx` (not copied) when the D10 transcript arrived, so the rail rows and the
5
+ * older cards derive the same verb, object, result, diff stats and approval text from the same
6
+ * functions. Everything here is a pure function of `ToolCallInfo` (plus a permission request); nothing
7
+ * reads a store or the bridge, which is what lets the transcript be rendered from data in a test.
8
+ */
9
+ import type { ToolCallInfo, PermissionRequestInfo } from '../../stores/agentChatStore.js';
10
+ import type { ConversationEditorDiff } from '../../types/agentEditor.js';
11
+ import type { AgentApprovalRule } from '../../types/agentPermissions.js';
12
+ export declare function countNormalizedTextLines(content: string): number;
13
+ export declare function normalizeEditorCandidatePath(raw: string): string;
14
+ export declare function extractPathsFromResultText(text: string): string[];
15
+ export declare function deriveToolCallFilePath(toolCall: ToolCallInfo): string | null;
16
+ export declare function humanizeToolName(toolName: string): string;
17
+ export declare function stripToolDisplayPrefix(value: string): string;
18
+ export declare function isToolDisplayNoise(value: string | undefined): boolean;
19
+ export declare function deriveToolCardDisplay(toolCall: ToolCallInfo): {
20
+ eyebrow: string;
21
+ title: string;
22
+ };
23
+ export declare function summarizeCommand(cmd: string): {
24
+ icon: 'search' | 'file' | 'terminal';
25
+ label: string;
26
+ detail: string;
27
+ };
28
+ export declare function parseStructuredCommandContent(content: string): {
29
+ command: string;
30
+ cwd: string;
31
+ stdout: string;
32
+ stderr: string;
33
+ error: string;
34
+ exit: string;
35
+ outputLineCount: number;
36
+ };
37
+ export declare function formatToolDuration(durationMs?: number): string | null;
38
+ export declare function countTextLines(value: string): number;
39
+ export declare function deriveEditorDiffStats(diff: ConversationEditorDiff): {
40
+ added: number;
41
+ removed: number;
42
+ };
43
+ export declare function parseReplacementCount(result?: string): number;
44
+ export declare function deriveToolDiffStats(toolCall: ToolCallInfo): {
45
+ added: number;
46
+ removed: number;
47
+ } | null;
48
+ export declare function deriveToolCallFileName(toolCall: ToolCallInfo): string;
49
+ export declare function deriveFileToolPrimaryText(toolCall: ToolCallInfo): string | null;
50
+ export declare function deriveFileToolActionLabel(toolCall: ToolCallInfo): string | null;
51
+ export interface DiffPreviewLine {
52
+ kind: 'context' | 'added' | 'removed' | 'ellipsis';
53
+ oldLineNumber?: number;
54
+ newLineNumber?: number;
55
+ text: string;
56
+ }
57
+ export declare function splitPreviewLines(value: string): string[];
58
+ export declare function buildInlineDiffPreviewLines(diff: ConversationEditorDiff, maxChangedLines?: number): DiffPreviewLine[];
59
+ export declare function mapWorkspaceChoice(value: string): string;
60
+ export declare function deriveTerminalToolOutput(toolCall: ToolCallInfo): {
61
+ output: string;
62
+ terminalId?: string;
63
+ cwd?: string;
64
+ } | null;
65
+ export declare function readToolStringParam(params: Record<string, unknown> | undefined, keys: string[]): string;
66
+ export declare function isPseudoPermissionDirectory(directory: string): boolean;
67
+ export declare function tokenizeShellCommand(command: string): string[];
68
+ export declare function deriveShellCommandNames(command: string): string[];
69
+ export declare function deriveApprovalCardInfo(toolCall: ToolCallInfo, pr: PermissionRequestInfo): {
70
+ description: string;
71
+ summary: string;
72
+ body: string;
73
+ prompt: string;
74
+ allowlistLabel: string;
75
+ runLabel: string;
76
+ };
77
+ export declare function toolCallLabel(toolName: string, params?: Record<string, unknown>): string;
78
+ export declare function normalizeTerminalApprovalCommand(raw: string): string;
79
+ export declare function safeUrlOrigin(raw: string): string;
80
+ export declare function buildSurfaceApprovalRule(toolCall: ToolCallInfo, pr: PermissionRequestInfo): (Omit<AgentApprovalRule, 'id' | 'createdAt'> & Partial<Pick<AgentApprovalRule, 'id' | 'createdAt'>>) | null;
81
+ export declare function canBuildSurfaceApprovalRule(toolCall: ToolCallInfo, pr: PermissionRequestInfo): boolean;
82
+ //# sourceMappingURL=toolCallDerive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolCallDerive.d.ts","sourceRoot":"","sources":["../../../src/components/agent/toolCallDerive.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACzF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAIxE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIhE;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAIjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAsB5E;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAcrE;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA8GhG;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAAC,KAAK,EA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