@datalayer/agent-runtimes 1.3.83 → 1.3.85

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 (168) hide show
  1. package/lib/chat/ChatFloating.d.ts +5 -4
  2. package/lib/chat/ChatFloating.js +8 -6
  3. package/lib/chat/ChatLanguage.d.ts +17 -0
  4. package/lib/chat/ChatLanguage.js +29 -0
  5. package/lib/chat/assistant/AssistantStage.d.ts +4 -4
  6. package/lib/chat/assistant/AssistantStage.js +4 -2
  7. package/lib/chat/assistant/BalloonParts.d.ts +2 -1
  8. package/lib/chat/assistant/BalloonParts.js +12 -5
  9. package/lib/chat/assistant/BalloonVisual.js +3 -1
  10. package/lib/chat/assistant/ConversationBalloon.d.ts +1 -1
  11. package/lib/chat/assistant/ConversationBalloon.js +3 -2
  12. package/lib/chat/assistant/SpeechBalloon.d.ts +1 -1
  13. package/lib/chat/assistant/SpeechBalloon.js +10 -7
  14. package/lib/chat/assistant/toolLine.d.ts +8 -4
  15. package/lib/chat/assistant/toolLine.js +13 -9
  16. package/lib/chat/base/ChatBase.js +30 -11
  17. package/lib/chat/base/loopElement.d.ts +53 -0
  18. package/lib/chat/base/loopElement.js +78 -0
  19. package/lib/chat/base/loopWindow.d.ts +31 -0
  20. package/lib/chat/base/loopWindow.js +74 -0
  21. package/lib/chat/display/EmptyState.js +3 -1
  22. package/lib/chat/index.d.ts +2 -0
  23. package/lib/chat/index.js +3 -0
  24. package/lib/chat/messages/ChatMessages.js +3 -1
  25. package/lib/chat/messages/TurnFooter.js +3 -1
  26. package/lib/chat/prompt/InputPrompt.js +3 -1
  27. package/lib/chat/prompt/InputPromptLexical.js +3 -1
  28. package/lib/chat/prompt/footer/InPromptFooter.js +3 -1
  29. package/lib/chat/tools/ToolApprovalBanner.js +5 -3
  30. package/lib/chat/tools/ToolApprovalDialog.js +5 -3
  31. package/lib/chat/tools/ToolCallDisplay.js +29 -25
  32. package/lib/chat/words.d.ts +102 -0
  33. package/lib/chat/words.js +460 -0
  34. package/lib/components/a2ui/custom/index.d.ts +39 -0
  35. package/lib/components/a2ui/custom/index.js +95 -0
  36. package/lib/components/a2ui/custom/sandbox.d.ts +73 -0
  37. package/lib/components/a2ui/custom/sandbox.js +188 -0
  38. package/lib/components/a2ui/datalayer/FileUpload.d.ts +10 -2
  39. package/lib/components/a2ui/datalayer/FileUpload.js +10 -7
  40. package/lib/components/a2ui/datalayer/Form.d.ts +2 -0
  41. package/lib/components/a2ui/datalayer/Form.js +9 -2
  42. package/lib/components/a2ui/datalayer/formWidgets.d.ts +19 -0
  43. package/lib/components/a2ui/datalayer/formWidgets.js +51 -0
  44. package/lib/components/a2ui/datalayer/index.d.ts +1 -1
  45. package/lib/components/a2ui/datalayer/index.js +1 -1
  46. package/lib/components/a2ui/datalayer/schema.d.ts +10 -0
  47. package/lib/components/a2ui/datalayer/schema.js +12 -1
  48. package/lib/components/a2ui/index.d.ts +1 -0
  49. package/lib/components/a2ui/index.js +1 -0
  50. package/lib/components/a2ui/visibleWhen.d.ts +12 -1
  51. package/lib/components/a2ui/visibleWhen.js +24 -3
  52. package/lib/components/inspector/AgentInspector.d.ts +25 -44
  53. package/lib/components/inspector/AgentInspector.js +27 -215
  54. package/lib/components/inspector/AgentInspectorDialog.d.ts +6 -6
  55. package/lib/components/inspector/AgentInspectorDialog.js +2 -2
  56. package/lib/components/inspector/a2aSpans.d.ts +51 -0
  57. package/lib/components/inspector/a2aSpans.js +373 -0
  58. package/lib/components/inspector/agentSpans.d.ts +120 -0
  59. package/lib/components/inspector/agentSpans.js +253 -0
  60. package/lib/components/inspector/chatSpans.d.ts +36 -0
  61. package/lib/components/inspector/chatSpans.js +50 -0
  62. package/lib/components/inspector/classify.d.ts +11 -8
  63. package/lib/components/inspector/classify.js +23 -24
  64. package/lib/components/inspector/index.d.ts +7 -7
  65. package/lib/components/inspector/index.js +7 -7
  66. package/lib/components/teams/A2ATeamGraph.d.ts +4 -4
  67. package/lib/components/teams/SceneTranscript.d.ts +29 -0
  68. package/lib/components/teams/SceneTranscript.js +54 -0
  69. package/lib/components/teams/SceneView.d.ts +41 -0
  70. package/lib/components/teams/SceneView.js +28 -0
  71. package/lib/components/teams/index.d.ts +3 -0
  72. package/lib/components/teams/index.js +3 -0
  73. package/lib/components/teams/sceneTranscript.d.ts +74 -0
  74. package/lib/components/teams/sceneTranscript.js +294 -0
  75. package/lib/components/teams/teamConnections.d.ts +2 -2
  76. package/lib/components/teams/teamConnections.js +3 -3
  77. package/lib/components/teams/useA2ATeam.d.ts +4 -4
  78. package/lib/components/teams/useA2ATeam.js +50 -46
  79. package/lib/examples/AgentA2ATeamExample.d.ts +10 -9
  80. package/lib/examples/AgentA2ATeamExample.js +70 -60
  81. package/lib/examples/AssistantExample.js +2 -2
  82. package/lib/loop/apps/AppComposer.d.ts +40 -4
  83. package/lib/loop/apps/AppComposer.js +194 -19
  84. package/lib/loop/apps/AppRenderer.d.ts +21 -3
  85. package/lib/loop/apps/AppRenderer.js +88 -48
  86. package/lib/loop/apps/appspec.d.ts +13 -1
  87. package/lib/loop/apps/appspec.js +305 -12
  88. package/lib/loop/apps/checks.d.ts +14 -0
  89. package/lib/loop/apps/checks.js +276 -5
  90. package/lib/loop/apps/composer.d.ts +21 -10
  91. package/lib/loop/apps/composer.js +41 -8
  92. package/lib/loop/apps/customComponents.d.ts +41 -0
  93. package/lib/loop/apps/customComponents.js +260 -0
  94. package/lib/loop/apps/hostTools.d.ts +8 -1
  95. package/lib/loop/apps/hostTools.js +9 -0
  96. package/lib/loop/apps/index.d.ts +1 -0
  97. package/lib/loop/apps/index.js +1 -0
  98. package/lib/loop/apps/language.d.ts +68 -0
  99. package/lib/loop/apps/language.js +275 -0
  100. package/lib/loop/apps/settingsInputs.d.ts +29 -0
  101. package/lib/loop/apps/settingsInputs.js +147 -0
  102. package/lib/loop/apps/uploads.d.ts +43 -0
  103. package/lib/loop/apps/uploads.js +66 -0
  104. package/lib/loop/core/a2uiComponents.d.ts +10 -0
  105. package/lib/loop/core/a2uiComponents.js +15 -0
  106. package/lib/loop/core/index.d.ts +15 -1
  107. package/lib/loop/core/index.js +3 -0
  108. package/lib/loop/embed/AppEmbed.d.ts +25 -3
  109. package/lib/loop/embed/AppEmbed.js +106 -18
  110. package/lib/loop/embed/element.d.ts +5 -0
  111. package/lib/loop/embed/element.js +84 -5
  112. package/lib/loop/embed/embedConfig.d.ts +8 -0
  113. package/lib/loop/embed/embedConfig.js +18 -0
  114. package/lib/loop/embed/embedSession.d.ts +14 -0
  115. package/lib/loop/embed/embedSession.js +34 -0
  116. package/lib/loop/embed/hostBridge.d.ts +50 -3
  117. package/lib/loop/embed/hostBridge.js +22 -2
  118. package/lib/loop/index.d.ts +4 -3
  119. package/lib/loop/index.js +4 -3
  120. package/lib/loop/plugins/a2ui-surface/InlineSurface.d.ts +7 -1
  121. package/lib/loop/plugins/a2ui-surface/InlineSurface.js +7 -2
  122. package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +4 -1
  123. package/lib/loop/plugins/a2ui-surface/ownComponents.d.ts +6 -0
  124. package/lib/loop/plugins/a2ui-surface/ownComponents.js +30 -0
  125. package/lib/loop/plugins/app-components/index.d.ts +26 -0
  126. package/lib/loop/plugins/app-components/index.js +56 -0
  127. package/lib/loop/plugins/app-elements/AppElements.d.ts +27 -0
  128. package/lib/loop/plugins/app-elements/AppElements.js +79 -0
  129. package/lib/loop/plugins/app-elements/index.d.ts +20 -0
  130. package/lib/loop/plugins/app-elements/index.js +43 -0
  131. package/lib/loop/plugins/app-page/AppPage.d.ts +9 -0
  132. package/lib/loop/plugins/app-page/AppPage.js +106 -8
  133. package/lib/loop/plugins/app-page/appPageModel.d.ts +17 -1
  134. package/lib/loop/plugins/app-page/appPageModel.js +122 -4
  135. package/lib/loop/plugins/app-page/index.d.ts +1 -0
  136. package/lib/loop/plugins/app-page/index.js +1 -0
  137. package/lib/loop/plugins/app-page/pageRun.d.ts +46 -0
  138. package/lib/loop/plugins/app-page/pageRun.js +111 -0
  139. package/lib/loop/plugins/assistant/index.js +8 -6
  140. package/lib/loop/plugins/chat/ChatView.js +16 -6
  141. package/lib/loop/plugins/chat/index.d.ts +1 -1
  142. package/lib/loop/plugins/chat/index.js +2 -1
  143. package/lib/models/PageTag.d.ts +1 -1
  144. package/lib/protocols/BrowserAgentAdapter.d.ts +8 -6
  145. package/lib/protocols/BrowserAgentAdapter.js +13 -10
  146. package/lib/runtimes/browser/a2aPeer.d.ts +2 -1
  147. package/lib/runtimes/browser/protocol.d.ts +1 -1
  148. package/lib/specs/actions.js +78 -1
  149. package/lib/specs/apps.d.ts +5 -0
  150. package/lib/specs/apps.js +1518 -216
  151. package/lib/specs/appspecSchema.js +630 -3
  152. package/lib/specs/teams/teams.d.ts +3 -0
  153. package/lib/specs/teams/teams.js +249 -0
  154. package/lib/specs/uiPlugins.js +6 -1
  155. package/lib/types/agentspecs.d.ts +200 -1
  156. package/lib/types/chat.d.ts +6 -5
  157. package/lib/types/teams.d.ts +13 -2
  158. package/package.json +2 -2
  159. package/scripts/codegen/generate_apps.py +20 -2
  160. package/scripts/codegen/generate_teams.py +15 -2
  161. package/lib/components/inspector/JsonTree.d.ts +0 -24
  162. package/lib/components/inspector/JsonTree.js +0 -89
  163. package/lib/components/inspector/a2aInspect.d.ts +0 -56
  164. package/lib/components/inspector/a2aInspect.js +0 -478
  165. package/lib/components/inspector/agentInspector.d.ts +0 -179
  166. package/lib/components/inspector/agentInspector.js +0 -267
  167. package/lib/components/inspector/chatInspect.d.ts +0 -38
  168. package/lib/components/inspector/chatInspect.js +0 -65
@@ -33,6 +33,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
33
33
  * address and embedded;
34
34
  * - its **frame**, when the host asks (`frame`): the `window-frame` plugin's
35
35
  * window, its title the application's face and name;
36
+ * - its **language** (LOOP P-26): what a person reads of it — its name,
37
+ * welcome, starters, settings, commands, modes and profiles — in the first
38
+ * language they prefer that its Appspec is translated into (`language`,
39
+ * else the browser's), its own words otherwise (`translatedAppspec`);
40
+ * what it does is the same in every language;
36
41
  * - its **sidebar**, when the host asks (`sidebar`, R-01b): its rules and
37
42
  * the approvals waiting for the person (`app-rules`), what it did
38
43
  * (`app-activity`), and its computer, live (`app-computer`, R-23), beside
@@ -52,14 +57,18 @@ import { CANVAS_BLOCK_PLUGINS, canvasBlocksPluginName, } from '../plugins/canvas
52
57
  import { LoopEmbed } from '../embed/LoopEmbed';
53
58
  import { dumpAppspec } from './appspec';
54
59
  import { defineAppActivityPlugin } from '../plugins/app-activity';
60
+ import { AppElementsPlugin } from '../plugins/app-elements';
61
+ import { defineAppComponentsPlugin, hasCustomComponents, } from '../plugins/app-components';
55
62
  import { defineAppComputerPlugin } from '../plugins/app-computer';
56
63
  import { defineAppRulesPlugin } from '../plugins/app-rules';
57
- import { defineAppComposerPlugin } from './AppComposer';
64
+ import { defineAppComposerPlugin, needsAppComposer, startersAsOpeners, } from './AppComposer';
58
65
  import { modeEffect } from './composer';
66
+ import { preferredLanguages, translatedAppspec } from './language';
59
67
  import { defineAppFeedbackPlugin } from './AppFeedback';
60
68
  import { defineAppKeptPlugin } from './AppKept';
61
69
  import { keepsFeedback } from './feedback';
62
70
  import { keptBeforeFirstMessage } from './kept';
71
+ import { ChatLanguage } from '../../chat/ChatLanguage';
63
72
  /** The id of an agent or a Cog, without its version. */
64
73
  export const agentIdOf = (app) => {
65
74
  const reference = app.agent || app.team;
@@ -80,14 +89,16 @@ export const agentIdOf = (app) => {
80
89
  * An application run by a team is not supported in the workspace yet: a team
81
90
  * is not an agent spec, and is refused here rather than launched as one.
82
91
  */
83
- export function defineAppPlugin(app) {
92
+ export function defineAppPlugin(app, shown = app) {
84
93
  if (!app.agent) {
85
94
  throw new Error(`“${app.name}” is run by a team, which the workspace does not run as an application yet.`);
86
95
  }
87
96
  return defineAgentCapacityPlugin({
88
97
  key: `app-${app.id}`,
89
- displayName: app.name,
90
- description: app.description || `The ${app.name} application`,
98
+ // What a person reads is in their language (P-26); what it is created
99
+ // with is its own Appspec.
100
+ displayName: shown.name,
101
+ description: shown.description || `The ${shown.name} application`,
91
102
  specId: agentIdOf(app),
92
103
  emoji: app.emoji,
93
104
  createPayload: {
@@ -98,21 +109,21 @@ export function defineAppPlugin(app) {
98
109
  enable_codemode: Boolean(app.permissions?.computer?.shell),
99
110
  ...(app.model ? { model: app.model } : {}),
100
111
  },
101
- suggestions: app.interface.starters.map(starter => ({
102
- text: starter.label,
103
- message: starter.message,
104
- })),
112
+ // Its starters, each under its category (P-20); with profiles, the
113
+ // composer offers the profile's in their place.
114
+ suggestions: startersAsOpeners(shown.interface.starters),
105
115
  // In the page, the agent is told what a runtime tells it: its own
106
116
  // spec's prompt, then the application's instructions; on the
107
117
  // application's model when it names one (`loop/apps/agent`).
108
118
  instructions: app.instructions,
109
119
  model: app.model,
110
- // Its modes (LOOP P-19), as the session API applies them: the
111
- // instructions of the options chosen and the model one names, for the
112
- // run they are sent with.
113
- ...((app.interface.modes ?? []).length > 0
120
+ // Its modes and its profiles (LOOP P-19, P-20), as the session API
121
+ // applies them: the profile's instructions and those of the options
122
+ // chosen, and the model one names, for the run they are sent with.
123
+ ...((app.interface.modes ?? []).length > 0 ||
124
+ (app.interface.profiles ?? []).length > 0
114
125
  ? {
115
- modeEffect: (chosen) => modeEffect(app, chosen),
126
+ modeEffect: (chosen, profile) => modeEffect(app, chosen, profile),
116
127
  }
117
128
  : {}),
118
129
  });
@@ -157,7 +168,9 @@ export function appLayoutOptions(app) {
157
168
  * but those of the UI plugins its organization turned off (`pluginsOff`),
158
169
  * whose contributions are the blocks it may draw (R-01b); a thumb and a
159
170
  * comment on each answer when its record keeps feedback (V-18); its
160
- * commands in the composer's `/` menu and its modes beside it (P-19); what it
171
+ * commands in the composer's `/` menu and its modes beside it (P-19); the
172
+ * side panel and the pages its code opens (`app-elements`, P-18); the
173
+ * components its developer wrote (`app-components`, P-17); what it
161
174
  * keeps and for how long, under its prompt before the first message, when
162
175
  * `kept` says it (R-31); with
163
176
  * `sidebar`, its rules and approvals card, its activity feed and its
@@ -185,19 +198,21 @@ export function appPreset(app, options = {}) {
185
198
  };
186
199
  }
187
200
  const withPage = hasAppPage(app);
201
+ const shown = options.shown ?? app;
188
202
  // The blocks its Canvas offers: those of the UI plugins not turned off.
189
203
  const off = new Set((options.pluginsOff ?? []).map(canvasBlocksPluginName));
190
204
  const blocks = CANVAS_BLOCK_PLUGINS.filter(plugin => !off.has(plugin.name));
191
205
  return {
192
206
  plugins: [
193
- defineAppPlugin(app),
194
- ...(withPage ? [defineAppPagePlugin(app), ...blocks] : []),
195
- // Its commands in the composer's `/` menu and its modes beside the
196
- // composer (LOOP P-19): only for an application that has some.
197
- ...((app.interface.commands ?? []).length > 0 ||
198
- (app.interface.modes ?? []).length > 0
199
- ? [defineAppComposerPlugin(app)]
200
- : []),
207
+ defineAppPlugin(app, shown),
208
+ ...(withPage ? [defineAppPagePlugin(shown), ...blocks] : []),
209
+ // The components its developer wrote (LOOP P-17): blocks of its page
210
+ // and renderers of its page, its elements and its answers — its own.
211
+ ...(hasCustomComponents(app) ? [defineAppComponentsPlugin(app)] : []),
212
+ // Its commands in the composer's `/` menu, its modes and its profiles
213
+ // beside the composer (LOOP P-19, P-20) and what a person may attach
214
+ // there (P-21): only for an application that has some.
215
+ ...(needsAppComposer(app) ? [defineAppComposerPlugin(shown)] : []),
201
216
  // A thumb and a comment on each answer, kept in its record (LOOP
202
217
  // V-18): only for an application whose record keeps feedback.
203
218
  ...(keepsFeedback(app) ? [defineAppFeedbackPlugin(app)] : []),
@@ -217,6 +232,9 @@ export function appPreset(app, options = {}) {
217
232
  : options.computer
218
233
  ? [defineAppComputerPlugin(app)]
219
234
  : []),
235
+ // What its code opens beside the conversation (LOOP P-18): a side
236
+ // panel, a page of its own; nothing drawn while nothing is open.
237
+ AppElementsPlugin,
220
238
  ],
221
239
  workspace: appLayoutOptions(app),
222
240
  };
@@ -281,7 +299,7 @@ export function appThemeOverrides(app, variant) {
281
299
  }
282
300
  : undefined;
283
301
  }
284
- export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, onSaying, paused = false, sidebar = false, computer = false, frame = false, page, pluginsOff, ...embed }) {
302
+ export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, onSaying, paused = false, sidebar = false, computer = false, frame = false, page, pluginsOff, language, ...embed }) {
285
303
  /*
286
304
  * The kind's plugins, made once per application. `LoopEmbed` rebuilds its
287
305
  * whole reactor when its plugins change, so a new plugin on every render
@@ -290,6 +308,14 @@ export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, o
290
308
  */
291
309
  const source = JSON.stringify(dumpAppspec(app));
292
310
  const off = [...(pluginsOff ?? [])].sort().join(',');
311
+ /*
312
+ * What the person reads, in their language (P-26): the host's, else the
313
+ * browser's. Read once per language: a new one is a new workspace.
314
+ */
315
+ const preferred = (language ? [language] : preferredLanguages()).join(',');
316
+ const shown = useMemo(() => translatedAppspec(app, preferred.split(',').filter(Boolean)),
317
+ // eslint-disable-next-line react-hooks/exhaustive-deps
318
+ [source, preferred]);
293
319
  /*
294
320
  * What it keeps, said before the first message (R-31): run as a
295
321
  * deployment — at its address, embedded — and not in its builder's
@@ -305,6 +331,7 @@ export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, o
305
331
  sidebar,
306
332
  computer,
307
333
  appUid: instance?.appUid,
334
+ shown,
308
335
  ...(deployed ? { kept: { visitor } } : {}),
309
336
  });
310
337
  }
@@ -315,7 +342,17 @@ export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, o
315
342
  }
316
343
  },
317
344
  // eslint-disable-next-line react-hooks/exhaustive-deps
318
- [source, page, off, sidebar, computer, instance?.appUid, deployed, visitor]);
345
+ [
346
+ source,
347
+ shown,
348
+ page,
349
+ off,
350
+ sidebar,
351
+ computer,
352
+ instance?.appUid,
353
+ deployed,
354
+ visitor,
355
+ ]);
319
356
  const allPlugins = useMemo(() => ('problem' in preset ? plugins : [...preset.plugins, ...plugins]), [preset, plugins]);
320
357
  /*
321
358
  * On Datalayer, the application runs on a runtime: allocated with a plain
@@ -354,31 +391,34 @@ export function AppRenderer({ app, plugins = NO_PLUGINS, instance, onPresence, o
354
391
  if ('problem' in preset) {
355
392
  return (_jsx("div", { role: "status", style: { padding: 16 }, children: preset.problem }));
356
393
  }
357
- return (_jsx(LoopEmbed
358
- // The application's own agent: created under its id, so that its
359
- // spec is applied to an agent of its own, never to the one it extends.
360
- , {
394
+ return (
395
+ // The chat's own words in the person's language too (P-26): the host's,
396
+ // else the browser's.
397
+ _jsx(ChatLanguage, { language: language, children: _jsx(LoopEmbed
361
398
  // The application's own agent: created under its id, so that its
362
399
  // spec is applied to an agent of its own, never to the one it extends.
363
- agentId: app.id, ...preset.workspace, ...(frame
364
- ? {
365
- frameTitle: [app.emoji, app.name].filter(Boolean).join(' '),
366
- }
367
- : {}),
368
- // Its rules, activity and computer on a rail, one at a time (T-07).
369
- sidebarRail: sidebar || computer, teamPicker: false, showAgentVariants: false, graph: false, pluginsPanel: false, datalayerAgentSpecId: DATALAYER_BOOTSTRAP_AGENTSPEC,
370
- // Where an application runs is decided by its host — the Studio's
371
- // Preview, the hosted page — not offered to its user.
372
- targetFixed: true, ...(named ? { themeVariant: named.variant } : {}), ...(namedMode ? { colorMode: namedMode } : {}), themeOverrides: themeOverrides,
373
- // Its own face, name and welcome in the chat (T-08); no counters: a
374
- // person using an application is not asking about tokens.
375
- presence: {
376
- name: app.name,
377
- face: app.emoji,
378
- welcome: app.interface.welcome || app.description,
379
- paused,
380
- onPresence,
381
- onSaying,
382
- }, showTokenUsage: false, datalayerCreatePayload: datalayerCreatePayload, ...embed, plugins: allPlugins }));
400
+ , {
401
+ // The application's own agent: created under its id, so that its
402
+ // spec is applied to an agent of its own, never to the one it extends.
403
+ agentId: app.id, ...preset.workspace, ...(frame
404
+ ? {
405
+ frameTitle: [app.emoji, shown.name].filter(Boolean).join(' '),
406
+ }
407
+ : {}),
408
+ // Its rules, activity and computer on a rail, one at a time (T-07).
409
+ sidebarRail: sidebar || computer, teamPicker: false, showAgentVariants: false, graph: false, pluginsPanel: false, datalayerAgentSpecId: DATALAYER_BOOTSTRAP_AGENTSPEC,
410
+ // Where an application runs is decided by its host — the Studio's
411
+ // Preview, the hosted page — not offered to its user.
412
+ targetFixed: true, ...(named ? { themeVariant: named.variant } : {}), ...(namedMode ? { colorMode: namedMode } : {}), themeOverrides: themeOverrides,
413
+ // Its own face, name and welcome in the chat (T-08); no counters: a
414
+ // person using an application is not asking about tokens.
415
+ presence: {
416
+ name: shown.name,
417
+ face: app.emoji,
418
+ welcome: shown.interface.welcome || shown.description,
419
+ paused,
420
+ onPresence,
421
+ onSaying,
422
+ }, showTokenUsage: false, datalayerCreatePayload: datalayerCreatePayload, ...embed, plugins: allPlugins }) }));
383
423
  }
384
424
  export default AppRenderer;
@@ -24,9 +24,11 @@
24
24
  *
25
25
  * @module loop/apps/appspec
26
26
  */
27
- import type { AppAccent, AppThemeMode, AppThemeVariant, AppAssistantCharacter, AppEmbedMode, AppVoiceSpec, AppKind, AppLayout, AppSpec } from '../../types/agentspecs';
27
+ import type { AppAccent, AppThemeMode, AppThemeVariant, AppAssistantCharacter, AppEmbedMode, AppCustomComponentSpec, AppVoiceSpec, AppKind, AppLayout, AppPageOutputComponent, AppSpec } from '../../types/agentspecs';
28
28
  /** The version of the spec itself. */
29
29
  export declare const APP_SCHEMA = "loop.app/v1";
30
+ /** The language an application's own words are in, unless it says (LOOP P-26). */
31
+ export declare const DEFAULT_LANGUAGE = "en";
30
32
  /** The face of an application that has not chosen one. */
31
33
  export declare const DEFAULT_EMOJI = "\uD83D\uDC40";
32
34
  export declare const APP_KINDS: AppKind[];
@@ -60,6 +62,16 @@ export declare function retentionDays(keepFor: string): number;
60
62
  export declare function emptyAppspec(kind?: AppKind): AppSpec;
61
63
  /** An application's voice (VOICE.md VO-41): off unless said. */
62
64
  export declare const DEFAULT_VOICE: AppVoiceSpec;
65
+ /** What a page's output may be drawn with (LOOP P-05), and the property of each that shows its value. */
66
+ export declare const PAGE_OUTPUT_SHOWS: Record<AppPageOutputComponent, string>;
67
+ /** The height of a component its developer wrote (P-17), unless it says. */
68
+ export declare const DEFAULT_CUSTOM_HEIGHT = 240;
69
+ /**
70
+ * The property a page's output fills with its value (P-05): a catalog
71
+ * component's (`PAGE_OUTPUT_SHOWS`), or what a component of the
72
+ * application's own shows first (P-17). Undefined for any other.
73
+ */
74
+ export declare function pageOutputShows(component: string, own?: readonly AppCustomComponentSpec[]): string | undefined;
63
75
  /** What reading a document gives: the application, and what the document got wrong. */
64
76
  export interface ParsedAppspec {
65
77
  app: AppSpec;