@datalayer/agent-runtimes 1.5.95 → 1.5.97
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/chunks/{index.esm-zOy6kFPv.js → index.esm-BLDeC6q1.js} +1 -1
- package/dist-embed/datalayer-app-main.js +80 -80
- package/lib/apps/apps/appspec.d.ts +11 -12
- package/lib/apps/apps/appspec.js +45 -87
- package/lib/components/cards/ToolApprovalCard.js +4 -2
- package/lib/components/inspector/a2aSpans.d.ts +7 -0
- package/lib/components/inspector/a2aSpans.js +34 -2
- package/lib/components/inspector/agentSpans.d.ts +1 -1
- package/lib/components/inspector/agentSpans.js +1 -0
- package/lib/components/teams/HarnessIcon.d.ts +11 -0
- package/lib/components/teams/HarnessIcon.js +17 -0
- package/lib/components/teams/SceneTranscript.d.ts +1 -1
- package/lib/components/teams/SceneTranscript.js +12 -7
- package/lib/components/teams/SceneView.d.ts +7 -1
- package/lib/components/teams/SceneView.js +2 -2
- package/lib/components/teams/backdrops/hero.js +1 -1
- package/lib/components/teams/backdrops/minimal.js +1 -1
- package/lib/components/teams/backdrops/nodes.js +4 -3
- package/lib/components/teams/backdrops/space.js +1 -1
- package/lib/components/teams/backdrops/types.d.ts +9 -0
- package/lib/components/teams/index.d.ts +2 -0
- package/lib/components/teams/index.js +2 -0
- package/lib/components/teams/memberHarness.d.ts +16 -0
- package/lib/components/teams/memberHarness.js +42 -0
- package/lib/components/teams/sceneTranscriptRules.js +6 -1
- package/lib/components/teams/transcript/LineSelect.d.ts +20 -0
- package/lib/components/teams/transcript/LineSelect.js +20 -0
- package/lib/components/teams/transcript/TranscriptTable.d.ts +11 -5
- package/lib/components/teams/transcript/TranscriptTable.js +24 -7
- package/lib/components/teams/transcript/TranscriptViews.js +1 -1
- package/lib/components/teams/transcript/recordingPlayback.d.ts +13 -0
- package/lib/components/teams/transcript/recordingPlayback.js +32 -0
- package/lib/components/teams/transcript/useSceneRecording.d.ts +1 -1
- package/lib/components/teams/transcript/useSceneRecording.js +19 -11
- package/lib/examples/PapAccountTokensExample.d.ts +1 -1
- package/lib/examples/PapAccountTokensExample.js +3 -3
- package/lib/examples/PapSessionJwtExample.d.ts +4 -0
- package/lib/examples/{PapDpopProofExample.js → PapSessionJwtExample.js} +9 -9
- package/lib/examples/PapSessionLifecycleExample.d.ts +1 -1
- package/lib/examples/PapSessionLifecycleExample.js +2 -2
- package/lib/examples/ScenesExample.js +15 -13
- package/lib/examples/example-selector.js +3 -3
- package/lib/examples/index.d.ts +1 -1
- package/lib/examples/index.js +1 -1
- package/lib/examples/main.js +1 -1
- package/lib/examples/pap/PapAccountTokensView.d.ts +1 -1
- package/lib/examples/pap/PapAuthorizationBoundaryView.js +15 -22
- package/lib/examples/pap/PapGuidedJourneyView.js +61 -60
- package/lib/examples/pap/PapSessionJwtView.d.ts +4 -0
- package/lib/examples/pap/PapSessionJwtView.js +69 -0
- package/lib/examples/pap/PapSessionLifecycleView.js +36 -58
- package/lib/examples/pap/PapSignInDisplayView.d.ts +1 -1
- package/lib/examples/pap/PapSignInDisplayView.js +1 -1
- package/lib/examples/pap/PapTraceView.d.ts +1 -1
- package/lib/examples/pap/PapTraceView.js +1 -1
- package/lib/examples/pap/traces/account-tokens.json +145 -173
- package/lib/examples/pap/traces/conversation-control.json +118 -140
- package/lib/examples/pap/traces/conversation-streaming.json +114 -134
- package/lib/examples/pap/traces/mediated-sign-in.json +151 -166
- package/lib/examples/pap/traces/operations.json +613 -391
- package/lib/examples/pap/traces/two-companies.json +380 -990
- package/lib/examples/pap/traces/user-with-a-company.json +319 -207
- package/lib/models/environments.generated.d.ts +2 -2
- package/lib/models/environments.generated.js +1 -1
- package/lib/pap/index.d.ts +1 -1
- package/lib/pap/index.js +3 -3
- package/lib/portable/displays.d.ts +13 -22
- package/lib/portable/displays.js +17 -65
- package/lib/portable/hosts/approvalRenderers.d.ts +4 -4
- package/lib/portable/hosts/approvalRenderers.js +26 -13
- package/lib/portable/hosts/contracts.json +5 -2
- package/lib/portable/index.d.ts +1 -1
- package/lib/portable/index.js +1 -1
- package/lib/protocols/decks/index.d.ts +37 -0
- package/lib/protocols/decks/index.js +48 -0
- package/lib/protocols/decks/pact-a-personal-agent-at-a-business.d.ts +2 -0
- package/lib/protocols/decks/pact-a-personal-agent-at-a-business.js +148 -0
- package/lib/protocols/decks/ucp-a-purchase-approved.d.ts +2 -0
- package/lib/protocols/decks/ucp-a-purchase-approved.js +154 -0
- package/lib/specs/actions.d.ts +1 -1
- package/lib/specs/actions.js +2 -2
- package/lib/specs/agents/agents.js +3 -3
- package/lib/specs/apps.d.ts +1 -1
- package/lib/specs/apps.js +10 -11
- package/lib/specs/appspecSchema.js +4 -112
- package/lib/specs/envvars.js +2 -2
- package/lib/specs/harnesses.js +9 -9
- package/lib/specs/scenes.js +10 -33
- package/lib/specs/teams/teams.js +2 -2
- package/lib/types/agentspecs.d.ts +91 -127
- package/package.json +409 -409
- package/scripts/codegen/generate_apps.py +6 -7
- package/scripts/validate_pap_examples.py +1 -1
- package/lib/examples/PapDpopProofExample.d.ts +0 -4
- package/lib/examples/pap/PapDpopProofView.d.ts +0 -4
- package/lib/examples/pap/PapDpopProofView.js +0 -61
|
@@ -61,7 +61,6 @@ CAMEL = {
|
|
|
61
61
|
"signed_out": "signedOut",
|
|
62
62
|
"personal_agents": "personalAgents",
|
|
63
63
|
"registered_agents": "registeredAgents",
|
|
64
|
-
"user_approval_required": "userApprovalRequired",
|
|
65
64
|
# Its company scopes' hints and excluded tasks (PAP draft 0.3).
|
|
66
65
|
"personal_data": "personalData",
|
|
67
66
|
"excluded_tasks": "excludedTasks",
|
|
@@ -176,7 +175,7 @@ def load_specs(specs_dir: Path) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
|
176
175
|
mode="json", by_alias=True
|
|
177
176
|
):
|
|
178
177
|
spec.pop("pap")
|
|
179
|
-
# PACT, commerce, signed fetch and A2A's extensions the same way
|
|
178
|
+
# PACT, commerce, signed fetch and A2A's extensions the same way.
|
|
180
179
|
for block in ("pact", "commerce", "signed_fetch", "a2a"):
|
|
181
180
|
if block in spec and spec[block] == type(getattr(app, block))().model_dump(
|
|
182
181
|
mode="json", by_alias=True
|
|
@@ -219,14 +218,14 @@ def load_specs(specs_dir: Path) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
|
219
218
|
},
|
|
220
219
|
# What an argument makes it do besides.
|
|
221
220
|
"conditions": {name: found for name, found in conditions.items() if found},
|
|
222
|
-
# The argument carrying what it sends, signed with the byline
|
|
221
|
+
# The argument carrying what it sends, signed with the byline.
|
|
223
222
|
"signs": {
|
|
224
223
|
name: signs
|
|
225
224
|
for name in names
|
|
226
225
|
if (signs := actions_module.server_tool_signs(server, name))
|
|
227
226
|
},
|
|
228
227
|
}
|
|
229
|
-
# The agent protocols' tools
|
|
228
|
+
# The agent protocols' tools: by protocol, the
|
|
230
229
|
# connection prefix its connections take and what each tool can do.
|
|
231
230
|
protocols = {
|
|
232
231
|
identity: {
|
|
@@ -476,7 +475,7 @@ def generate_actions_python_code(actions: dict[str, Any]) -> str:
|
|
|
476
475
|
"}",
|
|
477
476
|
"",
|
|
478
477
|
"#: What each agent protocol's tools do, by protocol id: the prefix its",
|
|
479
|
-
"#: connections take (`pap:<domain>`) and each tool's classes
|
|
478
|
+
"#: connections take (`pap:<domain>`) and each tool's classes.",
|
|
480
479
|
f"PROTOCOL_TOOL_CLASSES: Dict[str, Dict[str, Any]] = {actions['protocols']!r}",
|
|
481
480
|
"",
|
|
482
481
|
"#: What each application of the catalogue does about each classed tool of the",
|
|
@@ -532,7 +531,7 @@ def generate_actions_typescript_code(actions: dict[str, Any]) -> str:
|
|
|
532
531
|
"",
|
|
533
532
|
"/**",
|
|
534
533
|
" * What each agent protocol's tools do, by protocol id: the prefix its",
|
|
535
|
-
" * connections take (`pap:<domain>`) and each tool's classes
|
|
534
|
+
" * connections take (`pap:<domain>`) and each tool's classes.",
|
|
536
535
|
" */",
|
|
537
536
|
"export const PROTOCOL_TOOL_CLASSES: Record<",
|
|
538
537
|
" string,",
|
|
@@ -573,7 +572,7 @@ def _drop_nulls(value: Any) -> Any:
|
|
|
573
572
|
|
|
574
573
|
|
|
575
574
|
def generate_schema_typescript_code() -> str:
|
|
576
|
-
"""The Appspec's JSON Schema, for the editors of the page
|
|
575
|
+
"""The Appspec's JSON Schema, for the editors of the page.
|
|
577
576
|
|
|
578
577
|
Taken from the agentspecs the catalogue is generated from, so that what
|
|
579
578
|
an editor completes and explains is what the spec accepts.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
import { Box } from '@datalayer/primer-addons';
|
|
8
|
-
import { Button, Text } from '@primer/react';
|
|
9
|
-
import { InMemorySessionKeys, JoseDpopProofProvider, SecretValue, } from '@datalayer/personal-agent-protocol';
|
|
10
|
-
import { PapExamplePage, PapResult } from './PapExamplePage.js';
|
|
11
|
-
/** Create real device-held proofs while retaining only non-secret evidence. */
|
|
12
|
-
const PapDpopProofView = () => {
|
|
13
|
-
const [summary, setSummary] = useState(null);
|
|
14
|
-
const [error, setError] = useState(null);
|
|
15
|
-
const createProofs = async () => {
|
|
16
|
-
setError(null);
|
|
17
|
-
try {
|
|
18
|
-
// A P-256 key per Session, the Session Key, kept in this host (draft 0.3 §4.3).
|
|
19
|
-
const provider = new JoseDpopProofProvider({
|
|
20
|
-
keys: new InMemorySessionKeys(),
|
|
21
|
-
});
|
|
22
|
-
const where = {
|
|
23
|
-
tenantId: 'example-tenant',
|
|
24
|
-
issuer: 'https://company.example',
|
|
25
|
-
};
|
|
26
|
-
const sessionKey = await provider.newSessionKey(where);
|
|
27
|
-
const otherSessionKey = await provider.newSessionKey(where);
|
|
28
|
-
const request = {
|
|
29
|
-
method: 'POST',
|
|
30
|
-
url: 'https://api.company.example/orders?draft=true#editor',
|
|
31
|
-
...where,
|
|
32
|
-
sessionKey,
|
|
33
|
-
accessToken: new SecretValue('host-only-example-token'),
|
|
34
|
-
nonce: 'host-only-company-nonce',
|
|
35
|
-
};
|
|
36
|
-
const first = await provider.create(request);
|
|
37
|
-
const second = await provider.create(request);
|
|
38
|
-
await provider.discardSessionKey({ ...where, sessionKey });
|
|
39
|
-
const discardedKeyRefused = await provider.create(request).then(() => false, () => true);
|
|
40
|
-
setSummary({
|
|
41
|
-
algorithm: 'ES256',
|
|
42
|
-
freshProofPerRequest: first.reveal() !== second.reveal(),
|
|
43
|
-
methodBound: true,
|
|
44
|
-
urlBoundWithoutQueryOrFragment: true,
|
|
45
|
-
accessTokenBound: true,
|
|
46
|
-
nonceIncluded: true,
|
|
47
|
-
proofRedactedByDefault: first.toJSON() === '[REDACTED]',
|
|
48
|
-
oneKeyPerSession: sessionKey !== otherSessionKey,
|
|
49
|
-
discardedKeyRefused,
|
|
50
|
-
proofWithheldFromUiState: true,
|
|
51
|
-
keyMaterialWithheldFromUiState: true,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
catch (cause) {
|
|
55
|
-
setSummary(null);
|
|
56
|
-
setError(cause instanceof Error ? cause.message : String(cause));
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
return (_jsxs(PapExamplePage, { eyebrow: "PAP \u00B7 DPoP", title: "Create a fresh proof for every protected request", description: "This Reactor view creates non-exportable P-256 key material and real DPoP proofs in the browser host. Only policy evidence enters React state; proofs, tokens, nonces, identifiers and key material stay outside the agent and rendered UI. Server-side verification adds signature, request, token and replay checks.", children: [_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 3, p: 3, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", children: [_jsx(Text, { sx: { color: 'fg.muted' }, children: "Generate two proofs for the same request without retaining either." }), _jsx(Button, { variant: "primary", onClick: () => void createProofs(), children: "Create safely" })] }), error ? _jsx(Text, { sx: { color: 'danger.fg' }, children: error }) : null, summary ? (_jsx(PapResult, { title: "Safe DPoP evidence", value: summary })) : null] }));
|
|
60
|
-
};
|
|
61
|
-
export default PapDpopProofView;
|