@datalayer/agent-runtimes 1.5.96 → 1.5.98

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 (92) hide show
  1. package/dist-embed/chunks/{index.esm-zOy6kFPv.js → index.esm-BLDeC6q1.js} +1 -1
  2. package/dist-embed/datalayer-app-main.js +80 -80
  3. package/lib/apps/apps/appspec.d.ts +11 -12
  4. package/lib/apps/apps/appspec.js +45 -87
  5. package/lib/components/cards/ToolApprovalCard.js +4 -2
  6. package/lib/components/teams/HarnessIcon.d.ts +11 -0
  7. package/lib/components/teams/HarnessIcon.js +17 -0
  8. package/lib/components/teams/SceneTranscript.d.ts +1 -1
  9. package/lib/components/teams/SceneTranscript.js +12 -7
  10. package/lib/components/teams/SceneView.d.ts +7 -1
  11. package/lib/components/teams/SceneView.js +2 -2
  12. package/lib/components/teams/backdrops/hero.js +1 -1
  13. package/lib/components/teams/backdrops/minimal.js +1 -1
  14. package/lib/components/teams/backdrops/nodes.js +4 -3
  15. package/lib/components/teams/backdrops/space.js +1 -1
  16. package/lib/components/teams/backdrops/types.d.ts +9 -0
  17. package/lib/components/teams/index.d.ts +2 -0
  18. package/lib/components/teams/index.js +2 -0
  19. package/lib/components/teams/memberHarness.d.ts +16 -0
  20. package/lib/components/teams/memberHarness.js +42 -0
  21. package/lib/components/teams/sceneTranscriptRules.js +6 -1
  22. package/lib/components/teams/transcript/LineSelect.d.ts +20 -0
  23. package/lib/components/teams/transcript/LineSelect.js +20 -0
  24. package/lib/components/teams/transcript/TranscriptTable.d.ts +11 -5
  25. package/lib/components/teams/transcript/TranscriptTable.js +24 -7
  26. package/lib/components/teams/transcript/TranscriptViews.js +1 -1
  27. package/lib/components/teams/transcript/recordingPlayback.d.ts +13 -0
  28. package/lib/components/teams/transcript/recordingPlayback.js +32 -0
  29. package/lib/components/teams/transcript/useSceneRecording.d.ts +1 -1
  30. package/lib/components/teams/transcript/useSceneRecording.js +19 -11
  31. package/lib/examples/PapAccountTokensExample.d.ts +1 -1
  32. package/lib/examples/PapAccountTokensExample.js +3 -3
  33. package/lib/examples/PapSessionJwtExample.d.ts +4 -0
  34. package/lib/examples/{PapDpopProofExample.js → PapSessionJwtExample.js} +9 -9
  35. package/lib/examples/PapSessionLifecycleExample.d.ts +1 -1
  36. package/lib/examples/PapSessionLifecycleExample.js +2 -2
  37. package/lib/examples/ScenesExample.js +15 -13
  38. package/lib/examples/example-selector.js +3 -3
  39. package/lib/examples/index.d.ts +1 -1
  40. package/lib/examples/index.js +1 -1
  41. package/lib/examples/main.js +1 -1
  42. package/lib/examples/pap/PapAccountTokensView.d.ts +1 -1
  43. package/lib/examples/pap/PapAuthorizationBoundaryView.js +15 -22
  44. package/lib/examples/pap/PapGuidedJourneyView.js +61 -60
  45. package/lib/examples/pap/PapSessionJwtView.d.ts +4 -0
  46. package/lib/examples/pap/PapSessionJwtView.js +69 -0
  47. package/lib/examples/pap/PapSessionLifecycleView.js +36 -58
  48. package/lib/examples/pap/PapSignInDisplayView.d.ts +1 -1
  49. package/lib/examples/pap/PapSignInDisplayView.js +1 -1
  50. package/lib/examples/pap/PapTraceView.d.ts +1 -1
  51. package/lib/examples/pap/PapTraceView.js +1 -1
  52. package/lib/examples/pap/traces/account-tokens.json +145 -173
  53. package/lib/examples/pap/traces/conversation-control.json +118 -140
  54. package/lib/examples/pap/traces/conversation-streaming.json +114 -134
  55. package/lib/examples/pap/traces/mediated-sign-in.json +151 -166
  56. package/lib/examples/pap/traces/operations.json +613 -391
  57. package/lib/examples/pap/traces/two-companies.json +380 -990
  58. package/lib/examples/pap/traces/user-with-a-company.json +319 -207
  59. package/lib/models/environments.generated.d.ts +2 -2
  60. package/lib/models/environments.generated.js +1 -1
  61. package/lib/pap/index.d.ts +1 -1
  62. package/lib/pap/index.js +3 -3
  63. package/lib/portable/displays.d.ts +13 -22
  64. package/lib/portable/displays.js +17 -65
  65. package/lib/portable/hosts/approvalRenderers.d.ts +4 -4
  66. package/lib/portable/hosts/approvalRenderers.js +26 -13
  67. package/lib/portable/hosts/contracts.json +5 -2
  68. package/lib/portable/index.d.ts +1 -1
  69. package/lib/portable/index.js +1 -1
  70. package/lib/protocols/decks/index.d.ts +37 -0
  71. package/lib/protocols/decks/index.js +48 -0
  72. package/lib/protocols/decks/pact-a-personal-agent-at-a-business.d.ts +2 -0
  73. package/lib/protocols/decks/pact-a-personal-agent-at-a-business.js +148 -0
  74. package/lib/protocols/decks/ucp-a-purchase-approved.d.ts +2 -0
  75. package/lib/protocols/decks/ucp-a-purchase-approved.js +154 -0
  76. package/lib/specs/actions.d.ts +1 -1
  77. package/lib/specs/actions.js +2 -2
  78. package/lib/specs/agents/agents.js +3 -3
  79. package/lib/specs/apps.d.ts +1 -1
  80. package/lib/specs/apps.js +10 -11
  81. package/lib/specs/appspecSchema.js +4 -112
  82. package/lib/specs/envvars.js +2 -2
  83. package/lib/specs/harnesses.js +9 -9
  84. package/lib/specs/scenes.js +10 -33
  85. package/lib/specs/teams/teams.js +2 -2
  86. package/lib/types/agentspecs.d.ts +91 -127
  87. package/package.json +409 -409
  88. package/scripts/codegen/generate_apps.py +6 -7
  89. package/scripts/validate_pap_examples.py +1 -1
  90. package/lib/examples/PapDpopProofExample.d.ts +0 -4
  91. package/lib/examples/pap/PapDpopProofView.d.ts +0 -4
  92. 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 (PI-01, PR-02, EX-11).
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 (I-10).
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 (PR-54): by protocol, the
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 (PR-54).",
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 (PR-54).",
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 (S-01, S-02).
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.
@@ -28,7 +28,7 @@ HOST_ONLY_TOOL_ARGUMENTS = {
28
28
  "local_user_id",
29
29
  "pairwise_user_id",
30
30
  "redirect_uri",
31
- "session_token",
31
+ "session_jwt",
32
32
  }
33
33
 
34
34
 
@@ -1,4 +0,0 @@
1
- /** PAP DPoP proof creation mounted as a Reactor workspace plugin. */
2
- import React from 'react';
3
- declare const PapDpopProofExample: React.FC;
4
- export default PapDpopProofExample;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- /** Create real device-held proofs while retaining only non-secret evidence. */
3
- declare const PapDpopProofView: React.FC;
4
- export default PapDpopProofView;
@@ -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;