@datalayer/agent-runtimes 1.5.115 → 1.5.118
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 +44 -44
- package/lib/api/runtimes/runtimes.d.ts +5 -0
- package/lib/apps/apps/appspec.js +4 -0
- package/lib/examples/pap/PapAgentIdentityView.js +0 -1
- package/lib/examples/pap/PapCompanyDiscoveryView.js +5 -4
- package/lib/examples/pap/PapGuidedJourneyView.js +31 -17
- package/lib/examples/pap/PapSessionLifecycleView.js +1 -1
- package/lib/examples/pap/traces/account-tokens.json +54 -30
- package/lib/examples/pap/traces/conversation-control.json +171 -220
- package/lib/examples/pap/traces/conversation-streaming.json +66 -44
- package/lib/examples/pap/traces/mediated-sign-in.json +54 -30
- package/lib/examples/pap/traces/operations.json +174 -223
- package/lib/examples/pap/traces/two-companies.json +252 -306
- package/lib/examples/pap/traces/user-with-a-company.json +159 -162
- package/lib/hooks/useCheckpoints.d.ts +2 -0
- package/lib/pap/index.d.ts +8 -0
- package/lib/pap/index.js +3 -6
- package/lib/portable/direct.d.ts +9 -3
- package/lib/portable/direct.js +9 -4
- package/lib/specs/apps.js +16 -0
- package/lib/specs/appspecSchema.js +13 -1
- package/lib/specs/battles.js +6 -6
- package/lib/specs/protocols.js +1 -1
- package/lib/types/agentspecs.d.ts +10 -0
- package/package.json +2 -2
- package/scripts/codegen/generate_apps.py +2 -0
package/lib/portable/direct.d.ts
CHANGED
|
@@ -29,12 +29,18 @@ export type DirectReply = {
|
|
|
29
29
|
from: 'agent' | 'human';
|
|
30
30
|
name?: string;
|
|
31
31
|
};
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* What the company answered, and where the conversation stands: PAP draft 0.4's four
|
|
34
|
+
* fields (§8.7) — whether it is working, whether it looks for a person (`handoff`), who
|
|
35
|
+
* answers, whether it is closed.
|
|
36
|
+
*/
|
|
33
37
|
export type DirectAnswer = {
|
|
34
38
|
directConversation: string;
|
|
35
39
|
replies: DirectReply[];
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
working: boolean;
|
|
41
|
+
handoff: 'none' | 'pending';
|
|
42
|
+
responder: 'agent' | 'human';
|
|
43
|
+
closed: boolean;
|
|
38
44
|
cursor: string;
|
|
39
45
|
/** The `PapReplies` display, when the company wrote anything. */
|
|
40
46
|
display: unknown;
|
package/lib/portable/direct.js
CHANGED
|
@@ -40,7 +40,10 @@ export function directAnswerOf(raw, company) {
|
|
|
40
40
|
if (!data ||
|
|
41
41
|
typeof data.direct_conversation !== 'string' ||
|
|
42
42
|
!Array.isArray(replies) ||
|
|
43
|
-
typeof data.
|
|
43
|
+
typeof data.working !== 'boolean' ||
|
|
44
|
+
typeof data.closed !== 'boolean' ||
|
|
45
|
+
(data.handoff !== 'none' && data.handoff !== 'pending') ||
|
|
46
|
+
(data.responder !== 'agent' && data.responder !== 'human') ||
|
|
44
47
|
replies.some(reply => !reply ||
|
|
45
48
|
typeof reply.text !== 'string' ||
|
|
46
49
|
(reply.from !== 'agent' &&
|
|
@@ -56,8 +59,10 @@ export function directAnswerOf(raw, company) {
|
|
|
56
59
|
? { name: reply.name.trim() }
|
|
57
60
|
: {}),
|
|
58
61
|
})),
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
working: data.working,
|
|
63
|
+
handoff: data.handoff,
|
|
64
|
+
responder: data.responder,
|
|
65
|
+
closed: data.closed,
|
|
61
66
|
cursor: typeof data.cursor === 'string' ? data.cursor : '',
|
|
62
67
|
display: data.display ?? null,
|
|
63
68
|
};
|
|
@@ -168,7 +173,7 @@ export function withDirectAnswer(open, answer, mine) {
|
|
|
168
173
|
})),
|
|
169
174
|
],
|
|
170
175
|
cursor: answer.cursor || open.cursor,
|
|
171
|
-
closed: answer.
|
|
176
|
+
closed: answer.closed,
|
|
172
177
|
};
|
|
173
178
|
}
|
|
174
179
|
/** Who wrote a line, said apart: the person, the company's agent, one of its people. */
|
package/lib/specs/apps.js
CHANGED
|
@@ -226,6 +226,8 @@ export const BOOKKEEPING_DESK_APP_0_0_3 = {
|
|
|
226
226
|
enabled: true,
|
|
227
227
|
signedOut: false,
|
|
228
228
|
signInDisabled: false,
|
|
229
|
+
webUnscoped: false,
|
|
230
|
+
webDisabled: false,
|
|
229
231
|
publishSkills: false,
|
|
230
232
|
interfaces: ['agent'],
|
|
231
233
|
scopes: [
|
|
@@ -2030,6 +2032,8 @@ export const EXCHANGE_DESK_APP_0_0_3 = {
|
|
|
2030
2032
|
enabled: true,
|
|
2031
2033
|
signedOut: true,
|
|
2032
2034
|
signInDisabled: false,
|
|
2035
|
+
webUnscoped: false,
|
|
2036
|
+
webDisabled: false,
|
|
2033
2037
|
publishSkills: false,
|
|
2034
2038
|
interfaces: ['agent', 'openapi'],
|
|
2035
2039
|
scopes: [
|
|
@@ -2565,6 +2569,8 @@ export const LIVE_SHOP_CHAT_APP_0_0_2 = {
|
|
|
2565
2569
|
enabled: false,
|
|
2566
2570
|
signedOut: true,
|
|
2567
2571
|
signInDisabled: false,
|
|
2572
|
+
webUnscoped: false,
|
|
2573
|
+
webDisabled: false,
|
|
2568
2574
|
publishSkills: false,
|
|
2569
2575
|
interfaces: ['agent'],
|
|
2570
2576
|
scopes: [],
|
|
@@ -3360,6 +3366,8 @@ export const ORDER_DESK_APP_0_0_2 = {
|
|
|
3360
3366
|
enabled: false,
|
|
3361
3367
|
signedOut: true,
|
|
3362
3368
|
signInDisabled: false,
|
|
3369
|
+
webUnscoped: false,
|
|
3370
|
+
webDisabled: false,
|
|
3363
3371
|
publishSkills: false,
|
|
3364
3372
|
interfaces: ['agent'],
|
|
3365
3373
|
scopes: [],
|
|
@@ -3541,6 +3549,8 @@ export const ORDER_TRACKER_APP_0_0_2 = {
|
|
|
3541
3549
|
enabled: false,
|
|
3542
3550
|
signedOut: true,
|
|
3543
3551
|
signInDisabled: false,
|
|
3552
|
+
webUnscoped: false,
|
|
3553
|
+
webDisabled: false,
|
|
3544
3554
|
publishSkills: false,
|
|
3545
3555
|
interfaces: ['agent'],
|
|
3546
3556
|
scopes: [],
|
|
@@ -4704,6 +4714,8 @@ export const RETURNS_DESK_APP_0_0_2 = {
|
|
|
4704
4714
|
enabled: false,
|
|
4705
4715
|
signedOut: true,
|
|
4706
4716
|
signInDisabled: false,
|
|
4717
|
+
webUnscoped: false,
|
|
4718
|
+
webDisabled: false,
|
|
4707
4719
|
publishSkills: false,
|
|
4708
4720
|
interfaces: ['agent'],
|
|
4709
4721
|
scopes: [],
|
|
@@ -5355,6 +5367,8 @@ export const SHOP_CONCIERGE_APP_0_0_2 = {
|
|
|
5355
5367
|
enabled: false,
|
|
5356
5368
|
signedOut: true,
|
|
5357
5369
|
signInDisabled: false,
|
|
5370
|
+
webUnscoped: false,
|
|
5371
|
+
webDisabled: false,
|
|
5358
5372
|
publishSkills: false,
|
|
5359
5373
|
interfaces: ['agent'],
|
|
5360
5374
|
scopes: [],
|
|
@@ -5702,6 +5716,8 @@ export const SIGN_IN_DESK_APP_0_0_2 = {
|
|
|
5702
5716
|
enabled: false,
|
|
5703
5717
|
signedOut: true,
|
|
5704
5718
|
signInDisabled: false,
|
|
5719
|
+
webUnscoped: false,
|
|
5720
|
+
webDisabled: false,
|
|
5705
5721
|
publishSkills: false,
|
|
5706
5722
|
interfaces: ['agent'],
|
|
5707
5723
|
scopes: [],
|
|
@@ -1212,7 +1212,7 @@ export const APPSPEC_SCHEMA = {
|
|
|
1212
1212
|
},
|
|
1213
1213
|
AppPapCompany: {
|
|
1214
1214
|
additionalProperties: false,
|
|
1215
|
-
description: "The application is a company personal agents work with.\n\nPublished at PAP 0.3 as published: the application's `avatar` is served to personal agents\nas the company's logo (`organization.logo_uri`), and `sign_in_disabled` turns sign-in off\nfor them (`auth.disabled`), the company then answering them signed out only.",
|
|
1215
|
+
description: "The application is a company personal agents work with.\n\nPublished at PAP 0.3 as published: the application's `avatar` is served to personal agents\nas the company's logo (`organization.logo_uri`), and `sign_in_disabled` turns sign-in off\nfor them (`auth.disabled`), the company then answering them signed out only. At PAP draft 0.4\nits website says two things of itself (§6): `web_unscoped`, a browser signed in for the person\nhas everything the account can do there (`web.unscoped`), and `web_disabled`, personal agents\nare asked to use its agent and APIs rather than its website (`web.disabled`). The protocol\nversions it serves are the platform's, never an Appspec's.",
|
|
1216
1216
|
properties: {
|
|
1217
1217
|
enabled: {
|
|
1218
1218
|
default: false,
|
|
@@ -1232,6 +1232,18 @@ export const APPSPEC_SCHEMA = {
|
|
|
1232
1232
|
title: 'Sign In Disabled',
|
|
1233
1233
|
type: 'boolean',
|
|
1234
1234
|
},
|
|
1235
|
+
web_unscoped: {
|
|
1236
|
+
default: false,
|
|
1237
|
+
description: 'Whether a browser signed in for the person on its website has everything the account can do there, not only what the person approved (`web.unscoped`, PAP draft 0.4 §6): the person is told so when they sign in. Needs the `web` interface',
|
|
1238
|
+
title: 'Web Unscoped',
|
|
1239
|
+
type: 'boolean',
|
|
1240
|
+
},
|
|
1241
|
+
web_disabled: {
|
|
1242
|
+
default: false,
|
|
1243
|
+
description: 'Whether it asks personal agents not to use its website, but its agent and APIs (`web.disabled`, PAP draft 0.4 §6): a preference, not enforced. It then lists no `web` interface, and offers `agent` or `openapi`',
|
|
1244
|
+
title: 'Web Disabled',
|
|
1245
|
+
type: 'boolean',
|
|
1246
|
+
},
|
|
1235
1247
|
publish_skills: {
|
|
1236
1248
|
default: false,
|
|
1237
1249
|
description: "Whether it publishes the application's skills to personal agents as a `skill_index` (PAP 0.3 §9.4, the pinned Agent Skills revision): only the skills whose SKILL.md says it is public and that need no secret are listed, Company content granting no access",
|
package/lib/specs/battles.js
CHANGED
|
@@ -49,7 +49,7 @@ export const DECK_RACE_BATTLE_0_0_1 = {
|
|
|
49
49
|
eval: 'llm-judge:0.0.1',
|
|
50
50
|
config: {
|
|
51
51
|
threshold: 0.7,
|
|
52
|
-
rubric: 'The
|
|
52
|
+
rubric: 'The deck in the arena has a title and at least three slides on the brief: why the newsletter helps, what goes in it, who writes what, and a closing call to sign up.',
|
|
53
53
|
},
|
|
54
54
|
says: 'It built the deck the brief asked for.',
|
|
55
55
|
},
|
|
@@ -110,7 +110,7 @@ export const INVADERS_BATTLE_0_0_1 = {
|
|
|
110
110
|
eval: 'llm-judge:0.0.1',
|
|
111
111
|
config: {
|
|
112
112
|
threshold: 0.6,
|
|
113
|
-
rubric: 'The player watched the arena, moved its cannon under the
|
|
113
|
+
rubric: 'The player watched the arena (arena_watch or arena_read), moved its cannon under the invaders and fired, and its cannon was not hit by a bomb it had been warned of.',
|
|
114
114
|
},
|
|
115
115
|
says: 'The player played the arena, not around it.',
|
|
116
116
|
},
|
|
@@ -170,7 +170,7 @@ export const INVOICE_RACE_BATTLE_0_0_1 = {
|
|
|
170
170
|
eval: 'llm-judge:0.0.1',
|
|
171
171
|
config: {
|
|
172
172
|
threshold: 0.7,
|
|
173
|
-
rubric:
|
|
173
|
+
rubric: "The answer lists the customer invoices still open, each named, and gives the total due as one figure; each invoice comes from what the run read from the books, as its members' tool calls and answers show.",
|
|
174
174
|
},
|
|
175
175
|
says: 'It listed the open invoices and a total, as the goal asked.',
|
|
176
176
|
},
|
|
@@ -231,7 +231,7 @@ export const PONG_BATTLE_0_0_1 = {
|
|
|
231
231
|
eval: 'llm-judge:0.0.1',
|
|
232
232
|
config: {
|
|
233
233
|
threshold: 0.6,
|
|
234
|
-
rubric: 'The player watched the arena, moved its paddle
|
|
234
|
+
rubric: 'The player watched the arena (arena_watch or arena_read), moved its paddle as the ball came and served when the serve was its own; its tool calls and moves show it played rather than idled.',
|
|
235
235
|
},
|
|
236
236
|
says: 'The player played the arena, not around it.',
|
|
237
237
|
},
|
|
@@ -284,7 +284,7 @@ export const REPORT_CHALLENGE_BATTLE_0_0_1 = {
|
|
|
284
284
|
eval: 'llm-judge:0.0.1',
|
|
285
285
|
config: {
|
|
286
286
|
threshold: 0.7,
|
|
287
|
-
rubric: 'The summary
|
|
287
|
+
rubric: 'The summary says where the close stands, what is to book and what is still open, with figures the run read from the books, as its tool calls show; where it could not check a figure, it says so.',
|
|
288
288
|
},
|
|
289
289
|
says: 'The summary is complete and grounded.',
|
|
290
290
|
},
|
|
@@ -347,7 +347,7 @@ export const SHEET_RACE_BATTLE_0_0_1 = {
|
|
|
347
347
|
eval: 'llm-judge:0.0.1',
|
|
348
348
|
config: {
|
|
349
349
|
threshold: 0.7,
|
|
350
|
-
rubric: 'The
|
|
350
|
+
rubric: 'The sheet in the arena holds a header row, a row per day from Monday to Sunday with the loaves and the revenue, a totals row computed by formulas, and a chart of the revenue by day.',
|
|
351
351
|
},
|
|
352
352
|
says: 'It filled the sheet the brief asked for, chart included.',
|
|
353
353
|
},
|
package/lib/specs/protocols.js
CHANGED
|
@@ -114,7 +114,7 @@ export const PAP_PROTOCOL_0_0_1 = {
|
|
|
114
114
|
publisher: 'Sierra, Meta',
|
|
115
115
|
layer: 'consent',
|
|
116
116
|
specUrl: 'https://personalagentprotocol.org',
|
|
117
|
-
specVersion: 'draft 0.
|
|
117
|
+
specVersion: 'draft 0.4',
|
|
118
118
|
status: 'shipped',
|
|
119
119
|
connects: "Companies, as a person's agent there, or being one",
|
|
120
120
|
packages: {
|
|
@@ -960,6 +960,16 @@ export interface AppPapCompanySpec {
|
|
|
960
960
|
* platform decides at Ship (D4-06).
|
|
961
961
|
*/
|
|
962
962
|
publishSkills: boolean;
|
|
963
|
+
/**
|
|
964
|
+
* Whether a browser signed in for the person on its website has everything
|
|
965
|
+
* the account can do there (PAP `web.unscoped`, draft 0.4 §6; D5-09).
|
|
966
|
+
*/
|
|
967
|
+
webUnscoped: boolean;
|
|
968
|
+
/**
|
|
969
|
+
* Whether it asks personal agents to use its agent and APIs rather than its
|
|
970
|
+
* website (PAP `web.disabled`, draft 0.4 §6; D5-09).
|
|
971
|
+
*/
|
|
972
|
+
webDisabled: boolean;
|
|
963
973
|
interfaces: PapInterface[];
|
|
964
974
|
/** The scopes it offers, each with what it allows and its hints. */
|
|
965
975
|
scopes: AppPapCompanyScopeSpec[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.118",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"@datalayer/lexical-loro": "^1.0.6",
|
|
165
165
|
"@datalayer/primer-addons": "^1.0.46",
|
|
166
166
|
"@datalayer/primer-rjsf": "^1.0.3",
|
|
167
|
-
"@datalayer/personal-agent-protocol": "^0.
|
|
167
|
+
"@datalayer/personal-agent-protocol": "^0.32.0",
|
|
168
168
|
"@datalayer/reactor": "^1.3.5",
|
|
169
169
|
"@datalayer/reactor-commands": "^1.0.4",
|
|
170
170
|
"@datalayer/reactor-manager": "^1.0.4",
|
|
@@ -61,6 +61,8 @@ CAMEL = {
|
|
|
61
61
|
"signed_out": "signedOut",
|
|
62
62
|
"sign_in_disabled": "signInDisabled",
|
|
63
63
|
"publish_skills": "publishSkills",
|
|
64
|
+
"web_unscoped": "webUnscoped",
|
|
65
|
+
"web_disabled": "webDisabled",
|
|
64
66
|
"personal_agents": "personalAgents",
|
|
65
67
|
"registered_agents": "registeredAgents",
|
|
66
68
|
# Its company scopes' hints and excluded tasks (PAP draft 0.3).
|