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
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @file exchange/format.js
3
+ * @description Unit formatting for EXCHANGE figures. AIMEAT carries two units that must never be
4
+ * added together or shown in each other's shape: money is an integer count of 6-decimal
5
+ * micro-units in a named currency, morsels are plain integers and a throttle rather than a
6
+ * currency. A figure that mixes them is not a rounding bug, it is a wrong number.
7
+ *
8
+ * Money formatting itself belongs to aimeat-commerce and is NOT restated here — this delegates to
9
+ * `AIMEAT.commerce.fmtMoney`, so the two libraries can never render "1.50 EUR" two different ways.
10
+ * That is also why aimeat-commerce is a hard dependency of this library rather than a suggestion.
11
+ * @structure commerce() · fmtUnit(amount, unit, currency) · fmtMorsels(amount)
12
+ * @usage AIMEAT.exchange.fmtUnit(1500000, 'money', 'EUR') // "1.50 EUR"
13
+ * AIMEAT.exchange.fmtUnit(10, 'morsels') // "10 morsels"
14
+ * @version-history
15
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
16
+ */
17
+
18
+ /** The aimeat-commerce surface, or null when it was not included. */
19
+ function commerce() {
20
+ return (window.AIMEAT && window.AIMEAT.commerce) || null;
21
+ }
22
+
23
+ /** Morsels are plain integers — never a symbol, never a decimal, never an emoji. */
24
+ export function fmtMorsels(amount) {
25
+ const n = Math.round(Number(amount) || 0);
26
+ return n + (Math.abs(n) === 1 ? ' morsel' : ' morsels');
27
+ }
28
+
29
+ /**
30
+ * Format one EXCHANGE figure in the unit it is actually denominated in.
31
+ *
32
+ * `unit: 'money'` (or any currency other than `morsel`) formats the integer micro-units through
33
+ * `AIMEAT.commerce.fmtMoney`; anything else formats plain morsels. The two are never combined into
34
+ * one figure — a capability priced in both is two prices, and an app should show them as two.
35
+ *
36
+ * @param {number} amount Micro-units for money, whole morsels otherwise.
37
+ * @param {string} [unit] `'money'` | `'morsels'` — or omit and pass a currency.
38
+ * @param {string} [currency] `'EUR'` / `'USD'` when the unit is money.
39
+ * @returns {string}
40
+ * @throws {Error} When the unit is money and aimeat-commerce is not loaded — the alternative is
41
+ * silently rendering micro-units as if they were euros, which is wrong by a factor of a million.
42
+ */
43
+ export function fmtUnit(amount, unit, currency) {
44
+ const isMoney = unit === 'money' || (!!currency && currency !== 'morsel' && currency !== 'MORSEL');
45
+ if (!isMoney) return fmtMorsels(amount);
46
+ const c = commerce();
47
+ if (!c) {
48
+ throw new Error('AIMEAT.commerce is required to format money. Include aimeat-commerce.js before aimeat-exchange.js');
49
+ }
50
+ return c.fmtMoney(amount, currency);
51
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @file exchange/index.js
3
+ * @description The aimeat-exchange library (NOSTE prompt 02, gap G19). Exposes AIMEAT.exchange — the
4
+ * EXCHANGE marketplace from a BROWSER: browse and search listings, publish and manage your own,
5
+ * read who is using them and what they have consumed, accept and switch off contracts, see what
6
+ * you have spent and what you are owed, and work the demand side (needs and bids).
7
+ *
8
+ * Until this existed the whole market was reachable only over REST-by-hand or by having an agent
9
+ * drive MCP, which fits agent flows and fits nothing a human does in a page. Every selling app
10
+ * needs this, which is why it is node core rather than an app-side helper.
11
+ *
12
+ * SCOPE BOUNDARY. aimeat-commerce owns BUYING and money FORMATTING — checkout sessions, the 402
13
+ * `accepts` surface, app-tool manifests, `fmtMoney`/`fmtAmount`/`MONEY_UNIT`. None of that is
14
+ * restated here: this library depends on it for money rendering and defers to it for checkout,
15
+ * and adds the market side — supply, listings, contracts, lineage, earnings.
16
+ *
17
+ * SECURITY. It carries no secrets and asks for none. Seller payment credentials are server-side
18
+ * and never readable. Authorisation is the server's job throughout: this sends the aimeat-auth
19
+ * session and renders what comes back — it never decides who may see what.
20
+ * @structure imports the group modules (browse · sell · contracts · earnings · demand · format ·
21
+ * odps-completeness), composes the AIMEAT.exchange surface, attaches it via _core/namespace.
22
+ * @usage
23
+ * <script src="/v1/libs/aimeat-auth.js"></script>
24
+ * <script src="/v1/libs/aimeat-commerce.js"></script>
25
+ * <script src="/v1/libs/aimeat-exchange.js"></script>
26
+ * const { offerings } = await AIMEAT.exchange.list({ q: 'company' });
27
+ * const contract = await AIMEAT.exchange.accept(offerings[0].offeringId, { capUnits: 500 });
28
+ * @version-history
29
+ * v1.0.0 — 2026-07-28 — Initial: the EXCHANGE browser library (NOSTE prompt 02 / requirements R-K3).
30
+ */
31
+ import { attach } from '../_core/namespace.js';
32
+ import { info, list, search, get, odps, odpsYaml } from './browse.js';
33
+ import {
34
+ publish, update, delist, stats, consumers, reconcile, providerHistory,
35
+ grants, grant, revokeGrant,
36
+ } from './sell.js';
37
+ import {
38
+ contracts, accept, off, history, spend, coordinateOf,
39
+ proposals, propose, acceptProposal, declineProposal, withdrawProposal,
40
+ startWork, deliverWork, work,
41
+ } from './contracts.js';
42
+ import { earnings } from './earnings.js';
43
+ import { needs, postNeed, closeNeed, bids, bid, acceptBid } from './demand.js';
44
+ import { fmtUnit, fmtMorsels } from './format.js';
45
+ import { odpsCompleteness, ODPS_AUTHORED_FIELDS } from './odps-completeness.js';
46
+
47
+ const exchange = {
48
+ // ── Browsing (public where the route is public) ──
49
+ info, list, search, get, odps, odpsYaml,
50
+
51
+ // ── Selling ──
52
+ publish, update, delist, stats, consumers, reconcile, providerHistory,
53
+ grants, grant, revokeGrant,
54
+
55
+ // ── Buying + contracts ──
56
+ contracts, accept, off, history, spend, coordinateOf,
57
+ proposals, propose, acceptProposal, declineProposal, withdrawProposal,
58
+ startWork, deliverWork, work,
59
+
60
+ // ── Earnings (read-only: the accrual, not a payout) ──
61
+ earnings,
62
+
63
+ // ── Demand ──
64
+ needs, postNeed, closeNeed, bids, bid, acceptBid,
65
+
66
+ // ── Helpers ──
67
+ fmtUnit, fmtMorsels, odpsCompleteness, ODPS_AUTHORED_FIELDS,
68
+ };
69
+
70
+ attach('exchange', exchange);
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @file exchange/odps-completeness.js
3
+ * @description The ODPS fill-rate meter: given an offering, which Open Data Product Specification
4
+ * v4.1 fields it fills and which are still blank, so an app can show a completeness bar whose
5
+ * every gap is something the seller can actually go and fix.
6
+ *
7
+ * WHAT IT MEASURES, and why that is the honest question. `tools/odps-coverage.ts` walks the whole
8
+ * published v4.1 schema against a maximally-filled listing and splits every field three ways:
9
+ * what AIMEAT DERIVES (product id, timestamps, status, pricing plans, access ports, licence
10
+ * rights, observed usage — always present, never authored), what the PROVIDER authors (the `odps`
11
+ * block, the provenance attestation, the listing's own framing), and what AIMEAT has no source
12
+ * for at all. Counting the derived fields would put every listing above 60% on its first day and
13
+ * move when the projection changed rather than when the seller did; counting the unreachable ones
14
+ * would cap it below 100% forever. So this counts exactly the AUTHORED set — the same fields
15
+ * `models/odps-schemas.ts` defines as "what the node cannot derive" — and each entry carries the
16
+ * ODPS v4.1 path it lands on, so "missing" names a real place in a real document.
17
+ *
18
+ * Deliberately dependency-free (no `window`, no fetch, no imports): the same function runs in the
19
+ * browser bundle and in a Node test that checks it against the projection it describes.
20
+ * @structure ODPS_AUTHORED_FIELDS · valueAt · odpsCompleteness(offering)
21
+ * @usage const { percent, missing } = odpsCompleteness(offering);
22
+ * @version-history
23
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
24
+ * Field set mirrors OdpsExtrasSchema + ProvenanceSchema + the listing's own framing, i.e. the
25
+ * "provider must author" column of tools/odps-coverage.ts for ODPS v4.1.
26
+ */
27
+
28
+ /**
29
+ * One measurable field: where it lives on the offering, where it lands in the ODPS document, and
30
+ * which part of the descriptor it belongs to.
31
+ * @typedef {Object} OdpsField
32
+ * @property {string} key Dotted path on the OFFERING (`odps.valueProposition`, `provenance.source`, `title`).
33
+ * @property {string} path Dotted path in the projected ODPS v4.1 document.
34
+ * @property {string} group Grouping for a UI: framing · commitments · provenance · legal · support · governance.
35
+ * @property {string} label Short human label.
36
+ */
37
+
38
+ /**
39
+ * The fields a PROVIDER authors on an ODPS v4.1 descriptor. Order is presentation order: the ones a
40
+ * buyer reads first come first, so a completeness list doubles as a to-do list in priority order.
41
+ * @type {OdpsField[]}
42
+ */
43
+ export const ODPS_AUTHORED_FIELDS = [
44
+ // ── Framing: what a buyer reads to decide ──
45
+ { key: 'title', path: 'product.details.name', group: 'framing', label: 'Title' },
46
+ { key: 'description', path: 'product.details.description', group: 'framing', label: 'Description' },
47
+ { key: 'odps.valueProposition', path: 'product.details.valueProposition', group: 'framing', label: 'Value proposition' },
48
+ { key: 'odps.productType', path: 'product.details.type', group: 'framing', label: 'Product type' },
49
+ { key: 'odps.categories', path: 'product.details.categories', group: 'framing', label: 'Categories' },
50
+ { key: 'tags', path: 'product.details.tags', group: 'framing', label: 'Tags' },
51
+ { key: 'odps.useCases', path: 'product.details.useCases', group: 'framing', label: 'Use cases' },
52
+ { key: 'odps.contentSample', path: 'product.details.contentSample', group: 'framing', label: 'Output sample' },
53
+ { key: 'odps.outputFileFormats', path: 'product.details.outputFileFormats', group: 'framing', label: 'Output formats' },
54
+ { key: 'odps.standards', path: 'product.details.standards', group: 'framing', label: 'Standards followed' },
55
+ { key: 'odps.productSeries', path: 'product.details.productSeries', group: 'framing', label: 'Product series' },
56
+ { key: 'odps.logoURL', path: 'product.details.logoURL', group: 'framing', label: 'Logo' },
57
+ { key: 'odps.brandSlogan', path: 'product.details.brandSlogan', group: 'framing', label: 'Slogan' },
58
+ { key: 'odps.recommendedDataProducts', path: 'product.details.recommendedDataProducts', group: 'framing', label: 'Related products' },
59
+
60
+ // ── Commitments: promises no observation can substitute for ──
61
+ { key: 'odps.sla', path: 'product.SLA.declarative', group: 'commitments', label: 'Service-level commitments' },
62
+ { key: 'odps.dataQuality', path: 'product.dataQuality.declarative', group: 'commitments', label: 'Data-quality commitments' },
63
+
64
+ // ── Provenance: where the material came from, and on what basis ──
65
+ { key: 'provenance.source', path: 'product.license.governance.ownership', group: 'provenance', label: 'Source' },
66
+ { key: 'provenance.legalBasis', path: 'product.license.governance.applicableLaws', group: 'provenance', label: 'Legal basis' },
67
+ { key: 'provenance.consentStatus', path: 'product.license.governance.audit', group: 'provenance', label: 'Consent status' },
68
+ { key: 'provenance.retention', path: 'product.license.governance.audit', group: 'provenance', label: 'Retention' },
69
+ { key: 'provenance.transformations', path: 'product.details.versionNotes', group: 'provenance', label: 'Transformations applied' },
70
+ { key: 'provenance.snapshotHash', path: 'product.dataAccess[].checksum', group: 'provenance', label: 'Snapshot hash' },
71
+ { key: 'provenance.lineage', path: 'product.license.governance.ownership', group: 'provenance', label: 'Upstream lineage' },
72
+
73
+ // ── Usage terms: the three flags every AIMEAT listing must state to be listed at all ──
74
+ { key: 'usageTerms', path: 'product.license.scope.rights', group: 'legal', label: 'Usage terms' },
75
+
76
+ // ── Legal identity + jurisdiction: what a validator reports as missing on an otherwise full listing ──
77
+ { key: 'odps.dataHolder.legalName', path: 'product.dataHolder.legalName', group: 'legal', label: 'Legal name' },
78
+ { key: 'odps.dataHolder.businessID', path: 'product.dataHolder.businessID', group: 'legal', label: 'Business ID' },
79
+ { key: 'odps.dataHolder.URL', path: 'product.dataHolder.URL', group: 'legal', label: 'Company website' },
80
+ { key: 'odps.dataHolder.addressCountry', path: 'product.dataHolder.addressCountry', group: 'legal', label: 'Country' },
81
+ { key: 'odps.dataHolder.addressLocality', path: 'product.dataHolder.addressLocality', group: 'legal', label: 'City' },
82
+ { key: 'odps.license.applicableLaws', path: 'product.license.governance.applicableLaws', group: 'legal', label: 'Applicable law' },
83
+ { key: 'odps.license.geographicalArea', path: 'product.license.scope.geographicalArea', group: 'legal', label: 'Geographical area' },
84
+ { key: 'odps.license.exclusive', path: 'product.license.scope.exclusive', group: 'legal', label: 'Exclusivity stated' },
85
+ { key: 'odps.license.terminationConditions', path: 'product.license.termination.terminationConditions', group: 'legal', label: 'Termination conditions' },
86
+
87
+ // ── Support + versioning: what a buyer needs after they have bought ──
88
+ { key: 'odps.documentationURL', path: 'product.SLA.declarative[].support.documentationURL', group: 'support', label: 'Documentation' },
89
+ { key: 'odps.supportEmail', path: 'product.SLA.declarative[].support.email', group: 'support', label: 'Support email' },
90
+ { key: 'odps.supportHours', path: 'product.SLA.declarative[].support.emailServiceHours', group: 'support', label: 'Support hours' },
91
+ { key: 'odps.issues', path: 'product.details.issues', group: 'support', label: 'Known issues' },
92
+ { key: 'odps.productVersion', path: 'product.details.productVersion', group: 'support', label: 'Product version' },
93
+
94
+ // ── Governance + tax: how strictly it is run, and what the price includes ──
95
+ { key: 'odps.language', path: 'product.details', group: 'governance', label: 'Content language' },
96
+ { key: 'odps.governanceProfile', path: 'product.details.governanceProfile', group: 'governance', label: 'Governance profile' },
97
+ { key: 'odps.portfolioPriority', path: 'product.details.portfolioPriority', group: 'governance', label: 'Portfolio priority' },
98
+ { key: 'odps.valueAddedTaxIncluded', path: 'product.pricingPlans.declarative[].valueAddedTaxIncluded', group: 'governance', label: 'VAT included' },
99
+ { key: 'odps.valueAddedTaxPercentage', path: 'product.pricingPlans.declarative[].valueAddedTaxPercentage', group: 'governance', label: 'VAT percentage' },
100
+ ];
101
+
102
+ /**
103
+ * Read a dotted path off an object without throwing on a missing branch.
104
+ * @param {any} obj
105
+ * @param {string} path
106
+ * @returns {any}
107
+ */
108
+ export function valueAt(obj, path) {
109
+ let node = obj;
110
+ for (const part of path.split('.')) {
111
+ if (node === null || node === undefined || typeof node !== 'object') return undefined;
112
+ node = node[part];
113
+ }
114
+ return node;
115
+ }
116
+
117
+ /**
118
+ * True when a value counts as STATED. `false` and `0` count — a provider who declares "not
119
+ * exclusive" or "0% VAT" has answered the question, and treating their answer as absence would tell
120
+ * them to go and fill in a field they already filled.
121
+ * @param {any} v
122
+ * @returns {boolean}
123
+ */
124
+ function isFilled(v) {
125
+ if (v === undefined || v === null) return false;
126
+ if (typeof v === 'string') return v.trim().length > 0;
127
+ if (Array.isArray(v)) return v.length > 0;
128
+ if (typeof v === 'object') return Object.keys(v).length > 0;
129
+ return true; // numbers (including 0) and booleans (including false)
130
+ }
131
+
132
+ /**
133
+ * The ODPS fill rate for one offering, plus exactly what is missing.
134
+ *
135
+ * Accepts the offering record itself, or the `{ offering, … }` detail envelope `get(id)` returns —
136
+ * an app usually has the latter in hand and should not have to remember which.
137
+ *
138
+ * @param {any} offering
139
+ * @returns {{ percent: number, filled: number, total: number,
140
+ * missing: Array<{ key: string, path: string, group: string, label: string }>,
141
+ * present: Array<{ key: string, path: string, group: string, label: string }>,
142
+ * byGroup: Record<string, { filled: number, total: number, percent: number }>,
143
+ * odpsVersion: string }}
144
+ */
145
+ export function odpsCompleteness(offering) {
146
+ const o = (offering && offering.offering) ? offering.offering : (offering || {});
147
+ const missing = [];
148
+ const present = [];
149
+ const byGroup = /** @type {Record<string, { filled: number, total: number, percent: number }>} */ ({});
150
+
151
+ for (const field of ODPS_AUTHORED_FIELDS) {
152
+ const g = byGroup[field.group] || (byGroup[field.group] = { filled: 0, total: 0, percent: 0 });
153
+ g.total += 1;
154
+ if (isFilled(valueAt(o, field.key))) {
155
+ g.filled += 1;
156
+ present.push(field);
157
+ } else {
158
+ missing.push(field);
159
+ }
160
+ }
161
+ for (const k of Object.keys(byGroup)) {
162
+ byGroup[k].percent = Math.round((byGroup[k].filled / byGroup[k].total) * 100);
163
+ }
164
+
165
+ const total = ODPS_AUTHORED_FIELDS.length;
166
+ return {
167
+ percent: Math.round((present.length / total) * 100),
168
+ filled: present.length,
169
+ total,
170
+ missing,
171
+ present,
172
+ byGroup,
173
+ // The version the descriptor follows — stamped by the node onto provenance when the listing is
174
+ // written, so a listing authored before a version bump still says which spec it answers to.
175
+ odpsVersion: (o.provenance && o.provenance.odpsVersion) || '4.1',
176
+ };
177
+ }
@@ -0,0 +1,253 @@
1
+ /**
2
+ * @file exchange/sell.js
3
+ * @description The SELL half of AIMEAT.exchange — putting a capability on the market and watching
4
+ * what it does. Three kinds of supply share one publish call: a raw extension action, an app-tool
5
+ * a provider app sells cross-app, and a task type one of the owner's agents performs. Pricing is
6
+ * never sent from here in a way the server would trust — the node reads it authoritatively from
7
+ * the source — so `publish` carries the framing (title, terms, provenance, ODPS block) and the
8
+ * coordinate, and the price follows from what the source declares.
9
+ *
10
+ * `stats` and `consumers` are the two halves of "is this being used, and by whom". `consumers` is
11
+ * provider-only and carries the breakdown underneath each row: the human who pays, and beneath
12
+ * them their agents, apps and ecosystem apps — which is how an app answers "is my data being read
13
+ * from an application, or by an agent directly?".
14
+ * @structure publish(spec) · update(id, patch) · delist(id, opts) · stats(id) · consumers(id) ·
15
+ * reconcile(opts) · providerHistory() · grants() · grant(spec) · revokeGrant(spec) · normalizeSpec
16
+ * @usage await AIMEAT.exchange.publish({ ext: 'prh-api', action: 'validate', title: '…', usageTerms: {…} });
17
+ * @version-history
18
+ * v1.0.0 — 2026-07-28 — Initial (NOSTE prompt 02 — the EXCHANGE browser library, gap G19).
19
+ */
20
+ import { authed, pub, send, qs, exchangeError } from './client.js';
21
+ import { get as getOffering } from './browse.js';
22
+
23
+ const enc = encodeURIComponent;
24
+
25
+ /** Pick the first defined value — lets every field be written camelCase or snake_case. */
26
+ function pick(...vals) {
27
+ for (const v of vals) if (v !== undefined && v !== null) return v;
28
+ return undefined;
29
+ }
30
+
31
+ /** Drop undefined keys so an unset field is absent rather than explicitly null on the wire. */
32
+ function compact(obj) {
33
+ const out = {};
34
+ for (const k of Object.keys(obj)) if (obj[k] !== undefined) out[k] = obj[k];
35
+ return out;
36
+ }
37
+
38
+ /**
39
+ * Normalise a listing spec into the body POST /v1/exchange/offerings expects. Accepts camelCase
40
+ * (what a JS app writes) or the wire's snake_case, so neither habit is punished.
41
+ * @param {Record<string, any>} spec
42
+ * @returns {Record<string, any>}
43
+ */
44
+ export function normalizeSpec(spec) {
45
+ const s = /** @type {Record<string, any>} */ (spec || {});
46
+ return compact({
47
+ kind: s.kind,
48
+ // ext-action: the extension + action you own.
49
+ ext: s.ext,
50
+ action: s.action,
51
+ // app-tool: one tool of one of your apps (the node pins its interface version on listing).
52
+ app_id: pick(s.appId, s.app_id),
53
+ tool: s.tool,
54
+ // agent-work: a task type one of your agents performs, settled per delivered task.
55
+ agent_name: pick(s.agentName, s.agent_name),
56
+ task_type: pick(s.taskType, s.task_type),
57
+ price_morsels: pick(s.priceMorsels, s.price_morsels),
58
+ price_money: pick(s.priceMoney, s.price_money),
59
+ plans: s.plans,
60
+ input_schema: pick(s.inputSchema, s.input_schema),
61
+ output_schema: pick(s.outputSchema, s.output_schema),
62
+ // Shared framing.
63
+ title: s.title,
64
+ description: s.description,
65
+ tags: s.tags,
66
+ usage_terms: pick(s.usageTerms, s.usage_terms),
67
+ provenance: s.provenance,
68
+ odps: s.odps,
69
+ });
70
+ }
71
+
72
+ /**
73
+ * List a supply OFFERING. The node enforces a legibility gate before anything reaches the market:
74
+ * a published input AND output schema (`SCHEMA_REQUIRED`) and stated usage terms
75
+ * (`USAGE_TERMS_REQUIRED`), because a listing nobody can integrate or govern is not supply. The
76
+ * price is read from the source, so an unpriced capability is refused with `NOT_PRICED` rather than
77
+ * listed for free.
78
+ * @param {Record<string, any>} spec
79
+ * ext-action: `{ ext, action, title?, description?, tags?, usageTerms, provenance?, odps? }`
80
+ * app-tool: `{ kind: 'app-tool', appId, tool, … }`
81
+ * agent-work: `{ kind: 'agent-work', agentName, taskType, priceMorsels|priceMoney, inputSchema, outputSchema, … }`
82
+ * @returns {Promise<any>} The created offering.
83
+ */
84
+ export async function publish(spec) {
85
+ const d = await send('/v1/exchange/offerings', 'POST', normalizeSpec(spec), 'Failed to list the offering');
86
+ return d.offering;
87
+ }
88
+
89
+ /**
90
+ * Change a listing's framing. DERIVED — the node has no PATCH route for an offering, deliberately:
91
+ * a listing is a PROJECTION of its source, and the source is where price and coordinate live. So
92
+ * this republishes the same coordinate with `patch` merged over the current framing, then delists
93
+ * the superseded record. Consequences, stated because they are real:
94
+ * - the offering ID CHANGES. Existing contracts are unaffected (they key on the capability
95
+ * coordinate, not the listing id), but a link you published to the old id will 404.
96
+ * - price, plans and the metered coordinate are NOT patchable here. They come from the source —
97
+ * change the extension action, the tool manifest or the agent offer, then call {@link reconcile}.
98
+ * - a PROJECTED listing (`auto`) is refused with `SOURCE_MANAGED` rather than duplicated, because
99
+ * the next reconcile would overwrite whatever this wrote. The message names the source to edit.
100
+ * @param {string} id The offering to replace.
101
+ * @param {Record<string, any>} patch Framing fields (title, description, tags, usageTerms, provenance, odps).
102
+ * @returns {Promise<any>} The new offering.
103
+ */
104
+ export async function update(id, patch) {
105
+ const detail = await getOffering(id);
106
+ const o = detail.offering;
107
+ if (o.auto) {
108
+ throw exchangeError({ error: {
109
+ code: 'SOURCE_MANAGED',
110
+ message: 'This listing is projected from its source (' + o.ext + '/' + o.action
111
+ + '). Edit the source — the app-tool manifest, the extension action or the agent offer — then call'
112
+ + ' AIMEAT.exchange.reconcile(). Editing the listing here would be undone by the next reconcile.',
113
+ } }, 'This listing is managed by its source');
114
+ }
115
+ const surface = o.surface || {};
116
+ const base = compact({
117
+ kind: o.kind,
118
+ ext: o.kind === 'ext-action' ? o.ext : undefined,
119
+ action: o.kind === 'ext-action' ? o.action : undefined,
120
+ appId: surface.kind === 'app-tool' ? surface.appId : undefined,
121
+ tool: surface.kind === 'app-tool' ? surface.tool : undefined,
122
+ agentName: surface.kind === 'agent-work' ? surface.agentName : undefined,
123
+ taskType: surface.kind === 'agent-work' ? surface.taskType : undefined,
124
+ priceMorsels: o.kind === 'agent-work' && o.unit === 'morsels' ? o.basePrice : undefined,
125
+ priceMoney: o.kind === 'agent-work' && o.unit === 'money' ? { amount: o.basePrice, currency: o.currency } : undefined,
126
+ inputSchema: o.taskSpec ? o.taskSpec.inputSchema : undefined,
127
+ outputSchema: o.taskSpec ? o.taskSpec.outputSchema : undefined,
128
+ title: o.title,
129
+ description: o.description,
130
+ tags: o.tags,
131
+ usageTerms: o.usageTerms,
132
+ provenance: o.provenance,
133
+ odps: o.odps,
134
+ });
135
+ // Publish the replacement FIRST: if it is refused, the seller still has the listing they had.
136
+ const next = await publish({ ...base, ...(patch || {}) });
137
+ await delist(id).catch(() => { /* the replacement is live; a stale twin is better than no listing */ });
138
+ return next;
139
+ }
140
+
141
+ /**
142
+ * Delist an offering you own. A PROJECTED listing answers `SOURCE_MANAGED` (409) instead, naming
143
+ * the source whose `exchange` flag actually controls it — pass `{ force: true }` to delist it until
144
+ * the next reconcile brings it back.
145
+ * @param {string} id
146
+ * @param {{ force?: boolean }} [opts]
147
+ * @returns {Promise<any>}
148
+ */
149
+ export function delist(id, opts) {
150
+ const query = qs({ force: opts && opts.force ? '1' : null });
151
+ return authed('/v1/exchange/offerings/' + enc(id) + query, { method: 'DELETE' }, 'Failed to delist the offering');
152
+ }
153
+
154
+ /**
155
+ * One offering's usage: `{ activeContracts, totalContracts, totalCalls, totalSettledUnits,
156
+ * consumers, listedAt, lastUsedAt, timing: { count, p50Ms, p95Ms, maxMs } | null }`. Derived from
157
+ * the contracts against it, so it is a real record of demand rather than a counter anyone can set.
158
+ * Public — this is reputation. `timing` is null until the capability has actually served calls.
159
+ * @param {string} id
160
+ * @returns {Promise<any>}
161
+ */
162
+ export async function stats(id) {
163
+ const d = await pub('/v1/exchange/offerings/' + enc(id), 'No such offering');
164
+ return d.stats;
165
+ }
166
+
167
+ /**
168
+ * PROVIDER-ONLY lineage: one row per contract against your offering — who holds it, what they have
169
+ * consumed, what it settled, the pacing morsels it burned, whether you are CARRYING them (a grant)
170
+ * rather than billing them, and when they last called.
171
+ *
172
+ * Each row carries `callers`: the breakdown of who under that consumer actually called. The row is
173
+ * the human who pays; underneath are their agents, apps and ecosystem apps, each with its own call
174
+ * count and spend. That is the answer to "is this being used from an application, or by an agent
175
+ * directly?" — and it is empty (not wrong) on contracts that predate the breakdown: the totals are
176
+ * still right, only unattributed.
177
+ * @param {string} id
178
+ * @returns {Promise<{ offeringId: string, consumers: any[], count: number }>}
179
+ */
180
+ export function consumers(id) {
181
+ return authed('/v1/exchange/offerings/' + enc(id) + '/consumers', undefined, 'No such offering of yours');
182
+ }
183
+
184
+ /**
185
+ * Re-project YOUR listings from their sources. Normally automatic — writing a tool manifest, an
186
+ * extension or an agent offer projects it — this is the explicit handle.
187
+ * @param {{ dryRun?: boolean, migrate?: boolean, appId?: string, ext?: string, agent?: string }} [opts]
188
+ * `dryRun` reports what would change without changing it; `migrate` adopts hand-authored listings
189
+ * into the projection model, keeping their offering ids so existing contracts keep resolving.
190
+ * @returns {Promise<any>} The reconcile report (`changes` with created/updated/adopted/delisted/skipped).
191
+ */
192
+ export function reconcile(opts) {
193
+ const o = opts || {};
194
+ return send('/v1/exchange/reconcile', 'POST', compact({
195
+ dry_run: o.dryRun, migrate: o.migrate, app_id: o.appId, ext: o.ext, agent: o.agent,
196
+ }), 'Failed to reconcile your listings');
197
+ }
198
+
199
+ /**
200
+ * Your PAST (archived / superseded) contracts as a PROVIDER — what a renegotiation replaced, with
201
+ * the old terms and the final spend.
202
+ * @returns {Promise<{ history: any[], count: number }>}
203
+ */
204
+ export function providerHistory() {
205
+ return authed('/v1/exchange/provider/history', undefined, 'Failed to read your provider history');
206
+ }
207
+
208
+ /**
209
+ * Everyone you are CARRYING: grants you have issued (free access to a capability you sell, at your
210
+ * cost) plus `carried` — what the whole guest list has cost you, per rail.
211
+ * @param {{ appId?: string }} [opts]
212
+ * @returns {Promise<{ grants: any[], count: number, carried: Record<string, number> }>}
213
+ */
214
+ export function grants(opts) {
215
+ return authed('/v1/exchange/grants' + qs({ app_id: opts && opts.appId }), undefined, 'Failed to read your grants');
216
+ }
217
+
218
+ /**
219
+ * Issue a grant — you carry this consumer instead of billing them. Needs the `exchange:grant` scope
220
+ * when an app asks on the owner's behalf, because it gives away the owner's revenue.
221
+ * @param {{ consumer: string, offeringId: string, capCarriedUnits?: number, note?: string, appId?: string,
222
+ * reason?: { appId: string, role: string } }} spec
223
+ * @returns {Promise<any>} The issued grant.
224
+ */
225
+ export async function grant(spec) {
226
+ const s = /** @type {Record<string, any>} */ (spec || {});
227
+ const d = await send('/v1/exchange/grants', 'POST', compact({
228
+ consumer: s.consumer,
229
+ offering_id: pick(s.offeringId, s.offering_id),
230
+ cap_carried_units: pick(s.capCarriedUnits, s.cap_carried_units),
231
+ note: s.note,
232
+ app_id: pick(s.appId, s.app_id),
233
+ reason: s.reason ? { app_id: pick(s.reason.appId, s.reason.app_id), role: s.reason.role } : undefined,
234
+ }), 'Failed to issue the grant');
235
+ return d.grant;
236
+ }
237
+
238
+ /**
239
+ * Withdraw grants: `{ consumer, offeringId }` for one, or `{ appId, role?, consumer? }` for every
240
+ * grant an app issued under an approval it is taking back. Immediate — the next call falls back to
241
+ * whatever that consumer bought for themselves.
242
+ * @param {{ consumer?: string, offeringId?: string, appId?: string, role?: string }} spec
243
+ * @returns {Promise<{ revoked: number, grants: any[] }>}
244
+ */
245
+ export function revokeGrant(spec) {
246
+ const s = /** @type {Record<string, any>} */ (spec || {});
247
+ return send('/v1/exchange/grants/revoke', 'POST', compact({
248
+ consumer: s.consumer,
249
+ offering_id: pick(s.offeringId, s.offering_id),
250
+ app_id: pick(s.appId, s.app_id),
251
+ role: s.role,
252
+ }), 'Failed to withdraw the grant');
253
+ }