apexrest 0.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +18 -0
  3. package/README.md +201 -0
  4. package/README.uk.md +201 -0
  5. package/dist/codex-compat/.agents/plugins/marketplace.json +23 -0
  6. package/dist/codex-compat/plugins/apexrest-apex/.codex-plugin/plugin.json +32 -0
  7. package/dist/codex-compat/plugins/apexrest-apex/.mcp.json +11 -0
  8. package/dist/codex-compat/plugins/apexrest-apex/LICENSE +202 -0
  9. package/dist/codex-compat/plugins/apexrest-apex/NOTICE +18 -0
  10. package/dist/codex-compat/plugins/apexrest-apex/assets/apexrest-icon.svg +27 -0
  11. package/dist/codex-compat/plugins/apexrest-apex/assets/apexrest-logo.svg +27 -0
  12. package/dist/codex-compat/plugins/apexrest-apex/resources/ords/OrdsBridge.java +323 -0
  13. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/LICENCE.txt +118 -0
  14. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/bulbasaur.png +0 -0
  15. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/charmander.png +0 -0
  16. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/mewtwo.png +0 -0
  17. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/pikachu.png +0 -0
  18. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/sources.json +36 -0
  19. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/squirtle.png +0 -0
  20. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/index.html +68 -0
  21. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/panel.css +805 -0
  22. package/dist/codex-compat/plugins/apexrest-apex/resources/panel/panel.js +951 -0
  23. package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/auth.mjs +17 -0
  24. package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/package-lock.json +57 -0
  25. package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/package.json +9 -0
  26. package/dist/codex-compat/plugins/apexrest-apex/resources/references/ORACLE-LICENSE.txt +35 -0
  27. package/dist/codex-compat/plugins/apexrest-apex/resources/references/index.json +54432 -0
  28. package/dist/codex-compat/plugins/apexrest-apex/resources/references/oracle-snapshot.json +648 -0
  29. package/dist/codex-compat/plugins/apexrest-apex/resources/references/search.json +1 -0
  30. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/deploy-plan.schema.json +210 -0
  31. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/operations.schema.json +1721 -0
  32. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/policy.schema.json +63 -0
  33. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/project.schema.json +250 -0
  34. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/toolchain-lock.schema.json +118 -0
  35. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/vendor/mcp.schema.json +120 -0
  36. package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/vendor/plugin.schema.json +65 -0
  37. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/README.md +5 -0
  38. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/README.uk.md +5 -0
  39. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/.apex/apexlang.json +3 -0
  40. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/application.apx +51 -0
  41. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/deployments/default.json +2 -0
  42. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/page-groups.apx +4 -0
  43. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p00000-global-page.apx +4 -0
  44. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p00001-home.apx +35 -0
  45. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p09999-login.apx +254 -0
  46. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/authentications.apx +5 -0
  47. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/authorizations.apx +11 -0
  48. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/breadcrumbs.apx +18 -0
  49. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/build-options.apx +4 -0
  50. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/component-settings.apx +92 -0
  51. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/lists.apx +81 -0
  52. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/lovs.apx +20 -0
  53. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-144-rounded.png +0 -0
  54. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-192.png +0 -0
  55. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-256-rounded.png +0 -0
  56. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-32.png +0 -0
  57. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-512.png +0 -0
  58. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files.apx +25 -0
  59. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/themes/universal-theme/theme.apx +57 -0
  60. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/supporting-objects/deinstall-script.sql +0 -0
  61. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/supporting-objects/supporting-objects.apx +9 -0
  62. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/README.md +7 -0
  63. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/README.uk.md +7 -0
  64. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00010-customers.apx +164 -0
  65. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00020-dashboard.apx +54 -0
  66. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00080-customer.apx +332 -0
  67. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/migrations/0001__customers.sql +10 -0
  68. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/packages/0010__customer_api.sql +28 -0
  69. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/packages/0020__customer_validation_trigger.sql +10 -0
  70. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/tests/e2e/customer-crud.spec.mjs +25 -0
  71. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/tests/sql/test_customers.sql +49 -0
  72. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/database-control/install.sql +17 -0
  73. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/existing-app/README.md +9 -0
  74. package/dist/codex-compat/plugins/apexrest-apex/resources/templates/existing-app/README.uk.md +9 -0
  75. package/dist/codex-compat/plugins/apexrest-apex/resources/testkit/apex.mjs +58 -0
  76. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@hono__node-server__LICENSE +21 -0
  77. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@isaacs__fs-minipass__LICENSE +15 -0
  78. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@modelcontextprotocol__sdk__LICENSE +21 -0
  79. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@playwright__test__LICENSE +202 -0
  80. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@playwright__test__NOTICE +5 -0
  81. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@types__node__LICENSE +21 -0
  82. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@types__yauzl__LICENSE +21 -0
  83. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__LICENSE +55 -0
  84. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__NOTICE.txt +436 -0
  85. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__accepts__LICENSE +23 -0
  86. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ajv-formats__LICENSE +21 -0
  87. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ajv__LICENSE +22 -0
  88. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__body-parser__LICENSE +23 -0
  89. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__body-parser__node_modules__content-type__LICENSE +22 -0
  90. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__bytes__LICENSE +23 -0
  91. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__call-bind-apply-helpers__LICENSE +21 -0
  92. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__call-bound__LICENSE +21 -0
  93. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__chownr__LICENSE.md +63 -0
  94. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__content-disposition__LICENSE +22 -0
  95. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__content-type__LICENSE +22 -0
  96. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cookie-signature__LICENSE +22 -0
  97. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cookie__LICENSE +24 -0
  98. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cors__LICENSE +22 -0
  99. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cross-spawn__LICENSE +21 -0
  100. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__debug__LICENSE +20 -0
  101. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__depd__LICENSE +22 -0
  102. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__dunder-proto__LICENSE +21 -0
  103. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ee-first__LICENSE +22 -0
  104. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__encodeurl__LICENSE +22 -0
  105. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-define-property__LICENSE +21 -0
  106. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-errors__LICENSE +21 -0
  107. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-object-atoms__LICENSE +21 -0
  108. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__esbuild__LICENSE.md +21 -0
  109. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__escape-html__LICENSE +24 -0
  110. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__etag__LICENSE +22 -0
  111. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__eventsource-parser__LICENSE +21 -0
  112. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__eventsource__LICENSE +22 -0
  113. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__express-rate-limit__license +21 -0
  114. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__express__LICENSE +24 -0
  115. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fast-deep-equal__LICENSE +21 -0
  116. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fast-uri__LICENSE +30 -0
  117. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fflate__LICENSE +21 -0
  118. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__finalhandler__LICENSE +22 -0
  119. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__forwarded__LICENSE +22 -0
  120. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fresh__LICENSE +23 -0
  121. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__function-bind__LICENSE +20 -0
  122. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__get-intrinsic__LICENSE +21 -0
  123. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__get-proto__LICENSE +21 -0
  124. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__gopd__LICENSE +21 -0
  125. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__has-symbols__LICENSE +21 -0
  126. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__hasown__LICENSE +21 -0
  127. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__hono__LICENSE +21 -0
  128. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__http-errors__LICENSE +23 -0
  129. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__iconv-lite__LICENSE +21 -0
  130. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__inherits__LICENSE +16 -0
  131. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ip-address__LICENSE +19 -0
  132. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ipaddr.js__LICENSE +19 -0
  133. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__is-promise__LICENSE +19 -0
  134. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__isexe__LICENSE +15 -0
  135. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__jose__LICENSE.md +21 -0
  136. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__json-schema-traverse__LICENSE +21 -0
  137. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__json-schema-typed__LICENSE.md +57 -0
  138. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__marked__LICENSE +44 -0
  139. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__math-intrinsics__LICENSE +21 -0
  140. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__media-typer__LICENSE +22 -0
  141. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__merge-descriptors__license +11 -0
  142. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__mime-db__LICENSE +23 -0
  143. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__mime-types__LICENSE +23 -0
  144. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__minipass__LICENSE.md +55 -0
  145. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__minizlib__LICENSE +26 -0
  146. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ms__license.md +21 -0
  147. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__negotiator__LICENSE +24 -0
  148. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__negotiator__node_modules__content-type__LICENSE +22 -0
  149. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__object-assign__license +21 -0
  150. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__object-inspect__LICENSE +21 -0
  151. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__on-finished__LICENSE +23 -0
  152. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__once__LICENSE +15 -0
  153. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__parseurl__LICENSE +24 -0
  154. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__path-key__license +9 -0
  155. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__path-to-regexp__LICENSE +21 -0
  156. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__pend__LICENSE +23 -0
  157. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__pkce-challenge__LICENSE +21 -0
  158. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright-core__LICENSE +202 -0
  159. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright-core__NOTICE +5 -0
  160. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright__LICENSE +202 -0
  161. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright__NOTICE +5 -0
  162. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__prettier__LICENSE +7 -0
  163. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__proxy-addr__LICENSE +22 -0
  164. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__qs__LICENSE.md +29 -0
  165. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__range-parser__LICENSE +23 -0
  166. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__raw-body__LICENSE +22 -0
  167. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__require-from-string__license +21 -0
  168. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__router__LICENSE +23 -0
  169. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__safer-buffer__LICENSE +21 -0
  170. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__send__LICENSE +23 -0
  171. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__serve-static__LICENSE +25 -0
  172. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__setprototypeof__LICENSE +13 -0
  173. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__shebang-command__license +9 -0
  174. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__shebang-regex__license +9 -0
  175. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-list__LICENSE +21 -0
  176. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-map__LICENSE +21 -0
  177. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-weakmap__LICENSE +21 -0
  178. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel__LICENSE +21 -0
  179. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__statuses__LICENSE +23 -0
  180. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__tar__LICENSE.md +55 -0
  181. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__toidentifier__LICENSE +21 -0
  182. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__type-is__LICENSE +23 -0
  183. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__type-is__node_modules__content-type__LICENSE +22 -0
  184. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__typescript__LICENSE +55 -0
  185. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__typescript__NOTICE.txt +436 -0
  186. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__undici-types__LICENSE +21 -0
  187. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__unpipe__LICENSE +22 -0
  188. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__vary__LICENSE +22 -0
  189. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__which__LICENSE +15 -0
  190. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__wrappy__LICENSE +15 -0
  191. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__yallist__LICENSE.md +63 -0
  192. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__yauzl__LICENSE +21 -0
  193. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__zod-to-json-schema__LICENSE +15 -0
  194. package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__zod__LICENSE +21 -0
  195. package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/compatibility.json +50 -0
  196. package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/sources.lock.json +14 -0
  197. package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/toolchain.lock.json +204 -0
  198. package/dist/codex-compat/plugins/apexrest-apex/runtime/apexrest.mjs +226 -0
  199. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-2SZCZZ3J.mjs +37111 -0
  200. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-2VGE5Y5J.mjs +994 -0
  201. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-3GSS6SJH.mjs +1424 -0
  202. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-5GOWABKB.mjs +409 -0
  203. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ARMO5ZAQ.mjs +25 -0
  204. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ED2YPDPS.mjs +1123 -0
  205. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-FPOEB42H.mjs +100 -0
  206. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-GFRSRK3K.mjs +16 -0
  207. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ICWYSHJ7.mjs +19 -0
  208. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-IPU64TJI.mjs +291 -0
  209. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-JWX4UQAZ.mjs +14 -0
  210. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-K3KT6RZY.mjs +1064 -0
  211. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-QLRGI23I.mjs +1307 -0
  212. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-RF4XQO6I.mjs +13 -0
  213. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-VPCUV5QA.mjs +237 -0
  214. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-WMJTK7ZB.mjs +201 -0
  215. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-WROK6RQH.mjs +200 -0
  216. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-XDJEGHUX.mjs +1179 -0
  217. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-YK34QNHH.mjs +15 -0
  218. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-Z6Y72JVG.mjs +37 -0
  219. package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ZQFJ2BNZ.mjs +329 -0
  220. package/dist/codex-compat/plugins/apexrest-apex/runtime/mcp.mjs +15 -0
  221. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/SKILL.md +32 -0
  222. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/agents/openai.yaml +4 -0
  223. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/assets/p00020-filtered-components.apx +152 -0
  224. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/references/component-routes.md +35 -0
  225. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/references/native-dashboard.md +11 -0
  226. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-database/SKILL.md +11 -0
  227. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-database/agents/openai.yaml +4 -0
  228. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-debug/SKILL.md +11 -0
  229. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-debug/agents/openai.yaml +4 -0
  230. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-deploy/SKILL.md +19 -0
  231. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-deploy/agents/openai.yaml +4 -0
  232. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-install-dependencies/SKILL.md +38 -0
  233. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-install-dependencies/agents/openai.yaml +4 -0
  234. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/SKILL.md +27 -0
  235. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/agents/openai.yaml +4 -0
  236. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/references/cli-catalog.md +22 -0
  237. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-panel/SKILL.md +20 -0
  238. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-panel/agents/openai.yaml +4 -0
  239. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-project/SKILL.md +9 -0
  240. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-project/agents/openai.yaml +4 -0
  241. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-review/SKILL.md +9 -0
  242. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-review/agents/openai.yaml +4 -0
  243. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/SKILL.md +15 -0
  244. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/agents/openai.yaml +4 -0
  245. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/references/ords.md +3 -0
  246. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-team/SKILL.md +24 -0
  247. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-team/agents/openai.yaml +4 -0
  248. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-test/SKILL.md +27 -0
  249. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-test/agents/openai.yaml +4 -0
  250. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-work/SKILL.md +17 -0
  251. package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-work/agents/openai.yaml +7 -0
  252. package/dist/resources/ords/OrdsBridge.java +323 -0
  253. package/dist/resources/panel/assets/LICENCE.txt +118 -0
  254. package/dist/resources/panel/assets/bulbasaur.png +0 -0
  255. package/dist/resources/panel/assets/charmander.png +0 -0
  256. package/dist/resources/panel/assets/mewtwo.png +0 -0
  257. package/dist/resources/panel/assets/pikachu.png +0 -0
  258. package/dist/resources/panel/assets/sources.json +36 -0
  259. package/dist/resources/panel/assets/squirtle.png +0 -0
  260. package/dist/resources/panel/index.html +68 -0
  261. package/dist/resources/panel/panel.css +805 -0
  262. package/dist/resources/panel/panel.js +951 -0
  263. package/dist/resources/playwright/auth.mjs +17 -0
  264. package/dist/resources/playwright/package-lock.json +57 -0
  265. package/dist/resources/playwright/package.json +9 -0
  266. package/dist/resources/references/ORACLE-LICENSE.txt +35 -0
  267. package/dist/resources/references/index.json +54432 -0
  268. package/dist/resources/references/oracle-snapshot.json +648 -0
  269. package/dist/resources/references/search.json +1 -0
  270. package/dist/resources/schemas/deploy-plan.schema.json +210 -0
  271. package/dist/resources/schemas/operations.schema.json +1721 -0
  272. package/dist/resources/schemas/policy.schema.json +63 -0
  273. package/dist/resources/schemas/project.schema.json +250 -0
  274. package/dist/resources/schemas/toolchain-lock.schema.json +118 -0
  275. package/dist/resources/schemas/vendor/mcp.schema.json +120 -0
  276. package/dist/resources/schemas/vendor/plugin.schema.json +65 -0
  277. package/dist/resources/templates/blank-app/README.md +5 -0
  278. package/dist/resources/templates/blank-app/README.uk.md +5 -0
  279. package/dist/resources/templates/blank-app/application/.apex/apexlang.json +3 -0
  280. package/dist/resources/templates/blank-app/application/application.apx +51 -0
  281. package/dist/resources/templates/blank-app/application/deployments/default.json +2 -0
  282. package/dist/resources/templates/blank-app/application/page-groups.apx +4 -0
  283. package/dist/resources/templates/blank-app/application/pages/p00000-global-page.apx +4 -0
  284. package/dist/resources/templates/blank-app/application/pages/p00001-home.apx +35 -0
  285. package/dist/resources/templates/blank-app/application/pages/p09999-login.apx +254 -0
  286. package/dist/resources/templates/blank-app/application/shared-components/authentications.apx +5 -0
  287. package/dist/resources/templates/blank-app/application/shared-components/authorizations.apx +11 -0
  288. package/dist/resources/templates/blank-app/application/shared-components/breadcrumbs.apx +18 -0
  289. package/dist/resources/templates/blank-app/application/shared-components/build-options.apx +4 -0
  290. package/dist/resources/templates/blank-app/application/shared-components/component-settings.apx +92 -0
  291. package/dist/resources/templates/blank-app/application/shared-components/lists.apx +81 -0
  292. package/dist/resources/templates/blank-app/application/shared-components/lovs.apx +20 -0
  293. package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-144-rounded.png +0 -0
  294. package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-192.png +0 -0
  295. package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-256-rounded.png +0 -0
  296. package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-32.png +0 -0
  297. package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-512.png +0 -0
  298. package/dist/resources/templates/blank-app/application/shared-components/static-files.apx +25 -0
  299. package/dist/resources/templates/blank-app/application/shared-components/themes/universal-theme/theme.apx +57 -0
  300. package/dist/resources/templates/blank-app/application/supporting-objects/deinstall-script.sql +0 -0
  301. package/dist/resources/templates/blank-app/application/supporting-objects/supporting-objects.apx +9 -0
  302. package/dist/resources/templates/customer-crm/README.md +7 -0
  303. package/dist/resources/templates/customer-crm/README.uk.md +7 -0
  304. package/dist/resources/templates/customer-crm/apex-overlay/pages/p00010-customers.apx +164 -0
  305. package/dist/resources/templates/customer-crm/apex-overlay/pages/p00020-dashboard.apx +54 -0
  306. package/dist/resources/templates/customer-crm/apex-overlay/pages/p00080-customer.apx +332 -0
  307. package/dist/resources/templates/customer-crm/project/src/database/migrations/0001__customers.sql +10 -0
  308. package/dist/resources/templates/customer-crm/project/src/database/packages/0010__customer_api.sql +28 -0
  309. package/dist/resources/templates/customer-crm/project/src/database/packages/0020__customer_validation_trigger.sql +10 -0
  310. package/dist/resources/templates/customer-crm/project/tests/e2e/customer-crud.spec.mjs +25 -0
  311. package/dist/resources/templates/customer-crm/project/tests/sql/test_customers.sql +49 -0
  312. package/dist/resources/templates/database-control/install.sql +17 -0
  313. package/dist/resources/templates/existing-app/README.md +9 -0
  314. package/dist/resources/templates/existing-app/README.uk.md +9 -0
  315. package/dist/resources/testkit/apex.mjs +58 -0
  316. package/dist/resources/third-party/node_modules__@hono__node-server__LICENSE +21 -0
  317. package/dist/resources/third-party/node_modules__@isaacs__fs-minipass__LICENSE +15 -0
  318. package/dist/resources/third-party/node_modules__@modelcontextprotocol__sdk__LICENSE +21 -0
  319. package/dist/resources/third-party/node_modules__@playwright__test__LICENSE +202 -0
  320. package/dist/resources/third-party/node_modules__@playwright__test__NOTICE +5 -0
  321. package/dist/resources/third-party/node_modules__@types__node__LICENSE +21 -0
  322. package/dist/resources/third-party/node_modules__@types__yauzl__LICENSE +21 -0
  323. package/dist/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__LICENSE +55 -0
  324. package/dist/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__NOTICE.txt +436 -0
  325. package/dist/resources/third-party/node_modules__accepts__LICENSE +23 -0
  326. package/dist/resources/third-party/node_modules__ajv-formats__LICENSE +21 -0
  327. package/dist/resources/third-party/node_modules__ajv__LICENSE +22 -0
  328. package/dist/resources/third-party/node_modules__body-parser__LICENSE +23 -0
  329. package/dist/resources/third-party/node_modules__body-parser__node_modules__content-type__LICENSE +22 -0
  330. package/dist/resources/third-party/node_modules__bytes__LICENSE +23 -0
  331. package/dist/resources/third-party/node_modules__call-bind-apply-helpers__LICENSE +21 -0
  332. package/dist/resources/third-party/node_modules__call-bound__LICENSE +21 -0
  333. package/dist/resources/third-party/node_modules__chownr__LICENSE.md +63 -0
  334. package/dist/resources/third-party/node_modules__content-disposition__LICENSE +22 -0
  335. package/dist/resources/third-party/node_modules__content-type__LICENSE +22 -0
  336. package/dist/resources/third-party/node_modules__cookie-signature__LICENSE +22 -0
  337. package/dist/resources/third-party/node_modules__cookie__LICENSE +24 -0
  338. package/dist/resources/third-party/node_modules__cors__LICENSE +22 -0
  339. package/dist/resources/third-party/node_modules__cross-spawn__LICENSE +21 -0
  340. package/dist/resources/third-party/node_modules__debug__LICENSE +20 -0
  341. package/dist/resources/third-party/node_modules__depd__LICENSE +22 -0
  342. package/dist/resources/third-party/node_modules__dunder-proto__LICENSE +21 -0
  343. package/dist/resources/third-party/node_modules__ee-first__LICENSE +22 -0
  344. package/dist/resources/third-party/node_modules__encodeurl__LICENSE +22 -0
  345. package/dist/resources/third-party/node_modules__es-define-property__LICENSE +21 -0
  346. package/dist/resources/third-party/node_modules__es-errors__LICENSE +21 -0
  347. package/dist/resources/third-party/node_modules__es-object-atoms__LICENSE +21 -0
  348. package/dist/resources/third-party/node_modules__esbuild__LICENSE.md +21 -0
  349. package/dist/resources/third-party/node_modules__escape-html__LICENSE +24 -0
  350. package/dist/resources/third-party/node_modules__etag__LICENSE +22 -0
  351. package/dist/resources/third-party/node_modules__eventsource-parser__LICENSE +21 -0
  352. package/dist/resources/third-party/node_modules__eventsource__LICENSE +22 -0
  353. package/dist/resources/third-party/node_modules__express-rate-limit__license +21 -0
  354. package/dist/resources/third-party/node_modules__express__LICENSE +24 -0
  355. package/dist/resources/third-party/node_modules__fast-deep-equal__LICENSE +21 -0
  356. package/dist/resources/third-party/node_modules__fast-uri__LICENSE +30 -0
  357. package/dist/resources/third-party/node_modules__fflate__LICENSE +21 -0
  358. package/dist/resources/third-party/node_modules__finalhandler__LICENSE +22 -0
  359. package/dist/resources/third-party/node_modules__forwarded__LICENSE +22 -0
  360. package/dist/resources/third-party/node_modules__fresh__LICENSE +23 -0
  361. package/dist/resources/third-party/node_modules__function-bind__LICENSE +20 -0
  362. package/dist/resources/third-party/node_modules__get-intrinsic__LICENSE +21 -0
  363. package/dist/resources/third-party/node_modules__get-proto__LICENSE +21 -0
  364. package/dist/resources/third-party/node_modules__gopd__LICENSE +21 -0
  365. package/dist/resources/third-party/node_modules__has-symbols__LICENSE +21 -0
  366. package/dist/resources/third-party/node_modules__hasown__LICENSE +21 -0
  367. package/dist/resources/third-party/node_modules__hono__LICENSE +21 -0
  368. package/dist/resources/third-party/node_modules__http-errors__LICENSE +23 -0
  369. package/dist/resources/third-party/node_modules__iconv-lite__LICENSE +21 -0
  370. package/dist/resources/third-party/node_modules__inherits__LICENSE +16 -0
  371. package/dist/resources/third-party/node_modules__ip-address__LICENSE +19 -0
  372. package/dist/resources/third-party/node_modules__ipaddr.js__LICENSE +19 -0
  373. package/dist/resources/third-party/node_modules__is-promise__LICENSE +19 -0
  374. package/dist/resources/third-party/node_modules__isexe__LICENSE +15 -0
  375. package/dist/resources/third-party/node_modules__jose__LICENSE.md +21 -0
  376. package/dist/resources/third-party/node_modules__json-schema-traverse__LICENSE +21 -0
  377. package/dist/resources/third-party/node_modules__json-schema-typed__LICENSE.md +57 -0
  378. package/dist/resources/third-party/node_modules__marked__LICENSE +44 -0
  379. package/dist/resources/third-party/node_modules__math-intrinsics__LICENSE +21 -0
  380. package/dist/resources/third-party/node_modules__media-typer__LICENSE +22 -0
  381. package/dist/resources/third-party/node_modules__merge-descriptors__license +11 -0
  382. package/dist/resources/third-party/node_modules__mime-db__LICENSE +23 -0
  383. package/dist/resources/third-party/node_modules__mime-types__LICENSE +23 -0
  384. package/dist/resources/third-party/node_modules__minipass__LICENSE.md +55 -0
  385. package/dist/resources/third-party/node_modules__minizlib__LICENSE +26 -0
  386. package/dist/resources/third-party/node_modules__ms__license.md +21 -0
  387. package/dist/resources/third-party/node_modules__negotiator__LICENSE +24 -0
  388. package/dist/resources/third-party/node_modules__negotiator__node_modules__content-type__LICENSE +22 -0
  389. package/dist/resources/third-party/node_modules__object-assign__license +21 -0
  390. package/dist/resources/third-party/node_modules__object-inspect__LICENSE +21 -0
  391. package/dist/resources/third-party/node_modules__on-finished__LICENSE +23 -0
  392. package/dist/resources/third-party/node_modules__once__LICENSE +15 -0
  393. package/dist/resources/third-party/node_modules__parseurl__LICENSE +24 -0
  394. package/dist/resources/third-party/node_modules__path-key__license +9 -0
  395. package/dist/resources/third-party/node_modules__path-to-regexp__LICENSE +21 -0
  396. package/dist/resources/third-party/node_modules__pend__LICENSE +23 -0
  397. package/dist/resources/third-party/node_modules__pkce-challenge__LICENSE +21 -0
  398. package/dist/resources/third-party/node_modules__playwright-core__LICENSE +202 -0
  399. package/dist/resources/third-party/node_modules__playwright-core__NOTICE +5 -0
  400. package/dist/resources/third-party/node_modules__playwright__LICENSE +202 -0
  401. package/dist/resources/third-party/node_modules__playwright__NOTICE +5 -0
  402. package/dist/resources/third-party/node_modules__prettier__LICENSE +7 -0
  403. package/dist/resources/third-party/node_modules__proxy-addr__LICENSE +22 -0
  404. package/dist/resources/third-party/node_modules__qs__LICENSE.md +29 -0
  405. package/dist/resources/third-party/node_modules__range-parser__LICENSE +23 -0
  406. package/dist/resources/third-party/node_modules__raw-body__LICENSE +22 -0
  407. package/dist/resources/third-party/node_modules__require-from-string__license +21 -0
  408. package/dist/resources/third-party/node_modules__router__LICENSE +23 -0
  409. package/dist/resources/third-party/node_modules__safer-buffer__LICENSE +21 -0
  410. package/dist/resources/third-party/node_modules__send__LICENSE +23 -0
  411. package/dist/resources/third-party/node_modules__serve-static__LICENSE +25 -0
  412. package/dist/resources/third-party/node_modules__setprototypeof__LICENSE +13 -0
  413. package/dist/resources/third-party/node_modules__shebang-command__license +9 -0
  414. package/dist/resources/third-party/node_modules__shebang-regex__license +9 -0
  415. package/dist/resources/third-party/node_modules__side-channel-list__LICENSE +21 -0
  416. package/dist/resources/third-party/node_modules__side-channel-map__LICENSE +21 -0
  417. package/dist/resources/third-party/node_modules__side-channel-weakmap__LICENSE +21 -0
  418. package/dist/resources/third-party/node_modules__side-channel__LICENSE +21 -0
  419. package/dist/resources/third-party/node_modules__statuses__LICENSE +23 -0
  420. package/dist/resources/third-party/node_modules__tar__LICENSE.md +55 -0
  421. package/dist/resources/third-party/node_modules__toidentifier__LICENSE +21 -0
  422. package/dist/resources/third-party/node_modules__type-is__LICENSE +23 -0
  423. package/dist/resources/third-party/node_modules__type-is__node_modules__content-type__LICENSE +22 -0
  424. package/dist/resources/third-party/node_modules__typescript__LICENSE +55 -0
  425. package/dist/resources/third-party/node_modules__typescript__NOTICE.txt +436 -0
  426. package/dist/resources/third-party/node_modules__undici-types__LICENSE +21 -0
  427. package/dist/resources/third-party/node_modules__unpipe__LICENSE +22 -0
  428. package/dist/resources/third-party/node_modules__vary__LICENSE +22 -0
  429. package/dist/resources/third-party/node_modules__which__LICENSE +15 -0
  430. package/dist/resources/third-party/node_modules__wrappy__LICENSE +15 -0
  431. package/dist/resources/third-party/node_modules__yallist__LICENSE.md +63 -0
  432. package/dist/resources/third-party/node_modules__yauzl__LICENSE +21 -0
  433. package/dist/resources/third-party/node_modules__zod-to-json-schema__LICENSE +15 -0
  434. package/dist/resources/third-party/node_modules__zod__LICENSE +21 -0
  435. package/dist/resources/toolchains/compatibility.json +50 -0
  436. package/dist/resources/toolchains/sources.lock.json +14 -0
  437. package/dist/resources/toolchains/toolchain.lock.json +204 -0
  438. package/dist/runtime/apexrest.mjs +226 -0
  439. package/dist/runtime/chunk-2SZCZZ3J.mjs +37111 -0
  440. package/dist/runtime/chunk-2VGE5Y5J.mjs +994 -0
  441. package/dist/runtime/chunk-3GSS6SJH.mjs +1424 -0
  442. package/dist/runtime/chunk-5GOWABKB.mjs +409 -0
  443. package/dist/runtime/chunk-ARMO5ZAQ.mjs +25 -0
  444. package/dist/runtime/chunk-ED2YPDPS.mjs +1123 -0
  445. package/dist/runtime/chunk-FPOEB42H.mjs +100 -0
  446. package/dist/runtime/chunk-GFRSRK3K.mjs +16 -0
  447. package/dist/runtime/chunk-ICWYSHJ7.mjs +19 -0
  448. package/dist/runtime/chunk-IPU64TJI.mjs +291 -0
  449. package/dist/runtime/chunk-JWX4UQAZ.mjs +14 -0
  450. package/dist/runtime/chunk-K3KT6RZY.mjs +1064 -0
  451. package/dist/runtime/chunk-QLRGI23I.mjs +1307 -0
  452. package/dist/runtime/chunk-RF4XQO6I.mjs +13 -0
  453. package/dist/runtime/chunk-VPCUV5QA.mjs +237 -0
  454. package/dist/runtime/chunk-WMJTK7ZB.mjs +201 -0
  455. package/dist/runtime/chunk-WROK6RQH.mjs +200 -0
  456. package/dist/runtime/chunk-XDJEGHUX.mjs +1179 -0
  457. package/dist/runtime/chunk-YK34QNHH.mjs +15 -0
  458. package/dist/runtime/chunk-Z6Y72JVG.mjs +37 -0
  459. package/dist/runtime/chunk-ZQFJ2BNZ.mjs +329 -0
  460. package/dist/runtime/mcp.mjs +15 -0
  461. package/package.json +70 -0
@@ -0,0 +1,1064 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ dispatch,
4
+ schemas,
5
+ toolCatalog
6
+ } from "./chunk-XDJEGHUX.mjs";
7
+ import {
8
+ panelDocument
9
+ } from "./chunk-WMJTK7ZB.mjs";
10
+ import {
11
+ JobService
12
+ } from "./chunk-5GOWABKB.mjs";
13
+ import {
14
+ ArtifactService
15
+ } from "./chunk-QLRGI23I.mjs";
16
+ import {
17
+ VERSION
18
+ } from "./chunk-Z6Y72JVG.mjs";
19
+ import {
20
+ AjvJsonSchemaValidator,
21
+ CallToolRequestSchema,
22
+ CallToolResultSchema,
23
+ CreateMessageResultSchema,
24
+ CreateMessageResultWithToolsSchema,
25
+ CreateTaskResultSchema,
26
+ ElicitResultSchema,
27
+ EmptyResultSchema,
28
+ ErrorCode,
29
+ InitializeRequestSchema,
30
+ InitializedNotificationSchema,
31
+ LATEST_PROTOCOL_VERSION,
32
+ ListResourcesRequestSchema,
33
+ ListRootsResultSchema,
34
+ ListToolsRequestSchema,
35
+ LoggingLevelSchema,
36
+ McpError,
37
+ Protocol,
38
+ ReadBuffer,
39
+ ReadResourceRequestSchema,
40
+ SUPPORTED_PROTOCOL_VERSIONS,
41
+ SetLevelRequestSchema,
42
+ assertClientRequestTaskCapability,
43
+ assertToolsCallTaskCapability,
44
+ external_exports,
45
+ getLiteralValue,
46
+ getObjectShape,
47
+ loadProject,
48
+ mergeCapabilities,
49
+ parse,
50
+ safeParse,
51
+ serializeMessage
52
+ } from "./chunk-2SZCZZ3J.mjs";
53
+ import {
54
+ Fault,
55
+ failure,
56
+ hash,
57
+ sanitized,
58
+ success
59
+ } from "./chunk-IPU64TJI.mjs";
60
+
61
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
62
+ var ExperimentalServerTasks = class {
63
+ constructor(_server) {
64
+ this._server = _server;
65
+ }
66
+ /**
67
+ * Sends a request and returns an AsyncGenerator that yields response messages.
68
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
69
+ *
70
+ * This method provides streaming access to request processing, allowing you to
71
+ * observe intermediate task status updates for task-augmented requests.
72
+ *
73
+ * @param request - The request to send
74
+ * @param resultSchema - Zod schema for validating the result
75
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
76
+ * @returns AsyncGenerator that yields ResponseMessage objects
77
+ *
78
+ * @experimental
79
+ */
80
+ requestStream(request, resultSchema, options) {
81
+ return this._server.requestStream(request, resultSchema, options);
82
+ }
83
+ /**
84
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
85
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
86
+ *
87
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
88
+ * before the final result.
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * const stream = server.experimental.tasks.createMessageStream({
93
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
94
+ * maxTokens: 100
95
+ * }, {
96
+ * onprogress: (progress) => {
97
+ * // Handle streaming tokens via progress notifications
98
+ * console.log('Progress:', progress.message);
99
+ * }
100
+ * });
101
+ *
102
+ * for await (const message of stream) {
103
+ * switch (message.type) {
104
+ * case 'taskCreated':
105
+ * console.log('Task created:', message.task.taskId);
106
+ * break;
107
+ * case 'taskStatus':
108
+ * console.log('Task status:', message.task.status);
109
+ * break;
110
+ * case 'result':
111
+ * console.log('Final result:', message.result);
112
+ * break;
113
+ * case 'error':
114
+ * console.error('Error:', message.error);
115
+ * break;
116
+ * }
117
+ * }
118
+ * ```
119
+ *
120
+ * @param params - The sampling request parameters
121
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
122
+ * @returns AsyncGenerator that yields ResponseMessage objects
123
+ *
124
+ * @experimental
125
+ */
126
+ createMessageStream(params, options) {
127
+ const clientCapabilities = this._server.getClientCapabilities();
128
+ if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
129
+ throw new Error("Client does not support sampling tools capability.");
130
+ }
131
+ if (params.messages.length > 0) {
132
+ const lastMessage = params.messages[params.messages.length - 1];
133
+ const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
134
+ const hasToolResults = lastContent.some((c) => c.type === "tool_result");
135
+ const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
136
+ const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
137
+ const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
138
+ if (hasToolResults) {
139
+ if (lastContent.some((c) => c.type !== "tool_result")) {
140
+ throw new Error("The last message must contain only tool_result content if any is present");
141
+ }
142
+ if (!hasPreviousToolUse) {
143
+ throw new Error("tool_result blocks are not matching any tool_use from the previous message");
144
+ }
145
+ }
146
+ if (hasPreviousToolUse) {
147
+ const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
148
+ const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
149
+ if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
150
+ throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
151
+ }
152
+ }
153
+ }
154
+ return this.requestStream({
155
+ method: "sampling/createMessage",
156
+ params
157
+ }, CreateMessageResultSchema, options);
158
+ }
159
+ /**
160
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
161
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
162
+ *
163
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
164
+ * and 'taskStatus' messages before the final result.
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * const stream = server.experimental.tasks.elicitInputStream({
169
+ * mode: 'url',
170
+ * message: 'Please authenticate',
171
+ * elicitationId: 'auth-123',
172
+ * url: 'https://example.com/auth'
173
+ * }, {
174
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
175
+ * });
176
+ *
177
+ * for await (const message of stream) {
178
+ * switch (message.type) {
179
+ * case 'taskCreated':
180
+ * console.log('Task created:', message.task.taskId);
181
+ * break;
182
+ * case 'taskStatus':
183
+ * console.log('Task status:', message.task.status);
184
+ * break;
185
+ * case 'result':
186
+ * console.log('User action:', message.result.action);
187
+ * break;
188
+ * case 'error':
189
+ * console.error('Error:', message.error);
190
+ * break;
191
+ * }
192
+ * }
193
+ * ```
194
+ *
195
+ * @param params - The elicitation request parameters
196
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
197
+ * @returns AsyncGenerator that yields ResponseMessage objects
198
+ *
199
+ * @experimental
200
+ */
201
+ elicitInputStream(params, options) {
202
+ const clientCapabilities = this._server.getClientCapabilities();
203
+ const mode = params.mode ?? "form";
204
+ switch (mode) {
205
+ case "url": {
206
+ if (!clientCapabilities?.elicitation?.url) {
207
+ throw new Error("Client does not support url elicitation.");
208
+ }
209
+ break;
210
+ }
211
+ case "form": {
212
+ if (!clientCapabilities?.elicitation?.form) {
213
+ throw new Error("Client does not support form elicitation.");
214
+ }
215
+ break;
216
+ }
217
+ }
218
+ const normalizedParams = mode === "form" && params.mode === void 0 ? { ...params, mode: "form" } : params;
219
+ return this.requestStream({
220
+ method: "elicitation/create",
221
+ params: normalizedParams
222
+ }, ElicitResultSchema, options);
223
+ }
224
+ /**
225
+ * Gets the current status of a task.
226
+ *
227
+ * @param taskId - The task identifier
228
+ * @param options - Optional request options
229
+ * @returns The task status
230
+ *
231
+ * @experimental
232
+ */
233
+ async getTask(taskId, options) {
234
+ return this._server.getTask({ taskId }, options);
235
+ }
236
+ /**
237
+ * Retrieves the result of a completed task.
238
+ *
239
+ * @param taskId - The task identifier
240
+ * @param resultSchema - Zod schema for validating the result
241
+ * @param options - Optional request options
242
+ * @returns The task result
243
+ *
244
+ * @experimental
245
+ */
246
+ async getTaskResult(taskId, resultSchema, options) {
247
+ return this._server.getTaskResult({ taskId }, resultSchema, options);
248
+ }
249
+ /**
250
+ * Lists tasks with optional pagination.
251
+ *
252
+ * @param cursor - Optional pagination cursor
253
+ * @param options - Optional request options
254
+ * @returns List of tasks with optional next cursor
255
+ *
256
+ * @experimental
257
+ */
258
+ async listTasks(cursor, options) {
259
+ return this._server.listTasks(cursor ? { cursor } : void 0, options);
260
+ }
261
+ /**
262
+ * Cancels a running task.
263
+ *
264
+ * @param taskId - The task identifier
265
+ * @param options - Optional request options
266
+ *
267
+ * @experimental
268
+ */
269
+ async cancelTask(taskId, options) {
270
+ return this._server.cancelTask({ taskId }, options);
271
+ }
272
+ };
273
+
274
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
275
+ var Server = class extends Protocol {
276
+ /**
277
+ * Initializes this server with the given name and version information.
278
+ */
279
+ constructor(_serverInfo, options) {
280
+ super(options);
281
+ this._serverInfo = _serverInfo;
282
+ this._loggingLevels = /* @__PURE__ */ new Map();
283
+ this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));
284
+ this.isMessageIgnored = (level, sessionId) => {
285
+ const currentLevel = this._loggingLevels.get(sessionId);
286
+ return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
287
+ };
288
+ this._capabilities = options?.capabilities ?? {};
289
+ this._instructions = options?.instructions;
290
+ this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
291
+ this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request));
292
+ this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.());
293
+ if (this._capabilities.logging) {
294
+ this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
295
+ const transportSessionId = extra.sessionId || extra.requestInfo?.headers["mcp-session-id"] || void 0;
296
+ const { level } = request.params;
297
+ const parseResult = LoggingLevelSchema.safeParse(level);
298
+ if (parseResult.success) {
299
+ this._loggingLevels.set(transportSessionId, parseResult.data);
300
+ }
301
+ return {};
302
+ });
303
+ }
304
+ }
305
+ /**
306
+ * Access experimental features.
307
+ *
308
+ * WARNING: These APIs are experimental and may change without notice.
309
+ *
310
+ * @experimental
311
+ */
312
+ get experimental() {
313
+ if (!this._experimental) {
314
+ this._experimental = {
315
+ tasks: new ExperimentalServerTasks(this)
316
+ };
317
+ }
318
+ return this._experimental;
319
+ }
320
+ /**
321
+ * Registers new capabilities. This can only be called before connecting to a transport.
322
+ *
323
+ * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
324
+ */
325
+ registerCapabilities(capabilities) {
326
+ if (this.transport) {
327
+ throw new Error("Cannot register capabilities after connecting to transport");
328
+ }
329
+ this._capabilities = mergeCapabilities(this._capabilities, capabilities);
330
+ }
331
+ /**
332
+ * Override request handler registration to enforce server-side validation for tools/call.
333
+ */
334
+ setRequestHandler(requestSchema, handler) {
335
+ const shape = getObjectShape(requestSchema);
336
+ const methodSchema = shape?.method;
337
+ if (!methodSchema) {
338
+ throw new Error("Schema is missing a method literal");
339
+ }
340
+ const methodValue = getLiteralValue(methodSchema);
341
+ if (typeof methodValue !== "string") {
342
+ throw new Error("Schema method literal must be a string");
343
+ }
344
+ const method = methodValue;
345
+ if (method === "tools/call") {
346
+ const wrappedHandler = async (request, extra) => {
347
+ const validatedRequest = safeParse(CallToolRequestSchema, request);
348
+ if (!validatedRequest.success) {
349
+ const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
350
+ throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call request: ${errorMessage}`);
351
+ }
352
+ const { params } = validatedRequest.data;
353
+ const result = await Promise.resolve(handler(request, extra));
354
+ if (params.task) {
355
+ const taskValidationResult = safeParse(CreateTaskResultSchema, result);
356
+ if (!taskValidationResult.success) {
357
+ const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
358
+ throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
359
+ }
360
+ return taskValidationResult.data;
361
+ }
362
+ const validationResult = safeParse(CallToolResultSchema, result);
363
+ if (!validationResult.success) {
364
+ const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
365
+ throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call result: ${errorMessage}`);
366
+ }
367
+ return validationResult.data;
368
+ };
369
+ return super.setRequestHandler(requestSchema, wrappedHandler);
370
+ }
371
+ return super.setRequestHandler(requestSchema, handler);
372
+ }
373
+ assertCapabilityForMethod(method) {
374
+ switch (method) {
375
+ case "sampling/createMessage":
376
+ if (!this._clientCapabilities?.sampling) {
377
+ throw new Error(`Client does not support sampling (required for ${method})`);
378
+ }
379
+ break;
380
+ case "elicitation/create":
381
+ if (!this._clientCapabilities?.elicitation) {
382
+ throw new Error(`Client does not support elicitation (required for ${method})`);
383
+ }
384
+ break;
385
+ case "roots/list":
386
+ if (!this._clientCapabilities?.roots) {
387
+ throw new Error(`Client does not support listing roots (required for ${method})`);
388
+ }
389
+ break;
390
+ case "ping":
391
+ break;
392
+ }
393
+ }
394
+ assertNotificationCapability(method) {
395
+ switch (method) {
396
+ case "notifications/message":
397
+ if (!this._capabilities.logging) {
398
+ throw new Error(`Server does not support logging (required for ${method})`);
399
+ }
400
+ break;
401
+ case "notifications/resources/updated":
402
+ case "notifications/resources/list_changed":
403
+ if (!this._capabilities.resources) {
404
+ throw new Error(`Server does not support notifying about resources (required for ${method})`);
405
+ }
406
+ break;
407
+ case "notifications/tools/list_changed":
408
+ if (!this._capabilities.tools) {
409
+ throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);
410
+ }
411
+ break;
412
+ case "notifications/prompts/list_changed":
413
+ if (!this._capabilities.prompts) {
414
+ throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
415
+ }
416
+ break;
417
+ case "notifications/elicitation/complete":
418
+ if (!this._clientCapabilities?.elicitation?.url) {
419
+ throw new Error(`Client does not support URL elicitation (required for ${method})`);
420
+ }
421
+ break;
422
+ case "notifications/cancelled":
423
+ break;
424
+ case "notifications/progress":
425
+ break;
426
+ }
427
+ }
428
+ assertRequestHandlerCapability(method) {
429
+ if (!this._capabilities) {
430
+ return;
431
+ }
432
+ switch (method) {
433
+ case "completion/complete":
434
+ if (!this._capabilities.completions) {
435
+ throw new Error(`Server does not support completions (required for ${method})`);
436
+ }
437
+ break;
438
+ case "logging/setLevel":
439
+ if (!this._capabilities.logging) {
440
+ throw new Error(`Server does not support logging (required for ${method})`);
441
+ }
442
+ break;
443
+ case "prompts/get":
444
+ case "prompts/list":
445
+ if (!this._capabilities.prompts) {
446
+ throw new Error(`Server does not support prompts (required for ${method})`);
447
+ }
448
+ break;
449
+ case "resources/list":
450
+ case "resources/templates/list":
451
+ case "resources/read":
452
+ if (!this._capabilities.resources) {
453
+ throw new Error(`Server does not support resources (required for ${method})`);
454
+ }
455
+ break;
456
+ case "tools/call":
457
+ case "tools/list":
458
+ if (!this._capabilities.tools) {
459
+ throw new Error(`Server does not support tools (required for ${method})`);
460
+ }
461
+ break;
462
+ case "tasks/get":
463
+ case "tasks/list":
464
+ case "tasks/result":
465
+ case "tasks/cancel":
466
+ if (!this._capabilities.tasks) {
467
+ throw new Error(`Server does not support tasks capability (required for ${method})`);
468
+ }
469
+ break;
470
+ case "ping":
471
+ case "initialize":
472
+ break;
473
+ }
474
+ }
475
+ assertTaskCapability(method) {
476
+ assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, "Client");
477
+ }
478
+ assertTaskHandlerCapability(method) {
479
+ if (!this._capabilities) {
480
+ return;
481
+ }
482
+ assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, "Server");
483
+ }
484
+ async _oninitialize(request) {
485
+ const requestedVersion = request.params.protocolVersion;
486
+ this._clientCapabilities = request.params.capabilities;
487
+ this._clientVersion = request.params.clientInfo;
488
+ const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION;
489
+ return {
490
+ protocolVersion,
491
+ capabilities: this.getCapabilities(),
492
+ serverInfo: this._serverInfo,
493
+ ...this._instructions && { instructions: this._instructions }
494
+ };
495
+ }
496
+ /**
497
+ * After initialization has completed, this will be populated with the client's reported capabilities.
498
+ */
499
+ getClientCapabilities() {
500
+ return this._clientCapabilities;
501
+ }
502
+ /**
503
+ * After initialization has completed, this will be populated with information about the client's name and version.
504
+ */
505
+ getClientVersion() {
506
+ return this._clientVersion;
507
+ }
508
+ getCapabilities() {
509
+ return this._capabilities;
510
+ }
511
+ async ping() {
512
+ return this.request({ method: "ping" }, EmptyResultSchema);
513
+ }
514
+ // Implementation
515
+ async createMessage(params, options) {
516
+ if (params.tools || params.toolChoice) {
517
+ if (!this._clientCapabilities?.sampling?.tools) {
518
+ throw new Error("Client does not support sampling tools capability.");
519
+ }
520
+ }
521
+ if (params.messages.length > 0) {
522
+ const lastMessage = params.messages[params.messages.length - 1];
523
+ const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
524
+ const hasToolResults = lastContent.some((c) => c.type === "tool_result");
525
+ const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
526
+ const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
527
+ const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
528
+ if (hasToolResults) {
529
+ if (lastContent.some((c) => c.type !== "tool_result")) {
530
+ throw new Error("The last message must contain only tool_result content if any is present");
531
+ }
532
+ if (!hasPreviousToolUse) {
533
+ throw new Error("tool_result blocks are not matching any tool_use from the previous message");
534
+ }
535
+ }
536
+ if (hasPreviousToolUse) {
537
+ const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
538
+ const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
539
+ if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
540
+ throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
541
+ }
542
+ }
543
+ }
544
+ if (params.tools) {
545
+ return this.request({ method: "sampling/createMessage", params }, CreateMessageResultWithToolsSchema, options);
546
+ }
547
+ return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema, options);
548
+ }
549
+ /**
550
+ * Creates an elicitation request for the given parameters.
551
+ * For backwards compatibility, `mode` may be omitted for form requests and will default to `'form'`.
552
+ * @param params The parameters for the elicitation request.
553
+ * @param options Optional request options.
554
+ * @returns The result of the elicitation request.
555
+ */
556
+ async elicitInput(params, options) {
557
+ const mode = params.mode ?? "form";
558
+ switch (mode) {
559
+ case "url": {
560
+ if (!this._clientCapabilities?.elicitation?.url) {
561
+ throw new Error("Client does not support url elicitation.");
562
+ }
563
+ const urlParams = params;
564
+ return this.request({ method: "elicitation/create", params: urlParams }, ElicitResultSchema, options);
565
+ }
566
+ case "form": {
567
+ if (!this._clientCapabilities?.elicitation?.form) {
568
+ throw new Error("Client does not support form elicitation.");
569
+ }
570
+ const formParams = params.mode === "form" ? params : { ...params, mode: "form" };
571
+ const result = await this.request({ method: "elicitation/create", params: formParams }, ElicitResultSchema, options);
572
+ if (result.action === "accept" && result.content && formParams.requestedSchema) {
573
+ try {
574
+ const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema);
575
+ const validationResult = validator(result.content);
576
+ if (!validationResult.valid) {
577
+ throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
578
+ }
579
+ } catch (error) {
580
+ if (error instanceof McpError) {
581
+ throw error;
582
+ }
583
+ throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`);
584
+ }
585
+ }
586
+ return result;
587
+ }
588
+ }
589
+ }
590
+ /**
591
+ * Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete`
592
+ * notification for the specified elicitation ID.
593
+ *
594
+ * @param elicitationId The ID of the elicitation to mark as complete.
595
+ * @param options Optional notification options. Useful when the completion notification should be related to a prior request.
596
+ * @returns A function that emits the completion notification when awaited.
597
+ */
598
+ createElicitationCompletionNotifier(elicitationId, options) {
599
+ if (!this._clientCapabilities?.elicitation?.url) {
600
+ throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");
601
+ }
602
+ return () => this.notification({
603
+ method: "notifications/elicitation/complete",
604
+ params: {
605
+ elicitationId
606
+ }
607
+ }, options);
608
+ }
609
+ async listRoots(params, options) {
610
+ return this.request({ method: "roots/list", params }, ListRootsResultSchema, options);
611
+ }
612
+ /**
613
+ * Sends a logging message to the client, if connected.
614
+ * Note: You only need to send the parameters object, not the entire JSON RPC message
615
+ * @see LoggingMessageNotification
616
+ * @param params
617
+ * @param sessionId optional for stateless and backward compatibility
618
+ */
619
+ async sendLoggingMessage(params, sessionId) {
620
+ if (this._capabilities.logging) {
621
+ if (!this.isMessageIgnored(params.level, sessionId)) {
622
+ return this.notification({ method: "notifications/message", params });
623
+ }
624
+ }
625
+ }
626
+ async sendResourceUpdated(params) {
627
+ return this.notification({
628
+ method: "notifications/resources/updated",
629
+ params
630
+ });
631
+ }
632
+ async sendResourceListChanged() {
633
+ return this.notification({
634
+ method: "notifications/resources/list_changed"
635
+ });
636
+ }
637
+ async sendToolListChanged() {
638
+ return this.notification({ method: "notifications/tools/list_changed" });
639
+ }
640
+ async sendPromptListChanged() {
641
+ return this.notification({ method: "notifications/prompts/list_changed" });
642
+ }
643
+ };
644
+
645
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
646
+ import process2 from "node:process";
647
+ var StdioServerTransport = class {
648
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
649
+ this._stdin = _stdin;
650
+ this._stdout = _stdout;
651
+ this._started = false;
652
+ this._ondata = (chunk) => {
653
+ try {
654
+ this._readBuffer.append(chunk);
655
+ this.processReadBuffer();
656
+ } catch (error) {
657
+ this.onerror?.(error);
658
+ this.close().catch(() => {
659
+ });
660
+ }
661
+ };
662
+ this._onerror = (error) => {
663
+ this.onerror?.(error);
664
+ };
665
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
666
+ }
667
+ /**
668
+ * Starts listening for messages on stdin.
669
+ */
670
+ async start() {
671
+ if (this._started) {
672
+ throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
673
+ }
674
+ this._started = true;
675
+ this._stdin.on("data", this._ondata);
676
+ this._stdin.on("error", this._onerror);
677
+ }
678
+ processReadBuffer() {
679
+ while (true) {
680
+ try {
681
+ const message = this._readBuffer.readMessage();
682
+ if (message === null) {
683
+ break;
684
+ }
685
+ this.onmessage?.(message);
686
+ } catch (error) {
687
+ this.onerror?.(error);
688
+ }
689
+ }
690
+ }
691
+ async close() {
692
+ this._stdin.off("data", this._ondata);
693
+ this._stdin.off("error", this._onerror);
694
+ const remainingDataListeners = this._stdin.listenerCount("data");
695
+ if (remainingDataListeners === 0) {
696
+ this._stdin.pause();
697
+ }
698
+ this._readBuffer.clear();
699
+ this.onclose?.();
700
+ }
701
+ send(message) {
702
+ return new Promise((resolve) => {
703
+ const json = serializeMessage(message);
704
+ if (this._stdout.write(json)) {
705
+ resolve();
706
+ } else {
707
+ this._stdout.once("drain", resolve);
708
+ }
709
+ });
710
+ }
711
+ };
712
+
713
+ // packages/mcp/src/server.ts
714
+ import path from "node:path";
715
+ import { fileURLToPath } from "node:url";
716
+
717
+ // packages/mcp/src/output.ts
718
+ var inlineLimit = 8192;
719
+ var readerLimit = 32768;
720
+ var panelResultKey = "apexrest/panelResult";
721
+ var archives = /* @__PURE__ */ new Map();
722
+ function preview(value, depth = 0) {
723
+ if (Array.isArray(value)) return { count: value.length };
724
+ if (!value || typeof value !== "object") return typeof value === "string" ? value.slice(0, 400) : value;
725
+ const data = value;
726
+ const result = {};
727
+ for (const key of [
728
+ "id",
729
+ "jobId",
730
+ "teamId",
731
+ "cursor",
732
+ "terminal",
733
+ "projectId",
734
+ "project",
735
+ "root",
736
+ "status",
737
+ "phase",
738
+ "revision",
739
+ "ok",
740
+ "operation",
741
+ "exitCode",
742
+ "summary",
743
+ "configured",
744
+ "trusted",
745
+ "executionMode",
746
+ "executionHost",
747
+ "browserMode",
748
+ "nextAction",
749
+ "fullReport",
750
+ "digest",
751
+ "sourceDigest",
752
+ "targetDigest",
753
+ "environment",
754
+ "expiresAt",
755
+ "scope",
756
+ "compiler",
757
+ "approval",
758
+ "backupRequired"
759
+ ]) {
760
+ const entry = data[key];
761
+ if (["string", "number", "boolean"].includes(typeof entry))
762
+ result[key] = typeof entry === "string" ? entry.slice(0, 400) : entry;
763
+ }
764
+ for (const key of [
765
+ "jobs",
766
+ "teams",
767
+ "deployments",
768
+ "diagnostics",
769
+ "artifacts",
770
+ "reviews",
771
+ "qa",
772
+ "verification"
773
+ ])
774
+ if (Array.isArray(data[key])) result[key + "Count"] = data[key].length;
775
+ if (Array.isArray(data.diagnostics))
776
+ result.diagnostics = data.diagnostics.slice(0, 2).map(
777
+ (entry) => entry && typeof entry === "object" ? Object.fromEntries(
778
+ ["severity", "code", "message", "file"].filter((key) => typeof entry[key] === "string").map((key) => [key, entry[key].slice(0, key === "message" ? 300 : 120)])
779
+ ) : String(entry).slice(0, 300)
780
+ );
781
+ for (const key of ["artifacts", "nextActions", "risks"])
782
+ if (Array.isArray(data[key])) {
783
+ result[key] = data[key].slice(0, 4).map((entry) => String(entry).slice(0, 200));
784
+ result[key + "Omitted"] = Math.max(0, data[key].length - 4);
785
+ }
786
+ if (depth < 2) {
787
+ for (const key of ["result", "team"])
788
+ if (data[key] && typeof data[key] === "object") result[key] = preview(data[key], depth + 1);
789
+ }
790
+ if (data.operation === "deploy.plan" && data.data && depth < 2) result.data = preview(data.data, depth + 1);
791
+ const plan = data.scope === "full-application-import" && typeof data.digest === "string";
792
+ if (plan) {
793
+ const operations = data.operations;
794
+ if (Array.isArray(operations))
795
+ result.operationCounts = Object.fromEntries(
796
+ ["migration", "package", "import", "verify", "test"].map((kind) => [
797
+ kind,
798
+ operations.filter((entry) => entry?.kind === kind).length
799
+ ])
800
+ );
801
+ if (data.target && typeof data.target === "object") {
802
+ if (JSON.stringify(data.target).length <= 1200) result.target = data.target;
803
+ else result.targetOmitted = true;
804
+ }
805
+ if (data.sources && typeof data.sources === "object")
806
+ result.sourceCount = Object.keys(data.sources).length;
807
+ } else if (data.sources && typeof data.sources === "object")
808
+ result.sourceCounts = Object.fromEntries(
809
+ Object.entries(data.sources).slice(0, 8).map(([key, files]) => [
810
+ key.slice(0, 80),
811
+ files && typeof files === "object" ? Object.keys(files).length : null
812
+ ])
813
+ );
814
+ return result;
815
+ }
816
+ async function toolOutput(original, project) {
817
+ const full = sanitized(original);
818
+ const serialized = JSON.stringify(full);
819
+ const panel = full.operation.startsWith("panel.");
820
+ const reader = ["docs.read", "artifacts.read"].includes(full.operation);
821
+ let result = full;
822
+ if (serialized.length > (reader ? readerLimit : inlineLimit)) {
823
+ let artifactId;
824
+ let capturedRunId;
825
+ let recoveryError;
826
+ try {
827
+ if (!project) throw new Error("No project is available for a local result artifact.");
828
+ const service = new ArtifactService(await loadProject(project));
829
+ const stable = { ...full, runId: "" };
830
+ if (full.operation === "panel.status" && full.data && typeof full.data === "object")
831
+ stable.data = { ...full.data, updatedAt: "" };
832
+ const key = hash(project + JSON.stringify(stable));
833
+ const cached = archives.get(key);
834
+ if (cached && await service.read(cached.artifactId, 0, 1).then(
835
+ () => true,
836
+ () => false
837
+ )) {
838
+ ({ artifactId, capturedRunId } = cached);
839
+ } else {
840
+ artifactId = await service.saveJson(full, "mcp-result");
841
+ capturedRunId = full.runId;
842
+ archives.set(key, { artifactId, capturedRunId });
843
+ if (archives.size > 32) archives.delete(archives.keys().next().value);
844
+ }
845
+ } catch {
846
+ recoveryError = "The complete result could not be archived. Inspect the existing local operation record; do not rerun a completed operation.";
847
+ }
848
+ result = {
849
+ ...full,
850
+ summary: full.summary.slice(0, 600),
851
+ diagnostics: full.diagnostics.slice(0, 5).map((d) => ({ severity: d.severity, code: d.code.slice(0, 100), message: d.message.slice(0, 400) })),
852
+ artifacts: artifactId ? [artifactId] : [],
853
+ nextActions: artifactId ? [
854
+ "For omitted details, use apexrest_artifact_read with output.artifactId and the same project. Follow nextOffset as needed; do not repeat the operation."
855
+ ] : [recoveryError],
856
+ data: {
857
+ ...preview(full.data),
858
+ output: {
859
+ compacted: true,
860
+ characters: serialized.length,
861
+ diagnosticsCount: full.diagnostics.length,
862
+ artifactsCount: full.artifacts.length,
863
+ ...artifactId ? { artifactId, capturedRunId } : { recovery: "unavailable" }
864
+ }
865
+ }
866
+ };
867
+ if (JSON.stringify(result).length > inlineLimit) {
868
+ const data = result.data;
869
+ result.data = Object.fromEntries(
870
+ ["id", "jobId", "teamId", "cursor", "terminal", "status", "ok", "executionHost", "output"].filter((key) => data[key] !== void 0).map((key) => [key, data[key]])
871
+ );
872
+ for (const key of ["result", "team"])
873
+ if (data[key] && typeof data[key] === "object") {
874
+ const nested = data[key];
875
+ result.data[key] = Object.fromEntries(
876
+ ["id", "ok", "status", "exitCode", "operation", "summary"].filter((field) => ["string", "number", "boolean"].includes(typeof nested[field])).map((field) => [field, nested[field]])
877
+ );
878
+ }
879
+ }
880
+ }
881
+ return {
882
+ isError: !result.ok,
883
+ content: [{ type: "text", text: result === full ? serialized : JSON.stringify(result) }],
884
+ ...panel ? { _meta: { [panelResultKey]: full } } : {}
885
+ };
886
+ }
887
+
888
+ // packages/mcp/src/job-tools.ts
889
+ var jobWaitSeconds = external_exports.number().int().min(0).max(30).default(25).describe("Wait for the result or return the existing jobId; default 25 seconds, 0 queues immediately.");
890
+ var completedResultSchema = external_exports.object({
891
+ schemaVersion: external_exports.literal(1),
892
+ ok: external_exports.boolean(),
893
+ operation: external_exports.string(),
894
+ status: external_exports.string(),
895
+ runId: external_exports.string(),
896
+ summary: external_exports.string(),
897
+ diagnostics: external_exports.array(
898
+ external_exports.object({
899
+ severity: external_exports.enum(["error", "warning", "info"]),
900
+ code: external_exports.string(),
901
+ message: external_exports.string(),
902
+ file: external_exports.string().optional()
903
+ }).transform(({ file, ...diagnostic }) => ({ ...diagnostic, ...file !== void 0 ? { file } : {} }))
904
+ ),
905
+ artifacts: external_exports.array(external_exports.string()),
906
+ nextActions: external_exports.array(external_exports.string()),
907
+ data: external_exports.unknown().optional(),
908
+ exitCode: external_exports.union([
909
+ external_exports.literal(0),
910
+ external_exports.literal(1),
911
+ external_exports.literal(2),
912
+ external_exports.literal(3),
913
+ external_exports.literal(4),
914
+ external_exports.literal(5),
915
+ external_exports.literal(6)
916
+ ])
917
+ });
918
+ function jobToolResult(operation, job) {
919
+ if (job.status === "completed") {
920
+ const nested = completedResultSchema.safeParse(job.result);
921
+ if (nested.success && nested.data.operation === operation) return { ...nested.data, data: job };
922
+ }
923
+ const nextActions = typeof job.nextAction === "string" ? [job.nextAction] : ["Read apexrest_job_status with this jobId; inspect the existing operation before any retry."];
924
+ if (job.status === "queued" || job.status === "running")
925
+ return {
926
+ ...success(operation, job, `Job ${job.status}; use the existing jobId to retrieve its result.`),
927
+ status: job.status,
928
+ nextActions
929
+ };
930
+ const status = job.status === "failed" || job.status === "cancelled" ? job.status : "outcome_unknown";
931
+ const result = failure(
932
+ operation,
933
+ new Fault(
934
+ status === "failed" ? "JOB_FAILED" : status === "cancelled" ? "CANCELLED" : "JOB_OUTCOME_UNKNOWN",
935
+ status === "outcome_unknown" ? "The job outcome is unknown. Inspect its existing record; do not repeat the operation." : `Job ${status}. Inspect the existing operation record.`,
936
+ status === "failed" ? 1 : 6,
937
+ status
938
+ )
939
+ );
940
+ return { ...result, nextActions, data: job };
941
+ }
942
+ async function runJobTool(jobs, operation, input, runtime, signal) {
943
+ const { waitSeconds: requestedWait, ...domainInput } = input;
944
+ const waitSeconds = parse(jobWaitSeconds, requestedWait);
945
+ if (signal?.aborted)
946
+ throw new Fault("CANCELLED", "Request cancelled before starting a job.", 6, "cancelled");
947
+ const started = await jobs.start(operation, domainInput, runtime);
948
+ if (waitSeconds === 0) return started;
949
+ try {
950
+ const state = await jobs.status(started.jobId, waitSeconds, signal);
951
+ const { nextAction, ...receipt } = started;
952
+ return {
953
+ ...receipt,
954
+ ...state,
955
+ jobId: started.jobId,
956
+ ...["queued", "running"].includes(state.status) ? { nextAction } : {}
957
+ };
958
+ } catch {
959
+ return {
960
+ ...started,
961
+ status: "outcome_unknown",
962
+ nextAction: "Read apexrest_job_status with this jobId; do not repeat the operation. No cancellation or rollback is confirmed."
963
+ };
964
+ }
965
+ }
966
+
967
+ // packages/mcp/src/server.ts
968
+ var panelUri = "ui://apexrest/development-panel.html";
969
+ var absoluteProject = external_exports.string().min(1).max(4096).refine(
970
+ (value) => path.isAbsolute(value) && (process.platform !== "win32" || /^(?:[A-Za-z]:[\\/]|[\\/]{2}[^\\/]+[\\/][^\\/]+)/.test(value)),
971
+ "Provide the absolute project directory containing apexrest.json; the plugin runs from its installation directory."
972
+ ).describe("Absolute project directory containing apexrest.json; never the plugin cache.");
973
+ var mcpSchemas = /* @__PURE__ */ new Map();
974
+ for (const { operation, long } of toolCatalog) {
975
+ const schema = schemas[operation];
976
+ const transportSchema = "project" in schema.shape ? schema.extend({ project: operation === "doctor" ? absoluteProject.optional() : absoluteProject }) : schema;
977
+ mcpSchemas.set(operation, long ? transportSchema.extend({ waitSeconds: jobWaitSeconds }) : transportSchema);
978
+ }
979
+ async function startMcp() {
980
+ const exposed = toolCatalog.filter(
981
+ (t) => process.env.APEXREST_TEAM_WORKER !== "1" || !t.operation.startsWith("team.") && !t.operation.startsWith("work.") && !t.operation.startsWith("panel.") && (process.env.APEXREST_TEAM_ROLE?.startsWith("developer") || t.readOnly || t.operation === "browser.open")
982
+ );
983
+ const server = new Server(
984
+ { name: "apexrest-apex", version: VERSION },
985
+ { capabilities: { tools: {}, resources: {} } }
986
+ );
987
+ server.setRequestHandler(ListResourcesRequestSchema, async () => ({
988
+ resources: [
989
+ {
990
+ uri: panelUri,
991
+ name: "APEXREST development panel",
992
+ mimeType: "text/html;profile=mcp-app",
993
+ description: "Live Codex project settings, agent activity, mandatory reviews and APEX operations."
994
+ }
995
+ ]
996
+ }));
997
+ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
998
+ if (request.params.uri !== panelUri) throw new Error("Unknown resource.");
999
+ return {
1000
+ contents: [
1001
+ {
1002
+ uri: panelUri,
1003
+ mimeType: "text/html;profile=mcp-app",
1004
+ text: await panelDocument(),
1005
+ _meta: { ui: { prefersBorder: true, csp: { connectDomains: [], resourceDomains: [] } } }
1006
+ }
1007
+ ]
1008
+ };
1009
+ });
1010
+ let catalog;
1011
+ server.setRequestHandler(
1012
+ ListToolsRequestSchema,
1013
+ async () => catalog ??= {
1014
+ tools: exposed.map((t) => ({
1015
+ name: t.name,
1016
+ description: t.description,
1017
+ ...t.operation === "panel.open" ? { _meta: { ui: { resourceUri: panelUri } } } : {},
1018
+ inputSchema: external_exports.toJSONSchema(mcpSchemas.get(t.operation), { target: "draft-7", io: "input" }),
1019
+ annotations: {
1020
+ readOnlyHint: t.readOnly,
1021
+ destructiveHint: t.destructive ?? !t.readOnly,
1022
+ idempotentHint: t.readOnly,
1023
+ openWorldHint: ![
1024
+ "doctor",
1025
+ "docs.search",
1026
+ "docs.read",
1027
+ "project.inspect",
1028
+ "jobs.status",
1029
+ "jobs.cancel",
1030
+ "artifacts.read"
1031
+ ].includes(t.operation)
1032
+ }
1033
+ }))
1034
+ }
1035
+ );
1036
+ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
1037
+ const tool = exposed.find((t) => t.name === request.params.name);
1038
+ let result;
1039
+ let project;
1040
+ try {
1041
+ if (!tool) throw new Fault("UNKNOWN_TOOL", "Tool is not in the catalog.", 2);
1042
+ const input = parse(mcpSchemas.get(tool.operation), request.params.arguments ?? {});
1043
+ project = typeof input.project === "string" ? input.project : void 0;
1044
+ result = tool.long ? jobToolResult(
1045
+ tool.operation,
1046
+ await runJobTool(
1047
+ new JobService(await loadProject(String(input.project))),
1048
+ tool.operation,
1049
+ input,
1050
+ path.join(path.dirname(fileURLToPath(import.meta.url)), "apexrest.mjs"),
1051
+ extra.signal
1052
+ )
1053
+ ) : await dispatch(tool.operation, input, extra.signal);
1054
+ } catch (e) {
1055
+ result = failure(tool?.operation ?? "unknown", e);
1056
+ }
1057
+ return toolOutput(result, project);
1058
+ });
1059
+ await server.connect(new StdioServerTransport());
1060
+ }
1061
+
1062
+ export {
1063
+ startMcp
1064
+ };