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.
- package/LICENSE +202 -0
- package/NOTICE +18 -0
- package/README.md +201 -0
- package/README.uk.md +201 -0
- package/dist/codex-compat/.agents/plugins/marketplace.json +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/.codex-plugin/plugin.json +32 -0
- package/dist/codex-compat/plugins/apexrest-apex/.mcp.json +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/LICENSE +202 -0
- package/dist/codex-compat/plugins/apexrest-apex/NOTICE +18 -0
- package/dist/codex-compat/plugins/apexrest-apex/assets/apexrest-icon.svg +27 -0
- package/dist/codex-compat/plugins/apexrest-apex/assets/apexrest-logo.svg +27 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/ords/OrdsBridge.java +323 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/LICENCE.txt +118 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/bulbasaur.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/charmander.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/mewtwo.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/pikachu.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/sources.json +36 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/assets/squirtle.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/index.html +68 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/panel.css +805 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/panel.js +951 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/auth.mjs +17 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/package-lock.json +57 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/playwright/package.json +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/references/ORACLE-LICENSE.txt +35 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/references/index.json +54432 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/references/oracle-snapshot.json +648 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/references/search.json +1 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/deploy-plan.schema.json +210 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/operations.schema.json +1721 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/policy.schema.json +63 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/project.schema.json +250 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/toolchain-lock.schema.json +118 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/vendor/mcp.schema.json +120 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/vendor/plugin.schema.json +65 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/README.md +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/README.uk.md +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/.apex/apexlang.json +3 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/application.apx +51 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/deployments/default.json +2 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/page-groups.apx +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p00000-global-page.apx +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p00001-home.apx +35 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/pages/p09999-login.apx +254 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/authentications.apx +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/authorizations.apx +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/breadcrumbs.apx +18 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/build-options.apx +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/component-settings.apx +92 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/lists.apx +81 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/lovs.apx +20 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-144-rounded.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-192.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-256-rounded.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-32.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-512.png +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/static-files.apx +25 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/shared-components/themes/universal-theme/theme.apx +57 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/supporting-objects/deinstall-script.sql +0 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/blank-app/application/supporting-objects/supporting-objects.apx +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/README.md +7 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/README.uk.md +7 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00010-customers.apx +164 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00020-dashboard.apx +54 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/apex-overlay/pages/p00080-customer.apx +332 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/migrations/0001__customers.sql +10 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/packages/0010__customer_api.sql +28 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/src/database/packages/0020__customer_validation_trigger.sql +10 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/tests/e2e/customer-crud.spec.mjs +25 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/customer-crm/project/tests/sql/test_customers.sql +49 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/database-control/install.sql +17 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/existing-app/README.md +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/templates/existing-app/README.uk.md +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/testkit/apex.mjs +58 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@hono__node-server__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@isaacs__fs-minipass__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@modelcontextprotocol__sdk__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@playwright__test__LICENSE +202 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@playwright__test__NOTICE +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@types__node__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@types__yauzl__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__LICENSE +55 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__NOTICE.txt +436 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__accepts__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ajv-formats__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ajv__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__body-parser__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__body-parser__node_modules__content-type__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__bytes__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__call-bind-apply-helpers__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__call-bound__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__chownr__LICENSE.md +63 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__content-disposition__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__content-type__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cookie-signature__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cookie__LICENSE +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cors__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__cross-spawn__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__debug__LICENSE +20 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__depd__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__dunder-proto__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ee-first__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__encodeurl__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-define-property__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-errors__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__es-object-atoms__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__esbuild__LICENSE.md +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__escape-html__LICENSE +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__etag__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__eventsource-parser__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__eventsource__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__express-rate-limit__license +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__express__LICENSE +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fast-deep-equal__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fast-uri__LICENSE +30 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fflate__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__finalhandler__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__forwarded__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__fresh__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__function-bind__LICENSE +20 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__get-intrinsic__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__get-proto__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__gopd__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__has-symbols__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__hasown__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__hono__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__http-errors__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__iconv-lite__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__inherits__LICENSE +16 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ip-address__LICENSE +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ipaddr.js__LICENSE +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__is-promise__LICENSE +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__isexe__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__jose__LICENSE.md +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__json-schema-traverse__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__json-schema-typed__LICENSE.md +57 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__marked__LICENSE +44 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__math-intrinsics__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__media-typer__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__merge-descriptors__license +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__mime-db__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__mime-types__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__minipass__LICENSE.md +55 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__minizlib__LICENSE +26 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__ms__license.md +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__negotiator__LICENSE +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__negotiator__node_modules__content-type__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__object-assign__license +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__object-inspect__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__on-finished__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__once__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__parseurl__LICENSE +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__path-key__license +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__path-to-regexp__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__pend__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__pkce-challenge__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright-core__LICENSE +202 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright-core__NOTICE +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright__LICENSE +202 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__playwright__NOTICE +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__prettier__LICENSE +7 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__proxy-addr__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__qs__LICENSE.md +29 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__range-parser__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__raw-body__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__require-from-string__license +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__router__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__safer-buffer__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__send__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__serve-static__LICENSE +25 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__setprototypeof__LICENSE +13 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__shebang-command__license +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__shebang-regex__license +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-list__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-map__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel-weakmap__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__side-channel__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__statuses__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__tar__LICENSE.md +55 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__toidentifier__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__type-is__LICENSE +23 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__type-is__node_modules__content-type__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__typescript__LICENSE +55 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__typescript__NOTICE.txt +436 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__undici-types__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__unpipe__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__vary__LICENSE +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__which__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__wrappy__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__yallist__LICENSE.md +63 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__yauzl__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__zod-to-json-schema__LICENSE +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__zod__LICENSE +21 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/compatibility.json +50 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/sources.lock.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/toolchains/toolchain.lock.json +204 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/apexrest.mjs +226 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-2SZCZZ3J.mjs +37111 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-2VGE5Y5J.mjs +994 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-3GSS6SJH.mjs +1424 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-5GOWABKB.mjs +409 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ARMO5ZAQ.mjs +25 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ED2YPDPS.mjs +1123 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-FPOEB42H.mjs +100 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-GFRSRK3K.mjs +16 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ICWYSHJ7.mjs +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-IPU64TJI.mjs +291 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-JWX4UQAZ.mjs +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-K3KT6RZY.mjs +1064 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-QLRGI23I.mjs +1307 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-RF4XQO6I.mjs +13 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-VPCUV5QA.mjs +237 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-WMJTK7ZB.mjs +201 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-WROK6RQH.mjs +200 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-XDJEGHUX.mjs +1179 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-YK34QNHH.mjs +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-Z6Y72JVG.mjs +37 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-ZQFJ2BNZ.mjs +329 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/mcp.mjs +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/SKILL.md +32 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/assets/p00020-filtered-components.apx +152 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/references/component-routes.md +35 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/references/native-dashboard.md +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-database/SKILL.md +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-database/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-debug/SKILL.md +11 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-debug/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-deploy/SKILL.md +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-deploy/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-install-dependencies/SKILL.md +38 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-install-dependencies/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/SKILL.md +27 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/references/cli-catalog.md +22 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-panel/SKILL.md +20 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-panel/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-project/SKILL.md +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-project/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-review/SKILL.md +9 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-review/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/SKILL.md +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-setup/references/ords.md +3 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-team/SKILL.md +24 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-team/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-test/SKILL.md +27 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-test/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-work/SKILL.md +17 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-work/agents/openai.yaml +7 -0
- package/dist/resources/ords/OrdsBridge.java +323 -0
- package/dist/resources/panel/assets/LICENCE.txt +118 -0
- package/dist/resources/panel/assets/bulbasaur.png +0 -0
- package/dist/resources/panel/assets/charmander.png +0 -0
- package/dist/resources/panel/assets/mewtwo.png +0 -0
- package/dist/resources/panel/assets/pikachu.png +0 -0
- package/dist/resources/panel/assets/sources.json +36 -0
- package/dist/resources/panel/assets/squirtle.png +0 -0
- package/dist/resources/panel/index.html +68 -0
- package/dist/resources/panel/panel.css +805 -0
- package/dist/resources/panel/panel.js +951 -0
- package/dist/resources/playwright/auth.mjs +17 -0
- package/dist/resources/playwright/package-lock.json +57 -0
- package/dist/resources/playwright/package.json +9 -0
- package/dist/resources/references/ORACLE-LICENSE.txt +35 -0
- package/dist/resources/references/index.json +54432 -0
- package/dist/resources/references/oracle-snapshot.json +648 -0
- package/dist/resources/references/search.json +1 -0
- package/dist/resources/schemas/deploy-plan.schema.json +210 -0
- package/dist/resources/schemas/operations.schema.json +1721 -0
- package/dist/resources/schemas/policy.schema.json +63 -0
- package/dist/resources/schemas/project.schema.json +250 -0
- package/dist/resources/schemas/toolchain-lock.schema.json +118 -0
- package/dist/resources/schemas/vendor/mcp.schema.json +120 -0
- package/dist/resources/schemas/vendor/plugin.schema.json +65 -0
- package/dist/resources/templates/blank-app/README.md +5 -0
- package/dist/resources/templates/blank-app/README.uk.md +5 -0
- package/dist/resources/templates/blank-app/application/.apex/apexlang.json +3 -0
- package/dist/resources/templates/blank-app/application/application.apx +51 -0
- package/dist/resources/templates/blank-app/application/deployments/default.json +2 -0
- package/dist/resources/templates/blank-app/application/page-groups.apx +4 -0
- package/dist/resources/templates/blank-app/application/pages/p00000-global-page.apx +4 -0
- package/dist/resources/templates/blank-app/application/pages/p00001-home.apx +35 -0
- package/dist/resources/templates/blank-app/application/pages/p09999-login.apx +254 -0
- package/dist/resources/templates/blank-app/application/shared-components/authentications.apx +5 -0
- package/dist/resources/templates/blank-app/application/shared-components/authorizations.apx +11 -0
- package/dist/resources/templates/blank-app/application/shared-components/breadcrumbs.apx +18 -0
- package/dist/resources/templates/blank-app/application/shared-components/build-options.apx +4 -0
- package/dist/resources/templates/blank-app/application/shared-components/component-settings.apx +92 -0
- package/dist/resources/templates/blank-app/application/shared-components/lists.apx +81 -0
- package/dist/resources/templates/blank-app/application/shared-components/lovs.apx +20 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-144-rounded.png +0 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-192.png +0 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-256-rounded.png +0 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-32.png +0 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files/icons/app-icon-512.png +0 -0
- package/dist/resources/templates/blank-app/application/shared-components/static-files.apx +25 -0
- package/dist/resources/templates/blank-app/application/shared-components/themes/universal-theme/theme.apx +57 -0
- package/dist/resources/templates/blank-app/application/supporting-objects/deinstall-script.sql +0 -0
- package/dist/resources/templates/blank-app/application/supporting-objects/supporting-objects.apx +9 -0
- package/dist/resources/templates/customer-crm/README.md +7 -0
- package/dist/resources/templates/customer-crm/README.uk.md +7 -0
- package/dist/resources/templates/customer-crm/apex-overlay/pages/p00010-customers.apx +164 -0
- package/dist/resources/templates/customer-crm/apex-overlay/pages/p00020-dashboard.apx +54 -0
- package/dist/resources/templates/customer-crm/apex-overlay/pages/p00080-customer.apx +332 -0
- package/dist/resources/templates/customer-crm/project/src/database/migrations/0001__customers.sql +10 -0
- package/dist/resources/templates/customer-crm/project/src/database/packages/0010__customer_api.sql +28 -0
- package/dist/resources/templates/customer-crm/project/src/database/packages/0020__customer_validation_trigger.sql +10 -0
- package/dist/resources/templates/customer-crm/project/tests/e2e/customer-crud.spec.mjs +25 -0
- package/dist/resources/templates/customer-crm/project/tests/sql/test_customers.sql +49 -0
- package/dist/resources/templates/database-control/install.sql +17 -0
- package/dist/resources/templates/existing-app/README.md +9 -0
- package/dist/resources/templates/existing-app/README.uk.md +9 -0
- package/dist/resources/testkit/apex.mjs +58 -0
- package/dist/resources/third-party/node_modules__@hono__node-server__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__@isaacs__fs-minipass__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__@modelcontextprotocol__sdk__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__@playwright__test__LICENSE +202 -0
- package/dist/resources/third-party/node_modules__@playwright__test__NOTICE +5 -0
- package/dist/resources/third-party/node_modules__@types__node__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__@types__yauzl__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__LICENSE +55 -0
- package/dist/resources/third-party/node_modules__@typescript__typescript-darwin-arm64__NOTICE.txt +436 -0
- package/dist/resources/third-party/node_modules__accepts__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__ajv-formats__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__ajv__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__body-parser__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__body-parser__node_modules__content-type__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__bytes__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__call-bind-apply-helpers__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__call-bound__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__chownr__LICENSE.md +63 -0
- package/dist/resources/third-party/node_modules__content-disposition__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__content-type__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__cookie-signature__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__cookie__LICENSE +24 -0
- package/dist/resources/third-party/node_modules__cors__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__cross-spawn__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__debug__LICENSE +20 -0
- package/dist/resources/third-party/node_modules__depd__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__dunder-proto__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__ee-first__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__encodeurl__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__es-define-property__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__es-errors__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__es-object-atoms__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__esbuild__LICENSE.md +21 -0
- package/dist/resources/third-party/node_modules__escape-html__LICENSE +24 -0
- package/dist/resources/third-party/node_modules__etag__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__eventsource-parser__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__eventsource__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__express-rate-limit__license +21 -0
- package/dist/resources/third-party/node_modules__express__LICENSE +24 -0
- package/dist/resources/third-party/node_modules__fast-deep-equal__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__fast-uri__LICENSE +30 -0
- package/dist/resources/third-party/node_modules__fflate__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__finalhandler__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__forwarded__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__fresh__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__function-bind__LICENSE +20 -0
- package/dist/resources/third-party/node_modules__get-intrinsic__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__get-proto__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__gopd__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__has-symbols__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__hasown__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__hono__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__http-errors__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__iconv-lite__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__inherits__LICENSE +16 -0
- package/dist/resources/third-party/node_modules__ip-address__LICENSE +19 -0
- package/dist/resources/third-party/node_modules__ipaddr.js__LICENSE +19 -0
- package/dist/resources/third-party/node_modules__is-promise__LICENSE +19 -0
- package/dist/resources/third-party/node_modules__isexe__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__jose__LICENSE.md +21 -0
- package/dist/resources/third-party/node_modules__json-schema-traverse__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__json-schema-typed__LICENSE.md +57 -0
- package/dist/resources/third-party/node_modules__marked__LICENSE +44 -0
- package/dist/resources/third-party/node_modules__math-intrinsics__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__media-typer__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__merge-descriptors__license +11 -0
- package/dist/resources/third-party/node_modules__mime-db__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__mime-types__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__minipass__LICENSE.md +55 -0
- package/dist/resources/third-party/node_modules__minizlib__LICENSE +26 -0
- package/dist/resources/third-party/node_modules__ms__license.md +21 -0
- package/dist/resources/third-party/node_modules__negotiator__LICENSE +24 -0
- package/dist/resources/third-party/node_modules__negotiator__node_modules__content-type__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__object-assign__license +21 -0
- package/dist/resources/third-party/node_modules__object-inspect__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__on-finished__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__once__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__parseurl__LICENSE +24 -0
- package/dist/resources/third-party/node_modules__path-key__license +9 -0
- package/dist/resources/third-party/node_modules__path-to-regexp__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__pend__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__pkce-challenge__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__playwright-core__LICENSE +202 -0
- package/dist/resources/third-party/node_modules__playwright-core__NOTICE +5 -0
- package/dist/resources/third-party/node_modules__playwright__LICENSE +202 -0
- package/dist/resources/third-party/node_modules__playwright__NOTICE +5 -0
- package/dist/resources/third-party/node_modules__prettier__LICENSE +7 -0
- package/dist/resources/third-party/node_modules__proxy-addr__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__qs__LICENSE.md +29 -0
- package/dist/resources/third-party/node_modules__range-parser__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__raw-body__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__require-from-string__license +21 -0
- package/dist/resources/third-party/node_modules__router__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__safer-buffer__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__send__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__serve-static__LICENSE +25 -0
- package/dist/resources/third-party/node_modules__setprototypeof__LICENSE +13 -0
- package/dist/resources/third-party/node_modules__shebang-command__license +9 -0
- package/dist/resources/third-party/node_modules__shebang-regex__license +9 -0
- package/dist/resources/third-party/node_modules__side-channel-list__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__side-channel-map__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__side-channel-weakmap__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__side-channel__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__statuses__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__tar__LICENSE.md +55 -0
- package/dist/resources/third-party/node_modules__toidentifier__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__type-is__LICENSE +23 -0
- package/dist/resources/third-party/node_modules__type-is__node_modules__content-type__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__typescript__LICENSE +55 -0
- package/dist/resources/third-party/node_modules__typescript__NOTICE.txt +436 -0
- package/dist/resources/third-party/node_modules__undici-types__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__unpipe__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__vary__LICENSE +22 -0
- package/dist/resources/third-party/node_modules__which__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__wrappy__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__yallist__LICENSE.md +63 -0
- package/dist/resources/third-party/node_modules__yauzl__LICENSE +21 -0
- package/dist/resources/third-party/node_modules__zod-to-json-schema__LICENSE +15 -0
- package/dist/resources/third-party/node_modules__zod__LICENSE +21 -0
- package/dist/resources/toolchains/compatibility.json +50 -0
- package/dist/resources/toolchains/sources.lock.json +14 -0
- package/dist/resources/toolchains/toolchain.lock.json +204 -0
- package/dist/runtime/apexrest.mjs +226 -0
- package/dist/runtime/chunk-2SZCZZ3J.mjs +37111 -0
- package/dist/runtime/chunk-2VGE5Y5J.mjs +994 -0
- package/dist/runtime/chunk-3GSS6SJH.mjs +1424 -0
- package/dist/runtime/chunk-5GOWABKB.mjs +409 -0
- package/dist/runtime/chunk-ARMO5ZAQ.mjs +25 -0
- package/dist/runtime/chunk-ED2YPDPS.mjs +1123 -0
- package/dist/runtime/chunk-FPOEB42H.mjs +100 -0
- package/dist/runtime/chunk-GFRSRK3K.mjs +16 -0
- package/dist/runtime/chunk-ICWYSHJ7.mjs +19 -0
- package/dist/runtime/chunk-IPU64TJI.mjs +291 -0
- package/dist/runtime/chunk-JWX4UQAZ.mjs +14 -0
- package/dist/runtime/chunk-K3KT6RZY.mjs +1064 -0
- package/dist/runtime/chunk-QLRGI23I.mjs +1307 -0
- package/dist/runtime/chunk-RF4XQO6I.mjs +13 -0
- package/dist/runtime/chunk-VPCUV5QA.mjs +237 -0
- package/dist/runtime/chunk-WMJTK7ZB.mjs +201 -0
- package/dist/runtime/chunk-WROK6RQH.mjs +200 -0
- package/dist/runtime/chunk-XDJEGHUX.mjs +1179 -0
- package/dist/runtime/chunk-YK34QNHH.mjs +15 -0
- package/dist/runtime/chunk-Z6Y72JVG.mjs +37 -0
- package/dist/runtime/chunk-ZQFJ2BNZ.mjs +329 -0
- package/dist/runtime/mcp.mjs +15 -0
- package/package.json +70 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
browserInstructions,
|
|
4
|
+
externalBrowserCommand,
|
|
5
|
+
openVerificationBrowser
|
|
6
|
+
} from "./chunk-QLRGI23I.mjs";
|
|
7
|
+
import "./chunk-2SZCZZ3J.mjs";
|
|
8
|
+
import "./chunk-IPU64TJI.mjs";
|
|
9
|
+
export {
|
|
10
|
+
browserInstructions,
|
|
11
|
+
externalBrowserCommand,
|
|
12
|
+
openVerificationBrowser
|
|
13
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
recordedExecutionMode,
|
|
4
|
+
resolveWorkRequest,
|
|
5
|
+
teamMessageSchema,
|
|
6
|
+
teamStartSchema
|
|
7
|
+
} from "./chunk-QLRGI23I.mjs";
|
|
8
|
+
import {
|
|
9
|
+
external_exports,
|
|
10
|
+
parse,
|
|
11
|
+
requireTrust
|
|
12
|
+
} from "./chunk-2SZCZZ3J.mjs";
|
|
13
|
+
import {
|
|
14
|
+
Fault,
|
|
15
|
+
canonical,
|
|
16
|
+
contained,
|
|
17
|
+
exists,
|
|
18
|
+
hash,
|
|
19
|
+
hashFile,
|
|
20
|
+
readJson,
|
|
21
|
+
withLock,
|
|
22
|
+
writeJson
|
|
23
|
+
} from "./chunk-IPU64TJI.mjs";
|
|
24
|
+
|
|
25
|
+
// packages/core/src/team-source.ts
|
|
26
|
+
import path from "node:path";
|
|
27
|
+
import { readdir, readlink } from "node:fs/promises";
|
|
28
|
+
async function teamSourceDigest(root) {
|
|
29
|
+
const files = {};
|
|
30
|
+
let count = 0;
|
|
31
|
+
const walk = async (relative) => {
|
|
32
|
+
for (const entry of await readdir(path.join(root, relative), { withFileTypes: true })) {
|
|
33
|
+
if ([".git", ".apexrest", "node_modules", ".DS_Store"].includes(entry.name)) continue;
|
|
34
|
+
const name = path.join(relative, entry.name), file = path.join(root, name);
|
|
35
|
+
if (++count > 2e4)
|
|
36
|
+
throw new Fault("TEAM_SOURCE_LIMIT", "The team source inventory exceeds 20000 entries.", 2);
|
|
37
|
+
if (entry.isDirectory()) await walk(name);
|
|
38
|
+
else if (entry.isSymbolicLink()) files[name] = "link:" + await readlink(file);
|
|
39
|
+
else if (entry.isFile()) files[name] = await hashFile(file);
|
|
40
|
+
else throw new Fault("TEAM_SOURCE_TYPE", "The team workspace contains an unsupported special file.", 2);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
await walk("");
|
|
44
|
+
return hash(canonical(files));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// packages/core/src/team.ts
|
|
48
|
+
import path2 from "node:path";
|
|
49
|
+
import { fileURLToPath } from "node:url";
|
|
50
|
+
import { spawn } from "node:child_process";
|
|
51
|
+
import { randomUUID } from "node:crypto";
|
|
52
|
+
import { readdir as readdir2 } from "node:fs/promises";
|
|
53
|
+
var teamActive = /* @__PURE__ */ new Set(["queued", "running", "cancelling"]);
|
|
54
|
+
var teamRuntime = () => path2.join(path2.dirname(fileURLToPath(import.meta.url)), "apexrest.mjs");
|
|
55
|
+
function currentSessionHandoff(state) {
|
|
56
|
+
return {
|
|
57
|
+
teamId: state.id,
|
|
58
|
+
executionMode: "single",
|
|
59
|
+
executionHost: "current_session",
|
|
60
|
+
browserMode: state.browserMode ?? "codex",
|
|
61
|
+
status: state.status,
|
|
62
|
+
nextAction: state.status !== "current_session" ? "This request has ended. Inspect its recorded status; do not resume it automatically." : "Implement and verify directly in this Codex chat using its context/model. No new agents, App Server, team polling or automatic panel. " + (state.sandbox === "read-only" ? "This request is read-only; do not edit files. " : "") + "Keep host permissions and deployment safeguards. This receipt is not completion; report results and handle steering here."
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
var TeamService = class {
|
|
66
|
+
constructor(ctx) {
|
|
67
|
+
this.ctx = ctx;
|
|
68
|
+
}
|
|
69
|
+
ctx;
|
|
70
|
+
async directory(id) {
|
|
71
|
+
parse(external_exports.uuid(), id);
|
|
72
|
+
return contained(this.ctx.root, ".apexrest/teams/" + id);
|
|
73
|
+
}
|
|
74
|
+
async start(input, id = randomUUID()) {
|
|
75
|
+
await requireTrust(this.ctx.root);
|
|
76
|
+
if (process.env.APEXREST_TEAM_WORKER === "1")
|
|
77
|
+
throw new Fault("TEAM_RECURSION", "Team workers cannot create another team.", 2);
|
|
78
|
+
const request = await resolveWorkRequest(this.ctx.root, parse(teamStartSchema, input));
|
|
79
|
+
const root = await this.directory(id);
|
|
80
|
+
if (await exists(path2.join(root, "request.json")))
|
|
81
|
+
throw new Fault(
|
|
82
|
+
"TEAM_ALREADY_STARTED",
|
|
83
|
+
"This team request already exists; inspect its status.",
|
|
84
|
+
5,
|
|
85
|
+
"conflict"
|
|
86
|
+
);
|
|
87
|
+
await writeJson(path2.join(root, "request.json"), {
|
|
88
|
+
...request,
|
|
89
|
+
project: this.ctx.root,
|
|
90
|
+
multiAgentEnabled: request.executionMode === "team"
|
|
91
|
+
});
|
|
92
|
+
const state = {
|
|
93
|
+
id,
|
|
94
|
+
executionMode: request.executionMode,
|
|
95
|
+
executionHost: request.executionMode === "single" ? "current_session" : "worker",
|
|
96
|
+
sandbox: request.sandbox,
|
|
97
|
+
browserMode: request.browserMode,
|
|
98
|
+
status: request.executionMode === "single" ? "current_session" : "queued",
|
|
99
|
+
phase: "queued",
|
|
100
|
+
revision: 0,
|
|
101
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
102
|
+
members: [],
|
|
103
|
+
messages: [],
|
|
104
|
+
result: "",
|
|
105
|
+
diagnostics: [],
|
|
106
|
+
reviews: [],
|
|
107
|
+
qa: []
|
|
108
|
+
};
|
|
109
|
+
await writeJson(path2.join(root, "state.json"), state);
|
|
110
|
+
if (state.executionHost === "current_session") return currentSessionHandoff(state);
|
|
111
|
+
const worker = spawn(process.execPath, [teamRuntime(), "--team-worker", this.ctx.root, id], {
|
|
112
|
+
cwd: this.ctx.root,
|
|
113
|
+
env: process.env,
|
|
114
|
+
detached: true,
|
|
115
|
+
stdio: "ignore",
|
|
116
|
+
windowsHide: true
|
|
117
|
+
});
|
|
118
|
+
try {
|
|
119
|
+
await new Promise((resolve, reject) => {
|
|
120
|
+
worker.once("spawn", resolve);
|
|
121
|
+
worker.once("error", reject);
|
|
122
|
+
});
|
|
123
|
+
worker.unref();
|
|
124
|
+
} catch {
|
|
125
|
+
const state2 = await this.status(id);
|
|
126
|
+
await writeJson(path2.join(root, "state.json"), {
|
|
127
|
+
...state2,
|
|
128
|
+
status: "blocked",
|
|
129
|
+
diagnostics: ["Team worker could not start."]
|
|
130
|
+
});
|
|
131
|
+
throw new Fault("TEAM_START_FAILED", "Team worker could not start.", 3, "blocked");
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
teamId: id,
|
|
135
|
+
executionHost: "worker",
|
|
136
|
+
executionMode: request.executionMode,
|
|
137
|
+
browserMode: request.browserMode,
|
|
138
|
+
status: "queued",
|
|
139
|
+
nextAction: "Use team status for progress and verification evidence; team message sends task updates; team cancel requests a stop."
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
async status(id) {
|
|
143
|
+
const state = await readJson(path2.join(await this.directory(id), "state.json"));
|
|
144
|
+
state.executionMode = recordedExecutionMode(state);
|
|
145
|
+
if (teamActive.has(state.status) && Date.parse(state.updatedAt) + 6e4 < Date.now())
|
|
146
|
+
return {
|
|
147
|
+
...state,
|
|
148
|
+
status: "outcome_unknown",
|
|
149
|
+
diagnostics: [
|
|
150
|
+
...state.diagnostics,
|
|
151
|
+
"Worker heartbeat expired. Inspect changes before starting another team."
|
|
152
|
+
]
|
|
153
|
+
};
|
|
154
|
+
return state;
|
|
155
|
+
}
|
|
156
|
+
async snapshot(id) {
|
|
157
|
+
const state = await this.status(id);
|
|
158
|
+
const single = state.executionMode === "single";
|
|
159
|
+
if (state.status === "completed" && (single ? state.completedDigest : state.approvedDigest) !== await teamSourceDigest(this.ctx.root)) {
|
|
160
|
+
state.status = single ? "result_stale" : "review_stale";
|
|
161
|
+
state.diagnostics.push(
|
|
162
|
+
single ? "Project files changed after verification. Verify the new source." : "Project files changed after approval. Run the full review cycle for the new source."
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
...state,
|
|
167
|
+
observations: state.observations?.slice(-8).map((entry) => ({ ...entry, detail: entry.detail.slice(0, 200) })),
|
|
168
|
+
result: state.result.slice(0, 4e3),
|
|
169
|
+
members: state.members.map((m) => ({ ...m, result: m.result.slice(-800) })),
|
|
170
|
+
messages: state.messages.slice(-10).map((m) => ({ ...m, text: m.text.slice(0, 160) })),
|
|
171
|
+
reviews: state.reviews.slice(-6).map((r) => ({
|
|
172
|
+
...r,
|
|
173
|
+
report: {
|
|
174
|
+
...r.report,
|
|
175
|
+
summary: r.report.summary.slice(0, 400),
|
|
176
|
+
findings: r.report.findings.slice(0, 3).map((f) => f.slice(0, 200))
|
|
177
|
+
}
|
|
178
|
+
})),
|
|
179
|
+
qa: state.qa.slice(-3).map((q) => ({
|
|
180
|
+
...q,
|
|
181
|
+
report: {
|
|
182
|
+
...q.report,
|
|
183
|
+
summary: q.report.summary.slice(0, 400),
|
|
184
|
+
checks: q.report.checks.slice(0, 4).map((c) => ({ ...c, name: c.name.slice(0, 100), evidence: c.evidence.slice(0, 200) }))
|
|
185
|
+
}
|
|
186
|
+
})),
|
|
187
|
+
verification: (state.verification ?? []).slice(-3).map((v) => ({
|
|
188
|
+
...v,
|
|
189
|
+
report: {
|
|
190
|
+
...v.report,
|
|
191
|
+
summary: v.report.summary.slice(0, 400),
|
|
192
|
+
checks: v.report.checks.slice(0, 4).map((c) => ({ ...c, name: c.name.slice(0, 100), evidence: c.evidence.slice(0, 200) }))
|
|
193
|
+
}
|
|
194
|
+
})),
|
|
195
|
+
fullReport: ".apexrest/teams/" + id + "/state.json"
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
async message(id, message) {
|
|
199
|
+
await requireTrust(this.ctx.root);
|
|
200
|
+
parse(teamMessageSchema, { id, message });
|
|
201
|
+
const root = await this.directory(id);
|
|
202
|
+
return withLock(path2.join(root, "control.lock"), async () => {
|
|
203
|
+
if (!teamActive.has((await this.status(id)).status))
|
|
204
|
+
throw new Fault("TEAM_FINISHED", "This team has ended; its result remains available.", 5, "conflict");
|
|
205
|
+
const queue = await exists(path2.join(root, "inbox")) ? await readdir2(path2.join(root, "inbox")) : [];
|
|
206
|
+
if (queue.length >= 100)
|
|
207
|
+
throw new Fault("TEAM_MESSAGE_LIMIT", "This team reached its message limit.", 2);
|
|
208
|
+
const messageId = randomUUID();
|
|
209
|
+
await writeJson(await contained(root, "inbox/" + messageId + ".json"), { id: messageId, message });
|
|
210
|
+
return {
|
|
211
|
+
teamId: id,
|
|
212
|
+
messageId,
|
|
213
|
+
status: "queued",
|
|
214
|
+
nextAction: "Team status reports delivery. A task change invalidates earlier approvals."
|
|
215
|
+
};
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
async cancel(id) {
|
|
219
|
+
await requireTrust(this.ctx.root);
|
|
220
|
+
const root = await this.directory(id);
|
|
221
|
+
return withLock(path2.join(root, "control.lock"), async () => {
|
|
222
|
+
if (!teamActive.has((await this.status(id)).status)) return this.snapshot(id);
|
|
223
|
+
await writeJson(path2.join(root, "cancel.json"), {
|
|
224
|
+
requestedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
225
|
+
});
|
|
226
|
+
return { teamId: id, status: "cancellation_requested", rollbackConfirmed: false };
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export {
|
|
232
|
+
teamSourceDigest,
|
|
233
|
+
teamActive,
|
|
234
|
+
teamRuntime,
|
|
235
|
+
currentSessionHandoff,
|
|
236
|
+
TeamService
|
|
237
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
PanelService,
|
|
4
|
+
panelActionSchema
|
|
5
|
+
} from "./chunk-5GOWABKB.mjs";
|
|
6
|
+
import {
|
|
7
|
+
teamRuntime
|
|
8
|
+
} from "./chunk-VPCUV5QA.mjs";
|
|
9
|
+
import {
|
|
10
|
+
parse,
|
|
11
|
+
resourceRoot
|
|
12
|
+
} from "./chunk-2SZCZZ3J.mjs";
|
|
13
|
+
import {
|
|
14
|
+
Fault,
|
|
15
|
+
contained,
|
|
16
|
+
exists,
|
|
17
|
+
failure,
|
|
18
|
+
readJson,
|
|
19
|
+
withLock,
|
|
20
|
+
writeJson
|
|
21
|
+
} from "./chunk-IPU64TJI.mjs";
|
|
22
|
+
|
|
23
|
+
// packages/core/src/panel-server.ts
|
|
24
|
+
import path from "node:path";
|
|
25
|
+
import { createServer } from "node:http";
|
|
26
|
+
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
27
|
+
import { readFile } from "node:fs/promises";
|
|
28
|
+
import { spawn } from "node:child_process";
|
|
29
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
30
|
+
function validSession(value) {
|
|
31
|
+
const s = value;
|
|
32
|
+
return !!s && Number.isInteger(s.port) && s.port > 0 && s.port < 65536 && typeof s.token === "string" && /^[a-f0-9]{64}$/.test(s.token) && typeof s.project === "string";
|
|
33
|
+
}
|
|
34
|
+
async function panelDocument() {
|
|
35
|
+
const root = path.join(resourceRoot(), "panel");
|
|
36
|
+
const [html, css, js] = await Promise.all(
|
|
37
|
+
["index.html", "panel.css", "panel.js"].map((file) => readFile(path.join(root, file), "utf8"))
|
|
38
|
+
);
|
|
39
|
+
return html.replace('<link rel="stylesheet" href="/panel.css">', () => "<style>" + css + "</style>").replace('<script src="/panel.js" defer></script>', "").replace("</body>", () => "<script>" + js.replaceAll("</script", "<\\/script") + "</script>\n</body>");
|
|
40
|
+
}
|
|
41
|
+
async function startPanelServer(root, idleMs = 36e5) {
|
|
42
|
+
const token = randomBytes(32).toString("hex");
|
|
43
|
+
const service = new PanelService(root);
|
|
44
|
+
let lastRequest = Date.now(), origin = "";
|
|
45
|
+
const server = createServer(async (req, res) => {
|
|
46
|
+
res.setHeader("Cache-Control", "no-store");
|
|
47
|
+
res.setHeader("X-Content-Type-Options", "nosniff");
|
|
48
|
+
res.setHeader("Referrer-Policy", "no-referrer");
|
|
49
|
+
res.setHeader(
|
|
50
|
+
"Content-Security-Policy",
|
|
51
|
+
"default-src 'self'; script-src 'self'; style-src 'self'; connect-src 'self'; img-src 'self' data:; frame-ancestors 'self'"
|
|
52
|
+
);
|
|
53
|
+
const json = (status, data) => {
|
|
54
|
+
res.writeHead(status, { "Content-Type": "application/json" });
|
|
55
|
+
res.end(JSON.stringify(data));
|
|
56
|
+
};
|
|
57
|
+
try {
|
|
58
|
+
if (req.headers.host !== origin.slice(7) || req.headers.origin && req.headers.origin !== origin) {
|
|
59
|
+
json(403, { error: "Origin rejected." });
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const url = new URL(req.url ?? "/", origin);
|
|
63
|
+
const assets = {
|
|
64
|
+
"/": ["index.html", "text/html; charset=utf-8"],
|
|
65
|
+
"/panel.css": ["panel.css", "text/css; charset=utf-8"],
|
|
66
|
+
"/panel.js": ["panel.js", "text/javascript; charset=utf-8"]
|
|
67
|
+
};
|
|
68
|
+
if (req.method === "GET" && assets[url.pathname]) {
|
|
69
|
+
const [file, type] = assets[url.pathname];
|
|
70
|
+
res.writeHead(200, { "Content-Type": type });
|
|
71
|
+
res.end(await readFile(path.join(resourceRoot(), "panel", file)));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const supplied = Buffer.from(String(req.headers.authorization ?? "").replace(/^Bearer /, ""));
|
|
75
|
+
if (supplied.length !== token.length || !timingSafeEqual(supplied, Buffer.from(token))) {
|
|
76
|
+
json(401, { error: "Open this panel from Codex to authorize the local session." });
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
lastRequest = Date.now();
|
|
80
|
+
if (req.method === "GET" && url.pathname === "/health") {
|
|
81
|
+
json(200, { project: root });
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (req.method === "GET" && url.pathname === "/api/status") {
|
|
85
|
+
json(200, await service.snapshot(url.searchParams.get("team") ?? void 0));
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (req.method === "POST" && url.pathname === "/api/action") {
|
|
89
|
+
if (req.headers["content-type"] !== "application/json") {
|
|
90
|
+
json(415, { error: "Expected JSON." });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const chunks = [];
|
|
94
|
+
let bytes = 0;
|
|
95
|
+
for await (const chunk of req) {
|
|
96
|
+
bytes += chunk.length;
|
|
97
|
+
if (bytes > 32768) {
|
|
98
|
+
json(413, { error: "Request too large." });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
chunks.push(chunk);
|
|
102
|
+
}
|
|
103
|
+
const { action } = parse(panelActionSchema, {
|
|
104
|
+
action: JSON.parse(Buffer.concat(chunks).toString("utf8"))
|
|
105
|
+
});
|
|
106
|
+
json(200, await service.act(action));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
json(404, { error: "Not found." });
|
|
110
|
+
} catch (error) {
|
|
111
|
+
json(400, failure("panel", error));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
server.requestTimeout = 15e3;
|
|
115
|
+
server.headersTimeout = 1e4;
|
|
116
|
+
await new Promise((resolve, reject) => {
|
|
117
|
+
server.once("error", reject);
|
|
118
|
+
server.listen(0, "127.0.0.1", resolve);
|
|
119
|
+
});
|
|
120
|
+
const address = server.address();
|
|
121
|
+
if (!address || typeof address === "string") throw new Error("Panel could not bind localhost.");
|
|
122
|
+
origin = `http://127.0.0.1:${address.port}`;
|
|
123
|
+
const timer = setInterval(
|
|
124
|
+
() => {
|
|
125
|
+
if (Date.now() - lastRequest > idleMs) void close();
|
|
126
|
+
},
|
|
127
|
+
Math.min(idleMs, 6e4)
|
|
128
|
+
);
|
|
129
|
+
const close = () => {
|
|
130
|
+
clearInterval(timer);
|
|
131
|
+
server.closeIdleConnections();
|
|
132
|
+
return new Promise((resolve) => server.close(() => resolve()));
|
|
133
|
+
};
|
|
134
|
+
return {
|
|
135
|
+
session: { port: address.port, token, project: root, pid: process.pid },
|
|
136
|
+
close
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
async function servePanel(root) {
|
|
140
|
+
const handle = await startPanelServer(root);
|
|
141
|
+
await writeJson(await contained(root, ".apexrest/panel/session.json"), handle.session);
|
|
142
|
+
process.once("SIGTERM", () => {
|
|
143
|
+
void handle.close();
|
|
144
|
+
});
|
|
145
|
+
process.once("SIGINT", () => {
|
|
146
|
+
void handle.close();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async function openPanel(root) {
|
|
150
|
+
const file = await contained(root, ".apexrest/panel/session.json");
|
|
151
|
+
const read = async () => {
|
|
152
|
+
if (!await exists(file)) return null;
|
|
153
|
+
const session = await readJson(file).catch(() => null);
|
|
154
|
+
if (!validSession(session) || session.project !== root) return null;
|
|
155
|
+
try {
|
|
156
|
+
const response = await fetch(`http://127.0.0.1:${session.port}/health`, {
|
|
157
|
+
headers: { Authorization: "Bearer " + session.token },
|
|
158
|
+
redirect: "error",
|
|
159
|
+
signal: AbortSignal.timeout(1e3)
|
|
160
|
+
});
|
|
161
|
+
if (response.ok && (await response.json()).project === root) return session;
|
|
162
|
+
} catch {
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
};
|
|
166
|
+
return withLock(await contained(root, ".apexrest/panel/start.lock"), async () => {
|
|
167
|
+
let session = await read();
|
|
168
|
+
if (!session) {
|
|
169
|
+
const worker = spawn(process.execPath, [teamRuntime(), "--panel-worker", root], {
|
|
170
|
+
cwd: root,
|
|
171
|
+
env: process.env,
|
|
172
|
+
detached: true,
|
|
173
|
+
stdio: "ignore",
|
|
174
|
+
windowsHide: true
|
|
175
|
+
});
|
|
176
|
+
await new Promise((resolve, reject) => {
|
|
177
|
+
worker.once("spawn", resolve);
|
|
178
|
+
worker.once("error", reject);
|
|
179
|
+
});
|
|
180
|
+
worker.unref();
|
|
181
|
+
for (let i = 0; i < 50 && !session; i++) {
|
|
182
|
+
await delay(100);
|
|
183
|
+
session = await read();
|
|
184
|
+
}
|
|
185
|
+
if (!session)
|
|
186
|
+
throw new Fault("PANEL_START_FAILED", "The local panel did not become ready.", 3, "blocked");
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
project: root,
|
|
190
|
+
url: `http://127.0.0.1:${session.port}/#session=${session.token}`,
|
|
191
|
+
nextAction: "Open this URL in the Codex in-app browser using open_in_codex when available. Codex CLI: apexrest panel tui --project PATH."
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
panelDocument,
|
|
198
|
+
startPanelServer,
|
|
199
|
+
servePanel,
|
|
200
|
+
openPanel
|
|
201
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
clip,
|
|
4
|
+
paint,
|
|
5
|
+
wrap
|
|
6
|
+
} from "./chunk-ZQFJ2BNZ.mjs";
|
|
7
|
+
import {
|
|
8
|
+
teamLabel
|
|
9
|
+
} from "./chunk-GFRSRK3K.mjs";
|
|
10
|
+
import {
|
|
11
|
+
PanelService
|
|
12
|
+
} from "./chunk-5GOWABKB.mjs";
|
|
13
|
+
import "./chunk-VPCUV5QA.mjs";
|
|
14
|
+
import "./chunk-QLRGI23I.mjs";
|
|
15
|
+
import "./chunk-Z6Y72JVG.mjs";
|
|
16
|
+
import "./chunk-2SZCZZ3J.mjs";
|
|
17
|
+
import {
|
|
18
|
+
Fault
|
|
19
|
+
} from "./chunk-IPU64TJI.mjs";
|
|
20
|
+
|
|
21
|
+
// packages/cli/src/panel-tui.ts
|
|
22
|
+
import { emitKeypressEvents } from "node:readline";
|
|
23
|
+
function panelLines(data, tab) {
|
|
24
|
+
const team = data.team;
|
|
25
|
+
if (tab === 3)
|
|
26
|
+
return [
|
|
27
|
+
`Database network: ${data.sqlcl.databaseTransport === "ords" ? "ORDS HTTP(S)" : "Direct Oracle listener"}`,
|
|
28
|
+
`SQLcl execution: ${data.sqlcl.mode.toUpperCase()} \xB7 restriction ${data.sqlcl.mcpRestrictLevel}`,
|
|
29
|
+
`Trusted: ${data.trusted} \xB7 configured: ${data.configured}`,
|
|
30
|
+
"Future work defaults: " + JSON.stringify(data.preferences),
|
|
31
|
+
"Model selection: Auto (task complexity and implementation repair results; no manual override).",
|
|
32
|
+
...JSON.stringify(
|
|
33
|
+
{
|
|
34
|
+
project: data.configuration,
|
|
35
|
+
toolchain: data.toolchain,
|
|
36
|
+
connections: data.connections,
|
|
37
|
+
authorization: data.permissions
|
|
38
|
+
},
|
|
39
|
+
null,
|
|
40
|
+
2
|
|
41
|
+
).split("\n")
|
|
42
|
+
];
|
|
43
|
+
if (tab === 2)
|
|
44
|
+
return [
|
|
45
|
+
"APEX OPERATIONS",
|
|
46
|
+
...data.jobs.flatMap((job) => [`${job.operation} \xB7 ${job.status}`, job.summary]),
|
|
47
|
+
...data.jobs.length ? [] : ["No operation jobs recorded."],
|
|
48
|
+
"",
|
|
49
|
+
"DEPLOYMENT & IMPORT JOURNAL",
|
|
50
|
+
...data.deployments.flatMap((run) => [run.status + " \xB7 " + run.at, run.details]),
|
|
51
|
+
"",
|
|
52
|
+
"Commands: apexrest apex validate \xB7 apexrest test unit \xB7 apexrest deploy plan --env NAME --out PATH",
|
|
53
|
+
"Existing project trust and deployment authorization remain required."
|
|
54
|
+
];
|
|
55
|
+
const lines = [
|
|
56
|
+
team ? `${team.executionMode === "single" ? "SINGLE AGENT" : "TEAM"} \xB7 ${team.status} \xB7 ${team.phase} \xB7 revision ${team.revision}` : 'No team yet. Use apexrest team start "Task" in Codex.',
|
|
57
|
+
""
|
|
58
|
+
];
|
|
59
|
+
if (data.task) lines.push(data.task, "");
|
|
60
|
+
if (team?.modelPolicy)
|
|
61
|
+
lines.push("Auto models \xB7 " + team.modelPolicy.complexity + " \xB7 " + team.modelPolicy.reason);
|
|
62
|
+
if (team?.limits) lines.push("Task time limit: " + team.limits.timeoutSeconds + " seconds");
|
|
63
|
+
if (team?.members.length)
|
|
64
|
+
lines.push("Tokens are cumulative, including cached input; not a cost estimate.", "");
|
|
65
|
+
for (const member of team?.members ?? [])
|
|
66
|
+
lines.push(
|
|
67
|
+
`${teamLabel(member.role)} \xB7 ${member.status}`,
|
|
68
|
+
member.currentAction?.title ?? "No active tool reported",
|
|
69
|
+
[
|
|
70
|
+
member.configuration?.model,
|
|
71
|
+
member.configuration?.reasoningEffort,
|
|
72
|
+
member.configuration?.sandbox,
|
|
73
|
+
member.totalTokens == null ? "" : member.totalTokens + " tokens"
|
|
74
|
+
].filter(Boolean).join(" \xB7 "),
|
|
75
|
+
member.selection ? "Auto \xB7 " + member.selection.tier + " \xB7 " + member.selection.reason : "",
|
|
76
|
+
member.tokenUsage ? [
|
|
77
|
+
member.tokenUsage.inputTokens == null ? "" : "Input " + member.tokenUsage.inputTokens,
|
|
78
|
+
member.tokenUsage.cachedInputTokens == null ? "" : "Cached input " + member.tokenUsage.cachedInputTokens,
|
|
79
|
+
member.tokenUsage.outputTokens == null ? "" : "Output " + member.tokenUsage.outputTokens,
|
|
80
|
+
member.tokenUsage.reasoningOutputTokens == null ? "" : "Reasoning output " + member.tokenUsage.reasoningOutputTokens
|
|
81
|
+
].filter(Boolean).join(" \xB7 ") : "",
|
|
82
|
+
""
|
|
83
|
+
);
|
|
84
|
+
if (tab === 1) {
|
|
85
|
+
lines.push(
|
|
86
|
+
(team?.executionMode ?? data.preferences.executionMode) === "single" ? "AGENT VERIFICATION" : "MANDATORY REVIEWS"
|
|
87
|
+
);
|
|
88
|
+
for (const v of team?.verification ?? [])
|
|
89
|
+
lines.push(
|
|
90
|
+
`${v.report.decision} \xB7 revision ${v.revision}`,
|
|
91
|
+
v.report.summary,
|
|
92
|
+
...v.report.checks.map((c) => `${c.status} \xB7 ${c.name}: ${c.evidence}`)
|
|
93
|
+
);
|
|
94
|
+
for (const r of team?.reviews ?? [])
|
|
95
|
+
lines.push(
|
|
96
|
+
`${r.phase}: ${r.report.decision} \xB7 revision ${r.revision}`,
|
|
97
|
+
r.report.summary,
|
|
98
|
+
...r.report.findings
|
|
99
|
+
);
|
|
100
|
+
for (const q of team?.qa ?? [])
|
|
101
|
+
lines.push(
|
|
102
|
+
`QA: ${q.report.decision} \xB7 revision ${q.revision}`,
|
|
103
|
+
q.report.summary,
|
|
104
|
+
...q.report.checks.map((c) => `${c.status} \xB7 ${c.name}: ${c.evidence}`)
|
|
105
|
+
);
|
|
106
|
+
lines.push("", "PEER MESSAGES");
|
|
107
|
+
for (const m of team?.messages ?? [])
|
|
108
|
+
lines.push(`${teamLabel(m.from)} \u2192 ${teamLabel(m.to)} \xB7 ${m.status}`, m.text);
|
|
109
|
+
} else {
|
|
110
|
+
lines.push("WORKING CHANGES", ...data.changes.files, "", "OBSERVED AGENT STEPS");
|
|
111
|
+
for (const o of [...team?.observations ?? []].reverse())
|
|
112
|
+
lines.push(`${teamLabel(o.role)} \xB7 ${o.kind}`, o.detail);
|
|
113
|
+
}
|
|
114
|
+
if (team?.diagnostics.length) lines.push("", ...team.diagnostics);
|
|
115
|
+
return lines;
|
|
116
|
+
}
|
|
117
|
+
async function runPanelTui(root) {
|
|
118
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY || process.env.TERM === "dumb")
|
|
119
|
+
throw new Fault("TTY_REQUIRED", "Use an interactive Codex terminal, or apexrest panel status --json.", 2);
|
|
120
|
+
const service = new PanelService(root), output = process.stdout, input = process.stdin;
|
|
121
|
+
let data, error = "", tab = 0, offset = 0, refreshing = false, stopped = false;
|
|
122
|
+
const color = !process.env.NO_COLOR;
|
|
123
|
+
const draw = () => {
|
|
124
|
+
if (stopped) return;
|
|
125
|
+
const width = Math.max(20, output.columns || 80), height = Math.max(7, output.rows || 24);
|
|
126
|
+
const body = data ? panelLines(data, tab).flatMap((line) => wrap(line, width - 2)) : [];
|
|
127
|
+
offset = Math.max(0, Math.min(offset, Math.max(0, body.length - (height - 6))));
|
|
128
|
+
const lines = [
|
|
129
|
+
paint(" APEXREST \xB7 Development panel", "accent", color),
|
|
130
|
+
clip(" " + root, width),
|
|
131
|
+
["Overview", "Agent team", "APEX operations", "Settings"].map((name, i) => `${i + 1} ${i === tab ? "[" + name + "]" : name}`).join(" "),
|
|
132
|
+
error ? "Disconnected \xB7 " + error : data ? "Live \xB7 " + new Date(data.updatedAt).toLocaleTimeString() : "Connecting\u2026",
|
|
133
|
+
...body.slice(offset, offset + height - 6),
|
|
134
|
+
"1\u20134 / \u2190\u2192 views \xB7 \u2191\u2193 scroll \xB7 r refresh \xB7 q exit | Actions: apexrest panel action --help"
|
|
135
|
+
];
|
|
136
|
+
output.write("\x1B[H\x1B[2J" + lines.map((line, i) => i === 0 ? line : clip(line, width)).join("\r\n"));
|
|
137
|
+
};
|
|
138
|
+
const refresh = async () => {
|
|
139
|
+
if (refreshing || stopped) return;
|
|
140
|
+
refreshing = true;
|
|
141
|
+
try {
|
|
142
|
+
data = await service.snapshot();
|
|
143
|
+
error = "";
|
|
144
|
+
} catch (e) {
|
|
145
|
+
error = e instanceof Error ? e.message : String(e);
|
|
146
|
+
} finally {
|
|
147
|
+
refreshing = false;
|
|
148
|
+
draw();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const wasRaw = input.isRaw;
|
|
152
|
+
emitKeypressEvents(input);
|
|
153
|
+
input.setRawMode(true);
|
|
154
|
+
input.resume();
|
|
155
|
+
output.write("\x1B[?1049h\x1B[?25l");
|
|
156
|
+
await new Promise((resolve) => {
|
|
157
|
+
const close = () => {
|
|
158
|
+
if (stopped) return;
|
|
159
|
+
stopped = true;
|
|
160
|
+
clearInterval(timer);
|
|
161
|
+
input.off("keypress", key);
|
|
162
|
+
output.off("resize", draw);
|
|
163
|
+
process.off("SIGINT", close);
|
|
164
|
+
process.off("SIGTERM", close);
|
|
165
|
+
input.setRawMode(wasRaw);
|
|
166
|
+
input.pause();
|
|
167
|
+
output.write("\x1B[?25h\x1B[?1049l");
|
|
168
|
+
resolve();
|
|
169
|
+
};
|
|
170
|
+
const key = (_text, k) => {
|
|
171
|
+
if (k.name === "q" || k.ctrl && k.name === "c") return close();
|
|
172
|
+
if (/^[1-4]$/.test(k.name ?? "")) {
|
|
173
|
+
tab = Number(k.name) - 1;
|
|
174
|
+
offset = 0;
|
|
175
|
+
}
|
|
176
|
+
if (k.name === "right" || k.name === "left") {
|
|
177
|
+
tab = (tab + (k.name === "right" ? 1 : 3)) % 4;
|
|
178
|
+
offset = 0;
|
|
179
|
+
}
|
|
180
|
+
if (k.name === "up") offset--;
|
|
181
|
+
if (k.name === "down") offset++;
|
|
182
|
+
if (k.name === "pageup") offset -= 10;
|
|
183
|
+
if (k.name === "pagedown") offset += 10;
|
|
184
|
+
if (k.name === "r") void refresh();
|
|
185
|
+
else draw();
|
|
186
|
+
};
|
|
187
|
+
const timer = setInterval(() => {
|
|
188
|
+
void refresh();
|
|
189
|
+
}, 2e3);
|
|
190
|
+
input.on("keypress", key);
|
|
191
|
+
output.on("resize", draw);
|
|
192
|
+
process.once("SIGINT", close);
|
|
193
|
+
process.once("SIGTERM", close);
|
|
194
|
+
void refresh();
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
panelLines,
|
|
199
|
+
runPanelTui
|
|
200
|
+
};
|