@datalayer/agent-runtimes 1.5.86 → 1.5.88

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 (105) hide show
  1. package/dist-embed/chunks/{DeckComponent-D4X-rpbh.js → DeckComponent-etBrFG87.js} +1 -1
  2. package/dist-embed/chunks/{DocumentView-Aird-zRf.js → DocumentView-LE7AJ2BO.js} +1 -1
  3. package/dist-embed/chunks/{EphemeralDocument-qnhIdhNh.js → EphemeralDocument-YiGgJGkL.js} +1 -1
  4. package/dist-embed/chunks/{ExcalidrawComponent-C33gsDzG.js → ExcalidrawComponent-C5J8Uqqj.js} +1 -1
  5. package/dist-embed/chunks/{ExcalidrawModal-DHCo94OE.js → ExcalidrawModal-D3cbhMgF.js} +1 -1
  6. package/dist-embed/chunks/{JupyterLexicalExtension-Cb2zt9Ki.js → JupyterLexicalExtension-BipHQ8U3.js} +7 -7
  7. package/dist-embed/chunks/{YouTubePlugin-C0a_9VKl.js → YouTubePlugin-BewlFg9c.js} +1 -1
  8. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-DS3Xmdel.js → ar-SA-G6X2FPQ2-BgdfqrVp.js} +1 -1
  9. package/dist-embed/chunks/{az-AZ-76LH7QW2-DIApsK5M.js → az-AZ-76LH7QW2-xUMz4Jqu.js} +1 -1
  10. package/dist-embed/chunks/{bg-BG-XCXSNQG7-X-aS4Onm.js → bg-BG-XCXSNQG7-UR5Ld32v.js} +1 -1
  11. package/dist-embed/chunks/{bn-BD-2XOGV67Q-1YCe_Jnl.js → bn-BD-2XOGV67Q-CCNH7olK.js} +1 -1
  12. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-D26sHSba.js → ca-ES-6MX7JW3Y-DaZb-gMN.js} +1 -1
  13. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-B5pRYPPF.js → cs-CZ-2BRQDIVT-OaROtN46.js} +1 -1
  14. package/dist-embed/chunks/{da-DK-5WZEPLOC-BfajxBtH.js → da-DK-5WZEPLOC-DrcoMVce.js} +1 -1
  15. package/dist-embed/chunks/{de-DE-XR44H4JA-BovBXD5H.js → de-DE-XR44H4JA-b2_lYxS1.js} +1 -1
  16. package/dist-embed/chunks/{el-GR-BZB4AONW-rLXnfS2l.js → el-GR-BZB4AONW-BOT3RaFd.js} +1 -1
  17. package/dist-embed/chunks/{es-ES-U4NZUMDT-Do4MvuPW.js → es-ES-U4NZUMDT-BVlxd_yM.js} +1 -1
  18. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CldbgpdZ.js → eu-ES-A7QVB2H4-BScAWOoO.js} +1 -1
  19. package/dist-embed/chunks/{fa-IR-HGAKTJCU-C988cp8F.js → fa-IR-HGAKTJCU-Kxnh8bHZ.js} +1 -1
  20. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-BYmFVIh7.js → fi-FI-Z5N7JZ37-BOmDZi5v.js} +1 -1
  21. package/dist-embed/chunks/{fr-FR-RHASNOE6-D2Tarz3u.js → fr-FR-RHASNOE6-GOPhqKT4.js} +1 -1
  22. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BLuuMSHB.js → gl-ES-HMX3MZ6V-BRZS4fho.js} +1 -1
  23. package/dist-embed/chunks/{he-IL-6SHJWFNN-CyDIOeVd.js → he-IL-6SHJWFNN-MQEVUj2T.js} +1 -1
  24. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-DKCduSTz.js → hi-IN-IWLTKZ5I-D_puNbt2.js} +1 -1
  25. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-CFEUsNFV.js → hu-HU-A5ZG7DT2-VTn7BLHk.js} +1 -1
  26. package/dist-embed/chunks/{id-ID-SAP4L64H-DJgKxRp8.js → id-ID-SAP4L64H-DDpkcMxl.js} +1 -1
  27. package/dist-embed/chunks/{index-CaAB7eph.js → index-BnyTIBRs.js} +1 -1
  28. package/dist-embed/chunks/{index-BvYhxJ42.js → index-D4E_ai6G.js} +1 -1
  29. package/dist-embed/chunks/{it-IT-JPQ66NNP-CB1iVsAn.js → it-IT-JPQ66NNP-Dmm1oVBi.js} +1 -1
  30. package/dist-embed/chunks/{ja-JP-DBVTYXUO-BMEokiIe.js → ja-JP-DBVTYXUO-c8yMMjUO.js} +1 -1
  31. package/dist-embed/chunks/{kaa-6HZHGXH3-NDSx8vED.js → kaa-6HZHGXH3-Cr7KlyI3.js} +1 -1
  32. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-CDD0AUe8.js → kab-KAB-ZGHBKWFO-C5lvSze2.js} +1 -1
  33. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DiW940Xv.js → kk-KZ-P5N5QNE5-BWzl0srY.js} +1 -1
  34. package/dist-embed/chunks/{km-KH-HSX4SM5Z-D1yNJSuC.js → km-KH-HSX4SM5Z-D0hsReza.js} +1 -1
  35. package/dist-embed/chunks/{ko-KR-MTYHY66A-gxN7WKqI.js → ko-KR-MTYHY66A-BG6oRC2d.js} +1 -1
  36. package/dist-embed/chunks/{ku-TR-6OUDTVRD-AGx6lASh.js → ku-TR-6OUDTVRD-BcZeKYN4.js} +1 -1
  37. package/dist-embed/chunks/{lt-LT-XHIRWOB4-7aG3WRZ7.js → lt-LT-XHIRWOB4-CDMAwSRa.js} +1 -1
  38. package/dist-embed/chunks/{lv-LV-5QDEKY6T-kYU1Z9N2.js → lv-LV-5QDEKY6T-D2MZFbM-.js} +1 -1
  39. package/dist-embed/chunks/{mr-IN-CRQNXWMA-E1I_f_B2.js → mr-IN-CRQNXWMA-C4tnFlhM.js} +1 -1
  40. package/dist-embed/chunks/{my-MM-5M5IBNSE-BLvme-se.js → my-MM-5M5IBNSE-BeA-YSi-.js} +1 -1
  41. package/dist-embed/chunks/{nb-NO-T6EIAALU-CQe3vLx-.js → nb-NO-T6EIAALU-PoKJfg4d.js} +1 -1
  42. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DQ5lObK-.js → nl-NL-IS3SIHDZ-Cf4_wadm.js} +1 -1
  43. package/dist-embed/chunks/{nn-NO-6E72VCQL-JwOO_c6b.js → nn-NO-6E72VCQL-xgmyjeCA.js} +1 -1
  44. package/dist-embed/chunks/{oc-FR-POXYY2M6-OYZJk3Hj.js → oc-FR-POXYY2M6-CdWNnVCw.js} +1 -1
  45. package/dist-embed/chunks/{pa-IN-N4M65BXN-B7p6nOzS.js → pa-IN-N4M65BXN-QYWCqzud.js} +1 -1
  46. package/dist-embed/chunks/{percentages-BXMCSKIN-Cz9igCrb.js → percentages-BXMCSKIN-azlLrVPY.js} +3 -3
  47. package/dist-embed/chunks/{pl-PL-T2D74RX3-DiIfEp3O.js → pl-PL-T2D74RX3-CR9S6Ibc.js} +1 -1
  48. package/dist-embed/chunks/{pt-BR-5N22H2LF-7rqxomNz.js → pt-BR-5N22H2LF-BdXbK3ya.js} +1 -1
  49. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DE-uZxHk.js → pt-PT-UZXXM6DQ-2XA1j-L3.js} +1 -1
  50. package/dist-embed/chunks/{ro-RO-JPDTUUEW-BlMk-egr.js → ro-RO-JPDTUUEW-BtXn8ZEx.js} +1 -1
  51. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-caVTslk_.js → ru-RU-B4JR7IUQ-CQX4iIyB.js} +1 -1
  52. package/dist-embed/chunks/{si-LK-N5RQ5JYF-DT4Sk0wC.js → si-LK-N5RQ5JYF-HKjZkrpb.js} +1 -1
  53. package/dist-embed/chunks/{sk-SK-C5VTKIMK-DS8_VUwQ.js → sk-SK-C5VTKIMK-D0qjylR3.js} +1 -1
  54. package/dist-embed/chunks/{sl-SI-NN7IZMDC-Dm37QL2T.js → sl-SI-NN7IZMDC-vxztaOUj.js} +1 -1
  55. package/dist-embed/chunks/{subset-shared.chunk-ByorZVMF.js → subset-shared.chunk-DEWjD_XG.js} +1 -1
  56. package/dist-embed/chunks/{subset-worker.chunk-CDbohCL0.js → subset-worker.chunk-DWTibNnY.js} +1 -1
  57. package/dist-embed/chunks/{sv-SE-XGPEYMSR-Ds2_OJfr.js → sv-SE-XGPEYMSR-N-SacX3h.js} +1 -1
  58. package/dist-embed/chunks/{ta-IN-2NMHFXQM-DalALtL3.js → ta-IN-2NMHFXQM-9GMEN3M3.js} +1 -1
  59. package/dist-embed/chunks/{th-TH-HPSO5L25-Db3wq-Mt.js → th-TH-HPSO5L25-CeESdLid.js} +1 -1
  60. package/dist-embed/chunks/{tr-TR-DEFEU3FU-BwZ2BWFh.js → tr-TR-DEFEU3FU-BjBigRhJ.js} +1 -1
  61. package/dist-embed/chunks/transformers.web-Br6X7w0a.js +42 -0
  62. package/dist-embed/chunks/{uk-UA-QMV73CPH-CvvKxEh4.js → uk-UA-QMV73CPH-v4nMobEN.js} +1 -1
  63. package/dist-embed/chunks/{vi-VN-M7AON7JQ-CWecJG5X.js → vi-VN-M7AON7JQ-D5thvMrO.js} +1 -1
  64. package/dist-embed/chunks/{zh-CN-LNUGB5OW-Bt8FQMA4.js → zh-CN-LNUGB5OW-Cn3ae1JT.js} +1 -1
  65. package/dist-embed/chunks/{zh-HK-E62DVLB3-D-aO7Cxy.js → zh-HK-E62DVLB3-OlNuka00.js} +1 -1
  66. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DhGr0I8R.js → zh-TW-RAJ6MFWO-DAwaB-Vu.js} +1 -1
  67. package/dist-embed/datalayer-app-main.js +8 -8
  68. package/lib/apps/apps/checks.d.ts +1 -1
  69. package/lib/apps/apps/checks.js +1 -1
  70. package/lib/apps/apps/computer.d.ts +1 -1
  71. package/lib/apps/apps/computer.js +1 -1
  72. package/lib/apps/apps/pluginPair.d.ts +1 -1
  73. package/lib/apps/apps/rules.d.ts +1 -1
  74. package/lib/apps/apps/rules.js +2 -2
  75. package/lib/apps/apps/visitorToken.d.ts +1 -1
  76. package/lib/apps/apps/visitorToken.js +1 -1
  77. package/lib/apps/core/appFiles.js +1 -1
  78. package/lib/apps/plugins/a2ui-surface/toolResult.d.ts +1 -1
  79. package/lib/apps/plugins/a2ui-surface/toolResult.js +1 -1
  80. package/lib/apps/plugins/app-page/appPageModel.d.ts +1 -1
  81. package/lib/apps/plugins/app-page/appPageModel.js +1 -1
  82. package/lib/components/cards/ToolApprovalCard.js +5 -2
  83. package/lib/portable/hosts/client.d.ts +11 -1
  84. package/lib/portable/hosts/client.js +12 -6
  85. package/lib/portable/hosts/contracts.json +9 -3
  86. package/lib/portable/hosts/index.d.ts +1 -1
  87. package/lib/portable/records.d.ts +1 -1
  88. package/lib/portable/records.js +1 -1
  89. package/lib/portable/semantic-events.json +3 -3
  90. package/lib/portable/semanticOfAgUi.d.ts +1 -1
  91. package/lib/runtimes/variants.d.ts +10 -8
  92. package/lib/runtimes/variants.js +14 -9
  93. package/lib/specs/agents/agents.d.ts +1 -0
  94. package/lib/specs/agents/agents.js +49 -0
  95. package/lib/specs/apps.js +32 -32
  96. package/lib/specs/harnesses.d.ts +1 -0
  97. package/lib/specs/harnesses.js +69 -18
  98. package/lib/specs/index.d.ts +1 -1
  99. package/lib/specs/index.js +1 -1
  100. package/lib/types/agentspecs.d.ts +2 -0
  101. package/package.json +1 -1
  102. package/scripts/codegen/generate_apps.py +1 -1
  103. package/scripts/codegen/generate_harnesses.py +2 -0
  104. package/scripts/validate_pap_examples.py +1 -1
  105. package/dist-embed/chunks/transformers.web-CLaqP_Vm.js +0 -42
@@ -49,7 +49,7 @@ export declare const ORGANIZATION_FRAME_PREFIX = "org-";
49
49
  /** Whether a reference names an organization's own context rather than the catalogue's (U-32). */
50
50
  export declare const isOrganizationFrame: (ref: string) => boolean;
51
51
  /**
52
- * The Guards the runtime executes (agent-runtimes `loop/apps/guards.py`): the
52
+ * The Guards the runtime executes (agent-runtimes `apps/guards.py`): the
53
53
  * three of a session's start, run once before its model is first asked and
54
54
  * each written to the record, and the two of every tool call and the answer.
55
55
  */
@@ -634,7 +634,7 @@ function attentionNotes(app) {
634
634
  return notes;
635
635
  }
636
636
  /**
637
- * The Guards the runtime executes (agent-runtimes `loop/apps/guards.py`): the
637
+ * The Guards the runtime executes (agent-runtimes `apps/guards.py`): the
638
638
  * three of a session's start, run once before its model is first asked and
639
639
  * each written to the record, and the two of every tool call and the answer.
640
640
  */
@@ -16,7 +16,7 @@ import type { ConversationEntry } from '../core';
16
16
  export declare const COMPUTER_PARTS: readonly ["browse", "files", "shell"];
17
17
  export type ComputerPart = (typeof COMPUTER_PARTS)[number];
18
18
  export type ComputerParts = Record<ComputerPart, boolean>;
19
- /** The tools of each part, as the runtime gives them (`loop/apps/computer.py`). */
19
+ /** The tools of each part, as the runtime gives them (`apps/computer.py`). */
20
20
  export declare const COMPUTER_PART_TOOLS: Record<ComputerPart, readonly string[]>;
21
21
  /** What the computer view says. */
22
22
  export declare const COMPUTER_WORDS: {
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /** The parts of a computer, in the order a person reads them. */
6
6
  export const COMPUTER_PARTS = ['browse', 'files', 'shell'];
7
- /** The tools of each part, as the runtime gives them (`loop/apps/computer.py`). */
7
+ /** The tools of each part, as the runtime gives them (`apps/computer.py`). */
8
8
  export const COMPUTER_PART_TOOLS = {
9
9
  browse: [
10
10
  'open_page',
@@ -4,7 +4,7 @@
4
4
  * Whichever editor wrote it — a spec, the Canvas, an `app.py` — an
5
5
  * application is a pair of plugins of one name, `loop-app-<id>`: the page's
6
6
  * (`defineAppPlugin`) and the runtime's (`manifest_of` in
7
- * `agent_runtimes.loop.apps.plugins`, which says the same name). Each
7
+ * `agent_runtimes.apps.plugins`, which says the same name). Each
8
8
  * declares the other: the page's `requiredBackendPlugins`, the runtime's
9
9
  * `frontend_dependencies`; and both are delivered as one extension of that
10
10
  * name, which is how Reactor's manager and graph show them as one
@@ -68,7 +68,7 @@ export declare const strictest: (behaviours: AppBehaviour[]) => AppBehaviour;
68
68
  * A tool of a server the application is not connected to is not given.
69
69
  *
70
70
  * The runtime gives its agent only these (`AppRulesCapability.prepare_tools`,
71
- * through `agent_runtimes.loop.apps.rules.gives`, its Python twin).
71
+ * through `agent_runtimes.apps.rules.gives`, its Python twin).
72
72
  *
73
73
  * @throws When `tool` names no server: a catalogue tool is given by the
74
74
  * spec's `tools`, not by a connection.
@@ -26,7 +26,7 @@
26
26
  * and the most restricted wins.
27
27
  *
28
28
  * The same decision is written in Python, in `agentspecs.apps.behaviour_for`
29
- * and in `agent_runtimes.loop.apps.rules`. `APP_BEHAVIOURS`, generated from
29
+ * and in `agent_runtimes.apps.rules`. `APP_BEHAVIOURS`, generated from
30
30
  * agentspecs, is what all three have to agree on. The server enforces; this
31
31
  * one shows the decision before it is made.
32
32
  *
@@ -217,7 +217,7 @@ const reaches = (connection, tool) => connection.only.length === 0 ||
217
217
  * A tool of a server the application is not connected to is not given.
218
218
  *
219
219
  * The runtime gives its agent only these (`AppRulesCapability.prepare_tools`,
220
- * through `agent_runtimes.loop.apps.rules.gives`, its Python twin).
220
+ * through `agent_runtimes.apps.rules.gives`, its Python twin).
221
221
  *
222
222
  * @throws When `tool` names no server: a catalogue tool is given by the
223
223
  * spec's `tools`, not by a connection.
@@ -35,7 +35,7 @@ export declare function useVisitorToken(visitors: DatalayerVisitors | undefined)
35
35
  };
36
36
  /**
37
37
  * The agent of the visitors' runtime a visitor's token reaches, as the
38
- * runtime names it (`agent_of` in `agent_runtimes.loop.apps.visitors`): an
38
+ * runtime names it (`agent_of` in `agent_runtimes.apps.visitors`): an
39
39
  * example's by its id, an application at its address by `at-<slug>`. The
40
40
  * chat speaks to that agent and to no other: the token reaches no other.
41
41
  *
@@ -118,7 +118,7 @@ const AT_PREFIX = 'at:';
118
118
  const SLUG = /^[a-z0-9][a-z0-9-]{0,99}$/;
119
119
  /**
120
120
  * The agent of the visitors' runtime a visitor's token reaches, as the
121
- * runtime names it (`agent_of` in `agent_runtimes.loop.apps.visitors`): an
121
+ * runtime names it (`agent_of` in `agent_runtimes.apps.visitors`): an
122
122
  * example's by its id, an application at its address by `at-<slug>`. The
123
123
  * chat speaks to that agent and to no other: the token reaches no other.
124
124
  *
@@ -9,7 +9,7 @@
9
9
  * A component its developer wrote may be a file of its folder (`source:
10
10
  * gauge.js`). `loop apps package` puts the folder's files in the
11
11
  * application's wheel, beside a generated page-side plugin
12
- * (`loop-app-<id>/page`, `agent_runtimes/loop/apps/packaging.py`) whose one
12
+ * (`loop-app-<id>/page`, `agent_runtimes/apps/packaging.py`) whose one
13
13
  * contribution is to this point: the address its own directory is served at
14
14
  * by the server the wheel is installed beside. The page installs that plugin
15
15
  * through Reactor's `bootstrapExtensions` (`AppRuntimePlugins`), and a file
@@ -53,7 +53,7 @@ export declare function validateA2uiField(rule: A2uiFieldRule, value: unknown):
53
53
  export declare function validateA2uiSubmission(rules: A2uiFieldRule[], values: Record<string, unknown>): string[];
54
54
  /**
55
55
  * The display type of what an application's answer shows (P-04,
56
- * RU-2): `AnswerShows` in `agent_runtimes.loop.apps.components`.
56
+ * RU-2): `AnswerShows` in `agent_runtimes.apps.components`.
57
57
  */
58
58
  export declare const ANSWER_DISPLAY_TYPE = "application/vnd.datalayer.loop.answer+json";
59
59
  /** A button pressed on what an answer shows, as the chat sends it on. */
@@ -106,7 +106,7 @@ export function validateA2uiSubmission(rules, values) {
106
106
  }
107
107
  /**
108
108
  * The display type of what an application's answer shows (P-04,
109
- * RU-2): `AnswerShows` in `agent_runtimes.loop.apps.components`.
109
+ * RU-2): `AnswerShows` in `agent_runtimes.apps.components`.
110
110
  */
111
111
  export const ANSWER_DISPLAY_TYPE = 'application/vnd.datalayer.loop.answer+json';
112
112
  /** The A2UI surface an answer's display draws, or `null` for a display that has none. */
@@ -124,7 +124,7 @@ export declare function appPageInitialData(app: Pick<AppSpec, 'kind' | 'name' |
124
124
  export declare function inputsInWords(app: Pick<AppSpec, 'interface'>, inputs: unknown): string;
125
125
  /**
126
126
  * The largest file a session takes: what the session API refuses above
127
- * (`agent_runtimes.loop.apps.sessions.MAX_FILE_BYTES`), said here before
127
+ * (`agent_runtimes.apps.sessions.MAX_FILE_BYTES`), said here before
128
128
  * the file is sent.
129
129
  */
130
130
  export declare const MAX_FILE_BYTES: number;
@@ -357,7 +357,7 @@ export function inputsInWords(app, inputs) {
357
357
  }
358
358
  /**
359
359
  * The largest file a session takes: what the session API refuses above
360
- * (`agent_runtimes.loop.apps.sessions.MAX_FILE_BYTES`), said here before
360
+ * (`agent_runtimes.apps.sessions.MAX_FILE_BYTES`), said here before
361
361
  * the file is sent.
362
362
  */
363
363
  export const MAX_FILE_BYTES = 25 * 1024 * 1024;
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  */
6
6
  import { useState } from 'react';
7
7
  import { Button, Label, Text } from '@primer/react';
8
- import { Box } from '@datalayer/primer-addons';
8
+ import { Box, Card } from '@datalayer/primer-addons';
9
9
  import { CheckCircleIcon, ChevronDownIcon, EyeClosedIcon, EyeIcon, TrashIcon, XCircleIcon, } from '@primer/octicons-react';
10
10
  import { formatRelativeTime } from '@datalayer/core/lib/utils/index.js';
11
11
  export const TOOL_APPROVAL_STATUS_CONFIG = {
@@ -43,7 +43,10 @@ export function ToolApprovalCard({ approval, onApprove, onReject, onToggleRead,
43
43
  : approval.status === 'pending'
44
44
  ? ', review pending'
45
45
  : `, ${statusDescriptor}`;
46
- return (_jsx(Box, { p: 3, borderRadius: 2, border: "1px solid", borderColor: isRead ? 'transparent' : 'accent.muted', bg: isRead ? 'canvas.default' : 'accent.subtle', children: _jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: 3, children: [_jsxs(Box, { flex: 1, minWidth: 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 1, flexWrap: "wrap", children: [_jsx(Text, { sx: { fontWeight: 'bold', fontSize: 2 }, children: approval.toolName }), _jsx(Label, { variant: statusConfig.variant, children: statusConfig.label }), _jsx(Label, { variant: riskConfig.variant, children: riskConfig.label }), !isRead && _jsx(Label, { variant: "accent", children: "Unread" })] }), _jsxs(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block' }, children: ["Requested by ", approval.requestedBy, ' ', formatRelativeTime(approval.requestedAt), reviewSummary] }), _jsx(Box, { mt: 2, width: "100%", p: 2, borderRadius: 2, border: "1px solid", borderColor: "border.muted", bg: "canvas.subtle", children: _jsxs("details", { open: isDetailsExpanded, children: [_jsx("summary", { onClick: e => {
46
+ return (
47
+ // primer-addons' Card, as the other pages' rows: an unread request is the
48
+ // selected one (an accent border on an accent wash).
49
+ _jsx(Card, { border: true, shadow: "none", display: "block", p: 3, selected: !isRead, children: _jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: 3, children: [_jsxs(Box, { flex: 1, minWidth: 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 1, flexWrap: "wrap", children: [_jsx(Text, { sx: { fontWeight: 'bold', fontSize: 2 }, children: approval.toolName }), _jsx(Label, { variant: statusConfig.variant, children: statusConfig.label }), _jsx(Label, { variant: riskConfig.variant, children: riskConfig.label }), !isRead && _jsx(Label, { variant: "accent", children: "Unread" })] }), _jsxs(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block' }, children: ["Requested by ", approval.requestedBy, ' ', formatRelativeTime(approval.requestedAt), reviewSummary] }), _jsx(Box, { mt: 2, width: "100%", p: 2, borderRadius: 2, border: "1px solid", borderColor: "border.muted", bg: "canvas.subtle", children: _jsxs("details", { open: isDetailsExpanded, children: [_jsx("summary", { onClick: e => {
47
50
  e.preventDefault();
48
51
  setIsDetailsExpanded(prev => !prev);
49
52
  }, style: {
@@ -35,16 +35,26 @@ export type BoundHost = Readonly<{
35
35
  * with its key in `X-Datalayer-Host-Key`, or as a person, with the host token
36
36
  * the exchange answered. Any host speaks them.
37
37
  */
38
+ /** Which app a host runs as: Datalayer's own, or one the person brought (`custom`). */
39
+ export type HostProvider = 'datalayer' | 'custom';
38
40
  export declare class DatalayerHostClient {
39
41
  #private;
40
42
  readonly apiUrl: string;
41
43
  readonly fetchImplementation: typeof fetch;
42
44
  constructor(apiUrl: string, fetchImplementation?: typeof fetch);
43
- /** Bind the installation its owner set up, with the code their browser carried. */
45
+ /**
46
+ * Bind the installation its owner set up, with the code their browser
47
+ * carried, asserting the app this host runs as: `datalayer` for
48
+ * Datalayer's own app, `custom` with the app's id for one the person
49
+ * brought. Datalayer refuses a provider that is not the one the
50
+ * installation was registered for (409), and a bind without one (422).
51
+ */
44
52
  bind(input: {
45
53
  code: string;
46
54
  externalId: string;
47
55
  name?: string;
56
+ provider: HostProvider;
57
+ customAppId?: string;
48
58
  }): Promise<BoundHost>;
49
59
  /** The installation was removed from its host: it ends at Datalayer (revocation). */
50
60
  uninstalled(hostKey: string): Promise<void>;
@@ -21,11 +21,6 @@ export class HostRefusedError extends Error {
21
21
  this.what = what;
22
22
  }
23
23
  }
24
- /**
25
- * The generic host routes of ai-agents a host calls besides the credential exchange: as the installation,
26
- * with its key in `X-Datalayer-Host-Key`, or as a person, with the host token
27
- * the exchange answered. Any host speaks them.
28
- */
29
24
  export class DatalayerHostClient {
30
25
  apiUrl;
31
26
  fetchImplementation;
@@ -54,13 +49,24 @@ export class DatalayerHostClient {
54
49
  throw new HostRefusedError(response.status, typeof body.detail === 'string' ? body.detail : 'refused', what);
55
50
  return schema.parse(body);
56
51
  }
57
- /** Bind the installation its owner set up, with the code their browser carried. */
52
+ /**
53
+ * Bind the installation its owner set up, with the code their browser
54
+ * carried, asserting the app this host runs as: `datalayer` for
55
+ * Datalayer's own app, `custom` with the app's id for one the person
56
+ * brought. Datalayer refuses a provider that is not the one the
57
+ * installation was registered for (409), and a bind without one (422).
58
+ */
58
59
  async bind(input) {
60
+ if (input.provider === 'custom' && !input.customAppId) {
61
+ throw new Error("A custom app's bind names its app id (customAppId): Datalayer refuses it otherwise.");
62
+ }
59
63
  const bound = await this.#call('Datalayer did not bind the installation', '/apps/hosts/bind', {
60
64
  body: {
61
65
  code: input.code,
62
66
  external_id: input.externalId,
63
67
  name: input.name ?? '',
68
+ provider: input.provider,
69
+ custom_app_id: input.provider === 'custom' ? (input.customAppId ?? '') : '',
64
70
  },
65
71
  method: 'POST',
66
72
  }, bindSchema);
@@ -36,7 +36,9 @@
36
36
  "request": {
37
37
  "code": "dlhc_…",
38
38
  "external_id": "A0123:-:T0123",
39
- "name": "Acme"
39
+ "name": "Acme",
40
+ "provider": "datalayer",
41
+ "custom_app_id": ""
40
42
  },
41
43
  "response_keys": [
42
44
  "success",
@@ -452,7 +454,9 @@
452
454
  "bind_request": {
453
455
  "code": "dlhc_…",
454
456
  "external_id": "123456789012345678:234567890123456789",
455
- "name": "Acme"
457
+ "name": "Acme",
458
+ "provider": "datalayer",
459
+ "custom_app_id": ""
456
460
  },
457
461
  "external_user_id": "567890123456789012",
458
462
  "thread": {
@@ -501,7 +505,9 @@
501
505
  "bind_request": {
502
506
  "code": "dlhc_…",
503
507
  "external_id": "102290129340398:106540352242922",
504
- "name": "Acme"
508
+ "name": "Acme",
509
+ "provider": "custom",
510
+ "custom_app_id": "1234567890"
505
511
  },
506
512
  "external_user_id": "US.13491208655302741918",
507
513
  "external_user_name": "Alice",
@@ -21,7 +21,7 @@ export { AgUiFrames, readRunStream, type AgUiEvent } from '../agui';
21
21
  export * from '../semantic';
22
22
  export { askQuestionOf, semanticOf, turnOf, type TurnInfo, } from '../semanticOfAgUi';
23
23
  export * from './contracts';
24
- export { DatalayerHostClient, HostRefusedError, type BoundHost, type HostSelf, } from './client';
24
+ export { DatalayerHostClient, HostRefusedError, type BoundHost, type HostProvider, type HostSelf, } from './client';
25
25
  export { agUiEventsOf, assertTrustedStreamUrl, DevelopmentCredentials, HostKeyCredentials, hostSessionOf, HostStarters, HttpAgentClient, InstallationCredentials, lastAnswer, type AgentClient, type HostCredentials, type HostKeyLookup, type HostSession, type HostShape, type HostTurnRequest, type Place, type SessionBinder, type Starter, type StarterSource, type TurnProvenance, type TurnStream, } from './agentClient';
26
26
  export { hostSessionUid } from './sessionUid';
27
27
  export { DATALAYER_ONLY, MAIL_WORDS, RENDERERS, renderApproval, type RenderedAction, type RenderedField, } from './approvalRenderers';
@@ -15,7 +15,7 @@ export declare const RUN_END_WORDS: Record<string, string>;
15
15
  /**
16
16
  * The mark around what the runtime tells an application of a turn a personal
17
17
  * agent asked over PAP or PACT, before the request (`asked_for_said`,
18
- * `ASKED_FOR_TAG` in agent_runtimes.loop.apps.pap_company).
18
+ * `ASKED_FOR_TAG` in agent_runtimes.apps.pap_company).
19
19
  */
20
20
  export declare const ASKED_FOR_TAG = "asked-for";
21
21
  /**
@@ -23,7 +23,7 @@ export const RUN_END_WORDS = {
23
23
  /**
24
24
  * The mark around what the runtime tells an application of a turn a personal
25
25
  * agent asked over PAP or PACT, before the request (`asked_for_said`,
26
- * `ASKED_FOR_TAG` in agent_runtimes.loop.apps.pap_company).
26
+ * `ASKED_FOR_TAG` in agent_runtimes.apps.pap_company).
27
27
  */
28
28
  export const ASKED_FOR_TAG = 'asked-for';
29
29
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "about": "The semantic agent events a chat host renders (Slack, Discord: DC-005, S-004, S-205), and the AG-UI events of agent-runtimes' session API (agent_runtimes/routes/apps.py, agent_runtimes/loop/apps/sessions.py, agent_runtimes/loop/apps/external_turns.py) each reduces to. src/portable/semanticOfAgUi.ts reduces every case (src/portable/__tests__/semantic.unit.test.ts); agent_runtimes/tests/test_semantic_events_contract.py holds the cases to what the runtime emits.",
3
+ "about": "The semantic agent events a chat host renders (Slack, Discord: DC-005, S-004, S-205), and the AG-UI events of agent-runtimes' session API (agent_runtimes/routes/apps.py, agent_runtimes/apps/sessions.py, agent_runtimes/apps/external_turns.py) each reduces to. src/portable/semanticOfAgUi.ts reduces every case (src/portable/__tests__/semantic.unit.test.ts); agent_runtimes/tests/test_semantic_events_contract.py holds the cases to what the runtime emits.",
4
4
  "kinds": [
5
5
  "text",
6
6
  "progress",
@@ -23,9 +23,9 @@
23
23
  "table": "a Markdown table in the answer (src/portable/semantic.ts answerParts); no AG-UI event carries one",
24
24
  "file": "none in agent-runtimes 1.5.45: reserved, rendered as a safe HTTPS link when produced",
25
25
  "citation": "an HTTPS Markdown link in the answer (answerParts); no AG-UI event carries one",
26
- "ask": "AG-UI RUN_FINISHED with result.asking (agent_runtimes/loop/apps/sessions.py question_of); the run stream carries no loop.ask event",
26
+ "ask": "AG-UI RUN_FINISHED with result.asking (agent_runtimes/apps/sessions.py question_of); the run stream carries no loop.ask event",
27
27
  "completion": "AG-UI RUN_FINISHED without asking",
28
- "stop": "the host itself, after its own Stop: a stopped session's stream ends without RUN_FINISHED or RUN_ERROR (agent_runtimes/loop/apps/sessions.py stop, _close); no AG-UI event carries it",
28
+ "stop": "the host itself, after its own Stop: a stopped session's stream ends without RUN_FINISHED or RUN_ERROR (agent_runtimes/apps/sessions.py stop, _close); no AG-UI event carries it",
29
29
  "error": "AG-UI RUN_ERROR message",
30
30
  "sign-in": "AG-UI TOOL_CALL_RESULT of pap_sign_in (or pact_sign_in, with or without a gateway prefix) whose result is a sign-in waiting for the person with an https page (src/portable/signIn.ts readPapSignIn), after the tool's complete row; a page that is not https gives the row only"
31
31
  },
@@ -4,7 +4,7 @@
4
4
  * `readRunStream` (`agui.ts`); this says what each event means to a host.
5
5
  *
6
6
  * The runtime's `loop.turn` event says which turn a stream is and where it
7
- * stands (`running`, `finished`, `failed`: agent_runtimes/loop/apps/
7
+ * stands (`running`, `finished`, `failed`: agent_runtimes/apps/
8
8
  * external_turns.py); a stopped session's stream ends without a run end,
9
9
  * so `stop` is never read from an event: the host that pressed Stop says it.
10
10
  * A question is read from `RUN_FINISHED.result.asking` only: the run stream
@@ -36,14 +36,16 @@ export declare const CUSTOM_HARNESS = "custom";
36
36
  * Why no variant runs an agent on this harness, in a sentence, or undefined
37
37
  * when one does.
38
38
  *
39
- * A harness of the catalogue (`agentspecs/harnesses`, SH-01) — Claude
40
- * Code, Codex, Gemini CLI, goose, OpenCode, OpenHands, fast-agent — is served
41
- * by the Datalayer runtime through its ACP adapter (`ACPAgent`, SH-10):
42
- * the runtime launches the harness as its subprocess, so the runtime's
43
- * locations run it and the browser, which has no process to launch, does not.
44
- * Two are refused: `custom`, which names no command in the shared catalogue
45
- * (an organization's own harness spec names it), and a harness neither built
46
- * in nor of the catalogue. Nothing runs such an agent in its place.
39
+ * A harness the catalogue offers (`agentspecs/harnesses`, SH-01) — Claude
40
+ * Code, Codex, OpenCode, pi — is served by the Datalayer runtime
41
+ * through its ACP adapter (`ACPAgent`, SH-10): the runtime launches the
42
+ * harness as its subprocess, so the runtime's locations run it and the
43
+ * browser, which has no process to launch, does not. Three are refused:
44
+ * `custom`, which names no command in the shared catalogue (an
45
+ * organization's own harness spec names it), a harness the catalogue
46
+ * describes and does not offer (its `unavailable_because` is the sentence),
47
+ * and a harness neither built in nor of the catalogue. Nothing runs such an
48
+ * agent in its place.
47
49
  */
48
50
  export declare function unservedHarnessProblem(spec: Pick<Agentspec, 'id' | 'harness'>): string | undefined;
49
51
  /**
@@ -72,14 +72,16 @@ export const CUSTOM_HARNESS = 'custom';
72
72
  * Why no variant runs an agent on this harness, in a sentence, or undefined
73
73
  * when one does.
74
74
  *
75
- * A harness of the catalogue (`agentspecs/harnesses`, SH-01) — Claude
76
- * Code, Codex, Gemini CLI, goose, OpenCode, OpenHands, fast-agent — is served
77
- * by the Datalayer runtime through its ACP adapter (`ACPAgent`, SH-10):
78
- * the runtime launches the harness as its subprocess, so the runtime's
79
- * locations run it and the browser, which has no process to launch, does not.
80
- * Two are refused: `custom`, which names no command in the shared catalogue
81
- * (an organization's own harness spec names it), and a harness neither built
82
- * in nor of the catalogue. Nothing runs such an agent in its place.
75
+ * A harness the catalogue offers (`agentspecs/harnesses`, SH-01) — Claude
76
+ * Code, Codex, OpenCode, pi — is served by the Datalayer runtime
77
+ * through its ACP adapter (`ACPAgent`, SH-10): the runtime launches the
78
+ * harness as its subprocess, so the runtime's locations run it and the
79
+ * browser, which has no process to launch, does not. Three are refused:
80
+ * `custom`, which names no command in the shared catalogue (an
81
+ * organization's own harness spec names it), a harness the catalogue
82
+ * describes and does not offer (its `unavailable_because` is the sentence),
83
+ * and a harness neither built in nor of the catalogue. Nothing runs such an
84
+ * agent in its place.
83
85
  */
84
86
  export function unservedHarnessProblem(spec) {
85
87
  const harness = spec.harness ?? '';
@@ -93,6 +95,9 @@ export function unservedHarnessProblem(spec) {
93
95
  if (harness === CUSTOM_HARNESS) {
94
96
  return `The agent “${spec.id}” runs on the harness “custom”, which names no command: an organization's own harness spec names it, and is never typed into a form.`;
95
97
  }
98
+ if (!catalogued.enabled) {
99
+ return `The agent “${spec.id}” runs on the harness “${harness}” (${catalogued.name}), which is not offered: ${catalogued.unavailable_because}`;
100
+ }
96
101
  return undefined;
97
102
  }
98
103
  /**
@@ -102,7 +107,7 @@ export function unservedHarnessProblem(spec) {
102
107
  export function isServedCatalogueHarness(harness) {
103
108
  return (harness !== CUSTOM_HARNESS &&
104
109
  !(harness in HARNESS_BY_SPEC_HARNESS) &&
105
- getHarness(harness) !== undefined);
110
+ getHarness(harness)?.enabled === true);
106
111
  }
107
112
  const VARIANT_BY_LEGACY_TARGET = {
108
113
  'backend-services': 'cloud-pydanticai',
@@ -48,6 +48,7 @@ export declare const EXAMPLE_HARNESS_GEMINI_CLI_AGENTSPEC_0_0_1: Agentspec;
48
48
  export declare const EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1: Agentspec;
49
49
  export declare const EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1: Agentspec;
50
50
  export declare const EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1: Agentspec;
51
+ export declare const EXAMPLE_HARNESS_PI_AGENTSPEC_0_0_1: Agentspec;
51
52
  export declare const EXAMPLE_HOOKS_AGENTSPEC_0_0_1: Agentspec;
52
53
  export declare const EXAMPLE_HUMAN_APPROVED_AUTOMATION_AGENTSPEC_0_0_1: Agentspec;
53
54
  export declare const EXAMPLE_HUMAN_IN_THE_LOOP_AGENTSPEC_0_0_1: Agentspec;
@@ -2918,6 +2918,54 @@ export const EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1 = {
2918
2918
  parameters: undefined,
2919
2919
  subagents: undefined,
2920
2920
  };
2921
+ export const EXAMPLE_HARNESS_PI_AGENTSPEC_0_0_1 = {
2922
+ id: 'example-harness-pi',
2923
+ version: '0.0.1',
2924
+ name: 'A pi Agent',
2925
+ description: `pi as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.`,
2926
+ tags: ['coding', 'harness', 'acp'],
2927
+ domain: undefined,
2928
+ enabled: false,
2929
+ model: undefined,
2930
+ mcpServers: [],
2931
+ skills: [].filter(Boolean),
2932
+ backendTools: [],
2933
+ frontendTools: [],
2934
+ environmentName: 'ai-agents-env',
2935
+ icon: undefined,
2936
+ emoji: undefined,
2937
+ color: undefined,
2938
+ suggestions: [],
2939
+ welcomeMessage: undefined,
2940
+ welcomeNotebook: undefined,
2941
+ welcomeDocument: undefined,
2942
+ sandboxVariant: 'jupyter-server',
2943
+ harness: 'pi',
2944
+ systemPrompt: undefined,
2945
+ systemPromptCodemodeAddons: undefined,
2946
+ goal: undefined,
2947
+ delegable: [],
2948
+ protocol: undefined,
2949
+ ui: [],
2950
+ protocols: [],
2951
+ trigger: undefined,
2952
+ modelConfig: undefined,
2953
+ mcpServerTools: undefined,
2954
+ guardrails: undefined,
2955
+ evals: undefined,
2956
+ codemode: undefined,
2957
+ output: undefined,
2958
+ advanced: undefined,
2959
+ checkpoints: undefined,
2960
+ authorizationPolicy: undefined,
2961
+ notifications: undefined,
2962
+ memory: 'ephemeral',
2963
+ preHooks: undefined,
2964
+ postHooks: undefined,
2965
+ toolHooks: undefined,
2966
+ parameters: undefined,
2967
+ subagents: undefined,
2968
+ };
2921
2969
  export const EXAMPLE_HOOKS_AGENTSPEC_0_0_1 = {
2922
2970
  id: 'example-hooks',
2923
2971
  version: '0.0.1',
@@ -13858,6 +13906,7 @@ export const AGENTSPECS = {
13858
13906
  'example-harness-goose': EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1,
13859
13907
  'example-harness-opencode': EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1,
13860
13908
  'example-harness-openhands': EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1,
13909
+ 'example-harness-pi': EXAMPLE_HARNESS_PI_AGENTSPEC_0_0_1,
13861
13910
  'example-hooks': EXAMPLE_HOOKS_AGENTSPEC_0_0_1,
13862
13911
  'example-human-approved-automation': EXAMPLE_HUMAN_APPROVED_AUTOMATION_AGENTSPEC_0_0_1,
13863
13912
  'example-human-in-the-loop': EXAMPLE_HUMAN_IN_THE_LOOP_AGENTSPEC_0_0_1,