@datalayer/agent-runtimes 1.5.126 → 1.6.1

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 (74) hide show
  1. package/dist-embed/chunks/{CollapsiblePlugin-BFgdC_XZ.js → CollapsiblePlugin-D5OnWN4w.js} +1 -1
  2. package/dist-embed/chunks/{DeckComponent-C7RlwxuS.js → DeckComponent-CMzqudmP.js} +1 -1
  3. package/dist-embed/chunks/{DocumentView-B7BwJAQ_.js → DocumentView-5rJBkuGi.js} +1 -1
  4. package/dist-embed/chunks/{EphemeralDocument-CRuaacnG.js → EphemeralDocument-DbXlbD45.js} +1 -1
  5. package/dist-embed/chunks/{ExcalidrawComponent-BQsxEUl6.js → ExcalidrawComponent-qDofi_fV.js} +1 -1
  6. package/dist-embed/chunks/{ExcalidrawModal-BJNvfSiG.js → ExcalidrawModal-DJcSHz0C.js} +1 -1
  7. package/dist-embed/chunks/{JupyterLexicalExtension-DDBS22TL.js → JupyterLexicalExtension-DPgvwtkz.js} +5 -5
  8. package/dist-embed/chunks/{YouTubePlugin-D4T2FNHP.js → YouTubePlugin-CldEfidK.js} +1 -1
  9. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BWWxthem.js → ar-SA-G6X2FPQ2-D65Mq2ue.js} +1 -1
  10. package/dist-embed/chunks/{az-AZ-76LH7QW2-_lV0CctZ.js → az-AZ-76LH7QW2-FSNZRzay.js} +1 -1
  11. package/dist-embed/chunks/{bg-BG-XCXSNQG7-AxnjN08Y.js → bg-BG-XCXSNQG7-ufD6FI71.js} +1 -1
  12. package/dist-embed/chunks/{bn-BD-2XOGV67Q-Dl7xWiLb.js → bn-BD-2XOGV67Q--i6JiFe5.js} +1 -1
  13. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-DhbsQAMq.js → ca-ES-6MX7JW3Y-vwaYjiDJ.js} +1 -1
  14. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BW0DwcQG.js → cs-CZ-2BRQDIVT-BXHu2VJz.js} +1 -1
  15. package/dist-embed/chunks/{da-DK-5WZEPLOC-7xUhCH5W.js → da-DK-5WZEPLOC-CwNxyqIn.js} +1 -1
  16. package/dist-embed/chunks/{de-DE-XR44H4JA-yZ8VCsFm.js → de-DE-XR44H4JA-CaIo6awk.js} +1 -1
  17. package/dist-embed/chunks/{el-GR-BZB4AONW-DpQq2y1i.js → el-GR-BZB4AONW-BNEz9ghw.js} +1 -1
  18. package/dist-embed/chunks/{es-ES-U4NZUMDT-CE5vlB2M.js → es-ES-U4NZUMDT-CLH2G-rn.js} +1 -1
  19. package/dist-embed/chunks/{eu-ES-A7QVB2H4-BSOGusK0.js → eu-ES-A7QVB2H4-DDWZFR3B.js} +1 -1
  20. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Bf7-uO59.js → fa-IR-HGAKTJCU-ytUXdfkK.js} +1 -1
  21. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-Cw7TptQA.js → fi-FI-Z5N7JZ37-BUPC_MWA.js} +1 -1
  22. package/dist-embed/chunks/{fr-FR-RHASNOE6-Cesl5RJ1.js → fr-FR-RHASNOE6-JTwVsOuH.js} +1 -1
  23. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BiEgd8fs.js → gl-ES-HMX3MZ6V-BdxZC4tu.js} +1 -1
  24. package/dist-embed/chunks/{he-IL-6SHJWFNN-p-0sKu-w.js → he-IL-6SHJWFNN-JAbyqBiH.js} +1 -1
  25. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-CIcMSFsG.js → hi-IN-IWLTKZ5I-CcRjCOJL.js} +1 -1
  26. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-BIbVlxcw.js → hu-HU-A5ZG7DT2-B8qbiTHN.js} +1 -1
  27. package/dist-embed/chunks/{id-ID-SAP4L64H-BTfGWYmP.js → id-ID-SAP4L64H-D0CEzwZy.js} +1 -1
  28. package/dist-embed/chunks/{it-IT-JPQ66NNP-QIrpPMOh.js → it-IT-JPQ66NNP-D8vgJYOR.js} +1 -1
  29. package/dist-embed/chunks/{ja-JP-DBVTYXUO-DqtrcP5y.js → ja-JP-DBVTYXUO-uNmMFGbM.js} +1 -1
  30. package/dist-embed/chunks/{kaa-6HZHGXH3-b0I4naLN.js → kaa-6HZHGXH3-B5unU3uz.js} +1 -1
  31. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-BzHrnY4N.js → kab-KAB-ZGHBKWFO-B5H4IbGk.js} +1 -1
  32. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-Cj793JqC.js → kk-KZ-P5N5QNE5-jkjUgYOW.js} +1 -1
  33. package/dist-embed/chunks/{km-KH-HSX4SM5Z-vG-H1UQO.js → km-KH-HSX4SM5Z-DHJ4OvO0.js} +1 -1
  34. package/dist-embed/chunks/{ko-KR-MTYHY66A-BC5Wardx.js → ko-KR-MTYHY66A-DX6xT6T7.js} +1 -1
  35. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BxE6HhLV.js → ku-TR-6OUDTVRD-aMNDsoCq.js} +1 -1
  36. package/dist-embed/chunks/{lib-C-SvTo5V.js → lib-DsSHOc59.js} +1 -1
  37. package/dist-embed/chunks/{lt-LT-XHIRWOB4-DDD2HWbG.js → lt-LT-XHIRWOB4-CFvk2lSA.js} +1 -1
  38. package/dist-embed/chunks/{lv-LV-5QDEKY6T-CcqjeGkr.js → lv-LV-5QDEKY6T-RtfLJiJ2.js} +1 -1
  39. package/dist-embed/chunks/{mr-IN-CRQNXWMA-KsuhaZoo.js → mr-IN-CRQNXWMA-D8_Mabbi.js} +1 -1
  40. package/dist-embed/chunks/{my-MM-5M5IBNSE-XCo0RM1r.js → my-MM-5M5IBNSE-CpXJoZVO.js} +1 -1
  41. package/dist-embed/chunks/{nb-NO-T6EIAALU-DWWI2E8h.js → nb-NO-T6EIAALU-DV0yn6n2.js} +1 -1
  42. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-BzuIYvR8.js → nl-NL-IS3SIHDZ-BShUfztw.js} +1 -1
  43. package/dist-embed/chunks/{nn-NO-6E72VCQL-DH904E4p.js → nn-NO-6E72VCQL-DT67tBGp.js} +1 -1
  44. package/dist-embed/chunks/{oc-FR-POXYY2M6-CP7shKez.js → oc-FR-POXYY2M6-C9beX7l6.js} +1 -1
  45. package/dist-embed/chunks/{pa-IN-N4M65BXN-Csgy3tEY.js → pa-IN-N4M65BXN-BfWw7Fcm.js} +1 -1
  46. package/dist-embed/chunks/{percentages-BXMCSKIN-DcfxDsfi.js → percentages-BXMCSKIN-DnOPjw1c.js} +3 -3
  47. package/dist-embed/chunks/{pl-PL-T2D74RX3-D3AeEMRt.js → pl-PL-T2D74RX3-D_-aGMy6.js} +1 -1
  48. package/dist-embed/chunks/{pt-BR-5N22H2LF-7I6q10Sc.js → pt-BR-5N22H2LF-S9-rvdh-.js} +1 -1
  49. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DZJxZzkc.js → pt-PT-UZXXM6DQ-B3YwXhX2.js} +1 -1
  50. package/dist-embed/chunks/{ro-RO-JPDTUUEW-PDlShdK0.js → ro-RO-JPDTUUEW-yYRbH_ru.js} +1 -1
  51. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-DjcgqZeE.js → ru-RU-B4JR7IUQ-BTc6cwjB.js} +1 -1
  52. package/dist-embed/chunks/{si-LK-N5RQ5JYF-CFrzC8S_.js → si-LK-N5RQ5JYF-CTBffWXK.js} +1 -1
  53. package/dist-embed/chunks/{sk-SK-C5VTKIMK-CYDa0hwO.js → sk-SK-C5VTKIMK-CSFUvwJi.js} +1 -1
  54. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BgwAGIws.js → sl-SI-NN7IZMDC-C9mEJcPH.js} +1 -1
  55. package/dist-embed/chunks/{standalone-DyCMuq_1.js → standalone-Lm5oSWJc.js} +1 -1
  56. package/dist-embed/chunks/{subset-shared.chunk-CHaR0I1f.js → subset-shared.chunk-BV2qx58E.js} +1 -1
  57. package/dist-embed/chunks/{subset-worker.chunk-IxejZNmS.js → subset-worker.chunk-CeiZxQyM.js} +1 -1
  58. package/dist-embed/chunks/{sv-SE-XGPEYMSR-DJaWvuGf.js → sv-SE-XGPEYMSR-1smmCF_L.js} +1 -1
  59. package/dist-embed/chunks/{ta-IN-2NMHFXQM-D2ulvt48.js → ta-IN-2NMHFXQM-CrRu26yk.js} +1 -1
  60. package/dist-embed/chunks/{th-TH-HPSO5L25-BPh5s5iw.js → th-TH-HPSO5L25-wd_Lh_1U.js} +1 -1
  61. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Xi6Fmh4N.js → tr-TR-DEFEU3FU-CHCQloY1.js} +1 -1
  62. package/dist-embed/chunks/{uk-UA-QMV73CPH-BD8IjnOG.js → uk-UA-QMV73CPH-C0h4-2EB.js} +1 -1
  63. package/dist-embed/chunks/{vi-VN-M7AON7JQ-BCQsoyD2.js → vi-VN-M7AON7JQ-xY-LexnE.js} +1 -1
  64. package/dist-embed/chunks/{zh-CN-LNUGB5OW-FHaKo3DT.js → zh-CN-LNUGB5OW-DpBIJ4AH.js} +1 -1
  65. package/dist-embed/chunks/{zh-HK-E62DVLB3-DNqDGhqR.js → zh-HK-E62DVLB3-DMknmNwa.js} +1 -1
  66. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-3iabjnUu.js → zh-TW-RAJ6MFWO-CFHfvsa1.js} +1 -1
  67. package/dist-embed/datalayer-app-main.js +54 -54
  68. package/lib/specs/agents/agents.js +192 -1
  69. package/lib/specs/identities.d.ts +28 -0
  70. package/lib/specs/identities.js +601 -0
  71. package/lib/types/agentspecs.d.ts +70 -0
  72. package/package.json +1 -1
  73. package/scripts/codegen/generate_agents.py +40 -0
  74. package/scripts/codegen/generate_ops.py +21 -2
@@ -726,6 +726,71 @@ export interface StageSpec {
726
726
  icon: string;
727
727
  emoji: string;
728
728
  }
729
+ /**
730
+ * Who is acting when an agent acts, issued by whom and proven how
731
+ * (`agentspecs/identities`): a person, an agent, an application, an
732
+ * organization, a visitor or a service, under Datalayer IAM, the Personal
733
+ * Agent Protocol, Amazon Bedrock AgentCore Identity or an organization's OIDC.
734
+ */
735
+ export interface IdentitySpec {
736
+ id: string;
737
+ version: string;
738
+ name: string;
739
+ description: string;
740
+ subject: 'person' | 'agent' | 'application' | 'organization' | 'visitor' | 'service';
741
+ provider: 'datalayer' | 'pap' | 'aws-agentcore' | 'oidc';
742
+ /** Protocols of the catalogue it speaks, by id. */
743
+ protocols: string[];
744
+ /** How a caller proves it on the way in. */
745
+ inbound: {
746
+ kind: 'none' | 'session' | 'jwt' | 'sigv4' | 'api-key' | 'dpop' | 'http-signature';
747
+ issuer: string;
748
+ discoveryUrl: string;
749
+ algorithms: string[];
750
+ audiences: string[];
751
+ clients: string[];
752
+ scopes: string[];
753
+ claims: Record<string, string>;
754
+ lifetimeSeconds: number;
755
+ };
756
+ /** The token the agent holds while it acts. */
757
+ workload: {
758
+ token: 'none' | 'acting' | 'client-credentials' | 'agentcore-runtime' | 'agentcore-jwt';
759
+ lifetimeSeconds: number;
760
+ };
761
+ /** Where third-party credentials are kept, and for which providers. */
762
+ credentials: {
763
+ vault: 'none' | 'datalayer' | 'agentcore';
764
+ providers: {
765
+ name: string;
766
+ kind: 'oauth2' | 'api-key';
767
+ flow: '' | 'user-federation' | 'm2m';
768
+ scopes: string[];
769
+ }[];
770
+ };
771
+ /** Who keeps the signing keys, and the algorithm. */
772
+ custody: {
773
+ keys: string;
774
+ algorithm: string;
775
+ };
776
+ /** Who consents, who hosts it, and whether it is bound to the session that asked. */
777
+ consent: {
778
+ by: string;
779
+ hostedBy: string;
780
+ binding: boolean;
781
+ };
782
+ /** For a PAP identity: what the protocol binds. */
783
+ pap?: {
784
+ roles: ('personal-agent' | 'company')[];
785
+ clientIdPerApplication: boolean;
786
+ pairwise: boolean;
787
+ dpop: boolean;
788
+ };
789
+ enabled: boolean;
790
+ tags: string[];
791
+ icon: string;
792
+ emoji: string;
793
+ }
729
794
  /** What is on a Stage. */
730
795
  export type StageKind = 'scene' | 'app' | 'battle';
731
796
  /** What is on a Stage: the one of `scene`, `app` and `battle` it names. */
@@ -1917,6 +1982,11 @@ export interface Agentspec {
1917
1982
  * the fields an Appspec says under `interface.voice`; absent when unsaid.
1918
1983
  */
1919
1984
  voice?: AppVoiceSpec;
1985
+ /**
1986
+ * Who it acts as: an Identity of the catalogue (`agentspecs/identities`),
1987
+ * `id` or `id:version`; absent when unsaid (the platform's default).
1988
+ */
1989
+ identity?: string;
1920
1990
  }
1921
1991
  /**
1922
1992
  * Where a subagent reached over A2A lives, or how to launch it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.5.126",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -306,6 +306,7 @@ def load_yaml_specs(specs_dir: Path) -> List[tuple[str, Dict[str, Any]]]:
306
306
  check_protocols(resolved, load_protocol_ids(specs_dir))
307
307
  check_harnesses(resolved, load_harnesses(specs_dir))
308
308
  check_voices(resolved)
309
+ check_identities(resolved, load_identity_ids(specs_dir))
309
310
  return resolved
310
311
 
311
312
 
@@ -342,6 +343,37 @@ def load_protocol_ids(specs_dir: Path) -> set[str]:
342
343
  return ids
343
344
 
344
345
 
346
+ def load_identity_ids(specs_dir: Path) -> set[str]:
347
+ """Every id of the identities catalogue (`agentspecs/identities`)."""
348
+ ids: set[str] = set()
349
+ for yaml_file in sorted((specs_dir.parent / "identities").glob("*.yaml")):
350
+ identity = yaml.safe_load(yaml_file.read_text()) or {}
351
+ if identity.get("id"):
352
+ ids.add(str(identity["id"]))
353
+ return ids
354
+
355
+
356
+ def check_identities(
357
+ specs: List[tuple[str, Dict[str, Any]]], identity_ids: set[str]
358
+ ) -> None:
359
+ """Refuse an agent that names no identity, or one the identities catalogue does not hold."""
360
+ problems = []
361
+ for _, spec in specs:
362
+ said = spec.get("identity")
363
+ if not said:
364
+ if identity_ids:
365
+ problems.append(f"{spec.get('id')}: identity is required (who the agent acts as)")
366
+ continue
367
+ base, _, version = str(said).rpartition(":")
368
+ identity = base if base and "." in version else str(said)
369
+ if identity not in identity_ids:
370
+ problems.append(
371
+ f"{spec.get('id')}: identity names what the catalogue does not know: {said}"
372
+ )
373
+ if problems:
374
+ raise SystemExit("\n".join(problems))
375
+
376
+
345
377
  def check_protocols(
346
378
  specs: List[tuple[str, Dict[str, Any]]], protocol_ids: set[str]
347
379
  ) -> None:
@@ -608,6 +640,10 @@ from agent_runtimes.types import (
608
640
  voice_py_line = (
609
641
  f" voice={_fmt_py_literal(voice)},\n" if voice is not None else ""
610
642
  )
643
+ identity_val = spec.get("identity")
644
+ voice_py_line += (
645
+ f' identity="{identity_val}",\n' if identity_val else ""
646
+ )
611
647
  inference_provider = spec.get("inference_provider")
612
648
  inference_provider_str = (
613
649
  f'"{inference_provider}"' if inference_provider else "None"
@@ -1242,6 +1278,10 @@ const FRONTEND_TOOL_MAP: Record<string, any> = {
1242
1278
  voice_ts_line = (
1243
1279
  f" voice: {_fmt_ts_literal(voice)},\n" if voice is not None else ""
1244
1280
  )
1281
+ identity_val = spec.get("identity")
1282
+ voice_ts_line += (
1283
+ f" identity: '{identity_val}',\n" if identity_val else ""
1284
+ )
1245
1285
  inference_provider = spec.get("inference_provider")
1246
1286
  inference_provider_ts = (
1247
1287
  f"'{inference_provider}'" if inference_provider else "undefined"
@@ -77,6 +77,16 @@ KINDS: dict[str, dict[str, str]] = {
77
77
  "title": "Stage Catalog.",
78
78
  "about": "Something of the catalogue put on stage, and where it plays: a scene played whole,\nan app or a Battle; each member on a runtime at the deployment that answers for it;\nwhether anyone may watch without an account. Resolved: a Stage wears what it stages.",
79
79
  },
80
+ "identities": {
81
+ "model": "IdentitySpec",
82
+ "suffix": "IDENTITY",
83
+ "catalogue": "IDENTITY_CATALOGUE",
84
+ "one": "identity",
85
+ "One": "Identity",
86
+ "Many": "Identities",
87
+ "title": "Identity Catalog.",
88
+ "about": "Who is acting when an agent acts: a person, an agent, an application, an\norganization, a visitor or a service, issued by Datalayer IAM, the Personal Agent\nProtocol, Amazon Bedrock AgentCore Identity or an organization's OIDC provider;\nhow each proves it, the token it holds, where its third-party credentials are kept.",
89
+ },
80
90
  "ops": {
81
91
  "model": "OpSpec",
82
92
  "suffix": "OP",
@@ -100,6 +110,10 @@ CAMEL = {
100
110
  "clock_seconds": "clockSeconds",
101
111
  "decides_by": "decidesBy",
102
112
  "runs_in": "runsIn",
113
+ "discovery_url": "discoveryUrl",
114
+ "lifetime_seconds": "lifetimeSeconds",
115
+ "hosted_by": "hostedBy",
116
+ "client_id_per_application": "clientIdPerApplication",
103
117
  }
104
118
 
105
119
  def _flat(text: Any) -> str:
@@ -153,6 +167,11 @@ def load_specs(kind: str, specs_dir: Path) -> list[dict[str, Any]]:
153
167
  elif kind == "stages":
154
168
  stages = module.load_stages(specs_dir)
155
169
  specs = [stages[identity].model_dump(mode="json") for identity in sorted(stages)]
170
+ elif kind == "identities":
171
+ identities = module.load_identities(specs_dir)
172
+ specs = [
173
+ identities[identity].model_dump(mode="json") for identity in sorted(identities)
174
+ ]
156
175
  elif kind == "tracks":
157
176
  tracks = module.load_tracks(specs_dir)
158
177
  specs = [
@@ -371,7 +390,7 @@ def generate_typescript_code(kind: str, specs: list[dict[str, Any]]) -> str:
371
390
  " );",
372
391
  "}",
373
392
  "",
374
- f"export function list{names['One']}s(): {names['model']}[] {{",
393
+ f"export function list{names.get('Many', names['One'] + 's')}(): {names['model']}[] {{",
375
394
  f" return Object.values({names['catalogue']});",
376
395
  "}",
377
396
  "",
@@ -408,7 +427,7 @@ def generate_typescript_code(kind: str, specs: list[dict[str, Any]]) -> str:
408
427
  def main() -> None:
409
428
  """Generate one kind's catalogues."""
410
429
  parser = argparse.ArgumentParser(
411
- description="Generate Python and TypeScript code from YAML Op, Guard, Gate, Track, Battle and Stage specifications"
430
+ description="Generate Python and TypeScript code from YAML Op, Guard, Gate, Track, Battle, Stage and Identity specifications"
412
431
  )
413
432
  parser.add_argument(
414
433
  "--kind",