@datalayer/agent-runtimes 1.6.50 → 1.6.53

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 (98) hide show
  1. package/dist-embed/chunks/{CollapsiblePlugin-DyobyCLm.js → CollapsiblePlugin-O3bSOnT2.js} +1 -1
  2. package/dist-embed/chunks/{DeckComponent-B5IMw4r1.js → DeckComponent-BBzW9lJ6.js} +1 -1
  3. package/dist-embed/chunks/{DocumentView-IqGVIpnF.js → DocumentView-cAXnkJfm.js} +1 -1
  4. package/dist-embed/chunks/{EphemeralDocument-DZ8Wk5du.js → EphemeralDocument-Dhya_KwN.js} +1 -1
  5. package/dist-embed/chunks/{ExcalidrawComponent-9ant-hu6.js → ExcalidrawComponent-B8OYc8cp.js} +1 -1
  6. package/dist-embed/chunks/{ExcalidrawModal-92wiYWnH.js → ExcalidrawModal-BW5tAKHi.js} +1 -1
  7. package/dist-embed/chunks/{JupyterLexicalExtension-DbMi7Dam.js → JupyterLexicalExtension-BZdwpb1B.js} +5 -5
  8. package/dist-embed/chunks/{NotebookToolSurfaces-Gk8Hsn0c.js → NotebookToolSurfaces-Bh-LUzM-.js} +1 -1
  9. package/dist-embed/chunks/{Output-DtWAAuKd.js → Output-DNFUWYih.js} +8 -8
  10. package/dist-embed/chunks/{YouTubePlugin-DS4rJSGB.js → YouTubePlugin-N0bkcExZ.js} +1 -1
  11. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-oGeNqqRN.js → ar-SA-G6X2FPQ2-E6Tk_QWw.js} +1 -1
  12. package/dist-embed/chunks/{az-AZ-76LH7QW2-Ckdua9fG.js → az-AZ-76LH7QW2-K7Oiu-pY.js} +1 -1
  13. package/dist-embed/chunks/{bg-BG-XCXSNQG7-D0NWa5AJ.js → bg-BG-XCXSNQG7-6JXDKtWk.js} +1 -1
  14. package/dist-embed/chunks/{bn-BD-2XOGV67Q-CZbU71zu.js → bn-BD-2XOGV67Q-Djg2MZl8.js} +1 -1
  15. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-CDkEhhvJ.js → ca-ES-6MX7JW3Y-BTPklJXF.js} +1 -1
  16. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-D3Tf2yLX.js → cs-CZ-2BRQDIVT-gVrmcBET.js} +1 -1
  17. package/dist-embed/chunks/{da-DK-5WZEPLOC-8FuM_s_4.js → da-DK-5WZEPLOC-BBbJOknE.js} +1 -1
  18. package/dist-embed/chunks/{de-DE-XR44H4JA-BczLv19p.js → de-DE-XR44H4JA-DDAe1n4-.js} +1 -1
  19. package/dist-embed/chunks/{el-GR-BZB4AONW-XmdkMj04.js → el-GR-BZB4AONW-_O5d2fpo.js} +1 -1
  20. package/dist-embed/chunks/{es-ES-U4NZUMDT-BM8o7VhK.js → es-ES-U4NZUMDT-8tcn7kxA.js} +1 -1
  21. package/dist-embed/chunks/{eu-ES-A7QVB2H4-C92PACcO.js → eu-ES-A7QVB2H4-swWuvm8T.js} +1 -1
  22. package/dist-embed/chunks/{fa-IR-HGAKTJCU-C0v8l3W9.js → fa-IR-HGAKTJCU-BMdvmquE.js} +1 -1
  23. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-C5OmBq6V.js → fi-FI-Z5N7JZ37-CtiUEJw3.js} +1 -1
  24. package/dist-embed/chunks/{fr-FR-RHASNOE6-D2EL4poR.js → fr-FR-RHASNOE6-9oRayPJc.js} +1 -1
  25. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-YWFm4WxA.js → gl-ES-HMX3MZ6V-BOznTumG.js} +1 -1
  26. package/dist-embed/chunks/{he-IL-6SHJWFNN-mX7JSlN-.js → he-IL-6SHJWFNN-DUVMGygM.js} +1 -1
  27. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-D6yhTM4e.js → hi-IN-IWLTKZ5I-oYSW7Bx5.js} +1 -1
  28. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-eb6aNn0F.js → hu-HU-A5ZG7DT2-BJFV7jEm.js} +1 -1
  29. package/dist-embed/chunks/{id-ID-SAP4L64H-EhGa_Mrn.js → id-ID-SAP4L64H-DG1Dwi63.js} +1 -1
  30. package/dist-embed/chunks/{index-mXYl0SDo.js → index-BIl72fAm.js} +2 -2
  31. package/dist-embed/chunks/{it-IT-JPQ66NNP-BEhvmrUK.js → it-IT-JPQ66NNP-B6bSeHaH.js} +1 -1
  32. package/dist-embed/chunks/{ja-JP-DBVTYXUO-lmsxmH6A.js → ja-JP-DBVTYXUO-BRWx5KlM.js} +1 -1
  33. package/dist-embed/chunks/{kaa-6HZHGXH3-C2eZOrFk.js → kaa-6HZHGXH3-SpLqZeKb.js} +1 -1
  34. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-BtO_Ccgd.js → kab-KAB-ZGHBKWFO-dGdDDYwn.js} +1 -1
  35. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-BlIG0olU.js → kk-KZ-P5N5QNE5-ZTSO8W-K.js} +1 -1
  36. package/dist-embed/chunks/{km-KH-HSX4SM5Z-Dixy2EU_.js → km-KH-HSX4SM5Z-CleCdXdx.js} +1 -1
  37. package/dist-embed/chunks/{ko-KR-MTYHY66A-CUkVgSOW.js → ko-KR-MTYHY66A-Ff92uevY.js} +1 -1
  38. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BKl1H1lo.js → ku-TR-6OUDTVRD-cBz5nBl7.js} +1 -1
  39. package/dist-embed/chunks/{lib-BuHiJKfL.js → lib-6TPLItTb.js} +1 -1
  40. package/dist-embed/chunks/{lib-DEmXqC05.js → lib-Bd-DHxvY.js} +1 -1
  41. package/dist-embed/chunks/{lib-3oZnFGZf.js → lib-CCVTi39i.js} +1 -1
  42. package/dist-embed/chunks/{lib-C65GpCKu.js → lib-CU3GZ7XB.js} +1 -1
  43. package/dist-embed/chunks/{lib-ClP1grrt.js → lib-CUtLTghG.js} +1 -1
  44. package/dist-embed/chunks/{lib-BCX_PXlV.js → lib-CYUbVv7y.js} +1 -1
  45. package/dist-embed/chunks/{lib-DdpVsCS-.js → lib-CaT_vwu7.js} +1 -1
  46. package/dist-embed/chunks/{lib-D7ZIPOgc.js → lib-Co6Mrwf9.js} +1 -1
  47. package/dist-embed/chunks/{lib-B9Uql7XT.js → lib-Cq0WigYa.js} +1 -1
  48. package/dist-embed/chunks/{lib-Bj5kYV-X.js → lib-CuhljIuI.js} +1 -1
  49. package/dist-embed/chunks/{lib-BpgMIewI.js → lib-DNmIagIq.js} +1 -1
  50. package/dist-embed/chunks/{lib-C1F_0rhP.js → lib-Dn5yvA1f.js} +1 -1
  51. package/dist-embed/chunks/{lib-jE6-GvLb.js → lib-FBlRWkj7.js} +1 -1
  52. package/dist-embed/chunks/{lib-ByfYxpOp.js → lib-Ipz2nrlj.js} +1 -1
  53. package/dist-embed/chunks/{lib-BBoRpP0j.js → lib-O-8MG1Py.js} +1 -1
  54. package/dist-embed/chunks/{lib-UcItgdUY.js → lib-pMZ7syE4.js} +1 -1
  55. package/dist-embed/chunks/{lib-DHfhUiNX.js → lib-sw4DQLI8.js} +1 -1
  56. package/dist-embed/chunks/{lib-DgCQUDNp.js → lib-x42_0GMo.js} +1 -1
  57. package/dist-embed/chunks/{lt-LT-XHIRWOB4-TTj82TW7.js → lt-LT-XHIRWOB4-DfXp5Gx2.js} +1 -1
  58. package/dist-embed/chunks/{lv-LV-5QDEKY6T-DLiLVd-V.js → lv-LV-5QDEKY6T-DNVNDCM1.js} +1 -1
  59. package/dist-embed/chunks/{mr-IN-CRQNXWMA-CiVi-oiY.js → mr-IN-CRQNXWMA-CnaNZ5Wl.js} +1 -1
  60. package/dist-embed/chunks/{my-MM-5M5IBNSE-DiSnYIcD.js → my-MM-5M5IBNSE-B5iDGCTn.js} +1 -1
  61. package/dist-embed/chunks/{nb-NO-T6EIAALU-DfSOBb64.js → nb-NO-T6EIAALU-LWClJ4r8.js} +1 -1
  62. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-BF72RX5n.js → nl-NL-IS3SIHDZ-DSjZNAbY.js} +1 -1
  63. package/dist-embed/chunks/{nn-NO-6E72VCQL-Ck3xjqMu.js → nn-NO-6E72VCQL-2WY6Xk1L.js} +1 -1
  64. package/dist-embed/chunks/{oc-FR-POXYY2M6-CEdstZI1.js → oc-FR-POXYY2M6-Ddep6jAF.js} +1 -1
  65. package/dist-embed/chunks/{pa-IN-N4M65BXN-D8DDwUFn.js → pa-IN-N4M65BXN-BqkRbMII.js} +1 -1
  66. package/dist-embed/chunks/{percentages-BXMCSKIN-CxyBCxgG.js → percentages-BXMCSKIN-2Z9DWWGZ.js} +3 -3
  67. package/dist-embed/chunks/{pl-PL-T2D74RX3-bJIlJVUJ.js → pl-PL-T2D74RX3-B2bWZwI4.js} +1 -1
  68. package/dist-embed/chunks/{pt-BR-5N22H2LF-T_zS_1UI.js → pt-BR-5N22H2LF-C7L47RXu.js} +1 -1
  69. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BGYBI-AZ.js → pt-PT-UZXXM6DQ-BVYWqiIW.js} +1 -1
  70. package/dist-embed/chunks/{ro-RO-JPDTUUEW-BF-LNyWr.js → ro-RO-JPDTUUEW-CCpzzSh1.js} +1 -1
  71. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CYsp0VFS.js → ru-RU-B4JR7IUQ-D6MNDylx.js} +1 -1
  72. package/dist-embed/chunks/{si-LK-N5RQ5JYF-DPP2zzI4.js → si-LK-N5RQ5JYF-eSMzuFfz.js} +1 -1
  73. package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bsy5tZJ9.js → sk-SK-C5VTKIMK-DCnPMFe9.js} +1 -1
  74. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BSN6metY.js → sl-SI-NN7IZMDC-DrRNO1Te.js} +1 -1
  75. package/dist-embed/chunks/{subset-shared.chunk-cWEwjmHn.js → subset-shared.chunk-1Lj1fws8.js} +1 -1
  76. package/dist-embed/chunks/{subset-worker.chunk-CoJnEmh6.js → subset-worker.chunk-BY_1WzGX.js} +1 -1
  77. package/dist-embed/chunks/{sv-SE-XGPEYMSR-DtD64Ekq.js → sv-SE-XGPEYMSR-C1C77U8p.js} +1 -1
  78. package/dist-embed/chunks/{ta-IN-2NMHFXQM-DgbGGIjW.js → ta-IN-2NMHFXQM-kh2J7KJQ.js} +1 -1
  79. package/dist-embed/chunks/{th-TH-HPSO5L25-CCZDC3pr.js → th-TH-HPSO5L25-CY7qyqUN.js} +1 -1
  80. package/dist-embed/chunks/{tr-TR-DEFEU3FU-akGa6iYJ.js → tr-TR-DEFEU3FU-DcrDFByj.js} +1 -1
  81. package/dist-embed/chunks/{uk-UA-QMV73CPH-t35eBlzl.js → uk-UA-QMV73CPH-D0oYF2ZU.js} +1 -1
  82. package/dist-embed/chunks/{vi-VN-M7AON7JQ-xWA8FWTO.js → vi-VN-M7AON7JQ-PLL4mabe.js} +1 -1
  83. package/dist-embed/chunks/{zh-CN-LNUGB5OW-D7M8yyYf.js → zh-CN-LNUGB5OW-CTSXkL4H.js} +1 -1
  84. package/dist-embed/chunks/{zh-HK-E62DVLB3-DvMmnROR.js → zh-HK-E62DVLB3-CfhgYw9m.js} +1 -1
  85. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DSL_-5li.js → zh-TW-RAJ6MFWO-BTJqeNq3.js} +1 -1
  86. package/dist-embed/datalayer-app-main.js +13 -13
  87. package/lib/specs/actions.js +8 -3
  88. package/lib/specs/agents/agents.js +38 -6
  89. package/lib/specs/apps.js +46 -24
  90. package/lib/specs/appspecSchema.js +6 -0
  91. package/lib/specs/backendTools.d.ts +5 -0
  92. package/lib/specs/backendTools.js +99 -0
  93. package/lib/types/agentspecs.d.ts +14 -3
  94. package/lib/types/agentspecs.js +6 -2
  95. package/lib/types/tools.d.ts +5 -0
  96. package/package.json +1 -1
  97. package/scripts/codegen/generate_agents.py +18 -4
  98. package/scripts/codegen/generate_backend_tools.py +10 -0
@@ -32,6 +32,11 @@ export declare const RECORD_RECOMMENDATION_BACKEND_TOOL_SPEC_0_0_1: BackendToolS
32
32
  export declare const RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
33
33
  export declare const RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
34
34
  export declare const RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
35
+ export declare const SOCIAL_ACCOUNTS_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
36
+ export declare const SOCIAL_COMMENT_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
37
+ export declare const SOCIAL_POST_BLUESKY_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
38
+ export declare const SOCIAL_POST_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
39
+ export declare const SOCIAL_POST_X_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
35
40
  export declare const UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1: BackendToolSpec;
36
41
  export declare const BACKEND_TOOL_CATALOG: Record<string, BackendToolSpec>;
37
42
  export declare function getBackendToolSpecs(): BackendToolSpec[];
@@ -455,6 +455,100 @@ export const RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1 = {
455
455
  icon: '@primer/octicons-react:shield',
456
456
  emoji: '🛡️',
457
457
  };
458
+ export const SOCIAL_ACCOUNTS_BACKEND_TOOL_SPEC_0_0_1 = {
459
+ id: 'social-accounts',
460
+ version: '0.0.1',
461
+ name: 'Social Accounts',
462
+ description: "Read which of X, Bluesky and LinkedIn the person linked in Settings, and the handle or name of each, through Datalayer's IAM; no account's token ever reaches the agent.",
463
+ tags: ['social', 'datalayer-social'],
464
+ enabled: true,
465
+ approval: 'auto',
466
+ timeout: undefined,
467
+ requiresApproval: false,
468
+ runtime: {
469
+ language: 'python',
470
+ package: 'agent_runtimes.tools.social',
471
+ method: 'social_accounts',
472
+ },
473
+ icon: '@primer/octicons-react:person',
474
+ emoji: '🪪',
475
+ };
476
+ export const SOCIAL_COMMENT_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1 = {
477
+ id: 'social-comment-linkedin',
478
+ version: '0.0.1',
479
+ name: 'Comment on LinkedIn',
480
+ description: "Comment as the person under one LinkedIn post they name by its address, through Datalayer's IAM; it waits for the person's approval every time.",
481
+ tags: ['social', 'linkedin', 'datalayer-social'],
482
+ enabled: true,
483
+ approval: 'manual',
484
+ timeout: undefined,
485
+ requiresApproval: true,
486
+ runtime: {
487
+ language: 'python',
488
+ package: 'agent_runtimes.tools.social',
489
+ method: 'comment_on_linkedin',
490
+ },
491
+ linkedAccounts: ['linkedin'],
492
+ icon: '@datalayer/icons-react:linked-in',
493
+ emoji: '💬',
494
+ };
495
+ export const SOCIAL_POST_BLUESKY_BACKEND_TOOL_SPEC_0_0_1 = {
496
+ id: 'social-post-bluesky',
497
+ version: '0.0.1',
498
+ name: 'Post to Bluesky',
499
+ description: "Publish one post on the person's own Bluesky account, linked in Settings, with up to four PNG or JPEG images and their alt text, through Datalayer's IAM; it waits for the person's approval every time.",
500
+ tags: ['social', 'bluesky', 'datalayer-social'],
501
+ enabled: true,
502
+ approval: 'manual',
503
+ timeout: undefined,
504
+ requiresApproval: true,
505
+ runtime: {
506
+ language: 'python',
507
+ package: 'agent_runtimes.tools.social',
508
+ method: 'post_to_bluesky',
509
+ },
510
+ linkedAccounts: ['bluesky'],
511
+ icon: '@datalayer/icons-react:bluesky',
512
+ emoji: '🦋',
513
+ };
514
+ export const SOCIAL_POST_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1 = {
515
+ id: 'social-post-linkedin',
516
+ version: '0.0.1',
517
+ name: 'Post to LinkedIn',
518
+ description: "Publish one post on the person's own LinkedIn profile, linked in Settings, with one PNG or JPEG image and its alt text, through Datalayer's IAM; it waits for the person's approval every time.",
519
+ tags: ['social', 'linkedin', 'datalayer-social'],
520
+ enabled: true,
521
+ approval: 'manual',
522
+ timeout: undefined,
523
+ requiresApproval: true,
524
+ runtime: {
525
+ language: 'python',
526
+ package: 'agent_runtimes.tools.social',
527
+ method: 'post_to_linkedin',
528
+ },
529
+ linkedAccounts: ['linkedin'],
530
+ icon: '@datalayer/icons-react:linked-in',
531
+ emoji: '💼',
532
+ };
533
+ export const SOCIAL_POST_X_BACKEND_TOOL_SPEC_0_0_1 = {
534
+ id: 'social-post-x',
535
+ version: '0.0.1',
536
+ name: 'Post to X',
537
+ description: "Publish one post on the person's own X account, linked in Settings, with up to four PNG or JPEG images, through Datalayer's IAM; it waits for the person's approval every time.",
538
+ tags: ['social', 'x', 'datalayer-social'],
539
+ enabled: true,
540
+ approval: 'manual',
541
+ timeout: undefined,
542
+ requiresApproval: true,
543
+ runtime: {
544
+ language: 'python',
545
+ package: 'agent_runtimes.tools.social',
546
+ method: 'post_to_x',
547
+ },
548
+ linkedAccounts: ['x'],
549
+ icon: '@datalayer/icons-react:x',
550
+ emoji: '✖️',
551
+ };
458
552
  export const UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1 = {
459
553
  id: 'update-plan-step',
460
554
  version: '0.0.1',
@@ -502,6 +596,11 @@ export const BACKEND_TOOL_CATALOG = {
502
596
  'runtime-echo': RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1,
503
597
  'runtime-send-mail': RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1,
504
598
  'runtime-sensitive-echo': RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1,
599
+ 'social-accounts': SOCIAL_ACCOUNTS_BACKEND_TOOL_SPEC_0_0_1,
600
+ 'social-comment-linkedin': SOCIAL_COMMENT_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1,
601
+ 'social-post-bluesky': SOCIAL_POST_BLUESKY_BACKEND_TOOL_SPEC_0_0_1,
602
+ 'social-post-linkedin': SOCIAL_POST_LINKEDIN_BACKEND_TOOL_SPEC_0_0_1,
603
+ 'social-post-x': SOCIAL_POST_X_BACKEND_TOOL_SPEC_0_0_1,
505
604
  'update-plan-step': UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1,
506
605
  };
507
606
  export function getBackendToolSpecs() {
@@ -962,6 +962,11 @@ export interface AppConnectionSpec {
962
962
  as: 'owner' | 'user';
963
963
  /** The tools it may use, by name or pattern; all when empty. */
964
964
  only: string[];
965
+ /**
966
+ * Whether it runs without this connection when its secrets are not set up,
967
+ * as its agent does (agentspecs 0.0.189): only a server its agent says optional.
968
+ */
969
+ optional?: boolean;
965
970
  }
966
971
  /** How a Personal Agent Protocol company is reached (PAP §3.1). */
967
972
  export type PapInterface = 'agent' | 'openapi' | 'mcp' | 'web';
@@ -1878,11 +1883,17 @@ export declare const isAgentspecOffered: (spec: Pick<Agentspec, "enabled" | "lis
1878
1883
  export interface AgentspecOptional {
1879
1884
  mcpServers: string[];
1880
1885
  skills: string[];
1886
+ /**
1887
+ * Backend tools set up by an account the person links in Settings
1888
+ * (`linkedAccounts`, agentspecs 0.0.189): the posting tools of
1889
+ * datalayer-social, left out while that account is not linked.
1890
+ */
1891
+ backendTools?: string[];
1881
1892
  atLeastOne: string[][];
1882
1893
  }
1883
- /** A component of an agent: one of its MCP servers or skills. */
1884
- export type AgentspecComponentKind = 'mcpServer' | 'skill';
1885
- /** Whether the agent starts without this MCP server or skill when its secrets are not set up. */
1894
+ /** A component of an agent: one of its MCP servers, skills or backend tools. */
1895
+ export type AgentspecComponentKind = 'mcpServer' | 'skill' | 'backendTool';
1896
+ /** Whether the agent starts without this MCP server, skill or backend tool when it is not set up. */
1886
1897
  export declare const isAgentspecComponentOptional: (spec: Pick<Agentspec, "optional"> | undefined | null, kind: AgentspecComponentKind, id: string) => boolean;
1887
1898
  /**
1888
1899
  * The groups of an agent's optional components none of which is set up:
@@ -12,9 +12,13 @@ export const stagedRefOf = (stage) => stage.scene || stage.app || stage.battle;
12
12
  */
13
13
  export const isAgentspecOffered = (spec) => spec?.enabled === true && spec.listed !== false;
14
14
  const componentIdOf = (ref) => String(ref ?? '').split(':')[0];
15
- /** Whether the agent starts without this MCP server or skill when its secrets are not set up. */
15
+ /** Whether the agent starts without this MCP server, skill or backend tool when it is not set up. */
16
16
  export const isAgentspecComponentOptional = (spec, kind, id) => {
17
- const listed = kind === 'mcpServer' ? spec?.optional?.mcpServers : spec?.optional?.skills;
17
+ const listed = kind === 'mcpServer'
18
+ ? spec?.optional?.mcpServers
19
+ : kind === 'skill'
20
+ ? spec?.optional?.skills
21
+ : spec?.optional?.backendTools;
18
22
  return (listed ?? []).includes(componentIdOf(id));
19
23
  };
20
24
  /**
@@ -33,6 +33,11 @@ export interface BackendToolSpec {
33
33
  requiresApproval?: boolean;
34
34
  /** Runtime binding metadata */
35
35
  runtime: BackendToolRuntimeSpec;
36
+ /**
37
+ * The accounts the person links in Settings that set it up, one of them
38
+ * enough (`x`, `bluesky`; agentspecs 0.0.189): no secret is pasted for it.
39
+ */
40
+ linkedAccounts?: string[];
36
41
  /** The icon, `<package>:<name>` — `@datalayer/icons-react:odoo` (agentspecs.marks; see `SpecMark`) */
37
42
  icon?: string;
38
43
  /** Drawn where there is no icon */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.6.50",
3
+ "version": "1.6.53",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -517,8 +517,10 @@ def check_model_additionals(
517
517
  def optional_of(spec: Dict[str, Any]) -> Dict[str, Any] | None:
518
518
  """What an agent starts without (agentspecs 0.0.188), by id without version.
519
519
 
520
- Refuses an entry that is not among the agent's own MCP servers or skills,
521
- and a group naming what is not optional: the catalogue says it once.
520
+ Refuses an entry that is not among the agent's own MCP servers, skills or
521
+ backend tools (a backend tool set up by a linked account, 0.0.189), and a
522
+ group naming what is not optional: the catalogue says it once. The backend
523
+ tools are said only when there are some, so the other agents read as before.
522
524
  """
523
525
  optional = spec.get("optional")
524
526
  if optional is None:
@@ -526,12 +528,15 @@ def optional_of(spec: Dict[str, Any]) -> Dict[str, Any] | None:
526
528
  base = lambda ref: str(ref).split(":")[0] # noqa: E731
527
529
  servers = [base(ref) for ref in optional.get("mcp_servers") or []]
528
530
  skills = [base(ref) for ref in optional.get("skills") or []]
531
+ tools = [base(ref) for ref in optional.get("backend_tools") or []]
529
532
  own_servers = {base(ref) for ref in spec.get("mcp_servers") or []}
530
533
  own_skills = {base(ref) for ref in spec.get("skills") or []}
534
+ own_tools = {base(ref) for ref in spec.get("backend_tools") or []}
531
535
  agent = spec.get("id")
532
536
  for kind, named, own in (
533
537
  ("MCP server", servers, own_servers),
534
538
  ("skill", skills, own_skills),
539
+ ("backend tool", tools, own_tools),
535
540
  ):
536
541
  for ref in named:
537
542
  if ref not in own:
@@ -541,9 +546,13 @@ def optional_of(spec: Dict[str, Any]) -> Dict[str, Any] | None:
541
546
  ]
542
547
  for group in groups:
543
548
  for ref in group:
544
- if ref not in servers and ref not in skills:
549
+ if ref not in servers and ref not in skills and ref not in tools:
545
550
  raise SystemExit(f"{agent}: {ref} in at_least_one is not optional")
546
- return {"mcp_servers": servers, "skills": skills, "at_least_one": groups}
551
+ said: Dict[str, Any] = {"mcp_servers": servers, "skills": skills}
552
+ if tools:
553
+ said["backend_tools"] = tools
554
+ said["at_least_one"] = groups
555
+ return said
547
556
 
548
557
 
549
558
  def generate_python_code(specs: List[tuple[str, Dict[str, Any]]]) -> str:
@@ -1355,6 +1364,11 @@ const FRONTEND_TOOL_MAP: Record<string, any> = {
1355
1364
  {
1356
1365
  "mcpServers": optional["mcp_servers"],
1357
1366
  "skills": optional["skills"],
1367
+ **(
1368
+ {"backendTools": optional["backend_tools"]}
1369
+ if optional.get("backend_tools")
1370
+ else {}
1371
+ ),
1358
1372
  "atLeastOne": optional["at_least_one"],
1359
1373
  }
1360
1374
  )
@@ -135,6 +135,11 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
135
135
  f' package="{runtime["package"]}",',
136
136
  f' method="{runtime["method"]}",',
137
137
  " ),",
138
+ *(
139
+ [f" linked_accounts={_fmt_list(spec['linked_accounts'])},"]
140
+ if spec.get("linked_accounts")
141
+ else []
142
+ ),
138
143
  f" icon={icon},",
139
144
  f" emoji={emoji},",
140
145
  ")",
@@ -238,6 +243,11 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
238
243
  f" package: '{runtime['package']}',",
239
244
  f" method: '{runtime['method']}',",
240
245
  " },",
246
+ *(
247
+ [f" linkedAccounts: {json.dumps(list(spec['linked_accounts']))},"]
248
+ if spec.get("linked_accounts")
249
+ else []
250
+ ),
241
251
  f" icon: {icon},",
242
252
  f" emoji: {emoji},",
243
253
  "};",