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,1424 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ VERSION
4
+ } from "./chunk-Z6Y72JVG.mjs";
5
+ import {
6
+ Client,
7
+ StdioClientTransport,
8
+ ToolchainService,
9
+ managedHome,
10
+ requireTrust,
11
+ require_applicator,
12
+ require_codegen,
13
+ require_compile,
14
+ require_core,
15
+ require_core2,
16
+ require_dependencies,
17
+ require_discriminator,
18
+ require_format,
19
+ require_metadata,
20
+ require_names,
21
+ require_ref,
22
+ require_ref_error,
23
+ require_util,
24
+ require_validate,
25
+ require_validation,
26
+ require_validation_error,
27
+ resourceRoot,
28
+ runProcess,
29
+ runtimeState
30
+ } from "./chunk-2SZCZZ3J.mjs";
31
+ import {
32
+ Fault,
33
+ __commonJS,
34
+ __toESM,
35
+ atomicWrite,
36
+ canonical,
37
+ contained,
38
+ exists,
39
+ hash,
40
+ inventory,
41
+ readJson,
42
+ withLock,
43
+ writeJson
44
+ } from "./chunk-IPU64TJI.mjs";
45
+
46
+ // node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
47
+ var require_dynamicAnchor = __commonJS({
48
+ "node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) {
49
+ "use strict";
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.dynamicAnchor = void 0;
52
+ var codegen_1 = require_codegen();
53
+ var names_1 = require_names();
54
+ var compile_1 = require_compile();
55
+ var ref_1 = require_ref();
56
+ var def = {
57
+ keyword: "$dynamicAnchor",
58
+ schemaType: "string",
59
+ code: (cxt) => dynamicAnchor(cxt, cxt.schema)
60
+ };
61
+ function dynamicAnchor(cxt, anchor) {
62
+ const { gen, it } = cxt;
63
+ it.schemaEnv.root.dynamicAnchors[anchor] = true;
64
+ const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
65
+ const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
66
+ gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
67
+ }
68
+ exports.dynamicAnchor = dynamicAnchor;
69
+ function _getValidate(cxt) {
70
+ const { schemaEnv, schema, self } = cxt.it;
71
+ const { root, baseId, localRefs, meta } = schemaEnv.root;
72
+ const { schemaId } = self.opts;
73
+ const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
74
+ compile_1.compileSchema.call(self, sch);
75
+ return (0, ref_1.getValidate)(cxt, sch);
76
+ }
77
+ exports.default = def;
78
+ }
79
+ });
80
+
81
+ // node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
82
+ var require_dynamicRef = __commonJS({
83
+ "node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) {
84
+ "use strict";
85
+ Object.defineProperty(exports, "__esModule", { value: true });
86
+ exports.dynamicRef = void 0;
87
+ var codegen_1 = require_codegen();
88
+ var names_1 = require_names();
89
+ var ref_1 = require_ref();
90
+ var def = {
91
+ keyword: "$dynamicRef",
92
+ schemaType: "string",
93
+ code: (cxt) => dynamicRef(cxt, cxt.schema)
94
+ };
95
+ function dynamicRef(cxt, ref) {
96
+ const { gen, keyword, it } = cxt;
97
+ if (ref[0] !== "#")
98
+ throw new Error(`"${keyword}" only supports hash fragment reference`);
99
+ const anchor = ref.slice(1);
100
+ if (it.allErrors) {
101
+ _dynamicRef();
102
+ } else {
103
+ const valid = gen.let("valid", false);
104
+ _dynamicRef(valid);
105
+ cxt.ok(valid);
106
+ }
107
+ function _dynamicRef(valid) {
108
+ if (it.schemaEnv.root.dynamicAnchors[anchor]) {
109
+ const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
110
+ gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
111
+ } else {
112
+ _callRef(it.validateName, valid)();
113
+ }
114
+ }
115
+ function _callRef(validate, valid) {
116
+ return valid ? () => gen.block(() => {
117
+ (0, ref_1.callRef)(cxt, validate);
118
+ gen.let(valid, true);
119
+ }) : () => (0, ref_1.callRef)(cxt, validate);
120
+ }
121
+ }
122
+ exports.dynamicRef = dynamicRef;
123
+ exports.default = def;
124
+ }
125
+ });
126
+
127
+ // node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
128
+ var require_recursiveAnchor = __commonJS({
129
+ "node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) {
130
+ "use strict";
131
+ Object.defineProperty(exports, "__esModule", { value: true });
132
+ var dynamicAnchor_1 = require_dynamicAnchor();
133
+ var util_1 = require_util();
134
+ var def = {
135
+ keyword: "$recursiveAnchor",
136
+ schemaType: "boolean",
137
+ code(cxt) {
138
+ if (cxt.schema)
139
+ (0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
140
+ else
141
+ (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
142
+ }
143
+ };
144
+ exports.default = def;
145
+ }
146
+ });
147
+
148
+ // node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
149
+ var require_recursiveRef = __commonJS({
150
+ "node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) {
151
+ "use strict";
152
+ Object.defineProperty(exports, "__esModule", { value: true });
153
+ var dynamicRef_1 = require_dynamicRef();
154
+ var def = {
155
+ keyword: "$recursiveRef",
156
+ schemaType: "string",
157
+ code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
158
+ };
159
+ exports.default = def;
160
+ }
161
+ });
162
+
163
+ // node_modules/ajv/dist/vocabularies/dynamic/index.js
164
+ var require_dynamic = __commonJS({
165
+ "node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) {
166
+ "use strict";
167
+ Object.defineProperty(exports, "__esModule", { value: true });
168
+ var dynamicAnchor_1 = require_dynamicAnchor();
169
+ var dynamicRef_1 = require_dynamicRef();
170
+ var recursiveAnchor_1 = require_recursiveAnchor();
171
+ var recursiveRef_1 = require_recursiveRef();
172
+ var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
173
+ exports.default = dynamic;
174
+ }
175
+ });
176
+
177
+ // node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
178
+ var require_dependentRequired = __commonJS({
179
+ "node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) {
180
+ "use strict";
181
+ Object.defineProperty(exports, "__esModule", { value: true });
182
+ var dependencies_1 = require_dependencies();
183
+ var def = {
184
+ keyword: "dependentRequired",
185
+ type: "object",
186
+ schemaType: "object",
187
+ error: dependencies_1.error,
188
+ code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
189
+ };
190
+ exports.default = def;
191
+ }
192
+ });
193
+
194
+ // node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
195
+ var require_dependentSchemas = __commonJS({
196
+ "node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) {
197
+ "use strict";
198
+ Object.defineProperty(exports, "__esModule", { value: true });
199
+ var dependencies_1 = require_dependencies();
200
+ var def = {
201
+ keyword: "dependentSchemas",
202
+ type: "object",
203
+ schemaType: "object",
204
+ code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
205
+ };
206
+ exports.default = def;
207
+ }
208
+ });
209
+
210
+ // node_modules/ajv/dist/vocabularies/validation/limitContains.js
211
+ var require_limitContains = __commonJS({
212
+ "node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) {
213
+ "use strict";
214
+ Object.defineProperty(exports, "__esModule", { value: true });
215
+ var util_1 = require_util();
216
+ var def = {
217
+ keyword: ["maxContains", "minContains"],
218
+ type: "array",
219
+ schemaType: "number",
220
+ code({ keyword, parentSchema, it }) {
221
+ if (parentSchema.contains === void 0) {
222
+ (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
223
+ }
224
+ }
225
+ };
226
+ exports.default = def;
227
+ }
228
+ });
229
+
230
+ // node_modules/ajv/dist/vocabularies/next.js
231
+ var require_next = __commonJS({
232
+ "node_modules/ajv/dist/vocabularies/next.js"(exports) {
233
+ "use strict";
234
+ Object.defineProperty(exports, "__esModule", { value: true });
235
+ var dependentRequired_1 = require_dependentRequired();
236
+ var dependentSchemas_1 = require_dependentSchemas();
237
+ var limitContains_1 = require_limitContains();
238
+ var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
239
+ exports.default = next;
240
+ }
241
+ });
242
+
243
+ // node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
244
+ var require_unevaluatedProperties = __commonJS({
245
+ "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) {
246
+ "use strict";
247
+ Object.defineProperty(exports, "__esModule", { value: true });
248
+ var codegen_1 = require_codegen();
249
+ var util_1 = require_util();
250
+ var names_1 = require_names();
251
+ var error = {
252
+ message: "must NOT have unevaluated properties",
253
+ params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
254
+ };
255
+ var def = {
256
+ keyword: "unevaluatedProperties",
257
+ type: "object",
258
+ schemaType: ["boolean", "object"],
259
+ trackErrors: true,
260
+ error,
261
+ code(cxt) {
262
+ const { gen, schema, data, errsCount, it } = cxt;
263
+ if (!errsCount)
264
+ throw new Error("ajv implementation error");
265
+ const { allErrors, props } = it;
266
+ if (props instanceof codegen_1.Name) {
267
+ gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
268
+ } else if (props !== true) {
269
+ gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
270
+ }
271
+ it.props = true;
272
+ cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
273
+ function unevaluatedPropCode(key) {
274
+ if (schema === false) {
275
+ cxt.setParams({ unevaluatedProperty: key });
276
+ cxt.error();
277
+ if (!allErrors)
278
+ gen.break();
279
+ return;
280
+ }
281
+ if (!(0, util_1.alwaysValidSchema)(it, schema)) {
282
+ const valid = gen.name("valid");
283
+ cxt.subschema({
284
+ keyword: "unevaluatedProperties",
285
+ dataProp: key,
286
+ dataPropType: util_1.Type.Str
287
+ }, valid);
288
+ if (!allErrors)
289
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
290
+ }
291
+ }
292
+ function unevaluatedDynamic(evaluatedProps, key) {
293
+ return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
294
+ }
295
+ function unevaluatedStatic(evaluatedProps, key) {
296
+ const ps = [];
297
+ for (const p in evaluatedProps) {
298
+ if (evaluatedProps[p] === true)
299
+ ps.push((0, codegen_1._)`${key} !== ${p}`);
300
+ }
301
+ return (0, codegen_1.and)(...ps);
302
+ }
303
+ }
304
+ };
305
+ exports.default = def;
306
+ }
307
+ });
308
+
309
+ // node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
310
+ var require_unevaluatedItems = __commonJS({
311
+ "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) {
312
+ "use strict";
313
+ Object.defineProperty(exports, "__esModule", { value: true });
314
+ var codegen_1 = require_codegen();
315
+ var util_1 = require_util();
316
+ var error = {
317
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
318
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
319
+ };
320
+ var def = {
321
+ keyword: "unevaluatedItems",
322
+ type: "array",
323
+ schemaType: ["boolean", "object"],
324
+ error,
325
+ code(cxt) {
326
+ const { gen, schema, data, it } = cxt;
327
+ const items = it.items || 0;
328
+ if (items === true)
329
+ return;
330
+ const len = gen.const("len", (0, codegen_1._)`${data}.length`);
331
+ if (schema === false) {
332
+ cxt.setParams({ len: items });
333
+ cxt.fail((0, codegen_1._)`${len} > ${items}`);
334
+ } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
335
+ const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
336
+ gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
337
+ cxt.ok(valid);
338
+ }
339
+ it.items = true;
340
+ function validateItems(valid, from) {
341
+ gen.forRange("i", from, len, (i) => {
342
+ cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
343
+ if (!it.allErrors)
344
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
345
+ });
346
+ }
347
+ }
348
+ };
349
+ exports.default = def;
350
+ }
351
+ });
352
+
353
+ // node_modules/ajv/dist/vocabularies/unevaluated/index.js
354
+ var require_unevaluated = __commonJS({
355
+ "node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
356
+ "use strict";
357
+ Object.defineProperty(exports, "__esModule", { value: true });
358
+ var unevaluatedProperties_1 = require_unevaluatedProperties();
359
+ var unevaluatedItems_1 = require_unevaluatedItems();
360
+ var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
361
+ exports.default = unevaluated;
362
+ }
363
+ });
364
+
365
+ // node_modules/ajv/dist/vocabularies/draft2020.js
366
+ var require_draft2020 = __commonJS({
367
+ "node_modules/ajv/dist/vocabularies/draft2020.js"(exports) {
368
+ "use strict";
369
+ Object.defineProperty(exports, "__esModule", { value: true });
370
+ var core_1 = require_core2();
371
+ var validation_1 = require_validation();
372
+ var applicator_1 = require_applicator();
373
+ var dynamic_1 = require_dynamic();
374
+ var next_1 = require_next();
375
+ var unevaluated_1 = require_unevaluated();
376
+ var format_1 = require_format();
377
+ var metadata_1 = require_metadata();
378
+ var draft2020Vocabularies = [
379
+ dynamic_1.default,
380
+ core_1.default,
381
+ validation_1.default,
382
+ (0, applicator_1.default)(true),
383
+ format_1.default,
384
+ metadata_1.metadataVocabulary,
385
+ metadata_1.contentVocabulary,
386
+ next_1.default,
387
+ unevaluated_1.default
388
+ ];
389
+ exports.default = draft2020Vocabularies;
390
+ }
391
+ });
392
+
393
+ // node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
394
+ var require_schema = __commonJS({
395
+ "node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) {
396
+ module.exports = {
397
+ $schema: "https://json-schema.org/draft/2020-12/schema",
398
+ $id: "https://json-schema.org/draft/2020-12/schema",
399
+ $vocabulary: {
400
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
401
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
402
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
403
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
404
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
405
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
406
+ "https://json-schema.org/draft/2020-12/vocab/content": true
407
+ },
408
+ $dynamicAnchor: "meta",
409
+ title: "Core and Validation specifications meta-schema",
410
+ allOf: [
411
+ { $ref: "meta/core" },
412
+ { $ref: "meta/applicator" },
413
+ { $ref: "meta/unevaluated" },
414
+ { $ref: "meta/validation" },
415
+ { $ref: "meta/meta-data" },
416
+ { $ref: "meta/format-annotation" },
417
+ { $ref: "meta/content" }
418
+ ],
419
+ type: ["object", "boolean"],
420
+ $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
421
+ properties: {
422
+ definitions: {
423
+ $comment: '"definitions" has been replaced by "$defs".',
424
+ type: "object",
425
+ additionalProperties: { $dynamicRef: "#meta" },
426
+ deprecated: true,
427
+ default: {}
428
+ },
429
+ dependencies: {
430
+ $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
431
+ type: "object",
432
+ additionalProperties: {
433
+ anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
434
+ },
435
+ deprecated: true,
436
+ default: {}
437
+ },
438
+ $recursiveAnchor: {
439
+ $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
440
+ $ref: "meta/core#/$defs/anchorString",
441
+ deprecated: true
442
+ },
443
+ $recursiveRef: {
444
+ $comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
445
+ $ref: "meta/core#/$defs/uriReferenceString",
446
+ deprecated: true
447
+ }
448
+ }
449
+ };
450
+ }
451
+ });
452
+
453
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
454
+ var require_applicator2 = __commonJS({
455
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) {
456
+ module.exports = {
457
+ $schema: "https://json-schema.org/draft/2020-12/schema",
458
+ $id: "https://json-schema.org/draft/2020-12/meta/applicator",
459
+ $vocabulary: {
460
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
461
+ },
462
+ $dynamicAnchor: "meta",
463
+ title: "Applicator vocabulary meta-schema",
464
+ type: ["object", "boolean"],
465
+ properties: {
466
+ prefixItems: { $ref: "#/$defs/schemaArray" },
467
+ items: { $dynamicRef: "#meta" },
468
+ contains: { $dynamicRef: "#meta" },
469
+ additionalProperties: { $dynamicRef: "#meta" },
470
+ properties: {
471
+ type: "object",
472
+ additionalProperties: { $dynamicRef: "#meta" },
473
+ default: {}
474
+ },
475
+ patternProperties: {
476
+ type: "object",
477
+ additionalProperties: { $dynamicRef: "#meta" },
478
+ propertyNames: { format: "regex" },
479
+ default: {}
480
+ },
481
+ dependentSchemas: {
482
+ type: "object",
483
+ additionalProperties: { $dynamicRef: "#meta" },
484
+ default: {}
485
+ },
486
+ propertyNames: { $dynamicRef: "#meta" },
487
+ if: { $dynamicRef: "#meta" },
488
+ then: { $dynamicRef: "#meta" },
489
+ else: { $dynamicRef: "#meta" },
490
+ allOf: { $ref: "#/$defs/schemaArray" },
491
+ anyOf: { $ref: "#/$defs/schemaArray" },
492
+ oneOf: { $ref: "#/$defs/schemaArray" },
493
+ not: { $dynamicRef: "#meta" }
494
+ },
495
+ $defs: {
496
+ schemaArray: {
497
+ type: "array",
498
+ minItems: 1,
499
+ items: { $dynamicRef: "#meta" }
500
+ }
501
+ }
502
+ };
503
+ }
504
+ });
505
+
506
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
507
+ var require_unevaluated2 = __commonJS({
508
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) {
509
+ module.exports = {
510
+ $schema: "https://json-schema.org/draft/2020-12/schema",
511
+ $id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
512
+ $vocabulary: {
513
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
514
+ },
515
+ $dynamicAnchor: "meta",
516
+ title: "Unevaluated applicator vocabulary meta-schema",
517
+ type: ["object", "boolean"],
518
+ properties: {
519
+ unevaluatedItems: { $dynamicRef: "#meta" },
520
+ unevaluatedProperties: { $dynamicRef: "#meta" }
521
+ }
522
+ };
523
+ }
524
+ });
525
+
526
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
527
+ var require_content = __commonJS({
528
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) {
529
+ module.exports = {
530
+ $schema: "https://json-schema.org/draft/2020-12/schema",
531
+ $id: "https://json-schema.org/draft/2020-12/meta/content",
532
+ $vocabulary: {
533
+ "https://json-schema.org/draft/2020-12/vocab/content": true
534
+ },
535
+ $dynamicAnchor: "meta",
536
+ title: "Content vocabulary meta-schema",
537
+ type: ["object", "boolean"],
538
+ properties: {
539
+ contentEncoding: { type: "string" },
540
+ contentMediaType: { type: "string" },
541
+ contentSchema: { $dynamicRef: "#meta" }
542
+ }
543
+ };
544
+ }
545
+ });
546
+
547
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
548
+ var require_core3 = __commonJS({
549
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) {
550
+ module.exports = {
551
+ $schema: "https://json-schema.org/draft/2020-12/schema",
552
+ $id: "https://json-schema.org/draft/2020-12/meta/core",
553
+ $vocabulary: {
554
+ "https://json-schema.org/draft/2020-12/vocab/core": true
555
+ },
556
+ $dynamicAnchor: "meta",
557
+ title: "Core vocabulary meta-schema",
558
+ type: ["object", "boolean"],
559
+ properties: {
560
+ $id: {
561
+ $ref: "#/$defs/uriReferenceString",
562
+ $comment: "Non-empty fragments not allowed.",
563
+ pattern: "^[^#]*#?$"
564
+ },
565
+ $schema: { $ref: "#/$defs/uriString" },
566
+ $ref: { $ref: "#/$defs/uriReferenceString" },
567
+ $anchor: { $ref: "#/$defs/anchorString" },
568
+ $dynamicRef: { $ref: "#/$defs/uriReferenceString" },
569
+ $dynamicAnchor: { $ref: "#/$defs/anchorString" },
570
+ $vocabulary: {
571
+ type: "object",
572
+ propertyNames: { $ref: "#/$defs/uriString" },
573
+ additionalProperties: {
574
+ type: "boolean"
575
+ }
576
+ },
577
+ $comment: {
578
+ type: "string"
579
+ },
580
+ $defs: {
581
+ type: "object",
582
+ additionalProperties: { $dynamicRef: "#meta" }
583
+ }
584
+ },
585
+ $defs: {
586
+ anchorString: {
587
+ type: "string",
588
+ pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
589
+ },
590
+ uriString: {
591
+ type: "string",
592
+ format: "uri"
593
+ },
594
+ uriReferenceString: {
595
+ type: "string",
596
+ format: "uri-reference"
597
+ }
598
+ }
599
+ };
600
+ }
601
+ });
602
+
603
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
604
+ var require_format_annotation = __commonJS({
605
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
606
+ module.exports = {
607
+ $schema: "https://json-schema.org/draft/2020-12/schema",
608
+ $id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
609
+ $vocabulary: {
610
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
611
+ },
612
+ $dynamicAnchor: "meta",
613
+ title: "Format vocabulary meta-schema for annotation results",
614
+ type: ["object", "boolean"],
615
+ properties: {
616
+ format: { type: "string" }
617
+ }
618
+ };
619
+ }
620
+ });
621
+
622
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
623
+ var require_meta_data = __commonJS({
624
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
625
+ module.exports = {
626
+ $schema: "https://json-schema.org/draft/2020-12/schema",
627
+ $id: "https://json-schema.org/draft/2020-12/meta/meta-data",
628
+ $vocabulary: {
629
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
630
+ },
631
+ $dynamicAnchor: "meta",
632
+ title: "Meta-data vocabulary meta-schema",
633
+ type: ["object", "boolean"],
634
+ properties: {
635
+ title: {
636
+ type: "string"
637
+ },
638
+ description: {
639
+ type: "string"
640
+ },
641
+ default: true,
642
+ deprecated: {
643
+ type: "boolean",
644
+ default: false
645
+ },
646
+ readOnly: {
647
+ type: "boolean",
648
+ default: false
649
+ },
650
+ writeOnly: {
651
+ type: "boolean",
652
+ default: false
653
+ },
654
+ examples: {
655
+ type: "array",
656
+ items: true
657
+ }
658
+ }
659
+ };
660
+ }
661
+ });
662
+
663
+ // node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
664
+ var require_validation2 = __commonJS({
665
+ "node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
666
+ module.exports = {
667
+ $schema: "https://json-schema.org/draft/2020-12/schema",
668
+ $id: "https://json-schema.org/draft/2020-12/meta/validation",
669
+ $vocabulary: {
670
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
671
+ },
672
+ $dynamicAnchor: "meta",
673
+ title: "Validation vocabulary meta-schema",
674
+ type: ["object", "boolean"],
675
+ properties: {
676
+ type: {
677
+ anyOf: [
678
+ { $ref: "#/$defs/simpleTypes" },
679
+ {
680
+ type: "array",
681
+ items: { $ref: "#/$defs/simpleTypes" },
682
+ minItems: 1,
683
+ uniqueItems: true
684
+ }
685
+ ]
686
+ },
687
+ const: true,
688
+ enum: {
689
+ type: "array",
690
+ items: true
691
+ },
692
+ multipleOf: {
693
+ type: "number",
694
+ exclusiveMinimum: 0
695
+ },
696
+ maximum: {
697
+ type: "number"
698
+ },
699
+ exclusiveMaximum: {
700
+ type: "number"
701
+ },
702
+ minimum: {
703
+ type: "number"
704
+ },
705
+ exclusiveMinimum: {
706
+ type: "number"
707
+ },
708
+ maxLength: { $ref: "#/$defs/nonNegativeInteger" },
709
+ minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
710
+ pattern: {
711
+ type: "string",
712
+ format: "regex"
713
+ },
714
+ maxItems: { $ref: "#/$defs/nonNegativeInteger" },
715
+ minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
716
+ uniqueItems: {
717
+ type: "boolean",
718
+ default: false
719
+ },
720
+ maxContains: { $ref: "#/$defs/nonNegativeInteger" },
721
+ minContains: {
722
+ $ref: "#/$defs/nonNegativeInteger",
723
+ default: 1
724
+ },
725
+ maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
726
+ minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
727
+ required: { $ref: "#/$defs/stringArray" },
728
+ dependentRequired: {
729
+ type: "object",
730
+ additionalProperties: {
731
+ $ref: "#/$defs/stringArray"
732
+ }
733
+ }
734
+ },
735
+ $defs: {
736
+ nonNegativeInteger: {
737
+ type: "integer",
738
+ minimum: 0
739
+ },
740
+ nonNegativeIntegerDefault0: {
741
+ $ref: "#/$defs/nonNegativeInteger",
742
+ default: 0
743
+ },
744
+ simpleTypes: {
745
+ enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
746
+ },
747
+ stringArray: {
748
+ type: "array",
749
+ items: { type: "string" },
750
+ uniqueItems: true,
751
+ default: []
752
+ }
753
+ }
754
+ };
755
+ }
756
+ });
757
+
758
+ // node_modules/ajv/dist/refs/json-schema-2020-12/index.js
759
+ var require_json_schema_2020_12 = __commonJS({
760
+ "node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) {
761
+ "use strict";
762
+ Object.defineProperty(exports, "__esModule", { value: true });
763
+ var metaSchema = require_schema();
764
+ var applicator = require_applicator2();
765
+ var unevaluated = require_unevaluated2();
766
+ var content = require_content();
767
+ var core = require_core3();
768
+ var format = require_format_annotation();
769
+ var metadata = require_meta_data();
770
+ var validation = require_validation2();
771
+ var META_SUPPORT_DATA = ["/properties"];
772
+ function addMetaSchema2020($data) {
773
+ ;
774
+ [
775
+ metaSchema,
776
+ applicator,
777
+ unevaluated,
778
+ content,
779
+ core,
780
+ with$data(this, format),
781
+ metadata,
782
+ with$data(this, validation)
783
+ ].forEach((sch) => this.addMetaSchema(sch, void 0, false));
784
+ return this;
785
+ function with$data(ajv, sch) {
786
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
787
+ }
788
+ }
789
+ exports.default = addMetaSchema2020;
790
+ }
791
+ });
792
+
793
+ // node_modules/ajv/dist/2020.js
794
+ var require__ = __commonJS({
795
+ "node_modules/ajv/dist/2020.js"(exports, module) {
796
+ "use strict";
797
+ Object.defineProperty(exports, "__esModule", { value: true });
798
+ exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
799
+ var core_1 = require_core();
800
+ var draft2020_1 = require_draft2020();
801
+ var discriminator_1 = require_discriminator();
802
+ var json_schema_2020_12_1 = require_json_schema_2020_12();
803
+ var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
804
+ var Ajv20202 = class extends core_1.default {
805
+ constructor(opts = {}) {
806
+ super({
807
+ ...opts,
808
+ dynamicRef: true,
809
+ next: true,
810
+ unevaluated: true
811
+ });
812
+ }
813
+ _addVocabularies() {
814
+ super._addVocabularies();
815
+ draft2020_1.default.forEach((v) => this.addVocabulary(v));
816
+ if (this.opts.discriminator)
817
+ this.addKeyword(discriminator_1.default);
818
+ }
819
+ _addDefaultMetaSchema() {
820
+ super._addDefaultMetaSchema();
821
+ const { $data, meta } = this.opts;
822
+ if (!meta)
823
+ return;
824
+ json_schema_2020_12_1.default.call(this, $data);
825
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
826
+ }
827
+ defaultMeta() {
828
+ return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
829
+ }
830
+ };
831
+ exports.Ajv2020 = Ajv20202;
832
+ module.exports = exports = Ajv20202;
833
+ module.exports.Ajv2020 = Ajv20202;
834
+ Object.defineProperty(exports, "__esModule", { value: true });
835
+ exports.default = Ajv20202;
836
+ var validate_1 = require_validate();
837
+ Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
838
+ return validate_1.KeywordCxt;
839
+ } });
840
+ var codegen_1 = require_codegen();
841
+ Object.defineProperty(exports, "_", { enumerable: true, get: function() {
842
+ return codegen_1._;
843
+ } });
844
+ Object.defineProperty(exports, "str", { enumerable: true, get: function() {
845
+ return codegen_1.str;
846
+ } });
847
+ Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
848
+ return codegen_1.stringify;
849
+ } });
850
+ Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
851
+ return codegen_1.nil;
852
+ } });
853
+ Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
854
+ return codegen_1.Name;
855
+ } });
856
+ Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
857
+ return codegen_1.CodeGen;
858
+ } });
859
+ var validation_error_1 = require_validation_error();
860
+ Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
861
+ return validation_error_1.default;
862
+ } });
863
+ var ref_error_1 = require_ref_error();
864
+ Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
865
+ return ref_error_1.default;
866
+ } });
867
+ }
868
+ });
869
+
870
+ // packages/installer/src/setup.ts
871
+ import path4 from "node:path";
872
+ import { homedir } from "node:os";
873
+ import { readFile as readFile2, rm as rm2 } from "node:fs/promises";
874
+
875
+ // packages/installer/src/native.ts
876
+ import path3 from "node:path";
877
+ import { cp, mkdir, readFile, rename, rm, chmod, realpath as realpath2 } from "node:fs/promises";
878
+
879
+ // packages/installer/src/package-source.ts
880
+ var import__ = __toESM(require__(), 1);
881
+ import path from "node:path";
882
+ import { lstat, realpath } from "node:fs/promises";
883
+ async function rejectLink(file) {
884
+ if ((await lstat(file)).isSymbolicLink())
885
+ throw new Fault("SYMLINK_NOT_ALLOWED", "Source and bundle inventories reject symlinks.", 2);
886
+ }
887
+ async function pluginAt(root) {
888
+ if (await exists(path.join(root, ".codex-plugin/plugin.json")) || await exists(path.join(root, "plugin.json")))
889
+ return root;
890
+ const plugins = path.join(root, "plugins");
891
+ if (!await exists(plugins)) return;
892
+ await rejectLink(plugins);
893
+ const plugin = path.join(plugins, "apexrest-apex");
894
+ if (!await exists(plugin)) return;
895
+ await rejectLink(plugin);
896
+ if (await exists(path.join(plugin, ".codex-plugin/plugin.json")) || await exists(path.join(plugin, "plugin.json")))
897
+ return plugin;
898
+ }
899
+ async function resolveNativePlugin(source) {
900
+ const candidates = source ? [path.resolve(source)] : [path.resolve(resourceRoot(), ".."), path.resolve(resourceRoot(), "../codex-compat")];
901
+ for (const candidate of candidates) {
902
+ if (!await exists(candidate)) continue;
903
+ const plugin = await pluginAt(await realpath(candidate));
904
+ if (plugin) return plugin;
905
+ }
906
+ throw new Fault(
907
+ "INVALID_PACKAGE",
908
+ "No APEXREST plugin bundle found. Set the source to a built plugin directory or its marketplace directory.",
909
+ 2
910
+ );
911
+ }
912
+ var nativeMarketplace = {
913
+ name: "apexrest",
914
+ interface: { displayName: "APEXREST" },
915
+ plugins: [
916
+ {
917
+ name: "apexrest-apex",
918
+ source: { source: "local", path: "./plugins/apexrest-apex" },
919
+ policy: { installation: "AVAILABLE", authentication: "ON_USE", products: ["codex"] },
920
+ category: "Productivity"
921
+ }
922
+ ]
923
+ };
924
+ async function validateNative(source) {
925
+ const root = await resolveNativePlugin(source);
926
+ await inventory(root);
927
+ const portable = await exists(path.join(root, "plugin.json"));
928
+ const manifest = await readJson(
929
+ path.join(root, portable ? "plugin.json" : ".codex-plugin/plugin.json")
930
+ );
931
+ if (manifest.name !== "apexrest-apex" || !/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/.test(manifest.version))
932
+ throw new Fault("INVALID_PACKAGE", "Invalid plugin identity or version.", 2);
933
+ const mcp = await readJson(path.join(root, portable ? "mcp.json" : ".mcp.json"));
934
+ if (!mcp.mcpServers.apexrest || Object.keys(mcp.mcpServers).length !== 1)
935
+ throw new Fault("INVALID_PACKAGE", "Package must expose exactly its own MCP server.", 2);
936
+ if (portable) {
937
+ const ajv = new import__.Ajv2020({ strict: false });
938
+ for (const [file, value] of [
939
+ ["plugin", manifest],
940
+ ["mcp", mcp]
941
+ ])
942
+ if (!ajv.validate(
943
+ await readJson(path.join(resourceRoot(), `schemas/vendor/${file}.schema.json`)),
944
+ value
945
+ ))
946
+ throw new Fault("MANIFEST_SCHEMA_INVALID", ajv.errorsText(), 2);
947
+ } else if (manifest.mcpServers !== "./.mcp.json")
948
+ throw new Fault("MANIFEST_SCHEMA_INVALID", "Compatibility manifest must use the companion .mcp.json.", 2);
949
+ for (const file of ["runtime/mcp.mjs", "runtime/apexrest.mjs", "skills/apexrest-setup/SKILL.md"])
950
+ if (!await exists(path.join(root, file))) throw new Fault("INCOMPLETE_PACKAGE", `Missing ${file}`, 2);
951
+ return { status: "valid", profile: portable ? "portable" : "codex-compat", version: manifest.version };
952
+ }
953
+
954
+ // packages/installer/src/registration.ts
955
+ import path2 from "node:path";
956
+ async function checkCodex(codexHome, codex = "codex") {
957
+ const result = await runProcess({
958
+ executable: codex,
959
+ args: ["--version"],
960
+ cwd: process.cwd(),
961
+ env: { ...process.env, CODEX_HOME: codexHome },
962
+ timeoutMs: 1e4
963
+ });
964
+ if (result.code !== 0 || result.timedOut || result.truncated || !/^codex-cli\s+\d+\./.test(result.stdout))
965
+ throw new Fault(
966
+ "DEPENDENCY_MISSING",
967
+ "A working Codex CLI is required for plugin setup. Install Codex, then preview setup again.",
968
+ 3,
969
+ "dependency_missing"
970
+ );
971
+ }
972
+ function codexInvoke(codexHome, cwd, codex = "codex") {
973
+ return async (args) => {
974
+ const result = await runProcess({
975
+ executable: codex,
976
+ args,
977
+ cwd,
978
+ env: { ...process.env, CODEX_HOME: codexHome },
979
+ timeoutMs: 6e4
980
+ });
981
+ if (result.timedOut || result.cancelled || result.truncated || result.code === null)
982
+ throw new Fault(
983
+ "CODEX_REGISTRATION_UNKNOWN",
984
+ "Codex did not return a complete result. Inspect the registration before retrying.",
985
+ 6,
986
+ "outcome_unknown"
987
+ );
988
+ if (result.code !== 0)
989
+ throw new Fault("CODEX_REGISTRATION_FAILED", result.stderr || result.stdout, 3, "blocked");
990
+ try {
991
+ return JSON.parse(result.stdout);
992
+ } catch {
993
+ throw new Fault(
994
+ "CODEX_REGISTRATION_UNKNOWN",
995
+ "Codex returned an invalid registration response.",
996
+ 6,
997
+ "outcome_unknown"
998
+ );
999
+ }
1000
+ };
1001
+ }
1002
+ async function listMarketplaces(invoke) {
1003
+ const result = await invoke(["plugin", "marketplace", "list", "--json"]);
1004
+ if (!Array.isArray(result.marketplaces) || result.marketplaces.some((m) => typeof m.name !== "string" || typeof m.root !== "string"))
1005
+ throw new Fault(
1006
+ "CODEX_REGISTRATION_UNKNOWN",
1007
+ "Codex returned an invalid marketplace listing.",
1008
+ 6,
1009
+ "outcome_unknown"
1010
+ );
1011
+ return result.marketplaces;
1012
+ }
1013
+ async function inspectRegistration(markets, home, codexHome, destination) {
1014
+ const entries = markets.filter((m) => m.name === "apexrest");
1015
+ const conflict = (reason) => {
1016
+ throw new Fault(
1017
+ "MARKETPLACE_OWNERSHIP_CONFLICT",
1018
+ `Cannot update the apexrest marketplace at ${entries[0]?.root ?? "(unknown)"} in ${codexHome}: ${reason} It was left unchanged. Select another Codex profile directory in Advanced options, or review this registration in Codex.`,
1019
+ 5,
1020
+ "conflict"
1021
+ );
1022
+ };
1023
+ if (entries.length > 1) conflict("more than one registration was found.");
1024
+ const existing = entries[0];
1025
+ if (!existing) return { action: "install", fingerprint: hash(canonical(markets)), markets };
1026
+ let version, files;
1027
+ try {
1028
+ if (existing.marketplaceSource && existing.marketplaceSource.sourceType !== "local")
1029
+ conflict("automatic migration supports a local APEXREST marketplace only.");
1030
+ const metadata = await readJson(path2.join(existing.root, ".agents/plugins/marketplace.json"));
1031
+ if (canonical(metadata) !== canonical(nativeMarketplace))
1032
+ conflict("its metadata does not identify the dedicated APEXREST marketplace.");
1033
+ const plugin = await resolveNativePlugin(existing.root);
1034
+ if (path2.relative(existing.root, plugin).split(path2.sep).join("/") !== "plugins/apexrest-apex")
1035
+ conflict("its plugin source is not the expected local bundle.");
1036
+ version = (await validateNative(plugin)).version;
1037
+ files = await inventory(plugin);
1038
+ } catch (error) {
1039
+ if (error instanceof Fault && error.code === "MARKETPLACE_OWNERSHIP_CONFLICT") throw error;
1040
+ conflict("its APEXREST plugin bundle could not be validated.");
1041
+ }
1042
+ const receipt = path2.join(home, "installation.json");
1043
+ const previous = await exists(receipt) ? await readJson(receipt) : void 0;
1044
+ const managed = existing.root === destination || existing.root === previous?.destination && previous?.codexHome === codexHome;
1045
+ return {
1046
+ action: managed ? "update" : "adopt",
1047
+ previousRoot: existing.root,
1048
+ previousVersion: version,
1049
+ fingerprint: hash(canonical({ markets, files })),
1050
+ markets
1051
+ };
1052
+ }
1053
+
1054
+ // packages/installer/src/native.ts
1055
+ async function installNative(r) {
1056
+ const source = await resolveNativePlugin(r.source);
1057
+ const payload = Object.fromEntries(
1058
+ Object.entries(await inventory(source)).map(([file, digest2]) => [
1059
+ "plugins/apexrest-apex/" + file,
1060
+ digest2
1061
+ ])
1062
+ );
1063
+ payload[".agents/plugins/marketplace.json"] = hash(JSON.stringify(nativeMarketplace, null, 2) + "\n");
1064
+ const copyDigest = hash(canonical(payload));
1065
+ const sourceMcpFile = await exists(path3.join(source, "plugin.json")) ? "mcp.json" : ".mcp.json";
1066
+ const sourceMcp = await readJson(path3.join(source, sourceMcpFile));
1067
+ const sourceServer = sourceMcp.mcpServers.apexrest;
1068
+ if (!sourceServer) throw new Fault("INVALID_PACKAGE", "Native package has no apexrest MCP server.", 2);
1069
+ sourceServer.command = "node";
1070
+ sourceServer.args = ["runtime/mcp.mjs"];
1071
+ delete sourceServer.env;
1072
+ payload["plugins/apexrest-apex/" + sourceMcpFile] = hash(JSON.stringify(sourceMcp, null, 2) + "\n");
1073
+ const digest = hash(canonical(payload));
1074
+ if (!r.dryRun) {
1075
+ await mkdir(r.home, { recursive: true, mode: 448 });
1076
+ await mkdir(r.codexHome, { recursive: true, mode: 448 });
1077
+ }
1078
+ const home = await exists(r.home) ? await realpath2(r.home) : path3.resolve(r.home);
1079
+ const codexHome = await exists(r.codexHome) ? await realpath2(r.codexHome) : path3.resolve(r.codexHome);
1080
+ const node = r.node ?? process.execPath;
1081
+ const destination = path3.join(home, "native", hash(canonical({ sourceDigest: digest, node, home })));
1082
+ const invoke = codexInvoke(codexHome, await exists(home) ? home : process.cwd(), r.codex);
1083
+ if (!await exists(codexHome)) await checkCodex(codexHome, r.codex);
1084
+ const inspect = async () => inspectRegistration(
1085
+ await exists(codexHome) ? await listMarketplaces(invoke) : [],
1086
+ home,
1087
+ codexHome,
1088
+ destination
1089
+ );
1090
+ const registration = await inspect();
1091
+ if (r.expectedRegistration && r.expectedRegistration !== registration.fingerprint)
1092
+ throw new Fault(
1093
+ "MARKETPLACE_CHANGED",
1094
+ "The Codex registration changed after setup preflight. Review setup again.",
1095
+ 5,
1096
+ "conflict"
1097
+ );
1098
+ if (r.dryRun)
1099
+ return {
1100
+ state: "planned",
1101
+ source,
1102
+ scope: "apexrest-plugin-only",
1103
+ sourceDigest: digest,
1104
+ destination,
1105
+ node,
1106
+ codexHome,
1107
+ registration
1108
+ };
1109
+ return withLock(path3.join(home, "install.lock"), async () => {
1110
+ await mkdir(codexHome, { recursive: true, mode: 448 });
1111
+ const config = path3.join(codexHome, "config.toml");
1112
+ const stamp = Date.now();
1113
+ const configBackup = path3.join(home, "config-before-install-" + stamp + ".toml");
1114
+ if (await exists(config)) await cp(config, configBackup);
1115
+ if (!await exists(destination)) {
1116
+ const staging = destination + ".staging";
1117
+ await rm(staging, { recursive: true, force: true });
1118
+ await mkdir(staging, { recursive: true, mode: 448 });
1119
+ await mkdir(path3.join(staging, "plugins"), { recursive: true });
1120
+ await cp(source, path3.join(staging, "plugins/apexrest-apex"), { recursive: true });
1121
+ await writeJson(path3.join(staging, ".agents/plugins/marketplace.json"), nativeMarketplace);
1122
+ if (hash(canonical(await inventory(staging))) !== copyDigest)
1123
+ throw new Fault("PACKAGE_COPY_INVALID", "Native package copy changed.", 5);
1124
+ await rename(staging, destination);
1125
+ }
1126
+ const root = path3.join(destination, "plugins/apexrest-apex");
1127
+ const portable = await exists(path3.join(root, "plugin.json"));
1128
+ const mcpPath = path3.join(root, portable ? "mcp.json" : ".mcp.json");
1129
+ const mcp = JSON.parse(await readFile(mcpPath, "utf8"));
1130
+ const server = mcp.mcpServers.apexrest;
1131
+ if (!server) throw new Fault("INVALID_PACKAGE", "Native package has no apexrest MCP server.", 2);
1132
+ server.command = node;
1133
+ server.args = [path3.join(root, "runtime/mcp.mjs")];
1134
+ server.env = { APEXREST_HOME: home };
1135
+ await writeJson(mcpPath, mcp);
1136
+ const current = await inspect();
1137
+ if (current.fingerprint !== registration.fingerprint)
1138
+ throw new Fault(
1139
+ "MARKETPLACE_CHANGED",
1140
+ "The Codex registration changed during setup. Nothing was re-registered; review setup again.",
1141
+ 5,
1142
+ "conflict"
1143
+ );
1144
+ const transition = path3.join(home, "registration-before-install-" + stamp + ".json");
1145
+ const previousListing = registration.previousRoot ? await invoke(["plugin", "list", "--marketplace", "apexrest", "--json"]) : void 0;
1146
+ const previousPlugin = previousListing?.installed?.find((plugin) => plugin.pluginId === "apexrest-apex@apexrest");
1147
+ const record = { registration, destination, codexHome, configBackup, previousListing };
1148
+ await writeJson(transition, { status: "prepared", ...record });
1149
+ let marketplace, installed, listing;
1150
+ const replacing = registration.previousRoot && registration.previousRoot !== destination;
1151
+ try {
1152
+ if (replacing) await invoke(["plugin", "marketplace", "remove", "apexrest", "--json"]);
1153
+ marketplace = await invoke(["plugin", "marketplace", "add", destination, "--json"]);
1154
+ installed = await invoke(["plugin", "add", "apexrest-apex@apexrest", "--json"]);
1155
+ const cached = installed.installedPath;
1156
+ if (!cached || canonical(await inventory(await contained(codexHome, cached))) !== canonical(await inventory(root)))
1157
+ throw new Fault("NATIVE_CACHE_MISMATCH", "Codex did not install the reviewed plugin files.", 5);
1158
+ listing = await invoke(["plugin", "list", "--marketplace", "apexrest", "--json"]);
1159
+ if (!listing.installed?.some(
1160
+ (plugin) => plugin.pluginId === "apexrest-apex@apexrest" && plugin.enabled
1161
+ ))
1162
+ throw new Fault(
1163
+ "NATIVE_PLUGIN_NOT_ENABLED",
1164
+ "Codex did not enable the installed APEXREST plugin.",
1165
+ 3
1166
+ );
1167
+ const after = await listMarketplaces(invoke);
1168
+ if (after.find((m) => m.name === "apexrest")?.root !== destination || canonical(after.filter((m) => m.name !== "apexrest")) !== canonical(registration.markets.filter((m) => m.name !== "apexrest")))
1169
+ throw new Fault(
1170
+ "MARKETPLACE_CHANGED",
1171
+ "Codex registration verification failed. Inspect the saved registration record before retrying.",
1172
+ 5,
1173
+ "conflict"
1174
+ );
1175
+ await writeJson(transition, { status: "registered", ...record });
1176
+ } catch (error) {
1177
+ let recovery = "needs-review";
1178
+ let unknown = error instanceof Fault && error.status === "outcome_unknown";
1179
+ if (replacing && !(error instanceof Fault && error.status === "outcome_unknown")) {
1180
+ try {
1181
+ const after = await listMarketplaces(invoke);
1182
+ const selected = after.find((m) => m.name === "apexrest");
1183
+ if (canonical(after.filter((m) => m.name !== "apexrest")) !== canonical(registration.markets.filter((m) => m.name !== "apexrest")) || (await inspectRegistration(registration.markets, home, codexHome, destination)).fingerprint !== registration.fingerprint)
1184
+ throw new Error("The prior registration or source changed externally.");
1185
+ if (selected && selected.root !== destination && selected.root !== registration.previousRoot)
1186
+ throw new Error("Registration changed externally.");
1187
+ if (selected?.root === destination)
1188
+ await invoke(["plugin", "marketplace", "remove", "apexrest", "--json"]);
1189
+ if (selected?.root !== registration.previousRoot)
1190
+ await invoke(["plugin", "marketplace", "add", registration.previousRoot, "--json"]);
1191
+ if (previousPlugin?.enabled) {
1192
+ const restored = await invoke(["plugin", "add", "apexrest-apex@apexrest", "--json"]);
1193
+ const previousRoot = await resolveNativePlugin(registration.previousRoot);
1194
+ if (!restored.installedPath || canonical(await inventory(await contained(codexHome, restored.installedPath))) !== canonical(await inventory(previousRoot)))
1195
+ throw new Error("The previous cached plugin could not be verified.");
1196
+ }
1197
+ if ((await listMarketplaces(invoke)).find((m) => m.name === "apexrest")?.root !== registration.previousRoot)
1198
+ throw new Error("The previous marketplace could not be verified.");
1199
+ recovery = previousPlugin?.enabled ? "previous-registration-restored" : "previous-marketplace-restored; plugin-state-needs-review";
1200
+ } catch (recoveryError) {
1201
+ unknown ||= recoveryError instanceof Fault && recoveryError.status === "outcome_unknown";
1202
+ recovery = unknown ? "outcome-unknown" : "needs-review";
1203
+ }
1204
+ } else if (error instanceof Fault && error.status === "outcome_unknown") recovery = "outcome-unknown";
1205
+ await writeJson(transition, { status: "failed", recovery, ...record });
1206
+ throw new Fault(
1207
+ error instanceof Fault ? error.code : "CODEX_REGISTRATION_FAILED",
1208
+ `${error instanceof Error ? error.message : "Registration failed."} Recovery: ${recovery}. Record: ${transition}`,
1209
+ unknown ? 6 : error instanceof Fault ? error.exitCode : 3,
1210
+ unknown ? "outcome_unknown" : error instanceof Fault ? error.status : "blocked"
1211
+ );
1212
+ }
1213
+ const state = {
1214
+ schemaVersion: 1,
1215
+ state: "registered",
1216
+ sourceDigest: digest,
1217
+ destination,
1218
+ root,
1219
+ node,
1220
+ codexHome,
1221
+ marketplace,
1222
+ installed,
1223
+ listing,
1224
+ registration: { ...registration, transition },
1225
+ actions: ["CODEX_RELOAD_REQUIRED", "NATIVE_HOST_VERIFICATION_REQUIRED"]
1226
+ };
1227
+ await writeJson(path3.join(home, "installation.json"), state);
1228
+ const cli = path3.join(root, "runtime/apexrest.mjs");
1229
+ const quote = (value) => "'" + value.replaceAll("'", `'"'"'`) + "'";
1230
+ await mkdir(path3.join(home, "bin"), { recursive: true });
1231
+ if (process.platform === "win32") {
1232
+ const ps = (value) => "'" + value.replaceAll("'", "''") + "'";
1233
+ await atomicWrite(
1234
+ path3.join(home, "bin/apexrest.ps1"),
1235
+ `$env:APEXREST_HOME=${ps(home)}
1236
+ & ${ps(node)} ${ps(cli)} @args
1237
+ exit $LASTEXITCODE
1238
+ `
1239
+ );
1240
+ } else {
1241
+ const launcher = path3.join(home, "bin/apexrest");
1242
+ await atomicWrite(
1243
+ launcher,
1244
+ `#!/bin/sh
1245
+ export APEXREST_HOME=${quote(home)}
1246
+ exec ${quote(node)} ${quote(cli)} "$@"
1247
+ `
1248
+ );
1249
+ await chmod(launcher, 448);
1250
+ }
1251
+ await writeJson(transition, { status: "completed", ...record });
1252
+ return state;
1253
+ });
1254
+ }
1255
+ async function installationState(home) {
1256
+ return readJson(path3.join(home, "installation.json"));
1257
+ }
1258
+
1259
+ // packages/installer/src/setup.ts
1260
+ async function setup(input) {
1261
+ const text = (key) => input[key];
1262
+ const home = path4.resolve(
1263
+ text("home") ?? (input.scope === "project" ? path4.join(text("project") ?? process.cwd(), ".apexrest/managed") : managedHome())
1264
+ );
1265
+ if (input.scope === "project") {
1266
+ await requireTrust(text("project") ?? process.cwd());
1267
+ throw new Fault(
1268
+ "PROJECT_HOST_SCOPE_UNAVAILABLE",
1269
+ "Codex 0.154.0 plugin add enables in the selected user profile. Use --scope user with a dedicated --codex-home until project-only enablement is verified.",
1270
+ 3,
1271
+ "blocked"
1272
+ );
1273
+ }
1274
+ const source = await resolveNativePlugin(text("from"));
1275
+ const validation = await validateNative(source);
1276
+ if (text("version") && text("version") !== validation.version)
1277
+ throw new Fault(
1278
+ "VERSION_MISMATCH",
1279
+ "Requested version does not match the supplied immutable package.",
1280
+ 2
1281
+ );
1282
+ const codexHome = path4.resolve(
1283
+ text("codexHome") ?? process.env.CODEX_HOME ?? path4.join(homedir(), ".codex")
1284
+ );
1285
+ const request = {
1286
+ home,
1287
+ ...text("cacheDir") ? { cacheDir: text("cacheDir") } : {},
1288
+ offline: Boolean(input.offline),
1289
+ dryRun: Boolean(input.dryRun),
1290
+ yes: Boolean(input.yes),
1291
+ nonInteractive: Boolean(input.nonInteractive),
1292
+ acceptOracleLicense: Boolean(input.acceptOracleLicense),
1293
+ skipBrowser: Boolean(input.skipBrowser),
1294
+ installOsDeps: Boolean(input.installOsDeps)
1295
+ };
1296
+ const existingRuntime = await runtimeState(home);
1297
+ const nativePlan = await installNative({
1298
+ source,
1299
+ home,
1300
+ codexHome,
1301
+ dryRun: true,
1302
+ node: existingRuntime.node ?? process.execPath
1303
+ });
1304
+ if (input.dryRun)
1305
+ return {
1306
+ status: "planned",
1307
+ package: validation,
1308
+ toolchain: input.nativeOnly ? { status: "not-requested", components: {} } : await new ToolchainService().plan(request),
1309
+ native: nativePlan
1310
+ };
1311
+ if (!input.yes)
1312
+ throw new Fault(
1313
+ "SETUP_APPROVAL_REQUIRED",
1314
+ "Use --dry-run to review, then --yes for technical installation steps.",
1315
+ 4,
1316
+ "needs-user-action"
1317
+ );
1318
+ const toolchain = input.nativeOnly ? { status: "not-requested", components: {} } : await new ToolchainService().apply(request);
1319
+ const runtime = await runtimeState(home);
1320
+ const native = await installNative({
1321
+ source,
1322
+ home,
1323
+ codexHome,
1324
+ node: runtime.node ?? process.execPath,
1325
+ expectedRegistration: nativePlan.registration.fingerprint
1326
+ });
1327
+ if (!("root" in native)) throw new Fault("INSTALL_NOT_COMPLETED", "Native install remained a plan.", 3);
1328
+ const mcp = JSON.parse(
1329
+ await readFile2(
1330
+ path4.join(native.root, validation.profile === "portable" ? "mcp.json" : ".mcp.json"),
1331
+ "utf8"
1332
+ )
1333
+ );
1334
+ const env = Object.fromEntries(
1335
+ Object.entries(process.env).filter((entry) => entry[1] !== void 0)
1336
+ );
1337
+ env.APEXREST_HOME = home;
1338
+ const client = new Client({ name: "apexrest-installer", version: VERSION });
1339
+ const transport = new StdioClientTransport({ ...mcp.mcpServers.apexrest, env, stderr: "pipe" });
1340
+ try {
1341
+ await client.connect(transport);
1342
+ await client.listTools();
1343
+ } finally {
1344
+ await client.close();
1345
+ }
1346
+ const result = {
1347
+ schemaVersion: 1,
1348
+ status: "needs-user-action",
1349
+ components: {
1350
+ ..."components" in toolchain ? toolchain.components : {},
1351
+ nativePlugin: "registered",
1352
+ mcp: "verified",
1353
+ database: "not-configured"
1354
+ },
1355
+ actions: [{ code: "CODEX_RELOAD_REQUIRED" }, { code: "DATABASE_CONNECTION_REQUIRED" }],
1356
+ native,
1357
+ toolchain
1358
+ };
1359
+ await writeJson(path4.join(home, "setup-result.json"), result);
1360
+ return result;
1361
+ }
1362
+ async function uninstallNative(home, keepRuntime) {
1363
+ const state = await installationState(home);
1364
+ const markets = await runProcess({
1365
+ executable: "codex",
1366
+ args: ["plugin", "marketplace", "list", "--json"],
1367
+ cwd: home,
1368
+ env: { ...process.env, CODEX_HOME: state.codexHome },
1369
+ timeoutMs: 3e4
1370
+ });
1371
+ const owned = markets.code === 0 && JSON.parse(markets.stdout).marketplaces.some(
1372
+ (m) => m.name === "apexrest" && m.root === state.destination
1373
+ );
1374
+ if (!owned)
1375
+ throw new Fault(
1376
+ "MARKETPLACE_OWNERSHIP_CONFLICT",
1377
+ "Current marketplace no longer belongs to this installation; nothing was removed.",
1378
+ 5
1379
+ );
1380
+ const result = await runProcess({
1381
+ executable: "codex",
1382
+ args: ["plugin", "remove", "apexrest-apex@apexrest"],
1383
+ cwd: home,
1384
+ env: { ...process.env, CODEX_HOME: state.codexHome },
1385
+ timeoutMs: 3e4
1386
+ });
1387
+ if (result.code !== 0) throw new Fault("UNINSTALL_FAILED", result.stderr, 3);
1388
+ const removal = await runProcess({
1389
+ executable: "codex",
1390
+ args: ["plugin", "marketplace", "remove", "apexrest"],
1391
+ cwd: home,
1392
+ env: { ...process.env, CODEX_HOME: state.codexHome },
1393
+ timeoutMs: 3e4
1394
+ });
1395
+ if (removal.code !== 0) throw new Fault("MARKETPLACE_REMOVE_FAILED", removal.stderr, 3);
1396
+ const listing = await runProcess({
1397
+ executable: "codex",
1398
+ args: ["plugin", "list", "--json"],
1399
+ cwd: home,
1400
+ env: { ...process.env, CODEX_HOME: state.codexHome },
1401
+ timeoutMs: 3e4
1402
+ });
1403
+ if (listing.code !== 0 || listing.stdout.includes("apexrest-apex@apexrest"))
1404
+ throw new Fault("UNINSTALL_UNCONFIRMED", "Codex still lists this plugin.", 3);
1405
+ const destination = await contained(home, state.destination);
1406
+ if (!keepRuntime) await rm2(destination, { recursive: true, force: true });
1407
+ await writeJson(path4.join(home, "uninstalled.json"), {
1408
+ at: (/* @__PURE__ */ new Date()).toISOString(),
1409
+ keepRuntime,
1410
+ sharedRuntimePreserved: true
1411
+ });
1412
+ return {
1413
+ status: "uninstalled",
1414
+ projectsPreserved: true,
1415
+ backupsPreserved: true,
1416
+ credentialsPreserved: true,
1417
+ sharedRuntimePreserved: true
1418
+ };
1419
+ }
1420
+ export {
1421
+ setup,
1422
+ uninstallNative,
1423
+ validateNative
1424
+ };