@coasys/ad4m 0.13.0-test-2 → 0.13.0-test-4

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 (347) hide show
  1. package/README.md +2 -25
  2. package/jest-setup.ts +1 -1
  3. package/lib/index.cjs +2805 -10556
  4. package/lib/index.js +2513 -10322
  5. package/lib/src/Ad4mClient.d.ts +7 -3
  6. package/lib/src/Ad4mClient.js +29 -13
  7. package/lib/src/agent/Agent.js +26 -272
  8. package/lib/src/agent/AgentClient.d.ts +10 -21
  9. package/lib/src/agent/AgentClient.js +75 -427
  10. package/lib/src/agent/AgentStatus.js +2 -37
  11. package/lib/src/ai/AIClient.d.ts +12 -4
  12. package/lib/src/ai/AIClient.js +81 -285
  13. package/lib/src/ai/AITypes.d.ts +55 -0
  14. package/lib/src/ai/AITypes.js +18 -0
  15. package/lib/src/ai/Tasks.js +10 -133
  16. package/lib/src/apiClient.d.ts +52 -0
  17. package/lib/src/apiClient.js +231 -0
  18. package/lib/src/expression/Expression.d.ts +1 -1
  19. package/lib/src/expression/Expression.js +13 -122
  20. package/lib/src/expression/ExpressionClient.d.ts +3 -3
  21. package/lib/src/expression/ExpressionClient.js +13 -76
  22. package/lib/src/expression/ExpressionRef.js +2 -25
  23. package/lib/src/generated/api/AIModelLoadingStatus.d.ts +7 -0
  24. package/lib/src/generated/api/AIModelLoadingStatus.js +2 -0
  25. package/lib/src/generated/api/AddLinkExpressionRequest.d.ts +6 -0
  26. package/lib/src/generated/api/AddLinkExpressionRequest.js +1 -0
  27. package/lib/src/generated/api/AddLinkRequest.d.ts +6 -0
  28. package/lib/src/generated/api/AddLinkRequest.js +1 -0
  29. package/lib/src/generated/api/AddLinksBulkRequest.d.ts +6 -0
  30. package/lib/src/generated/api/AddLinksBulkRequest.js +1 -0
  31. package/lib/src/generated/api/AddSdnaRequest.d.ts +6 -0
  32. package/lib/src/generated/api/AddSdnaRequest.js +2 -0
  33. package/lib/src/generated/api/ApplyTemplateRequest.d.ts +4 -0
  34. package/lib/src/generated/api/ApplyTemplateRequest.js +2 -0
  35. package/lib/src/generated/api/AuthInfoInput.d.ts +10 -0
  36. package/lib/src/generated/api/AuthInfoInput.js +1 -0
  37. package/lib/src/generated/api/CapabilityInput.d.ts +5 -0
  38. package/lib/src/generated/api/CapabilityInput.js +1 -0
  39. package/lib/src/generated/api/CommitBatchRequest.d.ts +3 -0
  40. package/lib/src/generated/api/CommitBatchRequest.js +2 -0
  41. package/lib/src/generated/api/ComputeLogEntry.d.ts +9 -0
  42. package/lib/src/generated/api/ComputeLogEntry.js +2 -0
  43. package/lib/src/generated/api/CreateExpressionRequest.d.ts +4 -0
  44. package/lib/src/generated/api/CreateExpressionRequest.js +2 -0
  45. package/lib/src/generated/api/CreatePerspectiveRequest.d.ts +3 -0
  46. package/lib/src/generated/api/CreatePerspectiveRequest.js +2 -0
  47. package/lib/src/generated/api/CreateSubjectRequest.d.ts +6 -0
  48. package/lib/src/generated/api/CreateSubjectRequest.js +2 -0
  49. package/lib/src/generated/api/EmbedRequest.d.ts +4 -0
  50. package/lib/src/generated/api/EmbedRequest.js +2 -0
  51. package/lib/src/generated/api/EntanglementProofInput.d.ts +6 -0
  52. package/lib/src/generated/api/EntanglementProofInput.js +2 -0
  53. package/lib/src/generated/api/ExecuteCommandsRequest.d.ts +4 -0
  54. package/lib/src/generated/api/ExecuteCommandsRequest.js +2 -0
  55. package/lib/src/generated/api/ExportRequest.d.ts +5 -0
  56. package/lib/src/generated/api/ExportRequest.js +2 -0
  57. package/lib/src/generated/api/ExpressionManyRequest.d.ts +3 -0
  58. package/lib/src/generated/api/ExpressionManyRequest.js +2 -0
  59. package/lib/src/generated/api/ExpressionProof.d.ts +4 -0
  60. package/lib/src/generated/api/ExpressionProof.js +2 -0
  61. package/lib/src/generated/api/ExpressionProofInput.d.ts +6 -0
  62. package/lib/src/generated/api/ExpressionProofInput.js +2 -0
  63. package/lib/src/generated/api/FriendSendMessageRequest.d.ts +3 -0
  64. package/lib/src/generated/api/FriendSendMessageRequest.js +2 -0
  65. package/lib/src/generated/api/FriendsListRequest.d.ts +3 -0
  66. package/lib/src/generated/api/FriendsListRequest.js +2 -0
  67. package/lib/src/generated/api/GenerateAgentRequest.d.ts +3 -0
  68. package/lib/src/generated/api/GenerateAgentRequest.js +2 -0
  69. package/lib/src/generated/api/GenerateJwtRequest.d.ts +4 -0
  70. package/lib/src/generated/api/GenerateJwtRequest.js +2 -0
  71. package/lib/src/generated/api/GetSubjectDataRequest.d.ts +4 -0
  72. package/lib/src/generated/api/GetSubjectDataRequest.js +2 -0
  73. package/lib/src/generated/api/ImportAgentRequest.d.ts +6 -0
  74. package/lib/src/generated/api/ImportAgentRequest.js +2 -0
  75. package/lib/src/generated/api/ImportRequest.d.ts +4 -0
  76. package/lib/src/generated/api/ImportRequest.js +2 -0
  77. package/lib/src/generated/api/JoinNeighbourhoodRequest.d.ts +3 -0
  78. package/lib/src/generated/api/JoinNeighbourhoodRequest.js +2 -0
  79. package/lib/src/generated/api/LanguageMetaInput.d.ts +6 -0
  80. package/lib/src/generated/api/LanguageMetaInput.js +2 -0
  81. package/lib/src/generated/api/Link.d.ts +5 -0
  82. package/lib/src/generated/api/Link.js +2 -0
  83. package/lib/src/generated/api/LinkExpression.d.ts +10 -0
  84. package/lib/src/generated/api/LinkExpression.js +1 -0
  85. package/lib/src/generated/api/LinkExpressionInput.d.ts +10 -0
  86. package/lib/src/generated/api/LinkExpressionInput.js +1 -0
  87. package/lib/src/generated/api/LinkInput.d.ts +5 -0
  88. package/lib/src/generated/api/LinkInput.js +2 -0
  89. package/lib/src/generated/api/LinkLanguageTemplatesRequest.d.ts +3 -0
  90. package/lib/src/generated/api/LinkLanguageTemplatesRequest.js +2 -0
  91. package/lib/src/generated/api/LinkMutations.d.ts +6 -0
  92. package/lib/src/generated/api/LinkMutations.js +1 -0
  93. package/lib/src/generated/api/LinkStatus.d.ts +1 -0
  94. package/lib/src/generated/api/LinkStatus.js +2 -0
  95. package/lib/src/generated/api/LockAgentRequest.d.ts +3 -0
  96. package/lib/src/generated/api/LockAgentRequest.js +2 -0
  97. package/lib/src/generated/api/ModelType.d.ts +1 -0
  98. package/lib/src/generated/api/ModelType.js +2 -0
  99. package/lib/src/generated/api/NotificationInput.d.ts +10 -0
  100. package/lib/src/generated/api/NotificationInput.js +2 -0
  101. package/lib/src/generated/api/OpenLinkRequest.d.ts +3 -0
  102. package/lib/src/generated/api/OpenLinkRequest.js +2 -0
  103. package/lib/src/generated/api/PermitCapabilityRequest.d.ts +3 -0
  104. package/lib/src/generated/api/PermitCapabilityRequest.js +2 -0
  105. package/lib/src/generated/api/PerspectiveInput.d.ts +4 -0
  106. package/lib/src/generated/api/PerspectiveInput.js +1 -0
  107. package/lib/src/generated/api/PromptRequest.d.ts +4 -0
  108. package/lib/src/generated/api/PromptRequest.js +2 -0
  109. package/lib/src/generated/api/PublishLanguageRequest.d.ts +5 -0
  110. package/lib/src/generated/api/PublishLanguageRequest.js +1 -0
  111. package/lib/src/generated/api/PublishNeighbourhoodRequest.d.ts +6 -0
  112. package/lib/src/generated/api/PublishNeighbourhoodRequest.js +1 -0
  113. package/lib/src/generated/api/QueryRequest.d.ts +7 -0
  114. package/lib/src/generated/api/QueryRequest.js +2 -0
  115. package/lib/src/generated/api/RemoveLinkRequest.d.ts +5 -0
  116. package/lib/src/generated/api/RemoveLinkRequest.js +1 -0
  117. package/lib/src/generated/api/RemoveLinksBulkRequest.d.ts +5 -0
  118. package/lib/src/generated/api/RemoveLinksBulkRequest.js +1 -0
  119. package/lib/src/generated/api/ResourceInput.d.ts +4 -0
  120. package/lib/src/generated/api/ResourceInput.js +2 -0
  121. package/lib/src/generated/api/SetDefaultModelRequest.d.ts +4 -0
  122. package/lib/src/generated/api/SetDefaultModelRequest.js +1 -0
  123. package/lib/src/generated/api/SetFreeHostingEnabledRequest.d.ts +3 -0
  124. package/lib/src/generated/api/SetFreeHostingEnabledRequest.js +2 -0
  125. package/lib/src/generated/api/SetMultiUserRequest.d.ts +3 -0
  126. package/lib/src/generated/api/SetMultiUserRequest.js +2 -0
  127. package/lib/src/generated/api/SetStatusRequest.d.ts +3 -0
  128. package/lib/src/generated/api/SetStatusRequest.js +2 -0
  129. package/lib/src/generated/api/SignMessageRequest.d.ts +3 -0
  130. package/lib/src/generated/api/SignMessageRequest.js +2 -0
  131. package/lib/src/generated/api/TrustedAgentsRequest.d.ts +3 -0
  132. package/lib/src/generated/api/TrustedAgentsRequest.js +2 -0
  133. package/lib/src/generated/api/UnlockAgentRequest.d.ts +4 -0
  134. package/lib/src/generated/api/UnlockAgentRequest.js +2 -0
  135. package/lib/src/generated/api/UpdateLinkRequest.d.ts +7 -0
  136. package/lib/src/generated/api/UpdateLinkRequest.js +1 -0
  137. package/lib/src/generated/api/UpdatePerspectiveRequest.d.ts +3 -0
  138. package/lib/src/generated/api/UpdatePerspectiveRequest.js +2 -0
  139. package/lib/src/generated/api/UserStatistics.d.ts +9 -0
  140. package/lib/src/generated/api/UserStatistics.js +2 -0
  141. package/lib/src/generated/api/VerificationRequestResult.d.ts +6 -0
  142. package/lib/src/generated/api/VerificationRequestResult.js +2 -0
  143. package/lib/src/generated/api/VerifySignatureRequest.d.ts +5 -0
  144. package/lib/src/generated/api/VerifySignatureRequest.js +2 -0
  145. package/lib/src/generated/api/WriteSettingsRequest.d.ts +3 -0
  146. package/lib/src/generated/api/WriteSettingsRequest.js +2 -0
  147. package/lib/src/generated/api/index.d.ts +42 -0
  148. package/lib/src/generated/api/index.js +7 -0
  149. package/lib/src/index.d.ts +6 -2
  150. package/lib/src/index.js +6 -2
  151. package/lib/src/jestSetup.d.ts +0 -1
  152. package/lib/src/jestSetup.js +1 -1
  153. package/lib/src/language/Icon.js +2 -21
  154. package/lib/src/language/Language.d.ts +26 -214
  155. package/lib/src/language/Language.js +32 -72
  156. package/lib/src/language/LanguageClient.d.ts +2 -2
  157. package/lib/src/language/LanguageClient.js +15 -105
  158. package/lib/src/language/LanguageHandle.js +2 -41
  159. package/lib/src/language/LanguageMeta.js +4 -75
  160. package/lib/src/language/LanguageRef.js +2 -25
  161. package/lib/src/links/Links.js +14 -111
  162. package/lib/src/model/Ad4mModel.d.ts +81 -38
  163. package/lib/src/model/Ad4mModel.js +651 -408
  164. package/lib/src/model/Ad4mModel.test.js +488 -750
  165. package/lib/src/model/ModelQueryBuilder.d.ts +28 -21
  166. package/lib/src/model/ModelQueryBuilder.js +160 -195
  167. package/lib/src/model/decorators.d.ts +22 -0
  168. package/lib/src/model/decorators.js +7 -0
  169. package/lib/src/model/hydration-batching.test.d.ts +7 -0
  170. package/lib/src/model/hydration-batching.test.js +456 -0
  171. package/lib/src/model/hydration.d.ts +8 -60
  172. package/lib/src/model/hydration.js +41 -541
  173. package/lib/src/model/index.d.ts +0 -4
  174. package/lib/src/model/index.js +0 -4
  175. package/lib/src/model/model-manifest.d.ts +41 -0
  176. package/lib/src/model/model-manifest.js +11 -0
  177. package/lib/src/model/query-sparql.d.ts +36 -22
  178. package/lib/src/model/query-sparql.js +188 -53
  179. package/lib/src/model/query-sparql.test.d.ts +1 -0
  180. package/lib/src/model/query-sparql.test.js +312 -0
  181. package/lib/src/model/query-utils.js +4 -0
  182. package/lib/src/model/shacl-gen.js +4 -0
  183. package/lib/src/model/subscription-delta.test.d.ts +24 -0
  184. package/lib/src/model/subscription-delta.test.js +180 -0
  185. package/lib/src/model/subscription-pool.js +48 -2
  186. package/lib/src/model/types.d.ts +58 -1
  187. package/lib/src/model/types.js +4 -1
  188. package/lib/src/neighbourhood/Neighbourhood.js +4 -32
  189. package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +3 -3
  190. package/lib/src/neighbourhood/NeighbourhoodClient.js +40 -203
  191. package/lib/src/perspectives/LinkQuery.js +2 -42
  192. package/lib/src/perspectives/Perspective.d.ts +1 -1
  193. package/lib/src/perspectives/Perspective.js +10 -52
  194. package/lib/src/perspectives/PerspectiveClient.d.ts +12 -15
  195. package/lib/src/perspectives/PerspectiveClient.js +168 -400
  196. package/lib/src/perspectives/PerspectiveClient.test.d.ts +1 -0
  197. package/lib/src/perspectives/PerspectiveClient.test.js +224 -0
  198. package/lib/src/perspectives/PerspectiveDiff.js +4 -31
  199. package/lib/src/perspectives/PerspectiveHandle.js +3 -43
  200. package/lib/src/perspectives/PerspectiveProxy.d.ts +95 -71
  201. package/lib/src/perspectives/PerspectiveProxy.js +288 -310
  202. package/lib/src/runtime/RuntimeClient.d.ts +6 -6
  203. package/lib/src/runtime/RuntimeClient.js +93 -467
  204. package/lib/src/runtime/RuntimeTypes.d.ts +101 -0
  205. package/lib/src/runtime/RuntimeTypes.js +45 -0
  206. package/lib/src/shacl/SHACLShape.d.ts +7 -0
  207. package/lib/src/shacl/SHACLShape.js +19 -0
  208. package/lib/src/shacl/SHACLShape.test.js +82 -0
  209. package/lib/src/typeDefs.js +3 -628
  210. package/package.json +9 -24
  211. package/rollup.config.js +0 -7
  212. package/src/Ad4mClient.test.ts +1182 -1288
  213. package/src/Ad4mClient.ts +30 -15
  214. package/src/agent/Agent.ts +0 -99
  215. package/src/agent/AgentClient.ts +112 -526
  216. package/src/agent/AgentStatus.ts +0 -12
  217. package/src/ai/AIClient.ts +96 -296
  218. package/src/ai/AITypes.ts +66 -0
  219. package/src/ai/Tasks.ts +0 -52
  220. package/src/apiClient.ts +283 -0
  221. package/src/expression/Expression.ts +3 -43
  222. package/src/expression/ExpressionClient.ts +14 -77
  223. package/src/expression/ExpressionRef.ts +0 -6
  224. package/src/generated/api/AIModelLoadingStatus.ts +3 -0
  225. package/src/generated/api/AddLinkExpressionRequest.ts +4 -0
  226. package/src/generated/api/AddLinkRequest.ts +4 -0
  227. package/src/generated/api/AddLinksBulkRequest.ts +4 -0
  228. package/src/generated/api/AddSdnaRequest.ts +3 -0
  229. package/src/generated/api/ApplyTemplateRequest.ts +3 -0
  230. package/src/generated/api/AuthInfoInput.ts +4 -0
  231. package/src/generated/api/CapabilityInput.ts +4 -0
  232. package/src/generated/api/CommitBatchRequest.ts +3 -0
  233. package/src/generated/api/ComputeLogEntry.ts +3 -0
  234. package/src/generated/api/CreateExpressionRequest.ts +3 -0
  235. package/src/generated/api/CreatePerspectiveRequest.ts +3 -0
  236. package/src/generated/api/CreateSubjectRequest.ts +3 -0
  237. package/src/generated/api/EmbedRequest.ts +3 -0
  238. package/src/generated/api/EntanglementProofInput.ts +3 -0
  239. package/src/generated/api/ExecuteCommandsRequest.ts +3 -0
  240. package/src/generated/api/ExportRequest.ts +3 -0
  241. package/src/generated/api/ExpressionManyRequest.ts +3 -0
  242. package/src/generated/api/ExpressionProof.ts +3 -0
  243. package/src/generated/api/ExpressionProofInput.ts +3 -0
  244. package/src/generated/api/FriendSendMessageRequest.ts +3 -0
  245. package/src/generated/api/FriendsListRequest.ts +3 -0
  246. package/src/generated/api/GenerateAgentRequest.ts +3 -0
  247. package/src/generated/api/GenerateJwtRequest.ts +3 -0
  248. package/src/generated/api/GetSubjectDataRequest.ts +3 -0
  249. package/src/generated/api/ImportAgentRequest.ts +3 -0
  250. package/src/generated/api/ImportRequest.ts +3 -0
  251. package/src/generated/api/JoinNeighbourhoodRequest.ts +3 -0
  252. package/src/generated/api/LanguageMetaInput.ts +3 -0
  253. package/src/generated/api/Link.ts +3 -0
  254. package/src/generated/api/LinkExpression.ts +6 -0
  255. package/src/generated/api/LinkExpressionInput.ts +6 -0
  256. package/src/generated/api/LinkInput.ts +3 -0
  257. package/src/generated/api/LinkLanguageTemplatesRequest.ts +3 -0
  258. package/src/generated/api/LinkMutations.ts +5 -0
  259. package/src/generated/api/LinkStatus.ts +3 -0
  260. package/src/generated/api/LockAgentRequest.ts +3 -0
  261. package/src/generated/api/ModelType.ts +3 -0
  262. package/src/generated/api/NotificationInput.ts +3 -0
  263. package/src/generated/api/OpenLinkRequest.ts +3 -0
  264. package/src/generated/api/PermitCapabilityRequest.ts +3 -0
  265. package/src/generated/api/PerspectiveInput.ts +4 -0
  266. package/src/generated/api/PromptRequest.ts +3 -0
  267. package/src/generated/api/PublishLanguageRequest.ts +4 -0
  268. package/src/generated/api/PublishNeighbourhoodRequest.ts +4 -0
  269. package/src/generated/api/QueryRequest.ts +6 -0
  270. package/src/generated/api/RemoveLinkRequest.ts +4 -0
  271. package/src/generated/api/RemoveLinksBulkRequest.ts +4 -0
  272. package/src/generated/api/ResourceInput.ts +3 -0
  273. package/src/generated/api/SetDefaultModelRequest.ts +4 -0
  274. package/src/generated/api/SetFreeHostingEnabledRequest.ts +3 -0
  275. package/src/generated/api/SetMultiUserRequest.ts +3 -0
  276. package/src/generated/api/SetStatusRequest.ts +3 -0
  277. package/src/generated/api/SignMessageRequest.ts +3 -0
  278. package/src/generated/api/TrustedAgentsRequest.ts +3 -0
  279. package/src/generated/api/UnlockAgentRequest.ts +3 -0
  280. package/src/generated/api/UpdateLinkRequest.ts +5 -0
  281. package/src/generated/api/UpdatePerspectiveRequest.ts +3 -0
  282. package/src/generated/api/UserStatistics.ts +3 -0
  283. package/src/generated/api/VerificationRequestResult.ts +3 -0
  284. package/src/generated/api/VerifySignatureRequest.ts +3 -0
  285. package/src/generated/api/WriteSettingsRequest.ts +3 -0
  286. package/src/generated/api/index.ts +49 -0
  287. package/src/index.ts +6 -2
  288. package/src/jestSetup.ts +1 -1
  289. package/src/language/Icon.ts +0 -4
  290. package/src/language/Language.ts +50 -292
  291. package/src/language/LanguageClient.ts +21 -132
  292. package/src/language/LanguageHandle.ts +0 -14
  293. package/src/language/LanguageMeta.ts +0 -29
  294. package/src/language/LanguageRef.ts +0 -7
  295. package/src/links/Links.ts +0 -37
  296. package/src/model/Ad4mModel.test.ts +827 -808
  297. package/src/model/Ad4mModel.ts +676 -457
  298. package/src/model/ModelQueryBuilder.ts +199 -217
  299. package/src/model/decorators.ts +29 -0
  300. package/src/model/hydration.ts +17 -572
  301. package/src/model/index.ts +0 -4
  302. package/src/model/query-sparql.test.ts +360 -0
  303. package/src/model/query-sparql.ts +203 -56
  304. package/src/model/query-utils.ts +4 -0
  305. package/src/model/shacl-gen.ts +5 -0
  306. package/src/model/types.ts +62 -1
  307. package/src/neighbourhood/Neighbourhood.ts +0 -9
  308. package/src/neighbourhood/NeighbourhoodClient.ts +42 -207
  309. package/src/neighbourhood/NeighbourhoodProxy.test.ts +34 -36
  310. package/src/perspectives/LinkQuery.ts +0 -15
  311. package/src/perspectives/Perspective.ts +1 -12
  312. package/src/perspectives/PerspectiveClient.test.ts +262 -0
  313. package/src/perspectives/PerspectiveClient.ts +227 -412
  314. package/src/perspectives/PerspectiveDiff.ts +0 -8
  315. package/src/perspectives/PerspectiveHandle.ts +1 -12
  316. package/src/perspectives/PerspectiveProxy.test.ts +41 -0
  317. package/src/perspectives/PerspectiveProxy.ts +325 -348
  318. package/src/runtime/RuntimeClient.ts +112 -474
  319. package/src/runtime/RuntimeTypes.ts +144 -0
  320. package/src/shacl/SHACLShape.test.ts +94 -0
  321. package/src/shacl/SHACLShape.ts +27 -0
  322. package/src/typeDefs.ts +3 -5
  323. package/tsconfig.json +3 -7
  324. package/lib/src/model/query-surreal.d.ts +0 -44
  325. package/lib/src/model/query-surreal.js +0 -249
  326. package/lib/src/model/surreal-utils.d.ts +0 -42
  327. package/lib/src/model/surreal-utils.js +0 -128
  328. package/shims/reflect-metadata.ts +0 -0
  329. package/shims/type-graphql.ts +0 -75
  330. package/src/PubSub.ts +0 -17
  331. package/src/agent/AgentResolver.ts +0 -263
  332. package/src/ai/AIResolver.ts +0 -372
  333. package/src/buildSchema.ts +0 -43
  334. package/src/expression/ExpressionResolver.ts +0 -64
  335. package/src/language/LanguageContext.ts +0 -37
  336. package/src/language/LanguageResolver.ts +0 -98
  337. package/src/model/Subject.ts +0 -159
  338. package/src/model/hydration-batch.ts +0 -205
  339. package/src/model/prolog-facts.ts +0 -145
  340. package/src/model/query-prolog.ts +0 -148
  341. package/src/model/query-sparql-batch.ts +0 -301
  342. package/src/model/subscription-pool.ts +0 -163
  343. package/src/neighbourhood/NeighbourhoodResolver.ts +0 -100
  344. package/src/perspectives/PerspectiveResolver.ts +0 -364
  345. package/src/runtime/RuntimeResolver.ts +0 -749
  346. package/src/unwrapApolloResult.ts +0 -16
  347. package/tsconfig-browser.json +0 -82
@@ -0,0 +1,4 @@
1
+ export type PromptRequest = {
2
+ taskId: string;
3
+ prompt: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { LanguageMetaInput } from "./LanguageMetaInput";
2
+ export type PublishLanguageRequest = {
3
+ languagePath: string;
4
+ languageMeta: LanguageMetaInput;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { PerspectiveInput } from "./PerspectiveInput";
2
+ export type PublishNeighbourhoodRequest = {
3
+ perspectiveUuid: string;
4
+ linkLanguage: string;
5
+ meta: PerspectiveInput;
6
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Unified query request (harmonised: engine + query in one).
3
+ */
4
+ export type QueryRequest = {
5
+ engine: string;
6
+ query: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { LinkExpressionInput } from "./LinkExpressionInput";
2
+ export type RemoveLinkRequest = {
3
+ link: LinkExpressionInput;
4
+ batchId: string | null;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { LinkExpressionInput } from "./LinkExpressionInput";
2
+ export type RemoveLinksBulkRequest = {
3
+ links: Array<LinkExpressionInput>;
4
+ batchId: string | null;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type ResourceInput = {
2
+ domain: string;
3
+ pointers: Array<string>;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ModelType } from "./ModelType";
2
+ export type SetDefaultModelRequest = {
3
+ modelType: ModelType;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type SetFreeHostingEnabledRequest = {
2
+ enabled: boolean;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type SetMultiUserRequest = {
2
+ enabled: boolean;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type SetStatusRequest = {
2
+ status: any;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type SignMessageRequest = {
2
+ message: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type TrustedAgentsRequest = {
2
+ agents: Array<string>;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type UnlockAgentRequest = {
2
+ passphrase: string;
3
+ holochain: boolean | null;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { LinkExpressionInput } from "./LinkExpressionInput";
2
+ import type { LinkInput } from "./LinkInput";
3
+ export type UpdateLinkRequest = {
4
+ oldLink: LinkExpressionInput;
5
+ newLink: LinkInput;
6
+ batchId: string | null;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type UpdatePerspectiveRequest = {
2
+ name: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ export type UserStatistics = {
2
+ email: string;
3
+ did: string;
4
+ lastSeen: string | null;
5
+ perspectiveCount: number;
6
+ remainingCredits: string;
7
+ freeAccess: boolean;
8
+ hotWalletAddress: string | null;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export type VerificationRequestResult = {
2
+ success: boolean;
3
+ message: string;
4
+ requiresPassword: boolean;
5
+ isExistingUser: boolean;
6
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type VerifySignatureRequest = {
2
+ did: string;
3
+ data: string;
4
+ signedData: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type WriteSettingsRequest = {
2
+ settings: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,42 @@
1
+ export type { AddLinkExpressionRequest } from "./AddLinkExpressionRequest";
2
+ export type { AddLinkRequest } from "./AddLinkRequest";
3
+ export type { AddLinksBulkRequest } from "./AddLinksBulkRequest";
4
+ export type { AddSdnaRequest } from "./AddSdnaRequest";
5
+ export type { ApplyTemplateRequest } from "./ApplyTemplateRequest";
6
+ export type { CommitBatchRequest } from "./CommitBatchRequest";
7
+ export type { CreateExpressionRequest } from "./CreateExpressionRequest";
8
+ export type { CreatePerspectiveRequest } from "./CreatePerspectiveRequest";
9
+ export type { CreateSubjectRequest } from "./CreateSubjectRequest";
10
+ export type { EmbedRequest } from "./EmbedRequest";
11
+ export type { ExecuteCommandsRequest } from "./ExecuteCommandsRequest";
12
+ export type { ExportRequest } from "./ExportRequest";
13
+ export type { ExpressionManyRequest } from "./ExpressionManyRequest";
14
+ export type { FriendSendMessageRequest } from "./FriendSendMessageRequest";
15
+ export type { FriendsListRequest } from "./FriendsListRequest";
16
+ export type { GenerateAgentRequest } from "./GenerateAgentRequest";
17
+ export type { GenerateJwtRequest } from "./GenerateJwtRequest";
18
+ export type { GetSubjectDataRequest } from "./GetSubjectDataRequest";
19
+ export type { ImportAgentRequest } from "./ImportAgentRequest";
20
+ export type { ImportRequest } from "./ImportRequest";
21
+ export type { JoinNeighbourhoodRequest } from "./JoinNeighbourhoodRequest";
22
+ export type { LinkLanguageTemplatesRequest } from "./LinkLanguageTemplatesRequest";
23
+ export type { LockAgentRequest } from "./LockAgentRequest";
24
+ export type { OpenLinkRequest } from "./OpenLinkRequest";
25
+ export type { PermitCapabilityRequest } from "./PermitCapabilityRequest";
26
+ export type { PromptRequest } from "./PromptRequest";
27
+ export type { PublishLanguageRequest } from "./PublishLanguageRequest";
28
+ export type { PublishNeighbourhoodRequest } from "./PublishNeighbourhoodRequest";
29
+ export type { QueryRequest } from "./QueryRequest";
30
+ export type { RemoveLinkRequest } from "./RemoveLinkRequest";
31
+ export type { RemoveLinksBulkRequest } from "./RemoveLinksBulkRequest";
32
+ export type { SetDefaultModelRequest } from "./SetDefaultModelRequest";
33
+ export type { SetFreeHostingEnabledRequest } from "./SetFreeHostingEnabledRequest";
34
+ export type { SetMultiUserRequest } from "./SetMultiUserRequest";
35
+ export type { SetStatusRequest } from "./SetStatusRequest";
36
+ export type { SignMessageRequest } from "./SignMessageRequest";
37
+ export type { TrustedAgentsRequest } from "./TrustedAgentsRequest";
38
+ export type { UnlockAgentRequest } from "./UnlockAgentRequest";
39
+ export type { UpdateLinkRequest } from "./UpdateLinkRequest";
40
+ export type { UpdatePerspectiveRequest } from "./UpdatePerspectiveRequest";
41
+ export type { VerifySignatureRequest } from "./VerifySignatureRequest";
42
+ export type { WriteSettingsRequest } from "./WriteSettingsRequest";
@@ -0,0 +1,7 @@
1
+ // Auto-generated WS-RPC request/response types from Rust via ts-rs
2
+ // Do NOT edit manually — regenerate with: pnpm run generate:rest-types
3
+ //
4
+ // Note: Domain types (Link, LinkInput, LinkExpression, etc.) are NOT re-exported
5
+ // here to avoid conflicts with the hand-written domain classes in the SDK.
6
+ // Only request/response types are exported.
7
+ export {};
@@ -8,7 +8,6 @@ export * from "./expression/ExpressionRef";
8
8
  export * from "./language/Icon";
9
9
  export * from "./language/Language";
10
10
  export * from "./language/LanguageRef";
11
- export * from "./language/LanguageContext";
12
11
  export * from "./language/LanguageHandle";
13
12
  export * from "./language/LanguageMeta";
14
13
  export * from "./links/Links";
@@ -29,6 +28,11 @@ export * from "./utils";
29
28
  export * from "./agent/AgentClient";
30
29
  export * from "./ai/AIClient";
31
30
  export * from "./ai/Tasks";
32
- export * from "./runtime/RuntimeResolver";
31
+ export * from "./runtime/RuntimeTypes";
32
+ export { Model as AIModel, ModelApi, TokenizerSource, LocalModel, ModelType, ModelApiInput, TokenizerSourceInput, LocalModelInput, ModelInput, VoiceActivityParamsInput } from "./ai/AITypes";
33
33
  export * from './shacl/SHACLShape';
34
34
  export { SHACLFlow, FlowState, FlowTransition, LinkPattern, FlowableCondition } from './shacl/SHACLFlow';
35
+ export * from "./generated/api";
36
+ export { RpcError } from "./apiClient";
37
+ /** @deprecated Use `RpcError` instead. */
38
+ export { RpcError as RestError } from "./apiClient";
package/lib/src/index.js CHANGED
@@ -8,7 +8,6 @@ export * from "./expression/ExpressionRef";
8
8
  export * from "./language/Icon";
9
9
  export * from "./language/Language";
10
10
  export * from "./language/LanguageRef";
11
- export * from "./language/LanguageContext";
12
11
  export * from "./language/LanguageHandle";
13
12
  export * from "./language/LanguageMeta";
14
13
  export * from "./links/Links";
@@ -29,6 +28,11 @@ export * from "./utils";
29
28
  export * from "./agent/AgentClient";
30
29
  export * from "./ai/AIClient";
31
30
  export * from "./ai/Tasks";
32
- export * from "./runtime/RuntimeResolver";
31
+ export * from "./runtime/RuntimeTypes";
32
+ export { Model as AIModel, ModelApi, TokenizerSource, LocalModel, ModelApiInput, TokenizerSourceInput, LocalModelInput, ModelInput, VoiceActivityParamsInput } from "./ai/AITypes";
33
33
  export * from './shacl/SHACLShape';
34
34
  export { SHACLFlow } from './shacl/SHACLFlow';
35
+ export * from "./generated/api";
36
+ export { RpcError } from "./apiClient";
37
+ /** @deprecated Use `RpcError` instead. */
38
+ export { RpcError as RestError } from "./apiClient";
@@ -1 +0,0 @@
1
- import 'reflect-metadata';
@@ -1 +1 @@
1
- import 'reflect-metadata';
1
+ // Jest setup
@@ -1,24 +1,5 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Field, ObjectType } from "type-graphql";
11
- let Icon = class Icon {
1
+ export class Icon {
12
2
  constructor(code) {
13
3
  this.code = code;
14
4
  }
15
- };
16
- __decorate([
17
- Field(),
18
- __metadata("design:type", String)
19
- ], Icon.prototype, "code", void 0);
20
- Icon = __decorate([
21
- ObjectType(),
22
- __metadata("design:paramtypes", [String])
23
- ], Icon);
24
- export { Icon };
5
+ }
@@ -1,181 +1,23 @@
1
- import type { Address } from '../Address';
2
- import { DID } from '../DID';
3
- import type { Expression } from '../expression/Expression';
4
- import { Perspective, PerspectiveExpression } from '../perspectives/Perspective';
5
- import { PerspectiveDiff } from '../perspectives/PerspectiveDiff';
6
- import { PerspectiveState } from '../perspectives/PerspectiveHandle';
7
- import { LinkQuery } from '../perspectives/LinkQuery';
8
- /** Interface of AD4M Languages
1
+ import { DID } from "../DID";
2
+ import { PerspectiveExpression } from "../perspectives/Perspective";
3
+ /**
4
+ * # AD4M Language — client-side types
9
5
  *
10
- * Any JavaScript module that implements a create() function that returns an object that implements this interface
11
- * is a valid AD4M language.
12
- * So the AD4M-internal representation of a language is an object that implements this interface.
6
+ * This file only contains the client-visible types that the AD4M REST
7
+ * API exposes on top of a running Language — interaction metadata, online
8
+ * agent records, and the telepresence-signal callback shape.
13
9
  *
14
- * Since there are a few different kinds of languages, this interface is split into optional sub-interfaces.
15
- * The only required property is the name of the language.
10
+ * **If you're authoring an AD4M Language**, you don't consume types from
11
+ * here — use [`@coasys/ad4m-ldk`](https://www.npmjs.com/package/@coasys/ad4m-ldk)
12
+ * (or the [Rust ALDK](https://crates.io/crates/ad4m-ldk)), which provide
13
+ * the capability traits, typed runtime-import wrappers, and authoring
14
+ * macros/helpers.
16
15
  *
17
- * The most usual kind of language is the "Expression Language", which is a language that can be used to create
18
- * and share Expressions.
19
- * For that, implement the expressionsAdapter and expressionUI interface.
20
- *
21
- * The second most common kind of language is the "Link Language", which is a language that builds the core
22
- * of AD4M Neighbourhoods.
23
- * For that, implement the linksAdapter interface.
24
- */
25
- export interface Language {
26
- readonly name: string;
27
- /** Flagging expressions as immutable to enable
28
- * expression caching in the ad4m-executor
29
- */
30
- isImmutableExpression?(expression: Address): boolean;
31
- /** ExpressionAdapter implements means of getting an Expression
32
- * by address and putting an expression
33
- */
34
- readonly expressionAdapter?: ExpressionAdapter;
35
- /** Interface for getting UI/web components for rendering Expressions of this Language */
36
- readonly expressionUI?: ExpressionUI;
37
- /** Interface of LinkLanguages for the core implementation of Neighbourhoods */
38
- readonly perspectiveSyncAdapter?: PerspectiveSyncAdapter;
39
- /** Interface for Languages that implement a query return a Perspective (snapshot)
40
- * Used for back-links and wrapping of APIs that implement queries.
41
- */
42
- readonly pespectiveQueryAdapter?: PerspectiveQueryAdapter;
43
- /** Additional Interface of LinkLanguages that support telepresence features,
44
- * that is:
45
- * - seeing who is online and getting a status
46
- * - sending/receiveing p2p signals to other online agents without affecting
47
- * the shared Perspective of the Neighbourhood
48
- * (see TelepresenceAdapter for more details)
49
- */
50
- readonly telepresenceAdapter?: TelepresenceAdapter;
51
- /** Implementation of a Language that defines and stores Languages*/
52
- readonly languageAdapter?: LanguageAdapter;
53
- /** Optional adapter for getting Expressions by author */
54
- readonly getByAuthorAdapter?: GetByAuthorAdapter;
55
- /** Optional adapter for getting all Expressions */
56
- readonly getAllAdapter?: GetAllAdapter;
57
- /** Optional adapter for direct messaging between agents */
58
- readonly directMessageAdapter?: DirectMessageAdapter;
59
- /** Interface for providing UI components for the settings of this Language */
60
- readonly settingsUI?: SettingsUI;
61
- /** Optional function to make any cleanup/teardown if your language gets deleting in the ad4m-executor */
62
- readonly teardown?: () => void;
63
- /** All available interactions this agent could execute on given expression */
64
- interactions(expression: Address): Interaction[];
65
- }
66
- /** UI factories returning web components */
67
- export interface ExpressionUI {
68
- /** Returns JS code of a web component that renders the given expression */
69
- icon(): string;
70
- /** Returns JS code of a web component used to create new expressions */
71
- constructorIcon(): string;
72
- }
73
- export interface SettingsUI {
74
- settingsIcon(): string;
75
- }
76
- /** Interface for the most common Expression Languages */
77
- export interface ExpressionAdapter {
78
- /** Returns an Expression by address, or null if there is no Expression
79
- * with that given address
80
- */
81
- get(address: Address): Promise<Expression | null>;
82
- /** Strategy for putting an expression with needs to be different
83
- * for those two cases:
84
- * 1. PublicSharing means that this language supports the creation
85
- * and sharing of Expressions, which is the common use-case
86
- * 2. ReadOnlyLanguage means that the Language implements a pre-defined
87
- * set of expressions (which can be infinite or finite).
88
- * For example the url-iframe Language which directly maps URLs to
89
- * addresses - meaning every well formed URL is an address in this
90
- * Language. Or a potential Language implementing the verbs/predicates
91
- * of a spec like FOAF.
92
- */
93
- putAdapter: PublicSharing | ReadOnlyLanguage;
94
- }
95
- /** Implement this interface if your Language supports creation of sharing
96
- * of Expressions.
97
- * See ExpressionAdapter
98
- */
99
- export interface PublicSharing {
100
- /** Create an Expression and shares it.
101
- * Return the Expression's address.
102
- * @param content is the object created by the constructorIcon component
103
- */
104
- createPublic(content: object): Promise<Address>;
105
- }
106
- /** Implement this interface if your Language is defined over a static
107
- * set of pre-defined Expressions.
108
- */
109
- export interface ReadOnlyLanguage {
110
- /** This just calculates the address of an object
111
- * @param content is the object created by the constructorIcon component
112
- */
113
- addressOf(content: object): Promise<Address>;
114
- }
115
- export interface LanguageAdapter {
116
- getLanguageSource(address: Address): Promise<string>;
117
- }
118
- export interface GetByAuthorAdapter {
119
- getByAuthor(author: DID, count: number, page: number): Promise<Expression[] | null>;
120
- }
121
- export interface GetAllAdapter {
122
- getAll(filter: any, count: number, page: number): Promise<Expression[] | null>;
123
- }
124
- export type PerspectiveDiffObserver = (diff: PerspectiveDiff) => void;
125
- export type SyncStateChangeObserver = (state: PerspectiveState) => void;
126
- /** Interface for "Link Languages" that facilitate the synchronization
127
- * between agents' local Perspectives inside a Neighbourhood.
128
- * The assumption is that every version of the shared Perspective
129
- * is labeled with a unique revision string.
130
- * Changes are committed and retrieved through diffs.
131
- * Think of a PerspectiveSyncAdapter as a git branch to which agents commit
132
- * their changes to and pull diffs from their current revision
133
- * to the latest one.
16
+ * The normative interface definition lives in
17
+ * [`docs-src/ad4m-lang.wit`](https://github.com/coasys/ad4m/blob/dev/docs-src/ad4m-lang.wit).
18
+ * The prose spec is
19
+ * [`docs-src/language-interface-spec.md`](https://github.com/coasys/ad4m/blob/dev/docs-src/language-interface-spec.md).
134
20
  */
135
- export interface PerspectiveSyncAdapter {
136
- writable(): boolean;
137
- public(): boolean;
138
- others(): Promise<DID[]>;
139
- /** What revision are we on now -> what changes are included in output of render() */
140
- currentRevision(): Promise<string>;
141
- /**
142
- * Check for and get new changes,
143
- * notify others of local changes.
144
- * This function will be called every
145
- * few seconds by the ad4m-executor.
146
- * */
147
- sync(): Promise<PerspectiveDiff>;
148
- /** Returns the full, rendered Perspective at currentRevision */
149
- render(): Promise<Perspective>;
150
- /** Publish changes */
151
- commit(diff: PerspectiveDiff): Promise<string>;
152
- /** Get push notification when a diff got published */
153
- addCallback(callback: PerspectiveDiffObserver): any;
154
- /** Add a sync state callback method */
155
- addSyncStateChangeCallback(callback: SyncStateChangeObserver): any;
156
- /**
157
- * Set the local agents (DIDs) that own this perspective/neighbourhood.
158
- * This is used to determine which agents should be registered in the DHT.
159
- * Optional - if not implemented, all local agents may be registered.
160
- *
161
- * This is a temporary hack to support multiple users on one node joining the same neighbourhood.
162
- * Once we migrate the LanguageController to Rust and run Languages per user, each user will get their
163
- * own language instance and we won't need to explicitly set local agents. This will provide better
164
- * isolation and avoid the need to share language state between users.
165
- */
166
- setLocalAgents?(agents: DID[]): void;
167
- }
168
- export type MessageCallback = (message: PerspectiveExpression) => void;
169
- export type StatusCallback = (caller: DID) => Perspective;
170
- export interface DirectMessageAdapter {
171
- recipient(): DID;
172
- status(): Promise<PerspectiveExpression | void>;
173
- sendP2P(message: Perspective): Promise<PerspectiveExpression | void>;
174
- sendInbox(message: Perspective): Promise<PerspectiveExpression | void>;
175
- setStatus(status: PerspectiveExpression): any;
176
- inbox(filter?: string): Promise<PerspectiveExpression[]>;
177
- addMessageCallback(callback: MessageCallback): any;
178
- }
179
21
  export declare class InteractionParameter {
180
22
  name: string;
181
23
  type: string;
@@ -185,6 +27,12 @@ export declare class InteractionMeta {
185
27
  name: string;
186
28
  parameters: InteractionParameter[];
187
29
  }
30
+ /**
31
+ * Runtime-side interaction object. The runtime constructs one of these
32
+ * from a Language's `interactions(address)` description and exposes
33
+ * `execute()` to UI callers. Language authors describe interactions
34
+ * via the ALDK, not by constructing this type directly.
35
+ */
188
36
  export interface Interaction {
189
37
  readonly label: string;
190
38
  readonly name: string;
@@ -201,44 +49,8 @@ export declare class OnlineAgent {
201
49
  did: DID;
202
50
  status: PerspectiveExpression;
203
51
  }
204
- export type TelepresenceSignalCallback = (payload: PerspectiveExpression, recipientDid?: string) => void;
205
- export interface TelepresenceAdapter {
206
- setOnlineStatus(status: PerspectiveExpression): Promise<void>;
207
- getOnlineAgents(): Promise<OnlineAgent[]>;
208
- sendSignal(remoteAgentDid: string, payload: PerspectiveExpression): Promise<object>;
209
- sendBroadcast(payload: PerspectiveExpression): Promise<object>;
210
- registerSignalCallback(callback: TelepresenceSignalCallback): Promise<void>;
211
- }
212
- /** Interface for Languages that implement queries returning links, i.e. a Perspective (-snapshot)
213
- * Main differentiation between these Languages and LinkLanguages is that this enables
214
- * access to other shared perspectives without forcing a full-sync.
215
- *
216
- * All PerspectiveQuery Languages are supposed to implement `linkQuery` which is a simple graph query
217
- * specifying non or all of source, predicate, target of the links we want to get.
218
- * This is enough to implement simple back-links.
219
- *
220
- * Prolog queries are optional since this requires a Prolog engine to be available.
221
- *
52
+ /**
53
+ * Callback shape used by the client to receive telepresence signals
54
+ * from a Neighbourhood's link Language.
222
55
  */
223
- export interface PerspectiveQueryAdapter {
224
- /** Same semantic as PerspectiveProxy.get(LinkQuery) */
225
- linkQuery(query: LinkQuery): Promise<Perspective>;
226
- /** Tells ADAM if Prolog queries are implemented by this Language.
227
- * If not, prologQuery won't be used, instead in some circumstances,
228
- * linkQuery() might be called with an all-query, followed by using
229
- * ADAM's internal Prolog engine on the result.
230
- */
231
- supportsPrologQueries(): boolean;
232
- /** Same semantic as PerspectiveProxy.infer, will return plain Prolog results */
233
- infer(prologQuery: string): Promise<any>;
234
- /** Specify which links shall be returned through Prolog.
235
- * Assumes unbound variables in query that describe a LinkExpression:
236
- * - Source
237
- * - Predicate
238
- * - Target
239
- * - Author
240
- * - Timestamp
241
- * Will construct a Perspective where each link is a solution to the query.
242
- */
243
- prologQuery(query: string): Promise<Perspective>;
244
- }
56
+ export type TelepresenceSignalCallback = (payload: PerspectiveExpression, recipientDid?: string) => void;