@datalayer/agent-runtimes 1.3.105 → 1.3.106
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 +82 -2
- package/lib/apps/apps/appspec.js +17 -0
- package/lib/apps/apps/checks.js +4 -0
- package/lib/apps/plugins/pap-example/index.d.ts +23 -0
- package/lib/apps/plugins/pap-example/index.js +25 -0
- package/lib/components/inspector/a2aSpans.js +8 -1
- package/lib/components/teams/SceneTranscript.js +8 -3
- package/lib/examples/PapAgentIdentityExample.d.ts +4 -0
- package/lib/examples/PapAgentIdentityExample.js +23 -0
- package/lib/examples/PapAuthorizationBoundaryExample.d.ts +4 -0
- package/lib/examples/PapAuthorizationBoundaryExample.js +23 -0
- package/lib/examples/PapCompanyDiscoveryExample.d.ts +4 -0
- package/lib/examples/PapCompanyDiscoveryExample.js +23 -0
- package/lib/examples/PapDpopProofExample.d.ts +4 -0
- package/lib/examples/PapDpopProofExample.js +23 -0
- package/lib/examples/PapGuidedJourneyExample.d.ts +4 -0
- package/lib/examples/PapGuidedJourneyExample.js +23 -0
- package/lib/examples/PapSessionLifecycleExample.d.ts +4 -0
- package/lib/examples/PapSessionLifecycleExample.js +23 -0
- package/lib/examples/example-selector.js +9 -0
- package/lib/examples/exampleGroups.d.ts +1 -1
- package/lib/examples/exampleGroups.js +3 -0
- package/lib/examples/index.d.ts +6 -0
- package/lib/examples/index.js +6 -0
- package/lib/examples/main.js +9 -0
- package/lib/examples/pap/PapAgentIdentityView.d.ts +4 -0
- package/lib/examples/pap/PapAgentIdentityView.js +55 -0
- package/lib/examples/pap/PapAuthorizationBoundaryView.d.ts +4 -0
- package/lib/examples/pap/PapAuthorizationBoundaryView.js +59 -0
- package/lib/examples/pap/PapCompanyDiscoveryView.d.ts +4 -0
- package/lib/examples/pap/PapCompanyDiscoveryView.js +62 -0
- package/lib/examples/pap/PapDpopProofView.d.ts +4 -0
- package/lib/examples/pap/PapDpopProofView.js +57 -0
- package/lib/examples/pap/PapExamplePage.d.ts +14 -0
- package/lib/examples/pap/PapExamplePage.js +6 -0
- package/lib/examples/pap/PapGuidedJourneyView.d.ts +4 -0
- package/lib/examples/pap/PapGuidedJourneyView.js +263 -0
- package/lib/examples/pap/PapSessionLifecycleView.d.ts +4 -0
- package/lib/examples/pap/PapSessionLifecycleView.js +103 -0
- package/lib/specs/apps.js +76 -15
- package/lib/specs/appspecSchema.js +27 -0
- package/lib/types/agentspecs.d.ts +12 -0
- package/package.json +1 -1
- package/scripts/codegen/generate_apps.py +3 -0
- package/scripts/validate_pap_examples.py +44 -0
|
@@ -1227,11 +1227,38 @@ export const APPSPEC_SCHEMA = {
|
|
|
1227
1227
|
title: 'Code',
|
|
1228
1228
|
type: 'string',
|
|
1229
1229
|
},
|
|
1230
|
+
files: {
|
|
1231
|
+
description: 'Text files it is given with what it is asked, each in the message after it',
|
|
1232
|
+
items: {
|
|
1233
|
+
$ref: '#/$defs/AppTestFile',
|
|
1234
|
+
},
|
|
1235
|
+
title: 'Files',
|
|
1236
|
+
type: 'array',
|
|
1237
|
+
},
|
|
1230
1238
|
},
|
|
1231
1239
|
required: ['ask', 'expect'],
|
|
1232
1240
|
title: 'AppTestCase',
|
|
1233
1241
|
type: 'object',
|
|
1234
1242
|
},
|
|
1243
|
+
AppTestFile: {
|
|
1244
|
+
additionalProperties: false,
|
|
1245
|
+
description: 'A text file a test gives with what it asks, as a person gives one on its page.',
|
|
1246
|
+
properties: {
|
|
1247
|
+
name: {
|
|
1248
|
+
description: 'Its name, without a folder: `orders.csv`',
|
|
1249
|
+
title: 'Name',
|
|
1250
|
+
type: 'string',
|
|
1251
|
+
},
|
|
1252
|
+
text: {
|
|
1253
|
+
description: 'What it holds',
|
|
1254
|
+
title: 'Text',
|
|
1255
|
+
type: 'string',
|
|
1256
|
+
},
|
|
1257
|
+
},
|
|
1258
|
+
required: ['name', 'text'],
|
|
1259
|
+
title: 'AppTestFile',
|
|
1260
|
+
type: 'object',
|
|
1261
|
+
},
|
|
1235
1262
|
AppTests: {
|
|
1236
1263
|
additionalProperties: false,
|
|
1237
1264
|
description: 'How the application is verified.',
|
|
@@ -737,6 +737,13 @@ export interface AppInterfaceSpec {
|
|
|
737
737
|
*/
|
|
738
738
|
outputs: string[];
|
|
739
739
|
}
|
|
740
|
+
/** A text file a test gives with what it asks, as a person gives one on its page. */
|
|
741
|
+
export interface AppTestFileSpec {
|
|
742
|
+
/** Its name, without a folder: `orders.csv`. */
|
|
743
|
+
name: string;
|
|
744
|
+
/** What it holds. */
|
|
745
|
+
text: string;
|
|
746
|
+
}
|
|
740
747
|
export interface AppTestCaseSpec {
|
|
741
748
|
ask: string;
|
|
742
749
|
expect: string;
|
|
@@ -746,6 +753,11 @@ export interface AppTestCaseSpec {
|
|
|
746
753
|
* the file. Empty, or absent, for a case in words alone.
|
|
747
754
|
*/
|
|
748
755
|
code?: string;
|
|
756
|
+
/**
|
|
757
|
+
* Text files it is given with what it is asked, each in the message after
|
|
758
|
+
* it. Absent for a case in words alone.
|
|
759
|
+
*/
|
|
760
|
+
files?: AppTestFileSpec[];
|
|
749
761
|
}
|
|
750
762
|
/**
|
|
751
763
|
* What was verified, and how, each in a sentence a person reads (LOOP E-14):
|
package/package.json
CHANGED
|
@@ -128,6 +128,9 @@ def load_specs(specs_dir: Path) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
|
128
128
|
for case in spec["tests"]["cases"]:
|
|
129
129
|
if not case.get("code"):
|
|
130
130
|
case.pop("code", None)
|
|
131
|
+
# A case given files names them; the others say nothing of them.
|
|
132
|
+
if not case.get("files"):
|
|
133
|
+
case.pop("files", None)
|
|
131
134
|
# Components of its own: said only when it has some.
|
|
132
135
|
if not spec["interface"].get("custom_components"):
|
|
133
136
|
spec["interface"].pop("custom_components", None)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Datalayer, Inc.
|
|
2
|
+
# Distributed under the terms of the Modified BSD License.
|
|
3
|
+
|
|
4
|
+
"""Build every Agent Runtimes PAP example and reject duplicate identifiers."""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
from agent_runtimes.loop.apps.build import build
|
|
12
|
+
|
|
13
|
+
ROOT = Path(__file__).parents[1]
|
|
14
|
+
EXAMPLES = ROOT / "examples" / "personal-agent-protocol"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main() -> int:
|
|
18
|
+
"""Validate each PAP application definition."""
|
|
19
|
+
|
|
20
|
+
app_ids: set[str] = set()
|
|
21
|
+
tool_names: set[tuple[str, str]] = set()
|
|
22
|
+
paths = sorted(EXAMPLES.glob("*/app.py"))
|
|
23
|
+
if not paths:
|
|
24
|
+
raise RuntimeError("No Agent Runtimes PAP examples were found")
|
|
25
|
+
for path in paths:
|
|
26
|
+
built = build(str(path))
|
|
27
|
+
app_id = built.application.spec.id
|
|
28
|
+
if app_id in app_ids:
|
|
29
|
+
raise RuntimeError(f"Duplicate example application id: {app_id}")
|
|
30
|
+
app_ids.add(app_id)
|
|
31
|
+
for tool in built.application.spec.tools:
|
|
32
|
+
key = (app_id, tool.name)
|
|
33
|
+
if key in tool_names:
|
|
34
|
+
raise RuntimeError(f"Duplicate example tool: {app_id}/{tool.name}")
|
|
35
|
+
tool_names.add(key)
|
|
36
|
+
sys.stdout.write(
|
|
37
|
+
f"{path.relative_to(ROOT)}: {app_id} "
|
|
38
|
+
f"({len(built.application.spec.tools)} tool)\n"
|
|
39
|
+
)
|
|
40
|
+
return 0
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == "__main__":
|
|
44
|
+
raise SystemExit(main())
|