@zortexhq/indra-v2.5 0.2.5 → 0.2.7
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/README.md +129 -109
- package/dist/cli-run.js +1 -1
- package/dist/codex-setup.js +1 -1
- package/dist/connector-worker.js +1 -1
- package/dist/content-find.js +2 -0
- package/dist/ensure-ready.js +1 -0
- package/dist/gateway.js +1 -1
- package/dist/help-launch.js +1 -1
- package/dist/local-cloud-policy.js +1 -1
- package/dist/mcp.js +2 -2
- package/dist/onboarding.js +1 -1
- package/dist/operation-telemetry.js +1 -1
- package/dist/profile-upgrade.js +1 -1
- package/dist/public-tool.js +1 -0
- package/dist/recovery-progress.js +1 -1
- package/dist/recovery-text.js +1 -1
- package/dist/recovery.js +1 -1
- package/dist/resident-ensure-ready.js +1 -0
- package/dist/resident-host.js +2 -2
- package/dist/resident-jobs.js +1 -1
- package/dist/resident-platform.js +1 -1
- package/dist/resident-telemetry.js +1 -1
- package/dist/source-catalog.js +1 -1
- package/dist/startup.js +1 -2
- package/dist/supervised-sync.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/update-cli.js +1 -1
- package/dist/web.js +2 -2
- package/node_modules/@zortexhq/plugin-auth-core/dist/device-admission.js +2 -2
- package/node_modules/@zortexhq/plugin-auth-core/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-auth-core/package.json +1 -8
- package/node_modules/@zortexhq/plugin-auto-connect/dist/api/index.js +1 -1
- package/node_modules/@zortexhq/plugin-auto-connect/package.json +0 -3
- package/node_modules/@zortexhq/plugin-connector-calendar/dist/actions.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-core/dist/api/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-core/dist/enrollment.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-core/dist/hub.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-core/package.json +1 -3
- package/node_modules/@zortexhq/plugin-connector-fleet/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-fleet/package.json +1 -4
- package/node_modules/@zortexhq/plugin-connector-framework/dist/api/browser-authorization.js +1 -0
- package/node_modules/@zortexhq/plugin-connector-framework/dist/api/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/runner.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-framework/package.json +0 -3
- package/node_modules/@zortexhq/plugin-connector-level1/dist/additional-sources.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/matrix-login.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/provisioning.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/shallow.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/sources.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-level1/package.json +1 -4
- package/node_modules/@zortexhq/plugin-connector-notion/dist/broker.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-notion/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-notion/dist/provider.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-notion/package.json +1 -3
- package/node_modules/@zortexhq/plugin-connector-steam/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-steam/dist/provider.js +1 -1
- package/node_modules/@zortexhq/plugin-connector-steam/package.json +1 -3
- package/node_modules/@zortexhq/plugin-galaxy-ui/src/integration/app-model.js +1 -1
- package/node_modules/@zortexhq/plugin-galaxy-ui/src/integration/connection-panel.js +1 -1
- package/node_modules/@zortexhq/plugin-google-auth/dist/index.js +1 -1
- package/node_modules/@zortexhq/plugin-google-auth/package.json +1 -3
- package/node_modules/@zortexhq/plugin-telemetry/dist/api/telemetry.js +1 -1
- package/node_modules/@zortexhq/plugin-vault-sqlite/dist/index.js +1 -1
- package/package.json +6 -20
- package/profiles/core.yml +0 -18
- package/release-provenance.json +27 -93
- package/update-manifest.json +362 -4744
- package/dist/cloud-action-proof.js +0 -1
- package/dist/cloud-device-host.js +0 -1
- package/dist/cloud-device-identity.js +0 -1
- package/dist/cloud-download-sink.js +0 -1
- package/dist/cloud-gmail-actions.js +0 -1
- package/dist/cloud-gmail-audit.js +0 -1
- package/dist/cloud-gmail-bound-audit-runner.js +0 -1
- package/dist/cloud-gmail-bound-epoch.js +0 -1
- package/dist/cloud-gmail-bound-identity.js +0 -1
- package/dist/cloud-gmail-bound-runner.js +0 -1
- package/dist/cloud-gmail-provider.js +0 -1
- package/dist/cloud-gmail-rpc.js +0 -1
- package/dist/cloud-gmail-sync.js +0 -1
- package/node_modules/@zortexhq/plugin-auth-core/dist/cloud-frame.js +0 -1
- package/node_modules/@zortexhq/plugin-auth-core/dist/cloud-vault-keyring.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/account.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/adopt.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/pack.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/publish.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/dist/records.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-ai/package.json +0 -17
- package/node_modules/@zortexhq/plugin-cloud-vault/dist/device-trust.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-vault/dist/owner-admission.js +0 -1
- package/node_modules/@zortexhq/plugin-cloud-vault/package.json +0 -19
- package/node_modules/@zortexhq/plugin-connector-core/dist/api/browser-authorization.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/api/original-miner.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-codec.js +0 -2
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-fs.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-move-worker.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-move.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-posix.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-public.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-replay.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/checkpoint-store.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/chromium-local/chromium-history.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/chromium-local/index.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/chromium-local/normalize-visit.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/connection-health.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/connector.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/failure-type.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-framework/dist/windows-custody.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/chatgpt.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-level1/dist/signed-in.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-social/dist/full-sync.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-social/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-social/dist/provider.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-social/dist/sites.js +0 -1
- package/node_modules/@zortexhq/plugin-connector-social/package.json +0 -22
- package/node_modules/@zortexhq/plugin-connector-steam/dist/browser-session.js +0 -1
- package/node_modules/@zortexhq/plugin-connectors/package.json +0 -17
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/attached.js +0 -11
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/browser.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/decision.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/extension-transport.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/feedback.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/google-oauth-bridge.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/google-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/google-uia-decision.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/microsoft-oauth-bridge.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/microsoft-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/page-inspect.js +0 -6
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/runner.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/slack-oauth-bridge.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/slack-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/dist/whatsapp-session.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-autopilot/extension/manifest.json +0 -9
- package/node_modules/@zortexhq/plugin-jev-autopilot/package.json +0 -21
- package/node_modules/@zortexhq/plugin-jev-browser-driver/assets/ax-page.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/assets/uia-page.ps1 +0 -545
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/approved-control.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/attached-session.js +0 -8
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/authorization-account-policy.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/authorization-memory.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/authorization-planner.js +0 -8
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/authorization-task.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/browser-actions.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/browser-task.js +0 -7
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/combined.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/decision.js +0 -5
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/google-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/isolated-display.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/microsoft-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/native-session.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/notion-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/observe-log.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/operational-browser.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/page-settle.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/planned-oauth.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/session-routes.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/shared-session.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/site-read.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/dist/slack-oauth-driver.js +0 -1
- package/node_modules/@zortexhq/plugin-jev-browser-driver/package.json +0 -20
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/assets/windows-oauth-background.cs +0 -492
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/assets/windows-oauth-guard-x64.build.json +0 -30
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/assets/windows-oauth-guard-x64.dll +0 -0
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/assets/windows-oauth-guard.c +0 -692
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/assets/windows-uia-oauth.ps1 +0 -3840
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/dist/api/index.js +0 -1
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/dist/driver.js +0 -3
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/dist/index.js +0 -1
- package/node_modules/@zortexhq/plugin-oauth-browser-driver/package.json +0 -19
- package/node_modules/chatgpt-web-mcp/.env.example +0 -30
- package/node_modules/chatgpt-web-mcp/CONTRIBUTING.md +0 -65
- package/node_modules/chatgpt-web-mcp/LICENSE +0 -21
- package/node_modules/chatgpt-web-mcp/README.en.md +0 -149
- package/node_modules/chatgpt-web-mcp/README.md +0 -194
- package/node_modules/chatgpt-web-mcp/SECURITY.md +0 -37
- package/node_modules/chatgpt-web-mcp/node_modules/zod/LICENSE +0 -21
- package/node_modules/chatgpt-web-mcp/node_modules/zod/README.md +0 -208
- package/node_modules/chatgpt-web-mcp/node_modules/zod/index.cjs +0 -33
- package/node_modules/chatgpt-web-mcp/node_modules/zod/index.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/index.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/index.js +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/package.json +0 -118
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/index.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/function.test.ts +0 -257
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v3/types.ts +0 -5136
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/checks.ts +0 -30
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/compat.ts +0 -66
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/errors.ts +0 -75
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/external.ts +0 -50
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/parse.ts +0 -33
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/api.ts +0 -1594
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/checks.ts +0 -1283
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/core.ts +0 -134
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/errors.ts +0 -424
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/function.ts +0 -176
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/index.ts +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/json-schema.ts +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/parse.ts +0 -94
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/regexes.ts +0 -135
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/registries.ts +0 -96
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/schemas.ts +0 -3842
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/util.ts +0 -775
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ar.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/az.ts +0 -121
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/be.ts +0 -184
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ca.ts +0 -127
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/cs.ts +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/de.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/en.ts +0 -127
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/eo.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/es.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/fa.ts +0 -134
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/fi.ts +0 -131
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/fr.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/he.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/hu.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/id.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/index.ts +0 -39
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/it.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ja.ts +0 -122
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/kh.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ko.ts +0 -131
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/mk.ts +0 -127
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ms.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/no.ts +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ota.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/pl.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ps.ts +0 -133
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/pt.ts +0 -123
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ru.ts +0 -184
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/sl.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/sv.ts +0 -127
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ta.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/th.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/tr.ts +0 -121
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ua.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/ur.ts +0 -126
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/vi.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/coerce.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/iso.ts +0 -62
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/parse.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
- package/node_modules/chatgpt-web-mcp/node_modules/zod/src/v4-mini/index.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/external.js +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/index.js +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/locales/en.cjs +0 -111
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/types.cjs +0 -3775
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/types.d.cts +0 -1031
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/types.d.ts +0 -1031
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v3/types.js +0 -3693
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/checks.cjs +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/compat.cjs +0 -57
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/compat.d.cts +0 -46
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/compat.d.ts +0 -46
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/compat.js +0 -27
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/errors.cjs +0 -67
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/errors.js +0 -41
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/external.cjs +0 -70
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/external.d.cts +0 -13
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/external.d.ts +0 -13
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/external.js +0 -18
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/parse.cjs +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/parse.d.cts +0 -23
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/parse.d.ts +0 -23
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/parse.js +0 -6
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/schemas.cjs +0 -1109
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/schemas.d.cts +0 -630
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/schemas.d.ts +0 -630
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/classic/schemas.js +0 -1006
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/api.cjs +0 -1039
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/api.d.cts +0 -284
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/api.d.ts +0 -284
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/api.js +0 -906
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/checks.cjs +0 -591
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/checks.js +0 -565
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/core.cjs +0 -67
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/core.d.cts +0 -49
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/core.d.ts +0 -49
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/core.js +0 -61
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/errors.cjs +0 -226
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/errors.d.cts +0 -208
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/errors.d.ts +0 -208
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/errors.js +0 -195
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/function.cjs +0 -102
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/function.d.cts +0 -52
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/function.d.ts +0 -52
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/function.js +0 -75
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/index.cjs +0 -44
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/index.d.cts +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/index.d.ts +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/index.js +0 -15
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/json-schema.d.cts +0 -87
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/json-schema.d.ts +0 -87
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/parse.cjs +0 -87
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/parse.d.cts +0 -25
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/parse.d.ts +0 -25
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/parse.js +0 -57
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/regexes.cjs +0 -103
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/regexes.d.cts +0 -62
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/regexes.d.ts +0 -62
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/regexes.js +0 -95
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/schemas.cjs +0 -1748
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/schemas.d.cts +0 -1041
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/schemas.d.ts +0 -1041
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/schemas.js +0 -1717
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/to-json-schema.js +0 -849
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/util.cjs +0 -539
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/util.d.cts +0 -183
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/util.d.ts +0 -183
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/util.js +0 -493
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/index.js +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ar.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ar.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/az.cjs +0 -141
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/az.js +0 -115
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/be.cjs +0 -190
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/be.js +0 -164
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ca.cjs +0 -144
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ca.js +0 -118
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/cs.cjs +0 -161
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/cs.js +0 -135
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/de.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/de.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/en.cjs +0 -145
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/en.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/eo.cjs +0 -144
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/eo.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/es.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/es.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fa.cjs +0 -148
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fa.js +0 -122
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fi.cjs +0 -148
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fi.js +0 -122
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr-CA.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/fr.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/he.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/he.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/hu.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/hu.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/id.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/id.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/index.cjs +0 -84
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/index.js +0 -39
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/it.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/it.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ja.cjs +0 -141
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ja.js +0 -115
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/kh.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/kh.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ko.cjs +0 -147
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ko.js +0 -121
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/mk.cjs +0 -144
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/mk.js +0 -118
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ms.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ms.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/nl.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/nl.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/no.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/no.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ota.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ota.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pl.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pl.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ps.cjs +0 -148
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ps.js +0 -122
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pt.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/pt.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ru.cjs +0 -190
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ru.js +0 -164
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sl.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sl.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sv.cjs +0 -144
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/sv.js +0 -118
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ta.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ta.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/th.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/th.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/tr.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/tr.js +0 -115
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ua.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ua.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ur.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/ur.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/vi.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/vi.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-CN.js +0 -116
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/locales/zh-TW.js +0 -117
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/coerce.cjs +0 -47
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/coerce.js +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/external.cjs +0 -62
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/external.d.cts +0 -11
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/external.d.ts +0 -11
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/external.js +0 -13
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/iso.cjs +0 -60
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/iso.js +0 -30
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/parse.cjs +0 -8
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/schemas.cjs +0 -839
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/schemas.d.cts +0 -356
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/schemas.d.ts +0 -356
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4/mini/schemas.js +0 -732
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4-mini/index.cjs +0 -17
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4-mini/index.d.cts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/chatgpt-web-mcp/node_modules/zod/v4-mini/index.js +0 -1
- package/node_modules/chatgpt-web-mcp/package.json +0 -50
- package/node_modules/chatgpt-web-mcp/scripts/doctor.js +0 -40
- package/node_modules/chatgpt-web-mcp/scripts/inspect.js +0 -16
- package/node_modules/chatgpt-web-mcp/scripts/login.js +0 -32
- package/node_modules/chatgpt-web-mcp/scripts/smoke-mcp.js +0 -26
- package/node_modules/chatgpt-web-mcp/src/browser.js +0 -4670
- package/node_modules/chatgpt-web-mcp/src/cli.js +0 -27
- package/node_modules/chatgpt-web-mcp/src/config.js +0 -210
- package/node_modules/chatgpt-web-mcp/src/errors.js +0 -20
- package/node_modules/chatgpt-web-mcp/src/index.js +0 -381
- package/node_modules/chatgpt-web-mcp/src/login-lifecycle.js +0 -39
- package/node_modules/chatgpt-web-mcp/src/selectors.js +0 -151
- package/profiles/social-worker.yml +0 -18
package/README.md
CHANGED
|
@@ -1,153 +1,173 @@
|
|
|
1
1
|
# Zortex
|
|
2
2
|
|
|
3
|
-
Zortex lets
|
|
3
|
+
Zortex lets an agent use selected connected sources through one local installation.
|
|
4
|
+
The Vault holds stored records, settings and protected account authorization.
|
|
5
|
+
Connect one source through its actual sign-in, QR or permission gateway, then use
|
|
6
|
+
its Actions or query stored data through MCP.
|
|
4
7
|
|
|
5
|
-
This
|
|
8
|
+
This guide ships with the artifact built from this source. Check the installed
|
|
9
|
+
version and `release-provenance.json`; editing this repository does not update an
|
|
10
|
+
already-published package. Install Node.js 24 or later for npm use. Platform
|
|
11
|
+
packaging support does not establish that every source has passed a real-account
|
|
12
|
+
trial on that machine.
|
|
6
13
|
|
|
7
|
-
##
|
|
14
|
+
## Install and choose a Vault
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
Install the verified version or archive supplied in the release handoff. To
|
|
17
|
+
inspect the public candidate and choose an exact published version:
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
```sh
|
|
20
|
+
npm view @zortexhq/indra-v2.5 dist-tags.next --registry https://registry.npmjs.org
|
|
21
|
+
npm install -g '@zortexhq/indra-v2.5@<exact-published-version>' --registry https://registry.npmjs.org
|
|
22
|
+
```
|
|
12
23
|
|
|
13
|
-
|
|
24
|
+
Replace placeholders before running commands. Set `ZORTEX_ROOT` to the desired
|
|
25
|
+
absolute Vault directory before installation. New installations default to
|
|
26
|
+
`%LOCALAPPDATA%\Zortex\Indra` on Windows and `~/.zortex/indra-v2` on Unix. Existing
|
|
27
|
+
catalog bindings, Vaults and source opt-outs are preserved.
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
If background full sync is not wanted, set `ZORTEX_AUTO_SYNC=0` in the installation
|
|
30
|
+
and launch shell; in PowerShell use `$env:ZORTEX_AUTO_SYNC = '0'`. Keep that setting
|
|
31
|
+
for later independent host, MCP and web launches. Explicit source sync is still
|
|
32
|
+
available. Stop an old host before starting a new version with the same Vault;
|
|
33
|
+
changing the shell environment does not alter a running process.
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
The package includes `indra` and `zortex`. `indra` uses an explicit `--root` for
|
|
36
|
+
Vault commands. `zortex` selects `--root`, then `ZORTEX_ROOT`, then its saved Codex
|
|
37
|
+
binding, then the platform default. If an older installation already owns the
|
|
38
|
+
bare `zortex` command, use a separate npm prefix or this package's executable;
|
|
39
|
+
do not force-overwrite the other installation.
|
|
18
40
|
|
|
19
|
-
|
|
41
|
+
## Connect and use a source
|
|
20
42
|
|
|
21
43
|
```sh
|
|
22
|
-
|
|
44
|
+
indra help
|
|
45
|
+
indra --root <absolute Vault directory> connect --source gmail
|
|
46
|
+
indra --root <absolute Vault directory> connect --source whatsapp --presentation return-url
|
|
47
|
+
indra --root <absolute Vault directory> status
|
|
48
|
+
indra --root <absolute Vault directory> actions --json '{"source":"gmail"}'
|
|
49
|
+
indra --root <absolute Vault directory> search --sql 'SELECT source,title,body FROM z_records LIMIT 20'
|
|
50
|
+
indra web --root <absolute Vault directory>
|
|
23
51
|
```
|
|
24
52
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
`connect` starts the selected provider's real connection flow. It opens the
|
|
54
|
+
returned link in the existing browser, or prints it with `--presentation
|
|
55
|
+
return-url`. Keep the command running while the person or authorized agent uses
|
|
56
|
+
available browser/computer tools to finish sign-in, account consent, QR pairing
|
|
57
|
+
or local permission. The provider verifies completion. Ctrl-C cancels the owned
|
|
58
|
+
transaction. No embedded browser agent or isolated browser is started.
|
|
31
59
|
|
|
32
|
-
|
|
60
|
+
`help` prints commands. `web` explicitly opens management and prints a signed
|
|
61
|
+
loopback address; open that exact address. `mcp` exposes normal search, actions,
|
|
62
|
+
management and documentation tools without starting account connection. A
|
|
63
|
+
successful empty read, an unavailable source and incomplete sync are different
|
|
64
|
+
results; inspect the returned status.
|
|
33
65
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
66
|
+
For supported durable sources, `indra --root <Vault> sync --source <source>` stores
|
|
67
|
+
records using the saved cursor. `complete:false` requires continuation. Full
|
|
68
|
+
Chrome-history sync first needs an explicit authorized directory through
|
|
69
|
+
`connect --source chrome-history --location <absolute directory>`.
|
|
38
70
|
|
|
39
|
-
|
|
71
|
+
## Codex
|
|
72
|
+
|
|
73
|
+
Installation prepares a local catalog at `<installed package>/codex`; it does not
|
|
74
|
+
start MCP or access account data. Set `ZORTEX_CODEX_SETUP=0` before installing to
|
|
75
|
+
skip preparation. An explicit new catalog can be created and registered with:
|
|
40
76
|
|
|
41
77
|
```sh
|
|
42
|
-
|
|
78
|
+
indra setup codex --out <new absolute catalog directory> --root <absolute Vault directory>
|
|
79
|
+
codex plugin marketplace add <absolute catalog directory>
|
|
80
|
+
codex plugin add zortex@zortex-local
|
|
43
81
|
```
|
|
44
82
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<absolute directory>`. For the separate `google-chrome` and `microsoft-edge`
|
|
53
|
-
sources, native setup can automatically select the first available local browser
|
|
54
|
-
profile when no profile was previously selected; it records a local read
|
|
55
|
-
permission for that profile and continues setup.
|
|
56
|
-
|
|
57
|
-
A bounded `connector.read` does not retain its returned payload in the shared
|
|
58
|
-
cache. The Local Cloud read tool caches the rows it returns in the local Vault;
|
|
59
|
-
durable `connector.sync` can also store synchronized records there. In Cloud AI's
|
|
60
|
-
publishing screen, browser-history sources are unchecked by default and must be
|
|
61
|
-
selected to include them in a publication.
|
|
62
|
-
|
|
63
|
-
## Updates
|
|
64
|
-
|
|
65
|
-
Updates are part of the installed package; no separate updater installation is needed.
|
|
66
|
-
Run `zortex update` (or `indra update`) to check immediately. It returns the current
|
|
67
|
-
and target versions with an opaque release-offer token. Apply that version and token
|
|
68
|
-
with `zortex update apply --version <version> --confirmation-token <token>`.
|
|
69
|
-
Product use supplies authorization; neither the CLI nor the agent asks again.
|
|
70
|
-
Ordinary commands check in the background without interrupting work. Offline
|
|
71
|
-
checks do not prevent ordinary use. Set `ZORTEX_UPDATES=0` to disable version checks.
|
|
72
|
-
|
|
73
|
-
With local MCP, call `indra.update` with `operation: "check"`, then `operation: "apply"`
|
|
74
|
-
and the returned version and token. The token binds the release manifest; it is
|
|
75
|
-
machine bookkeeping. MCP does not read terminal input or print prompts on its
|
|
76
|
-
protocol stream. Remote and scoped MCP endpoints do not expose the host updater.
|
|
77
|
-
|
|
78
|
-
The updater verifies an npm-registry-bound file manifest, reuses unchanged product
|
|
79
|
-
files, and downloads changed files from the immutable version on jsDelivr. Public
|
|
80
|
-
dependency changes are staged separately with npm; it does not download the whole
|
|
81
|
-
Zortex package again. A failed check, download, integrity check or basic CLI smoke
|
|
82
|
-
test leaves or restores the installed version. Your Vault is outside this process.
|
|
83
|
-
Release manifests and changed files still need to be downloaded; update duration
|
|
84
|
-
depends on the change and network. It is not a promise of zero downloads.
|
|
85
|
-
|
|
86
|
-
An older release without this updater needs one normal npm upgrade to establish
|
|
87
|
-
the baseline. pnpm/Yarn store, npx cache and source workspaces must use their own
|
|
88
|
-
package manager. Stable installations follow `latest`; prereleases follow `next`.
|
|
89
|
-
After a successful update, restart the background host and MCP sessions to load
|
|
90
|
-
the new code. Existing processes are not hot-swapped or automatically started.
|
|
91
|
-
|
|
92
|
-
## Use
|
|
83
|
+
Use `codex.cmd` where required on Windows. The private Vault must be separate from
|
|
84
|
+
the catalog. Keep the referenced installation in place. `indra setup codex
|
|
85
|
+
--refresh` refreshes an enabled plugin belonging to this installation while
|
|
86
|
+
preserving its Vault binding and unrelated configuration; restart Codex afterward.
|
|
87
|
+
Plugin registration and MCP startup do not connect accounts.
|
|
88
|
+
|
|
89
|
+
## Background host and optional remote access
|
|
93
90
|
|
|
94
91
|
```sh
|
|
95
|
-
indra --root <absolute Vault directory>
|
|
96
|
-
indra --root <absolute Vault directory>
|
|
97
|
-
indra
|
|
92
|
+
indra --root <absolute Vault directory> host start
|
|
93
|
+
indra --root <absolute Vault directory> host status
|
|
94
|
+
indra --root <absolute Vault directory> host enable
|
|
95
|
+
indra --root <absolute Vault directory> host disable
|
|
96
|
+
indra --root <absolute Vault directory> host stop
|
|
98
97
|
```
|
|
99
98
|
|
|
100
|
-
`
|
|
99
|
+
`enable` registers login startup; `start` runs now. `disable` removes login startup;
|
|
100
|
+
`stop` ends the running host. These commands preserve data. Supported
|
|
101
|
+
already-authorized sources may sync while the host runs unless automatic sync is
|
|
102
|
+
disabled. Source switches and revocations remain effective across restarts.
|
|
101
103
|
|
|
102
|
-
`
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
Optional `host local-cloud on` enables authenticated remote MCP while the original
|
|
105
|
+
computer is awake and online. Inspect its current endpoint with `host status`;
|
|
106
|
+
use `host local-cloud grants` and `host local-cloud revoke <grant-id>` to manage
|
|
107
|
+
access. `host local-cloud off` prevents reopening the link; stop the host to close
|
|
108
|
+
the current link. Device/account registration and actual relay provisioning remain
|
|
109
|
+
separate. This is live access to the local computer, not a cloud copy of the Vault.
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
## Privacy and feedback
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
The Vault and protected credentials stay outside the package. SQL excludes
|
|
114
|
+
private credential and authorization tables. Ordinary bounded gateway reads and
|
|
115
|
+
Actions are transient; full sync stores records, and Local Cloud reads cache the
|
|
116
|
+
bounded rows returned. Browser-history readers can access visits, downloads,
|
|
117
|
+
search terms and bookmarks under their saved local permission. Respect the chosen
|
|
118
|
+
profile and revocation. A protected WhatsApp linked session can persist while its
|
|
119
|
+
transient message buffer ends with the host.
|
|
111
120
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
Provider and OS consent remains in the actual connection flow. Credential custody
|
|
122
|
+
uses Windows DPAPI or macOS Keychain-backed protection; unavailable protection
|
|
123
|
+
fails explicitly. Real source and native-platform acceptance remains separate
|
|
124
|
+
from synthetic verification.
|
|
116
125
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
Check the resolved command before opening Help; this does not change an existing
|
|
123
|
-
Codex MCP configuration or move its Vault.
|
|
126
|
+
Enabled telemetry contains operational metadata, not record content, questions,
|
|
127
|
+
SQL or credentials. Set `ZORTEX_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable it.
|
|
128
|
+
`indra --root <Vault> feedback` offers fixed ratings for recent operations;
|
|
129
|
+
`feedback --list` inspects receipts. No response means unrated, and feedback does
|
|
130
|
+
not force an upload or start account setup.
|
|
124
131
|
|
|
125
|
-
##
|
|
132
|
+
## Updates and release identity
|
|
126
133
|
|
|
127
|
-
|
|
134
|
+
`indra update` or `zortex update` checks the current offer. Apply the returned
|
|
135
|
+
version and opaque release token with:
|
|
128
136
|
|
|
129
137
|
```sh
|
|
130
|
-
|
|
131
|
-
codex plugin add zortex@zortex-local
|
|
138
|
+
indra update apply --version <version> --confirmation-token <token>
|
|
132
139
|
```
|
|
133
140
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
Ordinary local MCP exposes one `zortex` tool; use its `update` intent for the same
|
|
142
|
+
check/apply operation as `indra update`. Remote/scoped endpoints do not expose host
|
|
143
|
+
updates. The token binds the release manifest.
|
|
144
|
+
Manifests and file digests are verified, unchanged files are reused, and public
|
|
145
|
+
dependency changes are staged through npm. Failure keeps or restores the previous
|
|
146
|
+
installation; the Vault is not replaced. Restart the host and MCP sessions after
|
|
147
|
+
success. Set `ZORTEX_UPDATES=0` to disable update checks. Older releases without the
|
|
148
|
+
updater, source workspaces and store-managed installs use their package manager.
|
|
149
|
+
|
|
150
|
+
Before replacing a running installation, use its CLI to disable and stop its host.
|
|
151
|
+
If IPC versions differ, use the previous verified artifact to stop the old owner;
|
|
152
|
+
a failed status reply is not proof it exited.
|
|
153
|
+
|
|
154
|
+
Daily candidates use the public npm `next` channel. Their source commit, dependency
|
|
155
|
+
lock and package digests are recorded in `release-provenance.json`; daily source
|
|
156
|
+
identity is also recorded under `zortexRelease` in `package.json`. An upload or a
|
|
157
|
+
scheduled workflow does not by itself prove public registry availability. Use the
|
|
158
|
+
published version and integrity from the release handoff; this guide does not
|
|
159
|
+
claim a new publication or real-user acceptance.
|
|
143
160
|
|
|
144
161
|
## Remove
|
|
145
162
|
|
|
163
|
+
Stop and disable the host before removing its runtime:
|
|
164
|
+
|
|
146
165
|
```sh
|
|
166
|
+
indra --root <absolute Vault directory> host disable
|
|
167
|
+
indra --root <absolute Vault directory> host stop
|
|
147
168
|
codex plugin remove zortex@zortex-local
|
|
148
169
|
npm uninstall -g @zortexhq/indra-v2.5
|
|
149
170
|
```
|
|
150
171
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
`release-provenance.json` names the source commit, dependency lock and a digest of every package in this release.
|
|
172
|
+
Uninstalling the package leaves the Vault and its records in place. Delete that
|
|
173
|
+
directory separately only when its data is no longer wanted.
|
package/dist/cli-run.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validateJoplinResult}from"./joplin-selection.js";import{resolve,isAbsolute,join}from"node:path";import{readFile}from"node:fs/promises";import{randomUUID}from"node:crypto";import{openProduct}from"./profile.js";import{runHostCommand}from"./resident-host.js";import{enableResident,startResident,residentSync,residentConnect,residentConnectAutomatic,residentConnectRecovery,residentReconnectSaved,residentConnectReauthorize,residentConnectReadwiseMcpWrite,residentConnectGmailWrite,residentConnectManual,residentConnectJob,residentCancelConnect,residentInitialConnections,residentConnectorStatus,residentConnectorCheck,residentConfigureNativeFiles,residentConfigureZotero,residentConfigureOwnTracks,residentConfigureZoom,residentConfigureBox,residentConfigureFront,residentConfigureHubSpot,residentConfigureGoogleContacts,residentConfigureGoogleChat,residentConfigureSalesforce,residentConfigureDropbox,residentConfigureDiscord,residentConfigureProtonMail,residentConfigureJoplin,residentConfigureThunderbird,residentConfigureWeChat,residentConfigureCopyQ,residentConfigureFreshdesk,residentConfigureZendesk,residentConfigureFigma,residentConfigureSmartsheet,residentConfigureNextcloud,residentConfigureZulip,residentConfigureFreshRSS,residentConfigureMiniflux,residentConfigureMattermost,residentConfigureWallabag,residentConfigureCalcom,residentConfigureWakatime,residentGatewayCall,residentCheck,residentRead,residentInvoke}from"./resident-platform.js";import{fileURLToPath}from"node:url";import{createGateway}from"./gateway.js";import{startMcp}from"./mcp.js";import{launchWeb}from"./web.js";import{usageOutcome,withFeedbackFlow,createTraceRecorder}from"@zortexhq/plugin-telemetry/api";import{waitForAuthorization}from"./authorization.js";import{readOnboardingReport,needsGuidedRecovery}from"./onboarding.js";import{startGuidedRecovery,keepRecoverySurfaceOpen,validateNativeFileResult}from"./recovery.js";import{openConnectionHelpUrl}from"./help-launch.js";import{openConnectionUrl}from"@zortexhq/plugin-connector-core/browser";import{automaticLevel1SourceIds,prepareLevel1Configuration,readLevel1Configuration,writeLevel1Configuration,chatGptLoginCommand}from"@zortexhq/plugin-connector-level1";import{configureNativeLevel1,readNativeLevel1Selection}from"./native-level1-setup.js";import{attributeProductInstallation}from"./installation-origin.js";import{configuredVaultRoot}from"./default-root.js";import{productUpdater}from"./auto-update.js";import{runningProductVersion}from"./update-telemetry.js";const USAGE="indra --root <absolute Vault directory> <help|search|feedback|plugins|vault|status|connect|onboard|recover|sync|action|manage|mcp|host|level1>";const HELP={usage:USAGE,help:"indra --root <Vault> help opens Local connection help in your browser: every connector, whether it is ready, and what it needs. Ready sources are listed with continuation controls and setup details for incomplete sources. Add --no-open (or set ZORTEX_OPEN_HELP=0) to print the local link without opening a browser.",commands:{feedback:"Voluntarily rate a recent search or connector operation. Fixed choices; saved locally, queued for normal telemetry delivery. --list prints recent receipts; --json is recorded as programmatic feedback.",update:"Check and apply available updates. Does not start the host or connectors.","northstar attribute":"Save a website installation source locally; --install-ref <code> [--root <Vault>]. No network request. Installations are not verified people.",level1:"List current routes, prepare existing account references, configure them, or set up native browser and ActivityWatch access.",host:"Manage the background host: start, stop, status, enable, disable, adopt-cloud, account-link [--name <device name>] [--no-open], local-cloud on|off|password|grants|revoke <grant-id>|keep-awake on|off.",help:"Open Apps to connect and manage every connector.",onboard:"Run or resume Autopilot, then open Apps for anything left.",recover:"Open Apps for manual connection without starting an automatic pass.",status:"Show connection, fleet and process status as JSON.",connect:"Automatically connect one source in the background. Add --presentation only for an explicit manual OAuth transaction.",mcp:"Run the Zortex MCP server for Codex.",web:"Open the Zortex web app.","setup codex":"Prepare the Codex plugin."}};import{prepareCodexPlugin}from"./codex-setup.js";import{installCodexCatalog}from"./codex-install.js";const entrypoint=fileURLToPath(new URL("./cli.js",import.meta.url));export async function runIndraCli(argv=process.argv.slice(2)){const args=[...argv];if(args.length===1&&(args[0]==="--version"||args[0]==="-v")){print({version:JSON.parse(await readFile(new URL("../package.json",import.meta.url),"utf8")).version});return}if((args.includes("onboard")||args.includes("recover"))&&args.includes("--help")){print({usage:"indra --root <absolute Vault directory> <onboard|recover>",description:"Onboard runs or resumes the shared startup pass. Recover opens assistance without an automatic pass. When assistance is needed, Local connection help opens in the browser (ZORTEX_OPEN_HELP=0 only prints it) and an intermediate JSON line contains recovery.url; the command keeps that live page available while the agent completes setup, until completion or Ctrl+C. It expires after 30 minutes. No source arguments. A running pass is reported without overlapping authorization. The command waits up to 30 seconds for background setup, then reports progress. A usable Actions catalog or a successful read, including an empty result, counts as ready; discovery is reported separately from an exercised operation."});return}if(args[0]==="web")return launchWeb(args.slice(1));if(args.length===1&&["help","--help","-h"].includes(args[0])||args.length===0){print(HELP);return}function flag(name){const at=args.indexOf(name);if(at<0)return void 0;const value=args[at+1];if(!value||value.startsWith("--"))throw Error("Missing "+name);args.splice(at,2);return value}if(args[0]==="northstar"||args[0]==="--root"&&args[2]==="northstar"){const selectedRoot=flag("--root");args.shift();const operation=args.shift(),ref=flag("--install-ref");if(operation!=="attribute"||!ref||args.length)throw Error("Use indra northstar attribute --install-ref <website source code> [--root <absolute Vault directory>].");const root2=selectedRoot??await configuredVaultRoot({catalogFile:fileURLToPath(new URL("../codex/plugins/zortex/.mcp.json",import.meta.url))});if(!isAbsolute(root2))throw Error("Vault directory must be absolute.");print({ok:await attributeProductInstallation(resolve(root2),ref),note:"Website source saved locally. Usage is sent only when Zortex runs with telemetry enabled and network access. This is an installation identity, not a verified person."});return}if(args[0]==="setup"&&args[1]==="codex"){if(args.length===3&&args[2]==="--refresh"){print({ok:await installCodexCatalog({refresh:true})});return}args.splice(0,2);const output=flag("--out"),root2=flag("--root");if(!output||!root2||args.length)throw Error("Use indra setup codex --out <new absolute directory> --root <absolute Vault directory>, or indra setup codex --refresh.");print({ok:await prepareCodexPlugin({output,root:root2})});return}const selected=flag("--root");if(!selected||!isAbsolute(selected))throw Error("Use "+USAGE+". Run indra help for details.");const root=resolve(selected);let command=args.shift();if(command==="feedback"){await(await import("./product-feedback.js")).bootstrapProductFeedback(["--root",root,"feedback",...args]);return}if(command==="connect"&&args.length===1&&args[0]==="--help"){print({usage:"indra --root <absolute Vault directory> connect --source <source>",automatic:true,description:"Runs the shared planner + JEV automatic connection for one source in the background. Use --presentation open or --presentation return-url only when you explicitly want the reviewed manual OAuth route."});return}if(command==="host"){const result=await runHostCommand(root,args);if(result!==void 0)print(result);return}if(command==="level1"){const operation=args.shift();if(operation==="login-command"&&args.length===1&&args[0]==="chatgpt"){print({ok:chatGptLoginCommand(),note:"Explicit setup steps: invoke before through the existing connector Action, then run command with args and env. This output launches nothing; complete the dedicated sign-in window, then resume onboarding."});return}if(operation==="sources"&&!args.length){print({ok:{sources:automaticLevel1SourceIds(),note:"Current automatic L1 routes; this excludes retired sources and is not an account-success count."}});return}const file=flag("--file"),output=flag("--out");if(operation==="native"){if(args.length||output)throw Error("Use level1 native [--file <nonsecret native-options.json>].");const input2=file?await readNativeLevel1Selection(resolve(file)):{};const app3=await openProduct(root);let result;try{result=await configureNativeLevel1(app3.context,input2)}finally{await app3.close()}print({ok:result,note:"Native L1 setup saved. Check source reads, then restart the background host to load saved changes. OS access controls still apply."});return}if(args.length||!["prepare","configure"].includes(operation??"")||operation==="configure"&&(!file||output))throw Error("Use level1 sources, level1 prepare [--file <nonsecret options.json>] [--out <configuration.json>], or level1 configure --file <configuration.json>.");const input=file?await readLevel1Configuration(resolve(file),{partial:operation==="prepare"}):void 0;if(file&&!input)throw Error("Level 1 configuration file does not exist.");if(operation==="configure"){await writeLevel1Configuration(join(root,"level1.json"),input);print({ok:{configured:input.sources?.length??0,reloadRequired:true,message:"Connection setup saved. Restart the background host and relaunch your app to load it. Existing accounts and data are kept."}});return}const app2=await openProduct(root);try{const plan=await prepareLevel1Configuration(app2.context.zortexVaultStore,input??{},{runtimeDirectory:join(root,"level1-runtime")});if(output)await writeLevel1Configuration(resolve(output),plan.configuration);print({ok:{...plan,configured:plan.configuration.sources.length,...output?{configurationFile:resolve(output)}:{},note:"Setup candidates use existing grants. Verify each installed Action; configured is not usable."}})}finally{await app2.close()}return}if(command==="action"&&args.length===2&&args[0]==="--json"){const input=JSON.parse(args[1]);if(input?.name==="connector.recover"&&input.params&&typeof input.params==="object"&&!Array.isArray(input.params)&&Object.keys(input.params).length===0&&Object.keys(input).every(key=>["name","params"].includes(key))){args.splice(0);command="recover"}}const recovering=command==="recover";if((command==="onboard"||recovering)&&args.length)throw Error("Use onboard or recover without source arguments.");const helpNoOpen=command==="help"&&args.length===1&&args[0]==="--no-open";if(command==="help"&&args.length&&!helpNoOpen)throw Error("Use indra --root <Vault> help [--no-open].");let enableHost=false;const ensureResident=()=>startResident(root,entrypoint);const app=await openProduct(root),gateway=createGateway(app.context,root,{entrypoint:"cli",configureFigma:async(mode,signal)=>{await ensureResident();return validateNativeFileResult("figma",await residentConfigureFigma(root,mode,signal))},configureFreshdesk:async(subdomain,signal)=>{await ensureResident();return validateNativeFileResult("freshdesk",await residentConfigureFreshdesk(root,subdomain,signal))},resident:async(request,signal)=>{await ensureResident();return residentGatewayCall(root,request,signal)},check:async(source,signal)=>{await ensureResident();return residentCheck(root,source,signal)},runWorkerSync:async(source,requestId,options)=>{await ensureResident();return residentSync(root,source,requestId,options)},read:async(source,request,signal)=>{await ensureResident();return residentRead(root,source,request,signal)},invoke:async(request,signal)=>{await ensureResident();return residentInvoke(root,request,signal)},connect:async(source,requestId,signal,settings)=>{await ensureResident();return settings?.gmailWrite?residentConnectGmailWrite(root,requestId,signal):settings?.readwiseMcpWrite?residentConnectReadwiseMcpWrite(root,requestId,signal):settings?.selectAccount?residentConnectRecovery(root,source,requestId,signal):settings?.reauthorize?residentConnectReauthorize(root,source,requestId,signal):residentConnect(root,source,requestId,signal,{automatic:!settings?.manualPresentation,...settings?.manualPresentation?{manualPresentation:settings.manualPresentation}:{}})},connectJob:async(requestId,signal)=>{await ensureResident();return residentConnectJob(root,requestId,signal)},cancelConnect:async(requestId,generation,challengeRef)=>{await ensureResident();return residentCancelConnect(root,requestId,generation,challengeRef)}});const observeUpdate=async normalLaunch=>{const posthog=app.context.get("zortexPostHog");if(posthog)await productUpdater.observe({runningVersion:await runningProductVersion,normalLaunch,record:receipt=>posthog.recordUpdateAttempt(receipt)}).catch(()=>{})};if(command!=="help")await observeUpdate(false);const residentReport=async(signal,enabled=true)=>{await ensureResident();const reply=await residentGatewayCall(root,{operation:"manage",args:{what:"onboarding",enabled}},signal);if(!("ok"in reply))throw Error("The background connection report is unavailable.");return reply.ok};const residentAuthorization={reconnectSaved:async(source,signal)=>{await ensureResident();return residentReconnectSaved(root,source,signal)},connect:async(source,requestId,signal,settings)=>{await ensureResident();return settings?.gmailWrite?residentConnectGmailWrite(root,requestId,signal):settings?.readwiseMcpWrite?residentConnectReadwiseMcpWrite(root,requestId,signal):settings?.selectAccount?residentConnectRecovery(root,source,requestId,signal):settings?.reauthorize?residentConnectReauthorize(root,source,requestId,signal):settings?.manualPresentation==="return-url"?residentConnectManual(root,source,requestId,signal):residentConnect(root,source,requestId,signal,{automatic:true})},job:async(requestId,signal)=>{await ensureResident();return residentConnectJob(root,requestId,signal)},cancel:async(requestId,generation,challengeRef)=>{await ensureResident();return residentCancelConnect(root,requestId,generation,challengeRef)},status:async signal=>{await ensureResident();return residentConnectorStatus(root,signal)},check:async(source,signal)=>{await ensureResident();return residentConnectorCheck(root,source,signal)},read:async(source,request,signal)=>{await ensureResident();return residentRead(root,source,request,signal)},configureWeChat:async(port,signal)=>{await ensureResident();return validateNativeFileResult("wechat",await residentConfigureWeChat(root,port,signal))},configureJoplin:async(selection,signal)=>{await ensureResident();return validateJoplinResult(await residentConfigureJoplin(root,selection,signal))},configureThunderbird:async(port,signal)=>{await ensureResident();return validateNativeFileResult("thunderbird",await residentConfigureThunderbird(root,port,signal))},configureZoom:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("zoom",await residentConfigureZoom(root,selection,signal))},configureBox:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("box",await residentConfigureBox(root,selection,signal))},configureFront:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("front",await residentConfigureFront(root,selection,signal))},configureHubSpot:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("hubspot",await residentConfigureHubSpot(root,selection,signal))},configureGoogleContacts:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("google-contacts",await residentConfigureGoogleContacts(root,selection,signal))},configureGoogleChat:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("google-chat",await residentConfigureGoogleChat(root,selection,signal))},configureSalesforce:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("salesforce",await residentConfigureSalesforce(root,selection,signal))},configureDropbox:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("dropbox",await residentConfigureDropbox(root,selection,signal))},configureDiscord:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("discord",await residentConfigureDiscord(root,selection,signal))},configureProtonMail:async(port,signal)=>{await ensureResident();return validateNativeFileResult("proton-mail",await residentConfigureProtonMail(root,port,signal))},configureZulip:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("zulip",await residentConfigureZulip(root,selection,signal))},configureFreshRSS:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("freshrss",await residentConfigureFreshRSS(root,selection,signal))},configureMiniflux:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("miniflux",await residentConfigureMiniflux(root,selection,signal))},configureMattermost:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("mattermost",await residentConfigureMattermost(root,selection,signal))},configureWallabag:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("wallabag",await residentConfigureWallabag(root,selection,signal))},configureCalcom:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("calcom",await residentConfigureCalcom(root,selection,signal))},configureWakatime:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("wakatime",await residentConfigureWakatime(root,selection,signal))},configureNextcloud:async(instanceUrl,signal)=>{await ensureResident();return validateNativeFileResult("nextcloud",await residentConfigureNextcloud(root,instanceUrl,signal))},configureFigma:async(mode,signal)=>{await ensureResident();return validateNativeFileResult("figma",await residentConfigureFigma(root,mode,signal))},configureSmartsheet:async(region,signal)=>{await ensureResident();return validateNativeFileResult("smartsheet",await residentConfigureSmartsheet(root,region,signal))},configureZendesk:async(selection,signal)=>{await ensureResident();return validateNativeFileResult("zendesk",await residentConfigureZendesk(root,selection,signal))},configureFreshdesk:async(subdomain,signal)=>{await ensureResident();return validateNativeFileResult("freshdesk",await residentConfigureFreshdesk(root,subdomain,signal))},configureCopyQ:async(executable,session,signal)=>{await ensureResident();return validateNativeFileResult("copyq",await residentConfigureCopyQ(root,executable,session,signal))},configureOwnTracks:async(port,signal)=>{await ensureResident();return validateNativeFileResult("owntracks",await residentConfigureOwnTracks(root,port,signal))},configureZotero:async(libraryId,libraryType,signal)=>{await ensureResident();return validateNativeFileResult("zotero",await residentConfigureZotero(root,libraryId,libraryType,signal))},configureNativeFiles:async(source,roots,signal)=>{await ensureResident();return validateNativeFileResult(source,await residentConfigureNativeFiles(root,source,roots,signal))}};try{if(command==="help"){const stop=new AbortController,cancel=()=>stop.abort();process.once("SIGINT",cancel);process.once("SIGTERM",cancel);try{await app.context.get("loader")?.await();await ensureResident();const report=await residentReport(stop.signal);const help=await startGuidedRecovery(app.context,{sources:report.sources,authorization:residentAuthorization});const end=()=>{void help.close()};stop.signal.addEventListener("abort",end,{once:true});const opened=!helpNoOpen&&await openConnectionHelpUrl(help.url);print({help:{url:help.url,expiresAt:help.expiresAt,opened,message:"Connect and manage apps in the main application. Keep this command running while using it. Other connections continue in the background; press Ctrl+C to close the application."},waitingForAgent:true});try{await help.closed}finally{stop.signal.removeEventListener("abort",end);await help.close()}const final=help.snapshot(),all=[...final.sources,...final.others];print({ok:{ready:all.filter(row=>row.state==="complete").length,total:all.length,sources:all.map(({source,state})=>({source,state}))}})}finally{process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}if(command==="onboard"||recovering){const stop=new AbortController,cancel=()=>stop.abort();process.once("SIGINT",cancel);process.once("SIGTERM",cancel);const autoEnabled=!/^(0|false|off|no)$/i.test((process.env.ZORTEX_AUTO_CONNECT??"").trim());if(!recovering&&!autoEnabled){try{const report=await readOnboardingReport(app.context,{enabled:false,signal:stop.signal});process.exitCode=2;print({err:{code:"onboarding_incomplete",layer:"service",message:"Automatic connection is disabled."},report})}finally{process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}await startResident(root,entrypoint);try{if(!recovering)await residentInitialConnections(root,stop.signal);const report=await residentReport(stop.signal);if((recovering||needsGuidedRecovery(report))&&!stop.signal.aborted){const recovery=await startGuidedRecovery(app.context,{sources:report.sources,authorization:residentAuthorization});const endRecovery=()=>{void recovery.close()};stop.signal.addEventListener("abort",endRecovery,{once:true});if(stop.signal.aborted)endRecovery();try{const opened=await openConnectionHelpUrl(recovery.url);print({report,recovery:{url:recovery.url,expiresAt:recovery.expiresAt,opened,message:"Continue the remaining connections from Apps. Each app shows its sign-in, setup and recovery steps. Keep this process running while using the application; other sources continue in the background."},waitingForAgent:true});await recovery.done;const final=recovery.snapshot();enableHost=!stop.signal.aborted&&(!recovering||final.success);print(final.success?{ok:final}:{err:{code:"onboarding_incomplete",layer:"service",message:"Some sources are still not connected. Connected sources are kept; run indra --root <Vault> help to continue."},report:final});await keepRecoverySurfaceOpen(recovery,opened,stop.signal)}finally{stop.signal.removeEventListener("abort",endRecovery);await recovery.close()}}else{enableHost=!stop.signal.aborted&&(!recovering||report.success);print(report.success?{ok:report}:{err:{code:"onboarding_incomplete",layer:"service",message:"Some sources are still being set up. Autopilot continues in the background; the report shows usable apps and any specific next step."},report})}}finally{process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}if(command==="mcp"){if(args.length)throw Error("Unknown MCP arguments.");await startResident(root,entrypoint);const handle=startMcp(gateway,{onUpdateObservation:observeUpdate,telemetry:()=>app.context.get("zortexTelemetry")}),startup={done:residentInitialConnections(root),async close(){}};try{await new Promise(done=>{const close=()=>{void handle.close().finally(done)};process.stdin.once("end",close);process.once("SIGINT",close);process.once("SIGTERM",close)})}finally{await startup.close()}return}const raw=flag("--json");let operation=command??"",input=raw?JSON.parse(raw):{};if(command==="search"||command==="sql"){operation="search";if(!raw)input={sql:flag("--sql")}}if(command==="plugins"||command==="vault"||command==="status"){operation="manage";if(!raw)input={what:command==="plugins"?"plugins":command}}if(command==="connect"){const source=flag("--source"),location=flag("--location"),presentation=flag("--presentation");if(!source)throw Error("Pass --source.");if(presentation!==void 0&&presentation!=="open"&&presentation!=="return-url")throw Error("Use --presentation open or --presentation return-url.");if(location){if(source!=="chrome-history"||raw||args.length)throw Error("Directory selection is supported only for Chrome.");await withFeedbackFlow(source,async()=>{const metrics=()=>app.context.get("zortexTelemetry"),trace=createTraceRecorder(metrics,source);await trace.step("source_selected","started");const started=performance.now(),result2=await app.context.zortexLocalSourceAccess.connect(source,resolve(location));const reason="err"in result2&&result2.err.code==="not_found"?"local_directory_unavailable":"provider_error";await trace.step("source_selected","err"in result2?"failed":"completed","err"in result2?{reason}:{});const observation={source,outcome:usageOutcome(result2),durationMs:Math.min(864e5,performance.now()-started),internal:true};const saved=await metrics()?.record({operation:"connector.connect",...observation});if(saved&&"err"in saved)process.stderr.write("indra feedback: connection observation was not recorded.\n");if("err"in result2){const final=await metrics()?.record({operation:"connector.authorization",...observation,code:reason,trace:{flowId:trace.flowId,stage:"authorization_finished",state:"failed",mode:"manual",trigger:"tool"}});if(final&&"err"in final)process.stderr.write("indra feedback: authorization observation was not recorded.\n")}print(result2)},{flowId:randomUUID(),source,mode:"manual",trigger:"tool"});return}if(!presentation){if(raw)throw Error("Automatic connect does not accept --json. Pass --source <source>.");if(args.length)throw Error("Unknown CLI arguments.");if(!/^[a-z][a-z0-9-]{0,63}$/.test(source))throw Error("Source must be a lowercase connector id.");await ensureResident();const automatic=await residentConnectAutomatic(root,source,randomUUID());const job="ok"in automatic&&automatic.ok&&typeof automatic.ok==="object"?automatic.ok:void 0;if(job?.state==="connected"||job?.state==="cancelled"){print(automatic);return}if(job?.state==="waiting-user"&&job.id){let opened=false;if(!job.automationActive&&!job.browserContinuation&&job.authorizationUrl)try{await openConnectionUrl(job.authorizationUrl);opened=true}catch{}print({automatic,continuation:{opened,message:"Continue the retained authorization transaction with the available tools. A browserContinuation supplies the existing browser session; use browser.observe, then its returned controls, while this command polls provider verification."},waitingForAgent:job.automationActive!==true});const signature=current=>JSON.stringify([current.automationActive,current.browserContinuation,current.authorizationUrl,current.instructions]);let observed=signature(job);const stop=new AbortController,cancel=()=>stop.abort();process.once("SIGINT",cancel);process.once("SIGTERM",cancel);try{print(await waitForAuthorization(async id=>{const next=await residentConnectJob(root,id,stop.signal);if("ok"in next&&next.ok.state==="waiting-user"&&signature(next.ok)!==observed){observed=signature(next.ok);print({authorization:next.ok,waitingForAgent:next.ok.automationActive!==true})}return next},job.id,{signal:stop.signal}))}finally{if(stop.signal.aborted&&Number.isSafeInteger(job.generation)&&job.challengeRef)await residentCancelConnect(root,job.id,job.generation,job.challengeRef).catch(()=>{});process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}print({automatic,fallback:{mode:"manual",message:"Automatic connection did not complete. Starting the reviewed manual authorization route."}});operation="action";input={name:"connector.connect",params:{source,presentation:"open"}}}else{operation="action";input={name:"connector.connect",params:{source,presentation}}}}if(command==="sync"){operation="action";const source=flag("--source")??"chrome-history",requestId=flag("--request-id");input={name:"connector.sync",params:{source,...requestId?{requestId}:{}}}}if(args.length)throw Error("Unknown CLI arguments.");const result=await gateway.call(operation,input);if(result&&typeof result==="object"&&"ok"in result)await observeUpdate(true);if(command==="connect"&&result&&typeof result==="object"&&"ok"in result){const job=result.ok;if(job.state==="waiting-user"&&job.id){print(result);const stop=new AbortController,cancel=()=>stop.abort();process.once("SIGINT",cancel);process.once("SIGTERM",cancel);try{print(await waitForAuthorization(async id=>await gateway.call("action",{name:"connector.job",params:{id}}),job.id,{signal:stop.signal}))}finally{if(stop.signal.aborted&&Number.isSafeInteger(job.generation)&&job.challengeRef)await residentCancelConnect(root,job.id,job.generation,job.challengeRef).catch(()=>{});process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}}print(result)}finally{try{await app.context.get("zortexConnectorHub")?.settleObservations?.({closing:true});const sent=await app.context.get("zortexPostHog")?.flush({wait:true});if(sent&&"err"in sent)process.stderr.write("indra feedback: delivery pending; retained for the next run.\n")}finally{await app.close()}if(enableHost){const entry=fileURLToPath(new URL("./cli.js",import.meta.url));try{print({host:{startup:await enableResident(root,entry),process:await startResident(root,entry)}})}catch{print({err:{code:"resident_start_failed",message:"Connections are kept. Run indra --root <Vault> host start to retry the background host."}})}}}}function print(result){process.stdout.write(JSON.stringify(result)+"\n");if(result&&typeof result==="object"&&"err"in result)process.exitCode=2}
|
|
1
|
+
import{resolve,isAbsolute}from"node:path";import{readFile}from"node:fs/promises";import{randomUUID}from"node:crypto";import{fileURLToPath}from"node:url";import{openProduct}from"./profile.js";import{runHostCommand}from"./resident-host.js";import{startResident,residentSync,residentConnect,residentConnectJob,residentCancelConnect,residentGatewayCall,residentEnsureReady,residentCheck,residentRead,residentInvoke}from"./resident-platform.js";import{createGateway}from"./gateway.js";import{startMcp}from"./mcp.js";import{launchWeb}from"./web.js";import{usageOutcome,withFeedbackFlow,createTraceRecorder}from"@zortexhq/plugin-telemetry/api";import{waitForAuthorization}from"./authorization.js";import{openConnectionUrl}from"@zortexhq/plugin-connector-core/browser";import{attributeProductInstallation}from"./installation-origin.js";import{configuredVaultRoot}from"./default-root.js";import{productUpdater}from"./auto-update.js";import{runningProductVersion}from"./update-telemetry.js";import{prepareCodexPlugin}from"./codex-setup.js";import{installCodexCatalog}from"./codex-install.js";const USAGE="indra --root <absolute Vault directory> <search|feedback|plugins|vault|status|connect|sync|action|manage|mcp|host>";const HELP={usage:USAGE,commands:{help:"Print command help.",connect:"Open one source connection gateway: --source <source>. Complete OAuth, QR pairing or local permission with your existing browser and computer tools. --presentation return-url prints the link without opening it. The command waits for provider verification.",search:"Read the Vault with --sql <query>. Credentials and private state are excluded.",actions:"Discover installed source actions with --json.",action:"Run a discovered source action with --json.",sync:"Read an authorized source into the Vault; --source <source> resumes its saved cursor.",status:"Show connection, fleet and process status as JSON.",feedback:"Rate a recent operation with fixed choices. --list shows receipts; --json submits programmatic feedback.",host:"Manage the background data host: start, stop, status, enable, disable, account-link or local-cloud.",mcp:"Expose the shared agent tools. Starting MCP does not connect accounts.",web:"Explicitly open the management application.",update:"Check and apply available updates.","setup codex":"Register the existing installation with Codex."}};const entrypoint=fileURLToPath(new URL("./cli.js",import.meta.url));export async function runIndraCli(argv=process.argv.slice(2)){const args=[...argv];if(args.length===1&&["--version","-v"].includes(args[0])){print({version:JSON.parse(await readFile(new URL("../package.json",import.meta.url),"utf8")).version});return}function flag(name){const at=args.indexOf(name);if(at<0)return void 0;const value=args[at+1];if(!value||value.startsWith("--"))throw Error("Missing "+name);args.splice(at,2);return value}if(args[0]==="web"&&!args.includes("--help"))return launchWeb(args.slice(1));if(!args.length||args.includes("--help")||args.includes("-h")||(args[0]==="help"||args[0]==="--root"&&args[2]==="help")){print(HELP);return}if(args[0]==="northstar"||args[0]==="--root"&&args[2]==="northstar"){const selectedRoot=flag("--root");args.shift();const operation=args.shift(),ref=flag("--install-ref");if(operation!=="attribute"||!ref||args.length)throw Error("Use indra northstar attribute --install-ref <website source code> [--root <absolute Vault directory>].");const root2=selectedRoot??await configuredVaultRoot({catalogFile:fileURLToPath(new URL("../codex/plugins/zortex/.mcp.json",import.meta.url))});if(!isAbsolute(root2))throw Error("Vault directory must be absolute.");print({ok:await attributeProductInstallation(resolve(root2),ref),note:"Website source saved locally. Usage is sent only when Zortex runs with telemetry enabled and network access. This is an installation identity, not a verified person."});return}if(args[0]==="setup"&&args[1]==="codex"){if(args.length===3&&args[2]==="--refresh"){print({ok:await installCodexCatalog({refresh:true})});return}args.splice(0,2);const output=flag("--out"),root2=flag("--root");if(!output||!root2||args.length)throw Error("Use indra setup codex --out <new absolute directory> --root <absolute Vault directory>, or indra setup codex --refresh.");print({ok:await prepareCodexPlugin({output,root:root2})});return}const selected=flag("--root");if(!selected||!isAbsolute(selected))throw Error("Use "+USAGE+". Run indra help for details.");const root=resolve(selected),command=args.shift();if(command==="feedback"){await(await import("./product-feedback.js")).bootstrapProductFeedback(["--root",root,"feedback",...args]);return}if(command==="host"){const result=await runHostCommand(root,args);if(result!==void 0)print(result);return}if(!["search","sql","plugins","vault","status","connect","sync","actions","action","manage","mcp","instruction","handbook"].includes(command??""))throw Error("Unknown command. Run indra help.");let resident;const ensureResident=()=>resident??=startResident(root,entrypoint).finally(()=>{resident=void 0});const app=await openProduct(root),gateway=createGateway(app.context,root,{entrypoint:"cli",resident:async(request,signal)=>{await ensureResident();return residentGatewayCall(root,request,signal)},ensureReady:async(source,signal)=>{await ensureResident();return residentEnsureReady(root,source,signal)},check:async(source,signal)=>{await ensureResident();return residentCheck(root,source,signal)},runWorkerSync:async(source,requestId,options)=>{await ensureResident();return residentSync(root,source,requestId,options)},read:async(source,request,signal)=>{await ensureResident();return residentRead(root,source,request,signal)},invoke:async(request,signal)=>{await ensureResident();return residentInvoke(root,request,signal)}});const observeUpdate=async normalLaunch=>{const posthog=app.context.get("zortexPostHog");if(posthog)await productUpdater.observe({runningVersion:await runningProductVersion,normalLaunch,record:receipt=>posthog.recordUpdateAttempt(receipt)}).catch(()=>{})};try{await observeUpdate(false);if(command==="mcp"){if(args.length)throw Error("Unknown MCP arguments.");await ensureResident();const handle=startMcp(gateway,{onUpdateObservation:observeUpdate,telemetry:()=>app.context.get("zortexTelemetry")});await new Promise(done=>{const close=()=>{process.stdin.removeListener("end",close);process.removeListener("SIGINT",close);process.removeListener("SIGTERM",close);void handle.close().finally(done)};process.stdin.once("end",close);process.once("SIGINT",close);process.once("SIGTERM",close)});return}const raw=flag("--json");let operation=command??"",input=raw?JSON.parse(raw):{};if(command==="search"||command==="sql"){operation="search";if(!raw)input={sql:flag("--sql")}}if(command==="plugins"||command==="vault"||command==="status"){operation="manage";if(!raw)input={what:command}}if(command==="connect"){const source=flag("--source"),location=flag("--location"),presentation=flag("--presentation")??"open";if(!source||!/^[a-z][a-z0-9-]{0,63}$/.test(source))throw Error("Pass --source <lowercase connector id>.");if(raw||args.length||!["open","return-url"].includes(presentation))throw Error("Use connect --source <source> [--presentation open|return-url].");if(location){if(source!=="chrome-history"||raw||args.length)throw Error("Directory selection is supported only for Chrome.");await withFeedbackFlow(source,async()=>{const metrics=()=>app.context.get("zortexTelemetry"),trace=createTraceRecorder(metrics,source);await trace.step("source_selected","started");const started=performance.now(),result2=await app.context.zortexLocalSourceAccess.connect(source,resolve(location));const reason="err"in result2&&result2.err.code==="not_found"?"local_directory_unavailable":"provider_error";await trace.step("source_selected","err"in result2?"failed":"completed","err"in result2?{reason}:{});const observation={source,outcome:usageOutcome(result2),durationMs:Math.min(864e5,performance.now()-started),internal:true};const saved=await metrics()?.record({operation:"connector.connect",...observation});if(saved&&"err"in saved)process.stderr.write("indra feedback: connection observation was not recorded.\n");if("err"in result2){const final=await metrics()?.record({operation:"connector.authorization",...observation,code:reason,trace:{flowId:trace.flowId,stage:"authorization_finished",state:"failed",mode:"manual",trigger:"tool"}});if(final&&"err"in final)process.stderr.write("indra feedback: authorization observation was not recorded.\n")}print(result2)},{flowId:randomUUID(),source,mode:"manual",trigger:"tool"});return}await ensureResident();const stop=new AbortController,cancel=()=>stop.abort();process.once("SIGINT",cancel);process.once("SIGTERM",cancel);let job;try{const result2=await residentConnect(root,source,randomUUID(),stop.signal,{automatic:false,manualPresentation:"return-url"});job="ok"in result2&&result2.ok&&typeof result2.ok==="object"?result2.ok:void 0;if(job?.state!=="waiting-user"||!job.id){print(result2);return}let opened=false;if(presentation==="open"&&job.authorizationUrl)try{await openConnectionUrl(job.authorizationUrl);opened=true}catch{}print({...result2,opened,waitingForAgent:true});const signature=value=>JSON.stringify([value.authorizationUrl,value.instructions,value.authorizationImage,value.devicePrompt]);let seen=signature(job);print(await waitForAuthorization(async id=>{const next=await residentConnectJob(root,id,stop.signal);if("ok"in next&&next.ok.state==="waiting-user"&&signature(next.ok)!==seen){seen=signature(next.ok);print({ok:next.ok,waitingForAgent:true})}return next},job.id,{signal:stop.signal}))}finally{if(stop.signal.aborted&&job&&Number.isSafeInteger(job.generation)&&job.challengeRef)await residentCancelConnect(root,job.id,job.generation,job.challengeRef).catch(()=>{});process.removeListener("SIGINT",cancel);process.removeListener("SIGTERM",cancel)}return}if(command==="sync"){operation="action";const source=flag("--source")??"chrome-history",requestId=flag("--request-id");input={name:"connector.sync",params:{source,...requestId?{requestId}:{}}}}if(args.length)throw Error("Unknown CLI arguments.");const result=await gateway.call(operation,input);if(result&&typeof result==="object"&&"ok"in result)await observeUpdate(true);print(result)}finally{try{await app.context.get("zortexConnectorHub")?.settleObservations?.({closing:true});const sent=await app.context.get("zortexPostHog")?.flush({wait:true});if(sent&&"err"in sent)process.stderr.write("indra feedback: delivery pending; retained for the next run.\n")}finally{await app.close()}}}function print(result){process.stdout.write(JSON.stringify(result)+"\n");if(result&&typeof result==="object"&&"err"in result)process.exitCode=2}
|
package/dist/codex-setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{access,mkdir,readFile,writeFile,realpath}from"node:fs/promises";import{join,isAbsolute,relative,sep,resolve,dirname,basename}from"node:path";import{fileURLToPath}from"node:url";export async function codexMcpConfiguration(root){const syncEnv=/^(0|false|off|no)$/i.test((process.env.ZORTEX_AUTO_SYNC??"").trim())?{ZORTEX_AUTO_SYNC:"0"}:void 0;const cli=fileURLToPath(new URL("./cli.js",import.meta.url));const prefix=resolve(dirname(cli),"../../../..");const candidate=join(prefix,"runtime",process.platform==="win32"?"node.exe":"bin/node");const executable=await access(candidate).then(()=>candidate,()=>process.execPath);return{mcpServers:{zortex:{command:executable,args:[cli,"--root",resolve(root),"mcp"],startup_timeout_sec:60,...syncEnv?{env:syncEnv}:{},env_vars:["
|
|
1
|
+
import{access,mkdir,readFile,writeFile,realpath}from"node:fs/promises";import{join,isAbsolute,relative,sep,resolve,dirname,basename}from"node:path";import{fileURLToPath}from"node:url";export async function codexMcpConfiguration(root){const syncEnv=/^(0|false|off|no)$/i.test((process.env.ZORTEX_AUTO_SYNC??"").trim())?{ZORTEX_AUTO_SYNC:"0"}:void 0;const cli=fileURLToPath(new URL("./cli.js",import.meta.url));const prefix=resolve(dirname(cli),"../../../..");const candidate=join(prefix,"runtime",process.platform==="win32"?"node.exe":"bin/node");const executable=await access(candidate).then(()=>candidate,()=>process.execPath);return{mcpServers:{zortex:{command:executable,args:[cli,"--root",resolve(root),"mcp"],startup_timeout_sec:60,...syncEnv?{env:syncEnv}:{},env_vars:["ZORTEX_TELEMETRY","DO_NOT_TRACK",...syncEnv?[]:["ZORTEX_AUTO_SYNC"]]}}}}export async function prepareCodexPlugin(options){if(!isAbsolute(options.output)||!isAbsolute(options.root))throw Error("Codex output and Vault root must be absolute directories.");const syncEnv=/^(0|false|off|no)$/i.test((process.env.ZORTEX_AUTO_SYNC??"").trim())?{ZORTEX_AUTO_SYNC:"0"}:void 0;const output=resolve(options.output),root=resolve(options.root);const canonical=async path=>{try{return await realpath(path)}catch(error){if(error.code!=="ENOENT"||dirname(path)===path)throw error;return join(await canonical(dirname(path)),basename(path))}};const within=(parent,child)=>{const path=relative(parent,child);return path===""||!isAbsolute(path)&&path!==".."&&!path.startsWith(".."+sep)};const[outputTarget,rootTarget]=await Promise.all([canonical(output),canonical(root)]);if(within(outputTarget,rootTarget)||within(rootTarget,outputTarget))throw Error("Codex plugin output and private Vault must be separate directories.");const installed=JSON.parse(await readFile(new URL("../package.json",import.meta.url),"utf8"));const mcp=await codexMcpConfiguration(root);await mkdir(output);const plugin=join(output,"plugins","zortex");await mkdir(join(output,".agents","plugins"),{recursive:true});await mkdir(join(plugin,".codex-plugin"),{recursive:true});const json=(path,value)=>writeFile(path,JSON.stringify(value,null,2)+"\n",{flag:"wx"});await json(join(plugin,".codex-plugin","plugin.json"),{name:"zortex",version:installed.version,description:"Read connected sources through one local Vault and use existing agent tools for connection.",author:{name:"ZortexHQ"},mcpServers:"./.mcp.json"});await json(join(plugin,".mcp.json"),mcp);await json(join(output,".agents","plugins","marketplace.json"),{name:"zortex-local",interface:{displayName:"Zortex (local npm installation)"},plugins:[{name:"zortex",source:{source:"local",path:"./plugins/zortex"},policy:{installation:"AVAILABLE",authentication:"ON_INSTALL"},category:"Productivity"}]});return{marketplace:output,plugin,root,registered:false,installationSteps:[{command:"codex",args:["plugin","marketplace","add",output]},{command:"codex",args:["plugin","add","zortex@zortex-local"]}],next:(syncEnv?"Keep ZORTEX_AUTO_SYNC=0 when the requested installation stops before full sync. ":"")+"Register this installation with the two commands above. No account connection starts during installation or MCP startup. When the user requests a source, run indra --root <Vault> connect --source <source>; complete its actual OAuth, QR or permission gateway with the existing signed-in browser and ordinary CUA tools. Keep the command running for provider verification. Search and source Actions remain available through MCP. Keep this npm installation available."}}
|
package/dist/connector-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{resolve}from"node:path";import{Original}from"@zortexhq/plugin-connector-framework/api";import{oauthCredentialResourceId}from"@zortexhq/plugin-vault-sqlite/api";import{createCustodiedGmailSync}from"@zortexhq/plugin-connector-gmail/custodied-sync";import{createCustodiedDriveSync}from"@zortexhq/plugin-connector-drive/custodied-full";import{createCalendarProvider}from"@zortexhq/plugin-connector-calendar";import{createYouTubeProvider}from"@zortexhq/plugin-connector-youtube";import{createSlackMessageSync}from"@zortexhq/plugin-connector-slack";import{createOutlookMailSync}from"@zortexhq/plugin-connector-outlook/mail-sync";import{createSocialProvider}from"@zortexhq/plugin-connector-social";import{openProfile}from"./profile.js";const codeVersion=source2=>source2==="chrome-history"?"zortex-v3/chrome-history@0.1.0+6315429c":"indra-v2/"+source2+"@0.1.0+full-sync";const[root,profile,source]=process.argv.slice(2);async function main(){const runId=process.env.ZORTEX_PROCESS_RUN_ID;if(!root||!profile||!source||!runId)throw Error("Worker requires trusted selection and run identity.");process.env.ZORTEX_ENGINE_ROOT=resolve(root);const app=await openProfile(profile,"worker");const selectedBindingId=process.env.ZORTEX_SELECTED_BINDING_ID,selectedGrantId=process.env.ZORTEX_SELECTED_GRANT_ID,selectedScopeEpoch=Number(process.env.ZORTEX_SELECTED_SCOPE_EPOCH);if(selectedBindingId){if(!selectedGrantId||!Number.isSafeInteger(selectedScopeEpoch)||selectedScopeEpoch<0)throw Error("Worker requires a complete selected authority fence.");const vault=app.context.zortexVaultStore,custody=vault.bindingCustody;const resolved=await custody.resolve({kind:"binding",bindingId:selectedBindingId});if(!Original.isOk(resolved)||resolved.ok.kind!=="resolved"||resolved.ok.binding.identity.source!==source||resolved.ok.binding.state!=="connected")throw Error("Selected worker binding is unavailable.");const binding=resolved.ok.binding,nativeSubject=binding.identity.subject;if(typeof nativeSubject!=="string"||!nativeSubject.trim())throw Error("This native worker requires a verified upstream account; an opaque MCP session is not a native identity.");const grant=await custody.grantForBinding(binding.id,"L1",binding.provider);if(!Original.isOk(grant)||!grant.ok||grant.ok.id!==selectedGrantId||grant.ok.scopeEpoch!==selectedScopeEpoch||grant.ok.state!=="active")throw Error("Selected worker grant changed.");const resourceId=oauthCredentialResourceId(binding.id),authorization={purpose:"L1",audience:binding.provider};const captured=await custody.credentialSnapshot(resourceId,authorization);if(!Original.isOk(captured)||captured.ok.binding.id!==binding.id||captured.ok.grant.id!==grant.ok.id||captured.ok.grant.scopeEpoch!==selectedScopeEpoch||captured.ok.material.kind!=="oauth")throw Error("Selected worker credential fence changed.");let snapshot=captured.ok;const connection=vault.connection.bind(vault),credential=vault.credential.bind(vault),updateCredential=vault.updateCredential.bind(vault);vault.connection=async requested=>requested===source?Original.ok({source,provider:binding.provider,account:binding.account,accountId:nativeSubject,scopes:[...snapshot.grant.scopes],state:"connected",updatedAt:binding.updatedAt}):connection(requested);vault.credential=async requested=>requested===source&&snapshot.material.kind==="oauth"?Original.ok(structuredClone(snapshot.material.credential)):credential(requested);vault.updateCredential=async(requested,next)=>{if(requested!==source)return updateCredential(requested,next);const refreshed=await custody.refreshResource(snapshot,{kind:"resident"},async current=>current.binding.id===binding.id&¤t.grant.id===selectedGrantId&¤t.grant.scopeEpoch===selectedScopeEpoch?Original.ok({kind:"oauth",credential:next}):Original.errResult({code:"permission_denied",layer:"auth",retryability:"non-retryable",message:"Selected worker authority changed during refresh."}));if(!Original.isOk(refreshed))return refreshed;snapshot=refreshed.ok;return Original.ok(void 0)}}let withdraw,withdrawAuthority,closeSource;const bindGrant=(name,grant)=>app.context.zortexSqliteVault.registerConnectorAuthority(name,origin=>origin.grant===grant?Original.ok(true):Original.errResult({code:"permission_denied",layer:"auth",retryability:"non-retryable",message:"Authorization changed during sync."}));const budget=Number(process.env.ZORTEX_SYNC_BUDGET_MS),runSignal=Number.isSafeInteger(budget)&&budget>0?AbortSignal.timeout(budget):void 0;try{if(source==="gmail"){const built=await createCustodiedGmailSync({parts:app.context.zortexOriginalAuthoring,provider:app.context.zortexOriginalProviderRead,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});if(!Original.isOk(built)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,built,codeVersion(source));process.exitCode=2;return}closeSource=()=>built.ok.close();const current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(current)||!current.ok){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Gmail connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}const checked=await built.ok.assertCurrent();if(!Original.isOk(checked)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,checked,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:built.ok.grant.id,account:built.ok.accountId,updatedAt:current.ok.updatedAt,scopes:built.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.ok.connector,()=>built.ok.resolveGrant())}else if(source==="google-drive"){const built=createCustodiedDriveSync({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore,content:()=>app.context.reflect.get("zortexDriveContent")});closeSource=()=>built.close();const grant=await built.resolveGrant();if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}const epoch=built.currentEpoch();if(!epoch){const failed=Original.errResult({code:"failed_precondition",layer:"auth",retryability:"non-retryable",message:"Drive grant has no connected account epoch."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:epoch.accountId,updatedAt:epoch.updatedAt,scopes:epoch.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="google-calendar"){const built=createCalendarProvider({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt||!grant.ok.account){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Calendar connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:grant.ok.account,updatedAt:current.ok.updatedAt,scopes:grant.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="youtube"){const built=createYouTubeProvider({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt||!grant.ok.account){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"YouTube connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:grant.ok.account,updatedAt:current.ok.updatedAt,scopes:grant.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="slack"){const built=createSlackMessageSync({vault:app.context.zortexVaultStore,transport:app.context.zortexConnectorHttp,parts:app.context.zortexOriginalAuthoring,...runSignal?{signal:runSignal}:{}});closeSource=()=>built.close();const grant=await built.resolveGrant();if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}withdrawAuthority=bindGrant(source,grant.ok.id);withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="outlook"){const built=createOutlookMailSync({vault:app.context.zortexVaultStore,transport:app.context.zortexConnectorHttp,...runSignal?{signal:runSignal}:{}});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Outlook connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=bindGrant(source,grant.ok.id);withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="x"||source==="instagram"){const browserDriver=()=>app.context.get("zortexOAuthBrowserDriver");const built=createSocialProvider(source,{vault:app.context.zortexVaultStore,browserDriver});closeSource=()=>built.close();if(!built.connector||!built.resolveGrant)throw Error("Social source has no full read.");const grant=await built.resolveGrant();if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}withdrawAuthority=bindGrant(source,grant.ok.id);withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source!=="chrome-history"&&source!=="google-chrome"&&source!=="microsoft-edge")throw Error("Unknown original sync source.");const result=await app.context.zortexOriginalSync.run(source,runSignal?{signal:runSignal}:{});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,result,codeVersion(source));const partial=source!=="chrome-history"&&Original.isOk(result)&&result.ok.error===void 0&&result.ok.runFailed!==true&&result.ok.stopped===true;if(!Original.isOk(result)||result.ok.error!==void 0||result.ok.runFailed===true||!partial&&(result.ok.stopped===true||result.ok.state!=="IDLE"))process.exitCode=2}finally{withdraw?.();withdrawAuthority?.();await closeSource?.();await app.close()}}main().catch(()=>{process.stderr.write("Worker could not commit a business receipt.\n");process.exitCode=2});
|
|
2
|
+
import{resolve}from"node:path";import{Original}from"@zortexhq/plugin-connector-framework/api";import{oauthCredentialResourceId}from"@zortexhq/plugin-vault-sqlite/api";import{createCustodiedGmailSync}from"@zortexhq/plugin-connector-gmail/custodied-sync";import{createCustodiedDriveSync}from"@zortexhq/plugin-connector-drive/custodied-full";import{createCalendarProvider}from"@zortexhq/plugin-connector-calendar";import{createYouTubeProvider}from"@zortexhq/plugin-connector-youtube";import{createSlackMessageSync}from"@zortexhq/plugin-connector-slack";import{createOutlookMailSync}from"@zortexhq/plugin-connector-outlook/mail-sync";import{openProfile}from"./profile.js";const codeVersion=source2=>source2==="chrome-history"?"zortex-v3/chrome-history@0.1.0+6315429c":"indra-v2/"+source2+"@0.1.0+full-sync";const[root,profile,source]=process.argv.slice(2);async function main(){const runId=process.env.ZORTEX_PROCESS_RUN_ID;if(!root||!profile||!source||!runId)throw Error("Worker requires trusted selection and run identity.");process.env.ZORTEX_ENGINE_ROOT=resolve(root);const app=await openProfile(profile,"worker");const selectedBindingId=process.env.ZORTEX_SELECTED_BINDING_ID,selectedGrantId=process.env.ZORTEX_SELECTED_GRANT_ID,selectedScopeEpoch=Number(process.env.ZORTEX_SELECTED_SCOPE_EPOCH);if(selectedBindingId){if(!selectedGrantId||!Number.isSafeInteger(selectedScopeEpoch)||selectedScopeEpoch<0)throw Error("Worker requires a complete selected authority fence.");const vault=app.context.zortexVaultStore,custody=vault.bindingCustody;const resolved=await custody.resolve({kind:"binding",bindingId:selectedBindingId});if(!Original.isOk(resolved)||resolved.ok.kind!=="resolved"||resolved.ok.binding.identity.source!==source||resolved.ok.binding.state!=="connected")throw Error("Selected worker binding is unavailable.");const binding=resolved.ok.binding,nativeSubject=binding.identity.subject;if(typeof nativeSubject!=="string"||!nativeSubject.trim())throw Error("This native worker requires a verified upstream account; an opaque MCP session is not a native identity.");const grant=await custody.grantForBinding(binding.id,"L1",binding.provider);if(!Original.isOk(grant)||!grant.ok||grant.ok.id!==selectedGrantId||grant.ok.scopeEpoch!==selectedScopeEpoch||grant.ok.state!=="active")throw Error("Selected worker grant changed.");const resourceId=oauthCredentialResourceId(binding.id),authorization={purpose:"L1",audience:binding.provider};const captured=await custody.credentialSnapshot(resourceId,authorization);if(!Original.isOk(captured)||captured.ok.binding.id!==binding.id||captured.ok.grant.id!==grant.ok.id||captured.ok.grant.scopeEpoch!==selectedScopeEpoch||captured.ok.material.kind!=="oauth")throw Error("Selected worker credential fence changed.");let snapshot=captured.ok;const connection=vault.connection.bind(vault),credential=vault.credential.bind(vault),updateCredential=vault.updateCredential.bind(vault);vault.connection=async requested=>requested===source?Original.ok({source,provider:binding.provider,account:binding.account,accountId:nativeSubject,scopes:[...snapshot.grant.scopes],state:"connected",updatedAt:binding.updatedAt}):connection(requested);vault.credential=async requested=>requested===source&&snapshot.material.kind==="oauth"?Original.ok(structuredClone(snapshot.material.credential)):credential(requested);vault.updateCredential=async(requested,next)=>{if(requested!==source)return updateCredential(requested,next);const refreshed=await custody.refreshResource(snapshot,{kind:"resident"},async current=>current.binding.id===binding.id&¤t.grant.id===selectedGrantId&¤t.grant.scopeEpoch===selectedScopeEpoch?Original.ok({kind:"oauth",credential:next}):Original.errResult({code:"permission_denied",layer:"auth",retryability:"non-retryable",message:"Selected worker authority changed during refresh."}));if(!Original.isOk(refreshed))return refreshed;snapshot=refreshed.ok;return Original.ok(void 0)}}let withdraw,withdrawAuthority,closeSource;const bindGrant=(name,grant)=>app.context.zortexSqliteVault.registerConnectorAuthority(name,origin=>origin.grant===grant?Original.ok(true):Original.errResult({code:"permission_denied",layer:"auth",retryability:"non-retryable",message:"Authorization changed during sync."}));const budget=Number(process.env.ZORTEX_SYNC_BUDGET_MS),runSignal=Number.isSafeInteger(budget)&&budget>0?AbortSignal.timeout(budget):void 0;try{if(source==="gmail"){const built=await createCustodiedGmailSync({parts:app.context.zortexOriginalAuthoring,provider:app.context.zortexOriginalProviderRead,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});if(!Original.isOk(built)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,built,codeVersion(source));process.exitCode=2;return}closeSource=()=>built.ok.close();const current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(current)||!current.ok){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Gmail connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}const checked=await built.ok.assertCurrent();if(!Original.isOk(checked)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,checked,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:built.ok.grant.id,account:built.ok.accountId,updatedAt:current.ok.updatedAt,scopes:built.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.ok.connector,()=>built.ok.resolveGrant())}else if(source==="google-drive"){const built=createCustodiedDriveSync({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore,content:()=>app.context.reflect.get("zortexDriveContent")});closeSource=()=>built.close();const grant=await built.resolveGrant();if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}const epoch=built.currentEpoch();if(!epoch){const failed=Original.errResult({code:"failed_precondition",layer:"auth",retryability:"non-retryable",message:"Drive grant has no connected account epoch."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:epoch.accountId,updatedAt:epoch.updatedAt,scopes:epoch.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="google-calendar"){const built=createCalendarProvider({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt||!grant.ok.account){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Calendar connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:grant.ok.account,updatedAt:current.ok.updatedAt,scopes:grant.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="youtube"){const built=createYouTubeProvider({parts:app.context.zortexOriginalAuthoring,auth:app.context.zortexGoogleAuth,vault:app.context.zortexVaultStore});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt||!grant.ok.account){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"YouTube connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=app.context.zortexSqliteVault.registerConnectedSourceAuthority(source,{grant:grant.ok.id,account:grant.ok.account,updatedAt:current.ok.updatedAt,scopes:grant.ok.scopes});withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="slack"){const built=createSlackMessageSync({vault:app.context.zortexVaultStore,transport:app.context.zortexConnectorHttp,parts:app.context.zortexOriginalAuthoring,...runSignal?{signal:runSignal}:{}});closeSource=()=>built.close();const grant=await built.resolveGrant();if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}withdrawAuthority=bindGrant(source,grant.ok.id);withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source==="outlook"){const built=createOutlookMailSync({vault:app.context.zortexVaultStore,transport:app.context.zortexConnectorHttp,...runSignal?{signal:runSignal}:{}});closeSource=()=>built.close();const grant=await built.resolveGrant(),current=await app.context.zortexVaultStore.connection(source);if(!Original.isOk(grant)){app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,grant,codeVersion(source));process.exitCode=2;return}if(!Original.isOk(current)||!current.ok?.updatedAt){const failed=Original.errResult({code:"unauthenticated",layer:"auth",retryability:"non-retryable",message:"Outlook connection changed before sync admission."});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,failed,codeVersion(source));process.exitCode=2;return}withdrawAuthority=bindGrant(source,grant.ok.id);withdraw=app.context.zortexOriginalSync.register(built.connector,async()=>Original.ok(grant.ok))}else if(source!=="chrome-history"&&source!=="google-chrome"&&source!=="microsoft-edge")throw Error("Unknown original sync source.");const result=await app.context.zortexOriginalSync.run(source,runSignal?{signal:runSignal}:{});app.context.zortexConnectorProcessJournal.writeBusiness(runId,source,result,codeVersion(source));const partial=source!=="chrome-history"&&Original.isOk(result)&&result.ok.error===void 0&&result.ok.runFailed!==true&&result.ok.stopped===true;if(!Original.isOk(result)||result.ok.error!==void 0||result.ok.runFailed===true||!partial&&(result.ok.stopped===true||result.ok.state!=="IDLE"))process.exitCode=2}finally{withdraw?.();withdrawAuthority?.();await closeSource?.();await app.close()}}main().catch(()=>{process.stderr.write("Worker could not commit a business receipt.\n");process.exitCode=2});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{businessError,ok}from"@zortexhq/plugin-connector-framework/api";const SOURCE_ALIASES={"drive":"google-drive","google-drive":"google-drive","google-calendar":"google-calendar","calendar":"google-calendar","google-mail":"gmail","gmail":"gmail"};const object=value=>!!value&&typeof value==="object"&&!Array.isArray(value);const text=value=>typeof value==="string"?value:"";const bounded=(value,max=800)=>value.length<=max?value:value.slice(0,max);const iso=value=>typeof value==="string"&&Number.isFinite(Date.parse(value));const queryText=value=>value.trim().replace(/\s+/gu," ");const escapeLike=value=>value.replace(/[\\%_]/gu,match=>"\\"+match);export function parseContentFindRequest(value){if(!object(value)||Object.keys(value).some(key=>!["query","source","since","until","limit","cursor","freshness"].includes(key)))return businessError("invalid_argument","Pass query and optional source, since, until, limit, cursor and freshness.","kernel");const query=typeof value.query==="string"?queryText(value.query):"";if(!query||Buffer.byteLength(query)>4096)return businessError("invalid_argument","query must be nonempty and at most 4096 bytes.","kernel");let source;if(value.source!==void 0){if(typeof value.source!=="string")return businessError("invalid_argument","source must be a connector id.","kernel");const candidate=value.source.trim().toLowerCase();source=SOURCE_ALIASES[candidate]??candidate;if(!/^[a-z][a-z0-9-]{0,63}$/u.test(source))return businessError("invalid_argument","source must be a lowercase connector id.","kernel")}if(value.since!==void 0&&!iso(value.since)||value.until!==void 0&&!iso(value.until))return businessError("invalid_argument","since and until must be ISO timestamps.","kernel");const limit=value.limit===void 0?5:value.limit,cursor=value.cursor===void 0?0:value.cursor,freshness=value.freshness===void 0?"auto":value.freshness;if(!Number.isSafeInteger(limit)||Number(limit)<1||Number(limit)>50)return businessError("invalid_argument","limit must be an integer from 1 to 50.","kernel");if(!Number.isSafeInteger(cursor)||Number(cursor)<0)return businessError("invalid_argument","cursor must be a nonnegative integer.","kernel");if(freshness!=="auto"&&freshness!=="cached"&&freshness!=="live")return businessError("invalid_argument","freshness must be auto, cached or live.","kernel");return ok({query,...source?{source}:{},...typeof value.since==="string"?{since:value.since}:{},...typeof value.until==="string"?{until:value.until}:{},limit:Number(limit),cursor:Number(cursor),freshness})}function projectedRecord(row){const source=text(row.source),sourceId=text(row.source_id)||text(row.sourceId),ref=text(row.id)||text(row.ref)||(source&&sourceId?`${source}:${sourceId}`:""),title=text(row.title)||sourceId,body=text(row.body),ts=text(row.ts);if(!source||!sourceId||!ref)return;return{ref,source,sourceId,title:bounded(title,300),excerpt:bounded(body),ts}}function providerRecord(row){const source=row.source,sourceId=row.sourceId??row.eventId??row.ref??"";if(!source||!sourceId)return;const fields=object(row.fields)?row.fields:{},title=text(fields.name)||text(fields.title)||text(fields.subject)||row.kind||sourceId,body=row.body??text(fields.content),ts=row.ts??"";return{ref:row.ref??row.eventId??`${source}:${sourceId}`,source,sourceId,title:bounded(title,300),excerpt:bounded(body),ts}}function matches(row,query){const needle=query.toLocaleLowerCase();return`${row.title}
|
|
2
|
+
${row.excerpt}`.toLocaleLowerCase().includes(needle)}function ranked(rows,query,limit){const needle=query.toLocaleLowerCase(),deduped=new Map;for(const row of rows)deduped.set(`${row.source}\0${row.sourceId}`,row);return[...deduped.values()].sort((a,b)=>{const score=row=>row.title.toLocaleLowerCase()===needle?0:row.title.toLocaleLowerCase().includes(needle)?1:row.excerpt.toLocaleLowerCase().includes(needle)?2:3;return score(a)-score(b)||String(b.ts).localeCompare(String(a.ts))||a.ref.localeCompare(b.ref)}).slice(0,limit)}async function vaultRows(vault,request,signal){if(!vault)return ok({records:[],more:false});const clauses=["(lower(coalesce(title,'')) LIKE ? ESCAPE '\\' OR lower(coalesce(body,'')) LIKE ? ESCAPE '\\')"],needle=`%${escapeLike(request.query.toLocaleLowerCase())}%`,params=[needle,needle];if(request.source){clauses.push("source = ?");params.push(request.source)}if(request.since){clauses.push("ts >= ?");params.push(request.since)}if(request.until){clauses.push("ts <= ?");params.push(request.until)}const requested=request.limit+1;params.push(request.query.toLocaleLowerCase(),needle,requested,request.cursor);const result=await vault.sql({sql:`SELECT id,source,source_id,title,body,ts FROM z_records WHERE ${clauses.join(" AND ")} ORDER BY CASE WHEN lower(coalesce(title,'')) = ? THEN 0 WHEN lower(coalesce(title,'')) LIKE ? ESCAPE '\\' THEN 1 ELSE 2 END, ts DESC, id LIMIT ? OFFSET ?`,params},signal);if(!("ok"in result))return result;const records=result.ok.rows.map(row=>projectedRecord(row)).filter(row=>!!row),more=records.length>request.limit;return ok({records:records.slice(0,request.limit),more})}function waiting(value){const{source,state,jobId,recoveryHandle,helpUrl,expiresAt,reason,nextStep,errorCode,retryability}=value;return{state:state==="ready"?"failed":state,source,records:[],nextCursor:null,route:"none",warnings:[],...jobId?{jobId}:{},...recoveryHandle?{recoveryHandle}:{},...helpUrl?{helpUrl}:{},...expiresAt?{expiresAt}:{},...reason?{reason}:{},...nextStep?{nextStep}:{},...errorCode?{errorCode}:{},...retryability?{retryability}:{}}}export async function findContent(dependencies,request,signal){const cached=await vaultRows(dependencies.vault,request,signal);if(!("ok"in cached))return cached;const cachedRecords=ranked(cached.ok.records,request.query,request.limit),cachedNext=cached.ok.more?request.cursor+request.limit:null;if(cachedRecords.length&&request.freshness!=="live")return ok({state:"found",records:cachedRecords,nextCursor:cachedNext,route:"vault",warnings:[]});if(!request.source||request.freshness==="cached")return ok(cachedRecords.length?{state:"found",records:cachedRecords,nextCursor:cachedNext,route:"vault",warnings:[]}:{state:"empty",records:[],nextCursor:null,route:"vault",warnings:[]});if(!dependencies.ensureReady)return businessError("unavailable","The Resident ensure-ready service is inactive.","plugin");const readiness=await dependencies.ensureReady(request.source,signal);if(!("ok"in readiness))return ok({state:"failed",source:request.source,records:[],nextCursor:null,route:"none",warnings:[],errorCode:"err"in readiness?readiness.err.code:"unavailable",retryability:"none"});if(readiness.ok.state!=="ready")return ok(waiting(readiness.ok));if(!dependencies.hub){if(cachedRecords.length)return ok({state:"partial",records:cachedRecords,nextCursor:cachedNext,route:"vault",warnings:["live:unavailable"],errorCode:"unavailable"});return ok({state:"failed",source:request.source,records:[],nextCursor:null,route:"none",warnings:[],errorCode:"unavailable",retryability:"none"})}const readRequest={query:request.query,limit:request.limit,...request.since?{since:request.since}:{},...request.until?{until:request.until}:{}};const live=await dependencies.hub.read(request.source,readRequest,{retention:"transient",...signal?{signal}:{}});if("err"in live){if(cachedRecords.length)return ok({state:"partial",records:cachedRecords,nextCursor:cachedNext,route:"vault",warnings:[`live:${live.err.code}`],errorCode:live.err.code});return ok({state:"failed",source:request.source,records:[],nextCursor:null,route:"none",warnings:[],errorCode:live.err.code,retryability:"none"})}const liveRecords="ok"in live?live.ok.records.map(providerRecord).filter(row=>!!row).filter(row=>matches(row,request.query)):[];const records=ranked([...cachedRecords,...liveRecords],request.query,request.limit);if(!records.length)return ok({state:"empty",records:[],nextCursor:null,route:"live",warnings:"ok"in live?live.ok.warnings:[]});return ok({state:"found",records,nextCursor:null,route:"live",warnings:"ok"in live?live.ok.warnings:[]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|