@datalayer/agent-runtimes 1.3.39 → 1.3.42
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.
- package/lib/chat/ChatFloating.d.ts +30 -1
- package/lib/chat/ChatFloating.js +60 -14
- package/lib/chat/presence/Presence.d.ts +9 -0
- package/lib/chat/presence/Presence.js +11 -2
- package/lib/loop/apps/AppRenderer.d.ts +30 -6
- package/lib/loop/apps/AppRenderer.js +29 -8
- package/lib/loop/apps/index.d.ts +1 -0
- package/lib/loop/apps/index.js +1 -0
- package/lib/loop/apps/records.d.ts +42 -0
- package/lib/loop/apps/records.js +81 -0
- package/lib/loop/apps/rules.d.ts +13 -0
- package/lib/loop/apps/rules.js +36 -0
- package/lib/loop/embed/AppEmbed.d.ts +2 -0
- package/lib/loop/embed/AppEmbed.js +47 -119
- package/lib/loop/embed/LoopEmbed.js +1 -0
- package/lib/loop/index.d.ts +2 -0
- package/lib/loop/index.js +2 -0
- package/lib/loop/plugins/app-activity/AppActivity.d.ts +21 -0
- package/lib/loop/plugins/app-activity/AppActivity.js +63 -0
- package/lib/loop/plugins/app-activity/index.d.ts +11 -0
- package/lib/loop/plugins/app-activity/index.js +35 -0
- package/lib/loop/plugins/app-rules/AppRulesCard.d.ts +40 -0
- package/lib/loop/plugins/app-rules/AppRulesCard.js +50 -0
- package/lib/loop/plugins/app-rules/index.d.ts +7 -0
- package/lib/loop/plugins/app-rules/index.js +31 -0
- package/lib/loop/plugins/chat/ChatView.js +33 -4
- package/lib/loop/plugins/chat/index.d.ts +23 -0
- package/lib/loop/presets.d.ts +2 -0
- package/lib/loop/presets.js +2 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PresenceState } from '../../../chat/presence/presenceStatus';
|
|
2
|
+
import type { AssistantSaying } from '../../../chat/assistant/state';
|
|
2
3
|
import type { ThemeOverrides } from '../../../types/chat';
|
|
3
4
|
/** What a host may set on the chat. */
|
|
4
5
|
/** Who is answering, as the person meets them. */
|
|
@@ -15,7 +16,22 @@ export interface ChatPresence {
|
|
|
15
16
|
* a state setter.
|
|
16
17
|
*/
|
|
17
18
|
onPresence?: (state: PresenceState) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Told what it last said, and whether its newest words are an answer, as
|
|
21
|
+
* they change — for a host that says them outside the conversation, as the
|
|
22
|
+
* embed's floating chrome does in its balloon and its blink (LOOP R-01).
|
|
23
|
+
* Read once, when the workspace is built: pass a stable function, such as
|
|
24
|
+
* a state setter.
|
|
25
|
+
*/
|
|
26
|
+
onSaying?: (said: ChatSaid) => void;
|
|
18
27
|
}
|
|
28
|
+
/** What the chat last said, as `onSaying` tells it. */
|
|
29
|
+
export type ChatSaid = {
|
|
30
|
+
/** The newest words of the agent, cut for a balloon. */
|
|
31
|
+
saying?: AssistantSaying;
|
|
32
|
+
/** Whether the newest item of the conversation is the agent's answer. */
|
|
33
|
+
answering: boolean;
|
|
34
|
+
};
|
|
19
35
|
export type ChatPluginConfig = {
|
|
20
36
|
/**
|
|
21
37
|
* The theme the conversation wears, by name: the person's unless said. An
|
|
@@ -28,6 +44,13 @@ export type ChatPluginConfig = {
|
|
|
28
44
|
* that its bubbles and its one button wear its colour and not the theme's.
|
|
29
45
|
*/
|
|
30
46
|
themeOverrides?: ThemeOverrides;
|
|
47
|
+
/**
|
|
48
|
+
* The mode the conversation is drawn in, when its host decides it — an
|
|
49
|
+
* embed in another product's page, whose mode is the host's or its
|
|
50
|
+
* visitor's system's, not the person's Datalayer setting. The person's
|
|
51
|
+
* unless said.
|
|
52
|
+
*/
|
|
53
|
+
colorMode?: 'light' | 'dark';
|
|
31
54
|
/**
|
|
32
55
|
* Who is answering, as the person meets them (LOOP T-08): a name, a face
|
|
33
56
|
* and a welcome, in place of the agent's id and a generic icon. An
|
package/lib/loop/presets.d.ts
CHANGED
|
@@ -143,6 +143,8 @@ export type LoopPresetOptions = {
|
|
|
143
143
|
themeVariant?: string;
|
|
144
144
|
/** Laid over that theme, by mode: an application's accent (LOOP T-05). */
|
|
145
145
|
themeOverrides?: ThemeOverrides;
|
|
146
|
+
/** The mode the conversation is drawn in, when the host decides it; the person's unless said. */
|
|
147
|
+
colorMode?: 'light' | 'dark';
|
|
146
148
|
/** Who is answering, as the person meets them (LOOP T-08). */
|
|
147
149
|
presence?: ChatPresence;
|
|
148
150
|
/** Whether the counters are shown under the prompt; on unless said. */
|
package/lib/loop/presets.js
CHANGED
|
@@ -52,7 +52,7 @@ import { LoopPageLayoutPlugin } from './plugins/page-layout';
|
|
|
52
52
|
* be installed or signed into, and the switches a demonstration wants are off.
|
|
53
53
|
*/
|
|
54
54
|
export function loopPlugins(options = {}) {
|
|
55
|
-
const { serverUrl, target = 'browser', defaultEditor: askedEditor, showViewSelector = true, hideChatHeader = false, chatHeaderButtons = false, promptPlacement, autoFocusPrompt = true, suggestionLabels = true, fullScreenTopOffset = 0, showAgentVariants = false, agentSummary = true, teamId, teamPicker = true, pageLayout = false, pageLayoutArrangement = 'page', pageLayoutTurnPanel = 'below', pageLayoutPrompt = 'docked', pageLayoutPromptAnchor = 'top', pageLayoutSize, pageLayoutTurnPanelFooter = 'full', localAgent, localAgentSpec, datalayerAgentSpecId, datalayerCreatePayload, targetFixed, themeVariant, themeOverrides, presence, showTokenUsage, floatingPrompt = false, editorSelector = false, editors = true, conversation = true, graph = false, commandPalette = false, pluginsPanel = false, windowFrame = false, firstPromptHook, } = options;
|
|
55
|
+
const { serverUrl, target = 'browser', defaultEditor: askedEditor, showViewSelector = true, hideChatHeader = false, chatHeaderButtons = false, promptPlacement, autoFocusPrompt = true, suggestionLabels = true, fullScreenTopOffset = 0, showAgentVariants = false, agentSummary = true, teamId, teamPicker = true, pageLayout = false, pageLayoutArrangement = 'page', pageLayoutTurnPanel = 'below', pageLayoutPrompt = 'docked', pageLayoutPromptAnchor = 'top', pageLayoutSize, pageLayoutTurnPanelFooter = 'full', localAgent, localAgentSpec, datalayerAgentSpecId, datalayerCreatePayload, targetFixed, themeVariant, themeOverrides, colorMode, presence, showTokenUsage, floatingPrompt = false, editorSelector = false, editors = true, conversation = true, graph = false, commandPalette = false, pluginsPanel = false, windowFrame = false, firstPromptHook, } = options;
|
|
56
56
|
const defaultEditor = askedEditor ?? (editors ? 'notebook' : 'none');
|
|
57
57
|
// A workspace without a conversation: the theme, the shell's points, and
|
|
58
58
|
// the host's chrome; its view is a host's plugin's.
|
|
@@ -86,6 +86,7 @@ export function loopPlugins(options = {}) {
|
|
|
86
86
|
fullScreenTopOffset,
|
|
87
87
|
themeVariant,
|
|
88
88
|
themeOverrides,
|
|
89
|
+
colorMode,
|
|
89
90
|
presence,
|
|
90
91
|
showTokenUsage,
|
|
91
92
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"@ai-sdk/react": "4.0.93",
|
|
146
146
|
"@anthropic-ai/sdk": "^0.52.0",
|
|
147
147
|
"@datalayer/agent-teams": "^1.0.0",
|
|
148
|
-
"@datalayer/core": "^1.2.
|
|
148
|
+
"@datalayer/core": "^1.2.14",
|
|
149
149
|
"@datalayer/decks": "^1.0.4",
|
|
150
150
|
"@datalayer/icons-react": "^1.0.14",
|
|
151
151
|
"@datalayer/jupyter-lexical": "^2.0.18",
|