@datalayer/agent-runtimes 1.6.100 → 1.6.101

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.
@@ -79,6 +79,26 @@ export type WorkspaceFullScreenOptions = {
79
79
  */
80
80
  topOffset?: number | string;
81
81
  };
82
+ /** The class of the portal root put inside an element while the browser holds it at full screen. */
83
+ export declare const FULL_SCREEN_PORTAL_CLASS = "datalayer-fullscreen-portal";
84
+ /**
85
+ * Overlays at full screen. The browser paints only the full-screen element's
86
+ * own subtree, and Primer draws menus, dialogs and tooltips in a portal under
87
+ * `<body>`: at full screen they opened, unseen (the composer's footer menus,
88
+ * the user, 20 November 2026). While the element is held, Primer's default
89
+ * portal root is a node inside it, where the overlays are seen and wear its
90
+ * theme. `fixed` at the viewport's origin: inside a promoted element the
91
+ * viewport is the containing block, so the coordinates Primer measures from an
92
+ * anchor land where they should (the Stages' box, `StageBox`, found this first).
93
+ *
94
+ * The release hands the page's root back: the embed's
95
+ * (`.datalayer-app-portal`) when the element is in one, else the page's
96
+ * (`setupPrimerPortals` makes it when there is none yet). What is still open
97
+ * at that moment — a dialog Escape did not close, the browser having taken the
98
+ * Escape — moves out with the node into the page's root, where it is seen and
99
+ * can be closed; an empty node goes. Any landing for any element.
100
+ */
101
+ export declare function holdOverlaysInside(node: HTMLElement): () => void;
82
102
  /**
83
103
  * What full screen promotes, found from the control that asked.
84
104
  *
@@ -3,6 +3,8 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  import { useCallback, useEffect, useRef, useState } from 'react';
6
+ import { registerPortalRoot } from '@primer/react';
7
+ import { getPrimerPortalRoot, setupPrimerPortals, } from '@datalayer/primer-addons';
6
8
  /**
7
9
  * A top offset as pixels: a number as given, or the bottom edge of the
8
10
  * element a CSS selector names — a host's fixed header, whose height depends
@@ -21,6 +23,66 @@ export function resolveTopOffset(offset) {
21
23
  ? Math.max(0, Math.round(element.getBoundingClientRect().bottom))
22
24
  : 0;
23
25
  }
26
+ /** The class of the portal root put inside an element while the browser holds it at full screen. */
27
+ export const FULL_SCREEN_PORTAL_CLASS = 'datalayer-fullscreen-portal';
28
+ /**
29
+ * Overlays at full screen. The browser paints only the full-screen element's
30
+ * own subtree, and Primer draws menus, dialogs and tooltips in a portal under
31
+ * `<body>`: at full screen they opened, unseen (the composer's footer menus,
32
+ * the user, 20 November 2026). While the element is held, Primer's default
33
+ * portal root is a node inside it, where the overlays are seen and wear its
34
+ * theme. `fixed` at the viewport's origin: inside a promoted element the
35
+ * viewport is the containing block, so the coordinates Primer measures from an
36
+ * anchor land where they should (the Stages' box, `StageBox`, found this first).
37
+ *
38
+ * The release hands the page's root back: the embed's
39
+ * (`.datalayer-app-portal`) when the element is in one, else the page's
40
+ * (`setupPrimerPortals` makes it when there is none yet). What is still open
41
+ * at that moment — a dialog Escape did not close, the browser having taken the
42
+ * Escape — moves out with the node into the page's root, where it is seen and
43
+ * can be closed; an empty node goes. Any landing for any element.
44
+ */
45
+ export function holdOverlaysInside(node) {
46
+ // An earlier hold's node, emptied since its overlays closed: gone now.
47
+ node.getRootNode()
48
+ .querySelectorAll?.(`.${FULL_SCREEN_PORTAL_CLASS}`)
49
+ .forEach(left => {
50
+ if (left.childElementCount === 0) {
51
+ left.remove();
52
+ }
53
+ });
54
+ const root = document.createElement('div');
55
+ root.className = FULL_SCREEN_PORTAL_CLASS;
56
+ Object.assign(root.style, {
57
+ position: 'fixed',
58
+ top: '0',
59
+ left: '0',
60
+ width: '100%',
61
+ zIndex: '9999',
62
+ });
63
+ node.appendChild(root);
64
+ registerPortalRoot(root);
65
+ return () => {
66
+ const scope = node.getRootNode();
67
+ const pageRoot = () => scope.querySelector?.('.datalayer-app-portal') ??
68
+ getPrimerPortalRoot();
69
+ const page = pageRoot();
70
+ if (page) {
71
+ registerPortalRoot(page);
72
+ }
73
+ else {
74
+ setupPrimerPortals();
75
+ }
76
+ const back = pageRoot();
77
+ if (back && root.childElementCount > 0) {
78
+ root.style.position = 'absolute';
79
+ back.appendChild(root);
80
+ }
81
+ else {
82
+ root.remove();
83
+ }
84
+ };
85
+ }
24
86
  /**
25
87
  * What full screen promotes, found from the control that asked.
26
88
  *
@@ -179,6 +241,18 @@ export function useWorkspaceFullScreen(anchorRef, options = {}) {
179
241
  window.addEventListener('keydown', leave);
180
242
  return () => window.removeEventListener('keydown', leave);
181
243
  }, [fullScreen]);
244
+ /*
245
+ * The overlays, inside the workspace while the browser holds it at full
246
+ * screen (`holdOverlaysInside`). The CSS overlay needs none of this: the
247
+ * page is still all there.
248
+ */
249
+ useEffect(() => {
250
+ if (!fullScreen || !usingApi.current) {
251
+ return undefined;
252
+ }
253
+ const node = fullScreenNode(anchorRef.current);
254
+ return node ? holdOverlaysInside(node) : undefined;
255
+ }, [anchorRef, fullScreen]);
182
256
  return { fullScreen, usingApi, toggle, topOffsetPx };
183
257
  }
184
258
  export default useWorkspaceFullScreen;
@@ -38,6 +38,10 @@ export type EquipmentSwitches = {
38
38
  };
39
39
  };
40
40
  export type EquipmentKind = 'servers' | 'skills';
41
+ /** A line longer than this is cut at a word, with "more…" to read the rest (the user, 20 November 2026). */
42
+ export declare const LINE_FOLD_CHARS = 140;
43
+ /** Where a long line is cut: the last space before the limit, else the limit. */
44
+ export declare function foldLine(text: string, limit?: number): string | null;
41
45
  /**
42
46
  * The overlay's content: the list, its switches, and what it says of them.
43
47
  * The one component both triggers open.
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
3
  * Copyright (c) 2025-2026 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
@@ -23,8 +23,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  *
24
24
  * @module chat/prompt/menus/EquipmentMenus
25
25
  */
26
- import { forwardRef, useEffect, useId, } from 'react';
27
- import { ActionList, ActionMenu, Button, Text, ToggleSwitch, Tooltip, } from '@primer/react';
26
+ import { forwardRef, useEffect, useId, useState, } from 'react';
27
+ import { ActionList, ActionMenu, Button, Link, Text, ToggleSwitch, Tooltip, } from '@primer/react';
28
28
  import { AiModelIcon, BriefcaseIcon } from '@primer/octicons-react';
29
29
  // Primer's MCP mark (the user, 19 November 2026), by its own path: the
30
30
  // package's index types do not declare it, its per-icon entry does.
@@ -78,15 +78,42 @@ function RowHead({ row, labelId, mark, }) {
78
78
  color: row.on ? undefined : 'fg.muted',
79
79
  }, children: row.name }), _jsx(StatePill, { row: row })] }));
80
80
  }
81
- /** A muted line under a name: its reason, its note, or its description. */
81
+ /** A line longer than this is cut at a word, with "more…" to read the rest (the user, 20 November 2026). */
82
+ export const LINE_FOLD_CHARS = 140;
83
+ /** Where a long line is cut: the last space before the limit, else the limit. */
84
+ export function foldLine(text, limit = LINE_FOLD_CHARS) {
85
+ if (text.length <= limit) {
86
+ return null;
87
+ }
88
+ const cut = text.lastIndexOf(' ', limit);
89
+ return text.slice(0, cut > limit / 2 ? cut : limit).trimEnd();
90
+ }
91
+ /**
92
+ * A muted line under a name: its reason, its note, or its description. A long
93
+ * one (a tool's description can run to a page) shows its start and "more…";
94
+ * a click shows the rest, and "less" folds it again. The click stays in the
95
+ * line: the row's switch is not touched, and the menu stays open.
96
+ */
82
97
  function Line({ children }) {
83
- return children ? (_jsx(Text, { sx: {
98
+ const [open, setOpen] = useState(false);
99
+ if (!children) {
100
+ return null;
101
+ }
102
+ const folded = typeof children === 'string' ? foldLine(children) : null;
103
+ const toggle = (event) => {
104
+ event.preventDefault();
105
+ event.stopPropagation();
106
+ setOpen(value => !value);
107
+ };
108
+ return (_jsxs(Text, { sx: {
84
109
  display: 'block',
85
110
  fontSize: 0,
86
111
  color: 'fg.muted',
87
112
  overflow: 'hidden',
88
113
  textOverflow: 'ellipsis',
89
- }, children: children })) : null;
114
+ whiteSpace: folded && open ? 'pre-wrap' : undefined,
115
+ overflowWrap: 'anywhere',
116
+ }, children: [folded && !open ? `${folded}… ` : children, folded ? (_jsxs(_Fragment, { children: [open ? ' ' : null, _jsx(Link, { as: "button", type: "button", onClick: toggle, "aria-expanded": open, sx: { fontSize: 0, verticalAlign: 'baseline' }, "data-equipment-more": "", children: open ? 'less' : 'more…' })] })) : null] }));
90
117
  }
91
118
  const ROW_SX = {
92
119
  display: 'flex',
@@ -14339,9 +14339,10 @@ export const WORKER_SALES_PIPELINE_BOARD_REPORT_AGENTSPEC_0_0_1 = {
14339
14339
  description: `Build a board-ready sales pipeline report with stage conversion, weighted forecast, and regional performance insights.`,
14340
14340
  tags: ['market-analyst', 'agent-worker', 'sales', 'pipeline', 'reporting'],
14341
14341
  domain: 'market-analyst',
14342
- enabled: false,
14343
- listed: true,
14342
+ enabled: true,
14343
+ listed: false,
14344
14344
  model: 'bedrock:us.anthropic.claude-sonnet-4-6',
14345
+ modelAdditionals: ['alibaba:qwen-max'],
14345
14346
  mcpServers: [],
14346
14347
  skills: [
14347
14348
  SKILL_MAP['events:0.0.1']
package/lib/specs/apps.js CHANGED
@@ -7050,9 +7050,7 @@ export const SALES_APP_0_0_3 = {
7050
7050
  emoji: '💼',
7051
7051
  avatar: '',
7052
7052
  banner: '',
7053
- setup: [
7054
- "The agent 'worker-sales-pipeline-board-report:0.0.1' is not enabled.",
7055
- ],
7053
+ setup: [],
7056
7054
  };
7057
7055
  export const SHEET_MAKER_APP_0_0_1 = {
7058
7056
  schema: 'loop.app/v1',
package/lib/specs/cogs.js CHANGED
@@ -461,8 +461,9 @@ const COG_SALES_PIPELINE_BOARD_REPORT_AGENTSPEC_0_0_1 = {
461
461
  ],
462
462
  domain: 'market-analyst',
463
463
  enabled: false,
464
- listed: true,
464
+ listed: false,
465
465
  model: 'bedrock:us.anthropic.claude-sonnet-4-6',
466
+ modelAdditionals: ['alibaba:qwen-max'],
466
467
  mcpServers: [],
467
468
  skills: [
468
469
  SKILL_MAP['events:0.0.1']
@@ -2637,7 +2637,7 @@ export const SALES_AND_ACCOUNTING_SCENE_0_0_1 = {
2637
2637
  lines: [
2638
2638
  'You → Sales',
2639
2639
  'Sales → Accounting',
2640
- 'Accounting → Odoo: odoo_accounting_aged_balance',
2640
+ 'Accounting → Odoo: odoo_accounting_*',
2641
2641
  'Accounting: an approval',
2642
2642
  'Sales: words',
2643
2643
  ],
@@ -2672,11 +2672,9 @@ export const SALES_AND_ACCOUNTING_SCENE_0_0_1 = {
2672
2672
  actors: [],
2673
2673
  lines: [],
2674
2674
  live: '',
2675
- setup: [
2676
- "The agent 'worker-sales-pipeline-board-report:0.0.1' is not enabled.",
2677
- ],
2675
+ setup: [],
2678
2676
  played: {
2679
- at: '2026-10-29T14:00:28+00:00',
2677
+ at: '2026-11-20T14:20:26+00:00',
2680
2678
  where: 'on Datalayer',
2681
2679
  passed: true,
2682
2680
  says: 'Rehearsal: 4 of 4 beats passed. The scene is Live.',
@@ -2685,28 +2683,28 @@ export const SALES_AND_ACCOUNTING_SCENE_0_0_1 = {
2685
2683
  beat: 'open-invoices',
2686
2684
  state: 'passed',
2687
2685
  says: '',
2688
- seconds: 22.688269627997215,
2686
+ seconds: 30.08045318699442,
2689
2687
  },
2690
2688
  {
2691
2689
  beat: 'aged-receivables',
2692
2690
  state: 'passed',
2693
2691
  says: '',
2694
- seconds: 21.642744607997884,
2692
+ seconds: 21.18978968495503,
2695
2693
  },
2696
2694
  {
2697
2695
  beat: 'largest-balance',
2698
2696
  state: 'passed',
2699
2697
  says: '',
2700
- seconds: 26.706618044998322,
2698
+ seconds: 23.029962921049446,
2701
2699
  },
2702
2700
  {
2703
2701
  beat: 'payment-reminders',
2704
2702
  state: 'passed',
2705
2703
  says: '',
2706
- seconds: 19.099125767999794,
2704
+ seconds: 27.56617304496467,
2707
2705
  },
2708
2706
  ],
2709
- runtime: '1.5.80',
2707
+ runtime: '1.6.100',
2710
2708
  },
2711
2709
  };
2712
2710
  export const UCP_A_PURCHASE_APPROVED_SCENE_0_0_1 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.6.100",
3
+ "version": "1.6.101",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -207,6 +207,13 @@ def generate_typescript_code(specs: list[dict[str, Any]], specs_dir: Path) -> st
207
207
  # The agent generator writes for `src/specs/agents/agents.ts`; this file
208
208
  # is one directory up, beside the catalogues it imports.
209
209
  head = head.replace("from '../../types'", "from '../types'")
210
+ # The agent registry's helper stays behind with the registry cut above:
211
+ # nothing left in the head reads it.
212
+ head = head.replace(
213
+ "import { isAgentspecComponentOptional } from '../../types/agentspecs';\n",
214
+ "",
215
+ 1,
216
+ )
210
217
  head = re.sub(
211
218
  r"from '\.\./(mcpServers|skills|backendTools|frontendTools)'",
212
219
  r"from './\1'",