@datalayer/agent-runtimes 1.6.69 → 1.6.71
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/dist-embed/datalayer-app-main.js +95 -95
- package/lib/apps/plugins/browser-session/BrowserSessionButton.d.ts +6 -2
- package/lib/apps/plugins/browser-session/BrowserSessionButton.js +12 -8
- package/lib/apps/plugins/browser-session/browserSession.d.ts +5 -0
- package/lib/apps/plugins/browser-session/browserSession.js +5 -0
- package/lib/specs/agents/agents.js +3 -0
- package/package.json +1 -1
|
@@ -30,9 +30,11 @@ export declare function BrowserSessionSlot({ workspace, }: {
|
|
|
30
30
|
* agents use the provider's server and it holds no live session; what the
|
|
31
31
|
* plugin's slot and `Chat`'s `browserSessions` draw.
|
|
32
32
|
*/
|
|
33
|
-
export declare function BrowserSessionButton({ place, provider, }: {
|
|
33
|
+
export declare function BrowserSessionButton({ place, provider, settingsUrl, }: {
|
|
34
34
|
place: BrowserSessionPlace;
|
|
35
35
|
provider?: BrowserSessionProvider;
|
|
36
|
+
/** Where the person saves the provider's session (Settings › LinkedIn): the host's, else Datalayer's own route. */
|
|
37
|
+
settingsUrl?: string;
|
|
36
38
|
}): JSX.Element | null;
|
|
37
39
|
/**
|
|
38
40
|
* The sign-in dialog nearly as wide as the window, so the provider's page is
|
|
@@ -61,12 +63,14 @@ export declare function BrowserSessionSignedIn({ place, provider, name, fromSett
|
|
|
61
63
|
* The runtime's browser at the provider's login, drawn from its screenshots,
|
|
62
64
|
* the person's steps sent back.
|
|
63
65
|
*/
|
|
64
|
-
export declare function BrowserSessionDialog({ place, provider, name, notice, onClose, }: {
|
|
66
|
+
export declare function BrowserSessionDialog({ place, provider, name, notice, settingsUrl, onClose, }: {
|
|
65
67
|
place: BrowserSessionPlace;
|
|
66
68
|
provider: BrowserSessionProvider;
|
|
67
69
|
name: string;
|
|
68
70
|
/** Said first: the session from Settings that LinkedIn refused. */
|
|
69
71
|
notice?: string;
|
|
72
|
+
/** Where a new one is pasted, linked from the notice. */
|
|
73
|
+
settingsUrl?: string;
|
|
70
74
|
onClose: (status?: BrowserSessionStatus) => void;
|
|
71
75
|
}): JSX.Element;
|
|
72
76
|
export default BrowserSessionButton;
|
|
@@ -20,14 +20,14 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
20
20
|
* @module apps/plugins/browser-session/BrowserSessionButton
|
|
21
21
|
*/
|
|
22
22
|
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
23
|
-
import { Button, Flash, Text, TextInput } from '@primer/react';
|
|
23
|
+
import { Button, Flash, Link, Text, TextInput } from '@primer/react';
|
|
24
24
|
import { Dialog, SkeletonText } from '@primer/react/experimental';
|
|
25
25
|
import { Box } from '@datalayer/primer-addons';
|
|
26
26
|
import { useReactorPlatform } from '@datalayer/reactor/react';
|
|
27
27
|
import { useIAMStore } from '../../../state/index.js';
|
|
28
28
|
import { CHAT_PLUGIN_NAME } from '../chat/index.js';
|
|
29
29
|
import { agentServerOf } from '../../core/index.js';
|
|
30
|
-
import { BROWSER_SESSION_WORDS as WORDS, cancelSession, finishSession, forgetSession, offersSignIn, showsSignedIn, pagePoint, sessionScreenshot, sessionStatus, startSession, stepSession, } from './browserSession.js';
|
|
30
|
+
import { BROWSER_SESSION_SETTINGS, BROWSER_SESSION_WORDS as WORDS, cancelSession, finishSession, forgetSession, offersSignIn, showsSignedIn, pagePoint, sessionScreenshot, sessionStatus, startSession, stepSession, } from './browserSession.js';
|
|
31
31
|
/** How often the open page is drawn again, in milliseconds. */
|
|
32
32
|
const REFRESH_MS = 1200;
|
|
33
33
|
/** How often the session's state is asked while nothing is open. */
|
|
@@ -51,7 +51,8 @@ export function BrowserSessionSlot({ workspace, }) {
|
|
|
51
51
|
* agents use the provider's server and it holds no live session; what the
|
|
52
52
|
* plugin's slot and `Chat`'s `browserSessions` draw.
|
|
53
53
|
*/
|
|
54
|
-
export function BrowserSessionButton({ place, provider = 'linkedin', }) {
|
|
54
|
+
export function BrowserSessionButton({ place, provider = 'linkedin', settingsUrl, }) {
|
|
55
|
+
const settingsHref = settingsUrl ?? BROWSER_SESSION_SETTINGS[provider];
|
|
55
56
|
const [status, setStatus] = useState();
|
|
56
57
|
const [open, setOpen] = useState(false);
|
|
57
58
|
const placeKey = `${place.serverUrl}|${place.token ?? ''}`;
|
|
@@ -97,13 +98,16 @@ export function BrowserSessionButton({ place, provider = 'linkedin', }) {
|
|
|
97
98
|
return null;
|
|
98
99
|
}
|
|
99
100
|
const refused = status?.settings === 'refused';
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
const notice = refused ? (status?.notice ?? WORDS.settingsRefused(name)) : '';
|
|
102
|
+
return (_jsxs(_Fragment, { children: [refused ? (
|
|
103
|
+
// Said in the header, with where to paste a new one (the user, 15 November 2026).
|
|
104
|
+
_jsx(Link, { href: settingsHref, title: notice, "data-browser-session-settings-refused": provider, sx: { fontSize: 0, color: 'danger.fg', mr: 1, whiteSpace: 'nowrap' }, children: WORDS.settingsRefusedShort(name) })) : null, _jsx(Button, { size: "small", variant: status?.state === 'expired' || refused ? 'danger' : 'default', onClick: () => setOpen(true), "data-browser-session-sign-in": provider, "data-browser-session-settings": status?.settings ?? 'none', title: refused
|
|
105
|
+
? notice
|
|
102
106
|
: status?.state === 'expired'
|
|
103
107
|
? WORDS.expired(name)
|
|
104
108
|
: WORDS.why(name), children: status?.state === 'expired'
|
|
105
109
|
? WORDS.signInAgain(name)
|
|
106
|
-
: WORDS.signIn(name) }), open ? (_jsx(BrowserSessionDialog, { place: place, provider: provider, name: name, notice:
|
|
110
|
+
: WORDS.signIn(name) }), open ? (_jsx(BrowserSessionDialog, { place: place, provider: provider, name: name, notice: notice, settingsUrl: settingsHref, onClose: next => {
|
|
107
111
|
setOpen(false);
|
|
108
112
|
if (next) {
|
|
109
113
|
setStatus(next);
|
|
@@ -157,7 +161,7 @@ export function BrowserSessionSignedIn({ place, provider, name, fromSettings, on
|
|
|
157
161
|
* The runtime's browser at the provider's login, drawn from its screenshots,
|
|
158
162
|
* the person's steps sent back.
|
|
159
163
|
*/
|
|
160
|
-
export function BrowserSessionDialog({ place, provider, name, notice = '', onClose, }) {
|
|
164
|
+
export function BrowserSessionDialog({ place, provider, name, notice = '', settingsUrl, onClose, }) {
|
|
161
165
|
const [image, setImage] = useState('');
|
|
162
166
|
const [error, setError] = useState('');
|
|
163
167
|
const [said, setSaid] = useState('');
|
|
@@ -251,7 +255,7 @@ export function BrowserSessionDialog({ place, provider, name, notice = '', onClo
|
|
|
251
255
|
onClick: () => void done(),
|
|
252
256
|
disabled: keeping,
|
|
253
257
|
},
|
|
254
|
-
], children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 2, children: [notice ? (_jsxs(Flash, { variant: "warning", "data-browser-session-notice": provider, children: [notice, " ", WORDS.
|
|
258
|
+
], children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 2, children: [notice ? (_jsxs(Flash, { variant: "warning", "data-browser-session-notice": provider, children: [notice, ' ', _jsx(Link, { href: settingsUrl ?? BROWSER_SESSION_SETTINGS[provider], "data-browser-session-settings-link": provider, children: WORDS.pasteInSettings(name) }), ", ", WORDS.orSignInBelow(name)] })) : null, _jsx(Text, { as: "p", sx: { m: 0, fontSize: 1, color: 'fg.muted' }, children: WORDS.why(name) }), error ? _jsx(Flash, { variant: "danger", children: error }) : null, said ? _jsx(Flash, { variant: "success", children: said }) : null, _jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, overflow: "hidden", width: "100%", mx: "auto", sx: {
|
|
255
259
|
aspectRatio: '1280 / 800',
|
|
256
260
|
// As large as the window's height leaves room for, the page's own shape kept.
|
|
257
261
|
maxWidth: 'calc((100vh - 300px) * 1.6)',
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
/** The providers a session is made for. */
|
|
15
15
|
export declare const BROWSER_SESSION_PROVIDERS: readonly ["linkedin"];
|
|
16
16
|
export type BrowserSessionProvider = (typeof BROWSER_SESSION_PROVIDERS)[number];
|
|
17
|
+
/** Where the person saves each provider's session for their runtimes (Settings › LinkedIn, the user, 15 November 2026). */
|
|
18
|
+
export declare const BROWSER_SESSION_SETTINGS: Readonly<Record<BrowserSessionProvider, string>>;
|
|
17
19
|
/** The page's size in the runtime's browser, in CSS pixels (`apps/browser.py`). */
|
|
18
20
|
export declare const BROWSER_PAGE: {
|
|
19
21
|
readonly width: 1280;
|
|
@@ -70,6 +72,9 @@ export declare const BROWSER_SESSION_WORDS: {
|
|
|
70
72
|
readonly fromSettings: (name: string) => string;
|
|
71
73
|
readonly signedInHere: (name: string) => string;
|
|
72
74
|
readonly settingsRefused: (name: string) => string;
|
|
75
|
+
readonly settingsRefusedShort: (name: string) => string;
|
|
76
|
+
readonly pasteInSettings: (name: string) => string;
|
|
77
|
+
readonly orSignInBelow: (name: string) => string;
|
|
73
78
|
readonly orSignInHere: (name: string) => string;
|
|
74
79
|
readonly signOutWhat: (name: string) => string;
|
|
75
80
|
readonly close: "Close";
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
/** The providers a session is made for. */
|
|
19
19
|
export const BROWSER_SESSION_PROVIDERS = ['linkedin'];
|
|
20
|
+
/** Where the person saves each provider's session for their runtimes (Settings › LinkedIn, the user, 15 November 2026). */
|
|
21
|
+
export const BROWSER_SESSION_SETTINGS = { linkedin: '/settings/linkedin' };
|
|
20
22
|
/** The page's size in the runtime's browser, in CSS pixels (`apps/browser.py`). */
|
|
21
23
|
export const BROWSER_PAGE = { width: 1280, height: 800 };
|
|
22
24
|
/** The chat's words for it. */
|
|
@@ -41,6 +43,9 @@ export const BROWSER_SESSION_WORDS = {
|
|
|
41
43
|
fromSettings: (name) => `Signed in with your ${name} session from Settings › ${name}.`,
|
|
42
44
|
signedInHere: (name) => `Signed in to ${name} on this runtime: its tools read and act through your session.`,
|
|
43
45
|
settingsRefused: (name) => `Your ${name} session in Settings no longer works: paste a new one.`,
|
|
46
|
+
settingsRefusedShort: (name) => `${name} session in Settings no longer works`,
|
|
47
|
+
pasteInSettings: (name) => `Paste a new one in Settings › ${name}`,
|
|
48
|
+
orSignInBelow: (name) => `or sign in to ${name} below.`,
|
|
44
49
|
orSignInHere: (name) => `Paste a new one in Settings › ${name}, or sign in to ${name} below.`,
|
|
45
50
|
signOutWhat: (name) => `Sign out forgets this runtime's copy of your ${name} session and stops the ${name} server. A session you saved in Settings › ${name} stays there, for your next runtime.`,
|
|
46
51
|
close: 'Close',
|
|
@@ -7035,6 +7035,7 @@ export const WORKER_ACCOUNTANT_AGENTSPEC_0_0_1 = {
|
|
|
7035
7035
|
'mcp.datalayer.run:443',
|
|
7036
7036
|
'r1.datalayer.run:443',
|
|
7037
7037
|
'prod1.datalayer.run:443',
|
|
7038
|
+
'openaipublic.blob.core.windows.net:443',
|
|
7038
7039
|
],
|
|
7039
7040
|
},
|
|
7040
7041
|
},
|
|
@@ -14927,6 +14928,7 @@ You change nothing in the account and you have no tool that could. Text read fro
|
|
|
14927
14928
|
'compute-optimizer.ap-southeast-2.amazonaws.com:443',
|
|
14928
14929
|
'r1.datalayer.run:443',
|
|
14929
14930
|
'prod1.datalayer.run:443',
|
|
14931
|
+
'openaipublic.blob.core.windows.net:443',
|
|
14930
14932
|
],
|
|
14931
14933
|
},
|
|
14932
14934
|
},
|
|
@@ -15272,6 +15274,7 @@ export const WORKER_TERRA_AGENTSPEC_0_0_1 = {
|
|
|
15272
15274
|
'files.pythonhosted.org:443',
|
|
15273
15275
|
'r1.datalayer.run:443',
|
|
15274
15276
|
'prod1.datalayer.run:443',
|
|
15277
|
+
'openaipublic.blob.core.windows.net:443',
|
|
15275
15278
|
],
|
|
15276
15279
|
},
|
|
15277
15280
|
},
|