aimeat 2.2.0 → 2.3.0

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 (1057) hide show
  1. package/README.md +110 -84
  2. package/dist/.env.example +47 -11
  3. package/dist/locales/en.json +251 -371
  4. package/dist/locales/fi.json +255 -375
  5. package/dist/public/components/ContactCard.js +30 -5
  6. package/dist/public/components/ContactPicker.js +3 -2
  7. package/dist/public/components/ImageDeliverable.js +2 -1
  8. package/dist/public/components/JsonView.js +1 -0
  9. package/dist/public/components/LinkPreview.js +1 -1
  10. package/dist/public/components/NotificationBell.js +6 -4
  11. package/dist/public/components/UsageChart.js +2 -1
  12. package/dist/public/css/theme.css +1516 -1432
  13. package/dist/public/css/views/app-grant.css +95 -36
  14. package/dist/public/css/views/help.css +28 -0
  15. package/dist/public/css/views/landing.css +20 -0
  16. package/dist/public/css/views/members.css +40 -10
  17. package/dist/public/css/views/portal-dev.css +64 -45
  18. package/dist/public/css/views/profile.css +8 -0
  19. package/dist/public/js/api.js +1 -0
  20. package/dist/public/js/app-sandbox.js +1 -0
  21. package/dist/public/js/components/auth-image.js +3 -1
  22. package/dist/public/js/i18n.js +3 -1
  23. package/dist/public/js/presence-store.js +3 -1
  24. package/dist/public/js/recents.js +2 -0
  25. package/dist/public/js/services/agent-activity.js +2 -1
  26. package/dist/public/js/services/agent-directives.js +2 -1
  27. package/dist/public/js/services/agent-integration.js +2 -1
  28. package/dist/public/js/services/agent-messages.js +2 -1
  29. package/dist/public/js/services/agent-tasks.js +2 -1
  30. package/dist/public/js/services/agents.js +3 -2
  31. package/dist/public/js/services/calibrator.js +2 -1
  32. package/dist/public/js/services/consent.js +2 -1
  33. package/dist/public/js/services/contacts.js +2 -1
  34. package/dist/public/js/services/cortex.js +5 -4
  35. package/dist/public/js/services/ecosystem.js +2 -1
  36. package/dist/public/js/services/knowledge.js +2 -1
  37. package/dist/public/js/services/ledger.js +2 -1
  38. package/dist/public/js/services/living.js +10 -9
  39. package/dist/public/js/services/memory.js +2 -1
  40. package/dist/public/js/services/messages.js +53 -8
  41. package/dist/public/js/services/nodes.js +3 -2
  42. package/dist/public/js/services/notebook-plan.js +2 -1
  43. package/dist/public/js/services/notebook.js +6 -5
  44. package/dist/public/js/services/offers.js +6 -5
  45. package/dist/public/js/services/organisms.js +26 -25
  46. package/dist/public/js/services/organisms.prompts.js +3 -2
  47. package/dist/public/js/services/organisms.shared.js +2 -1
  48. package/dist/public/js/services/organisms.workspace-gen.js +3 -2
  49. package/dist/public/js/services/packages.js +1 -0
  50. package/dist/public/js/services/schedules.js +2 -1
  51. package/dist/public/js/services/security.js +3 -2
  52. package/dist/public/js/services/skills.js +1 -0
  53. package/dist/public/js/services/tracked-responses.js +4 -3
  54. package/dist/public/js/services/unfurl.js +4 -4
  55. package/dist/public/js/services/work.js +2 -1
  56. package/dist/public/js/site.js +74 -0
  57. package/dist/public/js/swallowed.js +69 -0
  58. package/dist/public/js/theme.js +2 -1
  59. package/dist/public/js/utils.js +3 -1
  60. package/dist/public/lib/VENDORED.md +1 -0
  61. package/dist/public/lib/aimeat-game/board.css +262 -0
  62. package/dist/public/lib/aimeat-game/progress.css +406 -0
  63. package/dist/public/lib/aimeat-game/shell.css +388 -0
  64. package/dist/public/lib/aimeat-game.css +394 -0
  65. package/dist/public/lib/pdfjs@6/pdf.min.mjs +29 -0
  66. package/dist/public/lib/pdfjs@6/pdf.worker.min.mjs +29 -0
  67. package/dist/public/privacy.fi.html +1 -1
  68. package/dist/public/privacy.html +1 -1
  69. package/dist/public/spa.html +885 -793
  70. package/dist/public/sw.js +4 -2
  71. package/dist/public/views/admin/agent-integration-tab.js +7 -6
  72. package/dist/public/views/admin/ai-usage-tab.js +2 -1
  73. package/dist/public/views/admin/cortex-tab.js +2 -1
  74. package/dist/public/views/admin/economy-tab.js +0 -1
  75. package/dist/public/views/admin/email-tab.js +4 -2
  76. package/dist/public/views/admin/federation-tab.js +3 -2
  77. package/dist/public/views/admin/feedback-tab.js +2 -1
  78. package/dist/public/views/admin/knowledge-tab.js +2 -1
  79. package/dist/public/views/admin/messages-tab.js +2 -1
  80. package/dist/public/views/admin/msm-tab.js +2 -1
  81. package/dist/public/views/admin/packages-tab.js +3 -2
  82. package/dist/public/views/admin/portal-tab.js +7 -2
  83. package/dist/public/views/admin/push-tab.js +9 -4
  84. package/dist/public/views/admin/stats-tab.js +2 -1
  85. package/dist/public/views/admin/usage-tab.js +4 -3
  86. package/dist/public/views/admin.js +6 -4
  87. package/dist/public/views/agent-solo.js +4 -3
  88. package/dist/public/views/app-grant.js +105 -32
  89. package/dist/public/views/business.js +139 -55
  90. package/dist/public/views/command-palette.js +5 -3
  91. package/dist/public/views/companies.js +3 -2
  92. package/dist/public/views/doc-solo.js +2 -1
  93. package/dist/public/views/help.js +95 -15
  94. package/dist/public/views/how-it-works.js +41 -8
  95. package/dist/public/views/invite-accept.js +3 -2
  96. package/dist/public/views/landing-activity.js +3 -2
  97. package/dist/public/views/landing-node-totals.js +2 -1
  98. package/dist/public/views/landing.js +75 -152
  99. package/dist/public/views/members.js +29 -2
  100. package/dist/public/views/my-company.js +9 -7
  101. package/dist/public/views/my-company.payments.js +2 -1
  102. package/dist/public/views/portal-classic.js +2 -1
  103. package/dist/public/views/portal-dev.js +64 -35
  104. package/dist/public/views/portal-dev.panels.js +39 -2
  105. package/dist/public/views/portal-dev.upload.js +25 -196
  106. package/dist/public/views/portal.components.js +4 -3
  107. package/dist/public/views/portfolio.js +5 -4
  108. package/dist/public/views/profile/access-tab/access-tokens.js +2 -1
  109. package/dist/public/views/profile/access-tab/agent-defaults.js +3 -1
  110. package/dist/public/views/profile/access-tab/connected-apps.js +72 -3
  111. package/dist/public/views/profile/access-tab/sharing-groups.js +4 -1
  112. package/dist/public/views/profile/access-tab.js +3 -1
  113. package/dist/public/views/profile/agents/agent-card.js +6 -5
  114. package/dist/public/views/profile/agents/tab-activity.js +10 -8
  115. package/dist/public/views/profile/agents/tab-agent-config.js +3 -1
  116. package/dist/public/views/profile/agents/tab-contracts.js +2 -1
  117. package/dist/public/views/profile/agents/tab-data-access.js +10 -7
  118. package/dist/public/views/profile/agents/tab-helpers.js +5 -0
  119. package/dist/public/views/profile/agents/tab-integration.js +12 -9
  120. package/dist/public/views/profile/agents/tab-messages.js +6 -4
  121. package/dist/public/views/profile/agents/tab-quality.js +3 -2
  122. package/dist/public/views/profile/agents/tab-usage.js +5 -3
  123. package/dist/public/views/profile/agents/task-item.js +12 -7
  124. package/dist/public/views/profile/agents-activity-subtab.js +5 -2
  125. package/dist/public/views/profile/agents-capabilities-subtab.js +4 -2
  126. package/dist/public/views/profile/agents-messages-subtab.js +5 -2
  127. package/dist/public/views/profile/agents-services-subtab.js +1 -0
  128. package/dist/public/views/profile/agents-tab.js +11 -7
  129. package/dist/public/views/profile/appdev-tab.js +3 -2
  130. package/dist/public/views/profile/apps-tab.js +10 -8
  131. package/dist/public/views/profile/boards-tab.js +5 -4
  132. package/dist/public/views/profile/calibrator-batch.helpers.js +3 -2
  133. package/dist/public/views/profile/calibrator-batch.js +3 -1
  134. package/dist/public/views/profile/calibrator-llm-editor.js +3 -2
  135. package/dist/public/views/profile/calibrator-tab.js +5 -4
  136. package/dist/public/views/profile/capabilities-tab.js +2 -1
  137. package/dist/public/views/profile/chat-sessions-tab.js +6 -3
  138. package/dist/public/views/profile/contacts-tab.js +2 -1
  139. package/dist/public/views/profile/data-wallet-tab.js +5 -4
  140. package/dist/public/views/profile/discover-tab.js +4 -1
  141. package/dist/public/views/profile/ecosystem-tab.automation.js +13 -9
  142. package/dist/public/views/profile/ecosystem-tab.cards.js +3 -2
  143. package/dist/public/views/profile/ecosystem-tab.js +10 -7
  144. package/dist/public/views/profile/email-tab.js +2 -1
  145. package/dist/public/views/profile/extensions-tab.js +7 -6
  146. package/dist/public/views/profile/extensions-tab.maturity.js +2 -1
  147. package/dist/public/views/profile/extensions-tab.prompts.js +24 -0
  148. package/dist/public/views/profile/federation-tab.js +2 -1
  149. package/dist/public/views/profile/inbox-tab/components.js +13 -10
  150. package/dist/public/views/profile/inbox-tab/helpers.js +15 -1
  151. package/dist/public/views/profile/inbox-tab/use-thread-ux.js +1 -1
  152. package/dist/public/views/profile/inbox-tab.js +33 -30
  153. package/dist/public/views/profile/inline-panels.js +5 -4
  154. package/dist/public/views/profile/knowledge-tab.js +15 -13
  155. package/dist/public/views/profile/landing-page.cards.js +14 -9
  156. package/dist/public/views/profile/landing-page.helpers.js +5 -2
  157. package/dist/public/views/profile/landing-page.js +11 -7
  158. package/dist/public/views/profile/landing-page.modals.js +8 -5
  159. package/dist/public/views/profile/living-tab.js +3 -2
  160. package/dist/public/views/profile/mcp-tab.js +4 -2
  161. package/dist/public/views/profile/memory-tab/browse-view.js +3 -2
  162. package/dist/public/views/profile/memory-tab/components.js +4 -3
  163. package/dist/public/views/profile/memory-tab/entries-view.js +3 -2
  164. package/dist/public/views/profile/memory-tab.js +18 -16
  165. package/dist/public/views/profile/nodes-tab.js +2 -1
  166. package/dist/public/views/profile/notebook-card.js +4 -3
  167. package/dist/public/views/profile/notebook-tab.js +7 -5
  168. package/dist/public/views/profile/notifications-tab.js +9 -5
  169. package/dist/public/views/profile/offers-tab.js +5 -4
  170. package/dist/public/views/profile/openrouter-settings.js +5 -4
  171. package/dist/public/views/profile/organisms/activity-panel.js +2 -1
  172. package/dist/public/views/profile/organisms/agents.js +2 -1
  173. package/dist/public/views/profile/organisms/document.js +13 -12
  174. package/dist/public/views/profile/organisms/helpers.js +2 -1
  175. package/dist/public/views/profile/organisms/home.js +7 -6
  176. package/dist/public/views/profile/organisms/invite-panel.js +1 -1
  177. package/dist/public/views/profile/organisms/members.js +7 -6
  178. package/dist/public/views/profile/organisms/mindmap.js +1 -1
  179. package/dist/public/views/profile/organisms/panels.js +4 -3
  180. package/dist/public/views/profile/organisms/participants-panel.js +11 -10
  181. package/dist/public/views/profile/organisms/readme-panel.js +1 -0
  182. package/dist/public/views/profile/organisms/sources-panel.js +2 -1
  183. package/dist/public/views/profile/organisms/workspace/doc-space.js +2 -1
  184. package/dist/public/views/profile/organisms/workspace/model.js +1 -0
  185. package/dist/public/views/profile/organisms/workspace-apps.js +4 -2
  186. package/dist/public/views/profile/organisms/workspace-comments.js +3 -2
  187. package/dist/public/views/profile/organisms/workspace-list.js +5 -4
  188. package/dist/public/views/profile/organisms/workspace.js +19 -16
  189. package/dist/public/views/profile/organisms-tab.js +20 -12
  190. package/dist/public/views/profile/packages-tab.js +6 -4
  191. package/dist/public/views/profile/portfolio-tab.js +1 -1
  192. package/dist/public/views/profile/scheduler-calendar.js +2 -1
  193. package/dist/public/views/profile/scheduler-tab.js +2 -1
  194. package/dist/public/views/profile/security-tab.js +2 -1
  195. package/dist/public/views/profile/services-tab.js +4 -3
  196. package/dist/public/views/profile/wallet-tab.js +90 -84
  197. package/dist/public/views/profile/work-tab.js +3 -2
  198. package/dist/public/views/profile/workflows-form.js +2 -1
  199. package/dist/public/views/profile/workflows-tab.js +3 -2
  200. package/dist/public/views/public-workspace-viewer.js +7 -4
  201. package/dist/scripts/build-sdk-libs.d.ts.map +1 -1
  202. package/dist/scripts/build-sdk-libs.js +4 -0
  203. package/dist/scripts/build-sdk-libs.js.map +1 -1
  204. package/dist/scripts/check-silent-catch.d.ts +2 -0
  205. package/dist/scripts/check-silent-catch.d.ts.map +1 -0
  206. package/dist/scripts/check-silent-catch.js +159 -0
  207. package/dist/scripts/check-silent-catch.js.map +1 -0
  208. package/dist/src/auth/jwt.d.ts +2 -0
  209. package/dist/src/auth/jwt.d.ts.map +1 -1
  210. package/dist/src/auth/jwt.js +15 -3
  211. package/dist/src/auth/jwt.js.map +1 -1
  212. package/dist/src/auth/keypair.d.ts.map +1 -1
  213. package/dist/src/auth/keypair.js +3 -0
  214. package/dist/src/auth/keypair.js.map +1 -1
  215. package/dist/src/auth/middleware.d.ts +2 -0
  216. package/dist/src/auth/middleware.d.ts.map +1 -1
  217. package/dist/src/auth/middleware.js +33 -14
  218. package/dist/src/auth/middleware.js.map +1 -1
  219. package/dist/src/auth/node-keys.d.ts.map +1 -1
  220. package/dist/src/auth/node-keys.js +59 -16
  221. package/dist/src/auth/node-keys.js.map +1 -1
  222. package/dist/src/cli/config-import.d.ts.map +1 -1
  223. package/dist/src/cli/config-import.js +3 -1
  224. package/dist/src/cli/config-import.js.map +1 -1
  225. package/dist/src/cli/connect/auth.d.ts.map +1 -1
  226. package/dist/src/cli/connect/auth.js +1 -0
  227. package/dist/src/cli/connect/auth.js.map +1 -1
  228. package/dist/src/cli/connect/config.d.ts.map +1 -1
  229. package/dist/src/cli/connect/config.js +3 -1
  230. package/dist/src/cli/connect/config.js.map +1 -1
  231. package/dist/src/cli/connect/keychain.d.ts.map +1 -1
  232. package/dist/src/cli/connect/keychain.js +6 -2
  233. package/dist/src/cli/connect/keychain.js.map +1 -1
  234. package/dist/src/cli/connect/mcp/local-server.d.ts.map +1 -1
  235. package/dist/src/cli/connect/mcp/local-server.js +9 -2
  236. package/dist/src/cli/connect/mcp/local-server.js.map +1 -1
  237. package/dist/src/cli/connect/mcp/tools/workspaces.d.ts.map +1 -1
  238. package/dist/src/cli/connect/mcp/tools/workspaces.js +2 -0
  239. package/dist/src/cli/connect/mcp/tools/workspaces.js.map +1 -1
  240. package/dist/src/cli/connect/task-runner.d.ts.map +1 -1
  241. package/dist/src/cli/connect/task-runner.js +11 -4
  242. package/dist/src/cli/connect/task-runner.js.map +1 -1
  243. package/dist/src/cli/connect/tool-call-helpers.d.ts.map +1 -1
  244. package/dist/src/cli/connect/tool-call-helpers.js +1 -0
  245. package/dist/src/cli/connect/tool-call-helpers.js.map +1 -1
  246. package/dist/src/cli/connect/tunnel-client.d.ts.map +1 -1
  247. package/dist/src/cli/connect/tunnel-client.js +26 -8
  248. package/dist/src/cli/connect/tunnel-client.js.map +1 -1
  249. package/dist/src/cli/federation-join.d.ts.map +1 -1
  250. package/dist/src/cli/federation-join.js +7 -3
  251. package/dist/src/cli/federation-join.js.map +1 -1
  252. package/dist/src/cli/init-wizard/presets.d.ts.map +1 -1
  253. package/dist/src/cli/init-wizard/presets.js +21 -0
  254. package/dist/src/cli/init-wizard/presets.js.map +1 -1
  255. package/dist/src/cli/init-wizard/steps-advanced.d.ts.map +1 -1
  256. package/dist/src/cli/init-wizard/steps-advanced.js +2 -0
  257. package/dist/src/cli/init-wizard/steps-advanced.js.map +1 -1
  258. package/dist/src/cli/init-wizard/steps-operator.d.ts.map +1 -1
  259. package/dist/src/cli/init-wizard/steps-operator.js +10 -0
  260. package/dist/src/cli/init-wizard/steps-operator.js.map +1 -1
  261. package/dist/src/commerce/invoice-handler.d.ts +5 -0
  262. package/dist/src/commerce/invoice-handler.d.ts.map +1 -0
  263. package/dist/src/commerce/invoice-handler.js +41 -0
  264. package/dist/src/commerce/invoice-handler.js.map +1 -0
  265. package/dist/src/commerce/payable-book.d.ts +31 -0
  266. package/dist/src/commerce/payable-book.d.ts.map +1 -0
  267. package/dist/src/commerce/payable-book.js +27 -0
  268. package/dist/src/commerce/payable-book.js.map +1 -0
  269. package/dist/src/commerce/payment-handlers.d.ts.map +1 -1
  270. package/dist/src/commerce/payment-handlers.js +8 -4
  271. package/dist/src/commerce/payment-handlers.js.map +1 -1
  272. package/dist/src/commerce/sellable-resolvers.d.ts +6 -6
  273. package/dist/src/commerce/sellable-resolvers.d.ts.map +1 -1
  274. package/dist/src/commerce/sellable-resolvers.js +17 -4
  275. package/dist/src/commerce/sellable-resolvers.js.map +1 -1
  276. package/dist/src/commerce/session-service.js +2 -2
  277. package/dist/src/commerce/session-service.js.map +1 -1
  278. package/dist/src/commerce/stripe-handler.d.ts +33 -0
  279. package/dist/src/commerce/stripe-handler.d.ts.map +1 -0
  280. package/dist/src/commerce/stripe-handler.js +108 -0
  281. package/dist/src/commerce/stripe-handler.js.map +1 -0
  282. package/dist/src/commerce/types.d.ts +10 -12
  283. package/dist/src/commerce/types.d.ts.map +1 -1
  284. package/dist/src/commerce/x402-facilitator.d.ts.map +1 -1
  285. package/dist/src/commerce/x402-facilitator.js +1 -0
  286. package/dist/src/commerce/x402-facilitator.js.map +1 -1
  287. package/dist/src/config-types.d.ts +66 -0
  288. package/dist/src/config-types.d.ts.map +1 -1
  289. package/dist/src/config.d.ts.map +1 -1
  290. package/dist/src/config.js +62 -1
  291. package/dist/src/config.js.map +1 -1
  292. package/dist/src/data/library-packs/sdk.d.ts +4 -0
  293. package/dist/src/data/library-packs/sdk.d.ts.map +1 -1
  294. package/dist/src/data/library-packs/sdk.js +46 -0
  295. package/dist/src/data/library-packs/sdk.js.map +1 -1
  296. package/dist/src/data/library-packs/vendored.d.ts.map +1 -1
  297. package/dist/src/data/library-packs/vendored.js +88 -0
  298. package/dist/src/data/library-packs/vendored.js.map +1 -1
  299. package/dist/src/generated/api-types.d.ts +472 -26
  300. package/dist/src/generated/api-types.d.ts.map +1 -1
  301. package/dist/src/index-connect.d.ts.map +1 -1
  302. package/dist/src/index-connect.js +4 -1
  303. package/dist/src/index-connect.js.map +1 -1
  304. package/dist/src/index-start.d.ts.map +1 -1
  305. package/dist/src/index-start.js +10 -6
  306. package/dist/src/index-start.js.map +1 -1
  307. package/dist/src/mcp/app-template-proposals.d.ts.map +1 -1
  308. package/dist/src/mcp/app-template-proposals.js +2 -1
  309. package/dist/src/mcp/app-template-proposals.js.map +1 -1
  310. package/dist/src/mcp/apps.d.ts.map +1 -1
  311. package/dist/src/mcp/apps.js +4 -3
  312. package/dist/src/mcp/apps.js.map +1 -1
  313. package/dist/src/mcp/capabilities.d.ts.map +1 -1
  314. package/dist/src/mcp/capabilities.js +3 -2
  315. package/dist/src/mcp/capabilities.js.map +1 -1
  316. package/dist/src/mcp/catalog/scopes.d.ts +0 -1
  317. package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
  318. package/dist/src/mcp/catalog/scopes.js +2 -11
  319. package/dist/src/mcp/catalog/scopes.js.map +1 -1
  320. package/dist/src/mcp/catalog/surfaces.d.ts +1 -7
  321. package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -1
  322. package/dist/src/mcp/catalog/surfaces.js +10 -16
  323. package/dist/src/mcp/catalog/surfaces.js.map +1 -1
  324. package/dist/src/mcp/commerce.d.ts.map +1 -1
  325. package/dist/src/mcp/commerce.js +35 -3
  326. package/dist/src/mcp/commerce.js.map +1 -1
  327. package/dist/src/mcp/core.d.ts.map +1 -1
  328. package/dist/src/mcp/core.js +3 -2
  329. package/dist/src/mcp/core.js.map +1 -1
  330. package/dist/src/mcp/exchange-run.d.ts +28 -0
  331. package/dist/src/mcp/exchange-run.d.ts.map +1 -1
  332. package/dist/src/mcp/exchange-run.js +58 -37
  333. package/dist/src/mcp/exchange-run.js.map +1 -1
  334. package/dist/src/mcp/exchange.d.ts.map +1 -1
  335. package/dist/src/mcp/exchange.js +9 -7
  336. package/dist/src/mcp/exchange.js.map +1 -1
  337. package/dist/src/mcp/extensions.d.ts.map +1 -1
  338. package/dist/src/mcp/extensions.js +60 -106
  339. package/dist/src/mcp/extensions.js.map +1 -1
  340. package/dist/src/mcp/index.d.ts.map +1 -1
  341. package/dist/src/mcp/index.js +1 -5
  342. package/dist/src/mcp/index.js.map +1 -1
  343. package/dist/src/mcp/knowledge.d.ts.map +1 -1
  344. package/dist/src/mcp/knowledge.js +1 -0
  345. package/dist/src/mcp/knowledge.js.map +1 -1
  346. package/dist/src/mcp/oauth.d.ts +3 -0
  347. package/dist/src/mcp/oauth.d.ts.map +1 -1
  348. package/dist/src/mcp/oauth.js +13 -8
  349. package/dist/src/mcp/oauth.js.map +1 -1
  350. package/dist/src/mcp/workspaces.d.ts.map +1 -1
  351. package/dist/src/mcp/workspaces.js +7 -4
  352. package/dist/src/mcp/workspaces.js.map +1 -1
  353. package/dist/src/middleware/cors.d.ts.map +1 -1
  354. package/dist/src/middleware/cors.js +3 -1
  355. package/dist/src/middleware/cors.js.map +1 -1
  356. package/dist/src/middleware/subdomain.d.ts +4 -0
  357. package/dist/src/middleware/subdomain.d.ts.map +1 -1
  358. package/dist/src/middleware/subdomain.js +23 -2
  359. package/dist/src/middleware/subdomain.js.map +1 -1
  360. package/dist/src/models/app-tool-schemas.d.ts +35 -0
  361. package/dist/src/models/app-tool-schemas.d.ts.map +1 -1
  362. package/dist/src/models/app-tool-schemas.js +44 -0
  363. package/dist/src/models/app-tool-schemas.js.map +1 -1
  364. package/dist/src/routes/admin-config.d.ts.map +1 -1
  365. package/dist/src/routes/admin-config.js +4 -1
  366. package/dist/src/routes/admin-config.js.map +1 -1
  367. package/dist/src/routes/admin-extensions.d.ts.map +1 -1
  368. package/dist/src/routes/admin-extensions.js +2 -1
  369. package/dist/src/routes/admin-extensions.js.map +1 -1
  370. package/dist/src/routes/admin-monitoring.js +14 -5
  371. package/dist/src/routes/admin-monitoring.js.map +1 -1
  372. package/dist/src/routes/admin-security.d.ts.map +1 -1
  373. package/dist/src/routes/admin-security.js +4 -1
  374. package/dist/src/routes/admin-security.js.map +1 -1
  375. package/dist/src/routes/admin.d.ts.map +1 -1
  376. package/dist/src/routes/admin.js +6 -4
  377. package/dist/src/routes/admin.js.map +1 -1
  378. package/dist/src/routes/agent-activity.d.ts.map +1 -1
  379. package/dist/src/routes/agent-activity.js +4 -1
  380. package/dist/src/routes/agent-activity.js.map +1 -1
  381. package/dist/src/routes/agent-directives.d.ts +3 -10
  382. package/dist/src/routes/agent-directives.d.ts.map +1 -1
  383. package/dist/src/routes/agent-directives.js +7 -12
  384. package/dist/src/routes/agent-directives.js.map +1 -1
  385. package/dist/src/routes/agent-integration.d.ts.map +1 -1
  386. package/dist/src/routes/agent-integration.js +3 -1
  387. package/dist/src/routes/agent-integration.js.map +1 -1
  388. package/dist/src/routes/agent-messages.d.ts.map +1 -1
  389. package/dist/src/routes/agent-messages.js +5 -2
  390. package/dist/src/routes/agent-messages.js.map +1 -1
  391. package/dist/src/routes/agent-onboarding.d.ts.map +1 -1
  392. package/dist/src/routes/agent-onboarding.js +19 -6
  393. package/dist/src/routes/agent-onboarding.js.map +1 -1
  394. package/dist/src/routes/agent-skills-discovery.d.ts.map +1 -1
  395. package/dist/src/routes/agent-skills-discovery.js +2 -1
  396. package/dist/src/routes/agent-skills-discovery.js.map +1 -1
  397. package/dist/src/routes/agent-tasks/completion.js +1 -1
  398. package/dist/src/routes/agent-tasks/completion.js.map +1 -1
  399. package/dist/src/routes/agent-tasks/create-read.js +3 -1
  400. package/dist/src/routes/agent-tasks/create-read.js.map +1 -1
  401. package/dist/src/routes/agent-tasks/lifecycle.d.ts.map +1 -1
  402. package/dist/src/routes/agent-tasks/lifecycle.js +28 -9
  403. package/dist/src/routes/agent-tasks/lifecycle.js.map +1 -1
  404. package/dist/src/routes/agents/management.d.ts.map +1 -1
  405. package/dist/src/routes/agents/management.js +4 -1
  406. package/dist/src/routes/agents/management.js.map +1 -1
  407. package/dist/src/routes/agents/offers.d.ts.map +1 -1
  408. package/dist/src/routes/agents/offers.js +0 -0
  409. package/dist/src/routes/agents/offers.js.map +1 -1
  410. package/dist/src/routes/agents/profile-metadata.d.ts.map +1 -1
  411. package/dist/src/routes/agents/profile-metadata.js +2 -1
  412. package/dist/src/routes/agents/profile-metadata.js.map +1 -1
  413. package/dist/src/routes/app-grants.d.ts +7 -0
  414. package/dist/src/routes/app-grants.d.ts.map +1 -1
  415. package/dist/src/routes/app-grants.js +69 -4
  416. package/dist/src/routes/app-grants.js.map +1 -1
  417. package/dist/src/routes/appdev-overview.d.ts.map +1 -1
  418. package/dist/src/routes/appdev-overview.js +2 -1
  419. package/dist/src/routes/appdev-overview.js.map +1 -1
  420. package/dist/src/routes/apps/catalogue-admin.d.ts.map +1 -1
  421. package/dist/src/routes/apps/catalogue-admin.js +2 -1
  422. package/dist/src/routes/apps/catalogue-admin.js.map +1 -1
  423. package/dist/src/routes/apps/drafts.d.ts.map +1 -1
  424. package/dist/src/routes/apps/drafts.js +2 -1
  425. package/dist/src/routes/apps/drafts.js.map +1 -1
  426. package/dist/src/routes/apps/fork-manage.d.ts.map +1 -1
  427. package/dist/src/routes/apps/fork-manage.js +6 -3
  428. package/dist/src/routes/apps/fork-manage.js.map +1 -1
  429. package/dist/src/routes/apps/helpers.d.ts.map +1 -1
  430. package/dist/src/routes/apps/helpers.js +5 -1
  431. package/dist/src/routes/apps/helpers.js.map +1 -1
  432. package/dist/src/routes/apps/publish.d.ts.map +1 -1
  433. package/dist/src/routes/apps/publish.js +8 -3
  434. package/dist/src/routes/apps/publish.js.map +1 -1
  435. package/dist/src/routes/apps/read.d.ts.map +1 -1
  436. package/dist/src/routes/apps/read.js +2 -1
  437. package/dist/src/routes/apps/read.js.map +1 -1
  438. package/dist/src/routes/auth.d.ts.map +1 -1
  439. package/dist/src/routes/auth.js +2 -1
  440. package/dist/src/routes/auth.js.map +1 -1
  441. package/dist/src/routes/boards.js +1 -1
  442. package/dist/src/routes/boards.js.map +1 -1
  443. package/dist/src/routes/bootstrap.d.ts.map +1 -1
  444. package/dist/src/routes/bootstrap.js +8 -3
  445. package/dist/src/routes/bootstrap.js.map +1 -1
  446. package/dist/src/routes/capabilities.d.ts.map +1 -1
  447. package/dist/src/routes/capabilities.js +4 -3
  448. package/dist/src/routes/capabilities.js.map +1 -1
  449. package/dist/src/routes/commerce-acp.js +1 -1
  450. package/dist/src/routes/commerce-acp.js.map +1 -1
  451. package/dist/src/routes/commerce-ucp.d.ts +2 -3
  452. package/dist/src/routes/commerce-ucp.d.ts.map +1 -1
  453. package/dist/src/routes/commerce-ucp.js +6 -12
  454. package/dist/src/routes/commerce-ucp.js.map +1 -1
  455. package/dist/src/routes/commerce.d.ts +7 -1
  456. package/dist/src/routes/commerce.d.ts.map +1 -1
  457. package/dist/src/routes/commerce.js +65 -15
  458. package/dist/src/routes/commerce.js.map +1 -1
  459. package/dist/src/routes/csm.d.ts.map +1 -1
  460. package/dist/src/routes/csm.js +3 -1
  461. package/dist/src/routes/csm.js.map +1 -1
  462. package/dist/src/routes/ecosystem-apps.d.ts.map +1 -1
  463. package/dist/src/routes/ecosystem-apps.js +7 -6
  464. package/dist/src/routes/ecosystem-apps.js.map +1 -1
  465. package/dist/src/routes/exchange-market.d.ts.map +1 -1
  466. package/dist/src/routes/exchange-market.js +10 -6
  467. package/dist/src/routes/exchange-market.js.map +1 -1
  468. package/dist/src/routes/exchange.d.ts +10 -1
  469. package/dist/src/routes/exchange.d.ts.map +1 -1
  470. package/dist/src/routes/exchange.js +344 -9
  471. package/dist/src/routes/exchange.js.map +1 -1
  472. package/dist/src/routes/extensions/actions.d.ts +2 -0
  473. package/dist/src/routes/extensions/actions.d.ts.map +1 -1
  474. package/dist/src/routes/extensions/actions.js +47 -8
  475. package/dist/src/routes/extensions/actions.js.map +1 -1
  476. package/dist/src/routes/extensions/entitlement-gate.d.ts +44 -7
  477. package/dist/src/routes/extensions/entitlement-gate.d.ts.map +1 -1
  478. package/dist/src/routes/extensions/entitlement-gate.js +21 -142
  479. package/dist/src/routes/extensions/entitlement-gate.js.map +1 -1
  480. package/dist/src/routes/extensions/internal-pass.d.ts +23 -0
  481. package/dist/src/routes/extensions/internal-pass.d.ts.map +1 -0
  482. package/dist/src/routes/extensions/internal-pass.js +70 -0
  483. package/dist/src/routes/extensions/internal-pass.js.map +1 -0
  484. package/dist/src/routes/extensions/manifest.d.ts +4 -0
  485. package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
  486. package/dist/src/routes/extensions/manifest.js +68 -4
  487. package/dist/src/routes/extensions/manifest.js.map +1 -1
  488. package/dist/src/routes/extensions/metered-response.d.ts +37 -0
  489. package/dist/src/routes/extensions/metered-response.d.ts.map +1 -0
  490. package/dist/src/routes/extensions/metered-response.js +60 -0
  491. package/dist/src/routes/extensions/metered-response.js.map +1 -0
  492. package/dist/src/routes/extensions/pacing.d.ts +31 -0
  493. package/dist/src/routes/extensions/pacing.d.ts.map +1 -1
  494. package/dist/src/routes/extensions/pacing.js +5 -33
  495. package/dist/src/routes/extensions/pacing.js.map +1 -1
  496. package/dist/src/routes/extensions/paywall.d.ts +16 -0
  497. package/dist/src/routes/extensions/paywall.d.ts.map +1 -1
  498. package/dist/src/routes/extensions/paywall.js +157 -8
  499. package/dist/src/routes/extensions/paywall.js.map +1 -1
  500. package/dist/src/routes/extensions/priced-binding.d.ts +50 -0
  501. package/dist/src/routes/extensions/priced-binding.d.ts.map +1 -0
  502. package/dist/src/routes/extensions/priced-binding.js +46 -0
  503. package/dist/src/routes/extensions/priced-binding.js.map +1 -0
  504. package/dist/src/routes/federation-genesis.d.ts.map +1 -1
  505. package/dist/src/routes/federation-genesis.js +14 -5
  506. package/dist/src/routes/federation-genesis.js.map +1 -1
  507. package/dist/src/routes/federation-peer/introduce.d.ts.map +1 -1
  508. package/dist/src/routes/federation-peer/introduce.js +3 -1
  509. package/dist/src/routes/federation-peer/introduce.js.map +1 -1
  510. package/dist/src/routes/federation-peer/lifecycle.d.ts.map +1 -1
  511. package/dist/src/routes/federation-peer/lifecycle.js +3 -2
  512. package/dist/src/routes/federation-peer/lifecycle.js.map +1 -1
  513. package/dist/src/routes/federation-peer/peers.d.ts.map +1 -1
  514. package/dist/src/routes/federation-peer/peers.js +5 -3
  515. package/dist/src/routes/federation-peer/peers.js.map +1 -1
  516. package/dist/src/routes/federation-peer/policy-book.d.ts.map +1 -1
  517. package/dist/src/routes/federation-peer/policy-book.js +2 -1
  518. package/dist/src/routes/federation-peer/policy-book.js.map +1 -1
  519. package/dist/src/routes/federation-peer/promotion.d.ts.map +1 -1
  520. package/dist/src/routes/federation-peer/promotion.js +4 -1
  521. package/dist/src/routes/federation-peer/promotion.js.map +1 -1
  522. package/dist/src/routes/federation-settlements.js +2 -2
  523. package/dist/src/routes/federation-settlements.js.map +1 -1
  524. package/dist/src/routes/federation-sync/catalogue-trust.js +5 -3
  525. package/dist/src/routes/federation-sync/catalogue-trust.js.map +1 -1
  526. package/dist/src/routes/federation-sync/messaging.js +5 -3
  527. package/dist/src/routes/federation-sync/messaging.js.map +1 -1
  528. package/dist/src/routes/federation-sync/routing.d.ts.map +1 -1
  529. package/dist/src/routes/federation-sync/routing.js +7 -5
  530. package/dist/src/routes/federation-sync/routing.js.map +1 -1
  531. package/dist/src/routes/flags.d.ts.map +1 -1
  532. package/dist/src/routes/flags.js +3 -1
  533. package/dist/src/routes/flags.js.map +1 -1
  534. package/dist/src/routes/ghii/register-login.js +1 -1
  535. package/dist/src/routes/ghii/register-login.js.map +1 -1
  536. package/dist/src/routes/instances/install.d.ts.map +1 -1
  537. package/dist/src/routes/instances/install.js +2 -1
  538. package/dist/src/routes/instances/install.js.map +1 -1
  539. package/dist/src/routes/instances/manage.d.ts.map +1 -1
  540. package/dist/src/routes/instances/manage.js +2 -1
  541. package/dist/src/routes/instances/manage.js.map +1 -1
  542. package/dist/src/routes/knowledge/packages-core.d.ts.map +1 -1
  543. package/dist/src/routes/knowledge/packages-core.js +2 -1
  544. package/dist/src/routes/knowledge/packages-core.js.map +1 -1
  545. package/dist/src/routes/knowledge/sharing.d.ts.map +1 -1
  546. package/dist/src/routes/knowledge/sharing.js +2 -1
  547. package/dist/src/routes/knowledge/sharing.js.map +1 -1
  548. package/dist/src/routes/library-packs.d.ts.map +1 -1
  549. package/dist/src/routes/library-packs.js +10 -3
  550. package/dist/src/routes/library-packs.js.map +1 -1
  551. package/dist/src/routes/libs.d.ts +9 -0
  552. package/dist/src/routes/libs.d.ts.map +1 -1
  553. package/dist/src/routes/libs.js +11 -2
  554. package/dist/src/routes/libs.js.map +1 -1
  555. package/dist/src/routes/matches.d.ts.map +1 -1
  556. package/dist/src/routes/matches.js +7 -3
  557. package/dist/src/routes/matches.js.map +1 -1
  558. package/dist/src/routes/memory/bulk.d.ts.map +1 -1
  559. package/dist/src/routes/memory/bulk.js +3 -1
  560. package/dist/src/routes/memory/bulk.js.map +1 -1
  561. package/dist/src/routes/memory/crud.d.ts.map +1 -1
  562. package/dist/src/routes/memory/crud.js +4 -2
  563. package/dist/src/routes/memory/crud.js.map +1 -1
  564. package/dist/src/routes/memory/federation.d.ts.map +1 -1
  565. package/dist/src/routes/memory/federation.js +5 -0
  566. package/dist/src/routes/memory/federation.js.map +1 -1
  567. package/dist/src/routes/memory/key.d.ts.map +1 -1
  568. package/dist/src/routes/memory/key.js +9 -4
  569. package/dist/src/routes/memory/key.js.map +1 -1
  570. package/dist/src/routes/messages.d.ts.map +1 -1
  571. package/dist/src/routes/messages.js +2 -1
  572. package/dist/src/routes/messages.js.map +1 -1
  573. package/dist/src/routes/msm.d.ts.map +1 -1
  574. package/dist/src/routes/msm.js +3 -1
  575. package/dist/src/routes/msm.js.map +1 -1
  576. package/dist/src/routes/oauth-login.d.ts.map +1 -1
  577. package/dist/src/routes/oauth-login.js +1 -0
  578. package/dist/src/routes/oauth-login.js.map +1 -1
  579. package/dist/src/routes/openrouter.js +2 -2
  580. package/dist/src/routes/openrouter.js.map +1 -1
  581. package/dist/src/routes/organisms/crud.d.ts.map +1 -1
  582. package/dist/src/routes/organisms/crud.js +3 -2
  583. package/dist/src/routes/organisms/crud.js.map +1 -1
  584. package/dist/src/routes/organisms/gates.d.ts.map +1 -1
  585. package/dist/src/routes/organisms/gates.js +3 -2
  586. package/dist/src/routes/organisms/gates.js.map +1 -1
  587. package/dist/src/routes/organisms/intake.d.ts.map +1 -1
  588. package/dist/src/routes/organisms/intake.js +13 -1
  589. package/dist/src/routes/organisms/intake.js.map +1 -1
  590. package/dist/src/routes/organisms/shared.d.ts.map +1 -1
  591. package/dist/src/routes/organisms/shared.js +7 -3
  592. package/dist/src/routes/organisms/shared.js.map +1 -1
  593. package/dist/src/routes/organisms/workspace-ops.d.ts.map +1 -1
  594. package/dist/src/routes/organisms/workspace-ops.js +6 -5
  595. package/dist/src/routes/organisms/workspace-ops.js.map +1 -1
  596. package/dist/src/routes/organisms/workspace-read.d.ts.map +1 -1
  597. package/dist/src/routes/organisms/workspace-read.js +4 -2
  598. package/dist/src/routes/organisms/workspace-read.js.map +1 -1
  599. package/dist/src/routes/owners.d.ts.map +1 -1
  600. package/dist/src/routes/owners.js +37 -12
  601. package/dist/src/routes/owners.js.map +1 -1
  602. package/dist/src/routes/personal.js +3 -1
  603. package/dist/src/routes/personal.js.map +1 -1
  604. package/dist/src/routes/portal.d.ts +6 -1
  605. package/dist/src/routes/portal.d.ts.map +1 -1
  606. package/dist/src/routes/portal.js +75 -10
  607. package/dist/src/routes/portal.js.map +1 -1
  608. package/dist/src/routes/portfolio.d.ts.map +1 -1
  609. package/dist/src/routes/portfolio.js +5 -1
  610. package/dist/src/routes/portfolio.js.map +1 -1
  611. package/dist/src/routes/prompts.d.ts.map +1 -1
  612. package/dist/src/routes/prompts.js +36 -2
  613. package/dist/src/routes/prompts.js.map +1 -1
  614. package/dist/src/routes/public-events.d.ts.map +1 -1
  615. package/dist/src/routes/public-events.js +4 -1
  616. package/dist/src/routes/public-events.js.map +1 -1
  617. package/dist/src/routes/public-stats.d.ts.map +1 -1
  618. package/dist/src/routes/public-stats.js +29 -10
  619. package/dist/src/routes/public-stats.js.map +1 -1
  620. package/dist/src/routes/schedules.d.ts +3 -0
  621. package/dist/src/routes/schedules.d.ts.map +1 -1
  622. package/dist/src/routes/schedules.js +14 -1
  623. package/dist/src/routes/schedules.js.map +1 -1
  624. package/dist/src/routes/stats.d.ts.map +1 -1
  625. package/dist/src/routes/stats.js +5 -1
  626. package/dist/src/routes/stats.js.map +1 -1
  627. package/dist/src/routes/storage-files.d.ts +4 -0
  628. package/dist/src/routes/storage-files.d.ts.map +1 -1
  629. package/dist/src/routes/storage-files.js +11 -0
  630. package/dist/src/routes/storage-files.js.map +1 -1
  631. package/dist/src/routes/subdomains.d.ts +9 -0
  632. package/dist/src/routes/subdomains.d.ts.map +1 -1
  633. package/dist/src/routes/subdomains.js +66 -5
  634. package/dist/src/routes/subdomains.js.map +1 -1
  635. package/dist/src/routes/unfurl.d.ts.map +1 -1
  636. package/dist/src/routes/unfurl.js +13 -3
  637. package/dist/src/routes/unfurl.js.map +1 -1
  638. package/dist/src/routes/upload.d.ts +11 -0
  639. package/dist/src/routes/upload.d.ts.map +1 -1
  640. package/dist/src/routes/upload.js +99 -9
  641. package/dist/src/routes/upload.js.map +1 -1
  642. package/dist/src/routes/wallet.d.ts +3 -0
  643. package/dist/src/routes/wallet.d.ts.map +1 -1
  644. package/dist/src/routes/wallet.js +6 -1
  645. package/dist/src/routes/wallet.js.map +1 -1
  646. package/dist/src/routes/webmcp.d.ts +8 -0
  647. package/dist/src/routes/webmcp.d.ts.map +1 -1
  648. package/dist/src/routes/webmcp.js +96 -49
  649. package/dist/src/routes/webmcp.js.map +1 -1
  650. package/dist/src/routes/wellknown.d.ts.map +1 -1
  651. package/dist/src/routes/wellknown.js +1 -0
  652. package/dist/src/routes/wellknown.js.map +1 -1
  653. package/dist/src/server-bootstrap/config-init.d.ts.map +1 -1
  654. package/dist/src/server-bootstrap/config-init.js +2 -0
  655. package/dist/src/server-bootstrap/config-init.js.map +1 -1
  656. package/dist/src/server-bootstrap/routes-loader.d.ts +4 -2
  657. package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
  658. package/dist/src/server-bootstrap/routes-loader.js +11 -22
  659. package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
  660. package/dist/src/server-bootstrap/service-init.js +3 -1
  661. package/dist/src/server-bootstrap/service-init.js.map +1 -1
  662. package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
  663. package/dist/src/server-bootstrap/static-files.js +3 -1
  664. package/dist/src/server-bootstrap/static-files.js.map +1 -1
  665. package/dist/src/services/agent-statistics.d.ts.map +1 -1
  666. package/dist/src/services/agent-statistics.js +4 -1
  667. package/dist/src/services/agent-statistics.js.map +1 -1
  668. package/dist/src/services/app-agent-deploy.d.ts.map +1 -1
  669. package/dist/src/services/app-agent-deploy.js +4 -1
  670. package/dist/src/services/app-agent-deploy.js.map +1 -1
  671. package/dist/src/services/app-agent-surface.d.ts +78 -0
  672. package/dist/src/services/app-agent-surface.d.ts.map +1 -0
  673. package/dist/src/services/app-agent-surface.js +74 -0
  674. package/dist/src/services/app-agent-surface.js.map +1 -0
  675. package/dist/src/services/app-tool-names.d.ts +15 -0
  676. package/dist/src/services/app-tool-names.d.ts.map +1 -0
  677. package/dist/src/services/app-tool-names.js +24 -0
  678. package/dist/src/services/app-tool-names.js.map +1 -0
  679. package/dist/src/services/appdev-overview.d.ts.map +1 -1
  680. package/dist/src/services/appdev-overview.js +3 -2
  681. package/dist/src/services/appdev-overview.js.map +1 -1
  682. package/dist/src/services/attachment-duplication.js +3 -3
  683. package/dist/src/services/attachment-duplication.js.map +1 -1
  684. package/dist/src/services/build-extension-prompt.d.ts +40 -0
  685. package/dist/src/services/build-extension-prompt.d.ts.map +1 -0
  686. package/dist/src/services/build-extension-prompt.js +253 -0
  687. package/dist/src/services/build-extension-prompt.js.map +1 -0
  688. package/dist/src/services/cache-cleanup.d.ts.map +1 -1
  689. package/dist/src/services/cache-cleanup.js +2 -1
  690. package/dist/src/services/cache-cleanup.js.map +1 -1
  691. package/dist/src/services/call-timing.d.ts.map +1 -1
  692. package/dist/src/services/call-timing.js +2 -1
  693. package/dist/src/services/call-timing.js.map +1 -1
  694. package/dist/src/services/capability-invoke.d.ts +6 -1
  695. package/dist/src/services/capability-invoke.d.ts.map +1 -1
  696. package/dist/src/services/capability-invoke.js +14 -2
  697. package/dist/src/services/capability-invoke.js.map +1 -1
  698. package/dist/src/services/catalogue-sync.d.ts.map +1 -1
  699. package/dist/src/services/catalogue-sync.js +1 -0
  700. package/dist/src/services/catalogue-sync.js.map +1 -1
  701. package/dist/src/services/component-registrar.d.ts.map +1 -1
  702. package/dist/src/services/component-registrar.js +22 -6
  703. package/dist/src/services/component-registrar.js.map +1 -1
  704. package/dist/src/services/config-loader.d.ts.map +1 -1
  705. package/dist/src/services/config-loader.js +6 -1
  706. package/dist/src/services/config-loader.js.map +1 -1
  707. package/dist/src/services/config-schema.d.ts.map +1 -1
  708. package/dist/src/services/config-schema.js +1 -0
  709. package/dist/src/services/config-schema.js.map +1 -1
  710. package/dist/src/services/connect-tunnel.d.ts.map +1 -1
  711. package/dist/src/services/connect-tunnel.js +17 -6
  712. package/dist/src/services/connect-tunnel.js.map +1 -1
  713. package/dist/src/services/consent.d.ts.map +1 -1
  714. package/dist/src/services/consent.js +3 -1
  715. package/dist/src/services/consent.js.map +1 -1
  716. package/dist/src/services/consul-config.d.ts.map +1 -1
  717. package/dist/src/services/consul-config.js +7 -2
  718. package/dist/src/services/consul-config.js.map +1 -1
  719. package/dist/src/services/contacts.js +4 -2
  720. package/dist/src/services/contacts.js.map +1 -1
  721. package/dist/src/services/core-jobs.js +1 -1
  722. package/dist/src/services/core-jobs.js.map +1 -1
  723. package/dist/src/services/db/agent-messages-overview-db-service.d.ts.map +1 -1
  724. package/dist/src/services/db/agent-messages-overview-db-service.js +2 -1
  725. package/dist/src/services/db/agent-messages-overview-db-service.js.map +1 -1
  726. package/dist/src/services/db/agent-quality-overview-db-service.d.ts.map +1 -1
  727. package/dist/src/services/db/agent-quality-overview-db-service.js +2 -1
  728. package/dist/src/services/db/agent-quality-overview-db-service.js.map +1 -1
  729. package/dist/src/services/db/messages-inbox-db-service.d.ts.map +1 -1
  730. package/dist/src/services/db/messages-inbox-db-service.js +3 -2
  731. package/dist/src/services/db/messages-inbox-db-service.js.map +1 -1
  732. package/dist/src/services/db/messaging-db-service.d.ts.map +1 -1
  733. package/dist/src/services/db/messaging-db-service.js +3 -2
  734. package/dist/src/services/db/messaging-db-service.js.map +1 -1
  735. package/dist/src/services/db/wallet-tab-db-service.d.ts +3 -3
  736. package/dist/src/services/doc-images.d.ts.map +1 -1
  737. package/dist/src/services/doc-images.js +7 -4
  738. package/dist/src/services/doc-images.js.map +1 -1
  739. package/dist/src/services/ecosystem-automation-notify.d.ts.map +1 -1
  740. package/dist/src/services/ecosystem-automation-notify.js +10 -4
  741. package/dist/src/services/ecosystem-automation-notify.js.map +1 -1
  742. package/dist/src/services/ecosystem-automation.d.ts.map +1 -1
  743. package/dist/src/services/ecosystem-automation.js +3 -2
  744. package/dist/src/services/ecosystem-automation.js.map +1 -1
  745. package/dist/src/services/ecosystem-events.js +1 -1
  746. package/dist/src/services/ecosystem-events.js.map +1 -1
  747. package/dist/src/services/entitlement-merge.d.ts +50 -0
  748. package/dist/src/services/entitlement-merge.d.ts.map +1 -0
  749. package/dist/src/services/entitlement-merge.js +116 -0
  750. package/dist/src/services/entitlement-merge.js.map +1 -0
  751. package/dist/src/services/entitlement-money.d.ts.map +1 -1
  752. package/dist/src/services/entitlement-money.js +4 -1
  753. package/dist/src/services/entitlement-money.js.map +1 -1
  754. package/dist/src/services/exchange-market.d.ts +47 -2
  755. package/dist/src/services/exchange-market.d.ts.map +1 -1
  756. package/dist/src/services/exchange-market.js +80 -9
  757. package/dist/src/services/exchange-market.js.map +1 -1
  758. package/dist/src/services/exchange-projection.d.ts +8 -2
  759. package/dist/src/services/exchange-projection.d.ts.map +1 -1
  760. package/dist/src/services/exchange-projection.js +146 -21
  761. package/dist/src/services/exchange-projection.js.map +1 -1
  762. package/dist/src/services/exchange-proposals.d.ts.map +1 -1
  763. package/dist/src/services/exchange-proposals.js +4 -2
  764. package/dist/src/services/exchange-proposals.js.map +1 -1
  765. package/dist/src/services/extension-purchase.d.ts +36 -0
  766. package/dist/src/services/extension-purchase.d.ts.map +1 -0
  767. package/dist/src/services/extension-purchase.js +110 -0
  768. package/dist/src/services/extension-purchase.js.map +1 -0
  769. package/dist/src/services/extension-runtime.d.ts +23 -1
  770. package/dist/src/services/extension-runtime.d.ts.map +1 -1
  771. package/dist/src/services/extension-runtime.js +21 -4
  772. package/dist/src/services/extension-runtime.js.map +1 -1
  773. package/dist/src/services/extension-secrets.d.ts +8 -0
  774. package/dist/src/services/extension-secrets.d.ts.map +1 -1
  775. package/dist/src/services/extension-secrets.js +14 -0
  776. package/dist/src/services/extension-secrets.js.map +1 -1
  777. package/dist/src/services/federation-availability.d.ts.map +1 -1
  778. package/dist/src/services/federation-availability.js +1 -0
  779. package/dist/src/services/federation-availability.js.map +1 -1
  780. package/dist/src/services/federation-book.js +15 -7
  781. package/dist/src/services/federation-book.js.map +1 -1
  782. package/dist/src/services/federation-helpers.d.ts.map +1 -1
  783. package/dist/src/services/federation-helpers.js +1 -0
  784. package/dist/src/services/federation-helpers.js.map +1 -1
  785. package/dist/src/services/federation.d.ts.map +1 -1
  786. package/dist/src/services/federation.js +8 -6
  787. package/dist/src/services/federation.js.map +1 -1
  788. package/dist/src/services/gate-expiry.d.ts.map +1 -1
  789. package/dist/src/services/gate-expiry.js +2 -1
  790. package/dist/src/services/gate-expiry.js.map +1 -1
  791. package/dist/src/services/genesis-sync.d.ts.map +1 -1
  792. package/dist/src/services/genesis-sync.js +9 -4
  793. package/dist/src/services/genesis-sync.js.map +1 -1
  794. package/dist/src/services/handbooks/commerce.d.ts +13 -0
  795. package/dist/src/services/handbooks/commerce.d.ts.map +1 -0
  796. package/dist/src/services/handbooks/commerce.js +60 -0
  797. package/dist/src/services/handbooks/commerce.js.map +1 -0
  798. package/dist/src/services/handbooks/index.d.ts +1 -0
  799. package/dist/src/services/handbooks/index.d.ts.map +1 -1
  800. package/dist/src/services/handbooks/index.js +2 -2
  801. package/dist/src/services/handbooks/index.js.map +1 -1
  802. package/dist/src/services/hooks.d.ts.map +1 -1
  803. package/dist/src/services/hooks.js +2 -0
  804. package/dist/src/services/hooks.js.map +1 -1
  805. package/dist/src/services/invitations.d.ts.map +1 -1
  806. package/dist/src/services/invitations.js +2 -0
  807. package/dist/src/services/invitations.js.map +1 -1
  808. package/dist/src/services/living-author.d.ts.map +1 -1
  809. package/dist/src/services/living-author.js +4 -1
  810. package/dist/src/services/living-author.js.map +1 -1
  811. package/dist/src/services/living-pulse.js +18 -6
  812. package/dist/src/services/living-pulse.js.map +1 -1
  813. package/dist/src/services/mailbox-notification.d.ts.map +1 -1
  814. package/dist/src/services/mailbox-notification.js +1 -0
  815. package/dist/src/services/mailbox-notification.js.map +1 -1
  816. package/dist/src/services/match-notification.d.ts.map +1 -1
  817. package/dist/src/services/match-notification.js +2 -1
  818. package/dist/src/services/match-notification.js.map +1 -1
  819. package/dist/src/services/matching.d.ts.map +1 -1
  820. package/dist/src/services/matching.js +5 -2
  821. package/dist/src/services/matching.js.map +1 -1
  822. package/dist/src/services/memory-replication.d.ts.map +1 -1
  823. package/dist/src/services/memory-replication.js +3 -1
  824. package/dist/src/services/memory-replication.js.map +1 -1
  825. package/dist/src/services/message-broadcast.d.ts.map +1 -1
  826. package/dist/src/services/message-broadcast.js +2 -1
  827. package/dist/src/services/message-broadcast.js.map +1 -1
  828. package/dist/src/services/message-delivery.d.ts.map +1 -1
  829. package/dist/src/services/message-delivery.js +9 -4
  830. package/dist/src/services/message-delivery.js.map +1 -1
  831. package/dist/src/services/metered-access.d.ts +148 -0
  832. package/dist/src/services/metered-access.d.ts.map +1 -0
  833. package/dist/src/services/metered-access.js +128 -0
  834. package/dist/src/services/metered-access.js.map +1 -0
  835. package/dist/src/services/metered-entitlements.d.ts +140 -5
  836. package/dist/src/services/metered-entitlements.d.ts.map +1 -1
  837. package/dist/src/services/metered-entitlements.js +247 -30
  838. package/dist/src/services/metered-entitlements.js.map +1 -1
  839. package/dist/src/services/metered-settlement.d.ts +45 -0
  840. package/dist/src/services/metered-settlement.d.ts.map +1 -0
  841. package/dist/src/services/metered-settlement.js +117 -0
  842. package/dist/src/services/metered-settlement.js.map +1 -0
  843. package/dist/src/services/network-policy.d.ts.map +1 -1
  844. package/dist/src/services/network-policy.js +6 -2
  845. package/dist/src/services/network-policy.js.map +1 -1
  846. package/dist/src/services/notebook-classify.d.ts.map +1 -1
  847. package/dist/src/services/notebook-classify.js +7 -2
  848. package/dist/src/services/notebook-classify.js.map +1 -1
  849. package/dist/src/services/notebook-plan.d.ts.map +1 -1
  850. package/dist/src/services/notebook-plan.js +4 -1
  851. package/dist/src/services/notebook-plan.js.map +1 -1
  852. package/dist/src/services/notify.d.ts.map +1 -1
  853. package/dist/src/services/notify.js +6 -3
  854. package/dist/src/services/notify.js.map +1 -1
  855. package/dist/src/services/openrouter.d.ts.map +1 -1
  856. package/dist/src/services/openrouter.js +1 -0
  857. package/dist/src/services/openrouter.js.map +1 -1
  858. package/dist/src/services/organism-export.d.ts.map +1 -1
  859. package/dist/src/services/organism-export.js +4 -1
  860. package/dist/src/services/organism-export.js.map +1 -1
  861. package/dist/src/services/organism-import.d.ts.map +1 -1
  862. package/dist/src/services/organism-import.js +5 -1
  863. package/dist/src/services/organism-import.js.map +1 -1
  864. package/dist/src/services/perf-trace.js +3 -1
  865. package/dist/src/services/perf-trace.js.map +1 -1
  866. package/dist/src/services/personal-tunnel.js +14 -8
  867. package/dist/src/services/personal-tunnel.js.map +1 -1
  868. package/dist/src/services/presence.d.ts.map +1 -1
  869. package/dist/src/services/presence.js +11 -5
  870. package/dist/src/services/presence.js.map +1 -1
  871. package/dist/src/services/protected-resource.d.ts +60 -0
  872. package/dist/src/services/protected-resource.d.ts.map +1 -0
  873. package/dist/src/services/protected-resource.js +137 -0
  874. package/dist/src/services/protected-resource.js.map +1 -0
  875. package/dist/src/services/realtime-manager.d.ts.map +1 -1
  876. package/dist/src/services/realtime-manager.js +8 -5
  877. package/dist/src/services/realtime-manager.js.map +1 -1
  878. package/dist/src/services/safe-zip.d.ts.map +1 -1
  879. package/dist/src/services/safe-zip.js +4 -1
  880. package/dist/src/services/safe-zip.js.map +1 -1
  881. package/dist/src/services/scheduler-extension-job.js +2 -2
  882. package/dist/src/services/scheduler-extension-job.js.map +1 -1
  883. package/dist/src/services/scheduler.js +13 -7
  884. package/dist/src/services/scheduler.js.map +1 -1
  885. package/dist/src/services/security-incident.d.ts.map +1 -1
  886. package/dist/src/services/security-incident.js +7 -2
  887. package/dist/src/services/security-incident.js.map +1 -1
  888. package/dist/src/services/site-sync.d.ts.map +1 -1
  889. package/dist/src/services/site-sync.js +1 -0
  890. package/dist/src/services/site-sync.js.map +1 -1
  891. package/dist/src/services/site.d.ts +1 -1
  892. package/dist/src/services/site.d.ts.map +1 -1
  893. package/dist/src/services/site.js +29 -8
  894. package/dist/src/services/site.js.map +1 -1
  895. package/dist/src/services/structure-overview.d.ts.map +1 -1
  896. package/dist/src/services/structure-overview.js +4 -1
  897. package/dist/src/services/structure-overview.js.map +1 -1
  898. package/dist/src/services/structure-snapshot.d.ts.map +1 -1
  899. package/dist/src/services/structure-snapshot.js +3 -2
  900. package/dist/src/services/structure-snapshot.js.map +1 -1
  901. package/dist/src/services/sync-scheduler.js +3 -2
  902. package/dist/src/services/sync-scheduler.js.map +1 -1
  903. package/dist/src/services/tracked-response.js +1 -1
  904. package/dist/src/services/tracked-response.js.map +1 -1
  905. package/dist/src/services/trust-broadcast.d.ts.map +1 -1
  906. package/dist/src/services/trust-broadcast.js +1 -0
  907. package/dist/src/services/trust-broadcast.js.map +1 -1
  908. package/dist/src/services/upload-zip.d.ts +7 -0
  909. package/dist/src/services/upload-zip.d.ts.map +1 -1
  910. package/dist/src/services/upload-zip.js +19 -85
  911. package/dist/src/services/upload-zip.js.map +1 -1
  912. package/dist/src/services/web-bot-auth.d.ts.map +1 -1
  913. package/dist/src/services/web-bot-auth.js +1 -0
  914. package/dist/src/services/web-bot-auth.js.map +1 -1
  915. package/dist/src/services/workflow/engine-steps.d.ts.map +1 -1
  916. package/dist/src/services/workflow/engine-steps.js +12 -6
  917. package/dist/src/services/workflow/engine-steps.js.map +1 -1
  918. package/dist/src/services/workspace-export.d.ts.map +1 -1
  919. package/dist/src/services/workspace-export.js +5 -2
  920. package/dist/src/services/workspace-export.js.map +1 -1
  921. package/dist/src/services/workspace-import.d.ts.map +1 -1
  922. package/dist/src/services/workspace-import.js +2 -1
  923. package/dist/src/services/workspace-import.js.map +1 -1
  924. package/dist/src/services/workspace-versions.d.ts.map +1 -1
  925. package/dist/src/services/workspace-versions.js +0 -0
  926. package/dist/src/services/workspace-versions.js.map +1 -1
  927. package/dist/src/storage/providers/postgres-kysely/db-types.d.ts +5 -0
  928. package/dist/src/storage/providers/postgres-kysely/db-types.d.ts.map +1 -1
  929. package/dist/src/storage/providers/postgres-kysely/helpers.d.ts +11 -0
  930. package/dist/src/storage/providers/postgres-kysely/helpers.d.ts.map +1 -1
  931. package/dist/src/storage/providers/postgres-kysely/helpers.js +14 -0
  932. package/dist/src/storage/providers/postgres-kysely/helpers.js.map +1 -1
  933. package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts +1 -1
  934. package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts.map +1 -1
  935. package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js +6 -0
  936. package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -1
  937. package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js +3 -3
  938. package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js.map +1 -1
  939. package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js +3 -3
  940. package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js.map +1 -1
  941. package/dist/src/storage/providers/postgres-kysely/methods/federation.d.ts.map +1 -1
  942. package/dist/src/storage/providers/postgres-kysely/methods/federation.js +12 -10
  943. package/dist/src/storage/providers/postgres-kysely/methods/federation.js.map +1 -1
  944. package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts.map +1 -1
  945. package/dist/src/storage/providers/postgres-kysely/methods/identity.js +26 -12
  946. package/dist/src/storage/providers/postgres-kysely/methods/identity.js.map +1 -1
  947. package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js +5 -5
  948. package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js.map +1 -1
  949. package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts +9 -0
  950. package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts.map +1 -1
  951. package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.js +31 -27
  952. package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.js.map +1 -1
  953. package/dist/src/storage/providers/postgres-kysely/methods/organisms.d.ts.map +1 -1
  954. package/dist/src/storage/providers/postgres-kysely/methods/organisms.js +10 -14
  955. package/dist/src/storage/providers/postgres-kysely/methods/organisms.js.map +1 -1
  956. package/dist/src/storage/providers/postgres-kysely/methods/otk.js +3 -3
  957. package/dist/src/storage/providers/postgres-kysely/methods/otk.js.map +1 -1
  958. package/dist/src/storage/providers/postgres-kysely/methods/packages.d.ts.map +1 -1
  959. package/dist/src/storage/providers/postgres-kysely/methods/packages.js +4 -14
  960. package/dist/src/storage/providers/postgres-kysely/methods/packages.js.map +1 -1
  961. package/dist/src/storage/providers/postgres-kysely/methods/template-listings.d.ts.map +1 -1
  962. package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js +11 -10
  963. package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js.map +1 -1
  964. package/dist/src/storage/providers/postgres-kysely/methods/wallet.d.ts.map +1 -1
  965. package/dist/src/storage/providers/postgres-kysely/methods/wallet.js +3 -1
  966. package/dist/src/storage/providers/postgres-kysely/methods/wallet.js.map +1 -1
  967. package/dist/src/storage/providers/postgres-kysely/migrate.d.ts.map +1 -1
  968. package/dist/src/storage/providers/postgres-kysely/migrate.js +3 -0
  969. package/dist/src/storage/providers/postgres-kysely/migrate.js.map +1 -1
  970. package/dist/src/storage/providers/postgres-kysely/migrations/0013_ghii_password_lockout.sql +12 -0
  971. package/dist/src/storage/providers/postgres-kysely/migrations/0014_transaction_initiator.sql +6 -0
  972. package/dist/src/storage/providers/postgres-kysely/migrations/0015_app_grant_spend_cap.sql +5 -0
  973. package/dist/src/storage/providers/sqlite/methods/apps.d.ts +1 -1
  974. package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
  975. package/dist/src/storage/providers/sqlite/methods/apps.js +12 -2
  976. package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
  977. package/dist/src/storage/providers/sqlite/methods/community.d.ts.map +1 -1
  978. package/dist/src/storage/providers/sqlite/methods/community.js +6 -1
  979. package/dist/src/storage/providers/sqlite/methods/community.js.map +1 -1
  980. package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
  981. package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +9 -2
  982. package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
  983. package/dist/src/storage/providers/sqlite/methods/work.d.ts.map +1 -1
  984. package/dist/src/storage/providers/sqlite/methods/work.js +4 -2
  985. package/dist/src/storage/providers/sqlite/methods/work.js.map +1 -1
  986. package/dist/src/storage/providers/sqlite/repos/community.d.ts.map +1 -1
  987. package/dist/src/storage/providers/sqlite/repos/community.js +6 -1
  988. package/dist/src/storage/providers/sqlite/repos/community.js.map +1 -1
  989. package/dist/src/storage/providers/sqlite/repos/identity.d.ts +3 -0
  990. package/dist/src/storage/providers/sqlite/repos/identity.d.ts.map +1 -1
  991. package/dist/src/storage/providers/sqlite/repos/identity.js +13 -4
  992. package/dist/src/storage/providers/sqlite/repos/identity.js.map +1 -1
  993. package/dist/src/storage/providers/sqlite/repos/work.d.ts.map +1 -1
  994. package/dist/src/storage/providers/sqlite/repos/work.js +4 -2
  995. package/dist/src/storage/providers/sqlite/repos/work.js.map +1 -1
  996. package/dist/src/storage/providers/sqlite/schema-tables-1.d.ts.map +1 -1
  997. package/dist/src/storage/providers/sqlite/schema-tables-1.js +1 -0
  998. package/dist/src/storage/providers/sqlite/schema-tables-1.js.map +1 -1
  999. package/dist/src/storage/providers/sqlite/schema-tables-2.d.ts.map +1 -1
  1000. package/dist/src/storage/providers/sqlite/schema-tables-2.js +2 -0
  1001. package/dist/src/storage/providers/sqlite/schema-tables-2.js.map +1 -1
  1002. package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
  1003. package/dist/src/storage/providers/sqlite/schema.js +14 -1
  1004. package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
  1005. package/dist/src/storage/repositories/app-grant.repository.d.ts +1 -1
  1006. package/dist/src/storage/repositories/app-grant.repository.d.ts.map +1 -1
  1007. package/dist/src/storage/types/auth.d.ts +9 -0
  1008. package/dist/src/storage/types/auth.d.ts.map +1 -1
  1009. package/dist/src/storage/types/commerce.d.ts +13 -0
  1010. package/dist/src/storage/types/commerce.d.ts.map +1 -1
  1011. package/dist/src/utils/app-agent-discovery.d.ts +31 -0
  1012. package/dist/src/utils/app-agent-discovery.d.ts.map +1 -0
  1013. package/dist/src/utils/app-agent-discovery.js +96 -0
  1014. package/dist/src/utils/app-agent-discovery.js.map +1 -0
  1015. package/dist/src/utils/app-protect.d.ts.map +1 -1
  1016. package/dist/src/utils/app-protect.js +1 -0
  1017. package/dist/src/utils/app-protect.js.map +1 -1
  1018. package/dist/src/utils/env-validator.d.ts.map +1 -1
  1019. package/dist/src/utils/env-validator.js +5 -1
  1020. package/dist/src/utils/env-validator.js.map +1 -1
  1021. package/dist/src/utils/gaii.d.ts +50 -0
  1022. package/dist/src/utils/gaii.d.ts.map +1 -1
  1023. package/dist/src/utils/gaii.js +66 -0
  1024. package/dist/src/utils/gaii.js.map +1 -1
  1025. package/dist/src/utils/url-validator.d.ts.map +1 -1
  1026. package/dist/src/utils/url-validator.js +4 -1
  1027. package/dist/src/utils/url-validator.js.map +1 -1
  1028. package/dist/src/utils/version.d.ts.map +1 -1
  1029. package/dist/src/utils/version.js +1 -0
  1030. package/dist/src/utils/version.js.map +1 -1
  1031. package/dist/static/sdk-libs/auth/session.js +7 -3
  1032. package/dist/static/sdk-libs/dist/aimeat-auth.js +1 -1
  1033. package/dist/static/sdk-libs/dist/aimeat-exchange.js +675 -0
  1034. package/dist/static/sdk-libs/dist/aimeat-game.js +1555 -0
  1035. package/dist/static/sdk-libs/dist/aimeat-webmcp.js +46 -0
  1036. package/dist/static/sdk-libs/exchange/browse.js +81 -0
  1037. package/dist/static/sdk-libs/exchange/client.js +131 -0
  1038. package/dist/static/sdk-libs/exchange/contracts.js +228 -0
  1039. package/dist/static/sdk-libs/exchange/demand.js +106 -0
  1040. package/dist/static/sdk-libs/exchange/earnings.js +39 -0
  1041. package/dist/static/sdk-libs/exchange/format.js +51 -0
  1042. package/dist/static/sdk-libs/exchange/index.js +70 -0
  1043. package/dist/static/sdk-libs/exchange/odps-completeness.js +177 -0
  1044. package/dist/static/sdk-libs/exchange/sell.js +253 -0
  1045. package/dist/static/sdk-libs/game/board.js +331 -0
  1046. package/dist/static/sdk-libs/game/dom.js +223 -0
  1047. package/dist/static/sdk-libs/game/i18n.js +201 -0
  1048. package/dist/static/sdk-libs/game/index.js +72 -0
  1049. package/dist/static/sdk-libs/game/markers.js +150 -0
  1050. package/dist/static/sdk-libs/game/menu.js +260 -0
  1051. package/dist/static/sdk-libs/game/overlay.js +193 -0
  1052. package/dist/static/sdk-libs/game/progress.js +280 -0
  1053. package/dist/static/sdk-libs/game/score.js +134 -0
  1054. package/dist/static/sdk-libs/game/screen.js +120 -0
  1055. package/dist/static/sdk-libs/game/units.js +55 -0
  1056. package/dist/static/sdk-libs/webmcp/index.js +63 -0
  1057. package/package.json +2 -1
@@ -94,6 +94,27 @@
94
94
  return asContent(res.ok ? res.data : res);
95
95
  };
96
96
  }
97
+ function aboutTool(ref, surface, toolCount) {
98
+ const s = surface || {};
99
+ const label = s.name || ref.appId;
100
+ const parts = [];
101
+ if (toolCount) parts.push(toolCount + " callable tool" + (toolCount === 1 ? "" : "s"));
102
+ if ((s.skills || []).length) parts.push(s.skills.length + " bound skill" + (s.skills.length === 1 ? "" : "s"));
103
+ if ((s.bundled_agents || []).length) parts.push(s.bundled_agents.length + " bundled agent" + (s.bundled_agents.length === 1 ? "" : "s"));
104
+ const offers = ((s.exchange || {}).offerings || []).length;
105
+ if (offers) parts.push(offers + " EXCHANGE listing" + (offers === 1 ? "" : "s"));
106
+ const carries = parts.length ? " Carries " + parts.join(", ") + "." : "";
107
+ return {
108
+ name: "about-this-app",
109
+ description: 'What "' + label + '" (' + ref.owner + "/" + ref.appId + ") offers an agent: its app id, declared scopes, the SKILL.md packs bound to it, the agent crews it ships, and what it sells on the AIMEAT EXCHANGE, with prices." + carries,
110
+ inputSchema: { type: "object", properties: {} },
111
+ async execute() {
112
+ if (surface) return asContent(surface);
113
+ const listing = await fetchListing(ref.owner, ref.appId);
114
+ return asContent(listing.app_surface || { app: ref.owner + "/" + ref.appId });
115
+ }
116
+ };
117
+ }
97
118
  var webmcp = {
98
119
  /** Every tool descriptor this page has registered (introspection + provideContext resends). */
99
120
  tools: [],
@@ -116,9 +137,15 @@
116
137
  /**
117
138
  * Expose an app's declared tools (apps.{appId}.tools manifest) to the in-browser agent.
118
139
  * Descriptions of priced tools carry the price tag so the agent can tell the user the cost.
140
+ *
141
+ * Every app also gets `about-this-app`, built from the listing's `app_surface`: the SKILL.md
142
+ * packs bound to the app, the crew-defs it ships, its declared scopes and its live EXCHANGE
143
+ * listings. An app that sells nothing still exposes that one, so an agent that lands on any
144
+ * app page can ask what it is looking at instead of reading 200 kB of minified source.
119
145
  */
120
146
  async exposeAppTools(ref) {
121
147
  const listing = await fetchListing(ref.owner, ref.appId);
148
+ const surface = listing.app_surface || null;
122
149
  const tools = (listing.tools || []).map(function(entry) {
123
150
  let desc = entry.description || entry.name;
124
151
  if (entry.payment && entry.payment.required) {
@@ -135,6 +162,7 @@
135
162
  execute: buildExecute(ref.owner, ref.appId, entry)
136
163
  };
137
164
  });
165
+ tools.unshift(aboutTool(ref, surface, tools.length));
138
166
  await webmcp.register(tools);
139
167
  return { surface: webmcp.surface, tools: tools.map(function(t) {
140
168
  return t.name;
@@ -169,6 +197,18 @@
169
197
  }
170
198
  };
171
199
  attach("webmcp", webmcp);
200
+ function appRefFromPage(el) {
201
+ const ds = el && el.dataset || {};
202
+ if (ds.owner && ds.app) return { owner: ds.owner, appId: ds.app };
203
+ try {
204
+ const node = document.getElementById("aimeat-app-ref");
205
+ if (!node) return null;
206
+ const ref = JSON.parse(node.textContent || "{}");
207
+ if (ref.owner && ref.app_id) return { owner: ref.owner, appId: ref.app_id };
208
+ } catch {
209
+ }
210
+ return null;
211
+ }
172
212
  try {
173
213
  const el = (
174
214
  /** @type {any} */
@@ -181,6 +221,12 @@
181
221
  webmcp.exposeNodeTools().catch(function() {
182
222
  });
183
223
  }, 0);
224
+ } else if (expose === "app") {
225
+ const ref = appRefFromPage(el);
226
+ if (ref) setTimeout(function() {
227
+ webmcp.exposeAppTools(ref).catch(function() {
228
+ });
229
+ }, 0);
184
230
  }
185
231
  } catch {
186
232
  }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @file exchange/browse.js
3
+ * @description The BROWSE half of AIMEAT.exchange — reading the market. Every call here maps to a
4
+ * route the node publishes without authentication, so an app can render the catalogue, one
5
+ * listing's full decision context, and its ODPS v4.1 descriptor to a signed-out visitor. The
6
+ * session is sent when there is one (see client.js `maybe`) purely so a seller's own projections
7
+ * are fresh; it changes what is CURRENT, never what is VISIBLE.
8
+ * @structure info() · list(filter) · search(q, filter) · get(id) · odps(id) · odpsYaml(id)
9
+ * @usage const { offerings } = await AIMEAT.exchange.list({ q: 'company', stats: true });
10
+ * @version-history
11
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
12
+ */
13
+ import { pub, pubText, maybe, qs } from './client.js';
14
+
15
+ const enc = encodeURIComponent;
16
+
17
+ /**
18
+ * The marketplace's public economics: `{ rake_percent, rake_note, units, morsel_note }` — what the
19
+ * platform takes on each metered call, set by the node operator. Show it BEFORE a seller prices
20
+ * something, so the split is stated rather than discovered on the first sale.
21
+ * @returns {Promise<any>}
22
+ */
23
+ export function info() {
24
+ return pub('/v1/exchange/info', 'Failed to read the EXCHANGE economics');
25
+ }
26
+
27
+ /**
28
+ * Browse listed offerings. Every supplied filter NARROWS, independently.
29
+ * @param {{ ext?: string, action?: string, q?: string, stats?: boolean }} [filter]
30
+ * `q` free-text over title/description/coordinate/tags; `stats: true` folds each listing's usage
31
+ * (contracts, calls, consumers, settled units, observed p50/p95) into the row.
32
+ * @returns {Promise<{ offerings: any[], count: number }>}
33
+ */
34
+ export function list(filter) {
35
+ const f = filter || {};
36
+ const query = qs({ ext: f.ext, action: f.action, q: f.q, stats: f.stats ? '1' : null });
37
+ return maybe('/v1/exchange/offerings' + query, 'Failed to browse the marketplace');
38
+ }
39
+
40
+ /**
41
+ * Free-text search — the same route as {@link list}, named for what an app's search box does.
42
+ * @param {string} q
43
+ * @param {{ ext?: string, action?: string, stats?: boolean }} [filter]
44
+ * @returns {Promise<{ offerings: any[], count: number }>}
45
+ */
46
+ export function search(q, filter) {
47
+ return list({ ...(filter || {}), q });
48
+ }
49
+
50
+ /**
51
+ * One offering in FULL: `{ offering, capability, call_recipe, stats, pacing, odps }` — the I/O
52
+ * schema, how to call it (the contract IS the access; no API key is issued), what it costs per call
53
+ * in morsels burned for pacing on top of the price, the observed usage, and a pointer to the ODPS
54
+ * document. One call, so an app need not stitch four.
55
+ * @param {string} id Offering id (`off-…`).
56
+ * @returns {Promise<any>}
57
+ */
58
+ export function get(id) {
59
+ return pub('/v1/exchange/offerings/' + enc(id), 'No such offering');
60
+ }
61
+
62
+ /**
63
+ * The offering as an Open Data Product Specification v4.1 document (JSON) — the interoperable
64
+ * descriptor an outside catalogue or a negotiating agent reads without knowing anything about
65
+ * AIMEAT. Derived on read, so it cannot drift from the listing it describes.
66
+ * @param {string} id
67
+ * @returns {Promise<{ odps_version: string, odps: any }>}
68
+ */
69
+ export function odps(id) {
70
+ return pub('/v1/exchange/offerings/' + enc(id) + '/odps', 'No such offering');
71
+ }
72
+
73
+ /**
74
+ * The same ODPS v4.1 document in the spec's native YAML, as raw text — what you hand to a catalogue
75
+ * that expects the file, or show in a "copy this descriptor" box.
76
+ * @param {string} id
77
+ * @returns {Promise<string>}
78
+ */
79
+ export function odpsYaml(id) {
80
+ return pubText('/v1/exchange/offerings/' + enc(id) + '/odps.yaml', 'No such offering');
81
+ }
@@ -0,0 +1,131 @@
1
+ /**
2
+ * @file exchange/client.js
3
+ * @description Shared fetch plumbing for the aimeat-exchange library. EXCHANGE is a two-sided market
4
+ * whose read surface is deliberately PUBLIC (browsing a listing, its ODPS document and its stats
5
+ * needs no account) while every write and every "mine" read is authorised. So there are three call
6
+ * shapes rather than one: `pub` (never sends a session), `authed` (requires one — the auth guard
7
+ * names this library in its error) and `maybe` (sends the session when there is one). `maybe` is not
8
+ * a convenience: GET /v1/exchange/offerings reconciles the CALLER's own projections before it
9
+ * answers, so a signed-in seller browsing the market sees their own listings up to date, and a
10
+ * signed-out visitor still gets the market.
11
+ * SECURITY: this file carries no credentials of its own. It sends the aimeat-auth session and
12
+ * renders what comes back — who may see what is the server's decision, never this library's.
13
+ * @structure exchangeError(res, fallback) · qs(params) · pub(path) · authed(path, opts) ·
14
+ * maybe(path) · hasSession()
15
+ * @usage import { authed, pub, qs, exchangeError } from './client.js';
16
+ * @version-history
17
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
18
+ */
19
+ import { APEX_URL } from '../_core/config.js';
20
+ import { makeSession } from '../_core/session.js';
21
+
22
+ const NODE_URL = APEX_URL;
23
+ const { authFetch } = makeSession('aimeat-exchange.js');
24
+
25
+ /**
26
+ * Build an Error from a failed envelope, preserving the machine-readable code so callers can branch
27
+ * on it (`SOURCE_MANAGED`, `SCHEMA_REQUIRED`, `USAGE_TERMS_REQUIRED`, `NOT_PRICED`, `BUDGET_TOO_LOW`
28
+ * …) instead of matching on message text. EXCHANGE refusals are mostly *actionable* — they say which
29
+ * field the provider must publish — so the message is kept verbatim.
30
+ * @param {any} res The parsed envelope.
31
+ * @param {string} fallback Message to use when the envelope carries none.
32
+ * @returns {Error & { code?: string, details?: unknown }}
33
+ */
34
+ export function exchangeError(res, fallback) {
35
+ const e = /** @type {Error & { code?: string, details?: unknown }} */ (
36
+ new Error((res && res.error && res.error.message) || fallback));
37
+ e.code = res && res.error && res.error.code;
38
+ e.details = res && res.error && res.error.details;
39
+ return e;
40
+ }
41
+
42
+ /**
43
+ * Serialise a query object, dropping null/undefined/'' so an unset filter is not sent as an empty
44
+ * one (the offerings route treats every supplied filter as a NARROWING term).
45
+ * @param {Record<string, string|number|boolean|null|undefined>} [params]
46
+ * @returns {string} `?a=1&b=2`, or '' when nothing is set.
47
+ */
48
+ export function qs(params) {
49
+ const parts = [];
50
+ for (const k of Object.keys(params || {})) {
51
+ const v = params[k];
52
+ if (v === null || v === undefined || v === '') continue;
53
+ parts.push(encodeURIComponent(k) + '=' + encodeURIComponent(String(v)));
54
+ }
55
+ return parts.length ? '?' + parts.join('&') : '';
56
+ }
57
+
58
+ /** True when aimeat-auth is loaded AND someone is signed in — never throws. */
59
+ export function hasSession() {
60
+ try {
61
+ const auth = window.AIMEAT && window.AIMEAT.auth;
62
+ return !!(auth && auth.getSession());
63
+ } catch { return false; }
64
+ }
65
+
66
+ /**
67
+ * A PUBLIC read — no session, ever. Used for the browse surface so a signed-out visitor sees the
68
+ * market exactly as the node publishes it.
69
+ * @param {string} path
70
+ * @param {string} fallback Error message when the envelope carries none.
71
+ * @returns {Promise<any>} The envelope's `data`.
72
+ */
73
+ export async function pub(path, fallback) {
74
+ const r = await fetch(NODE_URL + path);
75
+ const res = await r.json();
76
+ if (!res.ok) throw exchangeError(res, fallback);
77
+ return res.data;
78
+ }
79
+
80
+ /** A PUBLIC read that returns raw text rather than an envelope (the ODPS `.yaml` projection). */
81
+ export async function pubText(path, fallback) {
82
+ const r = await fetch(NODE_URL + path);
83
+ const text = await r.text();
84
+ if (!r.ok) {
85
+ let parsed = null;
86
+ try { parsed = JSON.parse(text); } catch { /* a non-envelope error body — fall through */ }
87
+ throw exchangeError(parsed, fallback);
88
+ }
89
+ return text;
90
+ }
91
+
92
+ /**
93
+ * An AUTHORISED call — the session's own fetch (bearer token, refresh on 401, scope self-heal).
94
+ * @param {string} path
95
+ * @param {RequestInit} [opts]
96
+ * @param {string} [fallback]
97
+ * @returns {Promise<any>} The envelope's `data`.
98
+ */
99
+ export async function authed(path, opts, fallback) {
100
+ const res = await authFetch(path, opts);
101
+ if (!res.ok) throw exchangeError(res, fallback || 'EXCHANGE request failed');
102
+ return res.data;
103
+ }
104
+
105
+ /**
106
+ * A public read that SENDS the session when there is one. Signed in, the offerings route brings the
107
+ * caller's own projections up to date before answering; signed out, the same call still returns the
108
+ * public market.
109
+ * @param {string} path
110
+ * @param {string} fallback
111
+ * @returns {Promise<any>}
112
+ */
113
+ export async function maybe(path, fallback) {
114
+ if (!hasSession()) return pub(path, fallback);
115
+ try {
116
+ return await authed(path, undefined, fallback);
117
+ } catch (e) {
118
+ // A stale or scope-short session must never turn a PUBLIC surface into an error page.
119
+ if (e && (e.code === 'UNAUTHORIZED' || e.code === 'FORBIDDEN')) return pub(path, fallback);
120
+ throw e;
121
+ }
122
+ }
123
+
124
+ /** POST/DELETE helper: JSON body, authorised. */
125
+ export function send(path, method, body, fallback) {
126
+ const opts = /** @type {RequestInit} */ ({ method });
127
+ if (body !== undefined) opts.body = JSON.stringify(body);
128
+ return authed(path, opts, fallback);
129
+ }
130
+
131
+ export { NODE_URL };
@@ -0,0 +1,228 @@
1
+ /**
2
+ * @file exchange/contracts.js
3
+ * @description The BUY half of AIMEAT.exchange — accepting a contract, seeing what it has consumed,
4
+ * turning it off, renegotiating it, and (for agent-work) starting and receiving a task.
5
+ *
6
+ * A contract here is a metered entitlement: the consumer chooses only their BUDGET, the per-call
7
+ * price is read authoritatively from the provider. That is why `accept` takes an offering id and a
8
+ * cap rather than a price — a price sent from a browser would be a price a buyer set for a seller.
9
+ * @structure contracts() · accept(offeringId, opts) · off(contract, opts) · history() · spend() ·
10
+ * proposals() · propose(spec) · acceptProposal/declineProposal/withdrawProposal ·
11
+ * startWork(spec) · deliverWork(id, spec) · work(opts) · coordinateOf
12
+ * @usage const c = await AIMEAT.exchange.accept('off-abc123', { capUnits: 500 });
13
+ * @version-history
14
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
15
+ */
16
+ import { authed, send, qs, exchangeError } from './client.js';
17
+ import { get as getOffering } from './browse.js';
18
+
19
+ const enc = encodeURIComponent;
20
+
21
+ function compact(obj) {
22
+ const out = {};
23
+ for (const k of Object.keys(obj)) if (obj[k] !== undefined) out[k] = obj[k];
24
+ return out;
25
+ }
26
+ function pick(...vals) {
27
+ for (const v of vals) if (v !== undefined && v !== null) return v;
28
+ return undefined;
29
+ }
30
+
31
+ /**
32
+ * Every contract the caller's OWNER holds, with what each has consumed: budget cap, spent, calls
33
+ * remaining, the pricing model, the pacing toll it was signed at, the rake, and `callers` — which
34
+ * of the owner's principals ran it up.
35
+ * @returns {Promise<{ entitlements: any[] }>}
36
+ */
37
+ export function contracts() {
38
+ return authed('/v1/exchange/entitlements', undefined, 'Failed to read your contracts');
39
+ }
40
+
41
+ /**
42
+ * Accept a contract for a listed offering → mint the durable entitlement the metered gateway then
43
+ * honours on every call. You choose the budget; the provider's price is authoritative.
44
+ * @param {string} offeringId
45
+ * @param {{ capUnits?: number|null, appId?: string, planId?: string, contractRef?: string,
46
+ * escrowParty?: 'consumer'|'provider' }} [opts]
47
+ * `capUnits` is YOUR spend ceiling in the offering's unit (money micro-units or morsels); omit for
48
+ * uncapped. Below one charge it is refused with `BUDGET_TOO_LOW` rather than minted unusable.
49
+ * `planId` picks a provider-declared bundle/subscription plan.
50
+ * @returns {Promise<any>} The minted contract.
51
+ */
52
+ export async function accept(offeringId, opts) {
53
+ const o = /** @type {Record<string, any>} */ (opts || {});
54
+ const d = await send('/v1/exchange/entitlements', 'POST', compact({
55
+ offering_id: offeringId,
56
+ cap_units: pick(o.capUnits, o.cap_units),
57
+ app_id: pick(o.appId, o.app_id),
58
+ plan_id: pick(o.planId, o.plan_id),
59
+ contract_ref: pick(o.contractRef, o.contract_ref),
60
+ escrow_party: pick(o.escrowParty, o.escrow_party),
61
+ }), 'Failed to accept the contract');
62
+ return d.entitlement;
63
+ }
64
+
65
+ /**
66
+ * Resolve whatever an app is holding — a contract row, an offering detail, an offering id, or a
67
+ * plain `{ ext, action }` — into the metered coordinate the off-switch and proposals key on.
68
+ * @param {any} contract
69
+ * @returns {Promise<{ ext: string, action: string }>}
70
+ */
71
+ export async function coordinateOf(contract) {
72
+ if (typeof contract === 'string') {
73
+ // An offering id (`off-…`); anything else cannot be resolved without a coordinate.
74
+ const d = await getOffering(contract);
75
+ return { ext: d.offering.ext, action: d.offering.action };
76
+ }
77
+ const c = contract || {};
78
+ const ext = c.ext || (c.offering && c.offering.ext);
79
+ const action = c.action || (c.offering && c.offering.action);
80
+ if (!ext || !action) {
81
+ throw exchangeError({ error: { code: 'BAD_REQUEST', message:
82
+ 'Name the contract by its capability coordinate ({ ext, action }), a contract row from contracts(), or an offering id.' } },
83
+ 'Unresolvable contract reference');
84
+ }
85
+ return { ext, action };
86
+ }
87
+
88
+ /**
89
+ * The consumer's OFF-SWITCH. `pause` is reversible (re-accepting resumes it and carries the spend
90
+ * forward); `revoke` is terminal. Only the contract's own consumer may.
91
+ * @param {any} contract A contract row, an offering id, or `{ ext, action }`.
92
+ * @param {{ mode?: 'pause'|'revoke' }} [opts] Default `pause`.
93
+ * @returns {Promise<any>}
94
+ */
95
+ export async function off(contract, opts) {
96
+ const { ext, action } = await coordinateOf(contract);
97
+ return send('/v1/exchange/entitlements/off', 'POST', {
98
+ ext, action, mode: (opts && opts.mode) === 'revoke' ? 'revoke' : 'pause',
99
+ }, 'Failed to switch the contract off');
100
+ }
101
+
102
+ /**
103
+ * Your PAST (archived / superseded) contracts as a CONSUMER — the terms a renegotiation replaced.
104
+ * @returns {Promise<{ history: any[], count: number }>}
105
+ */
106
+ export function history() {
107
+ return authed('/v1/exchange/entitlements/history', undefined, 'Failed to read your contract history');
108
+ }
109
+
110
+ /**
111
+ * What you have spent OUTBOUND, per provider and per unit. DERIVED, not a server endpoint: the node
112
+ * aggregates the SELLER's side (offering stats, consumer lineage, earnings) and exposes the buyer's
113
+ * side only per app (`GET /v1/apps/cost?app_id=…`), so this folds the caller's own contracts — the
114
+ * same records the per-app view reads — into one figure. It therefore counts exactly what the
115
+ * caller's OWNER holds a contract for, and nothing about another of their accounts.
116
+ * @returns {Promise<{ byProvider: any[], byUnit: Record<string, { spentUnits: number, calls: number, contracts: number }>,
117
+ * totalCalls: number, totalContracts: number }>}
118
+ */
119
+ export async function spend() {
120
+ const { entitlements } = await contracts();
121
+ const byUnit = /** @type {Record<string, { spentUnits: number, calls: number, contracts: number }>} */ ({});
122
+ const providers = /** @type {Record<string, any>} */ ({});
123
+ let totalCalls = 0;
124
+ for (const e of entitlements || []) {
125
+ const rail = e.unit === 'money' ? (e.currency || 'EUR') : 'morsels';
126
+ const u = byUnit[rail] || (byUnit[rail] = { spentUnits: 0, calls: 0, contracts: 0 });
127
+ u.spentUnits += e.budget ? e.budget.spent_units : 0;
128
+ u.calls += e.budget ? e.budget.calls : 0;
129
+ u.contracts += 1;
130
+ totalCalls += e.budget ? e.budget.calls : 0;
131
+
132
+ const key = e.provider + '|' + rail;
133
+ const p = providers[key] || (providers[key] = {
134
+ provider: e.provider, unit: rail, spentUnits: 0, calls: 0, contracts: 0, capabilities: [],
135
+ });
136
+ p.spentUnits += e.budget ? e.budget.spent_units : 0;
137
+ p.calls += e.budget ? e.budget.calls : 0;
138
+ p.contracts += 1;
139
+ if (p.capabilities.indexOf(e.capability) === -1) p.capabilities.push(e.capability);
140
+ }
141
+ const byProvider = Object.keys(providers).map(k => providers[k])
142
+ .sort((a, b) => b.spentUnits - a.spentUnits);
143
+ return { byProvider, byUnit, totalCalls, totalContracts: (entitlements || []).length };
144
+ }
145
+
146
+ // ── Renegotiation ────────────────────────────────────────────────────────────
147
+
148
+ /**
149
+ * Every contract-change proposal you are party to (incoming and outgoing).
150
+ * @returns {Promise<{ proposals: any[], count: number }>}
151
+ */
152
+ export function proposals() {
153
+ return authed('/v1/exchange/proposals', undefined, 'Failed to read proposals');
154
+ }
155
+
156
+ /**
157
+ * Propose new terms on a live contract. Either party may: a consumer renegotiates their own, a
158
+ * provider renegotiates a named consumer's (`consumerGaii`). Nothing changes until the counterparty
159
+ * accepts; they are notified in Profile > Messages.
160
+ * @param {{ ext?: string, action?: string, contract?: any, consumerGaii?: string,
161
+ * newPricePerCall?: number, newCapUnits?: number, note?: string }} spec
162
+ * @returns {Promise<any>} The pending proposal.
163
+ */
164
+ export async function propose(spec) {
165
+ const s = /** @type {Record<string, any>} */ (spec || {});
166
+ const { ext, action } = await coordinateOf(s.contract || { ext: s.ext, action: s.action });
167
+ const d = await send('/v1/exchange/proposals', 'POST', compact({
168
+ ext, action,
169
+ consumer_gaii: pick(s.consumerGaii, s.consumer_gaii),
170
+ new_price_per_call: pick(s.newPricePerCall, s.new_price_per_call),
171
+ new_cap_units: pick(s.newCapUnits, s.new_cap_units),
172
+ note: s.note,
173
+ }), 'Failed to propose new terms');
174
+ return d.proposal;
175
+ }
176
+
177
+ /** The COUNTERPARTY accepts → the old contract is archived and a new one minted at the new terms. */
178
+ export function acceptProposal(id) {
179
+ return send('/v1/exchange/proposals/' + enc(id) + '/accept', 'POST', {}, 'Failed to accept the proposal');
180
+ }
181
+ /** The counterparty declines — the contract is unchanged. */
182
+ export function declineProposal(id) {
183
+ return send('/v1/exchange/proposals/' + enc(id) + '/decline', 'POST', {}, 'Failed to decline the proposal');
184
+ }
185
+ /** The PROPOSER withdraws their own pending proposal. */
186
+ export function withdrawProposal(id) {
187
+ return send('/v1/exchange/proposals/' + enc(id) + '/withdraw', 'POST', {}, 'Failed to withdraw the proposal');
188
+ }
189
+
190
+ // ── Agent work (the async surface — settled per delivered task) ───────────────
191
+
192
+ /**
193
+ * Start a task under an agent-work contract. Nothing is charged yet: the per-task price is metered
194
+ * when the provider DELIVERS. Without an active contract this is refused with `NO_CONTRACT` (402).
195
+ * @param {{ offeringId: string, input?: any, note?: string }} spec
196
+ * @returns {Promise<any>} The open work item.
197
+ */
198
+ export async function startWork(spec) {
199
+ const s = /** @type {Record<string, any>} */ (spec || {});
200
+ const d = await send('/v1/exchange/work', 'POST', compact({
201
+ offering_id: pick(s.offeringId, s.offering_id), input: s.input, note: s.note,
202
+ }), 'Failed to start the work');
203
+ return d.work;
204
+ }
205
+
206
+ /**
207
+ * Deliver a task you were commissioned for → settle on delivery (the consumer is charged, you are
208
+ * credited its cut, the rake routed, the budget decremented).
209
+ * @param {string} id
210
+ * @param {{ output?: any, note?: string }} [spec]
211
+ * @returns {Promise<any>} The delivered work item.
212
+ */
213
+ export async function deliverWork(id, spec) {
214
+ const s = /** @type {Record<string, any>} */ (spec || {});
215
+ const d = await send('/v1/exchange/work/' + enc(id) + '/deliver', 'POST',
216
+ compact({ output: s.output, note: s.note }), 'Failed to deliver the work');
217
+ return d.work;
218
+ }
219
+
220
+ /**
221
+ * Your agent-work items. `{ role: 'provider' }` for work commissioned FROM you; default is work you
222
+ * commissioned.
223
+ * @param {{ role?: 'consumer'|'provider' }} [opts]
224
+ * @returns {Promise<{ work: any[], count: number, role: string }>}
225
+ */
226
+ export function work(opts) {
227
+ return authed('/v1/exchange/work' + qs({ role: opts && opts.role }), undefined, 'Failed to read your work items');
228
+ }
@@ -0,0 +1,106 @@
1
+ /**
2
+ * @file exchange/demand.js
3
+ * @description The DEMAND side of AIMEAT.exchange — an app says what it needs and cannot produce
4
+ * itself, providers bid, the requester accepts one and a contract is minted. A need is always
5
+ * posted on behalf of a specific app (`appId`), which is what turns a wish into a request a
6
+ * provider can judge: they can see who they would be serving before offering.
7
+ * @structure needs(opts) · postNeed(spec) · closeNeed(id) · bids(needId) · bid(needId, spec) ·
8
+ * acceptBid(needId, bidId, opts)
9
+ * @usage await AIMEAT.exchange.postNeed({ appId: 'alice/crm', description: '…', spec: { requiredFields: [...] } });
10
+ * @version-history
11
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
12
+ */
13
+ import { authed, pub, send, qs } from './client.js';
14
+
15
+ const enc = encodeURIComponent;
16
+
17
+ function compact(obj) {
18
+ const out = {};
19
+ for (const k of Object.keys(obj)) if (obj[k] !== undefined) out[k] = obj[k];
20
+ return out;
21
+ }
22
+ function pick(...vals) {
23
+ for (const v of vals) if (v !== undefined && v !== null) return v;
24
+ return undefined;
25
+ }
26
+
27
+ /**
28
+ * Browse needs. Public. Each is enriched with `appContext` — the requesting app's published name
29
+ * and description — so a provider judges the consumer, not just the ask.
30
+ * @param {{ open?: boolean, mine?: boolean }} [opts] `mine` requires a session.
31
+ * @returns {Promise<{ needs: any[], count: number }>}
32
+ */
33
+ export function needs(opts) {
34
+ const o = opts || {};
35
+ const query = qs({ open: o.open ? '1' : null, mine: o.mine ? '1' : null });
36
+ return o.mine
37
+ ? authed('/v1/exchange/needs' + query, undefined, 'Failed to read your needs')
38
+ : pub('/v1/exchange/needs' + query, 'Failed to browse needs');
39
+ }
40
+
41
+ /**
42
+ * Post an open need. `appId` is REQUIRED (`NEED_APP_REQUIRED` without it) — a need belongs to the
43
+ * app that will call the answer. The response carries `matches`: offerings that already satisfy it,
44
+ * so the requester can accept one directly instead of waiting for a bid.
45
+ * @param {{ appId: string, description: string, ext?: string, action?: string,
46
+ * spec?: { requiredFields?: string[], format?: string, sample?: string, notes?: string,
47
+ * inputSchema?: object, outputSchema?: object },
48
+ * usageIntent?: string, budgetUnit?: 'money'|'morsels', budgetCap?: number,
49
+ * autonomy?: 'supervised'|'auto' }} spec
50
+ * @returns {Promise<{ need: any, matches: any[] }>}
51
+ */
52
+ export function postNeed(spec) {
53
+ const s = /** @type {Record<string, any>} */ (spec || {});
54
+ return send('/v1/exchange/needs', 'POST', compact({
55
+ app_id: pick(s.appId, s.app_id),
56
+ description: s.description,
57
+ ext: s.ext,
58
+ action: s.action,
59
+ spec: s.spec,
60
+ usage_intent: pick(s.usageIntent, s.usage_intent),
61
+ budget_unit: pick(s.budgetUnit, s.budget_unit),
62
+ budget_cap: pick(s.budgetCap, s.budget_cap),
63
+ autonomy: s.autonomy,
64
+ }), 'Failed to post the need');
65
+ }
66
+
67
+ /** Close one of your own needs. */
68
+ export function closeNeed(id) {
69
+ return send('/v1/exchange/needs/' + enc(id) + '/close', 'POST', {}, 'Failed to close the need');
70
+ }
71
+
72
+ /** The bids on a need. Public — demand and the answers to it are both browsable. */
73
+ export function bids(needId) {
74
+ return pub('/v1/exchange/needs/' + enc(needId) + '/bids', 'Failed to read bids');
75
+ }
76
+
77
+ /**
78
+ * Bid on an open need with an action YOUR extension owns (anything else is refused, 403).
79
+ * @param {string} needId
80
+ * @param {{ ext: string, action: string, offeringId?: string, planId?: string, note?: string }} spec
81
+ * @returns {Promise<any>} The open bid.
82
+ */
83
+ export async function bid(needId, spec) {
84
+ const s = /** @type {Record<string, any>} */ (spec || {});
85
+ const d = await send('/v1/exchange/needs/' + enc(needId) + '/bids', 'POST', compact({
86
+ ext: s.ext, action: s.action,
87
+ offering_id: pick(s.offeringId, s.offering_id),
88
+ plan_id: pick(s.planId, s.plan_id),
89
+ note: s.note,
90
+ }), 'Failed to place the bid');
91
+ return d.bid;
92
+ }
93
+
94
+ /**
95
+ * The REQUESTER accepts a bid → the entitlement is minted (consumer = requester, provider = bidder)
96
+ * at the provider's authoritative price, and the need is marked matched.
97
+ * @param {string} needId
98
+ * @param {string} bidId
99
+ * @param {{ capUnits?: number }} [opts] Defaults to the need's own budget cap.
100
+ * @returns {Promise<any>}
101
+ */
102
+ export function acceptBid(needId, bidId, opts) {
103
+ const o = /** @type {Record<string, any>} */ (opts || {});
104
+ return send('/v1/exchange/needs/' + enc(needId) + '/bids/' + enc(bidId) + '/accept', 'POST',
105
+ compact({ cap_units: pick(o.capUnits, o.cap_units) }), 'Failed to accept the bid');
106
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @file exchange/earnings.js
3
+ * @description What the market OWES the caller. A money-priced metered call settles through the
4
+ * accrual rail: no per-call payment-processor charge and no custodial escrow — each call books the
5
+ * seller's net (price minus the platform rake) as a `pending` payable. This reads that book.
6
+ *
7
+ * What it deliberately is NOT: a payout, an invoice, or a way to mark something settled. The
8
+ * figure is made READABLE here; moving money is a later phase, and a browser library that implied
9
+ * otherwise would be making a promise about money that nothing behind it keeps.
10
+ *
11
+ * SECURITY: no payment credentials pass through here in either direction. A seller's PSP
12
+ * configuration is server-side and never readable; this call returns amounts and buyers, nothing
13
+ * that could be used to charge anyone.
14
+ * @structure earnings(opts)
15
+ * @usage const e = await AIMEAT.exchange.earnings(); // e.currencies.EUR.pending
16
+ * @version-history
17
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
18
+ */
19
+ import { authed, qs } from './client.js';
20
+
21
+ /**
22
+ * The caller's own accrued earnings, per currency, with the per-entry breakdown behind the figure.
23
+ *
24
+ * Returns `{ seller, currencies: { EUR: { pending, settled, total, entries } }, entries: [{
25
+ * tracking_code, amount, currency, method, status, at, reference, buyer }], count, note }`.
26
+ * Amounts are NET of the platform rake, in the currency's integer micro-units — format them with
27
+ * {@link module:exchange/format.fmtUnit}, never by dividing by hand.
28
+ *
29
+ * `pending` means booked as owed and not yet paid out. Owner-scoped by the server on the money
30
+ * identity, so an owner's agent or a granted app reads the OWNER's earnings and never another
31
+ * seller's; a non-owner principal needs the `wallet:read` scope.
32
+ * @param {{ status?: 'pending'|'settled', currency?: string, limit?: number }} [opts]
33
+ * @returns {Promise<any>}
34
+ */
35
+ export function earnings(opts) {
36
+ const o = opts || {};
37
+ return authed('/v1/exchange/earnings' + qs({ status: o.status, currency: o.currency, limit: o.limit }),
38
+ undefined, 'Failed to read your earnings');
39
+ }