diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/system-test/test.install.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/system-test/test.install.js new file mode 100644 index 0000000000000000000000000000000000000000..54434bd2021a8d6f2c8cbb0cae1bcd6becba1261 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/system-test/test.install.js @@ -0,0 +1,123 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +import assert from 'assert'; +import { execFile } from 'child_process'; +import fs from 'fs'; +import mv from 'mv'; +import ncp from 'ncp'; +import path from 'path'; +import tmp from 'tmp'; +import { promisify } from 'util'; +import { describe, it, before, after } from 'mocha'; +import { packNTest } from 'pack-n-play'; +import { createServer } from 'node:http'; +import util from '../src/util.cjs'; +/** + * Optionally keep the staging directory between tests. + */ +const KEEP_STAGING_DIRECTORY = false; +const mvp = promisify(mv); +const ncpp = promisify(ncp); +const pkg = util.pkg; +const exec = promisify(execFile); +describe('📦 pack and install', () => { + let stagingDir; + let stagingPath; + before(() => { + stagingDir = tmp.dirSync({ + keep: KEEP_STAGING_DIRECTORY, + unsafeCleanup: true, + }); + stagingPath = stagingDir.name; + }); + after('cleanup staging', () => { + if (!KEEP_STAGING_DIRECTORY) { + stagingDir.removeCallback(); + } + }); + describe('pack-n-play', () => { + let server; + let url; + before(async () => { + server = createServer((req, res) => { + res.writeHead(200, { 'content-type': 'text/plain' }); + res.end(`Hello, ${req.headers['user-agent'] || 'World'}`); + }); + await new Promise((resolve, reject) => { + server.on('error', reject); + server.listen(0, resolve); + }); + const address = server.address(); + if (typeof address === 'string') { + url = address; + } + else { + const base = new URL('http://localhost'); + base.host = address.address; + base.port = address.port.toString(); + url = base.toString(); + } + }); + after(() => { + server.close(); + }); + it('supports ESM', async () => { + await packNTest({ + sample: { + description: 'import as ESM', + esm: ` + import {Gaxios} from 'gaxios'; + + const gaxios = new Gaxios(); + await gaxios.request({url: '${url}'}); + `, + }, + }); + }); + it('supports CJS', async () => { + await packNTest({ + sample: { + description: 'require as CJS', + cjs: ` + const {Gaxios} = require('gaxios'); + + const gaxios = new Gaxios(); + gaxios.request({url: '${url}'}).then(console.log); + `, + }, + }); + }); + }); + describe('webpack', () => { + /** + * Create a staging directory with temp fixtures used to test on a fresh + * application. + */ + before('pack and install', async () => { + await exec('npm', ['pack']); + const tarball = `${pkg.name}-${pkg.version}.tgz`; + await mvp(tarball, `${stagingPath}/gaxios.tgz`); + await ncpp('system-test/fixtures/sample', `${stagingPath}/`); + await exec('npm', ['install'], { cwd: `${stagingPath}/` }); + }); + it('should be able to webpack the library', async () => { + // we expect npm install is executed in the before hook + await exec('npx', ['webpack'], { cwd: `${stagingPath}/` }); + const bundle = path.join(stagingPath, 'dist', 'bundle.min.js'); + const stat = fs.statSync(bundle); + assert(stat.size < 256 * 1024); + }).timeout(20000); + }); +}); +//# sourceMappingURL=test.install.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cb0ff5c3b541f646105198ee23ac0fc3d805023e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js new file mode 100644 index 0000000000000000000000000000000000000000..a2cf5ea1925bdda27c0624e51eedbd7322cef683 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js @@ -0,0 +1,362 @@ +// Copyright 2018 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +import assert from 'assert'; +import nock from 'nock'; +import { describe, it, afterEach } from 'mocha'; +import { Gaxios, GaxiosError, request } from '../src/index.js'; +nock.disableNetConnect(); +const url = 'https://example.com'; +function getConfig(err) { + const e = err; + if (e && e.config && e.config.retryConfig) { + return e.config.retryConfig; + } + return; +} +afterEach(() => { + nock.cleanAll(); +}); +describe('🛸 retry & exponential backoff', () => { + it('should provide an expected set of defaults', async () => { + const scope = nock(url).get('/').times(4).reply(500); + await assert.rejects(request({ url, retry: true }), (e) => { + scope.done(); + const config = getConfig(e); + if (!config) { + assert.fail('no config available'); + } + assert.strictEqual(config.currentRetryAttempt, 3); + assert.strictEqual(config.retry, 3); + assert.strictEqual(config.noResponseRetries, 2); + const expectedMethods = ['GET', 'HEAD', 'PUT', 'OPTIONS', 'DELETE']; + for (const method of config.httpMethodsToRetry) { + assert(expectedMethods.indexOf(method) > -1); + } + const expectedStatusCodes = [ + [100, 199], + [408, 408], + [429, 429], + [500, 599], + ]; + const statusCodesToRetry = config.statusCodesToRetry; + for (let i = 0; i < statusCodesToRetry.length; i++) { + const [min, max] = statusCodesToRetry[i]; + const [expMin, expMax] = expectedStatusCodes[i]; + assert.strictEqual(min, expMin); + assert.strictEqual(max, expMax); + } + return true; + }); + }); + it('should retry on 500 on the main export', async () => { + const body = { buttered: '🥖' }; + const scopes = [ + nock(url).get('/').reply(500), + nock(url).get('/').reply(200, body), + ]; + const res = await request({ + url, + retry: true, + }); + assert.deepStrictEqual(res.data, body); + scopes.forEach(s => s.done()); + }); + it('should not retry on a post', async () => { + const scope = nock(url).post('/').reply(500); + await assert.rejects(request({ url, method: 'POST', retry: true }), (e) => { + const config = getConfig(e); + return config.currentRetryAttempt === 0; + }); + scope.done(); + }); + it('should not retry if user aborted request', async () => { + const ac = new AbortController(); + const config = { + method: 'GET', + url: 'https://google.com', + signal: ac.signal, + retryConfig: { retry: 10, noResponseRetries: 10 }, + }; + const req = request(config); + ac.abort(); + try { + await req; + throw Error('unreachable'); + } + catch (err) { + assert(err instanceof GaxiosError); + assert(err.config); + assert.strictEqual(err.config.retryConfig?.currentRetryAttempt, 0); + } + }); + it('should retry at least the configured number of times', async () => { + const body = { dippy: '🥚' }; + const scopes = [ + nock(url).get('/').times(3).reply(500), + nock(url).get('/').reply(200, body), + ]; + const cfg = { url, retryConfig: { retry: 4 } }; + const res = await request(cfg); + assert.deepStrictEqual(res.data, body); + scopes.forEach(s => s.done()); + }); + it('should not retry more than configured', async () => { + const scope = nock(url).get('/').twice().reply(500); + const cfg = { url, retryConfig: { retry: 1 } }; + await assert.rejects(request(cfg), (e) => { + return getConfig(e).currentRetryAttempt === 1; + }); + scope.done(); + }); + it('should not retry on 4xx errors', async () => { + const scope = nock(url).get('/').reply(404); + await assert.rejects(request({ url, retry: true }), (e) => { + const cfg = getConfig(e); + return cfg.currentRetryAttempt === 0; + }); + scope.done(); + }); + it('should retain the baseURL on retry', async () => { + const body = { pumpkin: '🥧' }; + const url = '/path'; + const baseURL = 'http://example.com'; + const scope = nock(baseURL).get(url).reply(500).get(url).reply(200, body); + const gaxios = new Gaxios({ baseURL }); + const res = await gaxios.request({ + url, + retry: true, + }); + assert.deepStrictEqual(res.data, body); + scope.done(); + }); + it('should not retry if retries set to 0', async () => { + const scope = nock(url).get('/').reply(500); + const cfg = { url, retryConfig: { retry: 0 } }; + await assert.rejects(request(cfg), (e) => { + const cfg = getConfig(e); + return cfg.currentRetryAttempt === 0; + }); + scope.done(); + }); + it('should notify on retry attempts', async () => { + const body = { buttered: '🥖' }; + const scopes = [ + nock(url).get('/').reply(500), + nock(url).get('/').reply(200, body), + ]; + let flipped = false; + const config = { + url, + retryConfig: { + onRetryAttempt: err => { + const cfg = getConfig(err); + assert.strictEqual(cfg.currentRetryAttempt, 1); + flipped = true; + }, + }, + }; + await request(config); + assert.strictEqual(flipped, true); + scopes.forEach(s => s.done()); + }); + it('accepts async onRetryAttempt handler', async () => { + const body = { buttered: '🥖' }; + const scopes = [ + nock(url).get('/').reply(500), + nock(url).get('/').reply(200, body), + ]; + let flipped = false; + const config = { + url, + retryConfig: { + onRetryAttempt: async (err) => { + const cfg = getConfig(err); + assert.strictEqual(cfg.currentRetryAttempt, 1); + flipped = true; + }, + }, + }; + await request(config); + assert.strictEqual(flipped, true); + scopes.forEach(s => s.done()); + }); + it('should support overriding the shouldRetry method', async () => { + const scope = nock(url).get('/').reply(500); + const config = { + url, + retryConfig: { + shouldRetry: () => { + return false; + }, + }, + }; + await assert.rejects(request(config), (e) => { + const cfg = getConfig(e); + return cfg.currentRetryAttempt === 0; + }); + scope.done(); + }); + it('should support overriding the shouldRetry method with a promise', async () => { + const scope = nock(url).get('/').reply(500); + const config = { + url, + retryConfig: { + shouldRetry: async () => { + return false; + }, + }, + }; + await assert.rejects(request(config), (e) => { + const cfg = getConfig(e); + return cfg.currentRetryAttempt === 0; + }); + scope.done(); + }); + it('should retry on ENOTFOUND', async () => { + const body = { spicy: '🌮' }; + const scopes = [ + nock(url).get('/').reply(500, { code: 'ENOTFOUND' }), + nock(url).get('/').reply(200, body), + ]; + const res = await request({ url, retry: true }); + assert.deepStrictEqual(res.data, body); + scopes.forEach(s => s.done()); + }); + it('should retry on ETIMEDOUT', async () => { + const body = { sizzling: '🥓' }; + const scopes = [ + nock(url).get('/').reply(500, { code: 'ETIMEDOUT' }), + nock(url).get('/').reply(200, body), + ]; + const res = await request({ url, retry: true }); + assert.deepStrictEqual(res.data, body); + scopes.forEach(s => s.done()); + }); + it('should allow configuring noResponseRetries', async () => { + // `nock` is not listening, therefore it should fail + const config = { url, retryConfig: { noResponseRetries: 0 } }; + await assert.rejects(request(config), (e) => { + return (e.code === 'ENETUNREACH' && + e.config.retryConfig?.currentRetryAttempt === 0); + }); + }); + it('should delay the initial retry by 100ms by default', async () => { + const scope = nock(url).get('/').reply(500).get('/').reply(200, {}); + const start = Date.now(); + await request({ + url, + retry: true, + }); + const delay = Date.now() - start; + assert.ok(delay > 100 && delay < 199); + scope.done(); + }); + it('should respect the retryDelay if configured', async () => { + const scope = nock(url).get('/').reply(500).get('/').reply(200, {}); + const start = Date.now(); + await request({ + url, + retryConfig: { + retryDelay: 500, + }, + }); + const delay = Date.now() - start; + assert.ok(delay > 500 && delay < 599); + scope.done(); + }); + it('should respect retryDelayMultiplier if configured', async () => { + const scope = nock(url) + .get('/') + .reply(500) + .get('/') + .reply(500) + .get('/') + .reply(200, {}); + const start = Date.now(); + await request({ + url, + retryConfig: { + retryDelayMultiplier: 3, + }, + }); + const delay = Date.now() - start; + assert.ok(delay > 1000 && delay < 1999); + scope.done(); + }); + it('should respect totalTimeout if configured', async () => { + const scope = nock(url) + .get('/') + .reply(500) + .get('/') + .reply(500) + .get('/') + .reply(200, {}); + const start = Date.now(); + await request({ + url, + retryConfig: { + retryDelayMultiplier: 100, + totalTimeout: 3000, + }, + }); + const delay = Date.now() - start; + assert.ok(delay > 3000 && delay < 3999); + scope.done(); + }); + it('should respect maxRetryDelay if configured', async () => { + const scope = nock(url) + .get('/') + .reply(500) + .get('/') + .reply(500) + .get('/') + .reply(200, {}); + const start = Date.now(); + await request({ + url, + retryConfig: { + retryDelayMultiplier: 100, + maxRetryDelay: 4000, + }, + }); + const delay = Date.now() - start; + assert.ok(delay > 4000 && delay < 4999); + scope.done(); + }); + it('should retry on `timeout`', async () => { + const scope = nock(url).get('/').delay(500).reply(400).get('/').reply(204); + const gaxios = new Gaxios(); + const timeout = 100; + async function onRetryAttempt({ config, message }) { + assert(config.signal?.reason instanceof DOMException); + assert.equal(config.signal.reason.name, 'TimeoutError'); + assert.match(message, /timeout/i); + // increase timeout to something higher to avoid time-sensitive flaky tests + // note: the second `nock` GET is not delayed like the first one + config.timeout = 10000; + } + const res = await gaxios.request({ + url, + timeout, + // NOTE: `node-fetch` does not yet support `TimeoutError` - testing with native `fetch` for now. + fetchImplementation: fetch, + retryConfig: { + onRetryAttempt, + }, + }); + assert.equal(res.status, 204); + assert.equal(res.config?.retryConfig?.currentRetryAttempt, 1); + scope.done(); + }); +}); +//# sourceMappingURL=test.retry.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2e156d094d511e7cd33900d96b2ccc59e4cd6052 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gaxios/build/esm/test/test.retry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"test.retry.js","sourceRoot":"","sources":["../../../test/test.retry.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAE,WAAW,EAAiB,OAAO,EAAC,MAAM,iBAAiB,CAAC;A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e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f39896ffcfaab3e3a165ead792425bb9b06d0efc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.d.ts @@ -0,0 +1,57 @@ +/** + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Known paths unique to Google Compute Engine Linux instances + */ +export declare const GCE_LINUX_BIOS_PATHS: { + BIOS_DATE: string; + BIOS_VENDOR: string; +}; +/** + * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). + * + * Uses the: + * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. + * + * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. + */ +export declare function isGoogleCloudServerless(): boolean; +/** + * Determines if the process is running on a Linux Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. + */ +export declare function isGoogleComputeEngineLinux(): boolean; +/** + * Determines if the process is running on a Google Compute Engine instance with a known + * MAC address. + * + * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. + */ +export declare function isGoogleComputeEngineMACAddress(): boolean; +/** + * Determines if the process is running on a Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. + */ +export declare function isGoogleComputeEngine(): boolean; +/** + * Determines if the process is running on Google Cloud Platform. + * + * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. + */ +export declare function detectGCPResidency(): boolean; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js new file mode 100644 index 0000000000000000000000000000000000000000..7124d3255a2c5c4170aee29ffee8a9c017ed9b5f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js @@ -0,0 +1,114 @@ +"use strict"; +/** + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GCE_LINUX_BIOS_PATHS = void 0; +exports.isGoogleCloudServerless = isGoogleCloudServerless; +exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux; +exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress; +exports.isGoogleComputeEngine = isGoogleComputeEngine; +exports.detectGCPResidency = detectGCPResidency; +const fs_1 = require("fs"); +const os_1 = require("os"); +/** + * Known paths unique to Google Compute Engine Linux instances + */ +exports.GCE_LINUX_BIOS_PATHS = { + BIOS_DATE: '/sys/class/dmi/id/bios_date', + BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor', +}; +const GCE_MAC_ADDRESS_REGEX = /^42:01/; +/** + * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). + * + * Uses the: + * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. + * + * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. + */ +function isGoogleCloudServerless() { + /** + * `CLOUD_RUN_JOB` is used for Cloud Run Jobs + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * + * `FUNCTION_NAME` is used in older Cloud Functions environments: + * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}. + * + * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments: + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}. + */ + const isGFEnvironment = process.env.CLOUD_RUN_JOB || + process.env.FUNCTION_NAME || + process.env.K_SERVICE; + return !!isGFEnvironment; +} +/** + * Determines if the process is running on a Linux Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. + */ +function isGoogleComputeEngineLinux() { + if ((0, os_1.platform)() !== 'linux') + return false; + try { + // ensure this file exist + (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE); + // ensure this file exist and matches + const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8'); + return /Google/.test(biosVendor); + } + catch { + return false; + } +} +/** + * Determines if the process is running on a Google Compute Engine instance with a known + * MAC address. + * + * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. + */ +function isGoogleComputeEngineMACAddress() { + const interfaces = (0, os_1.networkInterfaces)(); + for (const item of Object.values(interfaces)) { + if (!item) + continue; + for (const { mac } of item) { + if (GCE_MAC_ADDRESS_REGEX.test(mac)) { + return true; + } + } + } + return false; +} +/** + * Determines if the process is running on a Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. + */ +function isGoogleComputeEngine() { + return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress(); +} +/** + * Determines if the process is running on Google Cloud Platform. + * + * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. + */ +function detectGCPResidency() { + return isGoogleCloudServerless() || isGoogleComputeEngine(); +} +//# sourceMappingURL=gcp-residency.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js.map new file mode 100644 index 0000000000000000000000000000000000000000..05b5015f9dd27b1cb0a3fe08b63906d5dd55f60c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/gcp-residency.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gcp-residency.js","sourceRoot":"","sources":["../../src/gcp-residency.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAwBH,0DAkBC;AAOD,gEAcC;AAQD,0EAcC;AAOD,sDAEC;AAOD,gDAEC;AArGD,2BAA0C;AAC1C,2BAA+C;AAE/C;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,6BAA6B;IACxC,WAAW,EAAE,+BAA+B;CAC7C,CAAC;AAEF,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAEvC;;;;;;;;GAQG;AACH,SAAgB,uBAAuB;IACrC;;;;;;;;;;OAUG;IACH,MAAM,eAAe,GACnB,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IAExB,OAAO,CAAC,CAAC,eAAe,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,SAAgB,0BAA0B;IACxC,IAAI,IAAA,aAAQ,GAAE,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAEzC,IAAI,CAAC;QACH,yBAAyB;QACzB,IAAA,aAAQ,EAAC,4BAAoB,CAAC,SAAS,CAAC,CAAC;QAEzC,qCAAqC;QACrC,MAAM,UAAU,GAAG,IAAA,iBAAY,EAAC,4BAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAE1E,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,+BAA+B;IAC7C,MAAM,UAAU,GAAG,IAAA,sBAAiB,GAAE,CAAC;IAEvC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI;YAAE,SAAS;QAEpB,KAAK,MAAM,EAAC,GAAG,EAAC,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACpC,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB;IACnC,OAAO,0BAA0B,EAAE,IAAI,+BAA+B,EAAE,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,OAAO,uBAAuB,EAAE,IAAI,qBAAqB,EAAE,CAAC;AAC9D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..84ceda5b72116c783622318ebeeac0593003fc5e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.d.ts @@ -0,0 +1,156 @@ +/** + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export declare const BASE_PATH = "/computeMetadata/v1"; +export declare const HOST_ADDRESS = "http://169.254.169.254"; +export declare const SECONDARY_HOST_ADDRESS = "http://metadata.google.internal."; +export declare const HEADER_NAME = "Metadata-Flavor"; +export declare const HEADER_VALUE = "Google"; +export declare const HEADERS: Readonly<{ + "Metadata-Flavor": "Google"; +}>; +/** + * Metadata server detection override options. + * + * Available via `process.env.METADATA_SERVER_DETECTION`. + */ +export declare const METADATA_SERVER_DETECTION: Readonly<{ + 'assume-present': "don't try to ping the metadata server, but assume it's present"; + none: "don't try to ping the metadata server, but don't try to use it either"; + 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)"; + 'ping-only': "skip the BIOS probe, and go straight to pinging"; +}>; +type HeadersInit = ConstructorParameters[0]; +export interface Options { + params?: { + [index: string]: string; + }; + property?: string; + headers?: HeadersInit; +} +export interface MetadataAccessor { + /** + * + * @example + * + * // equivalent to `project('project-id')`; + * const metadataKey = 'project/project-id'; + */ + metadataKey: string; + params?: Options['params']; + headers?: Options['headers']; + noResponseRetries?: number; + fastFail?: boolean; +} +export type BulkResults = { + [key in T[number]['metadataKey']]: ReturnType; +}; +/** + * Obtain metadata for the current GCE instance. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const serviceAccount: {} = await instance('service-accounts/'); + * const serviceAccountEmail: string = await instance('service-accounts/default/email'); + * ``` + */ +export declare function instance(options?: string | Options): Promise; +/** + * Obtain metadata for the current GCP project. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const projectId: string = await project('project-id'); + * const numericProjectId: number = await project('numeric-project-id'); + * ``` + */ +export declare function project(options?: string | Options): Promise; +/** + * Obtain metadata for the current universe. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const universeDomain: string = await universe('universe-domain'); + * ``` + */ +export declare function universe(options?: string | Options): Promise; +/** + * Retrieve metadata items in parallel. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const data = await bulk([ + * { + * metadataKey: 'instance', + * }, + * { + * metadataKey: 'project/project-id', + * }, + * ] as const); + * + * // data.instance; + * // data['project/project-id']; + * ``` + * + * @param properties The metadata properties to retrieve + * @returns The metadata in `metadatakey:value` format + */ +export declare function bulk[], R extends BulkResults = BulkResults>(properties: T): Promise; +/** + * Determine if the metadata server is currently available. + */ +export declare function isAvailable(): Promise; +/** + * reset the memoized isAvailable() lookup. + */ +export declare function resetIsAvailableCache(): void; +/** + * A cache for the detected GCP Residency. + */ +export declare let gcpResidencyCache: boolean | null; +/** + * Detects GCP Residency. + * Caches results to reduce costs for subsequent calls. + * + * @see setGCPResidency for setting + */ +export declare function getGCPResidency(): boolean; +/** + * Sets the detected GCP Residency. + * Useful for forcing metadata server detection behavior. + * + * Set `null` to autodetect the environment (default behavior). + * @see getGCPResidency for getting + */ +export declare function setGCPResidency(value?: boolean | null): void; +/** + * Obtain the timeout for requests to the metadata server. + * + * In certain environments and conditions requests can take longer than + * the default timeout to complete. This function will determine the + * appropriate timeout based on the environment. + * + * @returns {number} a request timeout duration in milliseconds. + */ +export declare function requestTimeout(): number; +export * from './gcp-residency'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d5f3036a813e60eeb8cc65c5c19e2fe551ccff34 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js @@ -0,0 +1,402 @@ +"use strict"; +/** + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.gcpResidencyCache = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0; +exports.instance = instance; +exports.project = project; +exports.universe = universe; +exports.bulk = bulk; +exports.isAvailable = isAvailable; +exports.resetIsAvailableCache = resetIsAvailableCache; +exports.getGCPResidency = getGCPResidency; +exports.setGCPResidency = setGCPResidency; +exports.requestTimeout = requestTimeout; +const gaxios_1 = require("gaxios"); +const jsonBigint = require("json-bigint"); +const gcp_residency_1 = require("./gcp-residency"); +const logger = __importStar(require("google-logging-utils")); +exports.BASE_PATH = '/computeMetadata/v1'; +exports.HOST_ADDRESS = 'http://169.254.169.254'; +exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.'; +exports.HEADER_NAME = 'Metadata-Flavor'; +exports.HEADER_VALUE = 'Google'; +exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE }); +const log = logger.log('gcp-metadata'); +/** + * Metadata server detection override options. + * + * Available via `process.env.METADATA_SERVER_DETECTION`. + */ +exports.METADATA_SERVER_DETECTION = Object.freeze({ + 'assume-present': "don't try to ping the metadata server, but assume it's present", + none: "don't try to ping the metadata server, but don't try to use it either", + 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)", + 'ping-only': 'skip the BIOS probe, and go straight to pinging', +}); +/** + * Returns the base URL while taking into account the GCE_METADATA_HOST + * environment variable if it exists. + * + * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1. + */ +function getBaseUrl(baseUrl) { + if (!baseUrl) { + baseUrl = + process.env.GCE_METADATA_IP || + process.env.GCE_METADATA_HOST || + exports.HOST_ADDRESS; + } + // If no scheme is provided default to HTTP: + if (!/^https?:\/\//.test(baseUrl)) { + baseUrl = `http://${baseUrl}`; + } + return new URL(exports.BASE_PATH, baseUrl).href; +} +// Accepts an options object passed from the user to the API. In previous +// versions of the API, it referred to a `Request` or an `Axios` request +// options object. Now it refers to an object with very limited property +// names. This is here to help ensure users don't pass invalid options when +// they upgrade from 0.4 to 0.5 to 0.8. +function validate(options) { + Object.keys(options).forEach(key => { + switch (key) { + case 'params': + case 'property': + case 'headers': + break; + case 'qs': + throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); + default: + throw new Error(`'${key}' is not a valid configuration option.`); + } + }); +} +async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) { + const headers = new Headers(exports.HEADERS); + let metadataKey = ''; + let params = {}; + if (typeof type === 'object') { + const metadataAccessor = type; + new Headers(metadataAccessor.headers).forEach((value, key) => headers.set(key, value)); + metadataKey = metadataAccessor.metadataKey; + params = metadataAccessor.params || params; + noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries; + fastFail = metadataAccessor.fastFail || fastFail; + } + else { + metadataKey = type; + } + if (typeof options === 'string') { + metadataKey += `/${options}`; + } + else { + validate(options); + if (options.property) { + metadataKey += `/${options.property}`; + } + new Headers(options.headers).forEach((value, key) => headers.set(key, value)); + params = options.params || params; + } + const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request; + const req = { + url: `${getBaseUrl()}/${metadataKey}`, + headers, + retryConfig: { noResponseRetries }, + params, + responseType: 'text', + timeout: requestTimeout(), + }; + log.info('instance request %j', req); + const res = await requestMethod(req); + log.info('instance metadata is %s', res.data); + const metadataFlavor = res.headers.get(exports.HEADER_NAME); + if (metadataFlavor !== exports.HEADER_VALUE) { + throw new RangeError(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header. Expected '${exports.HEADER_VALUE}', got ${metadataFlavor ? `'${metadataFlavor}'` : 'no header'}`); + } + if (typeof res.data === 'string') { + try { + return jsonBigint.parse(res.data); + } + catch { + /* ignore */ + } + } + return res.data; +} +async function fastFailMetadataRequest(options) { + const secondaryOptions = { + ...options, + url: options.url + ?.toString() + .replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)), + }; + // We race a connection between DNS/IP to metadata server. There are a couple + // reasons for this: + // + // 1. the DNS is slow in some GCP environments; by checking both, we might + // detect the runtime environment significantly faster. + // 2. we can't just check the IP, which is tarpitted and slow to respond + // on a user's local machine. + // + // Returns first resolved promise or if all promises get rejected we return an AggregateError. + // + // Note, however, if a failure happens prior to a success, a rejection should + // occur, this is for folks running locally. + // + const r1 = (0, gaxios_1.request)(options); + const r2 = (0, gaxios_1.request)(secondaryOptions); + return Promise.any([r1, r2]); +} +/** + * Obtain metadata for the current GCE instance. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const serviceAccount: {} = await instance('service-accounts/'); + * const serviceAccountEmail: string = await instance('service-accounts/default/email'); + * ``` + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function instance(options) { + return metadataAccessor('instance', options); +} +/** + * Obtain metadata for the current GCP project. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const projectId: string = await project('project-id'); + * const numericProjectId: number = await project('numeric-project-id'); + * ``` + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function project(options) { + return metadataAccessor('project', options); +} +/** + * Obtain metadata for the current universe. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const universeDomain: string = await universe('universe-domain'); + * ``` + */ +function universe(options) { + return metadataAccessor('universe', options); +} +/** + * Retrieve metadata items in parallel. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const data = await bulk([ + * { + * metadataKey: 'instance', + * }, + * { + * metadataKey: 'project/project-id', + * }, + * ] as const); + * + * // data.instance; + * // data['project/project-id']; + * ``` + * + * @param properties The metadata properties to retrieve + * @returns The metadata in `metadatakey:value` format + */ +async function bulk(properties) { + const r = {}; + await Promise.all(properties.map(item => { + return (async () => { + const res = await metadataAccessor(item); + const key = item.metadataKey; + r[key] = res; + })(); + })); + return r; +} +/* + * How many times should we retry detecting GCP environment. + */ +function detectGCPAvailableRetries() { + return process.env.DETECT_GCP_RETRIES + ? Number(process.env.DETECT_GCP_RETRIES) + : 0; +} +let cachedIsAvailableResponse; +/** + * Determine if the metadata server is currently available. + */ +async function isAvailable() { + if (process.env.METADATA_SERVER_DETECTION) { + const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); + if (!(value in exports.METADATA_SERVER_DETECTION)) { + throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`); + } + switch (value) { + case 'assume-present': + return true; + case 'none': + return false; + case 'bios-only': + return getGCPResidency(); + case 'ping-only': + // continue, we want to ping the server + } + } + try { + // If a user is instantiating several GCP libraries at the same time, + // this may result in multiple calls to isAvailable(), to detect the + // runtime environment. We use the same promise for each of these calls + // to reduce the network load. + if (cachedIsAvailableResponse === undefined) { + cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(), + // If the default HOST_ADDRESS has been overridden, we should not + // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in + // a non-GCP environment): + !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST)); + } + await cachedIsAvailableResponse; + return true; + } + catch (e) { + const err = e; + if (process.env.DEBUG_AUTH) { + console.info(err); + } + if (err.type === 'request-timeout') { + // If running in a GCP environment, metadata endpoint should return + // within ms. + return false; + } + if (err.response && err.response.status === 404) { + return false; + } + else { + if (!(err.response && err.response.status === 404) && + // A warning is emitted if we see an unexpected err.code, or err.code + // is not populated: + (!err.code || + ![ + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'ENETUNREACH', + 'ENOENT', + 'ENOTFOUND', + 'ECONNREFUSED', + ].includes(err.code.toString()))) { + let code = 'UNKNOWN'; + if (err.code) + code = err.code.toString(); + process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning'); + } + // Failure to resolve the metadata service means that it is not available. + return false; + } + } +} +/** + * reset the memoized isAvailable() lookup. + */ +function resetIsAvailableCache() { + cachedIsAvailableResponse = undefined; +} +/** + * A cache for the detected GCP Residency. + */ +exports.gcpResidencyCache = null; +/** + * Detects GCP Residency. + * Caches results to reduce costs for subsequent calls. + * + * @see setGCPResidency for setting + */ +function getGCPResidency() { + if (exports.gcpResidencyCache === null) { + setGCPResidency(); + } + return exports.gcpResidencyCache; +} +/** + * Sets the detected GCP Residency. + * Useful for forcing metadata server detection behavior. + * + * Set `null` to autodetect the environment (default behavior). + * @see getGCPResidency for getting + */ +function setGCPResidency(value = null) { + exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)(); +} +/** + * Obtain the timeout for requests to the metadata server. + * + * In certain environments and conditions requests can take longer than + * the default timeout to complete. This function will determine the + * appropriate timeout based on the environment. + * + * @returns {number} a request timeout duration in milliseconds. + */ +function requestTimeout() { + return getGCPResidency() ? 0 : 3000; +} +__exportStar(require("./gcp-residency"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3c888a3e45303182305107711e952a792cf32d8f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gcp-metadata/build/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2NH,4BAEC;AAcD,0BAEC;AAYD,4BAEC;AAyBD,oBAkBC;AAgBD,kCAmFC;AAKD,sDAEC;AAaD,0CAMC;AASD,0CAEC;AAWD,wCAEC;AAzbD,mCAA2E;AAC3E,0CAA2C;AAC3C,mDAAmD;AACnD,6DAA+C;AAElC,QAAA,SAAS,GAAG,qBAAqB,CAAC;AAClC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,sBAAsB,G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BAA+B,GAAG,CAAC,OAAO,WAAW,IAAI,EAAE,EAC3D,uBAAuB,CACxB,CAAC;YACJ,CAAC;YAED,0EAA0E;YAC1E,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,yBAAyB,GAAG,SAAS,CAAC;AACxC,CAAC;AAED;;GAEG;AACQ,QAAA,iBAAiB,GAAmB,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,SAAgB,eAAe;IAC7B,IAAI,yBAAiB,KAAK,IAAI,EAAE,CAAC;QAC/B,eAAe,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,yBAAkB,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,QAAwB,IAAI;IAC1D,yBAAiB,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,kCAAkB,GAAE,CAAC;AACpE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,cAAc;IAC5B,OAAO,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACtC,CAAC;AAED,kDAAgC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..314ad1f5ccd3ccdadff2f3cc5bba5136db5a0d03 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts @@ -0,0 +1,388 @@ +import { Minimatch } from 'minimatch'; +import { Minipass } from 'minipass'; +import { FSOption, Path, PathScurry } from 'path-scurry'; +import { IgnoreLike } from './ignore.js'; +import { Pattern } from './pattern.js'; +export type MatchSet = Minimatch['set']; +export type GlobParts = Exclude; +/** + * A `GlobOptions` object may be provided to any of the exported methods, and + * must be provided to the `Glob` constructor. + * + * All options are optional, boolean, and false by default, unless otherwise + * noted. + * + * All resolved options are added to the Glob object as properties. + * + * If you are running many `glob` operations, you can pass a Glob object as the + * `options` argument to a subsequent operation to share the previously loaded + * cache. + */ +export interface GlobOptions { + /** + * Set to `true` to always receive absolute paths for + * matched files. Set to `false` to always return relative paths. + * + * When this option is not set, absolute paths are returned for patterns + * that are absolute, and otherwise paths are returned that are relative + * to the `cwd` setting. + * + * This does _not_ make an extra system call to get + * the realpath, it only does string path resolution. + * + * Conflicts with {@link withFileTypes} + */ + absolute?: boolean; + /** + * Set to false to enable {@link windowsPathsNoEscape} + * + * @deprecated + */ + allowWindowsEscape?: boolean; + /** + * The current working directory in which to search. Defaults to + * `process.cwd()`. + * + * May be eiher a string path or a `file://` URL object or string. + */ + cwd?: string | URL; + /** + * Include `.dot` files in normal matches and `globstar` + * matches. Note that an explicit dot in a portion of the pattern + * will always match dot files. + */ + dot?: boolean; + /** + * Prepend all relative path strings with `./` (or `.\` on Windows). + * + * Without this option, returned relative paths are "bare", so instead of + * returning `'./foo/bar'`, they are returned as `'foo/bar'`. + * + * Relative patterns starting with `'../'` are not prepended with `./`, even + * if this option is set. + */ + dotRelative?: boolean; + /** + * Follow symlinked directories when expanding `**` + * patterns. This can result in a lot of duplicate references in + * the presence of cyclic links, and make performance quite bad. + * + * By default, a `**` in a pattern will follow 1 symbolic link if + * it is not the first item in the pattern, or none if it is the + * first item in the pattern, following the same behavior as Bash. + */ + follow?: boolean; + /** + * string or string[], or an object with `ignored` and `childrenIgnored` + * methods. + * + * If a string or string[] is provided, then this is treated as a glob + * pattern or array of glob patterns to exclude from matches. To ignore all + * children within a directory, as well as the entry itself, append `'/**'` + * to the ignore pattern. + * + * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of + * any other settings. + * + * If an object is provided that has `ignored(path)` and/or + * `childrenIgnored(path)` methods, then these methods will be called to + * determine whether any Path is a match or if its children should be + * traversed, respectively. + */ + ignore?: string | string[] | IgnoreLike; + /** + * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no + * effect if {@link nobrace} is set. + * + * Only has effect on the {@link hasMagic} function. + */ + magicalBraces?: boolean; + /** + * Add a `/` character to directory matches. Note that this requires + * additional stat calls in some cases. + */ + mark?: boolean; + /** + * Perform a basename-only match if the pattern does not contain any slash + * characters. That is, `*.js` would be treated as equivalent to + * `**\/*.js`, matching all js files in all directories. + */ + matchBase?: boolean; + /** + * Limit the directory traversal to a given depth below the cwd. + * Note that this does NOT prevent traversal to sibling folders, + * root patterns, and so on. It only limits the maximum folder depth + * that the walk will descend, relative to the cwd. + */ + maxDepth?: number; + /** + * Do not expand `{a,b}` and `{1..3}` brace sets. + */ + nobrace?: boolean; + /** + * Perform a case-insensitive match. This defaults to `true` on macOS and + * Windows systems, and `false` on all others. + * + * **Note** `nocase` should only be explicitly set when it is + * known that the filesystem's case sensitivity differs from the + * platform default. If set `true` on case-sensitive file + * systems, or `false` on case-insensitive file systems, then the + * walk may return more or less results than expected. + */ + nocase?: boolean; + /** + * Do not match directories, only files. (Note: to match + * _only_ directories, put a `/` at the end of the pattern.) + */ + nodir?: boolean; + /** + * Do not match "extglob" patterns such as `+(a|b)`. + */ + noext?: boolean; + /** + * Do not match `**` against multiple filenames. (Ie, treat it as a normal + * `*` instead.) + * + * Conflicts with {@link matchBase} + */ + noglobstar?: boolean; + /** + * Defaults to value of `process.platform` if available, or `'linux'` if + * not. Setting `platform:'win32'` on non-Windows systems may cause strange + * behavior. + */ + platform?: NodeJS.Platform; + /** + * Set to true to call `fs.realpath` on all of the + * results. In the case of an entry that cannot be resolved, the + * entry is omitted. This incurs a slight performance penalty, of + * course, because of the added system calls. + */ + realpath?: boolean; + /** + * + * A string path resolved against the `cwd` option, which + * is used as the starting point for absolute patterns that start + * with `/`, (but not drive letters or UNC paths on Windows). + * + * Note that this _doesn't_ necessarily limit the walk to the + * `root` directory, and doesn't affect the cwd starting point for + * non-absolute patterns. A pattern containing `..` will still be + * able to traverse out of the root directory, if it is not an + * actual root directory on the filesystem, and any non-absolute + * patterns will be matched in the `cwd`. For example, the + * pattern `/../*` with `{root:'/some/path'}` will return all + * files in `/some`, not all files in `/some/path`. The pattern + * `*` with `{root:'/some/path'}` will return all the entries in + * the cwd, not the entries in `/some/path`. + * + * To start absolute and non-absolute patterns in the same + * path, you can use `{root:''}`. However, be aware that on + * Windows systems, a pattern like `x:/*` or `//host/share/*` will + * _always_ start in the `x:/` or `//host/share` directory, + * regardless of the `root` setting. + */ + root?: string; + /** + * A [PathScurry](http://npm.im/path-scurry) object used + * to traverse the file system. If the `nocase` option is set + * explicitly, then any provided `scurry` object must match this + * setting. + */ + scurry?: PathScurry; + /** + * Call `lstat()` on all entries, whether required or not to determine + * if it's a valid match. When used with {@link withFileTypes}, this means + * that matches will include data such as modified time, permissions, and + * so on. Note that this will incur a performance cost due to the added + * system calls. + */ + stat?: boolean; + /** + * An AbortSignal which will cancel the Glob walk when + * triggered. + */ + signal?: AbortSignal; + /** + * Use `\\` as a path separator _only_, and + * _never_ as an escape character. If set, all `\\` characters are + * replaced with `/` in the pattern. + * + * Note that this makes it **impossible** to match against paths + * containing literal glob pattern characters, but allows matching + * with patterns constructed using `path.join()` and + * `path.resolve()` on Windows platforms, mimicking the (buggy!) + * behavior of Glob v7 and before on Windows. Please use with + * caution, and be mindful of [the caveat below about Windows + * paths](#windows). (For legacy reasons, this is also set if + * `allowWindowsEscape` is set to the exact value `false`.) + */ + windowsPathsNoEscape?: boolean; + /** + * Return [PathScurry](http://npm.im/path-scurry) + * `Path` objects instead of strings. These are similar to a + * NodeJS `Dirent` object, but with additional methods and + * properties. + * + * Conflicts with {@link absolute} + */ + withFileTypes?: boolean; + /** + * An fs implementation to override some or all of the defaults. See + * http://npm.im/path-scurry for details about what can be overridden. + */ + fs?: FSOption; + /** + * Just passed along to Minimatch. Note that this makes all pattern + * matching operations slower and *extremely* noisy. + */ + debug?: boolean; + /** + * Return `/` delimited paths, even on Windows. + * + * On posix systems, this has no effect. But, on Windows, it means that + * paths will be `/` delimited, and absolute paths will be their full + * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return + * `'//?/C:/foo/bar'` + */ + posix?: boolean; + /** + * Do not match any children of any matches. For example, the pattern + * `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode. + * + * This is especially useful for cases like "find all `node_modules` + * folders, but not the ones in `node_modules`". + * + * In order to support this, the `Ignore` implementation must support an + * `add(pattern: string)` method. If using the default `Ignore` class, then + * this is fine, but if this is set to `false`, and a custom `Ignore` is + * provided that does not have an `add()` method, then it will throw an + * error. + * + * **Caveat** It *only* ignores matches that would be a descendant of a + * previous match, and only if that descendant is matched *after* the + * ancestor is encountered. Since the file system walk happens in + * indeterminate order, it's possible that a match will already be added + * before its ancestor, if multiple or braced patterns are used. + * + * For example: + * + * ```ts + * const results = await glob([ + * // likely to match first, since it's just a stat + * 'a/b/c/d/e/f', + * + * // this pattern is more complicated! It must to various readdir() + * // calls and test the results against a regular expression, and that + * // is certainly going to take a little bit longer. + * // + * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too + * // late to ignore a/b/c/d/e/f, because it's already been emitted. + * 'a/[bdf]/?/[a-z]/*', + * ], { includeChildMatches: false }) + * ``` + * + * It's best to only set this to `false` if you can be reasonably sure that + * no components of the pattern will potentially match one another's file + * system descendants, or if the occasional included child entry will not + * cause problems. + * + * @default true + */ + includeChildMatches?: boolean; +} +export type GlobOptionsWithFileTypesTrue = GlobOptions & { + withFileTypes: true; + absolute?: undefined; + mark?: undefined; + posix?: undefined; +}; +export type GlobOptionsWithFileTypesFalse = GlobOptions & { + withFileTypes?: false; +}; +export type GlobOptionsWithFileTypesUnset = GlobOptions & { + withFileTypes?: undefined; +}; +export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; +export type Results = Result[]; +export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; +/** + * An object that can perform glob pattern traversals. + */ +export declare class Glob implements GlobOptions { + absolute?: boolean; + cwd: string; + root?: string; + dot: boolean; + dotRelative: boolean; + follow: boolean; + ignore?: string | string[] | IgnoreLike; + magicalBraces: boolean; + mark?: boolean; + matchBase: boolean; + maxDepth: number; + nobrace: boolean; + nocase: boolean; + nodir: boolean; + noext: boolean; + noglobstar: boolean; + pattern: string[]; + platform: NodeJS.Platform; + realpath: boolean; + scurry: PathScurry; + stat: boolean; + signal?: AbortSignal; + windowsPathsNoEscape: boolean; + withFileTypes: FileTypes; + includeChildMatches: boolean; + /** + * The options provided to the constructor. + */ + opts: Opts; + /** + * An array of parsed immutable {@link Pattern} objects. + */ + patterns: Pattern[]; + /** + * All options are stored as properties on the `Glob` object. + * + * See {@link GlobOptions} for full options descriptions. + * + * Note that a previous `Glob` object can be passed as the + * `GlobOptions` to another `Glob` instantiation to re-use settings + * and caches with a new pattern. + * + * Traversal functions can be called multiple times to run the walk + * again. + */ + constructor(pattern: string | string[], opts: Opts); + /** + * Returns a Promise that resolves to the results array. + */ + walk(): Promise>; + /** + * synchronous {@link Glob.walk} + */ + walkSync(): Results; + /** + * Stream results asynchronously. + */ + stream(): Minipass, Result>; + /** + * Stream results synchronously. + */ + streamSync(): Minipass, Result>; + /** + * Default sync iteration function. Returns a Generator that + * iterates over the results. + */ + iterateSync(): Generator, void, void>; + [Symbol.iterator](): Generator, void, void>; + /** + * Default async iteration function. Returns an AsyncGenerator that + * iterates over the results. + */ + iterate(): AsyncGenerator, void, void>; + [Symbol.asyncIterator](): AsyncGenerator, void, void>; +} +//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c32dc74c96774177b949cc137befa0edb6489e3f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAalE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,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session/claude-code-router/node_modules/glob/dist/commonjs/glob.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.js new file mode 100644 index 0000000000000000000000000000000000000000..e1339bbbcf57f3b158e89ff7c5fb8e21a6179c25 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.js @@ -0,0 +1,247 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Glob = void 0; +const minimatch_1 = require("minimatch"); +const node_url_1 = require("node:url"); +const path_scurry_1 = require("path-scurry"); +const pattern_js_1 = require("./pattern.js"); +const walker_js_1 = require("./walker.js"); +// if no process global, just call it linux. +// so we default to case-sensitive, / separators +const defaultPlatform = (typeof process === 'object' && + process && + typeof process.platform === 'string') ? + process.platform + : 'linux'; +/** + * An object that can perform glob pattern traversals. + */ +class Glob { + absolute; + cwd; + root; + dot; + dotRelative; + follow; + ignore; + magicalBraces; + mark; + matchBase; + maxDepth; + nobrace; + nocase; + nodir; + noext; + noglobstar; + pattern; + platform; + realpath; + scurry; + stat; + signal; + windowsPathsNoEscape; + withFileTypes; + includeChildMatches; + /** + * The options provided to the constructor. + */ + opts; + /** + * An array of parsed immutable {@link Pattern} objects. + */ + patterns; + /** + * All options are stored as properties on the `Glob` object. + * + * See {@link GlobOptions} for full options descriptions. + * + * Note that a previous `Glob` object can be passed as the + * `GlobOptions` to another `Glob` instantiation to re-use settings + * and caches with a new pattern. + * + * Traversal functions can be called multiple times to run the walk + * again. + */ + constructor(pattern, opts) { + /* c8 ignore start */ + if (!opts) + throw new TypeError('glob options required'); + /* c8 ignore stop */ + this.withFileTypes = !!opts.withFileTypes; + this.signal = opts.signal; + this.follow = !!opts.follow; + this.dot = !!opts.dot; + this.dotRelative = !!opts.dotRelative; + this.nodir = !!opts.nodir; + this.mark = !!opts.mark; + if (!opts.cwd) { + this.cwd = ''; + } + else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { + opts.cwd = (0, node_url_1.fileURLToPath)(opts.cwd); + } + this.cwd = opts.cwd || ''; + this.root = opts.root; + this.magicalBraces = !!opts.magicalBraces; + this.nobrace = !!opts.nobrace; + this.noext = !!opts.noext; + this.realpath = !!opts.realpath; + this.absolute = opts.absolute; + this.includeChildMatches = opts.includeChildMatches !== false; + this.noglobstar = !!opts.noglobstar; + this.matchBase = !!opts.matchBase; + this.maxDepth = + typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; + this.stat = !!opts.stat; + this.ignore = opts.ignore; + if (this.withFileTypes && this.absolute !== undefined) { + throw new Error('cannot set absolute and withFileTypes:true'); + } + if (typeof pattern === 'string') { + pattern = [pattern]; + } + this.windowsPathsNoEscape = + !!opts.windowsPathsNoEscape || + opts.allowWindowsEscape === + false; + if (this.windowsPathsNoEscape) { + pattern = pattern.map(p => p.replace(/\\/g, '/')); + } + if (this.matchBase) { + if (opts.noglobstar) { + throw new TypeError('base matching requires globstar'); + } + pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); + } + this.pattern = pattern; + this.platform = opts.platform || defaultPlatform; + this.opts = { ...opts, platform: this.platform }; + if (opts.scurry) { + this.scurry = opts.scurry; + if (opts.nocase !== undefined && + opts.nocase !== opts.scurry.nocase) { + throw new Error('nocase option contradicts provided scurry option'); + } + } + else { + const Scurry = opts.platform === 'win32' ? path_scurry_1.PathScurryWin32 + : opts.platform === 'darwin' ? path_scurry_1.PathScurryDarwin + : opts.platform ? path_scurry_1.PathScurryPosix + : path_scurry_1.PathScurry; + this.scurry = new Scurry(this.cwd, { + nocase: opts.nocase, + fs: opts.fs, + }); + } + this.nocase = this.scurry.nocase; + // If you do nocase:true on a case-sensitive file system, then + // we need to use regexps instead of strings for non-magic + // path portions, because statting `aBc` won't return results + // for the file `AbC` for example. + const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; + const mmo = { + // default nocase based on platform + ...opts, + dot: this.dot, + matchBase: this.matchBase, + nobrace: this.nobrace, + nocase: this.nocase, + nocaseMagicOnly, + nocomment: true, + noext: this.noext, + nonegate: true, + optimizationLevel: 2, + platform: this.platform, + windowsPathsNoEscape: this.windowsPathsNoEscape, + debug: !!this.opts.debug, + }; + const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo)); + const [matchSet, globParts] = mms.reduce((set, m) => { + set[0].push(...m.set); + set[1].push(...m.globParts); + return set; + }, [[], []]); + this.patterns = matchSet.map((set, i) => { + const g = globParts[i]; + /* c8 ignore start */ + if (!g) + throw new Error('invalid pattern object'); + /* c8 ignore stop */ + return new pattern_js_1.Pattern(set, g, 0, this.platform); + }); + } + async walk() { + // Walkers always return array of Path objects, so we just have to + // coerce them into the right shape. It will have already called + // realpath() if the option was set to do so, so we know that's cached. + // start out knowing the cwd, at least + return [ + ...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walk()), + ]; + } + walkSync() { + return [ + ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walkSync(), + ]; + } + stream() { + return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).stream(); + } + streamSync() { + return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).streamSync(); + } + /** + * Default sync iteration function. Returns a Generator that + * iterates over the results. + */ + iterateSync() { + return this.streamSync()[Symbol.iterator](); + } + [Symbol.iterator]() { + return this.iterateSync(); + } + /** + * Default async iteration function. Returns an AsyncGenerator that + * iterates over the results. + */ + iterate() { + return this.stream()[Symbol.asyncIterator](); + } + [Symbol.asyncIterator]() { + return this.iterate(); + } +} +exports.Glob = Glob; +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.js.map new file mode 100644 index 0000000000000000000000000000000000000000..551a9fc24f5b56c9f828a778fdca098cf0d5e352 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/glob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD,uCAAwC;AACxC,6CAOoB;AAEpB,6CAAsC;AACtC,2CAAoD;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAyVX;;GAEG;AACH,MAAa,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ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C,mBAAmB;SAC9C,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AA7QD,oBA6QC","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignored` and `childrenIgnored`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n\n /**\n * Do not match any children of any matches. For example, the pattern\n * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n *\n * This is especially useful for cases like \"find all `node_modules`\n * folders, but not the ones in `node_modules`\".\n *\n * In order to support this, the `Ignore` implementation must support an\n * `add(pattern: string)` method. If using the default `Ignore` class, then\n * this is fine, but if this is set to `false`, and a custom `Ignore` is\n * provided that does not have an `add()` method, then it will throw an\n * error.\n *\n * **Caveat** It *only* ignores matches that would be a descendant of a\n * previous match, and only if that descendant is matched *after* the\n * ancestor is encountered. Since the file system walk happens in\n * indeterminate order, it's possible that a match will already be added\n * before its ancestor, if multiple or braced patterns are used.\n *\n * For example:\n *\n * ```ts\n * const results = await glob([\n * // likely to match first, since it's just a stat\n * 'a/b/c/d/e/f',\n *\n * // this pattern is more complicated! It must to various readdir()\n * // calls and test the results against a regular expression, and that\n * // is certainly going to take a little bit longer.\n * //\n * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n * // late to ignore a/b/c/d/e/f, because it's already been emitted.\n * 'a/[bdf]/?/[a-z]/*',\n * ], { includeChildMatches: false })\n * ```\n *\n * It's best to only set this to `false` if you can be reasonably sure that\n * no components of the pattern will potentially match one another's file\n * system descendants, or if the occasional included child entry will not\n * cause problems.\n *\n * @default true\n */\n includeChildMatches?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n Opts extends GlobOptionsWithFileTypesTrue ? Path\n : Opts extends GlobOptionsWithFileTypesFalse ? string\n : Opts extends GlobOptionsWithFileTypesUnset ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes =\n Opts extends GlobOptionsWithFileTypesTrue ? true\n : Opts extends GlobOptionsWithFileTypesFalse ? false\n : Opts extends GlobOptionsWithFileTypesUnset ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n includeChildMatches: boolean\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n this.includeChildMatches = opts.includeChildMatches !== false\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32' ? PathScurryWin32\n : opts.platform === 'darwin' ? PathScurryDarwin\n : opts.platform ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []],\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8aec3bd9725175d9c72be14476fea2a117ca8b09 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts @@ -0,0 +1,14 @@ +import { GlobOptions } from './glob.js'; +/** + * Return true if the patterns provided contain any magic glob characters, + * given the options provided. + * + * Brace expansion is not considered "magic" unless the `magicalBraces` option + * is set, as brace expansion just turns one string into an array of strings. + * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and + * `'xby'` both do not contain any magic glob characters, and it's treated the + * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` + * is in the options, brace expansion _is_ treated as a pattern having magic. + */ +export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; +//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b24dd4ec47e0bbc37be06a58f4622cc183b710af --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js new file mode 100644 index 0000000000000000000000000000000000000000..0918bd57e0f1c2af51957ade7288a1fd75c7e23d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasMagic = void 0; +const minimatch_1 = require("minimatch"); +/** + * Return true if the patterns provided contain any magic glob characters, + * given the options provided. + * + * Brace expansion is not considered "magic" unless the `magicalBraces` option + * is set, as brace expansion just turns one string into an array of strings. + * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and + * `'xby'` both do not contain any magic glob characters, and it's treated the + * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` + * is in the options, brace expansion _is_ treated as a pattern having magic. + */ +const hasMagic = (pattern, options = {}) => { + if (!Array.isArray(pattern)) { + pattern = [pattern]; + } + for (const p of pattern) { + if (new minimatch_1.Minimatch(p, options).hasMagic()) + return true; + } + return false; +}; +exports.hasMagic = hasMagic; +//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js.map new file mode 100644 index 0000000000000000000000000000000000000000..44deab290582768bc18722a0f6cf0d4b03312097 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/has-magic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1893b16df877c9b50c071ee7b066715f6e58c43e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts @@ -0,0 +1,24 @@ +import { Minimatch, MinimatchOptions } from 'minimatch'; +import { Path } from 'path-scurry'; +import { GlobWalkerOpts } from './walker.js'; +export interface IgnoreLike { + ignored?: (p: Path) => boolean; + childrenIgnored?: (p: Path) => boolean; + add?: (ignore: string) => void; +} +/** + * Class used to process ignored patterns + */ +export declare class Ignore implements IgnoreLike { + relative: Minimatch[]; + relativeChildren: Minimatch[]; + absolute: Minimatch[]; + absoluteChildren: Minimatch[]; + platform: NodeJS.Platform; + mmopts: MinimatchOptions; + constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); + add(ign: string): void; + ignored(p: Path): boolean; + childrenIgnored(p: Path): boolean; +} +//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..57d6ab6153d770397a5acb7881ccf52a048dee89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IACtC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAWD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,MAAM,EAAE,gBAAgB,CAAA;gBAGtB,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAqBnB,GAAG,CAAC,GAAG,EAAE,MAAM;IAyCf,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js new file mode 100644 index 0000000000000000000000000000000000000000..5f1fde0680dea3736262381efa776c7f8268a70d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js @@ -0,0 +1,119 @@ +"use strict"; +// give it a pattern, and it'll be able to tell you if +// a given path should be ignored. +// Ignoring a path ignores its children if the pattern ends in /** +// Ignores are always parsed in dot:true mode +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Ignore = void 0; +const minimatch_1 = require("minimatch"); +const pattern_js_1 = require("./pattern.js"); +const defaultPlatform = (typeof process === 'object' && + process && + typeof process.platform === 'string') ? + process.platform + : 'linux'; +/** + * Class used to process ignored patterns + */ +class Ignore { + relative; + relativeChildren; + absolute; + absoluteChildren; + platform; + mmopts; + constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { + this.relative = []; + this.absolute = []; + this.relativeChildren = []; + this.absoluteChildren = []; + this.platform = platform; + this.mmopts = { + dot: true, + nobrace, + nocase, + noext, + noglobstar, + optimizationLevel: 2, + platform, + nocomment: true, + nonegate: true, + }; + for (const ign of ignored) + this.add(ign); + } + add(ign) { + // this is a little weird, but it gives us a clean set of optimized + // minimatch matchers, without getting tripped up if one of them + // ends in /** inside a brace section, and it's only inefficient at + // the start of the walk, not along it. + // It'd be nice if the Pattern class just had a .test() method, but + // handling globstars is a bit of a pita, and that code already lives + // in minimatch anyway. + // Another way would be if maybe Minimatch could take its set/globParts + // as an option, and then we could at least just use Pattern to test + // for absolute-ness. + // Yet another way, Minimatch could take an array of glob strings, and + // a cwd option, and do the right thing. + const mm = new minimatch_1.Minimatch(ign, this.mmopts); + for (let i = 0; i < mm.set.length; i++) { + const parsed = mm.set[i]; + const globParts = mm.globParts[i]; + /* c8 ignore start */ + if (!parsed || !globParts) { + throw new Error('invalid pattern object'); + } + // strip off leading ./ portions + // https://github.com/isaacs/node-glob/issues/570 + while (parsed[0] === '.' && globParts[0] === '.') { + parsed.shift(); + globParts.shift(); + } + /* c8 ignore stop */ + const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform); + const m = new minimatch_1.Minimatch(p.globString(), this.mmopts); + const children = globParts[globParts.length - 1] === '**'; + const absolute = p.isAbsolute(); + if (absolute) + this.absolute.push(m); + else + this.relative.push(m); + if (children) { + if (absolute) + this.absoluteChildren.push(m); + else + this.relativeChildren.push(m); + } + } + } + ignored(p) { + const fullpath = p.fullpath(); + const fullpaths = `${fullpath}/`; + const relative = p.relative() || '.'; + const relatives = `${relative}/`; + for (const m of this.relative) { + if (m.match(relative) || m.match(relatives)) + return true; + } + for (const m of this.absolute) { + if (m.match(fullpath) || m.match(fullpaths)) + return true; + } + return false; + } + childrenIgnored(p) { + const fullpath = p.fullpath() + '/'; + const relative = (p.relative() || '.') + '/'; + for (const m of this.relativeChildren) { + if (m.match(relative)) + return true; + } + for (const m of this.absoluteChildren) { + if (m.match(fullpath)) + return true; + } + return false; + } +} +exports.Ignore = Ignore; +//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d9dfdfa34ab5c0e734952abd3c8070f804efcb1f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/ignore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAuD;AAEvD,6CAAsC;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEX;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAiB;IACzB,MAAM,CAAkB;IAExB,Y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;QAChC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAvGD,wBAuGC","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(ign: string) {\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n const mm = new Minimatch(ign, this.mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n // strip off leading ./ portions\n // https://github.com/isaacs/node-glob/issues/570\n while (parsed[0] === '.' && globParts[0] === '.') {\n parsed.shift()\n globParts.shift()\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, this.platform)\n const m = new Minimatch(p.globString(), this.mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9c326ddc895b6184475510d700a583732535a635 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts @@ -0,0 +1,97 @@ +import { Minipass } from 'minipass'; +import { Path } from 'path-scurry'; +import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; +import { Glob } from './glob.js'; +export { escape, unescape } from 'minimatch'; +export type { FSOption, Path, WalkOptions, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, } from 'path-scurry'; +export { Glob } from './glob.js'; +export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; +export { hasMagic } from './has-magic.js'; +export { Ignore } from './ignore.js'; +export type { IgnoreLike } from './ignore.js'; +export type { MatchStream } from './walker.js'; +/** + * Syncronous form of {@link globStream}. Will read all the matches as fast as + * you consume them, even all in a single tick if you consume them immediately, + * but will still respond to backpressure if they're not consumed immediately. + */ +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; +/** + * Return a stream that emits all the strings or `Path` objects and + * then emits `end` when completed. + */ +export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; +export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; +export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; +export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; +/** + * Synchronous form of {@link glob} + */ +export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; +export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; +export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; +export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; +/** + * Perform an asynchronous glob search for the pattern(s) specified. Returns + * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the + * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for + * full option descriptions. + */ +declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; +declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; +declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; +declare function glob_(pattern: string | string[], options: GlobOptions): Promise; +/** + * Return a sync iterator for walking glob pattern matches. + */ +export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; +/** + * Return an async iterator for walking glob pattern matches. + */ +export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; +export declare const streamSync: typeof globStreamSync; +export declare const stream: typeof globStream & { + sync: typeof globStreamSync; +}; +export declare const iterateSync: typeof globIterateSync; +export declare const iterate: typeof globIterate & { + sync: typeof globIterateSync; +}; +export declare const sync: typeof globSync & { + stream: typeof globStreamSync; + iterate: typeof globIterateSync; +}; +export declare const glob: typeof glob_ & { + glob: typeof glob_; + globSync: typeof globSync; + sync: typeof globSync & { + stream: typeof globStreamSync; + iterate: typeof globIterateSync; + }; + globStream: typeof globStream; + stream: typeof globStream & { + sync: typeof globStreamSync; + }; + globStreamSync: typeof globStreamSync; + streamSync: typeof globStreamSync; + globIterate: typeof globIterate; + iterate: typeof globIterate & { + sync: typeof globIterateSync; + }; + globIterateSync: typeof globIterateSync; + iterateSync: typeof globIterateSync; + Glob: typeof Glob; + hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; + escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; + unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5fb32252b63747526a971d82bf6ab2ee61b53631 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EACV,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAA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,CAAA;AAChC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAQ9D;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACnC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..151495d170efa2ddefa9d40819abf488999f7037 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0; +exports.globStreamSync = globStreamSync; +exports.globStream = globStream; +exports.globSync = globSync; +exports.globIterateSync = globIterateSync; +exports.globIterate = globIterate; +const minimatch_1 = require("minimatch"); +const glob_js_1 = require("./glob.js"); +const has_magic_js_1 = require("./has-magic.js"); +var minimatch_2 = require("minimatch"); +Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } }); +Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } }); +var glob_js_2 = require("./glob.js"); +Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } }); +var has_magic_js_2 = require("./has-magic.js"); +Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } }); +var ignore_js_1 = require("./ignore.js"); +Object.defineProperty(exports, "Ignore", { enumerable: true, get: function () { return ignore_js_1.Ignore; } }); +function globStreamSync(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).streamSync(); +} +function globStream(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).stream(); +} +function globSync(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).walkSync(); +} +async function glob_(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).walk(); +} +function globIterateSync(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).iterateSync(); +} +function globIterate(pattern, options = {}) { + return new glob_js_1.Glob(pattern, options).iterate(); +} +// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc +exports.streamSync = globStreamSync; +exports.stream = Object.assign(globStream, { sync: globStreamSync }); +exports.iterateSync = globIterateSync; +exports.iterate = Object.assign(globIterate, { + sync: globIterateSync, +}); +exports.sync = Object.assign(globSync, { + stream: globStreamSync, + iterate: globIterateSync, +}); +exports.glob = Object.assign(glob_, { + glob: glob_, + globSync, + sync: exports.sync, + globStream, + stream: exports.stream, + globStreamSync, + streamSync: exports.streamSync, + globIterate, + iterate: exports.iterate, + globIterateSync, + iterateSync: exports.iterateSync, + Glob: glob_js_1.Glob, + hasMagic: has_magic_js_1.hasMagic, + escape: minimatch_1.escape, + unescape: minimatch_1.unescape, +}); +exports.glob.glob = exports.glob; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e648b1d01939bc921393d446606768c86edfba71 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAqDA,wCAKC;AAsBD,gCAKC;AAqBD,4BAKC;AAkDD,0CAKC;AAqBD,kCAKC;AAhMD,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAEzC,uCAA4C;AAAnC,mGAAA,MAAM,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAQzB,qCAAgC;AAAvB,+FAAA,IAAI,OAAA;AAOb,+CAAyC;AAAhC,wGAAA,QAAQ,OAAA;AACjB,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AAyBf,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU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AC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI,EAAJ,YAAI;IACJ,UAAU;IACV,MAAM,EAAN,cAAM;IACN,cAAc;IACd,UAAU,EAAV,kBAAU;IACV,WAAW;IACX,OAAO,EAAP,eAAO;IACP,eAAe;IACf,WAAW,EAAX,mBAAW;IACX,IAAI,EAAJ,cAAI;IACJ,QAAQ,EAAR,uBAAQ;IACR,MAAM,EAAN,kBAAM;IACN,QAAQ,EAAR,oBAAQ;CACT,CAAC,CAAA;AACF,YAAI,CAAC,IAAI,GAAG,YAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n FSOption,\n Path,\n WalkOptions,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions,\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions,\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9636df3b54df2912790cdb6d4551c3ebe6e4d42e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts @@ -0,0 +1,76 @@ +import { GLOBSTAR } from 'minimatch'; +export type MMPattern = string | RegExp | typeof GLOBSTAR; +export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; +export type UNCPatternList = [ + p0: '', + p1: '', + p2: string, + p3: string, + ...rest: MMPattern[] +]; +export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; +export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; +export type GlobList = [p: string, ...rest: string[]]; +/** + * An immutable-ish view on an array of glob parts and their parsed + * results + */ +export declare class Pattern { + #private; + readonly length: number; + constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); + /** + * The first entry in the parsed list of patterns + */ + pattern(): MMPattern; + /** + * true of if pattern() returns a string + */ + isString(): boolean; + /** + * true of if pattern() returns GLOBSTAR + */ + isGlobstar(): boolean; + /** + * true if pattern() returns a regexp + */ + isRegExp(): boolean; + /** + * The /-joined set of glob parts that make up this pattern + */ + globString(): string; + /** + * true if there are more pattern parts after this one + */ + hasMore(): boolean; + /** + * The rest of the pattern after this part, or null if this is the end + */ + rest(): Pattern | null; + /** + * true if the pattern represents a //unc/path/ on windows + */ + isUNC(): boolean; + /** + * True if the pattern starts with a drive letter on Windows + */ + isDrive(): boolean; + /** + * True if the pattern is rooted on an absolute path + */ + isAbsolute(): boolean; + /** + * consume the root of the pattern, and return it + */ + root(): string; + /** + * Check to see if the current globstar pattern is allowed to follow + * a symbolic link. + */ + checkFollowGlobstar(): boolean; + /** + * Mark that the current globstar pattern is following a symbolic link + */ + markFollowGlobstar(): boolean; +} +//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..cdf322346317d8a12efa4c8fa613b693d2bf8bbe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js new file mode 100644 index 0000000000000000000000000000000000000000..f0de35fb5bed9d89d2dd3cecae31704b9153234b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js @@ -0,0 +1,219 @@ +"use strict"; +// this is just a very light wrapper around 2 arrays with an offset index +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Pattern = void 0; +const minimatch_1 = require("minimatch"); +const isPatternList = (pl) => pl.length >= 1; +const isGlobList = (gl) => gl.length >= 1; +/** + * An immutable-ish view on an array of glob parts and their parsed + * results + */ +class Pattern { + #patternList; + #globList; + #index; + length; + #platform; + #rest; + #globString; + #isDrive; + #isUNC; + #isAbsolute; + #followGlobstar = true; + constructor(patternList, globList, index, platform) { + if (!isPatternList(patternList)) { + throw new TypeError('empty pattern list'); + } + if (!isGlobList(globList)) { + throw new TypeError('empty glob list'); + } + if (globList.length !== patternList.length) { + throw new TypeError('mismatched pattern list and glob list lengths'); + } + this.length = patternList.length; + if (index < 0 || index >= this.length) { + throw new TypeError('index out of range'); + } + this.#patternList = patternList; + this.#globList = globList; + this.#index = index; + this.#platform = platform; + // normalize root entries of absolute patterns on initial creation. + if (this.#index === 0) { + // c: => ['c:/'] + // C:/ => ['C:/'] + // C:/x => ['C:/', 'x'] + // //host/share => ['//host/share/'] + // //host/share/ => ['//host/share/'] + // //host/share/x => ['//host/share/', 'x'] + // /etc => ['/', 'etc'] + // / => ['/'] + if (this.isUNC()) { + // '' / '' / 'host' / 'share' + const [p0, p1, p2, p3, ...prest] = this.#patternList; + const [g0, g1, g2, g3, ...grest] = this.#globList; + if (prest[0] === '') { + // ends in / + prest.shift(); + grest.shift(); + } + const p = [p0, p1, p2, p3, ''].join('/'); + const g = [g0, g1, g2, g3, ''].join('/'); + this.#patternList = [p, ...prest]; + this.#globList = [g, ...grest]; + this.length = this.#patternList.length; + } + else if (this.isDrive() || this.isAbsolute()) { + const [p1, ...prest] = this.#patternList; + const [g1, ...grest] = this.#globList; + if (prest[0] === '') { + // ends in / + prest.shift(); + grest.shift(); + } + const p = p1 + '/'; + const g = g1 + '/'; + this.#patternList = [p, ...prest]; + this.#globList = [g, ...grest]; + this.length = this.#patternList.length; + } + } + } + /** + * The first entry in the parsed list of patterns + */ + pattern() { + return this.#patternList[this.#index]; + } + /** + * true of if pattern() returns a string + */ + isString() { + return typeof this.#patternList[this.#index] === 'string'; + } + /** + * true of if pattern() returns GLOBSTAR + */ + isGlobstar() { + return this.#patternList[this.#index] === minimatch_1.GLOBSTAR; + } + /** + * true if pattern() returns a regexp + */ + isRegExp() { + return this.#patternList[this.#index] instanceof RegExp; + } + /** + * The /-joined set of glob parts that make up this pattern + */ + globString() { + return (this.#globString = + this.#globString || + (this.#index === 0 ? + this.isAbsolute() ? + this.#globList[0] + this.#globList.slice(1).join('/') + : this.#globList.join('/') + : this.#globList.slice(this.#index).join('/'))); + } + /** + * true if there are more pattern parts after this one + */ + hasMore() { + return this.length > this.#index + 1; + } + /** + * The rest of the pattern after this part, or null if this is the end + */ + rest() { + if (this.#rest !== undefined) + return this.#rest; + if (!this.hasMore()) + return (this.#rest = null); + this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); + this.#rest.#isAbsolute = this.#isAbsolute; + this.#rest.#isUNC = this.#isUNC; + this.#rest.#isDrive = this.#isDrive; + return this.#rest; + } + /** + * true if the pattern represents a //unc/path/ on windows + */ + isUNC() { + const pl = this.#patternList; + return this.#isUNC !== undefined ? + this.#isUNC + : (this.#isUNC = + this.#platform === 'win32' && + this.#index === 0 && + pl[0] === '' && + pl[1] === '' && + typeof pl[2] === 'string' && + !!pl[2] && + typeof pl[3] === 'string' && + !!pl[3]); + } + // pattern like C:/... + // split = ['C:', ...] + // XXX: would be nice to handle patterns like `c:*` to test the cwd + // in c: for *, but I don't know of a way to even figure out what that + // cwd is without actually chdir'ing into it? + /** + * True if the pattern starts with a drive letter on Windows + */ + isDrive() { + const pl = this.#patternList; + return this.#isDrive !== undefined ? + this.#isDrive + : (this.#isDrive = + this.#platform === 'win32' && + this.#index === 0 && + this.length > 1 && + typeof pl[0] === 'string' && + /^[a-z]:$/i.test(pl[0])); + } + // pattern = '/' or '/...' or '/x/...' + // split = ['', ''] or ['', ...] or ['', 'x', ...] + // Drive and UNC both considered absolute on windows + /** + * True if the pattern is rooted on an absolute path + */ + isAbsolute() { + const pl = this.#patternList; + return this.#isAbsolute !== undefined ? + this.#isAbsolute + : (this.#isAbsolute = + (pl[0] === '' && pl.length > 1) || + this.isDrive() || + this.isUNC()); + } + /** + * consume the root of the pattern, and return it + */ + root() { + const p = this.#patternList[0]; + return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ? + p + : ''; + } + /** + * Check to see if the current globstar pattern is allowed to follow + * a symbolic link. + */ + checkFollowGlobstar() { + return !(this.#index === 0 || + !this.isGlobstar() || + !this.#followGlobstar); + } + /** + * Mark that the current globstar pattern is following a symbolic link + */ + markFollowGlobstar() { + if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) + return false; + this.#followGlobstar = false; + return true; + } +} +exports.Pattern = Pattern; +//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fc10ea5d6c4ef4d274e2e1b73171f38beebab3e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAAA,yEAAyE;;;AAEzE,yCAAoC;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAa,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CA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MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AArOD,0BAqOC","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform,\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0 ?\n this.isAbsolute() ?\n this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform,\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined ?\n this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined ?\n this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined ?\n this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return (\n typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ) ?\n p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ccedfbf2820f7d51167574666a80785ca1b91b07 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts @@ -0,0 +1,59 @@ +import { MMRegExp } from 'minimatch'; +import { Path } from 'path-scurry'; +import { Pattern } from './pattern.js'; +import { GlobWalkerOpts } from './walker.js'; +/** + * A cache of which patterns have been processed for a given Path + */ +export declare class HasWalkedCache { + store: Map>; + constructor(store?: Map>); + copy(): HasWalkedCache; + hasWalked(target: Path, pattern: Pattern): boolean | undefined; + storeWalked(target: Path, pattern: Pattern): void; +} +/** + * A record of which paths have been matched in a given walk step, + * and whether they only are considered a match if they are a directory, + * and whether their absolute or relative path should be returned. + */ +export declare class MatchRecord { + store: Map; + add(target: Path, absolute: boolean, ifDir: boolean): void; + entries(): [Path, boolean, boolean][]; +} +/** + * A collection of patterns that must be processed in a subsequent step + * for a given path. + */ +export declare class SubWalks { + store: Map; + add(target: Path, pattern: Pattern): void; + get(target: Path): Pattern[]; + entries(): [Path, Pattern[]][]; + keys(): Path[]; +} +/** + * The class that processes patterns for a given path. + * + * Handles child entry filtering, and determining whether a path's + * directory contents must be read. + */ +export declare class Processor { + hasWalkedCache: HasWalkedCache; + matches: MatchRecord; + subwalks: SubWalks; + patterns?: Pattern[]; + follow: boolean; + dot: boolean; + opts: GlobWalkerOpts; + constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); + processPatterns(target: Path, patterns: Pattern[]): this; + subwalkTargets(): Path[]; + child(): Processor; + filterEntries(parent: Path, entries: Path[]): Processor; + testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; + testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; + testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; +} +//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..aa266fee4a0544a0a8f7fddceb347d7d059643e0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGx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AO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js new file mode 100644 index 0000000000000000000000000000000000000000..ee3bb4397e0b2d3aaff9b1e2053ac13a2af9f31b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js @@ -0,0 +1,301 @@ +"use strict"; +// synchronous utility for filtering entries and calculating subwalks +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0; +const minimatch_1 = require("minimatch"); +/** + * A cache of which patterns have been processed for a given Path + */ +class HasWalkedCache { + store; + constructor(store = new Map()) { + this.store = store; + } + copy() { + return new HasWalkedCache(new Map(this.store)); + } + hasWalked(target, pattern) { + return this.store.get(target.fullpath())?.has(pattern.globString()); + } + storeWalked(target, pattern) { + const fullpath = target.fullpath(); + const cached = this.store.get(fullpath); + if (cached) + cached.add(pattern.globString()); + else + this.store.set(fullpath, new Set([pattern.globString()])); + } +} +exports.HasWalkedCache = HasWalkedCache; +/** + * A record of which paths have been matched in a given walk step, + * and whether they only are considered a match if they are a directory, + * and whether their absolute or relative path should be returned. + */ +class MatchRecord { + store = new Map(); + add(target, absolute, ifDir) { + const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); + const current = this.store.get(target); + this.store.set(target, current === undefined ? n : n & current); + } + // match, absolute, ifdir + entries() { + return [...this.store.entries()].map(([path, n]) => [ + path, + !!(n & 2), + !!(n & 1), + ]); + } +} +exports.MatchRecord = MatchRecord; +/** + * A collection of patterns that must be processed in a subsequent step + * for a given path. + */ +class SubWalks { + store = new Map(); + add(target, pattern) { + if (!target.canReaddir()) { + return; + } + const subs = this.store.get(target); + if (subs) { + if (!subs.find(p => p.globString() === pattern.globString())) { + subs.push(pattern); + } + } + else + this.store.set(target, [pattern]); + } + get(target) { + const subs = this.store.get(target); + /* c8 ignore start */ + if (!subs) { + throw new Error('attempting to walk unknown path'); + } + /* c8 ignore stop */ + return subs; + } + entries() { + return this.keys().map(k => [k, this.store.get(k)]); + } + keys() { + return [...this.store.keys()].filter(t => t.canReaddir()); + } +} +exports.SubWalks = SubWalks; +/** + * The class that processes patterns for a given path. + * + * Handles child entry filtering, and determining whether a path's + * directory contents must be read. + */ +class Processor { + hasWalkedCache; + matches = new MatchRecord(); + subwalks = new SubWalks(); + patterns; + follow; + dot; + opts; + constructor(opts, hasWalkedCache) { + this.opts = opts; + this.follow = !!opts.follow; + this.dot = !!opts.dot; + this.hasWalkedCache = + hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache(); + } + processPatterns(target, patterns) { + this.patterns = patterns; + const processingSet = patterns.map(p => [target, p]); + // map of paths to the magic-starting subwalks they need to walk + // first item in patterns is the filter + for (let [t, pattern] of processingSet) { + this.hasWalkedCache.storeWalked(t, pattern); + const root = pattern.root(); + const absolute = pattern.isAbsolute() && this.opts.absolute !== false; + // start absolute patterns at root + if (root) { + t = t.resolve(root === '/' && this.opts.root !== undefined ? + this.opts.root + : root); + const rest = pattern.rest(); + if (!rest) { + this.matches.add(t, true, false); + continue; + } + else { + pattern = rest; + } + } + if (t.isENOENT()) + continue; + let p; + let rest; + let changed = false; + while (typeof (p = pattern.pattern()) === 'string' && + (rest = pattern.rest())) { + const c = t.resolve(p); + t = c; + pattern = rest; + changed = true; + } + p = pattern.pattern(); + rest = pattern.rest(); + if (changed) { + if (this.hasWalkedCache.hasWalked(t, pattern)) + continue; + this.hasWalkedCache.storeWalked(t, pattern); + } + // now we have either a final string for a known entry, + // more strings for an unknown entry, + // or a pattern starting with magic, mounted on t. + if (typeof p === 'string') { + // must not be final entry, otherwise we would have + // concatenated it earlier. + const ifDir = p === '..' || p === '' || p === '.'; + this.matches.add(t.resolve(p), absolute, ifDir); + continue; + } + else if (p === minimatch_1.GLOBSTAR) { + // if no rest, match and subwalk pattern + // if rest, process rest and subwalk pattern + // if it's a symlink, but we didn't get here by way of a + // globstar match (meaning it's the first time THIS globstar + // has traversed a symlink), then we follow it. Otherwise, stop. + if (!t.isSymbolicLink() || + this.follow || + pattern.checkFollowGlobstar()) { + this.subwalks.add(t, pattern); + } + const rp = rest?.pattern(); + const rrest = rest?.rest(); + if (!rest || ((rp === '' || rp === '.') && !rrest)) { + // only HAS to be a dir if it ends in **/ or **/. + // but ending in ** will match files as well. + this.matches.add(t, absolute, rp === '' || rp === '.'); + } + else { + if (rp === '..') { + // this would mean you're matching **/.. at the fs root, + // and no thanks, I'm not gonna test that specific case. + /* c8 ignore start */ + const tp = t.parent || t; + /* c8 ignore stop */ + if (!rrest) + this.matches.add(tp, absolute, true); + else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { + this.subwalks.add(tp, rrest); + } + } + } + } + else if (p instanceof RegExp) { + this.subwalks.add(t, pattern); + } + } + return this; + } + subwalkTargets() { + return this.subwalks.keys(); + } + child() { + return new Processor(this.opts, this.hasWalkedCache); + } + // return a new Processor containing the subwalks for each + // child entry, and a set of matches, and + // a hasWalkedCache that's a copy of this one + // then we're going to call + filterEntries(parent, entries) { + const patterns = this.subwalks.get(parent); + // put matches and entry walks into the results processor + const results = this.child(); + for (const e of entries) { + for (const pattern of patterns) { + const absolute = pattern.isAbsolute(); + const p = pattern.pattern(); + const rest = pattern.rest(); + if (p === minimatch_1.GLOBSTAR) { + results.testGlobstar(e, pattern, rest, absolute); + } + else if (p instanceof RegExp) { + results.testRegExp(e, p, rest, absolute); + } + else { + results.testString(e, p, rest, absolute); + } + } + } + return results; + } + testGlobstar(e, pattern, rest, absolute) { + if (this.dot || !e.name.startsWith('.')) { + if (!pattern.hasMore()) { + this.matches.add(e, absolute, false); + } + if (e.canReaddir()) { + // if we're in follow mode or it's not a symlink, just keep + // testing the same pattern. If there's more after the globstar, + // then this symlink consumes the globstar. If not, then we can + // follow at most ONE symlink along the way, so we mark it, which + // also checks to ensure that it wasn't already marked. + if (this.follow || !e.isSymbolicLink()) { + this.subwalks.add(e, pattern); + } + else if (e.isSymbolicLink()) { + if (rest && pattern.checkFollowGlobstar()) { + this.subwalks.add(e, rest); + } + else if (pattern.markFollowGlobstar()) { + this.subwalks.add(e, pattern); + } + } + } + } + // if the NEXT thing matches this entry, then also add + // the rest. + if (rest) { + const rp = rest.pattern(); + if (typeof rp === 'string' && + // dots and empty were handled already + rp !== '..' && + rp !== '' && + rp !== '.') { + this.testString(e, rp, rest.rest(), absolute); + } + else if (rp === '..') { + /* c8 ignore start */ + const ep = e.parent || e; + /* c8 ignore stop */ + this.subwalks.add(ep, rest); + } + else if (rp instanceof RegExp) { + this.testRegExp(e, rp, rest.rest(), absolute); + } + } + } + testRegExp(e, p, rest, absolute) { + if (!p.test(e.name)) + return; + if (!rest) { + this.matches.add(e, absolute, false); + } + else { + this.subwalks.add(e, rest); + } + } + testString(e, p, rest, absolute) { + // should never happen? + if (!e.isNamed(p)) + return; + if (!rest) { + this.matches.add(e, absolute, false); + } + else { + this.subwalks.add(e, rest); + } + } +} +exports.Processor = Processor; +//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..58a70882e9462f7c0746a03edf0fe37e625230ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/processor.js.map @@ -0,0 +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AG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;YAC7B,CAAC;iBAAM,IAAI,EAAE,YAAY,MAAM,EAAE,CAAC;gBAChC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IAED,UAAU,CACR,CAAO,EACP,CAAW,EACX,IAAoB,EACpB,QAAiB;QAEjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;CACF;AA9ND,8BA8NC","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache =\n hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined ?\n this.opts.root\n : root,\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..499c8f4933857a8720e77b7b96d9842bbd3248ae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts @@ -0,0 +1,97 @@ +/** + * Single-use utility classes to provide functionality to the {@link Glob} + * methods. + * + * @module + */ +import { Minipass } from 'minipass'; +import { Path } from 'path-scurry'; +import { IgnoreLike } from './ignore.js'; +import { Pattern } from './pattern.js'; +import { Processor } from './processor.js'; +export interface GlobWalkerOpts { + absolute?: boolean; + allowWindowsEscape?: boolean; + cwd?: string | URL; + dot?: boolean; + dotRelative?: boolean; + follow?: boolean; + ignore?: string | string[] | IgnoreLike; + mark?: boolean; + matchBase?: boolean; + maxDepth?: number; + nobrace?: boolean; + nocase?: boolean; + nodir?: boolean; + noext?: boolean; + noglobstar?: boolean; + platform?: NodeJS.Platform; + posix?: boolean; + realpath?: boolean; + root?: string; + stat?: boolean; + signal?: AbortSignal; + windowsPathsNoEscape?: boolean; + withFileTypes?: boolean; + includeChildMatches?: boolean; +} +export type GWOFileTypesTrue = GlobWalkerOpts & { + withFileTypes: true; +}; +export type GWOFileTypesFalse = GlobWalkerOpts & { + withFileTypes: false; +}; +export type GWOFileTypesUnset = GlobWalkerOpts & { + withFileTypes?: undefined; +}; +export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; +export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; +export type MatchStream = Minipass, Result>; +/** + * basic walking utilities that all the glob walker types use + */ +export declare abstract class GlobUtil { + #private; + path: Path; + patterns: Pattern[]; + opts: O; + seen: Set; + paused: boolean; + aborted: boolean; + signal?: AbortSignal; + maxDepth: number; + includeChildMatches: boolean; + constructor(patterns: Pattern[], path: Path, opts: O); + pause(): void; + resume(): void; + onResume(fn: () => any): void; + matchCheck(e: Path, ifDir: boolean): Promise; + matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; + matchCheckSync(e: Path, ifDir: boolean): Path | undefined; + abstract matchEmit(p: Result): void; + abstract matchEmit(p: string | Path): void; + matchFinish(e: Path, absolute: boolean): void; + match(e: Path, absolute: boolean, ifDir: boolean): Promise; + matchSync(e: Path, absolute: boolean, ifDir: boolean): void; + walkCB(target: Path, patterns: Pattern[], cb: () => any): void; + walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; + walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; + walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; + walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; + walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; +} +export declare class GlobWalker extends GlobUtil { + matches: Set>; + constructor(patterns: Pattern[], path: Path, opts: O); + matchEmit(e: Result): void; + walk(): Promise>>; + walkSync(): Set>; +} +export declare class GlobStream extends GlobUtil { + results: Minipass, Result>; + constructor(patterns: Pattern[], path: Path, opts: O); + matchEmit(e: Result): void; + stream(): MatchStream; + streamSync(): MatchStream; +} +//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..769957bd59bb1ce67cdf28134be59ca86946c405 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC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,EAAE,IAAI,EAAE,CAAC;IAIpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAIvB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAiBrC,QAAQ,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAW3B;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;gBAE3B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAK7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js new file mode 100644 index 0000000000000000000000000000000000000000..cb15946d9a852cf8147b2c53f4021c796df36ef9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js @@ -0,0 +1,387 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; +/** + * Single-use utility classes to provide functionality to the {@link Glob} + * methods. + * + * @module + */ +const minipass_1 = require("minipass"); +const ignore_js_1 = require("./ignore.js"); +const processor_js_1 = require("./processor.js"); +const makeIgnore = (ignore, opts) => typeof ignore === 'string' ? new ignore_js_1.Ignore([ignore], opts) + : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) + : ignore; +/** + * basic walking utilities that all the glob walker types use + */ +class GlobUtil { + path; + patterns; + opts; + seen = new Set(); + paused = false; + aborted = false; + #onResume = []; + #ignore; + #sep; + signal; + maxDepth; + includeChildMatches; + constructor(patterns, path, opts) { + this.patterns = patterns; + this.path = path; + this.opts = opts; + this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; + this.includeChildMatches = opts.includeChildMatches !== false; + if (opts.ignore || !this.includeChildMatches) { + this.#ignore = makeIgnore(opts.ignore ?? [], opts); + if (!this.includeChildMatches && + typeof this.#ignore.add !== 'function') { + const m = 'cannot ignore child matches, ignore lacks add() method.'; + throw new Error(m); + } + } + // ignore, always set with maxDepth, but it's optional on the + // GlobOptions type + /* c8 ignore start */ + this.maxDepth = opts.maxDepth || Infinity; + /* c8 ignore stop */ + if (opts.signal) { + this.signal = opts.signal; + this.signal.addEventListener('abort', () => { + this.#onResume.length = 0; + }); + } + } + #ignored(path) { + return this.seen.has(path) || !!this.#ignore?.ignored?.(path); + } + #childrenIgnored(path) { + return !!this.#ignore?.childrenIgnored?.(path); + } + // backpressure mechanism + pause() { + this.paused = true; + } + resume() { + /* c8 ignore start */ + if (this.signal?.aborted) + return; + /* c8 ignore stop */ + this.paused = false; + let fn = undefined; + while (!this.paused && (fn = this.#onResume.shift())) { + fn(); + } + } + onResume(fn) { + if (this.signal?.aborted) + return; + /* c8 ignore start */ + if (!this.paused) { + fn(); + } + else { + /* c8 ignore stop */ + this.#onResume.push(fn); + } + } + // do the requisite realpath/stat checking, and return the path + // to add or undefined to filter it out. + async matchCheck(e, ifDir) { + if (ifDir && this.opts.nodir) + return undefined; + let rpc; + if (this.opts.realpath) { + rpc = e.realpathCached() || (await e.realpath()); + if (!rpc) + return undefined; + e = rpc; + } + const needStat = e.isUnknown() || this.opts.stat; + const s = needStat ? await e.lstat() : e; + if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { + const target = await s.realpath(); + /* c8 ignore start */ + if (target && (target.isUnknown() || this.opts.stat)) { + await target.lstat(); + } + /* c8 ignore stop */ + } + return this.matchCheckTest(s, ifDir); + } + matchCheckTest(e, ifDir) { + return (e && + (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && + (!ifDir || e.canReaddir()) && + (!this.opts.nodir || !e.isDirectory()) && + (!this.opts.nodir || + !this.opts.follow || + !e.isSymbolicLink() || + !e.realpathCached()?.isDirectory()) && + !this.#ignored(e)) ? + e + : undefined; + } + matchCheckSync(e, ifDir) { + if (ifDir && this.opts.nodir) + return undefined; + let rpc; + if (this.opts.realpath) { + rpc = e.realpathCached() || e.realpathSync(); + if (!rpc) + return undefined; + e = rpc; + } + const needStat = e.isUnknown() || this.opts.stat; + const s = needStat ? e.lstatSync() : e; + if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { + const target = s.realpathSync(); + if (target && (target?.isUnknown() || this.opts.stat)) { + target.lstatSync(); + } + } + return this.matchCheckTest(s, ifDir); + } + matchFinish(e, absolute) { + if (this.#ignored(e)) + return; + // we know we have an ignore if this is false, but TS doesn't + if (!this.includeChildMatches && this.#ignore?.add) { + const ign = `${e.relativePosix()}/**`; + this.#ignore.add(ign); + } + const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; + this.seen.add(e); + const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; + // ok, we have what we need! + if (this.opts.withFileTypes) { + this.matchEmit(e); + } + else if (abs) { + const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); + this.matchEmit(abs + mark); + } + else { + const rel = this.opts.posix ? e.relativePosix() : e.relative(); + const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? + '.' + this.#sep + : ''; + this.matchEmit(!rel ? '.' + mark : pre + rel + mark); + } + } + async match(e, absolute, ifDir) { + const p = await this.matchCheck(e, ifDir); + if (p) + this.matchFinish(p, absolute); + } + matchSync(e, absolute, ifDir) { + const p = this.matchCheckSync(e, ifDir); + if (p) + this.matchFinish(p, absolute); + } + walkCB(target, patterns, cb) { + /* c8 ignore start */ + if (this.signal?.aborted) + cb(); + /* c8 ignore stop */ + this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb); + } + walkCB2(target, patterns, processor, cb) { + if (this.#childrenIgnored(target)) + return cb(); + if (this.signal?.aborted) + cb(); + if (this.paused) { + this.onResume(() => this.walkCB2(target, patterns, processor, cb)); + return; + } + processor.processPatterns(target, patterns); + // done processing. all of the above is sync, can be abstracted out. + // subwalks is a map of paths to the entry filters they need + // matches is a map of paths to [absolute, ifDir] tuples. + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + tasks++; + this.match(m, absolute, ifDir).then(() => next()); + } + for (const t of processor.subwalkTargets()) { + if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { + continue; + } + tasks++; + const childrenCached = t.readdirCached(); + if (t.calledReaddir()) + this.walkCB3(t, childrenCached, processor, next); + else { + t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); + } + } + next(); + } + walkCB3(target, entries, processor, cb) { + processor = processor.filterEntries(target, entries); + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + tasks++; + this.match(m, absolute, ifDir).then(() => next()); + } + for (const [target, patterns] of processor.subwalks.entries()) { + tasks++; + this.walkCB2(target, patterns, processor.child(), next); + } + next(); + } + walkCBSync(target, patterns, cb) { + /* c8 ignore start */ + if (this.signal?.aborted) + cb(); + /* c8 ignore stop */ + this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb); + } + walkCB2Sync(target, patterns, processor, cb) { + if (this.#childrenIgnored(target)) + return cb(); + if (this.signal?.aborted) + cb(); + if (this.paused) { + this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); + return; + } + processor.processPatterns(target, patterns); + // done processing. all of the above is sync, can be abstracted out. + // subwalks is a map of paths to the entry filters they need + // matches is a map of paths to [absolute, ifDir] tuples. + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + this.matchSync(m, absolute, ifDir); + } + for (const t of processor.subwalkTargets()) { + if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { + continue; + } + tasks++; + const children = t.readdirSync(); + this.walkCB3Sync(t, children, processor, next); + } + next(); + } + walkCB3Sync(target, entries, processor, cb) { + processor = processor.filterEntries(target, entries); + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + this.matchSync(m, absolute, ifDir); + } + for (const [target, patterns] of processor.subwalks.entries()) { + tasks++; + this.walkCB2Sync(target, patterns, processor.child(), next); + } + next(); + } +} +exports.GlobUtil = GlobUtil; +class GlobWalker extends GlobUtil { + matches = new Set(); + constructor(patterns, path, opts) { + super(patterns, path, opts); + } + matchEmit(e) { + this.matches.add(e); + } + async walk() { + if (this.signal?.aborted) + throw this.signal.reason; + if (this.path.isUnknown()) { + await this.path.lstat(); + } + await new Promise((res, rej) => { + this.walkCB(this.path, this.patterns, () => { + if (this.signal?.aborted) { + rej(this.signal.reason); + } + else { + res(this.matches); + } + }); + }); + return this.matches; + } + walkSync() { + if (this.signal?.aborted) + throw this.signal.reason; + if (this.path.isUnknown()) { + this.path.lstatSync(); + } + // nothing for the callback to do, because this never pauses + this.walkCBSync(this.path, this.patterns, () => { + if (this.signal?.aborted) + throw this.signal.reason; + }); + return this.matches; + } +} +exports.GlobWalker = GlobWalker; +class GlobStream extends GlobUtil { + results; + constructor(patterns, path, opts) { + super(patterns, path, opts); + this.results = new minipass_1.Minipass({ + signal: this.signal, + objectMode: true, + }); + this.results.on('drain', () => this.resume()); + this.results.on('resume', () => this.resume()); + } + matchEmit(e) { + this.results.write(e); + if (!this.results.flowing) + this.pause(); + } + stream() { + const target = this.path; + if (target.isUnknown()) { + target.lstat().then(() => { + this.walkCB(target, this.patterns, () => this.results.end()); + }); + } + else { + this.walkCB(target, this.patterns, () => this.results.end()); + } + return this.results; + } + streamSync() { + if (this.path.isUnknown()) { + this.path.lstatSync(); + } + this.walkCBSync(this.path, this.patterns, () => this.results.end()); + return this.results; + } +} +exports.GlobStream = GlobStream; +//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js.map new file mode 100644 index 0000000000000000000000000000000000000000..49b013864d534bfba5b0357f69223f32f4ffd37b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/commonjs/walker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,uCAAmC;AAEnC,2CAAgD;AAQhD,iDAA0C;AA0D1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,kBAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IACvD,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAM,CAAC,MAAM,EAAE,IAAI,CAAC;QAClD,CAAC,CAAC,MAAM,CAAA;AAEV;;GAEG;AACH,MAAsB,QAAQ;IAC5B,IAAI,CAAM;IACV,QAAQ,CAAW;IACnB,IAAI,CAAG;IACP,IAAI,GAAc,IAAI,GAAG,EAAQ,CAAA;IACjC,MAAM,GAAY,KAAK,CAAA;IACvB,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAkB,EAAE,CAAA;IAC7B,OAAO,C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AA;YAC9D,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAC9D,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAvCD,gCAuCC","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n includeChildMatches?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n O extends GWOFileTypesTrue ? Path\n : O extends GWOFileTypesFalse ? string\n : O extends GWOFileTypesUnset ? string\n : Path | string\n\nexport type Matches =\n O extends GWOFileTypesTrue ? Set\n : O extends GWOFileTypesFalse ? Set\n : O extends GWOFileTypesUnset ? Set\n : Set\n\nexport type MatchStream = Minipass<\n Result,\n Result\n>\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts,\n): IgnoreLike =>\n typeof ignore === 'string' ? new Ignore([ignore], opts)\n : Array.isArray(ignore) ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n includeChildMatches: boolean\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n this.includeChildMatches = opts.includeChildMatches !== false\n if (opts.ignore || !this.includeChildMatches) {\n this.#ignore = makeIgnore(opts.ignore ?? [], opts)\n if (\n !this.includeChildMatches &&\n typeof this.#ignore.add !== 'function'\n ) {\n const m = 'cannot ignore child matches, ignore lacks add() method.'\n throw new Error(m)\n }\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? await e.lstat() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = await s.realpath()\n /* c8 ignore start */\n if (target && (target.isUnknown() || this.opts.stat)) {\n await target.lstat()\n }\n /* c8 ignore stop */\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return (\n e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n (!this.opts.nodir ||\n !this.opts.follow ||\n !e.isSymbolicLink() ||\n !e.realpathCached()?.isDirectory()) &&\n !this.#ignored(e)\n ) ?\n e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? e.lstatSync() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = s.realpathSync()\n if (target && (target?.isUnknown() || this.opts.stat)) {\n target.lstatSync()\n }\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n // we know we have an ignore if this is false, but TS doesn't\n if (!this.includeChildMatches && this.#ignore?.add) {\n const ign = `${e.relativePosix()}/**`\n this.#ignore.add(ign)\n }\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?\n '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true,\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb),\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n matches = new Set>()\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n }\n\n matchEmit(e: Result): void {\n this.matches.add(e)\n }\n\n async walk(): Promise>> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Set> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n results: Minipass, Result>\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass, Result>({\n signal: this.signal,\n objectMode: true,\n })\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..77298e477081756086e9db739440c9422f97e7ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +export {}; +//# sourceMappingURL=bin.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ec64bdda861bc9d0632eb010ac3a572aa8a5e50b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.d.mts","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs new file mode 100644 index 0000000000000000000000000000000000000000..553bb79303d9018965b1f54b135611c7aa1980dd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs @@ -0,0 +1,276 @@ +#!/usr/bin/env node +import { foregroundChild } from 'foreground-child'; +import { existsSync } from 'fs'; +import { jack } from 'jackspeak'; +import { loadPackageJson } from 'package-json-from-dist'; +import { join } from 'path'; +import { globStream } from './index.js'; +const { version } = loadPackageJson(import.meta.url, '../package.json'); +const j = jack({ + usage: 'glob [options] [ [ ...]]', +}) + .description(` + Glob v${version} + + Expand the positional glob expression arguments into any matching file + system paths found. + `) + .opt({ + cmd: { + short: 'c', + hint: 'command', + description: `Run the command provided, passing the glob expression + matches as arguments.`, + }, +}) + .opt({ + default: { + short: 'p', + hint: 'pattern', + description: `If no positional arguments are provided, glob will use + this pattern`, + }, +}) + .flag({ + all: { + short: 'A', + description: `By default, the glob cli command will not expand any + arguments that are an exact match to a file on disk. + + This prevents double-expanding, in case the shell expands + an argument whose filename is a glob expression. + + For example, if 'app/*.ts' would match 'app/[id].ts', then + on Windows powershell or cmd.exe, 'glob app/*.ts' will + expand to 'app/[id].ts', as expected. However, in posix + shells such as bash or zsh, the shell will first expand + 'app/*.ts' to a list of filenames. Then glob will look + for a file matching 'app/[id].ts' (ie, 'app/i.ts' or + 'app/d.ts'), which is unexpected. + + Setting '--all' prevents this behavior, causing glob + to treat ALL patterns as glob expressions to be expanded, + even if they are an exact match to a file on disk. + + When setting this option, be sure to enquote arguments + so that the shell will not expand them prior to passing + them to the glob command process. + `, + }, + absolute: { + short: 'a', + description: 'Expand to absolute paths', + }, + 'dot-relative': { + short: 'd', + description: `Prepend './' on relative matches`, + }, + mark: { + short: 'm', + description: `Append a / on any directories matched`, + }, + posix: { + short: 'x', + description: `Always resolve to posix style paths, using '/' as the + directory separator, even on Windows. Drive letter + absolute matches on Windows will be expanded to their + full resolved UNC maths, eg instead of 'C:\\foo\\bar', + it will expand to '//?/C:/foo/bar'. + `, + }, + follow: { + short: 'f', + description: `Follow symlinked directories when expanding '**'`, + }, + realpath: { + short: 'R', + description: `Call 'fs.realpath' on all of the results. In the case + of an entry that cannot be resolved, the entry is + omitted. This incurs a slight performance penalty, of + course, because of the added system calls.`, + }, + stat: { + short: 's', + description: `Call 'fs.lstat' on all entries, whether required or not + to determine if it's a valid match.`, + }, + 'match-base': { + short: 'b', + description: `Perform a basename-only match if the pattern does not + contain any slash characters. That is, '*.js' would be + treated as equivalent to '**/*.js', matching js files + in all directories. + `, + }, + dot: { + description: `Allow patterns to match files/directories that start + with '.', even if the pattern does not start with '.' + `, + }, + nobrace: { + description: 'Do not expand {...} patterns', + }, + nocase: { + description: `Perform a case-insensitive match. This defaults to + 'true' on macOS and Windows platforms, and false on + all others. + + Note: 'nocase' should only be explicitly set when it is + known that the filesystem's case sensitivity differs + from the platform default. If set 'true' on + case-insensitive file systems, then the walk may return + more or less results than expected. + `, + }, + nodir: { + description: `Do not match directories, only files. + + Note: to *only* match directories, append a '/' at the + end of the pattern. + `, + }, + noext: { + description: `Do not expand extglob patterns, such as '+(a|b)'`, + }, + noglobstar: { + description: `Do not expand '**' against multiple path portions. + Ie, treat it as a normal '*' instead.`, + }, + 'windows-path-no-escape': { + description: `Use '\\' as a path separator *only*, and *never* as an + escape character. If set, all '\\' characters are + replaced with '/' in the pattern.`, + }, +}) + .num({ + 'max-depth': { + short: 'D', + description: `Maximum depth to traverse from the current + working directory`, + }, +}) + .opt({ + cwd: { + short: 'C', + description: 'Current working directory to execute/match in', + default: process.cwd(), + }, + root: { + short: 'r', + description: `A string path resolved against the 'cwd', which is + used as the starting point for absolute patterns that + start with '/' (but not drive letters or UNC paths + on Windows). + + Note that this *doesn't* necessarily limit the walk to + the 'root' directory, and doesn't affect the cwd + starting point for non-absolute patterns. A pattern + containing '..' will still be able to traverse out of + the root directory, if it is not an actual root directory + on the filesystem, and any non-absolute patterns will + still be matched in the 'cwd'. + + To start absolute and non-absolute patterns in the same + path, you can use '--root=' to set it to the empty + string. However, be aware that on Windows systems, a + pattern like 'x:/*' or '//host/share/*' will *always* + start in the 'x:/' or '//host/share/' directory, + regardless of the --root setting. + `, + }, + platform: { + description: `Defaults to the value of 'process.platform' if + available, or 'linux' if not. Setting --platform=win32 + on non-Windows systems may cause strange behavior!`, + validOptions: [ + 'aix', + 'android', + 'darwin', + 'freebsd', + 'haiku', + 'linux', + 'openbsd', + 'sunos', + 'win32', + 'cygwin', + 'netbsd', + ], + }, +}) + .optList({ + ignore: { + short: 'i', + description: `Glob patterns to ignore`, + }, +}) + .flag({ + debug: { + short: 'v', + description: `Output a huge amount of noisy debug information about + patterns as they are parsed and used to match files.`, + }, + version: { + short: 'V', + description: `Output the version (${version})`, + }, + help: { + short: 'h', + description: 'Show this usage information', + }, +}); +try { + const { positionals, values } = j.parse(); + if (values.version) { + console.log(version); + process.exit(0); + } + if (values.help) { + console.log(j.usage()); + process.exit(0); + } + if (positionals.length === 0 && !values.default) + throw 'No patterns provided'; + if (positionals.length === 0 && values.default) + positionals.push(values.default); + const patterns = values.all ? positionals : positionals.filter(p => !existsSync(p)); + const matches = values.all ? + [] + : positionals.filter(p => existsSync(p)).map(p => join(p)); + const stream = globStream(patterns, { + absolute: values.absolute, + cwd: values.cwd, + dot: values.dot, + dotRelative: values['dot-relative'], + follow: values.follow, + ignore: values.ignore, + mark: values.mark, + matchBase: values['match-base'], + maxDepth: values['max-depth'], + nobrace: values.nobrace, + nocase: values.nocase, + nodir: values.nodir, + noext: values.noext, + noglobstar: values.noglobstar, + platform: values.platform, + realpath: values.realpath, + root: values.root, + stat: values.stat, + debug: values.debug, + posix: values.posix, + }); + const cmd = values.cmd; + if (!cmd) { + matches.forEach(m => console.log(m)); + stream.on('data', f => console.log(f)); + } + else { + stream.on('data', f => matches.push(f)); + stream.on('end', () => foregroundChild(cmd, matches, { shell: true })); + } +} +catch (e) { + console.error(j.usage()); + console.error(e instanceof Error ? e.message : String(e)); + process.exit(1); +} +//# sourceMappingURL=bin.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a08cfb7e443dd48526955733da8b580de0a30bc4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/bin.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;AAEvE,MAAM,CAAC,GAAG,IAAI,CAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,OAAO;;;;GAIhB,CACA;KACA,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;0CACuB;KACrC;CACF,CAAC;KACD,GAAG,CAAC;IACH,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;iCACc;KAC5B;CACF,CAAC;KACD,IAAI,CAAC;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AC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;AACH,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { loadPackageJson } from 'package-json-from-dist'\nimport { join } from 'path'\nimport { globStream } from './index.js'\n\nconst { version } = loadPackageJson(import.meta.url, '../package.json')\n\nconst j = jack({\n usage: 'glob [options] [ [ ...]]',\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `,\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .opt({\n default: {\n short: 'p',\n hint: 'pattern',\n description: `If no positional arguments are provided, glob will use\n this pattern`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validOptions: [\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ],\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n version: {\n short: 'V',\n description: `Output the version (${version})`,\n },\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.version) {\n console.log(version)\n process.exit(0)\n }\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0 && !values.default)\n throw 'No patterns provided'\n if (positionals.length === 0 && values.default)\n positionals.push(values.default)\n const patterns =\n values.all ? positionals : positionals.filter(p => !existsSync(p))\n const matches =\n values.all ?\n []\n : positionals.filter(p => existsSync(p)).map(p => join(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..314ad1f5ccd3ccdadff2f3cc5bba5136db5a0d03 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts @@ -0,0 +1,388 @@ +import { Minimatch } from 'minimatch'; +import { Minipass } from 'minipass'; +import { FSOption, Path, PathScurry } from 'path-scurry'; +import { IgnoreLike } from './ignore.js'; +import { Pattern } from './pattern.js'; +export type MatchSet = Minimatch['set']; +export type GlobParts = Exclude; +/** + * A `GlobOptions` object may be provided to any of the exported methods, and + * must be provided to the `Glob` constructor. + * + * All options are optional, boolean, and false by default, unless otherwise + * noted. + * + * All resolved options are added to the Glob object as properties. + * + * If you are running many `glob` operations, you can pass a Glob object as the + * `options` argument to a subsequent operation to share the previously loaded + * cache. + */ +export interface GlobOptions { + /** + * Set to `true` to always receive absolute paths for + * matched files. Set to `false` to always return relative paths. + * + * When this option is not set, absolute paths are returned for patterns + * that are absolute, and otherwise paths are returned that are relative + * to the `cwd` setting. + * + * This does _not_ make an extra system call to get + * the realpath, it only does string path resolution. + * + * Conflicts with {@link withFileTypes} + */ + absolute?: boolean; + /** + * Set to false to enable {@link windowsPathsNoEscape} + * + * @deprecated + */ + allowWindowsEscape?: boolean; + /** + * The current working directory in which to search. Defaults to + * `process.cwd()`. + * + * May be eiher a string path or a `file://` URL object or string. + */ + cwd?: string | URL; + /** + * Include `.dot` files in normal matches and `globstar` + * matches. Note that an explicit dot in a portion of the pattern + * will always match dot files. + */ + dot?: boolean; + /** + * Prepend all relative path strings with `./` (or `.\` on Windows). + * + * Without this option, returned relative paths are "bare", so instead of + * returning `'./foo/bar'`, they are returned as `'foo/bar'`. + * + * Relative patterns starting with `'../'` are not prepended with `./`, even + * if this option is set. + */ + dotRelative?: boolean; + /** + * Follow symlinked directories when expanding `**` + * patterns. This can result in a lot of duplicate references in + * the presence of cyclic links, and make performance quite bad. + * + * By default, a `**` in a pattern will follow 1 symbolic link if + * it is not the first item in the pattern, or none if it is the + * first item in the pattern, following the same behavior as Bash. + */ + follow?: boolean; + /** + * string or string[], or an object with `ignored` and `childrenIgnored` + * methods. + * + * If a string or string[] is provided, then this is treated as a glob + * pattern or array of glob patterns to exclude from matches. To ignore all + * children within a directory, as well as the entry itself, append `'/**'` + * to the ignore pattern. + * + * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of + * any other settings. + * + * If an object is provided that has `ignored(path)` and/or + * `childrenIgnored(path)` methods, then these methods will be called to + * determine whether any Path is a match or if its children should be + * traversed, respectively. + */ + ignore?: string | string[] | IgnoreLike; + /** + * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no + * effect if {@link nobrace} is set. + * + * Only has effect on the {@link hasMagic} function. + */ + magicalBraces?: boolean; + /** + * Add a `/` character to directory matches. Note that this requires + * additional stat calls in some cases. + */ + mark?: boolean; + /** + * Perform a basename-only match if the pattern does not contain any slash + * characters. That is, `*.js` would be treated as equivalent to + * `**\/*.js`, matching all js files in all directories. + */ + matchBase?: boolean; + /** + * Limit the directory traversal to a given depth below the cwd. + * Note that this does NOT prevent traversal to sibling folders, + * root patterns, and so on. It only limits the maximum folder depth + * that the walk will descend, relative to the cwd. + */ + maxDepth?: number; + /** + * Do not expand `{a,b}` and `{1..3}` brace sets. + */ + nobrace?: boolean; + /** + * Perform a case-insensitive match. This defaults to `true` on macOS and + * Windows systems, and `false` on all others. + * + * **Note** `nocase` should only be explicitly set when it is + * known that the filesystem's case sensitivity differs from the + * platform default. If set `true` on case-sensitive file + * systems, or `false` on case-insensitive file systems, then the + * walk may return more or less results than expected. + */ + nocase?: boolean; + /** + * Do not match directories, only files. (Note: to match + * _only_ directories, put a `/` at the end of the pattern.) + */ + nodir?: boolean; + /** + * Do not match "extglob" patterns such as `+(a|b)`. + */ + noext?: boolean; + /** + * Do not match `**` against multiple filenames. (Ie, treat it as a normal + * `*` instead.) + * + * Conflicts with {@link matchBase} + */ + noglobstar?: boolean; + /** + * Defaults to value of `process.platform` if available, or `'linux'` if + * not. Setting `platform:'win32'` on non-Windows systems may cause strange + * behavior. + */ + platform?: NodeJS.Platform; + /** + * Set to true to call `fs.realpath` on all of the + * results. In the case of an entry that cannot be resolved, the + * entry is omitted. This incurs a slight performance penalty, of + * course, because of the added system calls. + */ + realpath?: boolean; + /** + * + * A string path resolved against the `cwd` option, which + * is used as the starting point for absolute patterns that start + * with `/`, (but not drive letters or UNC paths on Windows). + * + * Note that this _doesn't_ necessarily limit the walk to the + * `root` directory, and doesn't affect the cwd starting point for + * non-absolute patterns. A pattern containing `..` will still be + * able to traverse out of the root directory, if it is not an + * actual root directory on the filesystem, and any non-absolute + * patterns will be matched in the `cwd`. For example, the + * pattern `/../*` with `{root:'/some/path'}` will return all + * files in `/some`, not all files in `/some/path`. The pattern + * `*` with `{root:'/some/path'}` will return all the entries in + * the cwd, not the entries in `/some/path`. + * + * To start absolute and non-absolute patterns in the same + * path, you can use `{root:''}`. However, be aware that on + * Windows systems, a pattern like `x:/*` or `//host/share/*` will + * _always_ start in the `x:/` or `//host/share` directory, + * regardless of the `root` setting. + */ + root?: string; + /** + * A [PathScurry](http://npm.im/path-scurry) object used + * to traverse the file system. If the `nocase` option is set + * explicitly, then any provided `scurry` object must match this + * setting. + */ + scurry?: PathScurry; + /** + * Call `lstat()` on all entries, whether required or not to determine + * if it's a valid match. When used with {@link withFileTypes}, this means + * that matches will include data such as modified time, permissions, and + * so on. Note that this will incur a performance cost due to the added + * system calls. + */ + stat?: boolean; + /** + * An AbortSignal which will cancel the Glob walk when + * triggered. + */ + signal?: AbortSignal; + /** + * Use `\\` as a path separator _only_, and + * _never_ as an escape character. If set, all `\\` characters are + * replaced with `/` in the pattern. + * + * Note that this makes it **impossible** to match against paths + * containing literal glob pattern characters, but allows matching + * with patterns constructed using `path.join()` and + * `path.resolve()` on Windows platforms, mimicking the (buggy!) + * behavior of Glob v7 and before on Windows. Please use with + * caution, and be mindful of [the caveat below about Windows + * paths](#windows). (For legacy reasons, this is also set if + * `allowWindowsEscape` is set to the exact value `false`.) + */ + windowsPathsNoEscape?: boolean; + /** + * Return [PathScurry](http://npm.im/path-scurry) + * `Path` objects instead of strings. These are similar to a + * NodeJS `Dirent` object, but with additional methods and + * properties. + * + * Conflicts with {@link absolute} + */ + withFileTypes?: boolean; + /** + * An fs implementation to override some or all of the defaults. See + * http://npm.im/path-scurry for details about what can be overridden. + */ + fs?: FSOption; + /** + * Just passed along to Minimatch. Note that this makes all pattern + * matching operations slower and *extremely* noisy. + */ + debug?: boolean; + /** + * Return `/` delimited paths, even on Windows. + * + * On posix systems, this has no effect. But, on Windows, it means that + * paths will be `/` delimited, and absolute paths will be their full + * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return + * `'//?/C:/foo/bar'` + */ + posix?: boolean; + /** + * Do not match any children of any matches. For example, the pattern + * `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode. + * + * This is especially useful for cases like "find all `node_modules` + * folders, but not the ones in `node_modules`". + * + * In order to support this, the `Ignore` implementation must support an + * `add(pattern: string)` method. If using the default `Ignore` class, then + * this is fine, but if this is set to `false`, and a custom `Ignore` is + * provided that does not have an `add()` method, then it will throw an + * error. + * + * **Caveat** It *only* ignores matches that would be a descendant of a + * previous match, and only if that descendant is matched *after* the + * ancestor is encountered. Since the file system walk happens in + * indeterminate order, it's possible that a match will already be added + * before its ancestor, if multiple or braced patterns are used. + * + * For example: + * + * ```ts + * const results = await glob([ + * // likely to match first, since it's just a stat + * 'a/b/c/d/e/f', + * + * // this pattern is more complicated! It must to various readdir() + * // calls and test the results against a regular expression, and that + * // is certainly going to take a little bit longer. + * // + * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too + * // late to ignore a/b/c/d/e/f, because it's already been emitted. + * 'a/[bdf]/?/[a-z]/*', + * ], { includeChildMatches: false }) + * ``` + * + * It's best to only set this to `false` if you can be reasonably sure that + * no components of the pattern will potentially match one another's file + * system descendants, or if the occasional included child entry will not + * cause problems. + * + * @default true + */ + includeChildMatches?: boolean; +} +export type GlobOptionsWithFileTypesTrue = GlobOptions & { + withFileTypes: true; + absolute?: undefined; + mark?: undefined; + posix?: undefined; +}; +export type GlobOptionsWithFileTypesFalse = GlobOptions & { + withFileTypes?: false; +}; +export type GlobOptionsWithFileTypesUnset = GlobOptions & { + withFileTypes?: undefined; +}; +export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; +export type Results = Result[]; +export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; +/** + * An object that can perform glob pattern traversals. + */ +export declare class Glob implements GlobOptions { + absolute?: boolean; + cwd: string; + root?: string; + dot: boolean; + dotRelative: boolean; + follow: boolean; + ignore?: string | string[] | IgnoreLike; + magicalBraces: boolean; + mark?: boolean; + matchBase: boolean; + maxDepth: number; + nobrace: boolean; + nocase: boolean; + nodir: boolean; + noext: boolean; + noglobstar: boolean; + pattern: string[]; + platform: NodeJS.Platform; + realpath: boolean; + scurry: PathScurry; + stat: boolean; + signal?: AbortSignal; + windowsPathsNoEscape: boolean; + withFileTypes: FileTypes; + includeChildMatches: boolean; + /** + * The options provided to the constructor. + */ + opts: Opts; + /** + * An array of parsed immutable {@link Pattern} objects. + */ + patterns: Pattern[]; + /** + * All options are stored as properties on the `Glob` object. + * + * See {@link GlobOptions} for full options descriptions. + * + * Note that a previous `Glob` object can be passed as the + * `GlobOptions` to another `Glob` instantiation to re-use settings + * and caches with a new pattern. + * + * Traversal functions can be called multiple times to run the walk + * again. + */ + constructor(pattern: string | string[], opts: Opts); + /** + * Returns a Promise that resolves to the results array. + */ + walk(): Promise>; + /** + * synchronous {@link Glob.walk} + */ + walkSync(): Results; + /** + * Stream results asynchronously. + */ + stream(): Minipass, Result>; + /** + * Stream results synchronously. + */ + streamSync(): Minipass, Result>; + /** + * Default sync iteration function. Returns a Generator that + * iterates over the results. + */ + iterateSync(): Generator, void, void>; + [Symbol.iterator](): Generator, void, void>; + /** + * Default async iteration function. Returns an AsyncGenerator that + * iterates over the results. + */ + iterate(): AsyncGenerator, void, void>; + [Symbol.asyncIterator](): AsyncGenerator, void, void>; +} +//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c32dc74c96774177b949cc137befa0edb6489e3f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAalE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;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I,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAclD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js new file mode 100644 index 0000000000000000000000000000000000000000..c9ff3b0036d9455bf4106c247e40cb207b84fba4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js @@ -0,0 +1,243 @@ +import { Minimatch } from 'minimatch'; +import { fileURLToPath } from 'node:url'; +import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry'; +import { Pattern } from './pattern.js'; +import { GlobStream, GlobWalker } from './walker.js'; +// if no process global, just call it linux. +// so we default to case-sensitive, / separators +const defaultPlatform = (typeof process === 'object' && + process && + typeof process.platform === 'string') ? + process.platform + : 'linux'; +/** + * An object that can perform glob pattern traversals. + */ +export class Glob { + absolute; + cwd; + root; + dot; + dotRelative; + follow; + ignore; + magicalBraces; + mark; + matchBase; + maxDepth; + nobrace; + nocase; + nodir; + noext; + noglobstar; + pattern; + platform; + realpath; + scurry; + stat; + signal; + windowsPathsNoEscape; + withFileTypes; + includeChildMatches; + /** + * The options provided to the constructor. + */ + opts; + /** + * An array of parsed immutable {@link Pattern} objects. + */ + patterns; + /** + * All options are stored as properties on the `Glob` object. + * + * See {@link GlobOptions} for full options descriptions. + * + * Note that a previous `Glob` object can be passed as the + * `GlobOptions` to another `Glob` instantiation to re-use settings + * and caches with a new pattern. + * + * Traversal functions can be called multiple times to run the walk + * again. + */ + constructor(pattern, opts) { + /* c8 ignore start */ + if (!opts) + throw new TypeError('glob options required'); + /* c8 ignore stop */ + this.withFileTypes = !!opts.withFileTypes; + this.signal = opts.signal; + this.follow = !!opts.follow; + this.dot = !!opts.dot; + this.dotRelative = !!opts.dotRelative; + this.nodir = !!opts.nodir; + this.mark = !!opts.mark; + if (!opts.cwd) { + this.cwd = ''; + } + else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { + opts.cwd = fileURLToPath(opts.cwd); + } + this.cwd = opts.cwd || ''; + this.root = opts.root; + this.magicalBraces = !!opts.magicalBraces; + this.nobrace = !!opts.nobrace; + this.noext = !!opts.noext; + this.realpath = !!opts.realpath; + this.absolute = opts.absolute; + this.includeChildMatches = opts.includeChildMatches !== false; + this.noglobstar = !!opts.noglobstar; + this.matchBase = !!opts.matchBase; + this.maxDepth = + typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; + this.stat = !!opts.stat; + this.ignore = opts.ignore; + if (this.withFileTypes && this.absolute !== undefined) { + throw new Error('cannot set absolute and withFileTypes:true'); + } + if (typeof pattern === 'string') { + pattern = [pattern]; + } + this.windowsPathsNoEscape = + !!opts.windowsPathsNoEscape || + opts.allowWindowsEscape === + false; + if (this.windowsPathsNoEscape) { + pattern = pattern.map(p => p.replace(/\\/g, '/')); + } + if (this.matchBase) { + if (opts.noglobstar) { + throw new TypeError('base matching requires globstar'); + } + pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); + } + this.pattern = pattern; + this.platform = opts.platform || defaultPlatform; + this.opts = { ...opts, platform: this.platform }; + if (opts.scurry) { + this.scurry = opts.scurry; + if (opts.nocase !== undefined && + opts.nocase !== opts.scurry.nocase) { + throw new Error('nocase option contradicts provided scurry option'); + } + } + else { + const Scurry = opts.platform === 'win32' ? PathScurryWin32 + : opts.platform === 'darwin' ? PathScurryDarwin + : opts.platform ? PathScurryPosix + : PathScurry; + this.scurry = new Scurry(this.cwd, { + nocase: opts.nocase, + fs: opts.fs, + }); + } + this.nocase = this.scurry.nocase; + // If you do nocase:true on a case-sensitive file system, then + // we need to use regexps instead of strings for non-magic + // path portions, because statting `aBc` won't return results + // for the file `AbC` for example. + const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; + const mmo = { + // default nocase based on platform + ...opts, + dot: this.dot, + matchBase: this.matchBase, + nobrace: this.nobrace, + nocase: this.nocase, + nocaseMagicOnly, + nocomment: true, + noext: this.noext, + nonegate: true, + optimizationLevel: 2, + platform: this.platform, + windowsPathsNoEscape: this.windowsPathsNoEscape, + debug: !!this.opts.debug, + }; + const mms = this.pattern.map(p => new Minimatch(p, mmo)); + const [matchSet, globParts] = mms.reduce((set, m) => { + set[0].push(...m.set); + set[1].push(...m.globParts); + return set; + }, [[], []]); + this.patterns = matchSet.map((set, i) => { + const g = globParts[i]; + /* c8 ignore start */ + if (!g) + throw new Error('invalid pattern object'); + /* c8 ignore stop */ + return new Pattern(set, g, 0, this.platform); + }); + } + async walk() { + // Walkers always return array of Path objects, so we just have to + // coerce them into the right shape. It will have already called + // realpath() if the option was set to do so, so we know that's cached. + // start out knowing the cwd, at least + return [ + ...(await new GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walk()), + ]; + } + walkSync() { + return [ + ...new GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walkSync(), + ]; + } + stream() { + return new GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).stream(); + } + streamSync() { + return new GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: this.maxDepth !== Infinity ? + this.maxDepth + this.scurry.cwd.depth() + : Infinity, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).streamSync(); + } + /** + * Default sync iteration function. Returns a Generator that + * iterates over the results. + */ + iterateSync() { + return this.streamSync()[Symbol.iterator](); + } + [Symbol.iterator]() { + return this.iterateSync(); + } + /** + * Default async iteration function. Returns an AsyncGenerator that + * iterates over the results. + */ + iterate() { + return this.stream()[Symbol.asyncIterator](); + } + [Symbol.asyncIterator]() { + return this.iterate(); + } +} +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a431736271e441302a2a41da0c5599f08f99750e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/glob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,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C,CAAC,MAAM,EAAE,CAAA;IACb,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;SAC9C,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignored` and `childrenIgnored`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n\n /**\n * Do not match any children of any matches. For example, the pattern\n * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n *\n * This is especially useful for cases like \"find all `node_modules`\n * folders, but not the ones in `node_modules`\".\n *\n * In order to support this, the `Ignore` implementation must support an\n * `add(pattern: string)` method. If using the default `Ignore` class, then\n * this is fine, but if this is set to `false`, and a custom `Ignore` is\n * provided that does not have an `add()` method, then it will throw an\n * error.\n *\n * **Caveat** It *only* ignores matches that would be a descendant of a\n * previous match, and only if that descendant is matched *after* the\n * ancestor is encountered. Since the file system walk happens in\n * indeterminate order, it's possible that a match will already be added\n * before its ancestor, if multiple or braced patterns are used.\n *\n * For example:\n *\n * ```ts\n * const results = await glob([\n * // likely to match first, since it's just a stat\n * 'a/b/c/d/e/f',\n *\n * // this pattern is more complicated! It must to various readdir()\n * // calls and test the results against a regular expression, and that\n * // is certainly going to take a little bit longer.\n * //\n * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n * // late to ignore a/b/c/d/e/f, because it's already been emitted.\n * 'a/[bdf]/?/[a-z]/*',\n * ], { includeChildMatches: false })\n * ```\n *\n * It's best to only set this to `false` if you can be reasonably sure that\n * no components of the pattern will potentially match one another's file\n * system descendants, or if the occasional included child entry will not\n * cause problems.\n *\n * @default true\n */\n includeChildMatches?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n Opts extends GlobOptionsWithFileTypesTrue ? Path\n : Opts extends GlobOptionsWithFileTypesFalse ? string\n : Opts extends GlobOptionsWithFileTypesUnset ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes =\n Opts extends GlobOptionsWithFileTypesTrue ? true\n : Opts extends GlobOptionsWithFileTypesFalse ? false\n : Opts extends GlobOptionsWithFileTypesUnset ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n includeChildMatches: boolean\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n this.includeChildMatches = opts.includeChildMatches !== false\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32' ? PathScurryWin32\n : opts.platform === 'darwin' ? PathScurryDarwin\n : opts.platform ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []],\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8aec3bd9725175d9c72be14476fea2a117ca8b09 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts @@ -0,0 +1,14 @@ +import { GlobOptions } from './glob.js'; +/** + * Return true if the patterns provided contain any magic glob characters, + * given the options provided. + * + * Brace expansion is not considered "magic" unless the `magicalBraces` option + * is set, as brace expansion just turns one string into an array of strings. + * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and + * `'xby'` both do not contain any magic glob characters, and it's treated the + * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` + * is in the options, brace expansion _is_ treated as a pattern having magic. + */ +export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; +//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b24dd4ec47e0bbc37be06a58f4622cc183b710af --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js new file mode 100644 index 0000000000000000000000000000000000000000..ba2321ab868d025d56e2ce360c0c02e3e622e6b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js @@ -0,0 +1,23 @@ +import { Minimatch } from 'minimatch'; +/** + * Return true if the patterns provided contain any magic glob characters, + * given the options provided. + * + * Brace expansion is not considered "magic" unless the `magicalBraces` option + * is set, as brace expansion just turns one string into an array of strings. + * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and + * `'xby'` both do not contain any magic glob characters, and it's treated the + * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` + * is in the options, brace expansion _is_ treated as a pattern having magic. + */ +export const hasMagic = (pattern, options = {}) => { + if (!Array.isArray(pattern)) { + pattern = [pattern]; + } + for (const p of pattern) { + if (new Minimatch(p, options).hasMagic()) + return true; + } + return false; +}; +//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a20f5aa2e0fdb50071ab84db31b1993d2f220253 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/has-magic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1893b16df877c9b50c071ee7b066715f6e58c43e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts @@ -0,0 +1,24 @@ +import { Minimatch, MinimatchOptions } from 'minimatch'; +import { Path } from 'path-scurry'; +import { GlobWalkerOpts } from './walker.js'; +export interface IgnoreLike { + ignored?: (p: Path) => boolean; + childrenIgnored?: (p: Path) => boolean; + add?: (ignore: string) => void; +} +/** + * Class used to process ignored patterns + */ +export declare class Ignore implements IgnoreLike { + relative: Minimatch[]; + relativeChildren: Minimatch[]; + absolute: Minimatch[]; + absoluteChildren: Minimatch[]; + platform: NodeJS.Platform; + mmopts: MinimatchOptions; + constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); + add(ign: string): void; + ignored(p: Path): boolean; + childrenIgnored(p: Path): boolean; +} +//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..57d6ab6153d770397a5acb7881ccf52a048dee89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IACtC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAWD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,MAAM,EAAE,gBAAgB,CAAA;gBAGtB,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAqBnB,GAAG,CAAC,GAAG,EAAE,MAAM;IAyCf,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js new file mode 100644 index 0000000000000000000000000000000000000000..539c4a4fdebc4b036e5ca02060eae76572e5622d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js @@ -0,0 +1,115 @@ +// give it a pattern, and it'll be able to tell you if +// a given path should be ignored. +// Ignoring a path ignores its children if the pattern ends in /** +// Ignores are always parsed in dot:true mode +import { Minimatch } from 'minimatch'; +import { Pattern } from './pattern.js'; +const defaultPlatform = (typeof process === 'object' && + process && + typeof process.platform === 'string') ? + process.platform + : 'linux'; +/** + * Class used to process ignored patterns + */ +export class Ignore { + relative; + relativeChildren; + absolute; + absoluteChildren; + platform; + mmopts; + constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { + this.relative = []; + this.absolute = []; + this.relativeChildren = []; + this.absoluteChildren = []; + this.platform = platform; + this.mmopts = { + dot: true, + nobrace, + nocase, + noext, + noglobstar, + optimizationLevel: 2, + platform, + nocomment: true, + nonegate: true, + }; + for (const ign of ignored) + this.add(ign); + } + add(ign) { + // this is a little weird, but it gives us a clean set of optimized + // minimatch matchers, without getting tripped up if one of them + // ends in /** inside a brace section, and it's only inefficient at + // the start of the walk, not along it. + // It'd be nice if the Pattern class just had a .test() method, but + // handling globstars is a bit of a pita, and that code already lives + // in minimatch anyway. + // Another way would be if maybe Minimatch could take its set/globParts + // as an option, and then we could at least just use Pattern to test + // for absolute-ness. + // Yet another way, Minimatch could take an array of glob strings, and + // a cwd option, and do the right thing. + const mm = new Minimatch(ign, this.mmopts); + for (let i = 0; i < mm.set.length; i++) { + const parsed = mm.set[i]; + const globParts = mm.globParts[i]; + /* c8 ignore start */ + if (!parsed || !globParts) { + throw new Error('invalid pattern object'); + } + // strip off leading ./ portions + // https://github.com/isaacs/node-glob/issues/570 + while (parsed[0] === '.' && globParts[0] === '.') { + parsed.shift(); + globParts.shift(); + } + /* c8 ignore stop */ + const p = new Pattern(parsed, globParts, 0, this.platform); + const m = new Minimatch(p.globString(), this.mmopts); + const children = globParts[globParts.length - 1] === '**'; + const absolute = p.isAbsolute(); + if (absolute) + this.absolute.push(m); + else + this.relative.push(m); + if (children) { + if (absolute) + this.absoluteChildren.push(m); + else + this.relativeChildren.push(m); + } + } + } + ignored(p) { + const fullpath = p.fullpath(); + const fullpaths = `${fullpath}/`; + const relative = p.relative() || '.'; + const relatives = `${relative}/`; + for (const m of this.relative) { + if (m.match(relative) || m.match(relatives)) + return true; + } + for (const m of this.absolute) { + if (m.match(fullpath) || m.match(fullpaths)) + return true; + } + return false; + } + childrenIgnored(p) { + const fullpath = p.fullpath() + '/'; + const relative = (p.relative() || '.') + '/'; + for (const m of this.relativeChildren) { + if (m.match(relative)) + return true; + } + for (const m of this.absoluteChildren) { + if (m.match(fullpath)) + return true; + } + return false; + } +} +//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2cddba2ecfe9f605f05b45ad1c23663de46945b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/ignore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OA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it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(ign: string) {\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n const mm = new Minimatch(ign, this.mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n // strip off leading ./ portions\n // https://github.com/isaacs/node-glob/issues/570\n while (parsed[0] === '.' && globParts[0] === '.') {\n parsed.shift()\n globParts.shift()\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, this.platform)\n const m = new Minimatch(p.globString(), this.mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9c326ddc895b6184475510d700a583732535a635 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts @@ -0,0 +1,97 @@ +import { Minipass } from 'minipass'; +import { Path } from 'path-scurry'; +import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; +import { Glob } from './glob.js'; +export { escape, unescape } from 'minimatch'; +export type { FSOption, Path, WalkOptions, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, } from 'path-scurry'; +export { Glob } from './glob.js'; +export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; +export { hasMagic } from './has-magic.js'; +export { Ignore } from './ignore.js'; +export type { IgnoreLike } from './ignore.js'; +export type { MatchStream } from './walker.js'; +/** + * Syncronous form of {@link globStream}. Will read all the matches as fast as + * you consume them, even all in a single tick if you consume them immediately, + * but will still respond to backpressure if they're not consumed immediately. + */ +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; +export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; +/** + * Return a stream that emits all the strings or `Path` objects and + * then emits `end` when completed. + */ +export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; +export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; +export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; +export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; +/** + * Synchronous form of {@link glob} + */ +export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; +export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; +export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; +export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; +/** + * Perform an asynchronous glob search for the pattern(s) specified. Returns + * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the + * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for + * full option descriptions. + */ +declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; +declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; +declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; +declare function glob_(pattern: string | string[], options: GlobOptions): Promise; +/** + * Return a sync iterator for walking glob pattern matches. + */ +export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; +export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; +/** + * Return an async iterator for walking glob pattern matches. + */ +export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; +export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; +export declare const streamSync: typeof globStreamSync; +export declare const stream: typeof globStream & { + sync: typeof globStreamSync; +}; +export declare const iterateSync: typeof globIterateSync; +export declare const iterate: typeof globIterate & { + sync: typeof globIterateSync; +}; +export declare const sync: typeof globSync & { + stream: typeof globStreamSync; + iterate: typeof globIterateSync; +}; +export declare const glob: typeof glob_ & { + glob: typeof glob_; + globSync: typeof globSync; + sync: typeof globSync & { + stream: typeof globStreamSync; + iterate: typeof globIterateSync; + }; + globStream: typeof globStream; + stream: typeof globStream & { + sync: typeof globStreamSync; + }; + globStreamSync: typeof globStreamSync; + streamSync: typeof globStreamSync; + globIterate: typeof globIterate; + iterate: typeof globIterate & { + sync: typeof globIterateSync; + }; + globIterateSync: typeof globIterateSync; + iterateSync: typeof globIterateSync; + Glob: typeof Glob; + hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; + escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; + unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5fb32252b63747526a971d82bf6ab2ee61b53631 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EACV,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA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AO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e15c1f9c4cb03257181652847417840688521cb2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js @@ -0,0 +1,55 @@ +import { escape, unescape } from 'minimatch'; +import { Glob } from './glob.js'; +import { hasMagic } from './has-magic.js'; +export { escape, unescape } from 'minimatch'; +export { Glob } from './glob.js'; +export { hasMagic } from './has-magic.js'; +export { Ignore } from './ignore.js'; +export function globStreamSync(pattern, options = {}) { + return new Glob(pattern, options).streamSync(); +} +export function globStream(pattern, options = {}) { + return new Glob(pattern, options).stream(); +} +export function globSync(pattern, options = {}) { + return new Glob(pattern, options).walkSync(); +} +async function glob_(pattern, options = {}) { + return new Glob(pattern, options).walk(); +} +export function globIterateSync(pattern, options = {}) { + return new Glob(pattern, options).iterateSync(); +} +export function globIterate(pattern, options = {}) { + return new Glob(pattern, options).iterate(); +} +// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc +export const streamSync = globStreamSync; +export const stream = Object.assign(globStream, { sync: globStreamSync }); +export const iterateSync = globIterateSync; +export const iterate = Object.assign(globIterate, { + sync: globIterateSync, +}); +export const sync = Object.assign(globSync, { + stream: globStreamSync, + iterate: globIterateSync, +}); +export const glob = Object.assign(glob_, { + glob: glob_, + globSync, + sync, + globStream, + stream, + globStreamSync, + streamSync, + globIterate, + iterate, + globIterateSync, + iterateSync, + Glob, + hasMagic, + escape, + unescape, +}); +glob.glob = glob; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a4f93dd0c1d87d292b2ce821897926fafeb582d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAQ5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAOhC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAyBpC,MAAM,UAAU,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,MAAM,UAAU,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AAqBD,MAAM,UAAU,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1B,UAAuB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ipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n FSOption,\n Path,\n WalkOptions,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions,\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions,\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9636df3b54df2912790cdb6d4551c3ebe6e4d42e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts @@ -0,0 +1,76 @@ +import { GLOBSTAR } from 'minimatch'; +export type MMPattern = string | RegExp | typeof GLOBSTAR; +export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; +export type UNCPatternList = [ + p0: '', + p1: '', + p2: string, + p3: string, + ...rest: MMPattern[] +]; +export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; +export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; +export type GlobList = [p: string, ...rest: string[]]; +/** + * An immutable-ish view on an array of glob parts and their parsed + * results + */ +export declare class Pattern { + #private; + readonly length: number; + constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); + /** + * The first entry in the parsed list of patterns + */ + pattern(): MMPattern; + /** + * true of if pattern() returns a string + */ + isString(): boolean; + /** + * true of if pattern() returns GLOBSTAR + */ + isGlobstar(): boolean; + /** + * true if pattern() returns a regexp + */ + isRegExp(): boolean; + /** + * The /-joined set of glob parts that make up this pattern + */ + globString(): string; + /** + * true if there are more pattern parts after this one + */ + hasMore(): boolean; + /** + * The rest of the pattern after this part, or null if this is the end + */ + rest(): Pattern | null; + /** + * true if the pattern represents a //unc/path/ on windows + */ + isUNC(): boolean; + /** + * True if the pattern starts with a drive letter on Windows + */ + isDrive(): boolean; + /** + * True if the pattern is rooted on an absolute path + */ + isAbsolute(): boolean; + /** + * consume the root of the pattern, and return it + */ + root(): string; + /** + * Check to see if the current globstar pattern is allowed to follow + * a symbolic link. + */ + checkFollowGlobstar(): boolean; + /** + * Mark that the current globstar pattern is following a symbolic link + */ + markFollowGlobstar(): boolean; +} +//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..cdf322346317d8a12efa4c8fa613b693d2bf8bbe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js new file mode 100644 index 0000000000000000000000000000000000000000..b41defa10c6a3acd347a2b8464ef28af970dd741 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js @@ -0,0 +1,215 @@ +// this is just a very light wrapper around 2 arrays with an offset index +import { GLOBSTAR } from 'minimatch'; +const isPatternList = (pl) => pl.length >= 1; +const isGlobList = (gl) => gl.length >= 1; +/** + * An immutable-ish view on an array of glob parts and their parsed + * results + */ +export class Pattern { + #patternList; + #globList; + #index; + length; + #platform; + #rest; + #globString; + #isDrive; + #isUNC; + #isAbsolute; + #followGlobstar = true; + constructor(patternList, globList, index, platform) { + if (!isPatternList(patternList)) { + throw new TypeError('empty pattern list'); + } + if (!isGlobList(globList)) { + throw new TypeError('empty glob list'); + } + if (globList.length !== patternList.length) { + throw new TypeError('mismatched pattern list and glob list lengths'); + } + this.length = patternList.length; + if (index < 0 || index >= this.length) { + throw new TypeError('index out of range'); + } + this.#patternList = patternList; + this.#globList = globList; + this.#index = index; + this.#platform = platform; + // normalize root entries of absolute patterns on initial creation. + if (this.#index === 0) { + // c: => ['c:/'] + // C:/ => ['C:/'] + // C:/x => ['C:/', 'x'] + // //host/share => ['//host/share/'] + // //host/share/ => ['//host/share/'] + // //host/share/x => ['//host/share/', 'x'] + // /etc => ['/', 'etc'] + // / => ['/'] + if (this.isUNC()) { + // '' / '' / 'host' / 'share' + const [p0, p1, p2, p3, ...prest] = this.#patternList; + const [g0, g1, g2, g3, ...grest] = this.#globList; + if (prest[0] === '') { + // ends in / + prest.shift(); + grest.shift(); + } + const p = [p0, p1, p2, p3, ''].join('/'); + const g = [g0, g1, g2, g3, ''].join('/'); + this.#patternList = [p, ...prest]; + this.#globList = [g, ...grest]; + this.length = this.#patternList.length; + } + else if (this.isDrive() || this.isAbsolute()) { + const [p1, ...prest] = this.#patternList; + const [g1, ...grest] = this.#globList; + if (prest[0] === '') { + // ends in / + prest.shift(); + grest.shift(); + } + const p = p1 + '/'; + const g = g1 + '/'; + this.#patternList = [p, ...prest]; + this.#globList = [g, ...grest]; + this.length = this.#patternList.length; + } + } + } + /** + * The first entry in the parsed list of patterns + */ + pattern() { + return this.#patternList[this.#index]; + } + /** + * true of if pattern() returns a string + */ + isString() { + return typeof this.#patternList[this.#index] === 'string'; + } + /** + * true of if pattern() returns GLOBSTAR + */ + isGlobstar() { + return this.#patternList[this.#index] === GLOBSTAR; + } + /** + * true if pattern() returns a regexp + */ + isRegExp() { + return this.#patternList[this.#index] instanceof RegExp; + } + /** + * The /-joined set of glob parts that make up this pattern + */ + globString() { + return (this.#globString = + this.#globString || + (this.#index === 0 ? + this.isAbsolute() ? + this.#globList[0] + this.#globList.slice(1).join('/') + : this.#globList.join('/') + : this.#globList.slice(this.#index).join('/'))); + } + /** + * true if there are more pattern parts after this one + */ + hasMore() { + return this.length > this.#index + 1; + } + /** + * The rest of the pattern after this part, or null if this is the end + */ + rest() { + if (this.#rest !== undefined) + return this.#rest; + if (!this.hasMore()) + return (this.#rest = null); + this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); + this.#rest.#isAbsolute = this.#isAbsolute; + this.#rest.#isUNC = this.#isUNC; + this.#rest.#isDrive = this.#isDrive; + return this.#rest; + } + /** + * true if the pattern represents a //unc/path/ on windows + */ + isUNC() { + const pl = this.#patternList; + return this.#isUNC !== undefined ? + this.#isUNC + : (this.#isUNC = + this.#platform === 'win32' && + this.#index === 0 && + pl[0] === '' && + pl[1] === '' && + typeof pl[2] === 'string' && + !!pl[2] && + typeof pl[3] === 'string' && + !!pl[3]); + } + // pattern like C:/... + // split = ['C:', ...] + // XXX: would be nice to handle patterns like `c:*` to test the cwd + // in c: for *, but I don't know of a way to even figure out what that + // cwd is without actually chdir'ing into it? + /** + * True if the pattern starts with a drive letter on Windows + */ + isDrive() { + const pl = this.#patternList; + return this.#isDrive !== undefined ? + this.#isDrive + : (this.#isDrive = + this.#platform === 'win32' && + this.#index === 0 && + this.length > 1 && + typeof pl[0] === 'string' && + /^[a-z]:$/i.test(pl[0])); + } + // pattern = '/' or '/...' or '/x/...' + // split = ['', ''] or ['', ...] or ['', 'x', ...] + // Drive and UNC both considered absolute on windows + /** + * True if the pattern is rooted on an absolute path + */ + isAbsolute() { + const pl = this.#patternList; + return this.#isAbsolute !== undefined ? + this.#isAbsolute + : (this.#isAbsolute = + (pl[0] === '' && pl.length > 1) || + this.isDrive() || + this.isUNC()); + } + /** + * consume the root of the pattern, and return it + */ + root() { + const p = this.#patternList[0]; + return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ? + p + : ''; + } + /** + * Check to see if the current globstar pattern is allowed to follow + * a symbolic link. + */ + checkFollowGlobstar() { + return !(this.#index === 0 || + !this.isGlobstar() || + !this.#followGlobstar); + } + /** + * Mark that the current globstar pattern is following a symbolic link + */ + markFollowGlobstar() { + if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) + return false; + this.#followGlobstar = false; + return true; + } +} +//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js.map new file mode 100644 index 0000000000000000000000000000000000000000..566a306ad1bf400413ab69cf023c067ffc0bbe08 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,OAAO,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;QAC3C,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;QACxC,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE,CAAC;YAC3C,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;QAChC,IAAI,K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AED,sCAAsC;IACtC,kDAAkD;IAClD,oDAAoD;IACpD;;OAEG;IACH,UAAU;QACR,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC;YACnC,IAAI,CAAC,WAAW;YAClB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;gBACf,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;oBAC/B,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QAC9B,OAAO,CACH,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAChE,CAAC,CAAC;YACD,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform,\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0 ?\n this.isAbsolute() ?\n this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform,\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined ?\n this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined ?\n this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined ?\n this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return (\n typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ) ?\n p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ccedfbf2820f7d51167574666a80785ca1b91b07 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts @@ -0,0 +1,59 @@ +import { MMRegExp } from 'minimatch'; +import { Path } from 'path-scurry'; +import { Pattern } from './pattern.js'; +import { GlobWalkerOpts } from './walker.js'; +/** + * A cache of which patterns have been processed for a given Path + */ +export declare class HasWalkedCache { + store: Map>; + constructor(store?: Map>); + copy(): HasWalkedCache; + hasWalked(target: Path, pattern: Pattern): boolean | undefined; + storeWalked(target: Path, pattern: Pattern): void; +} +/** + * A record of which paths have been matched in a given walk step, + * and whether they only are considered a match if they are a directory, + * and whether their absolute or relative path should be returned. + */ +export declare class MatchRecord { + store: Map; + add(target: Path, absolute: boolean, ifDir: boolean): void; + entries(): [Path, boolean, boolean][]; +} +/** + * A collection of patterns that must be processed in a subsequent step + * for a given path. + */ +export declare class SubWalks { + store: Map; + add(target: Path, pattern: Pattern): void; + get(target: Path): Pattern[]; + entries(): [Path, Pattern[]][]; + keys(): Path[]; +} +/** + * The class that processes patterns for a given path. + * + * Handles child entry filtering, and determining whether a path's + * directory contents must be read. + */ +export declare class Processor { + hasWalkedCache: HasWalkedCache; + matches: MatchRecord; + subwalks: SubWalks; + patterns?: Pattern[]; + follow: boolean; + dot: boolean; + opts: GlobWalkerOpts; + constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); + processPatterns(target: Path, patterns: Pattern[]): this; + subwalkTargets(): Path[]; + child(): Processor; + filterEntries(parent: Path, entries: Path[]): Processor; + testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; + testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; + testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; +} +//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..aa266fee4a0544a0a8f7fddceb347d7d059643e0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IAQjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAmGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js new file mode 100644 index 0000000000000000000000000000000000000000..f874892ffed0c4affb2e0c2c17895e9ebe2a9afd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js @@ -0,0 +1,294 @@ +// synchronous utility for filtering entries and calculating subwalks +import { GLOBSTAR } from 'minimatch'; +/** + * A cache of which patterns have been processed for a given Path + */ +export class HasWalkedCache { + store; + constructor(store = new Map()) { + this.store = store; + } + copy() { + return new HasWalkedCache(new Map(this.store)); + } + hasWalked(target, pattern) { + return this.store.get(target.fullpath())?.has(pattern.globString()); + } + storeWalked(target, pattern) { + const fullpath = target.fullpath(); + const cached = this.store.get(fullpath); + if (cached) + cached.add(pattern.globString()); + else + this.store.set(fullpath, new Set([pattern.globString()])); + } +} +/** + * A record of which paths have been matched in a given walk step, + * and whether they only are considered a match if they are a directory, + * and whether their absolute or relative path should be returned. + */ +export class MatchRecord { + store = new Map(); + add(target, absolute, ifDir) { + const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); + const current = this.store.get(target); + this.store.set(target, current === undefined ? n : n & current); + } + // match, absolute, ifdir + entries() { + return [...this.store.entries()].map(([path, n]) => [ + path, + !!(n & 2), + !!(n & 1), + ]); + } +} +/** + * A collection of patterns that must be processed in a subsequent step + * for a given path. + */ +export class SubWalks { + store = new Map(); + add(target, pattern) { + if (!target.canReaddir()) { + return; + } + const subs = this.store.get(target); + if (subs) { + if (!subs.find(p => p.globString() === pattern.globString())) { + subs.push(pattern); + } + } + else + this.store.set(target, [pattern]); + } + get(target) { + const subs = this.store.get(target); + /* c8 ignore start */ + if (!subs) { + throw new Error('attempting to walk unknown path'); + } + /* c8 ignore stop */ + return subs; + } + entries() { + return this.keys().map(k => [k, this.store.get(k)]); + } + keys() { + return [...this.store.keys()].filter(t => t.canReaddir()); + } +} +/** + * The class that processes patterns for a given path. + * + * Handles child entry filtering, and determining whether a path's + * directory contents must be read. + */ +export class Processor { + hasWalkedCache; + matches = new MatchRecord(); + subwalks = new SubWalks(); + patterns; + follow; + dot; + opts; + constructor(opts, hasWalkedCache) { + this.opts = opts; + this.follow = !!opts.follow; + this.dot = !!opts.dot; + this.hasWalkedCache = + hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache(); + } + processPatterns(target, patterns) { + this.patterns = patterns; + const processingSet = patterns.map(p => [target, p]); + // map of paths to the magic-starting subwalks they need to walk + // first item in patterns is the filter + for (let [t, pattern] of processingSet) { + this.hasWalkedCache.storeWalked(t, pattern); + const root = pattern.root(); + const absolute = pattern.isAbsolute() && this.opts.absolute !== false; + // start absolute patterns at root + if (root) { + t = t.resolve(root === '/' && this.opts.root !== undefined ? + this.opts.root + : root); + const rest = pattern.rest(); + if (!rest) { + this.matches.add(t, true, false); + continue; + } + else { + pattern = rest; + } + } + if (t.isENOENT()) + continue; + let p; + let rest; + let changed = false; + while (typeof (p = pattern.pattern()) === 'string' && + (rest = pattern.rest())) { + const c = t.resolve(p); + t = c; + pattern = rest; + changed = true; + } + p = pattern.pattern(); + rest = pattern.rest(); + if (changed) { + if (this.hasWalkedCache.hasWalked(t, pattern)) + continue; + this.hasWalkedCache.storeWalked(t, pattern); + } + // now we have either a final string for a known entry, + // more strings for an unknown entry, + // or a pattern starting with magic, mounted on t. + if (typeof p === 'string') { + // must not be final entry, otherwise we would have + // concatenated it earlier. + const ifDir = p === '..' || p === '' || p === '.'; + this.matches.add(t.resolve(p), absolute, ifDir); + continue; + } + else if (p === GLOBSTAR) { + // if no rest, match and subwalk pattern + // if rest, process rest and subwalk pattern + // if it's a symlink, but we didn't get here by way of a + // globstar match (meaning it's the first time THIS globstar + // has traversed a symlink), then we follow it. Otherwise, stop. + if (!t.isSymbolicLink() || + this.follow || + pattern.checkFollowGlobstar()) { + this.subwalks.add(t, pattern); + } + const rp = rest?.pattern(); + const rrest = rest?.rest(); + if (!rest || ((rp === '' || rp === '.') && !rrest)) { + // only HAS to be a dir if it ends in **/ or **/. + // but ending in ** will match files as well. + this.matches.add(t, absolute, rp === '' || rp === '.'); + } + else { + if (rp === '..') { + // this would mean you're matching **/.. at the fs root, + // and no thanks, I'm not gonna test that specific case. + /* c8 ignore start */ + const tp = t.parent || t; + /* c8 ignore stop */ + if (!rrest) + this.matches.add(tp, absolute, true); + else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { + this.subwalks.add(tp, rrest); + } + } + } + } + else if (p instanceof RegExp) { + this.subwalks.add(t, pattern); + } + } + return this; + } + subwalkTargets() { + return this.subwalks.keys(); + } + child() { + return new Processor(this.opts, this.hasWalkedCache); + } + // return a new Processor containing the subwalks for each + // child entry, and a set of matches, and + // a hasWalkedCache that's a copy of this one + // then we're going to call + filterEntries(parent, entries) { + const patterns = this.subwalks.get(parent); + // put matches and entry walks into the results processor + const results = this.child(); + for (const e of entries) { + for (const pattern of patterns) { + const absolute = pattern.isAbsolute(); + const p = pattern.pattern(); + const rest = pattern.rest(); + if (p === GLOBSTAR) { + results.testGlobstar(e, pattern, rest, absolute); + } + else if (p instanceof RegExp) { + results.testRegExp(e, p, rest, absolute); + } + else { + results.testString(e, p, rest, absolute); + } + } + } + return results; + } + testGlobstar(e, pattern, rest, absolute) { + if (this.dot || !e.name.startsWith('.')) { + if (!pattern.hasMore()) { + this.matches.add(e, absolute, false); + } + if (e.canReaddir()) { + // if we're in follow mode or it's not a symlink, just keep + // testing the same pattern. If there's more after the globstar, + // then this symlink consumes the globstar. If not, then we can + // follow at most ONE symlink along the way, so we mark it, which + // also checks to ensure that it wasn't already marked. + if (this.follow || !e.isSymbolicLink()) { + this.subwalks.add(e, pattern); + } + else if (e.isSymbolicLink()) { + if (rest && pattern.checkFollowGlobstar()) { + this.subwalks.add(e, rest); + } + else if (pattern.markFollowGlobstar()) { + this.subwalks.add(e, pattern); + } + } + } + } + // if the NEXT thing matches this entry, then also add + // the rest. + if (rest) { + const rp = rest.pattern(); + if (typeof rp === 'string' && + // dots and empty were handled already + rp !== '..' && + rp !== '' && + rp !== '.') { + this.testString(e, rp, rest.rest(), absolute); + } + else if (rp === '..') { + /* c8 ignore start */ + const ep = e.parent || e; + /* c8 ignore stop */ + this.subwalks.add(ep, rest); + } + else if (rp instanceof RegExp) { + this.testRegExp(e, rp, rest.rest(), absolute); + } + } + } + testRegExp(e, p, rest, absolute) { + if (!p.test(e.name)) + return; + if (!rest) { + this.matches.add(e, absolute, false); + } + else { + this.subwalks.add(e, rest); + } + } + testString(e, p, rest, absolute) { + // should never happen? + if (!e.isNamed(p)) + return; + if (!rest) { + this.matches.add(e, absolute, false); + } + else { + this.subwalks.add(e, rest); + } + } +} +//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..05a832420b8b2fa97eef4e7ab05b6612b5ec17e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/processor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAA;AAK9C;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,SAAS,CAAC,MAAY,EAAE,OAAgB;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,WAAW,CAAC,MAAY,EAAE,OAAgB;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,C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C,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache =\n hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined ?\n this.opts.root\n : root,\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..499c8f4933857a8720e77b7b96d9842bbd3248ae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts @@ -0,0 +1,97 @@ +/** + * Single-use utility classes to provide functionality to the {@link Glob} + * methods. + * + * @module + */ +import { Minipass } from 'minipass'; +import { Path } from 'path-scurry'; +import { IgnoreLike } from './ignore.js'; +import { Pattern } from './pattern.js'; +import { Processor } from './processor.js'; +export interface GlobWalkerOpts { + absolute?: boolean; + allowWindowsEscape?: boolean; + cwd?: string | URL; + dot?: boolean; + dotRelative?: boolean; + follow?: boolean; + ignore?: string | string[] | IgnoreLike; + mark?: boolean; + matchBase?: boolean; + maxDepth?: number; + nobrace?: boolean; + nocase?: boolean; + nodir?: boolean; + noext?: boolean; + noglobstar?: boolean; + platform?: NodeJS.Platform; + posix?: boolean; + realpath?: boolean; + root?: string; + stat?: boolean; + signal?: AbortSignal; + windowsPathsNoEscape?: boolean; + withFileTypes?: boolean; + includeChildMatches?: boolean; +} +export type GWOFileTypesTrue = GlobWalkerOpts & { + withFileTypes: true; +}; +export type GWOFileTypesFalse = GlobWalkerOpts & { + withFileTypes: false; +}; +export type GWOFileTypesUnset = GlobWalkerOpts & { + withFileTypes?: undefined; +}; +export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; +export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; +export type MatchStream = Minipass, Result>; +/** + * basic walking utilities that all the glob walker types use + */ +export declare abstract class GlobUtil { + #private; + path: Path; + patterns: Pattern[]; + opts: O; + seen: Set; + paused: boolean; + aborted: boolean; + signal?: AbortSignal; + maxDepth: number; + includeChildMatches: boolean; + constructor(patterns: Pattern[], path: Path, opts: O); + pause(): void; + resume(): void; + onResume(fn: () => any): void; + matchCheck(e: Path, ifDir: boolean): Promise; + matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; + matchCheckSync(e: Path, ifDir: boolean): Path | undefined; + abstract matchEmit(p: Result): void; + abstract matchEmit(p: string | Path): void; + matchFinish(e: Path, absolute: boolean): void; + match(e: Path, absolute: boolean, ifDir: boolean): Promise; + matchSync(e: Path, absolute: boolean, ifDir: boolean): void; + walkCB(target: Path, patterns: Pattern[], cb: () => any): void; + walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; + walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; + walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; + walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; + walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; +} +export declare class GlobWalker extends GlobUtil { + matches: Set>; + constructor(patterns: Pattern[], path: Path, opts: O); + matchEmit(e: Result): void; + walk(): Promise>>; + walkSync(): Set>; +} +export declare class GlobStream extends GlobUtil { + results: Minipass, Result>; + constructor(patterns: Pattern[], path: Path, opts: O); + matchEmit(e: Result): void; + stream(): MatchStream; + streamSync(): MatchStream; +} +//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..769957bd59bb1ce67cdf28134be59ca86946c405 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA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ob/dist/esm/walker.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.js new file mode 100644 index 0000000000000000000000000000000000000000..3d68196c4f175f6b314b444e409f9b8a77164963 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.js @@ -0,0 +1,381 @@ +/** + * Single-use utility classes to provide functionality to the {@link Glob} + * methods. + * + * @module + */ +import { Minipass } from 'minipass'; +import { Ignore } from './ignore.js'; +import { Processor } from './processor.js'; +const makeIgnore = (ignore, opts) => typeof ignore === 'string' ? new Ignore([ignore], opts) + : Array.isArray(ignore) ? new Ignore(ignore, opts) + : ignore; +/** + * basic walking utilities that all the glob walker types use + */ +export class GlobUtil { + path; + patterns; + opts; + seen = new Set(); + paused = false; + aborted = false; + #onResume = []; + #ignore; + #sep; + signal; + maxDepth; + includeChildMatches; + constructor(patterns, path, opts) { + this.patterns = patterns; + this.path = path; + this.opts = opts; + this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; + this.includeChildMatches = opts.includeChildMatches !== false; + if (opts.ignore || !this.includeChildMatches) { + this.#ignore = makeIgnore(opts.ignore ?? [], opts); + if (!this.includeChildMatches && + typeof this.#ignore.add !== 'function') { + const m = 'cannot ignore child matches, ignore lacks add() method.'; + throw new Error(m); + } + } + // ignore, always set with maxDepth, but it's optional on the + // GlobOptions type + /* c8 ignore start */ + this.maxDepth = opts.maxDepth || Infinity; + /* c8 ignore stop */ + if (opts.signal) { + this.signal = opts.signal; + this.signal.addEventListener('abort', () => { + this.#onResume.length = 0; + }); + } + } + #ignored(path) { + return this.seen.has(path) || !!this.#ignore?.ignored?.(path); + } + #childrenIgnored(path) { + return !!this.#ignore?.childrenIgnored?.(path); + } + // backpressure mechanism + pause() { + this.paused = true; + } + resume() { + /* c8 ignore start */ + if (this.signal?.aborted) + return; + /* c8 ignore stop */ + this.paused = false; + let fn = undefined; + while (!this.paused && (fn = this.#onResume.shift())) { + fn(); + } + } + onResume(fn) { + if (this.signal?.aborted) + return; + /* c8 ignore start */ + if (!this.paused) { + fn(); + } + else { + /* c8 ignore stop */ + this.#onResume.push(fn); + } + } + // do the requisite realpath/stat checking, and return the path + // to add or undefined to filter it out. + async matchCheck(e, ifDir) { + if (ifDir && this.opts.nodir) + return undefined; + let rpc; + if (this.opts.realpath) { + rpc = e.realpathCached() || (await e.realpath()); + if (!rpc) + return undefined; + e = rpc; + } + const needStat = e.isUnknown() || this.opts.stat; + const s = needStat ? await e.lstat() : e; + if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { + const target = await s.realpath(); + /* c8 ignore start */ + if (target && (target.isUnknown() || this.opts.stat)) { + await target.lstat(); + } + /* c8 ignore stop */ + } + return this.matchCheckTest(s, ifDir); + } + matchCheckTest(e, ifDir) { + return (e && + (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && + (!ifDir || e.canReaddir()) && + (!this.opts.nodir || !e.isDirectory()) && + (!this.opts.nodir || + !this.opts.follow || + !e.isSymbolicLink() || + !e.realpathCached()?.isDirectory()) && + !this.#ignored(e)) ? + e + : undefined; + } + matchCheckSync(e, ifDir) { + if (ifDir && this.opts.nodir) + return undefined; + let rpc; + if (this.opts.realpath) { + rpc = e.realpathCached() || e.realpathSync(); + if (!rpc) + return undefined; + e = rpc; + } + const needStat = e.isUnknown() || this.opts.stat; + const s = needStat ? e.lstatSync() : e; + if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { + const target = s.realpathSync(); + if (target && (target?.isUnknown() || this.opts.stat)) { + target.lstatSync(); + } + } + return this.matchCheckTest(s, ifDir); + } + matchFinish(e, absolute) { + if (this.#ignored(e)) + return; + // we know we have an ignore if this is false, but TS doesn't + if (!this.includeChildMatches && this.#ignore?.add) { + const ign = `${e.relativePosix()}/**`; + this.#ignore.add(ign); + } + const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; + this.seen.add(e); + const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; + // ok, we have what we need! + if (this.opts.withFileTypes) { + this.matchEmit(e); + } + else if (abs) { + const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); + this.matchEmit(abs + mark); + } + else { + const rel = this.opts.posix ? e.relativePosix() : e.relative(); + const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? + '.' + this.#sep + : ''; + this.matchEmit(!rel ? '.' + mark : pre + rel + mark); + } + } + async match(e, absolute, ifDir) { + const p = await this.matchCheck(e, ifDir); + if (p) + this.matchFinish(p, absolute); + } + matchSync(e, absolute, ifDir) { + const p = this.matchCheckSync(e, ifDir); + if (p) + this.matchFinish(p, absolute); + } + walkCB(target, patterns, cb) { + /* c8 ignore start */ + if (this.signal?.aborted) + cb(); + /* c8 ignore stop */ + this.walkCB2(target, patterns, new Processor(this.opts), cb); + } + walkCB2(target, patterns, processor, cb) { + if (this.#childrenIgnored(target)) + return cb(); + if (this.signal?.aborted) + cb(); + if (this.paused) { + this.onResume(() => this.walkCB2(target, patterns, processor, cb)); + return; + } + processor.processPatterns(target, patterns); + // done processing. all of the above is sync, can be abstracted out. + // subwalks is a map of paths to the entry filters they need + // matches is a map of paths to [absolute, ifDir] tuples. + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + tasks++; + this.match(m, absolute, ifDir).then(() => next()); + } + for (const t of processor.subwalkTargets()) { + if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { + continue; + } + tasks++; + const childrenCached = t.readdirCached(); + if (t.calledReaddir()) + this.walkCB3(t, childrenCached, processor, next); + else { + t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); + } + } + next(); + } + walkCB3(target, entries, processor, cb) { + processor = processor.filterEntries(target, entries); + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + tasks++; + this.match(m, absolute, ifDir).then(() => next()); + } + for (const [target, patterns] of processor.subwalks.entries()) { + tasks++; + this.walkCB2(target, patterns, processor.child(), next); + } + next(); + } + walkCBSync(target, patterns, cb) { + /* c8 ignore start */ + if (this.signal?.aborted) + cb(); + /* c8 ignore stop */ + this.walkCB2Sync(target, patterns, new Processor(this.opts), cb); + } + walkCB2Sync(target, patterns, processor, cb) { + if (this.#childrenIgnored(target)) + return cb(); + if (this.signal?.aborted) + cb(); + if (this.paused) { + this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); + return; + } + processor.processPatterns(target, patterns); + // done processing. all of the above is sync, can be abstracted out. + // subwalks is a map of paths to the entry filters they need + // matches is a map of paths to [absolute, ifDir] tuples. + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + this.matchSync(m, absolute, ifDir); + } + for (const t of processor.subwalkTargets()) { + if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { + continue; + } + tasks++; + const children = t.readdirSync(); + this.walkCB3Sync(t, children, processor, next); + } + next(); + } + walkCB3Sync(target, entries, processor, cb) { + processor = processor.filterEntries(target, entries); + let tasks = 1; + const next = () => { + if (--tasks === 0) + cb(); + }; + for (const [m, absolute, ifDir] of processor.matches.entries()) { + if (this.#ignored(m)) + continue; + this.matchSync(m, absolute, ifDir); + } + for (const [target, patterns] of processor.subwalks.entries()) { + tasks++; + this.walkCB2Sync(target, patterns, processor.child(), next); + } + next(); + } +} +export class GlobWalker extends GlobUtil { + matches = new Set(); + constructor(patterns, path, opts) { + super(patterns, path, opts); + } + matchEmit(e) { + this.matches.add(e); + } + async walk() { + if (this.signal?.aborted) + throw this.signal.reason; + if (this.path.isUnknown()) { + await this.path.lstat(); + } + await new Promise((res, rej) => { + this.walkCB(this.path, this.patterns, () => { + if (this.signal?.aborted) { + rej(this.signal.reason); + } + else { + res(this.matches); + } + }); + }); + return this.matches; + } + walkSync() { + if (this.signal?.aborted) + throw this.signal.reason; + if (this.path.isUnknown()) { + this.path.lstatSync(); + } + // nothing for the callback to do, because this never pauses + this.walkCBSync(this.path, this.patterns, () => { + if (this.signal?.aborted) + throw this.signal.reason; + }); + return this.matches; + } +} +export class GlobStream extends GlobUtil { + results; + constructor(patterns, path, opts) { + super(patterns, path, opts); + this.results = new Minipass({ + signal: this.signal, + objectMode: true, + }); + this.results.on('drain', () => this.resume()); + this.results.on('resume', () => this.resume()); + } + matchEmit(e) { + this.results.write(e); + if (!this.results.flowing) + this.pause(); + } + stream() { + const target = this.path; + if (target.isUnknown()) { + target.lstat().then(() => { + this.walkCB(target, this.patterns, () => this.results.end()); + }); + } + else { + this.walkCB(target, this.patterns, () => this.results.end()); + } + return this.results; + } + streamSync() { + if (this.path.isUnknown()) { + this.path.lstatSync(); + } + this.walkCBSync(this.path, this.patterns, () => this.results.end()); + return this.results; + } +} +//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.js.map new file mode 100644 index 0000000000000000000000000000000000000000..daeeda6752713f72f18fae72f9d0113bb6f1b954 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/glob/dist/esm/walker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AA0D1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IA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I,CAAC,OAAO,CAAC,OAAO;YAAE,IAAI,CAAC,KAAK,EAAE,CAAA;IACzC,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;QACxB,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC;YACvB,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;YAC9D,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAC9D,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n includeChildMatches?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n O extends GWOFileTypesTrue ? Path\n : O extends GWOFileTypesFalse ? string\n : O extends GWOFileTypesUnset ? string\n : Path | string\n\nexport type Matches =\n O extends GWOFileTypesTrue ? Set\n : O extends GWOFileTypesFalse ? Set\n : O extends GWOFileTypesUnset ? Set\n : Set\n\nexport type MatchStream = Minipass<\n Result,\n Result\n>\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts,\n): IgnoreLike =>\n typeof ignore === 'string' ? new Ignore([ignore], opts)\n : Array.isArray(ignore) ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n includeChildMatches: boolean\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n this.includeChildMatches = opts.includeChildMatches !== false\n if (opts.ignore || !this.includeChildMatches) {\n this.#ignore = makeIgnore(opts.ignore ?? [], opts)\n if (\n !this.includeChildMatches &&\n typeof this.#ignore.add !== 'function'\n ) {\n const m = 'cannot ignore child matches, ignore lacks add() method.'\n throw new Error(m)\n }\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? await e.lstat() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = await s.realpath()\n /* c8 ignore start */\n if (target && (target.isUnknown() || this.opts.stat)) {\n await target.lstat()\n }\n /* c8 ignore stop */\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return (\n e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n (!this.opts.nodir ||\n !this.opts.follow ||\n !e.isSymbolicLink() ||\n !e.realpathCached()?.isDirectory()) &&\n !this.#ignored(e)\n ) ?\n e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? e.lstatSync() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = s.realpathSync()\n if (target && (target?.isUnknown() || this.opts.stat)) {\n target.lstatSync()\n }\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n // we know we have an ignore if this is false, but TS doesn't\n if (!this.includeChildMatches && this.#ignore?.add) {\n const ign = `${e.relativePosix()}/**`\n this.#ignore.add(ign)\n }\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?\n '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true,\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb),\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n matches = new Set>()\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n }\n\n matchEmit(e: Result): void {\n this.matches.add(e)\n }\n\n async walk(): Promise>> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Set> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n results: Minipass, Result>\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass, Result>({\n signal: this.signal,\n objectMode: true,\n })\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..823dbccb2879d7f1f3a43f141f5a1c53432cb92e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.d.ts @@ -0,0 +1,298 @@ +import { EventEmitter } from 'events'; +import { Gaxios, GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; +import { Credentials } from './credentials'; +import { OriginalAndCamel } from '../util'; +/** + * An interface for enforcing `fetch`-type compliance. + * + * @remarks + * + * This provides type guarantees during build-time, ensuring the `fetch` method is 1:1 + * compatible with the `Gaxios#fetch` API. + */ +interface GaxiosFetchCompliance { + fetch: typeof fetch | Gaxios['fetch']; +} +/** + * Easy access to symbol-indexed strings on config objects. + */ +export type SymbolIndexString = { + [key: symbol]: string | undefined; +}; +/** + * Base auth configurations (e.g. from JWT or `.json` files) with conventional + * camelCased options. + * + * @privateRemarks + * + * This interface is purposely not exported so that it can be removed once + * {@link https://github.com/microsoft/TypeScript/issues/50715} has been + * resolved. Then, we can use {@link OriginalAndCamel} to shrink this interface. + * + * Tracking: {@link https://github.com/googleapis/google-auth-library-nodejs/issues/1686} + */ +interface AuthJSONOptions { + /** + * The project ID corresponding to the current credentials if available. + */ + project_id: string | null; + /** + * An alias for {@link AuthJSONOptions.project_id `project_id`}. + */ + projectId: AuthJSONOptions['project_id']; + /** + * The quota project ID. The quota project can be used by client libraries for the billing purpose. + * See {@link https://cloud.google.com/docs/quota Working with quotas} + */ + quota_project_id: string; + /** + * An alias for {@link AuthJSONOptions.quota_project_id `quota_project_id`}. + */ + quotaProjectId: AuthJSONOptions['quota_project_id']; + /** + * The default service domain for a given Cloud universe. + * + * @example + * 'googleapis.com' + */ + universe_domain: string; + /** + * An alias for {@link AuthJSONOptions.universe_domain `universe_domain`}. + */ + universeDomain: AuthJSONOptions['universe_domain']; +} +/** + * Base `AuthClient` configuration. + * + * The camelCased options are aliases of the snake_cased options, supporting both + * JSON API and JS conventions. + */ +export interface AuthClientOptions extends Partial> { + /** + * An API key to use, optional. + */ + apiKey?: string; + credentials?: Credentials; + /** + * The {@link Gaxios `Gaxios`} instance used for making requests. + * + * @see {@link AuthClientOptions.useAuthRequestParameters} + */ + transporter?: Gaxios; + /** + * Provides default options to the transporter, such as {@link GaxiosOptions.agent `agent`} or + * {@link GaxiosOptions.retryConfig `retryConfig`}. + * + * This option is ignored if {@link AuthClientOptions.transporter `gaxios`} has been provided + */ + transporterOptions?: GaxiosOptions; + /** + * The expiration threshold in milliseconds before forcing token refresh of + * unexpired tokens. + */ + eagerRefreshThresholdMillis?: number; + /** + * Whether to attempt to refresh tokens on status 401/403 responses + * even if an attempt is made to refresh the token preemptively based + * on the expiry_date. + */ + forceRefreshOnFailure?: boolean; + /** + * Enables/disables the adding of the AuthClient's default interceptor. + * + * @see {@link AuthClientOptions.transporter} + * + * @remarks + * + * Disabling is useful for debugging and experimentation. + * + * @default true + */ + useAuthRequestParameters?: boolean; +} +/** + * The default cloud universe + * + * @see {@link AuthJSONOptions.universe_domain} + */ +export declare const DEFAULT_UNIVERSE = "googleapis.com"; +/** + * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} + */ +export declare const DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS: number; +/** + * Defines the root interface for all clients that generate credentials + * for calling Google APIs. All clients should implement this interface. + */ +export interface CredentialsClient { + projectId?: AuthClientOptions['projectId']; + eagerRefreshThresholdMillis: NonNullable; + forceRefreshOnFailure: NonNullable; + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + getAccessToken(): Promise; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { authorization: 'Bearer ' } + * @param url The URI being authorized. + */ + getRequestHeaders(url?: string | URL): Promise; + /** + * Provides an alternative Gaxios request implementation with auth credentials + */ + request(opts: GaxiosOptions): GaxiosPromise; + /** + * Sets the auth credentials. + */ + setCredentials(credentials: Credentials): void; + /** + * Subscribes a listener to the tokens event triggered when a token is + * generated. + * + * @param event The tokens event to subscribe to. + * @param listener The listener that triggers on event trigger. + * @return The current client instance. + */ + on(event: 'tokens', listener: (tokens: Credentials) => void): this; +} +export declare interface AuthClient { + on(event: 'tokens', listener: (tokens: Credentials) => void): this; +} +/** + * The base of all Auth Clients. + */ +export declare abstract class AuthClient extends EventEmitter implements CredentialsClient, GaxiosFetchCompliance { + apiKey?: string; + projectId?: string | null; + /** + * The quota project ID. The quota project can be used by client libraries for the billing purpose. + * See {@link https://cloud.google.com/docs/quota Working with quotas} + */ + quotaProjectId?: string; + /** + * The {@link Gaxios `Gaxios`} instance used for making requests. + */ + transporter: Gaxios; + credentials: Credentials; + eagerRefreshThresholdMillis: number; + forceRefreshOnFailure: boolean; + universeDomain: string; + /** + * Symbols that can be added to GaxiosOptions to specify the method name that is + * making an RPC call, for logging purposes, as well as a string ID that can be + * used to correlate calls and responses. + */ + static readonly RequestMethodNameSymbol: unique symbol; + static readonly RequestLogIdSymbol: unique symbol; + constructor(opts?: AuthClientOptions); + /** + * A {@link fetch `fetch`} compliant API for {@link AuthClient}. + * + * @see {@link AuthClient.request} for the classic method. + * + * @remarks + * + * This is useful as a drop-in replacement for `fetch` API usage. + * + * @example + * + * ```ts + * const authClient = new AuthClient(); + * const fetchWithAuthClient: typeof fetch = (...args) => authClient.fetch(...args); + * await fetchWithAuthClient('https://example.com'); + * ``` + * + * @param args `fetch` API or {@link Gaxios.fetch `Gaxios#fetch`} parameters + * @returns the {@link GaxiosResponse} with Gaxios-added properties + */ + fetch(...args: Parameters): GaxiosPromise; + /** + * The public request API in which credentials may be added to the request. + * + * @see {@link AuthClient.fetch} for the modern method. + * + * @param options options for `gaxios` + */ + abstract request(options: GaxiosOptions): GaxiosPromise; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * ```ts + * new Headers({'authorization': 'Bearer '}); + * ``` + * + * @param url The URI being authorized. + */ + abstract getRequestHeaders(url?: string | URL): Promise; + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + abstract getAccessToken(): Promise<{ + token?: string | null; + res?: GaxiosResponse | null; + }>; + /** + * Sets the auth credentials. + */ + setCredentials(credentials: Credentials): void; + /** + * Append additional headers, e.g., x-goog-user-project, shared across the + * classes inheriting AuthClient. This method should be used by any method + * that overrides getRequestMetadataAsync(), which is a shared helper for + * setting request information in both gRPC and HTTP API calls. + * + * @param headers object to append additional headers to. + */ + protected addSharedMetadataHeaders(headers: Headers): Headers; + /** + * Adds the `x-goog-user-project` and `authorization` headers to the target Headers + * object, if they exist on the source. + * + * @param target the headers to target + * @param source the headers to source from + * @returns the target headers + */ + protected addUserProjectAndAuthHeaders(target: T, source: Headers): T; + static log: import("google-logging-utils").AdhocDebugLogFunction; + static readonly DEFAULT_REQUEST_INTERCEPTOR: Parameters[0]; + static readonly DEFAULT_RESPONSE_INTERCEPTOR: Parameters[0]; + /** + * Sets the method name that is making a Gaxios request, so that logging may tag + * log lines with the operation. + * @param config A Gaxios request config + * @param methodName The method name making the call + */ + static setMethodName(config: GaxiosOptions, methodName: string): void; + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + protected static get RETRY_CONFIG(): GaxiosOptions; +} +export type HeadersInit = ConstructorParameters[0]; +export interface GetAccessTokenResponse { + token?: string | null; + res?: GaxiosResponse | null; +} +/** + * @deprecated - use the Promise API instead + */ +export interface BodyResponseCallback { + (err: Error | null, res?: GaxiosResponse | null): void; +} +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.js new file mode 100644 index 0000000000000000000000000000000000000000..9c22bd51eb852f85ee5e57cf3c9799b10c908c4a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/authclient.js @@ -0,0 +1,286 @@ +"use strict"; +// Copyright 2012 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AuthClient = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports.DEFAULT_UNIVERSE = void 0; +const events_1 = require("events"); +const gaxios_1 = require("gaxios"); +const util_1 = require("../util"); +const google_logging_utils_1 = require("google-logging-utils"); +const shared_cjs_1 = require("../shared.cjs"); +/** + * The default cloud universe + * + * @see {@link AuthJSONOptions.universe_domain} + */ +exports.DEFAULT_UNIVERSE = 'googleapis.com'; +/** + * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} + */ +exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000; +/** + * The base of all Auth Clients. + */ +class AuthClient extends events_1.EventEmitter { + apiKey; + projectId; + /** + * The quota project ID. The quota project can be used by client libraries for the billing purpose. + * See {@link https://cloud.google.com/docs/quota Working with quotas} + */ + quotaProjectId; + /** + * The {@link Gaxios `Gaxios`} instance used for making requests. + */ + transporter; + credentials = {}; + eagerRefreshThresholdMillis = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; + forceRefreshOnFailure = false; + universeDomain = exports.DEFAULT_UNIVERSE; + /** + * Symbols that can be added to GaxiosOptions to specify the method name that is + * making an RPC call, for logging purposes, as well as a string ID that can be + * used to correlate calls and responses. + */ + static RequestMethodNameSymbol = Symbol('request method name'); + static RequestLogIdSymbol = Symbol('request log id'); + constructor(opts = {}) { + super(); + const options = (0, util_1.originalOrCamelOptions)(opts); + // Shared auth options + this.apiKey = opts.apiKey; + this.projectId = options.get('project_id') ?? null; + this.quotaProjectId = options.get('quota_project_id'); + this.credentials = options.get('credentials') ?? {}; + this.universeDomain = options.get('universe_domain') ?? exports.DEFAULT_UNIVERSE; + // Shared client options + this.transporter = opts.transporter ?? new gaxios_1.Gaxios(opts.transporterOptions); + if (options.get('useAuthRequestParameters') !== false) { + this.transporter.interceptors.request.add(AuthClient.DEFAULT_REQUEST_INTERCEPTOR); + this.transporter.interceptors.response.add(AuthClient.DEFAULT_RESPONSE_INTERCEPTOR); + } + if (opts.eagerRefreshThresholdMillis) { + this.eagerRefreshThresholdMillis = opts.eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = opts.forceRefreshOnFailure ?? false; + } + /** + * A {@link fetch `fetch`} compliant API for {@link AuthClient}. + * + * @see {@link AuthClient.request} for the classic method. + * + * @remarks + * + * This is useful as a drop-in replacement for `fetch` API usage. + * + * @example + * + * ```ts + * const authClient = new AuthClient(); + * const fetchWithAuthClient: typeof fetch = (...args) => authClient.fetch(...args); + * await fetchWithAuthClient('https://example.com'); + * ``` + * + * @param args `fetch` API or {@link Gaxios.fetch `Gaxios#fetch`} parameters + * @returns the {@link GaxiosResponse} with Gaxios-added properties + */ + fetch(...args) { + // Up to 2 parameters in either overload + const input = args[0]; + const init = args[1]; + let url = undefined; + const headers = new Headers(); + // prepare URL + if (typeof input === 'string') { + url = new URL(input); + } + else if (input instanceof URL) { + url = input; + } + else if (input && input.url) { + url = new URL(input.url); + } + // prepare headers + if (input && typeof input === 'object' && 'headers' in input) { + gaxios_1.Gaxios.mergeHeaders(headers, input.headers); + } + if (init) { + gaxios_1.Gaxios.mergeHeaders(headers, new Headers(init.headers)); + } + // prepare request + if (typeof input === 'object' && !(input instanceof URL)) { + // input must have been a non-URL object + return this.request({ ...init, ...input, headers, url }); + } + else { + // input must have been a string or URL + return this.request({ ...init, headers, url }); + } + } + /** + * Sets the auth credentials. + */ + setCredentials(credentials) { + this.credentials = credentials; + } + /** + * Append additional headers, e.g., x-goog-user-project, shared across the + * classes inheriting AuthClient. This method should be used by any method + * that overrides getRequestMetadataAsync(), which is a shared helper for + * setting request information in both gRPC and HTTP API calls. + * + * @param headers object to append additional headers to. + */ + addSharedMetadataHeaders(headers) { + // quota_project_id, stored in application_default_credentials.json, is set in + // the x-goog-user-project header, to indicate an alternate account for + // billing and quota: + if (!headers.has('x-goog-user-project') && // don't override a value the user sets. + this.quotaProjectId) { + headers.set('x-goog-user-project', this.quotaProjectId); + } + return headers; + } + /** + * Adds the `x-goog-user-project` and `authorization` headers to the target Headers + * object, if they exist on the source. + * + * @param target the headers to target + * @param source the headers to source from + * @returns the target headers + */ + addUserProjectAndAuthHeaders(target, source) { + const xGoogUserProject = source.get('x-goog-user-project'); + const authorizationHeader = source.get('authorization'); + if (xGoogUserProject) { + target.set('x-goog-user-project', xGoogUserProject); + } + if (authorizationHeader) { + target.set('authorization', authorizationHeader); + } + return target; + } + static log = (0, google_logging_utils_1.log)('auth'); + static DEFAULT_REQUEST_INTERCEPTOR = { + resolved: async (config) => { + // Set `x-goog-api-client`, if not already set + if (!config.headers.has('x-goog-api-client')) { + const nodeVersion = process.version.replace(/^v/, ''); + config.headers.set('x-goog-api-client', `gl-node/${nodeVersion}`); + } + // Set `User-Agent` + const userAgent = config.headers.get('User-Agent'); + if (!userAgent) { + config.headers.set('User-Agent', shared_cjs_1.USER_AGENT); + } + else if (!userAgent.includes(`${shared_cjs_1.PRODUCT_NAME}/`)) { + config.headers.set('User-Agent', `${userAgent} ${shared_cjs_1.USER_AGENT}`); + } + try { + const symbols = config; + const methodName = symbols[AuthClient.RequestMethodNameSymbol]; + // This doesn't need to be very unique or interesting, it's just an aid for + // matching requests to responses. + const logId = `${Math.floor(Math.random() * 1000)}`; + symbols[AuthClient.RequestLogIdSymbol] = logId; + // Boil down the object we're printing out. + const logObject = { + url: config.url, + headers: config.headers, + }; + if (methodName) { + AuthClient.log.info('%s [%s] request %j', methodName, logId, logObject); + } + else { + AuthClient.log.info('[%s] request %j', logId, logObject); + } + } + catch (e) { + // Logging must not create new errors; swallow them all. + } + return config; + }, + }; + static DEFAULT_RESPONSE_INTERCEPTOR = { + resolved: async (response) => { + try { + const symbols = response.config; + const methodName = symbols[AuthClient.RequestMethodNameSymbol]; + const logId = symbols[AuthClient.RequestLogIdSymbol]; + if (methodName) { + AuthClient.log.info('%s [%s] response %j', methodName, logId, response.data); + } + else { + AuthClient.log.info('[%s] response %j', logId, response.data); + } + } + catch (e) { + // Logging must not create new errors; swallow them all. + } + return response; + }, + rejected: async (error) => { + try { + const symbols = error.config; + const methodName = symbols[AuthClient.RequestMethodNameSymbol]; + const logId = symbols[AuthClient.RequestLogIdSymbol]; + if (methodName) { + AuthClient.log.info('%s [%s] error %j', methodName, logId, error.response?.data); + } + else { + AuthClient.log.error('[%s] error %j', logId, error.response?.data); + } + } + catch (e) { + // Logging must not create new errors; swallow them all. + } + // Re-throw the error. + throw error; + }, + }; + /** + * Sets the method name that is making a Gaxios request, so that logging may tag + * log lines with the operation. + * @param config A Gaxios request config + * @param methodName The method name making the call + */ + static setMethodName(config, methodName) { + try { + const symbols = config; + symbols[AuthClient.RequestMethodNameSymbol] = methodName; + } + catch (e) { + // Logging must not create new errors; swallow them all. + } + } + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; + } +} +exports.AuthClient = AuthClient; +//# sourceMappingURL=authclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e97a791c211f8bbe222cc15b33200c24ed0be3da --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.d.ts @@ -0,0 +1,115 @@ +import { AwsSecurityCredentials } from './awsrequestsigner'; +import { BaseExternalAccountClient, BaseExternalAccountClientOptions, ExternalAccountSupplierContext } from './baseexternalclient'; +import { SnakeToCamelObject } from '../util'; +/** + * AWS credentials JSON interface. This is used for AWS workloads. + */ +export interface AwsClientOptions extends BaseExternalAccountClientOptions { + /** + * Object containing options to retrieve AWS security credentials. A valid credential + * source or a aws security credentials supplier should be specified. + */ + credential_source?: { + /** + * AWS environment ID. Currently only 'AWS1' is supported. + */ + environment_id: string; + /** + * The EC2 metadata URL to retrieve the current AWS region from. If this is + * not provided, the region should be present in the AWS_REGION or AWS_DEFAULT_REGION + * environment variables. + */ + region_url?: string; + /** + * The EC2 metadata URL to retrieve AWS security credentials. If this is not provided, + * the credentials should be present in the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, + * and AWS_SESSION_TOKEN environment variables. + */ + url?: string; + /** + * The regional GetCallerIdentity action URL, used to determine the account + * ID and its roles. + */ + regional_cred_verification_url: string; + /** + * The imdsv2 session token url is used to fetch session token from AWS + * which is later sent through headers for metadata requests. If the + * field is missing, then session token won't be fetched and sent with + * the metadata requests. + * The session token is required for IMDSv2 but optional for IMDSv1 + */ + imdsv2_session_token_url?: string; + }; + /** + * The AWS security credentials supplier to call to retrieve the AWS region + * and AWS security credentials. Either this or a valid credential source + * must be specified. + */ + aws_security_credentials_supplier?: AwsSecurityCredentialsSupplier; +} +/** + * Supplier interface for AWS security credentials. This can be implemented to + * return an AWS region and AWS security credentials. These credentials can + * then be exchanged for a GCP token by an {@link AwsClient}. + */ +export interface AwsSecurityCredentialsSupplier { + /** + * Gets the active AWS region. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity as well as the transport from the + * calling client to use for requests. + * @return A promise that resolves with the AWS region string. + */ + getAwsRegion: (context: ExternalAccountSupplierContext) => Promise; + /** + * Gets valid AWS security credentials for the requested external account + * identity. Note that these are not cached by the calling {@link AwsClient}, + * so caching should be including in the implementation. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity as well as the transport from the + * calling client to use for requests. + * @return A promise that resolves with the requested {@link AwsSecurityCredentials}. + */ + getAwsSecurityCredentials: (context: ExternalAccountSupplierContext) => Promise; +} +/** + * AWS external account client. This is used for AWS workloads, where + * AWS STS GetCallerIdentity serialized signed requests are exchanged for + * GCP access token. + */ +export declare class AwsClient extends BaseExternalAccountClient { + #private; + private readonly environmentId?; + private readonly awsSecurityCredentialsSupplier; + private readonly regionalCredVerificationUrl; + private awsRequestSigner; + private region; + /** + * @deprecated AWS client no validates the EC2 metadata address. + **/ + static AWS_EC2_METADATA_IPV4_ADDRESS: string; + /** + * @deprecated AWS client no validates the EC2 metadata address. + **/ + static AWS_EC2_METADATA_IPV6_ADDRESS: string; + /** + * Instantiates an AwsClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid AWS credential. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + */ + constructor(options: AwsClientOptions | SnakeToCamelObject); + private validateEnvironmentId; + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. This will call the + * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS + * Security Credentials, then use them to create a signed AWS STS request that + * can be exchanged for a GCP access token. + * @return A promise that resolves with the external subject token. + */ + retrieveSubjectToken(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.js new file mode 100644 index 0000000000000000000000000000000000000000..3cd45341036783ba0cfe0557b9e694c5410c2c9b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsclient.js @@ -0,0 +1,154 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AwsClient = void 0; +const awsrequestsigner_1 = require("./awsrequestsigner"); +const baseexternalclient_1 = require("./baseexternalclient"); +const defaultawssecuritycredentialssupplier_1 = require("./defaultawssecuritycredentialssupplier"); +const util_1 = require("../util"); +const gaxios_1 = require("gaxios"); +/** + * AWS external account client. This is used for AWS workloads, where + * AWS STS GetCallerIdentity serialized signed requests are exchanged for + * GCP access token. + */ +class AwsClient extends baseexternalclient_1.BaseExternalAccountClient { + environmentId; + awsSecurityCredentialsSupplier; + regionalCredVerificationUrl; + awsRequestSigner; + region; + static #DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL = 'https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15'; + /** + * @deprecated AWS client no validates the EC2 metadata address. + **/ + static AWS_EC2_METADATA_IPV4_ADDRESS = '169.254.169.254'; + /** + * @deprecated AWS client no validates the EC2 metadata address. + **/ + static AWS_EC2_METADATA_IPV6_ADDRESS = 'fd00:ec2::254'; + /** + * Instantiates an AwsClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid AWS credential. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + */ + constructor(options) { + super(options); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const awsSecurityCredentialsSupplier = opts.get('aws_security_credentials_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !awsSecurityCredentialsSupplier) { + throw new Error('A credential source or AWS security credentials supplier must be specified.'); + } + if (credentialSource && awsSecurityCredentialsSupplier) { + throw new Error('Only one of credential source or AWS security credentials supplier can be specified.'); + } + if (awsSecurityCredentialsSupplier) { + this.awsSecurityCredentialsSupplier = awsSecurityCredentialsSupplier; + this.regionalCredVerificationUrl = + AwsClient.#DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL; + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + this.environmentId = credentialSourceOpts.get('environment_id'); + // This is only required if the AWS region is not available in the + // AWS_REGION or AWS_DEFAULT_REGION environment variables. + const regionUrl = credentialSourceOpts.get('region_url'); + // This is only required if AWS security credentials are not available in + // environment variables. + const securityCredentialsUrl = credentialSourceOpts.get('url'); + const imdsV2SessionTokenUrl = credentialSourceOpts.get('imdsv2_session_token_url'); + this.awsSecurityCredentialsSupplier = + new defaultawssecuritycredentialssupplier_1.DefaultAwsSecurityCredentialsSupplier({ + regionUrl: regionUrl, + securityCredentialsUrl: securityCredentialsUrl, + imdsV2SessionTokenUrl: imdsV2SessionTokenUrl, + }); + this.regionalCredVerificationUrl = credentialSourceOpts.get('regional_cred_verification_url'); + this.credentialSourceType = 'aws'; + // Data validators. + this.validateEnvironmentId(); + } + this.awsRequestSigner = null; + this.region = ''; + } + validateEnvironmentId() { + const match = this.environmentId?.match(/^(aws)(\d+)$/); + if (!match || !this.regionalCredVerificationUrl) { + throw new Error('No valid AWS "credential_source" provided'); + } + else if (parseInt(match[2], 10) !== 1) { + throw new Error(`aws version "${match[2]}" is not supported in the current build.`); + } + } + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. This will call the + * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS + * Security Credentials, then use them to create a signed AWS STS request that + * can be exchanged for a GCP access token. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Initialize AWS request signer if not already initialized. + if (!this.awsRequestSigner) { + this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext); + this.awsRequestSigner = new awsrequestsigner_1.AwsRequestSigner(async () => { + return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext); + }, this.region); + } + // Generate signed request to AWS STS GetCallerIdentity API. + // Use the required regional endpoint. Otherwise, the request will fail. + const options = await this.awsRequestSigner.getRequestOptions({ + ...AwsClient.RETRY_CONFIG, + url: this.regionalCredVerificationUrl.replace('{region}', this.region), + method: 'POST', + }); + // The GCP STS endpoint expects the headers to be formatted as: + // [ + // {key: 'x-amz-date', value: '...'}, + // {key: 'authorization', value: '...'}, + // ... + // ] + // And then serialized as: + // encodeURIComponent(JSON.stringify({ + // url: '...', + // method: 'POST', + // headers: [{key: 'x-amz-date', value: '...'}, ...] + // })) + const reformattedHeader = []; + const extendedHeaders = gaxios_1.Gaxios.mergeHeaders({ + // The full, canonical resource name of the workload identity pool + // provider, with or without the HTTPS prefix. + // Including this header as part of the signature is recommended to + // ensure data integrity. + 'x-goog-cloud-target-resource': this.audience, + }, options.headers); + // Reformat header to GCP STS expected format. + extendedHeaders.forEach((value, key) => reformattedHeader.push({ key, value })); + // Serialize the reformatted signed request. + return encodeURIComponent(JSON.stringify({ + url: options.url, + method: options.method, + headers: reformattedHeader, + })); + } +} +exports.AwsClient = AwsClient; +//# sourceMappingURL=awsclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3467e973f6879bae31286a5c37aa9b511e93ee96 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.d.ts @@ -0,0 +1,40 @@ +import { GaxiosOptions } from 'gaxios'; +/** + * Interface defining AWS security credentials. + * These are either determined from AWS security_credentials endpoint or + * AWS environment variables. + */ +export interface AwsSecurityCredentials { + accessKeyId: string; + secretAccessKey: string; + token?: string; +} +/** + * Implements an AWS API request signer based on the AWS Signature Version 4 + * signing process. + * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html + */ +export declare class AwsRequestSigner { + private readonly getCredentials; + private readonly region; + private readonly crypto; + /** + * Instantiates an AWS API request signer used to send authenticated signed + * requests to AWS APIs based on the AWS Signature Version 4 signing process. + * This also provides a mechanism to generate the signed request without + * sending it. + * @param getCredentials A mechanism to retrieve AWS security credentials + * when needed. + * @param region The AWS region to use. + */ + constructor(getCredentials: () => Promise, region: string); + /** + * Generates the signed request for the provided HTTP request for calling + * an AWS API. This follows the steps described at: + * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html + * @param amzOptions The AWS request options that need to be signed. + * @return A promise that resolves with the GaxiosOptions containing the + * signed HTTP request parameters. + */ + getRequestOptions(amzOptions: GaxiosOptions): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.js new file mode 100644 index 0000000000000000000000000000000000000000..813169a87c7f3ee13cda281aafda8657d2752a8a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/awsrequestsigner.js @@ -0,0 +1,213 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AwsRequestSigner = void 0; +const gaxios_1 = require("gaxios"); +const crypto_1 = require("../crypto/crypto"); +/** AWS Signature Version 4 signing algorithm identifier. */ +const AWS_ALGORITHM = 'AWS4-HMAC-SHA256'; +/** + * The termination string for the AWS credential scope value as defined in + * https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + */ +const AWS_REQUEST_TYPE = 'aws4_request'; +/** + * Implements an AWS API request signer based on the AWS Signature Version 4 + * signing process. + * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html + */ +class AwsRequestSigner { + getCredentials; + region; + crypto; + /** + * Instantiates an AWS API request signer used to send authenticated signed + * requests to AWS APIs based on the AWS Signature Version 4 signing process. + * This also provides a mechanism to generate the signed request without + * sending it. + * @param getCredentials A mechanism to retrieve AWS security credentials + * when needed. + * @param region The AWS region to use. + */ + constructor(getCredentials, region) { + this.getCredentials = getCredentials; + this.region = region; + this.crypto = (0, crypto_1.createCrypto)(); + } + /** + * Generates the signed request for the provided HTTP request for calling + * an AWS API. This follows the steps described at: + * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html + * @param amzOptions The AWS request options that need to be signed. + * @return A promise that resolves with the GaxiosOptions containing the + * signed HTTP request parameters. + */ + async getRequestOptions(amzOptions) { + if (!amzOptions.url) { + throw new RangeError('"url" is required in "amzOptions"'); + } + // Stringify JSON requests. This will be set in the request body of the + // generated signed request. + const requestPayloadData = typeof amzOptions.data === 'object' + ? JSON.stringify(amzOptions.data) + : amzOptions.data; + const url = amzOptions.url; + const method = amzOptions.method || 'GET'; + const requestPayload = amzOptions.body || requestPayloadData; + const additionalAmzHeaders = amzOptions.headers; + const awsSecurityCredentials = await this.getCredentials(); + const uri = new URL(url); + if (typeof requestPayload !== 'string' && requestPayload !== undefined) { + throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${requestPayload}`); + } + const headerMap = await generateAuthenticationHeaderMap({ + crypto: this.crypto, + host: uri.host, + canonicalUri: uri.pathname, + canonicalQuerystring: uri.search.slice(1), + method, + region: this.region, + securityCredentials: awsSecurityCredentials, + requestPayload, + additionalAmzHeaders, + }); + // Append additional optional headers, eg. X-Amz-Target, Content-Type, etc. + const headers = gaxios_1.Gaxios.mergeHeaders( + // Add x-amz-date if available. + headerMap.amzDate ? { 'x-amz-date': headerMap.amzDate } : {}, { + authorization: headerMap.authorizationHeader, + host: uri.host, + }, additionalAmzHeaders || {}); + if (awsSecurityCredentials.token) { + gaxios_1.Gaxios.mergeHeaders(headers, { + 'x-amz-security-token': awsSecurityCredentials.token, + }); + } + const awsSignedReq = { + url, + method: method, + headers, + }; + if (requestPayload !== undefined) { + awsSignedReq.body = requestPayload; + } + return awsSignedReq; + } +} +exports.AwsRequestSigner = AwsRequestSigner; +/** + * Creates the HMAC-SHA256 hash of the provided message using the + * provided key. + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The HMAC-SHA256 key to use. + * @param msg The message to hash. + * @return The computed hash bytes. + */ +async function sign(crypto, key, msg) { + return await crypto.signWithHmacSha256(key, msg); +} +/** + * Calculates the signing key used to calculate the signature for + * AWS Signature Version 4 based on: + * https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The AWS secret access key. + * @param dateStamp The '%Y%m%d' date format. + * @param region The AWS region. + * @param serviceName The AWS service name, eg. sts. + * @return The signing key bytes. + */ +async function getSigningKey(crypto, key, dateStamp, region, serviceName) { + const kDate = await sign(crypto, `AWS4${key}`, dateStamp); + const kRegion = await sign(crypto, kDate, region); + const kService = await sign(crypto, kRegion, serviceName); + const kSigning = await sign(crypto, kService, 'aws4_request'); + return kSigning; +} +/** + * Generates the authentication header map needed for generating the AWS + * Signature Version 4 signed request. + * + * @param option The options needed to compute the authentication header map. + * @return The AWS authentication header map which constitutes of the following + * components: amz-date, authorization header and canonical query string. + */ +async function generateAuthenticationHeaderMap(options) { + const additionalAmzHeaders = gaxios_1.Gaxios.mergeHeaders(options.additionalAmzHeaders); + const requestPayload = options.requestPayload || ''; + // iam.amazonaws.com host => iam service. + // sts.us-east-2.amazonaws.com => sts service. + const serviceName = options.host.split('.')[0]; + const now = new Date(); + // Format: '%Y%m%dT%H%M%SZ'. + const amzDate = now + .toISOString() + .replace(/[-:]/g, '') + .replace(/\.[0-9]+/, ''); + // Format: '%Y%m%d'. + const dateStamp = now.toISOString().replace(/[-]/g, '').replace(/T.*/, ''); + // Add AWS token if available. + if (options.securityCredentials.token) { + additionalAmzHeaders.set('x-amz-security-token', options.securityCredentials.token); + } + // Header keys need to be sorted alphabetically. + const amzHeaders = gaxios_1.Gaxios.mergeHeaders({ + host: options.host, + }, + // Previously the date was not fixed with x-amz- and could be provided manually. + // https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/aws4_testsuite/get-header-value-trim.req + additionalAmzHeaders.has('date') ? {} : { 'x-amz-date': amzDate }, additionalAmzHeaders); + let canonicalHeaders = ''; + // TypeScript is missing `Headers#keys` at the time of writing + const signedHeadersList = [ + ...amzHeaders.keys(), + ].sort(); + signedHeadersList.forEach(key => { + canonicalHeaders += `${key}:${amzHeaders.get(key)}\n`; + }); + const signedHeaders = signedHeadersList.join(';'); + const payloadHash = await options.crypto.sha256DigestHex(requestPayload); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html + const canonicalRequest = `${options.method.toUpperCase()}\n` + + `${options.canonicalUri}\n` + + `${options.canonicalQuerystring}\n` + + `${canonicalHeaders}\n` + + `${signedHeaders}\n` + + `${payloadHash}`; + const credentialScope = `${dateStamp}/${options.region}/${serviceName}/${AWS_REQUEST_TYPE}`; + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + const stringToSign = `${AWS_ALGORITHM}\n` + + `${amzDate}\n` + + `${credentialScope}\n` + + (await options.crypto.sha256DigestHex(canonicalRequest)); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + const signingKey = await getSigningKey(options.crypto, options.securityCredentials.secretAccessKey, dateStamp, options.region, serviceName); + const signature = await sign(options.crypto, signingKey, stringToSign); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html + const authorizationHeader = `${AWS_ALGORITHM} Credential=${options.securityCredentials.accessKeyId}/` + + `${credentialScope}, SignedHeaders=${signedHeaders}, ` + + `Signature=${(0, crypto_1.fromArrayBufferToHex)(signature)}`; + return { + // Do not return x-amz-date if date is available. + amzDate: additionalAmzHeaders.has('date') ? undefined : amzDate, + authorizationHeader, + canonicalQuerystring: options.canonicalQuerystring, + }; +} +//# sourceMappingURL=awsrequestsigner.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b6a7769da2df3a26cf60b8f54e9719f95d80d81e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.d.ts @@ -0,0 +1,318 @@ +import { Gaxios, GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; +import { Credentials } from './credentials'; +import { AuthClient, AuthClientOptions, GetAccessTokenResponse, BodyResponseCallback } from './authclient'; +import * as sts from './stscredentials'; +import { ClientAuthentication } from './oauth2common'; +import { SnakeToCamelObject } from '../util'; +/** + * Offset to take into account network delays and server clock skews. + */ +export declare const EXPIRATION_TIME_OFFSET: number; +/** + * The credentials JSON file type for external account clients. + * There are 3 types of JSON configs: + * 1. authorized_user => Google end user credential + * 2. service_account => Google service account credential + * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) + */ +export declare const EXTERNAL_ACCOUNT_TYPE = "external_account"; +/** + * Cloud resource manager URL used to retrieve project information. + * + * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead + **/ +export declare const CLOUD_RESOURCE_MANAGER = "https://cloudresourcemanager.googleapis.com/v1/projects/"; +/** + * Shared options used to build {@link ExternalAccountClient} and + * {@link ExternalAccountAuthorizedUserClient}. + */ +export interface SharedExternalAccountClientOptions extends AuthClientOptions { + /** + * The Security Token Service audience, which is usually the fully specified + * resource name of the workload or workforce pool provider. + */ + audience: string; + /** + * The Security Token Service token URL used to exchange the third party token + * for a GCP access token. If not provided, will default to + * 'https://sts.googleapis.com/v1/token' + */ + token_url?: string; +} +/** + * Interface containing context about the requested external identity. This is + * passed on all requests from external account clients to external identity suppliers. + */ +export interface ExternalAccountSupplierContext { + /** + * The requested external account audience. For example: + * * "//iam.googleapis.com/locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID" + * * "//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID" + */ + audience: string; + /** + * The requested subject token type. Expected values include: + * * "urn:ietf:params:oauth:token-type:jwt" + * * "urn:ietf:params:aws:token-type:aws4_request" + * * "urn:ietf:params:oauth:token-type:saml2" + * * "urn:ietf:params:oauth:token-type:id_token" + */ + subjectTokenType: string; + /** + * The {@link Gaxios} instance for calling external account + * to use for requests. + */ + transporter: Gaxios; +} +/** + * Base external account credentials json interface. + */ +export interface BaseExternalAccountClientOptions extends SharedExternalAccountClientOptions { + /** + * Credential type, should always be 'external_account'. + */ + type?: string; + /** + * The Security Token Service subject token type based on the OAuth 2.0 + * token exchange spec. Expected values include: + * * 'urn:ietf:params:oauth:token-type:jwt' + * * 'urn:ietf:params:aws:token-type:aws4_request' + * * 'urn:ietf:params:oauth:token-type:saml2' + * * 'urn:ietf:params:oauth:token-type:id_token' + */ + subject_token_type: string; + /** + * The URL for the service account impersonation request. This URL is required + * for some APIs. If this URL is not available, the access token from the + * Security Token Service is used directly. + */ + service_account_impersonation_url?: string; + /** + * Object containing additional options for service account impersonation. + */ + service_account_impersonation?: { + /** + * The desired lifetime of the impersonated service account access token. + * If not provided, the default lifetime will be 3600 seconds. + */ + token_lifetime_seconds?: number; + }; + /** + * The endpoint used to retrieve account related information. + */ + token_info_url?: string; + /** + * Client ID of the service account from the console. + */ + client_id?: string; + /** + * Client secret of the service account from the console. + */ + client_secret?: string; + /** + * The workforce pool user project. Required when using a workforce identity + * pool. + */ + workforce_pool_user_project?: string; + /** + * The scopes to request during the authorization grant. + */ + scopes?: string[]; + /** + * @example + * https://cloudresourcemanager.googleapis.com/v1/projects/ + **/ + cloud_resource_manager_url?: string | URL; +} +/** + * Interface defining the successful response for iamcredentials + * generateAccessToken API. + * https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateAccessToken + */ +export interface IamGenerateAccessTokenResponse { + accessToken: string; + /** + * ISO format used for expiration time. + * + * @example + * '2014-10-02T15:01:23.045123456Z' + */ + expireTime: string; +} +/** + * Interface defining the project information response returned by the cloud + * resource manager. + * https://cloud.google.com/resource-manager/reference/rest/v1/projects#Project + */ +export interface ProjectInfo { + projectNumber: string; + projectId: string; + lifecycleState: string; + name: string; + createTime?: string; + parent: { + [key: string]: ReturnType; + }; +} +/** + * Internal interface for tracking the access token expiration time. + */ +interface CredentialsWithResponse extends Credentials { + res?: GaxiosResponse | null; +} +/** + * Base external account client. This is used to instantiate AuthClients for + * exchanging external account credentials for GCP access token and authorizing + * requests to GCP APIs. + * The base class implements common logic for exchanging various type of + * external credentials for GCP access token. The logic of determining and + * retrieving the external credential based on the environment and + * credential_source will be left for the subclasses. + */ +export declare abstract class BaseExternalAccountClient extends AuthClient { + #private; + /** + * OAuth scopes for the GCP access token to use. When not provided, + * the default https://www.googleapis.com/auth/cloud-platform is + * used. + */ + scopes?: string | string[]; + projectNumber: string | null; + protected readonly audience: string; + protected readonly subjectTokenType: string; + protected stsCredential: sts.StsCredentials; + protected readonly clientAuth?: ClientAuthentication; + protected credentialSourceType?: string; + private cachedAccessToken; + private readonly serviceAccountImpersonationUrl?; + private readonly serviceAccountImpersonationLifetime?; + private readonly workforcePoolUserProject?; + private readonly configLifetimeRequested; + private readonly tokenUrl; + /** + * @example + * ```ts + * new URL('https://cloudresourcemanager.googleapis.com/v1/projects/'); + * ``` + */ + protected cloudResourceManagerURL: URL | string; + protected supplierContext: ExternalAccountSupplierContext; + /** + * Instantiate a BaseExternalAccountClient instance using the provided JSON + * object loaded from an external account credentials file. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + */ + constructor(options: BaseExternalAccountClientOptions | SnakeToCamelObject); + /** The service account email to be impersonated, if available. */ + getServiceAccountEmail(): string | null; + /** + * Provides a mechanism to inject GCP access tokens directly. + * When the provided credential expires, a new credential, using the + * external account options, is retrieved. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials: Credentials): void; + /** + * Triggered when a external subject token is needed to be exchanged for a GCP + * access token via GCP STS endpoint. + * This abstract method needs to be implemented by subclasses depending on + * the type of external credential used. + * @return A promise that resolves with the external subject token. + */ + abstract retrieveSubjectToken(): Promise; + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + getAccessToken(): Promise; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { authorization: 'Bearer ' } + */ + getRequestHeaders(): Promise; + /** + * Provides a request implementation with OAuth 2.0 flow. In cases of + * HTTP 401 and 403 responses, it automatically asks for a new access token + * and replays the unsuccessful request. + * @param opts Request options. + * @param callback callback. + * @return A promise that resolves with the HTTP response when no callback is + * provided. + */ + request(opts: GaxiosOptions): GaxiosPromise; + request(opts: GaxiosOptions, callback: BodyResponseCallback): void; + /** + * @return A promise that resolves with the project ID corresponding to the + * current workload identity pool or current workforce pool if + * determinable. For workforce pool credential, it returns the project ID + * corresponding to the workforcePoolUserProject. + * This is introduced to match the current pattern of using the Auth + * library: + * const projectId = await auth.getProjectId(); + * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; + * const res = await client.request({ url }); + * The resource may not have permission + * (resourcemanager.projects.get) to call this API or the required + * scopes may not be selected: + * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes + */ + getProjectId(): Promise; + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + protected requestAsync(opts: GaxiosOptions, reAuthRetried?: boolean): Promise>; + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * External credentials are exchanged for GCP access tokens via the token + * exchange endpoint and other settings provided in the client options + * object. + * If the service_account_impersonation_url is provided, an additional + * step to exchange the external account GCP access token for a service + * account impersonated token is performed. + * @return A promise that resolves with the fresh GCP access tokens. + */ + protected refreshAccessTokenAsync(): Promise; + /** + * Returns the workload identity pool project number if it is determinable + * from the audience resource name. + * @param audience The STS audience used to determine the project number. + * @return The project number associated with the workload identity pool, if + * this can be determined from the STS audience field. Otherwise, null is + * returned. + */ + private getProjectNumber; + /** + * Exchanges an external account GCP access token for a service + * account impersonated access token using iamcredentials + * GenerateAccessToken API. + * @param token The access token to exchange for a service account access + * token. + * @return A promise that resolves with the service account impersonated + * credentials response. + */ + private getImpersonatedAccessToken; + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param accessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + private isExpired; + /** + * @return The list of scopes for the requested GCP access token. + */ + private getScopesArray; + private getMetricsHeaderValue; + protected getTokenUrl(): string; +} +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.js new file mode 100644 index 0000000000000000000000000000000000000000..fcfe79a768dbd0ff794af856def3b6e0ccdae748 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/baseexternalclient.js @@ -0,0 +1,475 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BaseExternalAccountClient = exports.CLOUD_RESOURCE_MANAGER = exports.EXTERNAL_ACCOUNT_TYPE = exports.EXPIRATION_TIME_OFFSET = void 0; +const gaxios_1 = require("gaxios"); +const stream = require("stream"); +const authclient_1 = require("./authclient"); +const sts = require("./stscredentials"); +const util_1 = require("../util"); +const shared_cjs_1 = require("../shared.cjs"); +/** + * The required token exchange grant_type: rfc8693#section-2.1 + */ +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; +/** + * The requested token exchange requested_token_type: rfc8693#section-2.1 + */ +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** The default OAuth scope to request when none is provided. */ +const DEFAULT_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; +/** Default impersonated token lifespan in seconds.*/ +const DEFAULT_TOKEN_LIFESPAN = 3600; +/** + * Offset to take into account network delays and server clock skews. + */ +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; +/** + * The credentials JSON file type for external account clients. + * There are 3 types of JSON configs: + * 1. authorized_user => Google end user credential + * 2. service_account => Google service account credential + * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) + */ +exports.EXTERNAL_ACCOUNT_TYPE = 'external_account'; +/** + * Cloud resource manager URL used to retrieve project information. + * + * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead + **/ +exports.CLOUD_RESOURCE_MANAGER = 'https://cloudresourcemanager.googleapis.com/v1/projects/'; +/** The workforce audience pattern. */ +const WORKFORCE_AUDIENCE_PATTERN = '//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token'; +/** + * Base external account client. This is used to instantiate AuthClients for + * exchanging external account credentials for GCP access token and authorizing + * requests to GCP APIs. + * The base class implements common logic for exchanging various type of + * external credentials for GCP access token. The logic of determining and + * retrieving the external credential based on the environment and + * credential_source will be left for the subclasses. + */ +class BaseExternalAccountClient extends authclient_1.AuthClient { + /** + * OAuth scopes for the GCP access token to use. When not provided, + * the default https://www.googleapis.com/auth/cloud-platform is + * used. + */ + scopes; + projectNumber; + audience; + subjectTokenType; + stsCredential; + clientAuth; + credentialSourceType; + cachedAccessToken; + serviceAccountImpersonationUrl; + serviceAccountImpersonationLifetime; + workforcePoolUserProject; + configLifetimeRequested; + tokenUrl; + /** + * @example + * ```ts + * new URL('https://cloudresourcemanager.googleapis.com/v1/projects/'); + * ``` + */ + cloudResourceManagerURL; + supplierContext; + /** + * A pending access token request. Used for concurrent calls. + */ + #pendingAccessToken = null; + /** + * Instantiate a BaseExternalAccountClient instance using the provided JSON + * object loaded from an external account credentials file. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + */ + constructor(options) { + super(options); + const opts = (0, util_1.originalOrCamelOptions)(options); + const type = opts.get('type'); + if (type && type !== exports.EXTERNAL_ACCOUNT_TYPE) { + throw new Error(`Expected "${exports.EXTERNAL_ACCOUNT_TYPE}" type but ` + + `received "${options.type}"`); + } + const clientId = opts.get('client_id'); + const clientSecret = opts.get('client_secret'); + this.tokenUrl = + opts.get('token_url') ?? + DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain); + const subjectTokenType = opts.get('subject_token_type'); + const workforcePoolUserProject = opts.get('workforce_pool_user_project'); + const serviceAccountImpersonationUrl = opts.get('service_account_impersonation_url'); + const serviceAccountImpersonation = opts.get('service_account_impersonation'); + const serviceAccountImpersonationLifetime = (0, util_1.originalOrCamelOptions)(serviceAccountImpersonation).get('token_lifetime_seconds'); + this.cloudResourceManagerURL = new URL(opts.get('cloud_resource_manager_url') || + `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`); + if (clientId) { + this.clientAuth = { + confidentialClientType: 'basic', + clientId, + clientSecret, + }; + } + this.stsCredential = new sts.StsCredentials({ + tokenExchangeEndpoint: this.tokenUrl, + clientAuthentication: this.clientAuth, + }); + this.scopes = opts.get('scopes') || [DEFAULT_OAUTH_SCOPE]; + this.cachedAccessToken = null; + this.audience = opts.get('audience'); + this.subjectTokenType = subjectTokenType; + this.workforcePoolUserProject = workforcePoolUserProject; + const workforceAudiencePattern = new RegExp(WORKFORCE_AUDIENCE_PATTERN); + if (this.workforcePoolUserProject && + !this.audience.match(workforceAudiencePattern)) { + throw new Error('workforcePoolUserProject should not be set for non-workforce pool ' + + 'credentials.'); + } + this.serviceAccountImpersonationUrl = serviceAccountImpersonationUrl; + this.serviceAccountImpersonationLifetime = + serviceAccountImpersonationLifetime; + if (this.serviceAccountImpersonationLifetime) { + this.configLifetimeRequested = true; + } + else { + this.configLifetimeRequested = false; + this.serviceAccountImpersonationLifetime = DEFAULT_TOKEN_LIFESPAN; + } + this.projectNumber = this.getProjectNumber(this.audience); + this.supplierContext = { + audience: this.audience, + subjectTokenType: this.subjectTokenType, + transporter: this.transporter, + }; + } + /** The service account email to be impersonated, if available. */ + getServiceAccountEmail() { + if (this.serviceAccountImpersonationUrl) { + if (this.serviceAccountImpersonationUrl.length > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/84} + **/ + throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); + } + // Parse email from URL. The formal looks as follows: + // https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/name@project-id.iam.gserviceaccount.com:generateAccessToken + const re = /serviceAccounts\/(?[^:]+):generateAccessToken$/; + const result = re.exec(this.serviceAccountImpersonationUrl); + return result?.groups?.email || null; + } + return null; + } + /** + * Provides a mechanism to inject GCP access tokens directly. + * When the provided credential expires, a new credential, using the + * external account options, is retrieved. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + super.setCredentials(credentials); + this.cachedAccessToken = credentials; + } + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; + } + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { authorization: 'Bearer ' } + */ + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = new Headers({ + authorization: `Bearer ${accessTokenResponse.token}`, + }); + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + /** + * @return A promise that resolves with the project ID corresponding to the + * current workload identity pool or current workforce pool if + * determinable. For workforce pool credential, it returns the project ID + * corresponding to the workforcePoolUserProject. + * This is introduced to match the current pattern of using the Auth + * library: + * const projectId = await auth.getProjectId(); + * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; + * const res = await client.request({ url }); + * The resource may not have permission + * (resourcemanager.projects.get) to call this API or the required + * scopes may not be selected: + * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes + */ + async getProjectId() { + const projectNumber = this.projectNumber || this.workforcePoolUserProject; + if (this.projectId) { + // Return previously determined project ID. + return this.projectId; + } + else if (projectNumber) { + // Preferable not to use request() to avoid retrial policies. + const headers = await this.getRequestHeaders(); + const opts = { + ...BaseExternalAccountClient.RETRY_CONFIG, + headers, + url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`, + }; + authclient_1.AuthClient.setMethodName(opts, 'getProjectId'); + const response = await this.transporter.request(opts); + this.projectId = response.data.projectId; + return this.projectId; + } + return null; + } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + this.addUserProjectAndAuthHeaders(opts.headers, requestHeaders); + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; + } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * External credentials are exchanged for GCP access tokens via the token + * exchange endpoint and other settings provided in the client options + * object. + * If the service_account_impersonation_url is provided, an additional + * step to exchange the external account GCP access token for a service + * account impersonated token is performed. + * @return A promise that resolves with the fresh GCP access tokens. + */ + async refreshAccessTokenAsync() { + // Use an existing access token request, or cache a new one + this.#pendingAccessToken = + this.#pendingAccessToken || this.#internalRefreshAccessTokenAsync(); + try { + return await this.#pendingAccessToken; + } + finally { + // clear pending access token for future requests + this.#pendingAccessToken = null; + } + } + async #internalRefreshAccessTokenAsync() { + // Retrieve the external credential. + const subjectToken = await this.retrieveSubjectToken(); + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + audience: this.audience, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken, + subjectTokenType: this.subjectTokenType, + // generateAccessToken requires the provided access token to have + // scopes: + // https://www.googleapis.com/auth/iam or + // https://www.googleapis.com/auth/cloud-platform + // The new service account access token scopes will match the user + // provided ones. + scope: this.serviceAccountImpersonationUrl + ? [DEFAULT_OAUTH_SCOPE] + : this.getScopesArray(), + }; + // Exchange the external credentials for a GCP access token. + // Client auth is prioritized over passing the workforcePoolUserProject + // parameter for STS token exchange. + const additionalOptions = !this.clientAuth && this.workforcePoolUserProject + ? { userProject: this.workforcePoolUserProject } + : undefined; + const additionalHeaders = new Headers({ + 'x-goog-api-client': this.getMetricsHeaderValue(), + }); + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, additionalHeaders, additionalOptions); + if (this.serviceAccountImpersonationUrl) { + this.cachedAccessToken = await this.getImpersonatedAccessToken(stsResponse.access_token); + } + else if (stsResponse.expires_in) { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: new Date().getTime() + stsResponse.expires_in * 1000, + res: stsResponse.res, + }; + } + else { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + res: stsResponse.res, + }; + } + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedAccessToken.expiry_date, + access_token: this.cachedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedAccessToken; + } + /** + * Returns the workload identity pool project number if it is determinable + * from the audience resource name. + * @param audience The STS audience used to determine the project number. + * @return The project number associated with the workload identity pool, if + * this can be determined from the STS audience field. Otherwise, null is + * returned. + */ + getProjectNumber(audience) { + // STS audience pattern: + // //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/... + const match = audience.match(/\/projects\/([^/]+)/); + if (!match) { + return null; + } + return match[1]; + } + /** + * Exchanges an external account GCP access token for a service + * account impersonated access token using iamcredentials + * GenerateAccessToken API. + * @param token The access token to exchange for a service account access + * token. + * @return A promise that resolves with the service account impersonated + * credentials response. + */ + async getImpersonatedAccessToken(token) { + const opts = { + ...BaseExternalAccountClient.RETRY_CONFIG, + url: this.serviceAccountImpersonationUrl, + method: 'POST', + headers: { + 'content-type': 'application/json', + authorization: `Bearer ${token}`, + }, + data: { + scope: this.getScopesArray(), + lifetime: this.serviceAccountImpersonationLifetime + 's', + }, + }; + authclient_1.AuthClient.setMethodName(opts, 'getImpersonatedAccessToken'); + const response = await this.transporter.request(opts); + const successResponse = response.data; + return { + access_token: successResponse.accessToken, + // Convert from ISO format to timestamp. + expiry_date: new Date(successResponse.expireTime).getTime(), + res: response, + }; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param accessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(accessToken) { + const now = new Date().getTime(); + return accessToken.expiry_date + ? now >= accessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; + } + /** + * @return The list of scopes for the requested GCP access token. + */ + getScopesArray() { + // Since scopes can be provided as string or array, the type should + // be normalized. + if (typeof this.scopes === 'string') { + return [this.scopes]; + } + return this.scopes || [DEFAULT_OAUTH_SCOPE]; + } + getMetricsHeaderValue() { + const nodeVersion = process.version.replace(/^v/, ''); + const saImpersonation = this.serviceAccountImpersonationUrl !== undefined; + const credentialSourceType = this.credentialSourceType + ? this.credentialSourceType + : 'unknown'; + return `gl-node/${nodeVersion} auth/${shared_cjs_1.pkg.version} google-byoid-sdk source/${credentialSourceType} sa-impersonation/${saImpersonation} config-lifetime/${this.configLifetimeRequested}`; + } + getTokenUrl() { + return this.tokenUrl; + } +} +exports.BaseExternalAccountClient = BaseExternalAccountClient; +//# sourceMappingURL=baseexternalclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2f01ae17453640709223bab1fc080a73353b980 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.d.ts @@ -0,0 +1,60 @@ +import { SubjectTokenSupplier } from './identitypoolclient'; +import * as https from 'https'; +export declare const CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG"; +/** + * Thrown when the certificate source cannot be located or accessed. + */ +export declare class CertificateSourceUnavailableError extends Error { + constructor(message: string); +} +/** + * Thrown for invalid configuration that is not related to file availability. + */ +export declare class InvalidConfigurationError extends Error { + constructor(message: string); +} +/** + * Defines options for creating a {@link CertificateSubjectTokenSupplier}. + */ +export interface CertificateSubjectTokenSupplierOptions { + /** + * If true, uses the default well-known location for the certificate config. + * Either this or `certificateConfigLocation` must be provided. + */ + useDefaultCertificateConfig?: boolean; + /** + * The file path to the certificate configuration JSON file. + * Required if `useDefaultCertificateConfig` is not true. + */ + certificateConfigLocation?: string; + /** + * The file path to the trust chain (PEM format). + */ + trustChainPath?: string; +} +/** + * A subject token supplier that uses a client certificate for authentication. + * It provides the certificate chain as the subject token for identity federation. + */ +export declare class CertificateSubjectTokenSupplier implements SubjectTokenSupplier { + #private; + private certificateConfigPath; + private readonly trustChainPath?; + private cert?; + private key?; + /** + * Initializes a new instance of the CertificateSubjectTokenSupplier. + * @param opts The configuration options for the supplier. + */ + constructor(opts: CertificateSubjectTokenSupplierOptions); + /** + * Creates an HTTPS agent configured with the client certificate and private key for mTLS. + * @returns An mTLS-configured https.Agent. + */ + createMtlsHttpsAgent(): Promise; + /** + * Constructs the subject token, which is the base64-encoded certificate chain. + * @returns A promise that resolves with the subject token. + */ + getSubjectToken(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.js new file mode 100644 index 0000000000000000000000000000000000000000..4de6cca82e11bb1a0e26d07000cdab59b6cf34a5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.js @@ -0,0 +1,223 @@ +"use strict"; +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CertificateSubjectTokenSupplier = exports.InvalidConfigurationError = exports.CertificateSourceUnavailableError = exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0; +const util_1 = require("../util"); +const fs = require("fs"); +const crypto_1 = require("crypto"); +const https = require("https"); +exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = 'GOOGLE_API_CERTIFICATE_CONFIG'; +/** + * Thrown when the certificate source cannot be located or accessed. + */ +class CertificateSourceUnavailableError extends Error { + constructor(message) { + super(message); + this.name = 'CertificateSourceUnavailableError'; + } +} +exports.CertificateSourceUnavailableError = CertificateSourceUnavailableError; +/** + * Thrown for invalid configuration that is not related to file availability. + */ +class InvalidConfigurationError extends Error { + constructor(message) { + super(message); + this.name = 'InvalidConfigurationError'; + } +} +exports.InvalidConfigurationError = InvalidConfigurationError; +/** + * A subject token supplier that uses a client certificate for authentication. + * It provides the certificate chain as the subject token for identity federation. + */ +class CertificateSubjectTokenSupplier { + certificateConfigPath; + trustChainPath; + cert; + key; + /** + * Initializes a new instance of the CertificateSubjectTokenSupplier. + * @param opts The configuration options for the supplier. + */ + constructor(opts) { + if (!opts.useDefaultCertificateConfig && !opts.certificateConfigLocation) { + throw new InvalidConfigurationError('Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.'); + } + if (opts.useDefaultCertificateConfig && opts.certificateConfigLocation) { + throw new InvalidConfigurationError('Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.'); + } + this.trustChainPath = opts.trustChainPath; + this.certificateConfigPath = opts.certificateConfigLocation ?? ''; + } + /** + * Creates an HTTPS agent configured with the client certificate and private key for mTLS. + * @returns An mTLS-configured https.Agent. + */ + async createMtlsHttpsAgent() { + if (!this.key || !this.cert) { + throw new InvalidConfigurationError('Cannot create mTLS Agent with missing certificate or key'); + } + return new https.Agent({ key: this.key, cert: this.cert }); + } + /** + * Constructs the subject token, which is the base64-encoded certificate chain. + * @returns A promise that resolves with the subject token. + */ + async getSubjectToken() { + // The "subject token" in this context is the processed certificate chain. + this.certificateConfigPath = await this.#resolveCertificateConfigFilePath(); + const { certPath, keyPath } = await this.#getCertAndKeyPaths(); + ({ cert: this.cert, key: this.key } = await this.#getKeyAndCert(certPath, keyPath)); + return await this.#processChainFromPaths(this.cert); + } + /** + * Resolves the absolute path to the certificate configuration file + * by checking the "certificate_config_location" provided in the ADC file, + * or the "GOOGLE_API_CERTIFICATE_CONFIG" environment variable + * or in the default gcloud path. + * @param overridePath An optional path to check first. + * @returns The resolved file path. + */ + async #resolveCertificateConfigFilePath() { + // 1. Check for the override path from constructor options. + const overridePath = this.certificateConfigPath; + if (overridePath) { + if (await (0, util_1.isValidFile)(overridePath)) { + return overridePath; + } + throw new CertificateSourceUnavailableError(`Provided certificate config path is invalid: ${overridePath}`); + } + // 2. Check the standard environment variable. + const envPath = process.env[exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE]; + if (envPath) { + if (await (0, util_1.isValidFile)(envPath)) { + return envPath; + } + throw new CertificateSourceUnavailableError(`Path from environment variable "${exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${envPath}`); + } + // 3. Check the well-known gcloud config location. + const wellKnownPath = (0, util_1.getWellKnownCertificateConfigFileLocation)(); + if (await (0, util_1.isValidFile)(wellKnownPath)) { + return wellKnownPath; + } + // 4. If none are found, throw an error. + throw new CertificateSourceUnavailableError('Could not find certificate configuration file. Searched override path, ' + + `the "${exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${wellKnownPath}).`); + } + /** + * Reads and parses the certificate config JSON file to extract the certificate and key paths. + * @returns An object containing the certificate and key paths. + */ + async #getCertAndKeyPaths() { + const configPath = this.certificateConfigPath; + let fileContents; + try { + fileContents = await fs.promises.readFile(configPath, 'utf8'); + } + catch (err) { + throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`); + } + try { + const config = JSON.parse(fileContents); + const certPath = config?.cert_configs?.workload?.cert_path; + const keyPath = config?.cert_configs?.workload?.key_path; + if (!certPath || !keyPath) { + throw new InvalidConfigurationError(`Certificate config file (${configPath}) is missing required "cert_path" or "key_path" in the workload config.`); + } + return { certPath, keyPath }; + } + catch (e) { + if (e instanceof InvalidConfigurationError) + throw e; + throw new InvalidConfigurationError(`Failed to parse certificate config from ${configPath}: ${e.message}`); + } + } + /** + * Reads and parses the cert and key files get their content and check valid format. + * @returns An object containing the cert content and key content in buffer format. + */ + async #getKeyAndCert(certPath, keyPath) { + let cert, key; + try { + cert = await fs.promises.readFile(certPath); + new crypto_1.X509Certificate(cert); + } + catch (err) { + const message = err instanceof Error ? err.message : String(err); + throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${message}`); + } + try { + key = await fs.promises.readFile(keyPath); + (0, crypto_1.createPrivateKey)(key); + } + catch (err) { + const message = err instanceof Error ? err.message : String(err); + throw new CertificateSourceUnavailableError(`Failed to read private key file at ${keyPath}: ${message}`); + } + return { cert, key }; + } + /** + * Reads the leaf certificate and trust chain, combines them, + * and returns a JSON array of base64-encoded certificates. + * @returns A stringified JSON array of the certificate chain. + */ + async #processChainFromPaths(leafCertBuffer) { + const leafCert = new crypto_1.X509Certificate(leafCertBuffer); + // If no trust chain is provided, just use the successfully parsed leaf certificate. + if (!this.trustChainPath) { + return JSON.stringify([leafCert.raw.toString('base64')]); + } + // Handle the trust chain logic. + try { + const chainPems = await fs.promises.readFile(this.trustChainPath, 'utf8'); + const pemBlocks = chainPems.match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? []; + const chainCerts = pemBlocks.map((pem, index) => { + try { + return new crypto_1.X509Certificate(pem); + } + catch (err) { + const message = err instanceof Error ? err.message : String(err); + // Throw a more precise error if a single certificate in the chain is invalid. + throw new InvalidConfigurationError(`Failed to parse certificate at index ${index} in trust chain file ${this.trustChainPath}: ${message}`); + } + }); + const leafIndex = chainCerts.findIndex(chainCert => leafCert.raw.equals(chainCert.raw)); + let finalChain; + if (leafIndex === -1) { + // Leaf not found, so prepend it to the chain. + finalChain = [leafCert, ...chainCerts]; + } + else if (leafIndex === 0) { + // Leaf is already the first element, so the chain is correctly ordered. + finalChain = chainCerts; + } + else { + // Leaf is in the chain but not at the top, which is invalid. + throw new InvalidConfigurationError(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${leafIndex}).`); + } + return JSON.stringify(finalChain.map(cert => cert.raw.toString('base64'))); + } + catch (err) { + // Re-throw our specific configuration errors. + if (err instanceof InvalidConfigurationError) + throw err; + const message = err instanceof Error ? err.message : String(err); + throw new CertificateSourceUnavailableError(`Failed to process certificate chain from ${this.trustChainPath}: ${message}`); + } + } +} +exports.CertificateSubjectTokenSupplier = CertificateSubjectTokenSupplier; +//# sourceMappingURL=certificatesubjecttokensupplier.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..23e9a9a08b2172b8f62d515c5061034e87463ae9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.d.ts @@ -0,0 +1,37 @@ +import { GaxiosError } from 'gaxios'; +import { GetTokenResponse, OAuth2Client, OAuth2ClientOptions } from './oauth2client'; +export interface ComputeOptions extends OAuth2ClientOptions { + /** + * The service account email to use, or 'default'. A Compute Engine instance + * may have multiple service accounts. + */ + serviceAccountEmail?: string; + /** + * The scopes that will be requested when acquiring service account + * credentials. Only applicable to modern App Engine and Cloud Function + * runtimes as of March 2019. + */ + scopes?: string | string[]; +} +export declare class Compute extends OAuth2Client { + readonly serviceAccountEmail: string; + scopes: string[]; + /** + * Google Compute Engine service account credentials. + * + * Retrieve access token from the metadata server. + * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications + */ + constructor(options?: ComputeOptions); + /** + * Refreshes the access token. + * @param refreshToken Unused parameter + */ + protected refreshTokenNoCache(): Promise; + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + fetchIdToken(targetAudience: string): Promise; + protected wrapError(e: GaxiosError): void; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.js new file mode 100644 index 0000000000000000000000000000000000000000..34ef9d00015dce981eb9b2bb3ce7b9d7614d8da1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/computeclient.js @@ -0,0 +1,118 @@ +"use strict"; +// Copyright 2013 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Compute = void 0; +const gaxios_1 = require("gaxios"); +const gcpMetadata = require("gcp-metadata"); +const oauth2client_1 = require("./oauth2client"); +class Compute extends oauth2client_1.OAuth2Client { + serviceAccountEmail; + scopes; + /** + * Google Compute Engine service account credentials. + * + * Retrieve access token from the metadata server. + * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications + */ + constructor(options = {}) { + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' }; + this.serviceAccountEmail = options.serviceAccountEmail || 'default'; + this.scopes = Array.isArray(options.scopes) + ? options.scopes + : options.scopes + ? [options.scopes] + : []; + } + /** + * Refreshes the access token. + * @param refreshToken Unused parameter + */ + async refreshTokenNoCache() { + const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`; + let data; + try { + const instanceOptions = { + property: tokenPath, + }; + if (this.scopes.length > 0) { + instanceOptions.params = { + scopes: this.scopes.join(','), + }; + } + data = await gcpMetadata.instance(instanceOptions); + } + catch (e) { + if (e instanceof gaxios_1.GaxiosError) { + e.message = `Could not refresh access token: ${e.message}`; + this.wrapError(e); + } + throw e; + } + const tokens = data; + if (data && data.expires_in) { + tokens.expiry_date = new Date().getTime() + data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res: null }; + } + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + async fetchIdToken(targetAudience) { + const idTokenPath = `service-accounts/${this.serviceAccountEmail}/identity` + + `?format=full&audience=${targetAudience}`; + let idToken; + try { + const instanceOptions = { + property: idTokenPath, + }; + idToken = await gcpMetadata.instance(instanceOptions); + } + catch (e) { + if (e instanceof Error) { + e.message = `Could not fetch ID token: ${e.message}`; + } + throw e; + } + return idToken; + } + wrapError(e) { + const res = e.response; + if (res && res.status) { + e.status = res.status; + if (res.status === 403) { + e.message = + 'A Forbidden error was returned while attempting to retrieve an access ' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have the correct permission scopes specified: ' + + e.message; + } + else if (res.status === 404) { + e.message = + 'A Not Found error was returned while attempting to retrieve an access' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have any permission scopes specified: ' + + e.message; + } + } + } +} +exports.Compute = Compute; +//# sourceMappingURL=computeclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..896b014ccb8d6c6b54b13f6b3da2b019a7b74c1c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.d.ts @@ -0,0 +1,75 @@ +export interface Credentials { + /** + * This field is only present if the access_type parameter was set to offline in the authentication request. For details, see Refresh tokens. + */ + refresh_token?: string | null; + /** + * The time in ms at which this token is thought to expire. + */ + expiry_date?: number | null; + /** + * A token that can be sent to a Google API. + */ + access_token?: string | null; + /** + * Identifies the type of token returned. At this time, this field always has the value Bearer. + */ + token_type?: string | null; + /** + * A JWT that contains identity information about the user that is digitally signed by Google. + */ + id_token?: string | null; + /** + * The scopes of access granted by the access_token expressed as a list of space-delimited, case-sensitive strings. + */ + scope?: string; +} +export interface CredentialRequest { + /** + * This field is only present if the access_type parameter was set to offline in the authentication request. For details, see Refresh tokens. + */ + refresh_token?: string; + /** + * A token that can be sent to a Google API. + */ + access_token?: string; + /** + * Identifies the type of token returned. At this time, this field always has the value Bearer. + */ + token_type?: string; + /** + * The remaining lifetime of the access token in seconds. + */ + expires_in?: number; + /** + * A JWT that contains identity information about the user that is digitally signed by Google. + */ + id_token?: string; + /** + * The scopes of access granted by the access_token expressed as a list of space-delimited, case-sensitive strings. + */ + scope?: string; +} +export interface JWTInput { + type?: string; + client_email?: string; + private_key?: string; + private_key_id?: string; + project_id?: string; + client_id?: string; + client_secret?: string; + refresh_token?: string; + quota_project_id?: string; + universe_domain?: string; +} +export interface ImpersonatedJWTInput { + type?: string; + source_credentials?: JWTInput; + service_account_impersonation_url?: string; + delegates?: string[]; +} +export interface CredentialBody { + client_email?: string; + private_key?: string; + universe_domain?: string; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.js new file mode 100644 index 0000000000000000000000000000000000000000..5ea0d586fe973398e4cb09c245d6b10dd49d785f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/credentials.js @@ -0,0 +1,16 @@ +"use strict"; +// Copyright 2014 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=credentials.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..62a2fa41464d57aa6850157938c567be5e0fa3e5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.d.ts @@ -0,0 +1,79 @@ +import { ExternalAccountSupplierContext } from './baseexternalclient'; +import { GaxiosOptions } from 'gaxios'; +import { AwsSecurityCredentialsSupplier } from './awsclient'; +import { AwsSecurityCredentials } from './awsrequestsigner'; +/** + * Interface defining the options used to build a {@link DefaultAwsSecurityCredentialsSupplier}. + */ +export interface DefaultAwsSecurityCredentialsSupplierOptions { + /** + * The URL to call to retrieve the active AWS region. + **/ + regionUrl?: string; + /** + * The URL to call to retrieve AWS security credentials. + **/ + securityCredentialsUrl?: string; + /** + ** The URL to call to retrieve the IMDSV2 session token. + **/ + imdsV2SessionTokenUrl?: string; + /** + * Additional Gaxios options to use when making requests to the AWS metadata + * endpoints. + */ + additionalGaxiosOptions?: GaxiosOptions; +} +/** + * Internal AWS security credentials supplier implementation used by {@link AwsClient} + * when a credential source is provided instead of a user defined supplier. + * The logic is summarized as: + * 1. If imdsv2_session_token_url is provided in the credential source, then + * fetch the aws session token and include it in the headers of the + * metadata requests. This is a requirement for IDMSv2 but optional + * for IDMSv1. + * 2. Retrieve AWS region from availability-zone. + * 3a. Check AWS credentials in environment variables. If not found, get + * from security-credentials endpoint. + * 3b. Get AWS credentials from security-credentials endpoint. In order + * to retrieve this, the AWS role needs to be determined by calling + * security-credentials endpoint without any argument. Then the + * credentials can be retrieved via: security-credentials/role_name + * 4. Generate the signed request to AWS STS GetCallerIdentity action. + * 5. Inject x-goog-cloud-target-resource into header and serialize the + * signed request. This will be the subject-token to pass to GCP STS. + */ +export declare class DefaultAwsSecurityCredentialsSupplier implements AwsSecurityCredentialsSupplier { + #private; + private readonly regionUrl?; + private readonly securityCredentialsUrl?; + private readonly imdsV2SessionTokenUrl?; + private readonly additionalGaxiosOptions?; + /** + * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information + * from the credential_source stored in the ADC file. + * @param opts The default aws security credentials supplier options object to + * build the supplier with. + */ + constructor(opts: DefaultAwsSecurityCredentialsSupplierOptions); + /** + * Returns the active AWS region. This first checks to see if the region + * is available as an environment variable. If it is not, then the supplier + * will call the region URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS region string. + */ + getAwsRegion(context: ExternalAccountSupplierContext): Promise; + /** + * Returns AWS security credentials. This first checks to see if the credentials + * is available as environment variables. If it is not, then the supplier + * will call the security credentials URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS security credentials. + */ + getAwsSecurityCredentials(context: ExternalAccountSupplierContext): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.js new file mode 100644 index 0000000000000000000000000000000000000000..374af30cfa87dbc9b38857866718954c13d74be2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.js @@ -0,0 +1,195 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefaultAwsSecurityCredentialsSupplier = void 0; +const authclient_1 = require("./authclient"); +/** + * Internal AWS security credentials supplier implementation used by {@link AwsClient} + * when a credential source is provided instead of a user defined supplier. + * The logic is summarized as: + * 1. If imdsv2_session_token_url is provided in the credential source, then + * fetch the aws session token and include it in the headers of the + * metadata requests. This is a requirement for IDMSv2 but optional + * for IDMSv1. + * 2. Retrieve AWS region from availability-zone. + * 3a. Check AWS credentials in environment variables. If not found, get + * from security-credentials endpoint. + * 3b. Get AWS credentials from security-credentials endpoint. In order + * to retrieve this, the AWS role needs to be determined by calling + * security-credentials endpoint without any argument. Then the + * credentials can be retrieved via: security-credentials/role_name + * 4. Generate the signed request to AWS STS GetCallerIdentity action. + * 5. Inject x-goog-cloud-target-resource into header and serialize the + * signed request. This will be the subject-token to pass to GCP STS. + */ +class DefaultAwsSecurityCredentialsSupplier { + regionUrl; + securityCredentialsUrl; + imdsV2SessionTokenUrl; + additionalGaxiosOptions; + /** + * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information + * from the credential_source stored in the ADC file. + * @param opts The default aws security credentials supplier options object to + * build the supplier with. + */ + constructor(opts) { + this.regionUrl = opts.regionUrl; + this.securityCredentialsUrl = opts.securityCredentialsUrl; + this.imdsV2SessionTokenUrl = opts.imdsV2SessionTokenUrl; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; + } + /** + * Returns the active AWS region. This first checks to see if the region + * is available as an environment variable. If it is not, then the supplier + * will call the region URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS region string. + */ + async getAwsRegion(context) { + // Priority order for region determination: + // AWS_REGION > AWS_DEFAULT_REGION > metadata server. + if (this.#regionFromEnv) { + return this.#regionFromEnv; + } + const metadataHeaders = new Headers(); + if (!this.#regionFromEnv && this.imdsV2SessionTokenUrl) { + metadataHeaders.set('x-aws-ec2-metadata-token', await this.#getImdsV2SessionToken(context.transporter)); + } + if (!this.regionUrl) { + throw new RangeError('Unable to determine AWS region due to missing ' + + '"options.credential_source.region_url"'); + } + const opts = { + ...this.additionalGaxiosOptions, + url: this.regionUrl, + method: 'GET', + headers: metadataHeaders, + }; + authclient_1.AuthClient.setMethodName(opts, 'getAwsRegion'); + const response = await context.transporter.request(opts); + // Remove last character. For example, if us-east-2b is returned, + // the region would be us-east-2. + return response.data.substr(0, response.data.length - 1); + } + /** + * Returns AWS security credentials. This first checks to see if the credentials + * is available as environment variables. If it is not, then the supplier + * will call the security credentials URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS security credentials. + */ + async getAwsSecurityCredentials(context) { + // Check environment variables for permanent credentials first. + // https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html + if (this.#securityCredentialsFromEnv) { + return this.#securityCredentialsFromEnv; + } + const metadataHeaders = new Headers(); + if (this.imdsV2SessionTokenUrl) { + metadataHeaders.set('x-aws-ec2-metadata-token', await this.#getImdsV2SessionToken(context.transporter)); + } + // Since the role on a VM can change, we don't need to cache it. + const roleName = await this.#getAwsRoleName(metadataHeaders, context.transporter); + // Temporary credentials typically last for several hours. + // Expiration is returned in response. + // Consider future optimization of this logic to cache AWS tokens + // until their natural expiration. + const awsCreds = await this.#retrieveAwsSecurityCredentials(roleName, metadataHeaders, context.transporter); + return { + accessKeyId: awsCreds.AccessKeyId, + secretAccessKey: awsCreds.SecretAccessKey, + token: awsCreds.Token, + }; + } + /** + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the IMDSv2 Session Token. + */ + async #getImdsV2SessionToken(transporter) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.imdsV2SessionTokenUrl, + method: 'PUT', + headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '300' }, + }; + authclient_1.AuthClient.setMethodName(opts, '#getImdsV2SessionToken'); + const response = await transporter.request(opts); + return response.data; + } + /** + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the assigned role to the current + * AWS VM. This is needed for calling the security-credentials endpoint. + */ + async #getAwsRoleName(headers, transporter) { + if (!this.securityCredentialsUrl) { + throw new Error('Unable to determine AWS role name due to missing ' + + '"options.credential_source.url"'); + } + const opts = { + ...this.additionalGaxiosOptions, + url: this.securityCredentialsUrl, + method: 'GET', + headers: headers, + }; + authclient_1.AuthClient.setMethodName(opts, '#getAwsRoleName'); + const response = await transporter.request(opts); + return response.data; + } + /** + * Retrieves the temporary AWS credentials by calling the security-credentials + * endpoint as specified in the `credential_source` object. + * @param roleName The role attached to the current VM. + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the temporary AWS credentials + * needed for creating the GetCallerIdentity signed request. + */ + async #retrieveAwsSecurityCredentials(roleName, headers, transporter) { + const opts = { + ...this.additionalGaxiosOptions, + url: `${this.securityCredentialsUrl}/${roleName}`, + headers: headers, + }; + authclient_1.AuthClient.setMethodName(opts, '#retrieveAwsSecurityCredentials'); + const response = await transporter.request(opts); + return response.data; + } + get #regionFromEnv() { + // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. + // Only one is required. + return (process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || null); + } + get #securityCredentialsFromEnv() { + // Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required. + if (process.env['AWS_ACCESS_KEY_ID'] && + process.env['AWS_SECRET_ACCESS_KEY']) { + return { + accessKeyId: process.env['AWS_ACCESS_KEY_ID'], + secretAccessKey: process.env['AWS_SECRET_ACCESS_KEY'], + token: process.env['AWS_SESSION_TOKEN'], + }; + } + return null; + } +} +exports.DefaultAwsSecurityCredentialsSupplier = DefaultAwsSecurityCredentialsSupplier; +//# sourceMappingURL=defaultawssecuritycredentialssupplier.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff1b5e2bfab128b9506154ec7a818123762f9768 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.d.ts @@ -0,0 +1,149 @@ +import { GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; +import { Credentials } from './credentials'; +import { AuthClient, AuthClientOptions, GetAccessTokenResponse, BodyResponseCallback } from './authclient'; +/** + * The maximum number of access boundary rules a Credential Access Boundary + * can contain. + */ +export declare const MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; +/** + * Offset to take into account network delays and server clock skews. + */ +export declare const EXPIRATION_TIME_OFFSET: number; +/** + * Internal interface for tracking the access token expiration time. + */ +interface CredentialsWithResponse extends Credentials { + res?: GaxiosResponse | null; +} +/** + * Internal interface for tracking and returning the Downscoped access token + * expiration time in epoch time (seconds). + */ +interface DownscopedAccessTokenResponse extends GetAccessTokenResponse { + expirationTime?: number | null; +} +/** + * Defines an upper bound of permissions available for a GCP credential. + */ +export interface CredentialAccessBoundary { + accessBoundary: { + accessBoundaryRules: AccessBoundaryRule[]; + }; +} +/** Defines an upper bound of permissions on a particular resource. */ +interface AccessBoundaryRule { + availablePermissions: string[]; + availableResource: string; + availabilityCondition?: AvailabilityCondition; +} +/** + * An optional condition that can be used as part of a + * CredentialAccessBoundary to further restrict permissions. + */ +interface AvailabilityCondition { + expression: string; + title?: string; + description?: string; +} +export interface DownscopedClientOptions extends AuthClientOptions { + /** + * The source AuthClient to be downscoped based on the provided Credential Access Boundary rules. + */ + authClient: AuthClient; + /** + * The Credential Access Boundary which contains a list of access boundary rules. + * Each rule contains information on the resource that the rule applies to, the upper bound of the + * permissions that are available on that resource and an optional + * condition to further restrict permissions. + */ + credentialAccessBoundary: CredentialAccessBoundary; +} +/** + * Defines a set of Google credentials that are downscoped from an existing set + * of Google OAuth2 credentials. This is useful to restrict the Identity and + * Access Management (IAM) permissions that a short-lived credential can use. + * The common pattern of usage is to have a token broker with elevated access + * generate these downscoped credentials from higher access source credentials + * and pass the downscoped short-lived access tokens to a token consumer via + * some secure authenticated channel for limited access to Google Cloud Storage + * resources. + */ +export declare class DownscopedClient extends AuthClient { + private readonly authClient; + private readonly credentialAccessBoundary; + private cachedDownscopedAccessToken; + private readonly stsCredential; + /** + * Instantiates a downscoped client object using the provided source + * AuthClient and credential access boundary rules. + * To downscope permissions of a source AuthClient, a Credential Access + * Boundary that specifies which resources the new credential can access, as + * well as an upper bound on the permissions that are available on each + * resource, has to be defined. A downscoped client can then be instantiated + * using the source AuthClient and the Credential Access Boundary. + * @param options the {@link DownscopedClientOptions `DownscopedClientOptions`} to use. Passing an `AuthClient` directly is **@DEPRECATED**. + * @param credentialAccessBoundary **@DEPRECATED**. Provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead. + */ + constructor( + /** + * AuthClient is for backwards-compatibility. + */ + options: AuthClient | DownscopedClientOptions, + /** + * @deprecated - provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead + */ + credentialAccessBoundary?: CredentialAccessBoundary); + /** + * Provides a mechanism to inject Downscoped access tokens directly. + * The expiry_date field is required to facilitate determination of the token + * expiration which would make it easier for the token consumer to handle. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials: Credentials): void; + getAccessToken(): Promise; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { authorization: 'Bearer ' } + */ + getRequestHeaders(): Promise; + /** + * Provides a request implementation with OAuth 2.0 flow. In cases of + * HTTP 401 and 403 responses, it automatically asks for a new access token + * and replays the unsuccessful request. + * @param opts Request options. + * @param callback callback. + * @return A promise that resolves with the HTTP response when no callback + * is provided. + */ + request(opts: GaxiosOptions): GaxiosPromise; + request(opts: GaxiosOptions, callback: BodyResponseCallback): void; + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure + * @return A promise that resolves with the successful response. + */ + protected requestAsync(opts: GaxiosOptions, reAuthRetried?: boolean): Promise>; + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * GCP access tokens are retrieved from authclient object/source credential. + * Then GCP access tokens are exchanged for downscoped access tokens via the + * token exchange endpoint. + * @return A promise that resolves with the fresh downscoped access token. + */ + protected refreshAccessTokenAsync(): Promise; + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param downscopedAccessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + private isExpired; +} +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.js new file mode 100644 index 0000000000000000000000000000000000000000..43140f0f9bb88eedf80d4338f066e7213bade540 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/downscopedclient.js @@ -0,0 +1,273 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DownscopedClient = exports.EXPIRATION_TIME_OFFSET = exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; +const gaxios_1 = require("gaxios"); +const stream = require("stream"); +const authclient_1 = require("./authclient"); +const sts = require("./stscredentials"); +/** + * The required token exchange grant_type: rfc8693#section-2.1 + */ +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; +/** + * The requested token exchange requested_token_type: rfc8693#section-2.1 + */ +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** + * The requested token exchange subject_token_type: rfc8693#section-2.1 + */ +const STS_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** + * The maximum number of access boundary rules a Credential Access Boundary + * can contain. + */ +exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; +/** + * Offset to take into account network delays and server clock skews. + */ +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; +/** + * Defines a set of Google credentials that are downscoped from an existing set + * of Google OAuth2 credentials. This is useful to restrict the Identity and + * Access Management (IAM) permissions that a short-lived credential can use. + * The common pattern of usage is to have a token broker with elevated access + * generate these downscoped credentials from higher access source credentials + * and pass the downscoped short-lived access tokens to a token consumer via + * some secure authenticated channel for limited access to Google Cloud Storage + * resources. + */ +class DownscopedClient extends authclient_1.AuthClient { + authClient; + credentialAccessBoundary; + cachedDownscopedAccessToken; + stsCredential; + /** + * Instantiates a downscoped client object using the provided source + * AuthClient and credential access boundary rules. + * To downscope permissions of a source AuthClient, a Credential Access + * Boundary that specifies which resources the new credential can access, as + * well as an upper bound on the permissions that are available on each + * resource, has to be defined. A downscoped client can then be instantiated + * using the source AuthClient and the Credential Access Boundary. + * @param options the {@link DownscopedClientOptions `DownscopedClientOptions`} to use. Passing an `AuthClient` directly is **@DEPRECATED**. + * @param credentialAccessBoundary **@DEPRECATED**. Provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead. + */ + constructor( + /** + * AuthClient is for backwards-compatibility. + */ + options, + /** + * @deprecated - provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead + */ + credentialAccessBoundary = { + accessBoundary: { + accessBoundaryRules: [], + }, + }) { + super(options instanceof authclient_1.AuthClient ? {} : options); + if (options instanceof authclient_1.AuthClient) { + this.authClient = options; + this.credentialAccessBoundary = credentialAccessBoundary; + } + else { + this.authClient = options.authClient; + this.credentialAccessBoundary = options.credentialAccessBoundary; + } + // Check 1-10 Access Boundary Rules are defined within Credential Access + // Boundary. + if (this.credentialAccessBoundary.accessBoundary.accessBoundaryRules + .length === 0) { + throw new Error('At least one access boundary rule needs to be defined.'); + } + else if (this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > + exports.MAX_ACCESS_BOUNDARY_RULES_COUNT) { + throw new Error('The provided access boundary has more than ' + + `${exports.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); + } + // Check at least one permission should be defined in each Access Boundary + // Rule. + for (const rule of this.credentialAccessBoundary.accessBoundary + .accessBoundaryRules) { + if (rule.availablePermissions.length === 0) { + throw new Error('At least one permission should be defined in access boundary rules.'); + } + } + this.stsCredential = new sts.StsCredentials({ + tokenExchangeEndpoint: `https://sts.${this.universeDomain}/v1/token`, + }); + this.cachedDownscopedAccessToken = null; + } + /** + * Provides a mechanism to inject Downscoped access tokens directly. + * The expiry_date field is required to facilitate determination of the token + * expiration which would make it easier for the token consumer to handle. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + if (!credentials.expiry_date) { + throw new Error('The access token expiry_date field is missing in the provided ' + + 'credentials.'); + } + super.setCredentials(credentials); + this.cachedDownscopedAccessToken = credentials; + } + async getAccessToken() { + // If the cached access token is unavailable or expired, force refresh. + // The Downscoped access token will be returned in + // DownscopedAccessTokenResponse format. + if (!this.cachedDownscopedAccessToken || + this.isExpired(this.cachedDownscopedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return Downscoped access token in DownscopedAccessTokenResponse format. + return { + token: this.cachedDownscopedAccessToken.access_token, + expirationTime: this.cachedDownscopedAccessToken.expiry_date, + res: this.cachedDownscopedAccessToken.res, + }; + } + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { authorization: 'Bearer ' } + */ + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = new Headers({ + authorization: `Bearer ${accessTokenResponse.token}`, + }); + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + this.addUserProjectAndAuthHeaders(opts.headers, requestHeaders); + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; + } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * GCP access tokens are retrieved from authclient object/source credential. + * Then GCP access tokens are exchanged for downscoped access tokens via the + * token exchange endpoint. + * @return A promise that resolves with the fresh downscoped access token. + */ + async refreshAccessTokenAsync() { + // Retrieve GCP access token from source credential. + const subjectToken = (await this.authClient.getAccessToken()).token; + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken: subjectToken, + subjectTokenType: STS_SUBJECT_TOKEN_TYPE, + }; + // Exchange the source AuthClient access token for a Downscoped access + // token. + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, undefined, this.credentialAccessBoundary); + /** + * The STS endpoint will only return the expiration time for the downscoped + * access token if the original access token represents a service account. + * The downscoped token's expiration time will always match the source + * credential expiration. When no expires_in is returned, we can copy the + * source credential's expiration time. + */ + const sourceCredExpireDate = this.authClient.credentials?.expiry_date || null; + const expiryDate = stsResponse.expires_in + ? new Date().getTime() + stsResponse.expires_in * 1000 + : sourceCredExpireDate; + // Save response in cached access token. + this.cachedDownscopedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: expiryDate, + res: stsResponse.res, + }; + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedDownscopedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedDownscopedAccessToken.expiry_date, + access_token: this.cachedDownscopedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedDownscopedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param downscopedAccessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(downscopedAccessToken) { + const now = new Date().getTime(); + return downscopedAccessToken.expiry_date + ? now >= + downscopedAccessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; + } +} +exports.DownscopedClient = DownscopedClient; +//# sourceMappingURL=downscopedclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2fc01c6d7c24f53d7f21d5e5fa5c5807a4d09bf9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.d.ts @@ -0,0 +1,10 @@ +export declare enum GCPEnv { + APP_ENGINE = "APP_ENGINE", + KUBERNETES_ENGINE = "KUBERNETES_ENGINE", + CLOUD_FUNCTIONS = "CLOUD_FUNCTIONS", + COMPUTE_ENGINE = "COMPUTE_ENGINE", + CLOUD_RUN = "CLOUD_RUN", + NONE = "NONE" +} +export declare function clear(): void; +export declare function getEnv(): Promise; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.js new file mode 100644 index 0000000000000000000000000000000000000000..de95003975c82e828372ab01a7f84865c6f70686 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/envDetect.js @@ -0,0 +1,90 @@ +"use strict"; +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GCPEnv = void 0; +exports.clear = clear; +exports.getEnv = getEnv; +const gcpMetadata = require("gcp-metadata"); +var GCPEnv; +(function (GCPEnv) { + GCPEnv["APP_ENGINE"] = "APP_ENGINE"; + GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE"; + GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS"; + GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE"; + GCPEnv["CLOUD_RUN"] = "CLOUD_RUN"; + GCPEnv["NONE"] = "NONE"; +})(GCPEnv || (exports.GCPEnv = GCPEnv = {})); +let envPromise; +function clear() { + envPromise = undefined; +} +async function getEnv() { + if (envPromise) { + return envPromise; + } + envPromise = getEnvMemoized(); + return envPromise; +} +async function getEnvMemoized() { + let env = GCPEnv.NONE; + if (isAppEngine()) { + env = GCPEnv.APP_ENGINE; + } + else if (isCloudFunction()) { + env = GCPEnv.CLOUD_FUNCTIONS; + } + else if (await isComputeEngine()) { + if (await isKubernetesEngine()) { + env = GCPEnv.KUBERNETES_ENGINE; + } + else if (isCloudRun()) { + env = GCPEnv.CLOUD_RUN; + } + else { + env = GCPEnv.COMPUTE_ENGINE; + } + } + else { + env = GCPEnv.NONE; + } + return env; +} +function isAppEngine() { + return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); +} +function isCloudFunction() { + return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); +} +/** + * This check only verifies that the environment is running knative. + * This must be run *after* checking for Kubernetes, otherwise it will + * return a false positive. + */ +function isCloudRun() { + return !!process.env.K_CONFIGURATION; +} +async function isKubernetesEngine() { + try { + await gcpMetadata.instance('attributes/cluster-name'); + return true; + } + catch (e) { + return false; + } +} +async function isComputeEngine() { + return gcpMetadata.isAvailable(); +} +//# sourceMappingURL=envDetect.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..259d276940a262600152c5ff565c76df0b5ee77a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.d.ts @@ -0,0 +1,137 @@ +/** + * Interface defining the JSON formatted response of a 3rd party executable + * used by the pluggable auth client. + */ +export interface ExecutableResponseJson { + /** + * The version of the JSON response. Only version 1 is currently supported. + * Always required. + */ + version: number; + /** + * Whether the executable ran successfully. Always required. + */ + success: boolean; + /** + * The epoch time for expiration of the token in seconds, required for + * successful responses. + */ + expiration_time?: number; + /** + * The type of subject token in the response, currently supported values are: + * urn:ietf:params:oauth:token-type:saml2 + * urn:ietf:params:oauth:token-type:id_token + * urn:ietf:params:oauth:token-type:jwt + */ + token_type?: string; + /** + * The error code from the executable, required when unsuccessful. + */ + code?: string; + /** + * The error message from the executable, required when unsuccessful. + */ + message?: string; + /** + * The ID token to be used as a subject token when token_type is id_token or jwt. + */ + id_token?: string; + /** + * The response to be used as a subject token when token_type is saml2. + */ + saml_response?: string; +} +/** + * Defines the response of a 3rd party executable run by the pluggable auth client. + */ +export declare class ExecutableResponse { + /** + * The version of the Executable response. Only version 1 is currently supported. + */ + readonly version: number; + /** + * Whether the executable ran successfully. + */ + readonly success: boolean; + /** + * The epoch time for expiration of the token in seconds. + */ + readonly expirationTime?: number; + /** + * The type of subject token in the response, currently supported values are: + * urn:ietf:params:oauth:token-type:saml2 + * urn:ietf:params:oauth:token-type:id_token + * urn:ietf:params:oauth:token-type:jwt + */ + readonly tokenType?: string; + /** + * The error code from the executable. + */ + readonly errorCode?: string; + /** + * The error message from the executable. + */ + readonly errorMessage?: string; + /** + * The subject token from the executable, format depends on tokenType. + */ + readonly subjectToken?: string; + /** + * Instantiates an ExecutableResponse instance using the provided JSON object + * from the output of the executable. + * @param responseJson Response from a 3rd party executable, loaded from a + * run of the executable or a cached output file. + */ + constructor(responseJson: ExecutableResponseJson); + /** + * @return A boolean representing if the response has a valid token. Returns + * true when the response was successful and the token is not expired. + */ + isValid(): boolean; + /** + * @return A boolean representing if the response is expired. Returns true if the + * provided timeout has passed. + */ + isExpired(): boolean; +} +/** + * An error thrown by the ExecutableResponse class. + */ +export declare class ExecutableResponseError extends Error { + constructor(message: string); +} +/** + * An error thrown when the 'version' field in an executable response is missing or invalid. + */ +export declare class InvalidVersionFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the 'success' field in an executable response is missing or invalid. + */ +export declare class InvalidSuccessFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. + */ +export declare class InvalidExpirationTimeFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the 'token_type' field in an executable response is missing or invalid. + */ +export declare class InvalidTokenTypeFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the 'code' field in an executable response is missing or invalid. + */ +export declare class InvalidCodeFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the 'message' field in an executable response is missing or invalid. + */ +export declare class InvalidMessageFieldError extends ExecutableResponseError { +} +/** + * An error thrown when the subject token in an executable response is missing or invalid. + */ +export declare class InvalidSubjectTokenError extends ExecutableResponseError { +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.js new file mode 100644 index 0000000000000000000000000000000000000000..3ad9f5d8687d5f5e5dbe69d1ec92e1b5785eca55 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/executable-response.js @@ -0,0 +1,178 @@ +"use strict"; +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InvalidSubjectTokenError = exports.InvalidMessageFieldError = exports.InvalidCodeFieldError = exports.InvalidTokenTypeFieldError = exports.InvalidExpirationTimeFieldError = exports.InvalidSuccessFieldError = exports.InvalidVersionFieldError = exports.ExecutableResponseError = exports.ExecutableResponse = void 0; +const SAML_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'; +const OIDC_SUBJECT_TOKEN_TYPE1 = 'urn:ietf:params:oauth:token-type:id_token'; +const OIDC_SUBJECT_TOKEN_TYPE2 = 'urn:ietf:params:oauth:token-type:jwt'; +/** + * Defines the response of a 3rd party executable run by the pluggable auth client. + */ +class ExecutableResponse { + /** + * The version of the Executable response. Only version 1 is currently supported. + */ + version; + /** + * Whether the executable ran successfully. + */ + success; + /** + * The epoch time for expiration of the token in seconds. + */ + expirationTime; + /** + * The type of subject token in the response, currently supported values are: + * urn:ietf:params:oauth:token-type:saml2 + * urn:ietf:params:oauth:token-type:id_token + * urn:ietf:params:oauth:token-type:jwt + */ + tokenType; + /** + * The error code from the executable. + */ + errorCode; + /** + * The error message from the executable. + */ + errorMessage; + /** + * The subject token from the executable, format depends on tokenType. + */ + subjectToken; + /** + * Instantiates an ExecutableResponse instance using the provided JSON object + * from the output of the executable. + * @param responseJson Response from a 3rd party executable, loaded from a + * run of the executable or a cached output file. + */ + constructor(responseJson) { + // Check that the required fields exist in the json response. + if (!responseJson.version) { + throw new InvalidVersionFieldError("Executable response must contain a 'version' field."); + } + if (responseJson.success === undefined) { + throw new InvalidSuccessFieldError("Executable response must contain a 'success' field."); + } + this.version = responseJson.version; + this.success = responseJson.success; + // Validate required fields for a successful response. + if (this.success) { + this.expirationTime = responseJson.expiration_time; + this.tokenType = responseJson.token_type; + // Validate token type field. + if (this.tokenType !== SAML_SUBJECT_TOKEN_TYPE && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE1 && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE2) { + throw new InvalidTokenTypeFieldError("Executable response must contain a 'token_type' field when successful " + + `and it must be one of ${OIDC_SUBJECT_TOKEN_TYPE1}, ${OIDC_SUBJECT_TOKEN_TYPE2}, or ${SAML_SUBJECT_TOKEN_TYPE}.`); + } + // Validate subject token. + if (this.tokenType === SAML_SUBJECT_TOKEN_TYPE) { + if (!responseJson.saml_response) { + throw new InvalidSubjectTokenError(`Executable response must contain a 'saml_response' field when token_type=${SAML_SUBJECT_TOKEN_TYPE}.`); + } + this.subjectToken = responseJson.saml_response; + } + else { + if (!responseJson.id_token) { + throw new InvalidSubjectTokenError("Executable response must contain a 'id_token' field when " + + `token_type=${OIDC_SUBJECT_TOKEN_TYPE1} or ${OIDC_SUBJECT_TOKEN_TYPE2}.`); + } + this.subjectToken = responseJson.id_token; + } + } + else { + // Both code and message must be provided for unsuccessful responses. + if (!responseJson.code) { + throw new InvalidCodeFieldError("Executable response must contain a 'code' field when unsuccessful."); + } + if (!responseJson.message) { + throw new InvalidMessageFieldError("Executable response must contain a 'message' field when unsuccessful."); + } + this.errorCode = responseJson.code; + this.errorMessage = responseJson.message; + } + } + /** + * @return A boolean representing if the response has a valid token. Returns + * true when the response was successful and the token is not expired. + */ + isValid() { + return !this.isExpired() && this.success; + } + /** + * @return A boolean representing if the response is expired. Returns true if the + * provided timeout has passed. + */ + isExpired() { + return (this.expirationTime !== undefined && + this.expirationTime < Math.round(Date.now() / 1000)); + } +} +exports.ExecutableResponse = ExecutableResponse; +/** + * An error thrown by the ExecutableResponse class. + */ +class ExecutableResponseError extends Error { + constructor(message) { + super(message); + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.ExecutableResponseError = ExecutableResponseError; +/** + * An error thrown when the 'version' field in an executable response is missing or invalid. + */ +class InvalidVersionFieldError extends ExecutableResponseError { +} +exports.InvalidVersionFieldError = InvalidVersionFieldError; +/** + * An error thrown when the 'success' field in an executable response is missing or invalid. + */ +class InvalidSuccessFieldError extends ExecutableResponseError { +} +exports.InvalidSuccessFieldError = InvalidSuccessFieldError; +/** + * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. + */ +class InvalidExpirationTimeFieldError extends ExecutableResponseError { +} +exports.InvalidExpirationTimeFieldError = InvalidExpirationTimeFieldError; +/** + * An error thrown when the 'token_type' field in an executable response is missing or invalid. + */ +class InvalidTokenTypeFieldError extends ExecutableResponseError { +} +exports.InvalidTokenTypeFieldError = InvalidTokenTypeFieldError; +/** + * An error thrown when the 'code' field in an executable response is missing or invalid. + */ +class InvalidCodeFieldError extends ExecutableResponseError { +} +exports.InvalidCodeFieldError = InvalidCodeFieldError; +/** + * An error thrown when the 'message' field in an executable response is missing or invalid. + */ +class InvalidMessageFieldError extends ExecutableResponseError { +} +exports.InvalidMessageFieldError = InvalidMessageFieldError; +/** + * An error thrown when the subject token in an executable response is missing or invalid. + */ +class InvalidSubjectTokenError extends ExecutableResponseError { +} +exports.InvalidSubjectTokenError = InvalidSubjectTokenError; +//# sourceMappingURL=executable-response.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec9d5a3544d2af95b0df11caf61d3b9ddd6fd77b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.d.ts @@ -0,0 +1,72 @@ +import { AuthClient, BodyResponseCallback } from './authclient'; +import { GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; +import { Credentials } from './credentials'; +import { SharedExternalAccountClientOptions } from './baseexternalclient'; +/** + * The credentials JSON file type for external account authorized user clients. + */ +export declare const EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = "external_account_authorized_user"; +/** + * External Account Authorized User Credentials JSON interface. + */ +export interface ExternalAccountAuthorizedUserClientOptions extends SharedExternalAccountClientOptions { + type: typeof EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE; + client_id: string; + client_secret: string; + refresh_token: string; + token_info_url: string; + revoke_url?: string; +} +/** + * Internal interface for tracking the access token expiration time. + */ +interface CredentialsWithResponse extends Credentials { + res?: GaxiosResponse | null; +} +/** + * External Account Authorized User Client. This is used for OAuth2 credentials + * sourced using external identities through Workforce Identity Federation. + * Obtaining the initial access and refresh token can be done through the + * Google Cloud CLI. + */ +export declare class ExternalAccountAuthorizedUserClient extends AuthClient { + private cachedAccessToken; + private readonly externalAccountAuthorizedUserHandler; + private refreshToken; + /** + * Instantiates an ExternalAccountAuthorizedUserClient instances using the + * provided JSON object loaded from a credentials files. + * An error is throws if the credential is not valid. + * @param options The external account authorized user option object typically + * from the external accoutn authorized user JSON credential file. + */ + constructor(options: ExternalAccountAuthorizedUserClientOptions); + getAccessToken(): Promise<{ + token?: string | null; + res?: GaxiosResponse | null; + }>; + getRequestHeaders(): Promise; + request(opts: GaxiosOptions): GaxiosPromise; + request(opts: GaxiosOptions, callback: BodyResponseCallback): void; + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + protected requestAsync(opts: GaxiosOptions, reAuthRetried?: boolean): Promise>; + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * @return A promise that resolves with the refreshed credential. + */ + protected refreshAccessTokenAsync(): Promise; + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param credentials The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + private isExpired; +} +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js new file mode 100644 index 0000000000000000000000000000000000000000..ad56f6939b0484ad98a977ba146ab1cb9ac090c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js @@ -0,0 +1,232 @@ +"use strict"; +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; +const authclient_1 = require("./authclient"); +const oauth2common_1 = require("./oauth2common"); +const gaxios_1 = require("gaxios"); +const stream = require("stream"); +const baseexternalclient_1 = require("./baseexternalclient"); +/** + * The credentials JSON file type for external account authorized user clients. + */ +exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = 'external_account_authorized_user'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/oauthtoken'; +/** + * Handler for token refresh requests sent to the token_url endpoint for external + * authorized user credentials. + */ +class ExternalAccountAuthorizedUserHandler extends oauth2common_1.OAuthClientAuthHandler { + #tokenRefreshEndpoint; + /** + * Initializes an ExternalAccountAuthorizedUserHandler instance. + * @param url The URL of the token refresh endpoint. + * @param transporter The transporter to use for the refresh request. + * @param clientAuthentication The client authentication credentials to use + * for the refresh request. + */ + constructor(options) { + super(options); + this.#tokenRefreshEndpoint = options.tokenRefreshEndpoint; + } + /** + * Requests a new access token from the token_url endpoint using the provided + * refresh token. + * @param refreshToken The refresh token to use to generate a new access token. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @return A promise that resolves with the token refresh response containing + * the requested access token and its expiration time. + */ + async refreshToken(refreshToken, headers) { + const opts = { + ...ExternalAccountAuthorizedUserHandler.RETRY_CONFIG, + url: this.#tokenRefreshEndpoint, + method: 'POST', + headers, + data: new URLSearchParams({ + grant_type: 'refresh_token', + refresh_token: refreshToken, + }), + }; + authclient_1.AuthClient.setMethodName(opts, 'refreshToken'); + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const tokenRefreshResponse = response.data; + tokenRefreshResponse.res = response; + return tokenRefreshResponse; + } + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); + } + // Request could fail before the server responds. + throw error; + } + } +} +/** + * External Account Authorized User Client. This is used for OAuth2 credentials + * sourced using external identities through Workforce Identity Federation. + * Obtaining the initial access and refresh token can be done through the + * Google Cloud CLI. + */ +class ExternalAccountAuthorizedUserClient extends authclient_1.AuthClient { + cachedAccessToken; + externalAccountAuthorizedUserHandler; + refreshToken; + /** + * Instantiates an ExternalAccountAuthorizedUserClient instances using the + * provided JSON object loaded from a credentials files. + * An error is throws if the credential is not valid. + * @param options The external account authorized user option object typically + * from the external accoutn authorized user JSON credential file. + */ + constructor(options) { + super(options); + if (options.universe_domain) { + this.universeDomain = options.universe_domain; + } + this.refreshToken = options.refresh_token; + const clientAuthentication = { + confidentialClientType: 'basic', + clientId: options.client_id, + clientSecret: options.client_secret, + }; + this.externalAccountAuthorizedUserHandler = + new ExternalAccountAuthorizedUserHandler({ + tokenRefreshEndpoint: options.token_url ?? + DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain), + transporter: this.transporter, + clientAuthentication, + }); + this.cachedAccessToken = null; + this.quotaProjectId = options.quota_project_id; + // As threshold could be zero, + // eagerRefreshThresholdMillis || EXPIRATION_TIME_OFFSET will override the + // zero value. + if (typeof options?.eagerRefreshThresholdMillis !== 'number') { + this.eagerRefreshThresholdMillis = baseexternalclient_1.EXPIRATION_TIME_OFFSET; + } + else { + this.eagerRefreshThresholdMillis = options + .eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = !!options?.forceRefreshOnFailure; + } + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; + } + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = new Headers({ + authorization: `Bearer ${accessTokenResponse.token}`, + }); + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + this.addUserProjectAndAuthHeaders(opts.headers, requestHeaders); + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; + } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * @return A promise that resolves with the refreshed credential. + */ + async refreshAccessTokenAsync() { + // Refresh the access token using the refresh token. + const refreshResponse = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); + this.cachedAccessToken = { + access_token: refreshResponse.access_token, + expiry_date: new Date().getTime() + refreshResponse.expires_in * 1000, + res: refreshResponse.res, + }; + if (refreshResponse.refresh_token !== undefined) { + this.refreshToken = refreshResponse.refresh_token; + } + return this.cachedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param credentials The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(credentials) { + const now = new Date().getTime(); + return credentials.expiry_date + ? now >= credentials.expiry_date - this.eagerRefreshThresholdMillis + : false; + } +} +exports.ExternalAccountAuthorizedUserClient = ExternalAccountAuthorizedUserClient; +//# sourceMappingURL=externalAccountAuthorizedUserClient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bdad04e73ae8a663207c407263444a311fa6347a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.d.ts @@ -0,0 +1,21 @@ +import { BaseExternalAccountClient } from './baseexternalclient'; +import { IdentityPoolClientOptions } from './identitypoolclient'; +import { AwsClientOptions } from './awsclient'; +import { PluggableAuthClientOptions } from './pluggable-auth-client'; +export type ExternalAccountClientOptions = IdentityPoolClientOptions | AwsClientOptions | PluggableAuthClientOptions; +/** + * Dummy class with no constructor. Developers are expected to use fromJSON. + */ +export declare class ExternalAccountClient { + constructor(); + /** + * This static method will instantiate the + * corresponding type of external account credential depending on the + * underlying credential source. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @return A BaseExternalAccountClient instance or null if the options + * provided do not correspond to an external account credential. + */ + static fromJSON(options: ExternalAccountClientOptions): BaseExternalAccountClient | null; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.js new file mode 100644 index 0000000000000000000000000000000000000000..0949656b1a1cca78b1f1bc1754d818719fe12011 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/externalclient.js @@ -0,0 +1,60 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExternalAccountClient = void 0; +const baseexternalclient_1 = require("./baseexternalclient"); +const identitypoolclient_1 = require("./identitypoolclient"); +const awsclient_1 = require("./awsclient"); +const pluggable_auth_client_1 = require("./pluggable-auth-client"); +/** + * Dummy class with no constructor. Developers are expected to use fromJSON. + */ +class ExternalAccountClient { + constructor() { + throw new Error('ExternalAccountClients should be initialized via: ' + + 'ExternalAccountClient.fromJSON(), ' + + 'directly via explicit constructors, eg. ' + + 'new AwsClient(options), new IdentityPoolClient(options), new' + + 'PluggableAuthClientOptions, or via ' + + 'new GoogleAuth(options).getClient()'); + } + /** + * This static method will instantiate the + * corresponding type of external account credential depending on the + * underlying credential source. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @return A BaseExternalAccountClient instance or null if the options + * provided do not correspond to an external account credential. + */ + static fromJSON(options) { + if (options && options.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + if (options.credential_source?.environment_id) { + return new awsclient_1.AwsClient(options); + } + else if (options.credential_source?.executable) { + return new pluggable_auth_client_1.PluggableAuthClient(options); + } + else { + return new identitypoolclient_1.IdentityPoolClient(options); + } + } + else { + return null; + } + } +} +exports.ExternalAccountClient = ExternalAccountClient; +//# sourceMappingURL=externalclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ca77e7107b2e7ab1ddf672d32f3660b8ddeb7975 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.d.ts @@ -0,0 +1,41 @@ +import { SubjectTokenFormatType, SubjectTokenSupplier } from './identitypoolclient'; +/** + * Interface that defines options used to build a {@link FileSubjectTokenSupplier} + */ +export interface FileSubjectTokenSupplierOptions { + /** + * The file path where the external credential is located. + */ + filePath: string; + /** + * The token file or URL response type (JSON or text). + */ + formatType: SubjectTokenFormatType; + /** + * For JSON response types, this is the subject_token field name. For Azure, + * this is access_token. For text response types, this is ignored. + */ + subjectTokenFieldName?: string; +} +/** + * Internal subject token supplier implementation used when a file location + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +export declare class FileSubjectTokenSupplier implements SubjectTokenSupplier { + private readonly filePath; + private readonly formatType; + private readonly subjectTokenFieldName?; + /** + * Instantiates a new file based subject token supplier. + * @param opts The file subject token supplier options to build the supplier + * with. + */ + constructor(opts: FileSubjectTokenSupplierOptions); + /** + * Returns the subject token stored at the file specified in the constructor. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + getSubjectToken(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.js new file mode 100644 index 0000000000000000000000000000000000000000..fc89fc668987f1e9be2f17d524b2357430c6a87a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.js @@ -0,0 +1,84 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileSubjectTokenSupplier = void 0; +const util_1 = require("util"); +const fs = require("fs"); +// fs.readfile is undefined in browser karma tests causing +// `npm run browser-test` to fail as test.oauth2.ts imports this file via +// src/index.ts. +// Fallback to void function to avoid promisify throwing a TypeError. +const readFile = (0, util_1.promisify)(fs.readFile ?? (() => { })); +const realpath = (0, util_1.promisify)(fs.realpath ?? (() => { })); +const lstat = (0, util_1.promisify)(fs.lstat ?? (() => { })); +/** + * Internal subject token supplier implementation used when a file location + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +class FileSubjectTokenSupplier { + filePath; + formatType; + subjectTokenFieldName; + /** + * Instantiates a new file based subject token supplier. + * @param opts The file subject token supplier options to build the supplier + * with. + */ + constructor(opts) { + this.filePath = opts.filePath; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + } + /** + * Returns the subject token stored at the file specified in the constructor. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken() { + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + let parsedFilePath = this.filePath; + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + parsedFilePath = await realpath(parsedFilePath); + if (!(await lstat(parsedFilePath)).isFile()) { + throw new Error(); + } + } + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${parsedFilePath} does not exist, or it is not a file. ${err.message}`; + } + throw err; + } + let subjectToken; + const rawText = await readFile(parsedFilePath, { encoding: 'utf8' }); + if (this.formatType === 'text') { + subjectToken = rawText; + } + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const json = JSON.parse(rawText); + subjectToken = json[this.subjectTokenFieldName]; + } + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source file'); + } + return subjectToken; + } +} +exports.FileSubjectTokenSupplier = FileSubjectTokenSupplier; +//# sourceMappingURL=filesubjecttokensupplier.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..87c491bf97aa530c4e72c6d9c98b06e59d7e10bd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.d.ts @@ -0,0 +1,383 @@ +import { GaxiosOptions, GaxiosResponse } from 'gaxios'; +import * as stream from 'stream'; +import { CredentialBody, ImpersonatedJWTInput, JWTInput } from './credentials'; +import { IdTokenClient } from './idtokenclient'; +import { GCPEnv } from './envDetect'; +import { JWT } from './jwtclient'; +import { UserRefreshClient } from './refreshclient'; +import { Impersonated } from './impersonated'; +import { ExternalAccountClientOptions } from './externalclient'; +import { BaseExternalAccountClient } from './baseexternalclient'; +import { AuthClient, AuthClientOptions } from './authclient'; +import { ExternalAccountAuthorizedUserClient } from './externalAccountAuthorizedUserClient'; +import { AnyAuthClient, AnyAuthClientConstructor } from '..'; +/** + * Defines all types of explicit clients that are determined via ADC JSON + * config file. + */ +export type JSONClient = JWT | UserRefreshClient | BaseExternalAccountClient | ExternalAccountAuthorizedUserClient | Impersonated; +export interface ProjectIdCallback { + (err?: Error | null, projectId?: string | null): void; +} +export interface CredentialCallback { + (err: Error | null, result?: JSONClient): void; +} +export interface ADCCallback { + (err: Error | null, credential?: AuthClient, projectId?: string | null): void; +} +export interface ADCResponse { + credential: AuthClient; + projectId: string | null; +} +export interface GoogleAuthOptions { + /** + * An API key to use, optional. Cannot be used with {@link GoogleAuthOptions.credentials `credentials`}. + */ + apiKey?: string; + /** + * An `AuthClient` to use + */ + authClient?: T; + /** + * Path to a .json, .pem, or .p12 key file + */ + keyFilename?: string; + /** + * Path to a .json, .pem, or .p12 key file + */ + keyFile?: string; + /** + * Object containing client_email and private_key properties, or the + * external account client options. + * Cannot be used with {@link GoogleAuthOptions.apiKey `apiKey`}. + * + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + */ + credentials?: JWTInput | ExternalAccountClientOptions; + /** + * `AuthClientOptions` object passed to the constructor of the client + */ + clientOptions?: Extract[0], AuthClientOptions>; + /** + * Required scopes for the desired API request + */ + scopes?: string | string[]; + /** + * Your project ID. + */ + projectId?: string; + /** + * The default service domain for a given Cloud universe. + * + * This is an ergonomic equivalent to {@link clientOptions}'s `universeDomain` + * property and will be set for all generated {@link AuthClient}s. + */ + universeDomain?: string; +} +export declare const GoogleAuthExceptionMessages: { + readonly API_KEY_WITH_CREDENTIALS: "API Keys and Credentials are mutually exclusive authentication methods and cannot be used together."; + readonly NO_PROJECT_ID_FOUND: string; + readonly NO_CREDENTIALS_FOUND: string; + readonly NO_ADC_FOUND: "Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information."; + readonly NO_UNIVERSE_DOMAIN_FOUND: string; +}; +export declare class GoogleAuth { + #private; + /** + * Caches a value indicating whether the auth layer is running on Google + * Compute Engine. + * @private + */ + private checkIsGCE?; + useJWTAccessWithScope?: boolean; + defaultServicePath?: string; + get isGCE(): boolean | undefined; + private _findProjectIdPromise?; + private _cachedProjectId?; + jsonContent: JWTInput | ExternalAccountClientOptions | null; + apiKey: string | null; + cachedCredential: AnyAuthClient | T | null; + /** + * Scopes populated by the client library by default. We differentiate between + * these and user defined scopes when deciding whether to use a self-signed JWT. + */ + defaultScopes?: string | string[]; + private keyFilename?; + private scopes?; + private clientOptions; + /** + * Configuration is resolved in the following order of precedence: + * - {@link GoogleAuthOptions.credentials `credentials`} + * - {@link GoogleAuthOptions.keyFilename `keyFilename`} + * - {@link GoogleAuthOptions.keyFile `keyFile`} + * + * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the + * {@link AuthClient `AuthClient`s}. + * + * @param opts + */ + constructor(opts?: GoogleAuthOptions); + setGapicJWTValues(client: JWT): void; + /** + * Obtains the default project ID for the application. + * + * Retrieves in the following order of precedence: + * - The `projectId` provided in this object's construction + * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable + * - GOOGLE_APPLICATION_CREDENTIALS JSON file + * - Cloud SDK: `gcloud config config-helper --format json` + * - GCE project ID from metadata server + */ + getProjectId(): Promise; + getProjectId(callback: ProjectIdCallback): void; + /** + * A temporary method for internal `getProjectId` usages where `null` is + * acceptable. In a future major release, `getProjectId` should return `null` + * (as the `Promise` base signature describes) and this private + * method should be removed. + * + * @returns Promise that resolves with project id (or `null`) + */ + private getProjectIdOptional; + /** + * A private method for finding and caching a projectId. + * + * Supports environments in order of precedence: + * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable + * - GOOGLE_APPLICATION_CREDENTIALS JSON file + * - Cloud SDK: `gcloud config config-helper --format json` + * - GCE project ID from metadata server + * + * @returns projectId + */ + private findAndCacheProjectId; + private getProjectIdAsync; + /** + * Retrieves a universe domain from the metadata server via + * {@link gcpMetadata.universe}. + * + * @returns a universe domain + */ + getUniverseDomainFromMetadataServer(): Promise; + /** + * Retrieves, caches, and returns the universe domain in the following order + * of precedence: + * - The universe domain in {@link GoogleAuth.clientOptions} + * - An existing or ADC {@link AuthClient}'s universe domain + * - {@link gcpMetadata.universe}, if {@link Compute} client + * + * @returns The universe domain + */ + getUniverseDomain(): Promise; + /** + * @returns Any scopes (user-specified or default scopes specified by the + * client library) that need to be set on the current Auth client. + */ + private getAnyScopes; + /** + * Obtains the default service-level credentials for the application. + * @param callback Optional callback. + * @returns Promise that resolves with the ADCResponse (if no callback was + * passed). + */ + getApplicationDefault(): Promise; + getApplicationDefault(callback: ADCCallback): void; + getApplicationDefault(options: AuthClientOptions): Promise; + getApplicationDefault(options: AuthClientOptions, callback: ADCCallback): void; + private getApplicationDefaultAsync; + /** + * Determines whether the auth layer is running on Google Compute Engine. + * Checks for GCP Residency, then fallback to checking if metadata server + * is available. + * + * @returns A promise that resolves with the boolean. + * @api private + */ + _checkIsGCE(): Promise; + /** + * Attempts to load default credentials from the environment variable path.. + * @returns Promise that resolves with the OAuth2Client or null. + * @api private + */ + _tryGetApplicationCredentialsFromEnvironmentVariable(options?: AuthClientOptions): Promise; + /** + * Attempts to load default credentials from a well-known file location + * @return Promise that resolves with the OAuth2Client or null. + * @api private + */ + _tryGetApplicationCredentialsFromWellKnownFile(options?: AuthClientOptions): Promise; + /** + * Attempts to load default credentials from a file at the given path.. + * @param filePath The path to the file to read. + * @returns Promise that resolves with the OAuth2Client + * @api private + */ + _getApplicationCredentialsFromFilePath(filePath: string, options?: AuthClientOptions): Promise; + /** + * Create a credentials instance using a given impersonated input options. + * @param json The impersonated input object. + * @returns JWT or UserRefresh Client with data + */ + fromImpersonatedJSON(json: ImpersonatedJWTInput): Impersonated; + /** + * Create a credentials instance using the given input options. + * This client is not cached. + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + * + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + fromJSON(json: JWTInput | ImpersonatedJWTInput, options?: AuthClientOptions): JSONClient; + /** + * Return a JWT or UserRefreshClient from JavaScript object, caching both the + * object used to instantiate and the client. + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + private _cacheClientFromJSON; + /** + * Create a credentials instance using the given input stream. + * @param inputStream The input stream. + * @param callback Optional callback. + */ + fromStream(inputStream: stream.Readable): Promise; + fromStream(inputStream: stream.Readable, callback: CredentialCallback): void; + fromStream(inputStream: stream.Readable, options: AuthClientOptions): Promise; + fromStream(inputStream: stream.Readable, options: AuthClientOptions, callback: CredentialCallback): void; + private fromStreamAsync; + /** + * Create a credentials instance using the given API key string. + * The created client is not cached. In order to create and cache it use the {@link GoogleAuth.getClient `getClient`} method after first providing an {@link GoogleAuth.apiKey `apiKey`}. + * + * @param apiKey The API key string + * @param options An optional options object. + * @returns A JWT loaded from the key + */ + fromAPIKey(apiKey: string, options?: AuthClientOptions): JWT; + /** + * Determines whether the current operating system is Windows. + * @api private + */ + private _isWindows; + /** + * Run the Google Cloud SDK command that prints the default project ID + */ + private getDefaultServiceProjectId; + /** + * Loads the project id from environment variables. + * @api private + */ + private getProductionProjectId; + /** + * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. + * @api private + */ + private getFileProjectId; + /** + * Gets the project ID from external account client if available. + */ + private getExternalAccountClientProjectId; + /** + * Gets the Compute Engine project ID if it can be inferred. + */ + private getGCEProjectId; + /** + * The callback function handles a credential object that contains the + * client_email and private_key (if exists). + * getCredentials first checks if the client is using an external account and + * uses the service account email in place of client_email. + * If that doesn't exist, it checks for these values from the user JSON. + * If the user JSON doesn't exist, and the environment is on GCE, it gets the + * client_email from the cloud metadata server. + * @param callback Callback that handles the credential object that contains + * a client_email and optional private key, or the error. + * returned + */ + getCredentials(): Promise; + getCredentials(callback: (err: Error | null, credentials?: CredentialBody) => void): void; + private getCredentialsAsync; + /** + * Automatically obtain an {@link AuthClient `AuthClient`} based on the + * provided configuration. If no options were passed, use Application + * Default Credentials. + */ + getClient(): Promise; + /** + * Creates a client which will fetch an ID token for authorization. + * @param targetAudience the audience for the fetched ID token. + * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. + */ + getIdTokenClient(targetAudience: string): Promise; + /** + * Automatically obtain application default credentials, and return + * an access token for making requests. + */ + getAccessToken(): Promise; + /** + * Obtain the HTTP headers that will provide authorization for a given + * request. + */ + getRequestHeaders(url?: string | URL): Promise; + /** + * Obtain credentials for a request, then attach the appropriate headers to + * the request options. + * @param opts Axios or Request options on which to attach the headers + */ + authorizeRequest(opts?: Pick): Promise>; + /** + * A {@link fetch `fetch`} compliant API for {@link GoogleAuth}. + * + * @see {@link GoogleAuth.request} for the classic method. + * + * @remarks + * + * This is useful as a drop-in replacement for `fetch` API usage. + * + * @example + * + * ```ts + * const auth = new GoogleAuth(); + * const fetchWithAuth: typeof fetch = (...args) => auth.fetch(...args); + * await fetchWithAuth('https://example.com'); + * ``` + * + * @param args `fetch` API or {@link Gaxios.fetch `Gaxios#fetch`} parameters + * @returns the {@link GaxiosResponse} with Gaxios-added properties + */ + fetch(...args: Parameters): Promise>; + /** + * Automatically obtain application default credentials, and make an + * HTTP request using the given options. + * + * @see {@link GoogleAuth.fetch} for the modern method. + * + * @param opts Axios request options for the HTTP request. + */ + request(opts: GaxiosOptions): Promise>; + /** + * Determine the compute environment in which the code is running. + */ + getEnv(): Promise; + /** + * Sign the given data with the current private key, or go out + * to the IAM API to sign it. + * @param data The data to be signed. + * @param endpoint A custom endpoint to use. + * + * @example + * ``` + * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); + * ``` + */ + sign(data: string, endpoint?: string): Promise; + private signBlob; +} +export interface SignBlobResponse { + keyId: string; + signedBlob: string; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.js new file mode 100644 index 0000000000000000000000000000000000000000..5e1a6d38c0344048b84f7243e0cf0ee1f8fa6f8d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/googleauth.js @@ -0,0 +1,867 @@ +"use strict"; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GoogleAuth = exports.GoogleAuthExceptionMessages = void 0; +const child_process_1 = require("child_process"); +const fs = require("fs"); +const gaxios_1 = require("gaxios"); +const gcpMetadata = require("gcp-metadata"); +const os = require("os"); +const path = require("path"); +const crypto_1 = require("../crypto/crypto"); +const computeclient_1 = require("./computeclient"); +const idtokenclient_1 = require("./idtokenclient"); +const envDetect_1 = require("./envDetect"); +const jwtclient_1 = require("./jwtclient"); +const refreshclient_1 = require("./refreshclient"); +const impersonated_1 = require("./impersonated"); +const externalclient_1 = require("./externalclient"); +const baseexternalclient_1 = require("./baseexternalclient"); +const authclient_1 = require("./authclient"); +const externalAccountAuthorizedUserClient_1 = require("./externalAccountAuthorizedUserClient"); +const util_1 = require("../util"); +exports.GoogleAuthExceptionMessages = { + API_KEY_WITH_CREDENTIALS: 'API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.', + NO_PROJECT_ID_FOUND: 'Unable to detect a Project Id in the current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_CREDENTIALS_FOUND: 'Unable to find credentials in current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_ADC_FOUND: 'Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.', + NO_UNIVERSE_DOMAIN_FOUND: 'Unable to detect a Universe Domain in the current environment.\n' + + 'To learn more about Universe Domain retrieval, visit: \n' + + 'https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys', +}; +class GoogleAuth { + /** + * Caches a value indicating whether the auth layer is running on Google + * Compute Engine. + * @private + */ + checkIsGCE = undefined; + useJWTAccessWithScope; + defaultServicePath; + // Note: this properly is only public to satisfy unit tests. + // https://github.com/Microsoft/TypeScript/issues/5228 + get isGCE() { + return this.checkIsGCE; + } + _findProjectIdPromise; + _cachedProjectId; + // To save the contents of the JSON credential file + jsonContent = null; + apiKey; + cachedCredential = null; + /** + * A pending {@link AuthClient}. Used for concurrent {@link GoogleAuth.getClient} calls. + */ + #pendingAuthClient = null; + /** + * Scopes populated by the client library by default. We differentiate between + * these and user defined scopes when deciding whether to use a self-signed JWT. + */ + defaultScopes; + keyFilename; + scopes; + clientOptions = {}; + /** + * Configuration is resolved in the following order of precedence: + * - {@link GoogleAuthOptions.credentials `credentials`} + * - {@link GoogleAuthOptions.keyFilename `keyFilename`} + * - {@link GoogleAuthOptions.keyFile `keyFile`} + * + * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the + * {@link AuthClient `AuthClient`s}. + * + * @param opts + */ + constructor(opts = {}) { + this._cachedProjectId = opts.projectId || null; + this.cachedCredential = opts.authClient || null; + this.keyFilename = opts.keyFilename || opts.keyFile; + this.scopes = opts.scopes; + this.clientOptions = opts.clientOptions || {}; + this.jsonContent = opts.credentials || null; + this.apiKey = opts.apiKey || this.clientOptions.apiKey || null; + // Cannot use both API Key + Credentials + if (this.apiKey && (this.jsonContent || this.clientOptions.credentials)) { + throw new RangeError(exports.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS); + } + if (opts.universeDomain) { + this.clientOptions.universeDomain = opts.universeDomain; + } + } + // GAPIC client libraries should always use self-signed JWTs. The following + // variables are set on the JWT client in order to indicate the type of library, + // and sign the JWT with the correct audience and scopes (if not supplied). + setGapicJWTValues(client) { + client.defaultServicePath = this.defaultServicePath; + client.useJWTAccessWithScope = this.useJWTAccessWithScope; + client.defaultScopes = this.defaultScopes; + } + getProjectId(callback) { + if (callback) { + this.getProjectIdAsync().then(r => callback(null, r), callback); + } + else { + return this.getProjectIdAsync(); + } + } + /** + * A temporary method for internal `getProjectId` usages where `null` is + * acceptable. In a future major release, `getProjectId` should return `null` + * (as the `Promise` base signature describes) and this private + * method should be removed. + * + * @returns Promise that resolves with project id (or `null`) + */ + async getProjectIdOptional() { + try { + return await this.getProjectId(); + } + catch (e) { + if (e instanceof Error && + e.message === exports.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) { + return null; + } + else { + throw e; + } + } + } + /** + * A private method for finding and caching a projectId. + * + * Supports environments in order of precedence: + * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable + * - GOOGLE_APPLICATION_CREDENTIALS JSON file + * - Cloud SDK: `gcloud config config-helper --format json` + * - GCE project ID from metadata server + * + * @returns projectId + */ + async findAndCacheProjectId() { + let projectId = null; + projectId ||= await this.getProductionProjectId(); + projectId ||= await this.getFileProjectId(); + projectId ||= await this.getDefaultServiceProjectId(); + projectId ||= await this.getGCEProjectId(); + projectId ||= await this.getExternalAccountClientProjectId(); + if (projectId) { + this._cachedProjectId = projectId; + return projectId; + } + else { + throw new Error(exports.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND); + } + } + async getProjectIdAsync() { + if (this._cachedProjectId) { + return this._cachedProjectId; + } + if (!this._findProjectIdPromise) { + this._findProjectIdPromise = this.findAndCacheProjectId(); + } + return this._findProjectIdPromise; + } + /** + * Retrieves a universe domain from the metadata server via + * {@link gcpMetadata.universe}. + * + * @returns a universe domain + */ + async getUniverseDomainFromMetadataServer() { + let universeDomain; + try { + universeDomain = await gcpMetadata.universe('universe-domain'); + universeDomain ||= authclient_1.DEFAULT_UNIVERSE; + } + catch (e) { + if (e && e?.response?.status === 404) { + universeDomain = authclient_1.DEFAULT_UNIVERSE; + } + else { + throw e; + } + } + return universeDomain; + } + /** + * Retrieves, caches, and returns the universe domain in the following order + * of precedence: + * - The universe domain in {@link GoogleAuth.clientOptions} + * - An existing or ADC {@link AuthClient}'s universe domain + * - {@link gcpMetadata.universe}, if {@link Compute} client + * + * @returns The universe domain + */ + async getUniverseDomain() { + let universeDomain = (0, util_1.originalOrCamelOptions)(this.clientOptions).get('universe_domain'); + try { + universeDomain ??= (await this.getClient()).universeDomain; + } + catch { + // client or ADC is not available + universeDomain ??= authclient_1.DEFAULT_UNIVERSE; + } + return universeDomain; + } + /** + * @returns Any scopes (user-specified or default scopes specified by the + * client library) that need to be set on the current Auth client. + */ + getAnyScopes() { + return this.scopes || this.defaultScopes; + } + getApplicationDefault(optionsOrCallback = {}, callback) { + let options; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else { + options = optionsOrCallback; + } + if (callback) { + this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback); + } + else { + return this.getApplicationDefaultAsync(options); + } + } + async getApplicationDefaultAsync(options = {}) { + // If we've already got a cached credential, return it. + // This will also preserve one's configured quota project, in case they + // set one directly on the credential previously. + if (this.cachedCredential) { + // cache, while preserving existing quota project preferences + return await this.#prepareAndCacheClient(this.cachedCredential, null); + } + let credential; + // Check for the existence of a local environment variable pointing to the + // location of the credential file. This is typically used in local + // developer scenarios. + credential = + await this._tryGetApplicationCredentialsFromEnvironmentVariable(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; + } + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); + } + return await this.#prepareAndCacheClient(credential); + } + // Look in the well-known credential file location. + credential = + await this._tryGetApplicationCredentialsFromWellKnownFile(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; + } + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); + } + return await this.#prepareAndCacheClient(credential); + } + // Determine if we're running on GCE. + if (await this._checkIsGCE()) { + options.scopes = this.getAnyScopes(); + return await this.#prepareAndCacheClient(new computeclient_1.Compute(options)); + } + throw new Error(exports.GoogleAuthExceptionMessages.NO_ADC_FOUND); + } + async #prepareAndCacheClient(credential, quotaProjectIdOverride = process.env['GOOGLE_CLOUD_QUOTA_PROJECT'] || null) { + const projectId = await this.getProjectIdOptional(); + if (quotaProjectIdOverride) { + credential.quotaProjectId = quotaProjectIdOverride; + } + this.cachedCredential = credential; + return { credential, projectId }; + } + /** + * Determines whether the auth layer is running on Google Compute Engine. + * Checks for GCP Residency, then fallback to checking if metadata server + * is available. + * + * @returns A promise that resolves with the boolean. + * @api private + */ + async _checkIsGCE() { + if (this.checkIsGCE === undefined) { + this.checkIsGCE = + gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable()); + } + return this.checkIsGCE; + } + /** + * Attempts to load default credentials from the environment variable path.. + * @returns Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromEnvironmentVariable(options) { + const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'] || + process.env['google_application_credentials']; + if (!credentialsPath || credentialsPath.length === 0) { + return null; + } + try { + return this._getApplicationCredentialsFromFilePath(credentialsPath, options); + } + catch (e) { + if (e instanceof Error) { + e.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`; + } + throw e; + } + } + /** + * Attempts to load default credentials from a well-known file location + * @return Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromWellKnownFile(options) { + // First, figure out the location of the file, depending upon the OS type. + let location = null; + if (this._isWindows()) { + // Windows + location = process.env['APPDATA']; + } + else { + // Linux or Mac + const home = process.env['HOME']; + if (home) { + location = path.join(home, '.config'); + } + } + // If we found the root path, expand it. + if (location) { + location = path.join(location, 'gcloud', 'application_default_credentials.json'); + if (!fs.existsSync(location)) { + location = null; + } + } + // The file does not exist. + if (!location) { + return null; + } + // The file seems to exist. Try to use it. + const client = await this._getApplicationCredentialsFromFilePath(location, options); + return client; + } + /** + * Attempts to load default credentials from a file at the given path.. + * @param filePath The path to the file to read. + * @returns Promise that resolves with the OAuth2Client + * @api private + */ + async _getApplicationCredentialsFromFilePath(filePath, options = {}) { + // Make sure the path looks like a string. + if (!filePath || filePath.length === 0) { + throw new Error('The file path is invalid.'); + } + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + filePath = fs.realpathSync(filePath); + if (!fs.lstatSync(filePath).isFile()) { + throw new Error(); + } + } + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`; + } + throw err; + } + // Now open a read stream on the file, and parse it. + const readStream = fs.createReadStream(filePath); + return this.fromStream(readStream, options); + } + /** + * Create a credentials instance using a given impersonated input options. + * @param json The impersonated input object. + * @returns JWT or UserRefresh Client with data + */ + fromImpersonatedJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing an impersonated refresh token'); + } + if (json.type !== impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + throw new Error(`The incoming JSON object does not have the "${impersonated_1.IMPERSONATED_ACCOUNT_TYPE}" type`); + } + if (!json.source_credentials) { + throw new Error('The incoming JSON object does not contain a source_credentials field'); + } + if (!json.service_account_impersonation_url) { + throw new Error('The incoming JSON object does not contain a service_account_impersonation_url field'); + } + const sourceClient = this.fromJSON(json.source_credentials); + if (json.service_account_impersonation_url?.length > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/85} + **/ + throw new RangeError(`Target principal is too long: ${json.service_account_impersonation_url}`); + } + // Extract service account from service_account_impersonation_url + const targetPrincipal = /(?[^/]+):(generateAccessToken|generateIdToken)$/.exec(json.service_account_impersonation_url)?.groups?.target; + if (!targetPrincipal) { + throw new RangeError(`Cannot extract target principal from ${json.service_account_impersonation_url}`); + } + const targetScopes = this.getAnyScopes() ?? []; + return new impersonated_1.Impersonated({ + ...json, + sourceClient, + targetPrincipal, + targetScopes: Array.isArray(targetScopes) ? targetScopes : [targetScopes], + }); + } + /** + * Create a credentials instance using the given input options. + * This client is not cached. + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + * + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + fromJSON(json, options = {}) { + let client; + // user's preferred universe domain + const preferredUniverseDomain = (0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (json.type === refreshclient_1.USER_REFRESH_ACCOUNT_TYPE) { + client = new refreshclient_1.UserRefreshClient(options); + client.fromJSON(json); + } + else if (json.type === impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + client = this.fromImpersonatedJSON(json); + } + else if (json.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + client = externalclient_1.ExternalAccountClient.fromJSON({ + ...json, + ...options, + }); + client.scopes = this.getAnyScopes(); + } + else if (json.type === externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) { + client = new externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient({ + ...json, + ...options, + }); + } + else { + options.scopes = this.scopes; + client = new jwtclient_1.JWT(options); + this.setGapicJWTValues(client); + client.fromJSON(json); + } + if (preferredUniverseDomain) { + client.universeDomain = preferredUniverseDomain; + } + return client; + } + /** + * Return a JWT or UserRefreshClient from JavaScript object, caching both the + * object used to instantiate and the client. + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + _cacheClientFromJSON(json, options) { + const client = this.fromJSON(json, options); + // cache both raw data used to instantiate client and client itself. + this.jsonContent = json; + this.cachedCredential = client; + return client; + } + fromStream(inputStream, optionsOrCallback = {}, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else { + options = optionsOrCallback; + } + if (callback) { + this.fromStreamAsync(inputStream, options).then(r => callback(null, r), callback); + } + else { + return this.fromStreamAsync(inputStream, options); + } + } + fromStreamAsync(inputStream, options) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the Google auth settings.'); + } + const chunks = []; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => chunks.push(chunk)) + .on('end', () => { + try { + try { + const data = JSON.parse(chunks.join('')); + const r = this._cacheClientFromJSON(data, options); + return resolve(r); + } + catch (err) { + // If we failed parsing this.keyFileName, assume that it + // is a PEM or p12 certificate: + if (!this.keyFilename) + throw err; + const client = new jwtclient_1.JWT({ + ...this.clientOptions, + keyFile: this.keyFilename, + }); + this.cachedCredential = client; + this.setGapicJWTValues(client); + return resolve(client); + } + } + catch (err) { + return reject(err); + } + }); + }); + } + /** + * Create a credentials instance using the given API key string. + * The created client is not cached. In order to create and cache it use the {@link GoogleAuth.getClient `getClient`} method after first providing an {@link GoogleAuth.apiKey `apiKey`}. + * + * @param apiKey The API key string + * @param options An optional options object. + * @returns A JWT loaded from the key + */ + fromAPIKey(apiKey, options = {}) { + return new jwtclient_1.JWT({ ...options, apiKey }); + } + /** + * Determines whether the current operating system is Windows. + * @api private + */ + _isWindows() { + const sys = os.platform(); + if (sys && sys.length >= 3) { + if (sys.substring(0, 3).toLowerCase() === 'win') { + return true; + } + } + return false; + } + /** + * Run the Google Cloud SDK command that prints the default project ID + */ + async getDefaultServiceProjectId() { + return new Promise(resolve => { + (0, child_process_1.exec)('gcloud config config-helper --format json', (err, stdout) => { + if (!err && stdout) { + try { + const projectId = JSON.parse(stdout).configuration.properties.core.project; + resolve(projectId); + return; + } + catch (e) { + // ignore errors + } + } + resolve(null); + }); + }); + } + /** + * Loads the project id from environment variables. + * @api private + */ + getProductionProjectId() { + return (process.env['GCLOUD_PROJECT'] || + process.env['GOOGLE_CLOUD_PROJECT'] || + process.env['gcloud_project'] || + process.env['google_cloud_project']); + } + /** + * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. + * @api private + */ + async getFileProjectId() { + if (this.cachedCredential) { + // Try to read the project ID from the cached credentials file + return this.cachedCredential.projectId; + } + // Ensure the projectId is loaded from the keyFile if available. + if (this.keyFilename) { + const creds = await this.getClient(); + if (creds && creds.projectId) { + return creds.projectId; + } + } + // Try to load a credentials file and read its project ID + const r = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); + if (r) { + return r.projectId; + } + else { + return null; + } + } + /** + * Gets the project ID from external account client if available. + */ + async getExternalAccountClientProjectId() { + if (!this.jsonContent || this.jsonContent.type !== baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + return null; + } + const creds = await this.getClient(); + // Do not suppress the underlying error, as the error could contain helpful + // information for debugging and fixing. This is especially true for + // external account creds as in order to get the project ID, the following + // operations have to succeed: + // 1. Valid credentials file should be supplied. + // 2. Ability to retrieve access tokens from STS token exchange API. + // 3. Ability to exchange for service account impersonated credentials (if + // enabled). + // 4. Ability to get project info using the access token from step 2 or 3. + // Without surfacing the error, it is harder for developers to determine + // which step went wrong. + return await creds.getProjectId(); + } + /** + * Gets the Compute Engine project ID if it can be inferred. + */ + async getGCEProjectId() { + try { + const r = await gcpMetadata.project('project-id'); + return r; + } + catch (e) { + // Ignore any errors + return null; + } + } + getCredentials(callback) { + if (callback) { + this.getCredentialsAsync().then(r => callback(null, r), callback); + } + else { + return this.getCredentialsAsync(); + } + } + async getCredentialsAsync() { + const client = await this.getClient(); + if (client instanceof impersonated_1.Impersonated) { + return { client_email: client.getTargetPrincipal() }; + } + if (client instanceof baseexternalclient_1.BaseExternalAccountClient) { + const serviceAccountEmail = client.getServiceAccountEmail(); + if (serviceAccountEmail) { + return { + client_email: serviceAccountEmail, + universe_domain: client.universeDomain, + }; + } + } + if (this.jsonContent) { + return { + client_email: this.jsonContent.client_email, + private_key: this.jsonContent.private_key, + universe_domain: this.jsonContent.universe_domain, + }; + } + if (await this._checkIsGCE()) { + const [client_email, universe_domain] = await Promise.all([ + gcpMetadata.instance('service-accounts/default/email'), + this.getUniverseDomain(), + ]); + return { client_email, universe_domain }; + } + throw new Error(exports.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); + } + /** + * Automatically obtain an {@link AuthClient `AuthClient`} based on the + * provided configuration. If no options were passed, use Application + * Default Credentials. + */ + async getClient() { + if (this.cachedCredential) { + return this.cachedCredential; + } + // Use an existing auth client request, or cache a new one + this.#pendingAuthClient = + this.#pendingAuthClient || this.#determineClient(); + try { + return await this.#pendingAuthClient; + } + finally { + // reset the pending auth client in case it is changed later + this.#pendingAuthClient = null; + } + } + async #determineClient() { + if (this.jsonContent) { + return this._cacheClientFromJSON(this.jsonContent, this.clientOptions); + } + else if (this.keyFilename) { + const filePath = path.resolve(this.keyFilename); + const stream = fs.createReadStream(filePath); + return await this.fromStreamAsync(stream, this.clientOptions); + } + else if (this.apiKey) { + const client = await this.fromAPIKey(this.apiKey, this.clientOptions); + client.scopes = this.scopes; + const { credential } = await this.#prepareAndCacheClient(client); + return credential; + } + else { + const { credential } = await this.getApplicationDefaultAsync(this.clientOptions); + return credential; + } + } + /** + * Creates a client which will fetch an ID token for authorization. + * @param targetAudience the audience for the fetched ID token. + * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. + */ + async getIdTokenClient(targetAudience) { + const client = await this.getClient(); + if (!('fetchIdToken' in client)) { + throw new Error('Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.'); + } + return new idtokenclient_1.IdTokenClient({ targetAudience, idTokenProvider: client }); + } + /** + * Automatically obtain application default credentials, and return + * an access token for making requests. + */ + async getAccessToken() { + const client = await this.getClient(); + return (await client.getAccessToken()).token; + } + /** + * Obtain the HTTP headers that will provide authorization for a given + * request. + */ + async getRequestHeaders(url) { + const client = await this.getClient(); + return client.getRequestHeaders(url); + } + /** + * Obtain credentials for a request, then attach the appropriate headers to + * the request options. + * @param opts Axios or Request options on which to attach the headers + */ + async authorizeRequest(opts = {}) { + const url = opts.url; + const client = await this.getClient(); + const headers = await client.getRequestHeaders(url); + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers, headers); + return opts; + } + /** + * A {@link fetch `fetch`} compliant API for {@link GoogleAuth}. + * + * @see {@link GoogleAuth.request} for the classic method. + * + * @remarks + * + * This is useful as a drop-in replacement for `fetch` API usage. + * + * @example + * + * ```ts + * const auth = new GoogleAuth(); + * const fetchWithAuth: typeof fetch = (...args) => auth.fetch(...args); + * await fetchWithAuth('https://example.com'); + * ``` + * + * @param args `fetch` API or {@link Gaxios.fetch `Gaxios#fetch`} parameters + * @returns the {@link GaxiosResponse} with Gaxios-added properties + */ + async fetch(...args) { + const client = await this.getClient(); + return client.fetch(...args); + } + /** + * Automatically obtain application default credentials, and make an + * HTTP request using the given options. + * + * @see {@link GoogleAuth.fetch} for the modern method. + * + * @param opts Axios request options for the HTTP request. + */ + async request(opts) { + const client = await this.getClient(); + return client.request(opts); + } + /** + * Determine the compute environment in which the code is running. + */ + getEnv() { + return (0, envDetect_1.getEnv)(); + } + /** + * Sign the given data with the current private key, or go out + * to the IAM API to sign it. + * @param data The data to be signed. + * @param endpoint A custom endpoint to use. + * + * @example + * ``` + * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); + * ``` + */ + async sign(data, endpoint) { + const client = await this.getClient(); + const universe = await this.getUniverseDomain(); + endpoint = + endpoint || + `https://iamcredentials.${universe}/v1/projects/-/serviceAccounts/`; + if (client instanceof impersonated_1.Impersonated) { + const signed = await client.sign(data); + return signed.signedBlob; + } + const crypto = (0, crypto_1.createCrypto)(); + if (client instanceof jwtclient_1.JWT && client.key) { + const sign = await crypto.sign(client.key, data); + return sign; + } + const creds = await this.getCredentials(); + if (!creds.client_email) { + throw new Error('Cannot sign data without `client_email`.'); + } + return this.signBlob(crypto, creds.client_email, data, endpoint); + } + async signBlob(crypto, emailOrUniqueId, data, endpoint) { + const url = new URL(endpoint + `${emailOrUniqueId}:signBlob`); + const res = await this.request({ + method: 'POST', + url: url.href, + data: { + payload: crypto.encodeBase64StringUtf8(data), + }, + retry: true, + retryConfig: { + httpMethodsToRetry: ['POST'], + }, + }); + return res.data.signedBlob; + } +} +exports.GoogleAuth = GoogleAuth; +//# sourceMappingURL=googleauth.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..93470a4439cb77cb5f703701f424c481306920a4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.d.ts @@ -0,0 +1,23 @@ +export interface RequestMetadata { + 'x-goog-iam-authority-selector': string; + 'x-goog-iam-authorization-token': string; +} +export declare class IAMAuth { + selector: string; + token: string; + /** + * IAM credentials. + * + * @param selector the iam authority selector + * @param token the token + * @constructor + */ + constructor(selector: string, token: string); + /** + * Acquire the HTTP headers required to make an authenticated request. + */ + getRequestHeaders(): { + 'x-goog-iam-authority-selector': string; + 'x-goog-iam-authorization-token': string; + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.js new file mode 100644 index 0000000000000000000000000000000000000000..d8999fd64de3eb97a75cce27b07883ef15258f64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/iam.js @@ -0,0 +1,44 @@ +"use strict"; +// Copyright 2014 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IAMAuth = void 0; +class IAMAuth { + selector; + token; + /** + * IAM credentials. + * + * @param selector the iam authority selector + * @param token the token + * @constructor + */ + constructor(selector, token) { + this.selector = selector; + this.token = token; + this.selector = selector; + this.token = token; + } + /** + * Acquire the HTTP headers required to make an authenticated request. + */ + getRequestHeaders() { + return { + 'x-goog-iam-authority-selector': this.selector, + 'x-goog-iam-authorization-token': this.token, + }; + } +} +exports.IAMAuth = IAMAuth; +//# sourceMappingURL=iam.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..19eb41dfbab0c30f13590b3614f328ae6490bf17 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.d.ts @@ -0,0 +1,132 @@ +import { BaseExternalAccountClient, BaseExternalAccountClientOptions, ExternalAccountSupplierContext } from './baseexternalclient'; +import { SnakeToCamelObject } from '../util'; +export type SubjectTokenFormatType = 'json' | 'text'; +export interface SubjectTokenJsonResponse { + [key: string]: string; +} +/** + * Supplier interface for subject tokens. This can be implemented to + * return a subject token which can then be exchanged for a GCP token by an + * {@link IdentityPoolClient}. + */ +export interface SubjectTokenSupplier { + /** + * Gets a valid subject token for the requested external account identity. + * Note that these are not cached by the calling {@link IdentityPoolClient}, + * so caching should be including in the implementation. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject token type + * for the external account identity as well as the transport from the + * calling client to use for requests. + * @return A promise that resolves with the requested subject token string. + */ + getSubjectToken: (context: ExternalAccountSupplierContext) => Promise; +} +/** + * Url-sourced/file-sourced credentials json interface. + * This is used for K8s and Azure workloads. + */ +export interface IdentityPoolClientOptions extends BaseExternalAccountClientOptions { + /** + * Object containing options to retrieve identity pool credentials. A valid credential + * source or a subject token supplier must be specified. + */ + credential_source?: { + /** + * The file location to read the subject token from. Either this, a URL + * or a certificate location should be specified. + */ + file?: string; + /** + * The URL to call to retrieve the subject token. Either this, a file + * location or a certificate location should be specified. + */ + url?: string; + /** + * Optional headers to send on the request to the specified URL. + */ + headers?: { + [key: string]: string; + }; + /** + * The format that the subject token is in the file or the URL response. + * If not provided, will default to reading the text string directly. + */ + format?: { + /** + * The format type. Can either be 'text' or 'json'. + */ + type: SubjectTokenFormatType; + /** + * The field name containing the subject token value if the type is 'json'. + */ + subject_token_field_name?: string; + }; + /** + * The certificate location to call to retrieve the subject token. Either this, a file + * location, or an url should be specified. + * @example + * File Format: + * ```json + * { + * "cert_configs": { + * "workload": { + * "key_path": "$PATH_TO_LEAF_KEY", + * "cert_path": "$PATH_TO_LEAF_CERT" + * } + * } + * } + * ``` + */ + certificate?: { + /** + * Specify whether the certificate config should be used from the default location. + * Either this or the certificate_config_location must be provided. + * The certificate config file must be in the following JSON format: + */ + use_default_certificate_config?: boolean; + /** + * Location to fetch certificate config from in case default config is not to be used. + * Either this or use_default_certificate_config=true should be provided. + */ + certificate_config_location?: string; + /** + * TrustChainPath specifies the path to a PEM-formatted file containing the X.509 certificate trust chain. + * The file should contain any intermediate certificates needed to connect + * the mTLS leaf certificate to a root certificate in the trust store. + */ + trust_chain_path?: string; + }; + }; + /** + * The subject token supplier to call to retrieve the subject token to exchange + * for a GCP access token. Either this or a valid credential source should + * be specified. + */ + subject_token_supplier?: SubjectTokenSupplier; +} +/** + * Defines the Url-sourced and file-sourced external account clients mainly + * used for K8s and Azure workloads. + */ +export declare class IdentityPoolClient extends BaseExternalAccountClient { + private readonly subjectTokenSupplier; + /** + * Instantiate an IdentityPoolClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid file-sourced or + * url-sourced credential or a workforce pool user project is provided + * with a non workforce audience. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + */ + constructor(options: IdentityPoolClientOptions | SnakeToCamelObject); + /** + * Triggered when a external subject token is needed to be exchanged for a GCP + * access token via GCP STS endpoint. Gets a subject token by calling + * the configured {@link SubjectTokenSupplier} + * @return A promise that resolves with the external subject token. + */ + retrieveSubjectToken(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.js new file mode 100644 index 0000000000000000000000000000000000000000..3b3f0b3bca016031e681c1882bcf92f11da899f8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/identitypoolclient.js @@ -0,0 +1,131 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdentityPoolClient = void 0; +const baseexternalclient_1 = require("./baseexternalclient"); +const util_1 = require("../util"); +const filesubjecttokensupplier_1 = require("./filesubjecttokensupplier"); +const urlsubjecttokensupplier_1 = require("./urlsubjecttokensupplier"); +const certificatesubjecttokensupplier_1 = require("./certificatesubjecttokensupplier"); +const stscredentials_1 = require("./stscredentials"); +const gaxios_1 = require("gaxios"); +/** + * Defines the Url-sourced and file-sourced external account clients mainly + * used for K8s and Azure workloads. + */ +class IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient { + subjectTokenSupplier; + /** + * Instantiate an IdentityPoolClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid file-sourced or + * url-sourced credential or a workforce pool user project is provided + * with a non workforce audience. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + */ + constructor(options) { + super(options); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const subjectTokenSupplier = opts.get('subject_token_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !subjectTokenSupplier) { + throw new Error('A credential source or subject token supplier must be specified.'); + } + if (credentialSource && subjectTokenSupplier) { + throw new Error('Only one of credential source or subject token supplier can be specified.'); + } + if (subjectTokenSupplier) { + this.subjectTokenSupplier = subjectTokenSupplier; + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + const formatOpts = (0, util_1.originalOrCamelOptions)(credentialSourceOpts.get('format')); + // Text is the default format type. + const formatType = formatOpts.get('type') || 'text'; + const formatSubjectTokenFieldName = formatOpts.get('subject_token_field_name'); + if (formatType !== 'json' && formatType !== 'text') { + throw new Error(`Invalid credential_source format "${formatType}"`); + } + if (formatType === 'json' && !formatSubjectTokenFieldName) { + throw new Error('Missing subject_token_field_name for JSON credential_source format'); + } + const file = credentialSourceOpts.get('file'); + const url = credentialSourceOpts.get('url'); + const certificate = credentialSourceOpts.get('certificate'); + const headers = credentialSourceOpts.get('headers'); + if ((file && url) || (url && certificate) || (file && certificate)) { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.'); + } + else if (file) { + this.credentialSourceType = 'file'; + this.subjectTokenSupplier = new filesubjecttokensupplier_1.FileSubjectTokenSupplier({ + filePath: file, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + }); + } + else if (url) { + this.credentialSourceType = 'url'; + this.subjectTokenSupplier = new urlsubjecttokensupplier_1.UrlSubjectTokenSupplier({ + url: url, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + headers: headers, + additionalGaxiosOptions: IdentityPoolClient.RETRY_CONFIG, + }); + } + else if (certificate) { + this.credentialSourceType = 'certificate'; + const certificateSubjecttokensupplier = new certificatesubjecttokensupplier_1.CertificateSubjectTokenSupplier({ + useDefaultCertificateConfig: certificate.use_default_certificate_config, + certificateConfigLocation: certificate.certificate_config_location, + trustChainPath: certificate.trust_chain_path, + }); + this.subjectTokenSupplier = certificateSubjecttokensupplier; + } + else { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.'); + } + } + } + /** + * Triggered when a external subject token is needed to be exchanged for a GCP + * access token via GCP STS endpoint. Gets a subject token by calling + * the configured {@link SubjectTokenSupplier} + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + const subjectToken = await this.subjectTokenSupplier.getSubjectToken(this.supplierContext); + if (this.subjectTokenSupplier instanceof certificatesubjecttokensupplier_1.CertificateSubjectTokenSupplier) { + const mtlsAgent = await this.subjectTokenSupplier.createMtlsHttpsAgent(); + this.stsCredential = new stscredentials_1.StsCredentials({ + tokenExchangeEndpoint: this.getTokenUrl(), + clientAuthentication: this.clientAuth, + transporter: new gaxios_1.Gaxios({ agent: mtlsAgent }), + }); + this.transporter = new gaxios_1.Gaxios({ + ...(this.transporter.defaults || {}), + agent: mtlsAgent, + }); + } + return subjectToken; + } +} +exports.IdentityPoolClient = IdentityPoolClient; +//# sourceMappingURL=identitypoolclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..78b80b454d7fe86a74525dc3474058193d98534a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.d.ts @@ -0,0 +1,27 @@ +import { OAuth2Client, OAuth2ClientOptions, RequestMetadataResponse } from './oauth2client'; +export interface IdTokenOptions extends OAuth2ClientOptions { + /** + * The client to make the request to fetch an ID token. + */ + idTokenProvider: IdTokenProvider; + /** + * The audience to use when requesting an ID token. + */ + targetAudience: string; +} +export interface IdTokenProvider { + fetchIdToken: (targetAudience: string) => Promise; +} +export declare class IdTokenClient extends OAuth2Client { + targetAudience: string; + idTokenProvider: IdTokenProvider; + /** + * Google ID Token client + * + * Retrieve ID token from the metadata server. + * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server + */ + constructor(options: IdTokenOptions); + protected getRequestMetadataAsync(): Promise; + private getIdTokenExpiryDate; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.js new file mode 100644 index 0000000000000000000000000000000000000000..7deb96e1f0104f5bb722fde9e1e4ac743aae5b2d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/idtokenclient.js @@ -0,0 +1,56 @@ +"use strict"; +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdTokenClient = void 0; +const oauth2client_1 = require("./oauth2client"); +class IdTokenClient extends oauth2client_1.OAuth2Client { + targetAudience; + idTokenProvider; + /** + * Google ID Token client + * + * Retrieve ID token from the metadata server. + * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server + */ + constructor(options) { + super(options); + this.targetAudience = options.targetAudience; + this.idTokenProvider = options.idTokenProvider; + } + async getRequestMetadataAsync() { + if (!this.credentials.id_token || + !this.credentials.expiry_date || + this.isTokenExpiring()) { + const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience); + this.credentials = { + id_token: idToken, + expiry_date: this.getIdTokenExpiryDate(idToken), + }; + } + const headers = new Headers({ + authorization: 'Bearer ' + this.credentials.id_token, + }); + return { headers }; + } + getIdTokenExpiryDate(idToken) { + const payloadB64 = idToken.split('.')[1]; + if (payloadB64) { + const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('ascii')); + return payload.exp * 1000; + } + } +} +exports.IdTokenClient = IdTokenClient; +//# sourceMappingURL=idtokenclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fed007ddc70dfd31b2132c3a923c8833a82a0ada --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.d.ts @@ -0,0 +1,127 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GetTokenResponse, OAuth2Client, OAuth2ClientOptions } from './oauth2client'; +import { AuthClient } from './authclient'; +import { IdTokenProvider } from './idtokenclient'; +import { SignBlobResponse } from './googleauth'; +export interface ImpersonatedOptions extends OAuth2ClientOptions { + /** + * Client used to perform exchange for impersonated client. + */ + sourceClient?: AuthClient; + /** + * The service account to impersonate. + */ + targetPrincipal?: string; + /** + * Scopes to request during the authorization grant. + */ + targetScopes?: string[]; + /** + * The chained list of delegates required to grant the final access_token. + */ + delegates?: string[]; + /** + * Number of seconds the delegated credential should be valid. + */ + lifetime?: number | 3600; + /** + * API endpoint to fetch token from. + */ + endpoint?: string; +} +export declare const IMPERSONATED_ACCOUNT_TYPE = "impersonated_service_account"; +export interface TokenResponse { + accessToken: string; + expireTime: string; +} +export interface FetchIdTokenOptions { + /** + * Include the service account email in the token. + * If set to `true`, the token will contain `email` and `email_verified` claims. + */ + includeEmail: boolean; +} +export interface FetchIdTokenResponse { + /** The OpenId Connect ID token. */ + token: string; +} +export declare class Impersonated extends OAuth2Client implements IdTokenProvider { + private sourceClient; + private targetPrincipal; + private targetScopes; + private delegates; + private lifetime; + private endpoint; + /** + * Impersonated service account credentials. + * + * Create a new access token by impersonating another service account. + * + * Impersonated Credentials allowing credentials issued to a user or + * service account to impersonate another. The source project using + * Impersonated Credentials must enable the "IAMCredentials" API. + * Also, the target service account must grant the orginating principal + * the "Service Account Token Creator" IAM role. + * + * @param {object} options - The configuration object. + * @param {object} [options.sourceClient] the source credential used as to + * acquire the impersonated credentials. + * @param {string} [options.targetPrincipal] the service account to + * impersonate. + * @param {string[]} [options.delegates] the chained list of delegates + * required to grant the final access_token. If set, the sequence of + * identities must have "Service Account Token Creator" capability granted to + * the preceding identity. For example, if set to [serviceAccountB, + * serviceAccountC], the sourceCredential must have the Token Creator role on + * serviceAccountB. serviceAccountB must have the Token Creator on + * serviceAccountC. Finally, C must have Token Creator on target_principal. + * If left unset, sourceCredential must have that role on targetPrincipal. + * @param {string[]} [options.targetScopes] scopes to request during the + * authorization grant. + * @param {number} [options.lifetime] number of seconds the delegated + * credential should be valid for up to 3600 seconds by default, or 43,200 + * seconds by extending the token's lifetime, see: + * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth + * @param {string} [options.endpoint] api endpoint override. + */ + constructor(options?: ImpersonatedOptions); + /** + * Signs some bytes. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} + * @param blobToSign String to sign. + * + * @returns A {@link SignBlobResponse} denoting the keyID and signedBlob in base64 string + */ + sign(blobToSign: string): Promise; + /** The service account email to be impersonated. */ + getTargetPrincipal(): string; + /** + * Refreshes the access token. + */ + protected refreshToken(): Promise; + /** + * Generates an OpenID Connect ID token for a service account. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} + * + * @param targetAudience the audience for the fetched ID token. + * @param options the for the request + * @return an OpenID Connect ID token + */ + fetchIdToken(targetAudience: string, options?: FetchIdTokenOptions): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.js new file mode 100644 index 0000000000000000000000000000000000000000..25643a40bb38ddf0e38998f88b6251f05f8a1330 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/impersonated.js @@ -0,0 +1,190 @@ +"use strict"; +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Impersonated = exports.IMPERSONATED_ACCOUNT_TYPE = void 0; +const oauth2client_1 = require("./oauth2client"); +const gaxios_1 = require("gaxios"); +const util_1 = require("../util"); +exports.IMPERSONATED_ACCOUNT_TYPE = 'impersonated_service_account'; +class Impersonated extends oauth2client_1.OAuth2Client { + sourceClient; + targetPrincipal; + targetScopes; + delegates; + lifetime; + endpoint; + /** + * Impersonated service account credentials. + * + * Create a new access token by impersonating another service account. + * + * Impersonated Credentials allowing credentials issued to a user or + * service account to impersonate another. The source project using + * Impersonated Credentials must enable the "IAMCredentials" API. + * Also, the target service account must grant the orginating principal + * the "Service Account Token Creator" IAM role. + * + * @param {object} options - The configuration object. + * @param {object} [options.sourceClient] the source credential used as to + * acquire the impersonated credentials. + * @param {string} [options.targetPrincipal] the service account to + * impersonate. + * @param {string[]} [options.delegates] the chained list of delegates + * required to grant the final access_token. If set, the sequence of + * identities must have "Service Account Token Creator" capability granted to + * the preceding identity. For example, if set to [serviceAccountB, + * serviceAccountC], the sourceCredential must have the Token Creator role on + * serviceAccountB. serviceAccountB must have the Token Creator on + * serviceAccountC. Finally, C must have Token Creator on target_principal. + * If left unset, sourceCredential must have that role on targetPrincipal. + * @param {string[]} [options.targetScopes] scopes to request during the + * authorization grant. + * @param {number} [options.lifetime] number of seconds the delegated + * credential should be valid for up to 3600 seconds by default, or 43,200 + * seconds by extending the token's lifetime, see: + * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth + * @param {string} [options.endpoint] api endpoint override. + */ + constructor(options = {}) { + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { + expiry_date: 1, + refresh_token: 'impersonated-placeholder', + }; + this.sourceClient = options.sourceClient ?? new oauth2client_1.OAuth2Client(); + this.targetPrincipal = options.targetPrincipal ?? ''; + this.delegates = options.delegates ?? []; + this.targetScopes = options.targetScopes ?? []; + this.lifetime = options.lifetime ?? 3600; + const usingExplicitUniverseDomain = !!(0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (!usingExplicitUniverseDomain) { + // override the default universe with the source's universe + this.universeDomain = this.sourceClient.universeDomain; + } + else if (this.sourceClient.universeDomain !== this.universeDomain) { + // non-default universe and is not matching the source - this could be a credential leak + throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`); + } + this.endpoint = + options.endpoint ?? `https://iamcredentials.${this.universeDomain}`; + } + /** + * Signs some bytes. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} + * @param blobToSign String to sign. + * + * @returns A {@link SignBlobResponse} denoting the keyID and signedBlob in base64 string + */ + async sign(blobToSign) { + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:signBlob`; + const body = { + delegates: this.delegates, + payload: Buffer.from(blobToSign).toString('base64'), + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data; + } + /** The service account email to be impersonated. */ + getTargetPrincipal() { + return this.targetPrincipal; + } + /** + * Refreshes the access token. + */ + async refreshToken() { + try { + await this.sourceClient.getAccessToken(); + const name = 'projects/-/serviceAccounts/' + this.targetPrincipal; + const u = `${this.endpoint}/v1/${name}:generateAccessToken`; + const body = { + delegates: this.delegates, + scope: this.targetScopes, + lifetime: this.lifetime + 's', + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + const tokenResponse = res.data; + this.credentials.access_token = tokenResponse.accessToken; + this.credentials.expiry_date = Date.parse(tokenResponse.expireTime); + return { + tokens: this.credentials, + res, + }; + } + catch (error) { + if (!(error instanceof Error)) + throw error; + let status = 0; + let message = ''; + if (error instanceof gaxios_1.GaxiosError) { + status = error?.response?.data?.error?.status; + message = error?.response?.data?.error?.message; + } + if (status && message) { + error.message = `${status}: unable to impersonate: ${message}`; + throw error; + } + else { + error.message = `unable to impersonate: ${error}`; + throw error; + } + } + } + /** + * Generates an OpenID Connect ID token for a service account. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} + * + * @param targetAudience the audience for the fetched ID token. + * @param options the for the request + * @return an OpenID Connect ID token + */ + async fetchIdToken(targetAudience, options) { + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:generateIdToken`; + const body = { + delegates: this.delegates, + audience: targetAudience, + includeEmail: options?.includeEmail ?? true, + useEmailAzp: options?.includeEmail ?? true, + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data.token; + } +} +exports.Impersonated = Impersonated; +//# sourceMappingURL=impersonated.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7467cfe749297c118734e6778903a7571673130c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts @@ -0,0 +1,61 @@ +import * as stream from 'stream'; +import { JWTInput } from './credentials'; +export interface Claims { + [index: string]: string; +} +export declare class JWTAccess { + email?: string | null; + key?: string | null; + keyId?: string | null; + projectId?: string; + eagerRefreshThresholdMillis: number; + private cache; + /** + * JWTAccess service account credentials. + * + * Create a new access token by using the credential to create a new JWT token + * that's recognized as the access token. + * + * @param email the service account email address. + * @param key the private key that will be used to sign the token. + * @param keyId the ID of the private key used to sign the token. + */ + constructor(email?: string | null, key?: string | null, keyId?: string | null, eagerRefreshThresholdMillis?: number); + /** + * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url + * + * @param url The URI being authorized. + * @param scopes The scope or scopes being authorized + * @returns A string that returns the cached key. + */ + getCachedKey(url?: string, scopes?: string | string[]): string; + /** + * Get a non-expired access token, after refreshing if necessary. + * + * @param url The URI being authorized. + * @param additionalClaims An object with a set of additional claims to + * include in the payload. + * @returns An object that includes the authorization header. + */ + getRequestHeaders(url?: string, additionalClaims?: Claims, scopes?: string | string[]): Headers; + /** + * Returns an expiration time for the JWT token. + * + * @param iat The issued at time for the JWT. + * @returns An expiration time for the JWT. + */ + private static getExpirationTime; + /** + * Create a JWTAccess credentials instance using the given input options. + * @param json The input object. + */ + fromJSON(json: JWTInput): void; + /** + * Create a JWTAccess credentials instance using the given input stream. + * @param inputStream The input stream. + * @param callback Optional callback. + */ + fromStream(inputStream: stream.Readable): Promise; + fromStream(inputStream: stream.Readable, callback: (err?: Error) => void): void; + private fromStreamAsync; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.js new file mode 100644 index 0000000000000000000000000000000000000000..1b3c6056b35994b8448f5c0f15efe447dae3a49c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtaccess.js @@ -0,0 +1,201 @@ +"use strict"; +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JWTAccess = void 0; +const jws = require("jws"); +const util_1 = require("../util"); +const DEFAULT_HEADER = { + alg: 'RS256', + typ: 'JWT', +}; +class JWTAccess { + email; + key; + keyId; + projectId; + eagerRefreshThresholdMillis; + cache = new util_1.LRUCache({ + capacity: 500, + maxAge: 60 * 60 * 1000, + }); + /** + * JWTAccess service account credentials. + * + * Create a new access token by using the credential to create a new JWT token + * that's recognized as the access token. + * + * @param email the service account email address. + * @param key the private key that will be used to sign the token. + * @param keyId the ID of the private key used to sign the token. + */ + constructor(email, key, keyId, eagerRefreshThresholdMillis) { + this.email = email; + this.key = key; + this.keyId = keyId; + this.eagerRefreshThresholdMillis = + eagerRefreshThresholdMillis ?? 5 * 60 * 1000; + } + /** + * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url + * + * @param url The URI being authorized. + * @param scopes The scope or scopes being authorized + * @returns A string that returns the cached key. + */ + getCachedKey(url, scopes) { + let cacheKey = url; + if (scopes && Array.isArray(scopes) && scopes.length) { + cacheKey = url ? `${url}_${scopes.join('_')}` : `${scopes.join('_')}`; + } + else if (typeof scopes === 'string') { + cacheKey = url ? `${url}_${scopes}` : scopes; + } + if (!cacheKey) { + throw Error('Scopes or url must be provided'); + } + return cacheKey; + } + /** + * Get a non-expired access token, after refreshing if necessary. + * + * @param url The URI being authorized. + * @param additionalClaims An object with a set of additional claims to + * include in the payload. + * @returns An object that includes the authorization header. + */ + getRequestHeaders(url, additionalClaims, scopes) { + // Return cached authorization headers, unless we are within + // eagerRefreshThresholdMillis ms of them expiring: + const key = this.getCachedKey(url, scopes); + const cachedToken = this.cache.get(key); + const now = Date.now(); + if (cachedToken && + cachedToken.expiration - now > this.eagerRefreshThresholdMillis) { + // Copying headers into a new `Headers` object to avoid potential leakage - + // as this is a cache it is possible for multiple requests to reference this + // same value. + return new Headers(cachedToken.headers); + } + const iat = Math.floor(Date.now() / 1000); + const exp = JWTAccess.getExpirationTime(iat); + let defaultClaims; + // Turn scopes into space-separated string + if (Array.isArray(scopes)) { + scopes = scopes.join(' '); + } + // If scopes are specified, sign with scopes + if (scopes) { + defaultClaims = { + iss: this.email, + sub: this.email, + scope: scopes, + exp, + iat, + }; + } + else { + defaultClaims = { + iss: this.email, + sub: this.email, + aud: url, + exp, + iat, + }; + } + // if additionalClaims are provided, ensure they do not collide with + // other required claims. + if (additionalClaims) { + for (const claim in defaultClaims) { + if (additionalClaims[claim]) { + throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); + } + } + } + const header = this.keyId + ? { ...DEFAULT_HEADER, kid: this.keyId } + : DEFAULT_HEADER; + const payload = Object.assign(defaultClaims, additionalClaims); + // Sign the jwt and add it to the cache + const signedJWT = jws.sign({ header, payload, secret: this.key }); + const headers = new Headers({ authorization: `Bearer ${signedJWT}` }); + this.cache.set(key, { + expiration: exp * 1000, + headers, + }); + return headers; + } + /** + * Returns an expiration time for the JWT token. + * + * @param iat The issued at time for the JWT. + * @returns An expiration time for the JWT. + */ + static getExpirationTime(iat) { + const exp = iat + 3600; // 3600 seconds = 1 hour + return exp; + } + /** + * Create a JWTAccess credentials instance using the given input options. + * @param json The input object. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); + } + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); + } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); + } + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + reject(new Error('Must pass in a stream containing the service account auth settings.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('data', chunk => (s += chunk)) + .on('error', reject) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (err) { + reject(err); + } + }); + }); + } +} +exports.JWTAccess = JWTAccess; +//# sourceMappingURL=jwtaccess.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..37cfaac9e1a99e6c1f1daef8e474946f1ccf10f0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts @@ -0,0 +1,137 @@ +import { GoogleToken } from 'gtoken'; +import * as stream from 'stream'; +import { CredentialBody, Credentials, JWTInput } from './credentials'; +import { IdTokenProvider } from './idtokenclient'; +import { GetTokenResponse, OAuth2Client, OAuth2ClientOptions, RequestMetadataResponse } from './oauth2client'; +export interface JWTOptions extends OAuth2ClientOptions { + /** + * The service account email address. + */ + email?: string; + /** + * The path to private key file. Not necessary if {@link JWTOptions.key} has been provided. + */ + keyFile?: string; + /** + * The value of key. Not necessary if {@link JWTOptions.keyFile} has been provided. + */ + key?: string; + /** + * The list of requested scopes or a single scope. + */ + keyId?: string; + /** + * The impersonated account's email address. + */ + scopes?: string | string[]; + /** + * The ID of the key. + */ + subject?: string; + /** + * Additional claims, such as target audience. + * + * @example + * ``` + * {target_audience: 'targetAudience'} + * ``` + */ + additionalClaims?: {}; +} +export declare class JWT extends OAuth2Client implements IdTokenProvider { + email?: string; + keyFile?: string; + key?: string; + keyId?: string; + defaultScopes?: string | string[]; + scopes?: string | string[]; + scope?: string; + subject?: string; + gtoken?: GoogleToken; + additionalClaims?: {}; + useJWTAccessWithScope?: boolean; + defaultServicePath?: string; + private access?; + /** + * JWT service account credentials. + * + * Retrieve access token using gtoken. + * + * @param options the + */ + constructor(options?: JWTOptions); + /** + * Creates a copy of the credential with the specified scopes. + * @param scopes List of requested scopes or a single scope. + * @return The cloned instance. + */ + createScoped(scopes?: string | string[]): JWT; + /** + * Obtains the metadata to be sent with the request. + * + * @param url the URI being authorized. + */ + protected getRequestMetadataAsync(url?: string | null): Promise; + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + fetchIdToken(targetAudience: string): Promise; + /** + * Determine if there are currently scopes available. + */ + private hasUserScopes; + /** + * Are there any default or user scopes defined. + */ + private hasAnyScopes; + /** + * Get the initial access token using gToken. + * @param callback Optional callback. + * @returns Promise that resolves with credentials + */ + authorize(): Promise; + authorize(callback: (err: Error | null, result?: Credentials) => void): void; + private authorizeAsync; + /** + * Refreshes the access token. + * @param refreshToken ignored + * @private + */ + protected refreshTokenNoCache(): Promise; + /** + * Create a gToken if it doesn't already exist. + */ + private createGToken; + /** + * Create a JWT credentials instance using the given input options. + * @param json The input object. + * + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + */ + fromJSON(json: JWTInput): void; + /** + * Create a JWT credentials instance using the given input stream. + * @param inputStream The input stream. + * @param callback Optional callback. + * + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + */ + fromStream(inputStream: stream.Readable): Promise; + fromStream(inputStream: stream.Readable, callback: (err?: Error | null) => void): void; + private fromStreamAsync; + /** + * Creates a JWT credentials instance using an API Key for authentication. + * @param apiKey The API Key in string form. + */ + fromAPIKey(apiKey: string): void; + /** + * Using the key or keyFile on the JWT client, obtain an object that contains + * the key and the client email. + */ + getCredentials(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.js new file mode 100644 index 0000000000000000000000000000000000000000..d51eab60c41e942c16b51eb5e006267a9d65502d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/jwtclient.js @@ -0,0 +1,300 @@ +"use strict"; +// Copyright 2013 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JWT = void 0; +const gtoken_1 = require("gtoken"); +const jwtaccess_1 = require("./jwtaccess"); +const oauth2client_1 = require("./oauth2client"); +const authclient_1 = require("./authclient"); +class JWT extends oauth2client_1.OAuth2Client { + email; + keyFile; + key; + keyId; + defaultScopes; + scopes; + scope; + subject; + gtoken; + additionalClaims; + useJWTAccessWithScope; + defaultServicePath; + access; + /** + * JWT service account credentials. + * + * Retrieve access token using gtoken. + * + * @param options the + */ + constructor(options = {}) { + super(options); + this.email = options.email; + this.keyFile = options.keyFile; + this.key = options.key; + this.keyId = options.keyId; + this.scopes = options.scopes; + this.subject = options.subject; + this.additionalClaims = options.additionalClaims; + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 }; + } + /** + * Creates a copy of the credential with the specified scopes. + * @param scopes List of requested scopes or a single scope. + * @return The cloned instance. + */ + createScoped(scopes) { + const jwt = new JWT(this); + jwt.scopes = scopes; + return jwt; + } + /** + * Obtains the metadata to be sent with the request. + * + * @param url the URI being authorized. + */ + async getRequestMetadataAsync(url) { + url = this.defaultServicePath ? `https://${this.defaultServicePath}/` : url; + const useSelfSignedJWT = (!this.hasUserScopes() && url) || + (this.useJWTAccessWithScope && this.hasAnyScopes()) || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + if (this.subject && this.universeDomain !== authclient_1.DEFAULT_UNIVERSE) { + throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${authclient_1.DEFAULT_UNIVERSE}`); + } + if (!this.apiKey && useSelfSignedJWT) { + if (this.additionalClaims && + this.additionalClaims.target_audience) { + const { tokens } = await this.refreshToken(); + return { + headers: this.addSharedMetadataHeaders(new Headers({ + authorization: `Bearer ${tokens.id_token}`, + })), + }; + } + else { + // no scopes have been set, but a uri has been provided. Use JWTAccess + // credentials. + if (!this.access) { + this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis); + } + let scopes; + if (this.hasUserScopes()) { + scopes = this.scopes; + } + else if (!url) { + scopes = this.defaultScopes; + } + const useScopes = this.useJWTAccessWithScope || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + const headers = await this.access.getRequestHeaders(url ?? undefined, this.additionalClaims, + // Scopes take precedent over audience for signing, + // so we only provide them if `useJWTAccessWithScope` is on or + // if we are in a non-default universe + useScopes ? scopes : undefined); + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + else if (this.hasAnyScopes() || this.apiKey) { + return super.getRequestMetadataAsync(url); + } + else { + // If no audience, apiKey, or scopes are provided, we should not attempt + // to populate any headers: + return { headers: new Headers() }; + } + } + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + async fetchIdToken(targetAudience) { + // Create a new gToken for fetching an ID token + const gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: { target_audience: targetAudience }, + transporter: this.transporter, + }); + await gtoken.getToken({ + forceRefresh: true, + }); + if (!gtoken.idToken) { + throw new Error('Unknown error: Failed to fetch ID token'); + } + return gtoken.idToken; + } + /** + * Determine if there are currently scopes available. + */ + hasUserScopes() { + if (!this.scopes) { + return false; + } + return this.scopes.length > 0; + } + /** + * Are there any default or user scopes defined. + */ + hasAnyScopes() { + if (this.scopes && this.scopes.length > 0) + return true; + if (this.defaultScopes && this.defaultScopes.length > 0) + return true; + return false; + } + authorize(callback) { + if (callback) { + this.authorizeAsync().then(r => callback(null, r), callback); + } + else { + return this.authorizeAsync(); + } + } + async authorizeAsync() { + const result = await this.refreshToken(); + if (!result) { + throw new Error('No result returned'); + } + this.credentials = result.tokens; + this.credentials.refresh_token = 'jwt-placeholder'; + this.key = this.gtoken.key; + this.email = this.gtoken.iss; + return result.tokens; + } + /** + * Refreshes the access token. + * @param refreshToken ignored + * @private + */ + async refreshTokenNoCache() { + const gtoken = this.createGToken(); + const token = await gtoken.getToken({ + forceRefresh: this.isTokenExpiring(), + }); + const tokens = { + access_token: token.access_token, + token_type: 'Bearer', + expiry_date: gtoken.expiresAt, + id_token: gtoken.idToken, + }; + this.emit('tokens', tokens); + return { res: null, tokens }; + } + /** + * Create a gToken if it doesn't already exist. + */ + createGToken() { + if (!this.gtoken) { + this.gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: this.additionalClaims, + transporter: this.transporter, + }); + } + return this.gtoken; + } + /** + * Create a JWT credentials instance using the given input options. + * @param json The input object. + * + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); + } + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); + } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); + } + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the service account auth settings.'); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (e) { + reject(e); + } + }); + }); + } + /** + * Creates a JWT credentials instance using an API Key for authentication. + * @param apiKey The API Key in string form. + */ + fromAPIKey(apiKey) { + if (typeof apiKey !== 'string') { + throw new Error('Must provide an API Key string.'); + } + this.apiKey = apiKey; + } + /** + * Using the key or keyFile on the JWT client, obtain an object that contains + * the key and the client email. + */ + async getCredentials() { + if (this.key) { + return { private_key: this.key, client_email: this.email }; + } + else if (this.keyFile) { + const gtoken = this.createGToken(); + const creds = await gtoken.getCredentials(this.keyFile); + return { private_key: creds.privateKey, client_email: creds.clientEmail }; + } + throw new Error('A key or a keyFile must be provided to getCredentials.'); + } +} +exports.JWT = JWT; +//# sourceMappingURL=jwtclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..33fd407a648d7904313936ccd016d81324a1a3fb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.d.ts @@ -0,0 +1,140 @@ +export declare class LoginTicket { + private envelope?; + private payload?; + /** + * Create a simple class to extract user ID from an ID Token + * + * @param {string} env Envelope of the jwt + * @param {TokenPayload} pay Payload of the jwt + * @constructor + */ + constructor(env?: string, pay?: TokenPayload); + getEnvelope(): string | undefined; + getPayload(): TokenPayload | undefined; + /** + * Create a simple class to extract user ID from an ID Token + * + * @return The user ID + */ + getUserId(): string | null; + /** + * Returns attributes from the login ticket. This can contain + * various information about the user session. + * + * @return The envelope and payload + */ + getAttributes(): { + envelope: string | undefined; + payload: TokenPayload | undefined; + }; +} +export interface TokenPayload { + /** + * The Issuer Identifier for the Issuer of the response. Always + * https://accounts.google.com or accounts.google.com for Google ID tokens. + */ + iss: string; + /** + * Access token hash. Provides validation that the access token is tied to the + * identity token. If the ID token is issued with an access token in the + * server flow, this is always included. This can be used as an alternate + * mechanism to protect against cross-site request forgery attacks, but if you + * follow Step 1 and Step 3 it is not necessary to verify the access token. + */ + at_hash?: string; + /** + * True if the user's e-mail address has been verified; otherwise false. + */ + email_verified?: boolean; + /** + * An identifier for the user, unique among all Google accounts and never + * reused. A Google account can have multiple emails at different points in + * time, but the sub value is never changed. Use sub within your application + * as the unique-identifier key for the user. + */ + sub: string; + /** + * The client_id of the authorized presenter. This claim is only needed when + * the party requesting the ID token is not the same as the audience of the ID + * token. This may be the case at Google for hybrid apps where a web + * application and Android app have a different client_id but share the same + * project. + */ + azp?: string; + /** + * The user's email address. This may not be unique and is not suitable for + * use as a primary key. Provided only if your scope included the string + * "email". + */ + email?: string; + /** + * The URL of the user's profile page. Might be provided when: + * - The request scope included the string "profile" + * - The ID token is returned from a token refresh + * - When profile claims are present, you can use them to update your app's + * user records. Note that this claim is never guaranteed to be present. + */ + profile?: string; + /** + * The URL of the user's profile picture. Might be provided when: + * - The request scope included the string "profile" + * - The ID token is returned from a token refresh + * - When picture claims are present, you can use them to update your app's + * user records. Note that this claim is never guaranteed to be present. + */ + picture?: string; + /** + * The user's full name, in a displayable form. Might be provided when: + * - The request scope included the string "profile" + * - The ID token is returned from a token refresh + * - When name claims are present, you can use them to update your app's user + * records. Note that this claim is never guaranteed to be present. + */ + name?: string; + /** + * The user's given name, in a displayable form. Might be provided when: + * - The request scope included the string "profile" + * - The ID token is returned from a token refresh + * - When name claims are present, you can use them to update your app's user + * records. Note that this claim is never guaranteed to be present. + */ + given_name?: string; + /** + * The user's family name, in a displayable form. Might be provided when: + * - The request scope included the string "profile" + * - The ID token is returned from a token refresh + * - When name claims are present, you can use them to update your app's user + * records. Note that this claim is never guaranteed to be present. + */ + family_name?: string; + /** + * Identifies the audience that this ID token is intended for. It must be one + * of the OAuth 2.0 client IDs of your application. + */ + aud: string; + /** + * The time the ID token was issued, represented in Unix time (integer + * seconds). + */ + iat: number; + /** + * The time the ID token expires, represented in Unix time (integer seconds). + */ + exp: number; + /** + * The value of the nonce supplied by your app in the authentication request. + * You should enforce protection against replay attacks by ensuring it is + * presented only once. + */ + nonce?: string; + /** + * The hosted G Suite domain of the user. Provided only if the user belongs to + * a hosted domain. + */ + hd?: string; + /** + * The user's locale, represented by a BCP 47 language tag. + * Might be provided when a name claim is present. + */ + locale?: string; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.js new file mode 100644 index 0000000000000000000000000000000000000000..858e6a5d2a371092f78d3d774b5409407659a994 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/loginticket.js @@ -0,0 +1,60 @@ +"use strict"; +// Copyright 2014 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LoginTicket = void 0; +class LoginTicket { + envelope; + payload; + /** + * Create a simple class to extract user ID from an ID Token + * + * @param {string} env Envelope of the jwt + * @param {TokenPayload} pay Payload of the jwt + * @constructor + */ + constructor(env, pay) { + this.envelope = env; + this.payload = pay; + } + getEnvelope() { + return this.envelope; + } + getPayload() { + return this.payload; + } + /** + * Create a simple class to extract user ID from an ID Token + * + * @return The user ID + */ + getUserId() { + const payload = this.getPayload(); + if (payload && payload.sub) { + return payload.sub; + } + return null; + } + /** + * Returns attributes from the login ticket. This can contain + * various information about the user session. + * + * @return The envelope and payload + */ + getAttributes() { + return { envelope: this.getEnvelope(), payload: this.getPayload() }; + } +} +exports.LoginTicket = LoginTicket; +//# sourceMappingURL=loginticket.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..adce0da181ffe5d56857629236352ba283c67542 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts @@ -0,0 +1,610 @@ +import { GaxiosError, GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; +import * as querystring from 'querystring'; +import { JwkCertificate } from '../crypto/crypto'; +import { AuthClient, AuthClientOptions, GetAccessTokenResponse, BodyResponseCallback } from './authclient'; +import { Credentials } from './credentials'; +import { LoginTicket } from './loginticket'; +/** + * The results from the `generateCodeVerifierAsync` method. To learn more, + * See the sample: + * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js + */ +export interface CodeVerifierResults { + /** + * The code verifier that will be used when calling `getToken` to obtain a new + * access token. + */ + codeVerifier: string; + /** + * The code_challenge that should be sent with the `generateAuthUrl` call + * to obtain a verifiable authentication url. + */ + codeChallenge?: string; +} +export interface Certificates { + [index: string]: string | JwkCertificate; +} +export interface PublicKeys { + [index: string]: string; +} +export declare enum CodeChallengeMethod { + Plain = "plain", + S256 = "S256" +} +export declare enum CertificateFormat { + PEM = "PEM", + JWK = "JWK" +} +/** + * The client authentication type. Supported values are basic, post, and none. + * https://datatracker.ietf.org/doc/html/rfc7591#section-2 + */ +export declare enum ClientAuthentication { + ClientSecretPost = "ClientSecretPost", + ClientSecretBasic = "ClientSecretBasic", + None = "None" +} +export interface GetTokenOptions { + code: string; + codeVerifier?: string; + /** + * The client ID for your application. The value passed into the constructor + * will be used if not provided. Must match any client_id option passed to + * a corresponding call to generateAuthUrl. + */ + client_id?: string; + /** + * Determines where the API server redirects the user after the user + * completes the authorization flow. The value passed into the constructor + * will be used if not provided. Must match any redirect_uri option passed to + * a corresponding call to generateAuthUrl. + */ + redirect_uri?: string; +} +export interface TokenInfo { + /** + * The application that is the intended user of the access token. + */ + aud: string; + /** + * This value lets you correlate profile information from multiple Google + * APIs. It is only present in the response if you included the profile scope + * in your request in step 1. The field value is an immutable identifier for + * the logged-in user that can be used to create and manage user sessions in + * your application. The identifier is the same regardless of which client ID + * is used to retrieve it. This enables multiple applications in the same + * organization to correlate profile information. + */ + user_id?: string; + /** + * An array of scopes that the user granted access to. + */ + scopes: string[]; + /** + * The datetime when the token becomes invalid. + */ + expiry_date: number; + /** + * An identifier for the user, unique among all Google accounts and never + * reused. A Google account can have multiple emails at different points in + * time, but the sub value is never changed. Use sub within your application + * as the unique-identifier key for the user. + */ + sub?: string; + /** + * The client_id of the authorized presenter. This claim is only needed when + * the party requesting the ID token is not the same as the audience of the ID + * token. This may be the case at Google for hybrid apps where a web + * application and Android app have a different client_id but share the same + * project. + */ + azp?: string; + /** + * Indicates whether your application can refresh access tokens + * when the user is not present at the browser. Valid parameter values are + * 'online', which is the default value, and 'offline'. Set the value to + * 'offline' if your application needs to refresh access tokens when the user + * is not present at the browser. This value instructs the Google + * authorization server to return a refresh token and an access token the + * first time that your application exchanges an authorization code for + * tokens. + */ + access_type?: string; + /** + * The user's email address. This value may not be unique to this user and + * is not suitable for use as a primary key. Provided only if your scope + * included the email scope value. + */ + email?: string; + /** + * True if the user's e-mail address has been verified; otherwise false. + */ + email_verified?: boolean; +} +export interface GenerateAuthUrlOpts { + /** + * Recommended. Indicates whether your application can refresh access tokens + * when the user is not present at the browser. Valid parameter values are + * 'online', which is the default value, and 'offline'. Set the value to + * 'offline' if your application needs to refresh access tokens when the user + * is not present at the browser. This value instructs the Google + * authorization server to return a refresh token and an access token the + * first time that your application exchanges an authorization code for + * tokens. + */ + access_type?: string; + /** + * The hd (hosted domain) parameter streamlines the login process for G Suite + * hosted accounts. By including the domain of the G Suite user (for example, + * mycollege.edu), you can indicate that the account selection UI should be + * optimized for accounts at that domain. To optimize for G Suite accounts + * generally instead of just one domain, use an asterisk: hd=*. + * Don't rely on this UI optimization to control who can access your app, + * as client-side requests can be modified. Be sure to validate that the + * returned ID token has an hd claim value that matches what you expect + * (e.g. mycolledge.edu). Unlike the request parameter, the ID token claim is + * contained within a security token from Google, so the value can be trusted. + */ + hd?: string; + /** + * The 'response_type' will always be set to 'CODE'. + */ + response_type?: string; + /** + * The client ID for your application. The value passed into the constructor + * will be used if not provided. You can find this value in the API Console. + */ + client_id?: string; + /** + * Determines where the API server redirects the user after the user + * completes the authorization flow. The value must exactly match one of the + * 'redirect_uri' values listed for your project in the API Console. Note that + * the http or https scheme, case, and trailing slash ('/') must all match. + * The value passed into the constructor will be used if not provided. + */ + redirect_uri?: string; + /** + * Required. A space-delimited list of scopes that identify the resources that + * your application could access on the user's behalf. These values inform the + * consent screen that Google displays to the user. Scopes enable your + * application to only request access to the resources that it needs while + * also enabling users to control the amount of access that they grant to your + * application. Thus, there is an inverse relationship between the number of + * scopes requested and the likelihood of obtaining user consent. The + * OAuth 2.0 API Scopes document provides a full list of scopes that you might + * use to access Google APIs. We recommend that your application request + * access to authorization scopes in context whenever possible. By requesting + * access to user data in context, via incremental authorization, you help + * users to more easily understand why your application needs the access it is + * requesting. + */ + scope?: string[] | string; + /** + * Recommended. Specifies any string value that your application uses to + * maintain state between your authorization request and the authorization + * server's response. The server returns the exact value that you send as a + * name=value pair in the hash (#) fragment of the 'redirect_uri' after the + * user consents to or denies your application's access request. You can use + * this parameter for several purposes, such as directing the user to the + * correct resource in your application, sending nonces, and mitigating + * cross-site request forgery. Since your redirect_uri can be guessed, using a + * state value can increase your assurance that an incoming connection is the + * result of an authentication request. If you generate a random string or + * encode the hash of a cookie or another value that captures the client's + * state, you can validate the response to additionally ensure that the + * request and response originated in the same browser, providing protection + * against attacks such as cross-site request forgery. See the OpenID Connect + * documentation for an example of how to create and confirm a state token. + */ + state?: string; + /** + * Optional. Enables applications to use incremental authorization to request + * access to additional scopes in context. If you set this parameter's value + * to true and the authorization request is granted, then the new access token + * will also cover any scopes to which the user previously granted the + * application access. See the incremental authorization section for examples. + */ + include_granted_scopes?: boolean; + /** + * Optional. If your application knows which user is trying to authenticate, + * it can use this parameter to provide a hint to the Google Authentication + * Server. The server uses the hint to simplify the login flow either by + * prefilling the email field in the sign-in form or by selecting the + * appropriate multi-login session. Set the parameter value to an email + * address or sub identifier, which is equivalent to the user's Google ID. + */ + login_hint?: string; + /** + * Optional. A space-delimited, case-sensitive list of prompts to present the + * user. If you don't specify this parameter, the user will be prompted only + * the first time your app requests access. Possible values are: + * + * 'none' - Donot display any authentication or consent screens. Must not be + * specified with other values. + * 'consent' - Prompt the user for consent. + * 'select_account' - Prompt the user to select an account. + */ + prompt?: string; + /** + * Recommended. Specifies what method was used to encode a 'code_verifier' + * that will be used during authorization code exchange. This parameter must + * be used with the 'code_challenge' parameter. The value of the + * 'code_challenge_method' defaults to "plain" if not present in the request + * that includes a 'code_challenge'. The only supported values for this + * parameter are "S256" or "plain". + */ + code_challenge_method?: CodeChallengeMethod; + /** + * Recommended. Specifies an encoded 'code_verifier' that will be used as a + * server-side challenge during authorization code exchange. This parameter + * must be used with the 'code_challenge' parameter described above. + */ + code_challenge?: string; + /** + * A way for developers and/or the auth team to provide a set of key value + * pairs to be added as query parameters to the authorization url. + */ + [key: string]: querystring.ParsedUrlQueryInput[keyof querystring.ParsedUrlQueryInput]; +} +export interface AccessTokenResponse { + access_token: string; + expiry_date: number; +} +export interface GetRefreshHandlerCallback { + (): Promise; +} +export interface GetTokenCallback { + (err: GaxiosError | null, token?: Credentials | null, res?: GaxiosResponse | null): void; +} +export interface GetTokenResponse { + tokens: Credentials; + res: GaxiosResponse | null; +} +export interface GetAccessTokenCallback { + (err: GaxiosError | null, token?: string | null, res?: GaxiosResponse | null): void; +} +export interface RefreshAccessTokenCallback { + (err: GaxiosError | null, credentials?: Credentials | null, res?: GaxiosResponse | null): void; +} +export interface RefreshAccessTokenResponse { + credentials: Credentials; + res: GaxiosResponse | null; +} +export interface RequestMetadataResponse { + headers: Headers; + res?: GaxiosResponse | null; +} +export interface RequestMetadataCallback { + (err: GaxiosError | null, headers?: Headers, res?: GaxiosResponse | null): void; +} +export interface GetFederatedSignonCertsCallback { + (err: GaxiosError | null, certs?: Certificates, response?: GaxiosResponse | null): void; +} +export interface FederatedSignonCertsResponse { + certs: Certificates; + format: CertificateFormat; + res?: GaxiosResponse | null; +} +export interface GetIapPublicKeysCallback { + (err: GaxiosError | null, pubkeys?: PublicKeys, response?: GaxiosResponse | null): void; +} +export interface IapPublicKeysResponse { + pubkeys: PublicKeys; + res?: GaxiosResponse | null; +} +export interface RevokeCredentialsResult { + success: boolean; +} +export interface VerifyIdTokenOptions { + idToken: string; + audience?: string | string[]; + maxExpiry?: number; +} +export interface OAuth2ClientEndpoints { + /** + * The endpoint for viewing access token information + * + * @example + * 'https://oauth2.googleapis.com/tokeninfo' + */ + tokenInfoUrl: string | URL; + /** + * The base URL for auth endpoints. + * + * @example + * 'https://accounts.google.com/o/oauth2/v2/auth' + */ + oauth2AuthBaseUrl: string | URL; + /** + * The base endpoint for token retrieval + * . + * @example + * 'https://oauth2.googleapis.com/token' + */ + oauth2TokenUrl: string | URL; + /** + * The base endpoint to revoke tokens. + * + * @example + * 'https://oauth2.googleapis.com/revoke' + */ + oauth2RevokeUrl: string | URL; + /** + * Sign on certificates in PEM format. + * + * @example + * 'https://www.googleapis.com/oauth2/v1/certs' + */ + oauth2FederatedSignonPemCertsUrl: string | URL; + /** + * Sign on certificates in JWK format. + * + * @example + * 'https://www.googleapis.com/oauth2/v3/certs' + */ + oauth2FederatedSignonJwkCertsUrl: string | URL; + /** + * IAP Public Key URL. + * This URL contains a JSON dictionary that maps the `kid` claims to the public key values. + * + * @example + * 'https://www.gstatic.com/iap/verify/public_key' + */ + oauth2IapPublicKeyUrl: string | URL; +} +/** + * A convenient interface for those looking to pass the OAuth2 Client config via a parsed + * JSON file. + */ +interface OAuth2JSONOptions { + /** + * The authentication client ID. + * + * @alias {@link OAuth2ClientOptions.clientId} + */ + client_id?: string; + /** + * The authentication client secret. + * + * @alias {@link OAuth2ClientOptions.clientSecret} + */ + client_secret?: string; + /** + * The URIs to redirect to after completing the auth request. + * + * @alias {@link OAuth2ClientOptions.redirectUri} + */ + redirect_uris?: string[]; +} +export interface OAuth2ClientOptions extends AuthClientOptions, OAuth2JSONOptions { + /** + * The authentication client ID. + * + * @alias {@link OAuth2JSONOptions.client_id} + */ + clientId?: string; + /** + * The authentication client secret. + * + * @alias {@link OAuth2JSONOptions.client_secret} + */ + clientSecret?: string; + /** + * The URI to redirect to after completing the auth request. + * + * @alias {@link OAuth2JSONOptions.redirect_uris} + */ + redirectUri?: string; + /** + * Customizable endpoints. + */ + endpoints?: Partial; + /** + * The allowed OAuth2 token issuers. + */ + issuers?: string[]; + /** + * The client authentication type. Supported values are basic, post, and none. + * Defaults to post if not provided. + * https://datatracker.ietf.org/doc/html/rfc7591#section-2 + */ + clientAuthentication?: ClientAuthentication; +} +export type RefreshOptions = Pick; +export declare class OAuth2Client extends AuthClient { + private redirectUri?; + private certificateCache; + private certificateExpiry; + private certificateCacheFormat; + protected refreshTokenPromises: Map>; + readonly endpoints: Readonly; + readonly issuers: string[]; + readonly clientAuthentication: ClientAuthentication; + _clientId?: string; + _clientSecret?: string; + refreshHandler?: GetRefreshHandlerCallback; + /** + * An OAuth2 Client for Google APIs. + * + * @param options The OAuth2 Client Options. Passing an `clientId` directly is **@DEPRECATED**. + * @param clientSecret **@DEPRECATED**. Provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead. + * @param redirectUri **@DEPRECATED**. Provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead. + */ + constructor(options?: OAuth2ClientOptions | OAuth2ClientOptions['clientId'], + /** + * @deprecated - provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead + */ + clientSecret?: OAuth2ClientOptions['clientSecret'], + /** + * @deprecated - provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead + */ + redirectUri?: OAuth2ClientOptions['redirectUri']); + /** + * @deprecated use instance's {@link OAuth2Client.endpoints} + */ + protected static readonly GOOGLE_TOKEN_INFO_URL = "https://oauth2.googleapis.com/tokeninfo"; + /** + * Clock skew - five minutes in seconds + */ + private static readonly CLOCK_SKEW_SECS_; + /** + * The default max Token Lifetime is one day in seconds + */ + private static readonly DEFAULT_MAX_TOKEN_LIFETIME_SECS_; + /** + * Generates URL for consent page landing. + * @param opts Options. + * @return URL to consent page. + */ + generateAuthUrl(opts?: GenerateAuthUrlOpts): string; + generateCodeVerifier(): void; + /** + * Convenience method to automatically generate a code_verifier, and its + * resulting SHA256. If used, this must be paired with a S256 + * code_challenge_method. + * + * For a full example see: + * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js + */ + generateCodeVerifierAsync(): Promise; + /** + * Gets the access token for the given code. + * @param code The authorization code. + * @param callback Optional callback fn. + */ + getToken(code: string): Promise; + getToken(options: GetTokenOptions): Promise; + getToken(code: string, callback: GetTokenCallback): void; + getToken(options: GetTokenOptions, callback: GetTokenCallback): void; + private getTokenAsync; + /** + * Refreshes the access token. + * @param refresh_token Existing refresh token. + * @private + */ + protected refreshToken(refreshToken?: string | null): Promise; + protected refreshTokenNoCache(refreshToken?: string | null): Promise; + /** + * Retrieves the access token using refresh token + * + * @param callback callback + */ + refreshAccessToken(): Promise; + refreshAccessToken(callback: RefreshAccessTokenCallback): void; + private refreshAccessTokenAsync; + /** + * Get a non-expired access token, after refreshing if necessary + * + * @param callback Callback to call with the access token + */ + getAccessToken(): Promise; + getAccessToken(callback: GetAccessTokenCallback): void; + private getAccessTokenAsync; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * In OAuth2Client, the result has the form: + * { authorization: 'Bearer ' } + */ + getRequestHeaders(url?: string | URL): Promise; + protected getRequestMetadataAsync(url?: string | URL | null): Promise; + /** + * Generates an URL to revoke the given token. + * @param token The existing token to be revoked. + * + * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} + */ + static getRevokeTokenUrl(token: string): string; + /** + * Generates a URL to revoke the given token. + * + * @param token The existing token to be revoked. + */ + getRevokeTokenURL(token: string): URL; + /** + * Revokes the access given to token. + * @param token The existing token to be revoked. + * @param callback Optional callback fn. + */ + revokeToken(token: string): GaxiosPromise; + revokeToken(token: string, callback: BodyResponseCallback): void; + /** + * Revokes access token and clears the credentials object + * @param callback callback + */ + revokeCredentials(): GaxiosPromise; + revokeCredentials(callback: BodyResponseCallback): void; + private revokeCredentialsAsync; + /** + * Provides a request implementation with OAuth 2.0 flow. If credentials have + * a refresh_token, in cases of HTTP 401 and 403 responses, it automatically + * asks for a new access token and replays the unsuccessful request. + * @param opts Request options. + * @param callback callback. + * @return Request object + */ + request(opts: GaxiosOptions): GaxiosPromise; + request(opts: GaxiosOptions, callback: BodyResponseCallback): void; + protected requestAsync(opts: GaxiosOptions, reAuthRetried?: boolean): Promise>; + /** + * Verify id token is token by checking the certs and audience + * @param options that contains all options. + * @param callback Callback supplying GoogleLogin if successful + */ + verifyIdToken(options: VerifyIdTokenOptions): Promise; + verifyIdToken(options: VerifyIdTokenOptions, callback: (err: Error | null, login?: LoginTicket) => void): void; + private verifyIdTokenAsync; + /** + * Obtains information about the provisioned access token. Especially useful + * if you want to check the scopes that were provisioned to a given token. + * + * @param accessToken Required. The Access Token for which you want to get + * user info. + */ + getTokenInfo(accessToken: string): Promise; + /** + * Gets federated sign-on certificates to use for verifying identity tokens. + * Returns certs as array structure, where keys are key ids, and values + * are certificates in either PEM or JWK format. + * @param callback Callback supplying the certificates + */ + getFederatedSignonCerts(): Promise; + getFederatedSignonCerts(callback: GetFederatedSignonCertsCallback): void; + getFederatedSignonCertsAsync(): Promise; + /** + * Gets federated sign-on certificates to use for verifying identity tokens. + * Returns certs as array structure, where keys are key ids, and values + * are certificates in either PEM or JWK format. + * @param callback Callback supplying the certificates + */ + getIapPublicKeys(): Promise; + getIapPublicKeys(callback: GetIapPublicKeysCallback): void; + getIapPublicKeysAsync(): Promise; + verifySignedJwtWithCerts(): void; + /** + * Verify the id token is signed with the correct certificate + * and is from the correct audience. + * @param jwt The jwt to verify (The ID Token in this case). + * @param certs The array of certs to test the jwt against. + * @param requiredAudience The audience to test the jwt against. + * @param issuers The allowed issuers of the jwt (Optional). + * @param maxExpiry The max expiry the certificate can be (Optional). + * @return Returns a promise resolving to LoginTicket on verification. + */ + verifySignedJwtWithCertsAsync(jwt: string, certs: Certificates | PublicKeys, requiredAudience?: string | string[], issuers?: string[], maxExpiry?: number): Promise; + /** + * Returns a promise that resolves with AccessTokenResponse type if + * refreshHandler is defined. + * If not, nothing is returned. + */ + private processAndValidateRefreshHandler; + /** + * Returns true if a token is expired or will expire within + * eagerRefreshThresholdMillismilliseconds. + * If there is no expiry time, assumes the token is not expired or expiring. + */ + protected isTokenExpiring(): boolean; +} +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.js new file mode 100644 index 0000000000000000000000000000000000000000..1b8503cc2c02ffb013edff20cb1a4d2900290006 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2client.js @@ -0,0 +1,820 @@ +"use strict"; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OAuth2Client = exports.ClientAuthentication = exports.CertificateFormat = exports.CodeChallengeMethod = void 0; +const gaxios_1 = require("gaxios"); +const querystring = require("querystring"); +const stream = require("stream"); +const formatEcdsa = require("ecdsa-sig-formatter"); +const util_1 = require("../util"); +const crypto_1 = require("../crypto/crypto"); +const authclient_1 = require("./authclient"); +const loginticket_1 = require("./loginticket"); +var CodeChallengeMethod; +(function (CodeChallengeMethod) { + CodeChallengeMethod["Plain"] = "plain"; + CodeChallengeMethod["S256"] = "S256"; +})(CodeChallengeMethod || (exports.CodeChallengeMethod = CodeChallengeMethod = {})); +var CertificateFormat; +(function (CertificateFormat) { + CertificateFormat["PEM"] = "PEM"; + CertificateFormat["JWK"] = "JWK"; +})(CertificateFormat || (exports.CertificateFormat = CertificateFormat = {})); +/** + * The client authentication type. Supported values are basic, post, and none. + * https://datatracker.ietf.org/doc/html/rfc7591#section-2 + */ +var ClientAuthentication; +(function (ClientAuthentication) { + ClientAuthentication["ClientSecretPost"] = "ClientSecretPost"; + ClientAuthentication["ClientSecretBasic"] = "ClientSecretBasic"; + ClientAuthentication["None"] = "None"; +})(ClientAuthentication || (exports.ClientAuthentication = ClientAuthentication = {})); +class OAuth2Client extends authclient_1.AuthClient { + redirectUri; + certificateCache = {}; + certificateExpiry = null; + certificateCacheFormat = CertificateFormat.PEM; + refreshTokenPromises = new Map(); + endpoints; + issuers; + clientAuthentication; + // TODO: refactor tests to make this private + _clientId; + // TODO: refactor tests to make this private + _clientSecret; + refreshHandler; + /** + * An OAuth2 Client for Google APIs. + * + * @param options The OAuth2 Client Options. Passing an `clientId` directly is **@DEPRECATED**. + * @param clientSecret **@DEPRECATED**. Provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead. + * @param redirectUri **@DEPRECATED**. Provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead. + */ + constructor(options = {}, + /** + * @deprecated - provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead + */ + clientSecret, + /** + * @deprecated - provide a {@link OAuth2ClientOptions `OAuth2ClientOptions`} object in the first parameter instead + */ + redirectUri) { + super(typeof options === 'object' ? options : {}); + if (typeof options !== 'object') { + options = { + clientId: options, + clientSecret, + redirectUri, + }; + } + this._clientId = options.clientId || options.client_id; + this._clientSecret = options.clientSecret || options.client_secret; + this.redirectUri = options.redirectUri || options.redirect_uris?.[0]; + this.endpoints = { + tokenInfoUrl: 'https://oauth2.googleapis.com/tokeninfo', + oauth2AuthBaseUrl: 'https://accounts.google.com/o/oauth2/v2/auth', + oauth2TokenUrl: 'https://oauth2.googleapis.com/token', + oauth2RevokeUrl: 'https://oauth2.googleapis.com/revoke', + oauth2FederatedSignonPemCertsUrl: 'https://www.googleapis.com/oauth2/v1/certs', + oauth2FederatedSignonJwkCertsUrl: 'https://www.googleapis.com/oauth2/v3/certs', + oauth2IapPublicKeyUrl: 'https://www.gstatic.com/iap/verify/public_key', + ...options.endpoints, + }; + this.clientAuthentication = + options.clientAuthentication || ClientAuthentication.ClientSecretPost; + this.issuers = options.issuers || [ + 'accounts.google.com', + 'https://accounts.google.com', + this.universeDomain, + ]; + } + /** + * @deprecated use instance's {@link OAuth2Client.endpoints} + */ + static GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo'; + /** + * Clock skew - five minutes in seconds + */ + static CLOCK_SKEW_SECS_ = 300; + /** + * The default max Token Lifetime is one day in seconds + */ + static DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; + /** + * Generates URL for consent page landing. + * @param opts Options. + * @return URL to consent page. + */ + generateAuthUrl(opts = {}) { + if (opts.code_challenge_method && !opts.code_challenge) { + throw new Error('If a code_challenge_method is provided, code_challenge must be included.'); + } + opts.response_type = opts.response_type || 'code'; + opts.client_id = opts.client_id || this._clientId; + opts.redirect_uri = opts.redirect_uri || this.redirectUri; + // Allow scopes to be passed either as array or a string + if (Array.isArray(opts.scope)) { + opts.scope = opts.scope.join(' '); + } + const rootUrl = this.endpoints.oauth2AuthBaseUrl.toString(); + return (rootUrl + + '?' + + querystring.stringify(opts)); + } + generateCodeVerifier() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.'); + } + /** + * Convenience method to automatically generate a code_verifier, and its + * resulting SHA256. If used, this must be paired with a S256 + * code_challenge_method. + * + * For a full example see: + * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js + */ + async generateCodeVerifierAsync() { + // base64 encoding uses 6 bits per character, and we want to generate128 + // characters. 6*128/8 = 96. + const crypto = (0, crypto_1.createCrypto)(); + const randomString = crypto.randomBytesBase64(96); + // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/ + // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just + // swapping out a few chars. + const codeVerifier = randomString + .replace(/\+/g, '~') + .replace(/=/g, '_') + .replace(/\//g, '-'); + // Generate the base64 encoded SHA256 + const unencodedCodeChallenge = await crypto.sha256DigestBase64(codeVerifier); + // We need to use base64UrlEncoding instead of standard base64 + const codeChallenge = unencodedCodeChallenge + .split('=')[0] + .replace(/\+/g, '-') + .replace(/\//g, '_'); + return { codeVerifier, codeChallenge }; + } + getToken(codeOrOptions, callback) { + const options = typeof codeOrOptions === 'string' ? { code: codeOrOptions } : codeOrOptions; + if (callback) { + this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response)); + } + else { + return this.getTokenAsync(options); + } + } + async getTokenAsync(options) { + const url = this.endpoints.oauth2TokenUrl.toString(); + const headers = new Headers(); + const values = { + client_id: options.client_id || this._clientId, + code_verifier: options.codeVerifier, + code: options.code, + grant_type: 'authorization_code', + redirect_uri: options.redirect_uri || this.redirectUri, + }; + if (this.clientAuthentication === ClientAuthentication.ClientSecretBasic) { + const basic = Buffer.from(`${this._clientId}:${this._clientSecret}`); + headers.set('authorization', `Basic ${basic.toString('base64')}`); + } + if (this.clientAuthentication === ClientAuthentication.ClientSecretPost) { + values.client_secret = this._clientSecret; + } + const opts = { + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: new URLSearchParams((0, util_1.removeUndefinedValuesInObject)(values)), + headers, + }; + authclient_1.AuthClient.setMethodName(opts, 'getTokenAsync'); + const res = await this.transporter.request(opts); + const tokens = res.data; + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + /** + * Refreshes the access token. + * @param refresh_token Existing refresh token. + * @private + */ + async refreshToken(refreshToken) { + if (!refreshToken) { + return this.refreshTokenNoCache(refreshToken); + } + // If a request to refresh using the same token has started, + // return the same promise. + if (this.refreshTokenPromises.has(refreshToken)) { + return this.refreshTokenPromises.get(refreshToken); + } + const p = this.refreshTokenNoCache(refreshToken).then(r => { + this.refreshTokenPromises.delete(refreshToken); + return r; + }, e => { + this.refreshTokenPromises.delete(refreshToken); + throw e; + }); + this.refreshTokenPromises.set(refreshToken, p); + return p; + } + async refreshTokenNoCache(refreshToken) { + if (!refreshToken) { + throw new Error('No refresh token is set.'); + } + const url = this.endpoints.oauth2TokenUrl.toString(); + const data = { + refresh_token: refreshToken, + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + }; + let res; + try { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: new URLSearchParams((0, util_1.removeUndefinedValuesInObject)(data)), + }; + authclient_1.AuthClient.setMethodName(opts, 'refreshTokenNoCache'); + // request for new token + res = await this.transporter.request(opts); + } + catch (e) { + if (e instanceof gaxios_1.GaxiosError && + e.message === 'invalid_grant' && + e.response?.data && + /ReAuth/i.test(e.response.data.error_description)) { + e.message = JSON.stringify(e.response.data); + } + throw e; + } + const tokens = res.data; + // TODO: de-duplicate this code from a few spots + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + refreshAccessToken(callback) { + if (callback) { + this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback); + } + else { + return this.refreshAccessTokenAsync(); + } + } + async refreshAccessTokenAsync() { + const r = await this.refreshToken(this.credentials.refresh_token); + const tokens = r.tokens; + tokens.refresh_token = this.credentials.refresh_token; + this.credentials = tokens; + return { credentials: this.credentials, res: r.res }; + } + getAccessToken(callback) { + if (callback) { + this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback); + } + else { + return this.getAccessTokenAsync(); + } + } + async getAccessTokenAsync() { + const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring(); + if (shouldRefresh) { + if (!this.credentials.refresh_token) { + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken?.access_token) { + this.setCredentials(refreshedAccessToken); + return { token: this.credentials.access_token }; + } + } + else { + throw new Error('No refresh token or refresh handler callback is set.'); + } + } + const r = await this.refreshAccessTokenAsync(); + if (!r.credentials || (r.credentials && !r.credentials.access_token)) { + throw new Error('Could not refresh access token.'); + } + return { token: r.credentials.access_token, res: r.res }; + } + else { + return { token: this.credentials.access_token }; + } + } + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * In OAuth2Client, the result has the form: + * { authorization: 'Bearer ' } + */ + async getRequestHeaders(url) { + const headers = (await this.getRequestMetadataAsync(url)).headers; + return headers; + } + async getRequestMetadataAsync(url) { + url; + const thisCreds = this.credentials; + if (!thisCreds.access_token && + !thisCreds.refresh_token && + !this.apiKey && + !this.refreshHandler) { + throw new Error('No access, refresh token, API key or refresh handler callback is set.'); + } + if (thisCreds.access_token && !this.isTokenExpiring()) { + thisCreds.token_type = thisCreds.token_type || 'Bearer'; + const headers = new Headers({ + authorization: thisCreds.token_type + ' ' + thisCreds.access_token, + }); + return { headers: this.addSharedMetadataHeaders(headers) }; + } + // If refreshHandler exists, call processAndValidateRefreshHandler(). + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken?.access_token) { + this.setCredentials(refreshedAccessToken); + const headers = new Headers({ + authorization: 'Bearer ' + this.credentials.access_token, + }); + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + if (this.apiKey) { + return { headers: new Headers({ 'X-Goog-Api-Key': this.apiKey }) }; + } + let r = null; + let tokens = null; + try { + r = await this.refreshToken(thisCreds.refresh_token); + tokens = r.tokens; + } + catch (err) { + const e = err; + if (e.response && + (e.response.status === 403 || e.response.status === 404)) { + e.message = `Could not refresh access token: ${e.message}`; + } + throw e; + } + const credentials = this.credentials; + credentials.token_type = credentials.token_type || 'Bearer'; + tokens.refresh_token = credentials.refresh_token; + this.credentials = tokens; + const headers = new Headers({ + authorization: credentials.token_type + ' ' + tokens.access_token, + }); + return { headers: this.addSharedMetadataHeaders(headers), res: r.res }; + } + /** + * Generates an URL to revoke the given token. + * @param token The existing token to be revoked. + * + * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} + */ + static getRevokeTokenUrl(token) { + return new OAuth2Client().getRevokeTokenURL(token).toString(); + } + /** + * Generates a URL to revoke the given token. + * + * @param token The existing token to be revoked. + */ + getRevokeTokenURL(token) { + const url = new URL(this.endpoints.oauth2RevokeUrl); + url.searchParams.append('token', token); + return url; + } + revokeToken(token, callback) { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + url: this.getRevokeTokenURL(token).toString(), + method: 'POST', + }; + authclient_1.AuthClient.setMethodName(opts, 'revokeToken'); + if (callback) { + this.transporter + .request(opts) + .then(r => callback(null, r), callback); + } + else { + return this.transporter.request(opts); + } + } + revokeCredentials(callback) { + if (callback) { + this.revokeCredentialsAsync().then(res => callback(null, res), callback); + } + else { + return this.revokeCredentialsAsync(); + } + } + async revokeCredentialsAsync() { + const token = this.credentials.access_token; + this.credentials = {}; + if (token) { + return this.revokeToken(token); + } + else { + throw new Error('No access token to revoke.'); + } + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + async requestAsync(opts, reAuthRetried = false) { + try { + const r = await this.getRequestMetadataAsync(); + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + this.addUserProjectAndAuthHeaders(opts.headers, r.headers); + if (this.apiKey) { + opts.headers.set('X-Goog-Api-Key', this.apiKey); + } + return await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - An access_token and refresh_token were available, but either no + // expiry_date was available or the forceRefreshOnFailure flag is set. + // The absent expiry_date case can happen when developers stash the + // access_token and refresh_token for later use, but the access_token + // fails on the first try because it's expired. Some developers may + // choose to enable forceRefreshOnFailure to mitigate time-related + // errors. + // Or the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - No refresh_token was available + // - An access_token and a refreshHandler callback were available, but + // either no expiry_date was available or the forceRefreshOnFailure + // flag is set. The access_token fails on the first try because it's + // expired. Some developers may choose to enable forceRefreshOnFailure + // to mitigate time-related errors. + const mayRequireRefresh = this.credentials && + this.credentials.access_token && + this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure); + const mayRequireRefreshWithNoRefreshToken = this.credentials && + this.credentials.access_token && + !this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure) && + this.refreshHandler; + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefresh) { + await this.refreshAccessTokenAsync(); + return this.requestAsync(opts, true); + } + else if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefreshWithNoRefreshToken) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken?.access_token) { + this.setCredentials(refreshedAccessToken); + } + return this.requestAsync(opts, true); + } + } + throw e; + } + } + verifyIdToken(options, callback) { + // This function used to accept two arguments instead of an options object. + // Check the types to help users upgrade with less pain. + // This check can be removed after a 2.0 release. + if (callback && typeof callback !== 'function') { + throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.'); + } + if (callback) { + this.verifyIdTokenAsync(options).then(r => callback(null, r), callback); + } + else { + return this.verifyIdTokenAsync(options); + } + } + async verifyIdTokenAsync(options) { + if (!options.idToken) { + throw new Error('The verifyIdToken method requires an ID Token'); + } + const response = await this.getFederatedSignonCertsAsync(); + const login = await this.verifySignedJwtWithCertsAsync(options.idToken, response.certs, options.audience, this.issuers, options.maxExpiry); + return login; + } + /** + * Obtains information about the provisioned access token. Especially useful + * if you want to check the scopes that were provisioned to a given token. + * + * @param accessToken Required. The Access Token for which you want to get + * user info. + */ + async getTokenInfo(accessToken) { + const { data } = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + headers: { + 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8', + authorization: `Bearer ${accessToken}`, + }, + url: this.endpoints.tokenInfoUrl.toString(), + }); + const info = Object.assign({ + expiry_date: new Date().getTime() + data.expires_in * 1000, + scopes: data.scope.split(' '), + }, data); + delete info.expires_in; + delete info.scope; + return info; + } + getFederatedSignonCerts(callback) { + if (callback) { + this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback); + } + else { + return this.getFederatedSignonCertsAsync(); + } + } + async getFederatedSignonCertsAsync() { + const nowTime = new Date().getTime(); + const format = (0, crypto_1.hasBrowserCrypto)() + ? CertificateFormat.JWK + : CertificateFormat.PEM; + if (this.certificateExpiry && + nowTime < this.certificateExpiry.getTime() && + this.certificateCacheFormat === format) { + return { certs: this.certificateCache, format }; + } + let res; + let url; + switch (format) { + case CertificateFormat.PEM: + url = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); + break; + case CertificateFormat.JWK: + url = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + try { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + url, + }; + authclient_1.AuthClient.setMethodName(opts, 'getFederatedSignonCertsAsync'); + res = await this.transporter.request(opts); + } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; + } + throw e; + } + const cacheControl = res?.headers.get('cache-control'); + let cacheAge = -1; + if (cacheControl) { + const maxAge = /max-age=(?[0-9]+)/.exec(cacheControl)?.groups + ?.maxAge; + if (maxAge) { + // Cache results with max-age (in seconds) + cacheAge = Number(maxAge) * 1000; // milliseconds + } + } + let certificates = {}; + switch (format) { + case CertificateFormat.PEM: + certificates = res.data; + break; + case CertificateFormat.JWK: + for (const key of res.data.keys) { + certificates[key.kid] = key; + } + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + const now = new Date(); + this.certificateExpiry = + cacheAge === -1 ? null : new Date(now.getTime() + cacheAge); + this.certificateCache = certificates; + this.certificateCacheFormat = format; + return { certs: certificates, format, res }; + } + getIapPublicKeys(callback) { + if (callback) { + this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback); + } + else { + return this.getIapPublicKeysAsync(); + } + } + async getIapPublicKeysAsync() { + let res; + const url = this.endpoints.oauth2IapPublicKeyUrl.toString(); + try { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + url, + }; + authclient_1.AuthClient.setMethodName(opts, 'getIapPublicKeysAsync'); + res = await this.transporter.request(opts); + } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; + } + throw e; + } + return { pubkeys: res.data, res }; + } + verifySignedJwtWithCerts() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.'); + } + /** + * Verify the id token is signed with the correct certificate + * and is from the correct audience. + * @param jwt The jwt to verify (The ID Token in this case). + * @param certs The array of certs to test the jwt against. + * @param requiredAudience The audience to test the jwt against. + * @param issuers The allowed issuers of the jwt (Optional). + * @param maxExpiry The max expiry the certificate can be (Optional). + * @return Returns a promise resolving to LoginTicket on verification. + */ + async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) { + const crypto = (0, crypto_1.createCrypto)(); + if (!maxExpiry) { + maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_; + } + const segments = jwt.split('.'); + if (segments.length !== 3) { + throw new Error('Wrong number of segments in token: ' + jwt); + } + const signed = segments[0] + '.' + segments[1]; + let signature = segments[2]; + let envelope; + let payload; + try { + envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0])); + } + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`; + } + throw err; + } + if (!envelope) { + throw new Error("Can't parse token envelope: " + segments[0]); + } + try { + payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1])); + } + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token payload '${segments[0]}`; + } + throw err; + } + if (!payload) { + throw new Error("Can't parse token payload: " + segments[1]); + } + if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { + // If this is not present, then there's no reason to attempt verification + throw new Error('No pem found for envelope: ' + JSON.stringify(envelope)); + } + const cert = certs[envelope.kid]; + if (envelope.alg === 'ES256') { + signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64'); + } + const verified = await crypto.verify(cert, signed, signature); + if (!verified) { + throw new Error('Invalid token signature: ' + jwt); + } + if (!payload.iat) { + throw new Error('No issue time in token: ' + JSON.stringify(payload)); + } + if (!payload.exp) { + throw new Error('No expiration time in token: ' + JSON.stringify(payload)); + } + const iat = Number(payload.iat); + if (isNaN(iat)) + throw new Error('iat field using invalid format'); + const exp = Number(payload.exp); + if (isNaN(exp)) + throw new Error('exp field using invalid format'); + const now = new Date().getTime() / 1000; + if (exp >= now + maxExpiry) { + throw new Error('Expiration time too far in future: ' + JSON.stringify(payload)); + } + const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_; + const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_; + if (now < earliest) { + throw new Error('Token used too early, ' + + now + + ' < ' + + earliest + + ': ' + + JSON.stringify(payload)); + } + if (now > latest) { + throw new Error('Token used too late, ' + + now + + ' > ' + + latest + + ': ' + + JSON.stringify(payload)); + } + if (issuers && issuers.indexOf(payload.iss) < 0) { + throw new Error('Invalid issuer, expected one of [' + + issuers + + '], but got ' + + payload.iss); + } + // Check the audience matches if we have one + if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) { + const aud = payload.aud; + let audVerified = false; + // If the requiredAudience is an array, check if it contains token + // audience + if (requiredAudience.constructor === Array) { + audVerified = requiredAudience.indexOf(aud) > -1; + } + else { + audVerified = aud === requiredAudience; + } + if (!audVerified) { + throw new Error('Wrong recipient, payload audience != requiredAudience'); + } + } + return new loginticket_1.LoginTicket(envelope, payload); + } + /** + * Returns a promise that resolves with AccessTokenResponse type if + * refreshHandler is defined. + * If not, nothing is returned. + */ + async processAndValidateRefreshHandler() { + if (this.refreshHandler) { + const accessTokenResponse = await this.refreshHandler(); + if (!accessTokenResponse.access_token) { + throw new Error('No access token is returned by the refreshHandler callback.'); + } + return accessTokenResponse; + } + return; + } + /** + * Returns true if a token is expired or will expire within + * eagerRefreshThresholdMillismilliseconds. + * If there is no expiry time, assumes the token is not expired or expiring. + */ + isTokenExpiring() { + const expiryDate = this.credentials.expiry_date; + return expiryDate + ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis + : false; + } +} +exports.OAuth2Client = OAuth2Client; +//# sourceMappingURL=oauth2client.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e5b841cfd69489b8e581a2264d99452f57a8e56 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.d.ts @@ -0,0 +1,103 @@ +import { Gaxios, GaxiosOptions } from 'gaxios'; +/** + * OAuth error codes. + * https://tools.ietf.org/html/rfc6749#section-5.2 + */ +type OAuthErrorCode = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope' | string; +/** + * The standard OAuth error response. + * https://tools.ietf.org/html/rfc6749#section-5.2 + */ +export interface OAuthErrorResponse { + error: OAuthErrorCode; + error_description?: string; + error_uri?: string; +} +/** + * OAuth client authentication types. + * https://tools.ietf.org/html/rfc6749#section-2.3 + */ +export type ConfidentialClientType = 'basic' | 'request-body'; +/** + * Defines the client authentication credentials for basic and request-body + * credentials. + * https://tools.ietf.org/html/rfc6749#section-2.3.1 + */ +export interface ClientAuthentication { + confidentialClientType: ConfidentialClientType; + clientId: string; + clientSecret?: string; +} +export interface OAuthClientAuthHandlerOptions { + /** + * Defines the client authentication credentials for basic and request-body + * credentials. + */ + clientAuthentication?: ClientAuthentication; + /** + * An optional transporter to use. + */ + transporter?: Gaxios; +} +/** + * Abstract class for handling client authentication in OAuth-based + * operations. + * When request-body client authentication is used, only application/json and + * application/x-www-form-urlencoded content types for HTTP methods that support + * request bodies are supported. + */ +export declare abstract class OAuthClientAuthHandler { + #private; + protected transporter: Gaxios; + /** + * Instantiates an OAuth client authentication handler. + * @param options The OAuth Client Auth Handler instance options. Passing an `ClientAuthentication` directly is **@DEPRECATED**. + */ + constructor(options?: ClientAuthentication | OAuthClientAuthHandlerOptions); + /** + * Applies client authentication on the OAuth request's headers or POST + * body but does not process the request. + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + protected applyClientAuthenticationOptions(opts: GaxiosOptions, bearerToken?: string): void; + /** + * Applies client authentication on the request's header if either + * basic authentication or bearer token authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + private injectAuthenticatedHeaders; + /** + * Applies client authentication on the request's body if request-body + * client authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + */ + private injectAuthenticatedRequestBody; + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + protected static get RETRY_CONFIG(): GaxiosOptions; +} +/** + * Converts an OAuth error response to a native JavaScript Error. + * @param resp The OAuth error response to convert to a native Error object. + * @param err The optional original error. If provided, the error properties + * will be copied to the new error. + * @return The converted native Error object. + */ +export declare function getErrorFromOAuthErrorResponse(resp: OAuthErrorResponse, err?: Error): Error; +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.js new file mode 100644 index 0000000000000000000000000000000000000000..f44448a2b387e2d765d0b8a8bc556ff3c34189db --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/oauth2common.js @@ -0,0 +1,189 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OAuthClientAuthHandler = void 0; +exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse; +const gaxios_1 = require("gaxios"); +const crypto_1 = require("../crypto/crypto"); +/** List of HTTP methods that accept request bodies. */ +const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH']; +/** + * Abstract class for handling client authentication in OAuth-based + * operations. + * When request-body client authentication is used, only application/json and + * application/x-www-form-urlencoded content types for HTTP methods that support + * request bodies are supported. + */ +class OAuthClientAuthHandler { + #crypto = (0, crypto_1.createCrypto)(); + #clientAuthentication; + transporter; + /** + * Instantiates an OAuth client authentication handler. + * @param options The OAuth Client Auth Handler instance options. Passing an `ClientAuthentication` directly is **@DEPRECATED**. + */ + constructor(options) { + if (options && 'clientId' in options) { + this.#clientAuthentication = options; + this.transporter = new gaxios_1.Gaxios(); + } + else { + this.#clientAuthentication = options?.clientAuthentication; + this.transporter = options?.transporter || new gaxios_1.Gaxios(); + } + } + /** + * Applies client authentication on the OAuth request's headers or POST + * body but does not process the request. + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + applyClientAuthenticationOptions(opts, bearerToken) { + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + // Inject authenticated header. + this.injectAuthenticatedHeaders(opts, bearerToken); + // Inject authenticated request body. + if (!bearerToken) { + this.injectAuthenticatedRequestBody(opts); + } + } + /** + * Applies client authentication on the request's header if either + * basic authentication or bearer token authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + injectAuthenticatedHeaders(opts, bearerToken) { + // Bearer token prioritized higher than basic Auth. + if (bearerToken) { + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers, { + authorization: `Bearer ${bearerToken}`, + }); + } + else if (this.#clientAuthentication?.confidentialClientType === 'basic') { + opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers); + const clientId = this.#clientAuthentication.clientId; + const clientSecret = this.#clientAuthentication.clientSecret || ''; + const base64EncodedCreds = this.#crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`); + gaxios_1.Gaxios.mergeHeaders(opts.headers, { + authorization: `Basic ${base64EncodedCreds}`, + }); + } + } + /** + * Applies client authentication on the request's body if request-body + * client authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + */ + injectAuthenticatedRequestBody(opts) { + if (this.#clientAuthentication?.confidentialClientType === 'request-body') { + const method = (opts.method || 'GET').toUpperCase(); + if (!METHODS_SUPPORTING_REQUEST_BODY.includes(method)) { + throw new Error(`${method} HTTP method does not support ` + + `${this.#clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + // Get content-type + const headers = new Headers(opts.headers); + const contentType = headers.get('content-type'); + // Inject authenticated request body + if (contentType?.startsWith('application/x-www-form-urlencoded') || + opts.data instanceof URLSearchParams) { + const data = new URLSearchParams(opts.data ?? ''); + data.append('client_id', this.#clientAuthentication.clientId); + data.append('client_secret', this.#clientAuthentication.clientSecret || ''); + opts.data = data; + } + else if (contentType?.startsWith('application/json')) { + opts.data = opts.data || {}; + Object.assign(opts.data, { + client_id: this.#clientAuthentication.clientId, + client_secret: this.#clientAuthentication.clientSecret || '', + }); + } + else { + throw new Error(`${contentType} content-types are not supported with ` + + `${this.#clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + } + } + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; + } +} +exports.OAuthClientAuthHandler = OAuthClientAuthHandler; +/** + * Converts an OAuth error response to a native JavaScript Error. + * @param resp The OAuth error response to convert to a native Error object. + * @param err The optional original error. If provided, the error properties + * will be copied to the new error. + * @return The converted native Error object. + */ +function getErrorFromOAuthErrorResponse(resp, err) { + // Error response. + const errorCode = resp.error; + const errorDescription = resp.error_description; + const errorUri = resp.error_uri; + let message = `Error code ${errorCode}`; + if (typeof errorDescription !== 'undefined') { + message += `: ${errorDescription}`; + } + if (typeof errorUri !== 'undefined') { + message += ` - ${errorUri}`; + } + const newError = new Error(message); + // Copy properties from original error to newly generated error. + if (err) { + const keys = Object.keys(err); + if (err.stack) { + // Copy error.stack if available. + keys.push('stack'); + } + keys.forEach(key => { + // Do not overwrite the message field. + if (key !== 'message') { + Object.defineProperty(newError, key, { + value: err[key], + writable: false, + enumerable: true, + }); + } + }); + } + return newError; +} +//# sourceMappingURL=oauth2common.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..355da8a40629e596c244a7dc4f59088721c4b8f3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.d.ts @@ -0,0 +1,37 @@ +import { GaxiosOptions } from 'gaxios'; +import { AuthClient, GetAccessTokenResponse } from './authclient'; +/** + * An AuthClient without any Authentication information. Useful for: + * - Anonymous access + * - Local Emulators + * - Testing Environments + * + */ +export declare class PassThroughClient extends AuthClient { + /** + * Creates a request without any authentication headers or checks. + * + * @remarks + * + * In testing environments it may be useful to change the provided + * {@link AuthClient.transporter} for any desired request overrides/handling. + * + * @param opts + * @returns The response of the request. + */ + request(opts: GaxiosOptions): Promise>; + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + getAccessToken(): Promise; + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + getRequestHeaders(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.js new file mode 100644 index 0000000000000000000000000000000000000000..928bb12cfdd5beed2cea29c04c1493bea30cf7f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/passthrough.js @@ -0,0 +1,60 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PassThroughClient = void 0; +const authclient_1 = require("./authclient"); +/** + * An AuthClient without any Authentication information. Useful for: + * - Anonymous access + * - Local Emulators + * - Testing Environments + * + */ +class PassThroughClient extends authclient_1.AuthClient { + /** + * Creates a request without any authentication headers or checks. + * + * @remarks + * + * In testing environments it may be useful to change the provided + * {@link AuthClient.transporter} for any desired request overrides/handling. + * + * @param opts + * @returns The response of the request. + */ + async request(opts) { + return this.transporter.request(opts); + } + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + async getAccessToken() { + return {}; + } + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + async getRequestHeaders() { + return new Headers(); + } +} +exports.PassThroughClient = PassThroughClient; +//# sourceMappingURL=passthrough.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0ba47c7f67a306664af87b97df51c13c0eb7b9cc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.d.ts @@ -0,0 +1,141 @@ +import { BaseExternalAccountClient, BaseExternalAccountClientOptions } from './baseexternalclient'; +export { ExecutableError } from './pluggable-auth-handler'; +/** + * Defines the credential source portion of the configuration for PluggableAuthClient. + * + *

Command is the only required field. If timeout_millis is not specified, the library will + * default to a 30-second timeout. + * + *

+ * Sample credential source for Pluggable Auth Client:
+ * {
+ *   ...
+ *   "credential_source": {
+ *     "executable": {
+ *       "command": "/path/to/get/credentials.sh --arg1=value1 --arg2=value2",
+ *       "timeout_millis": 5000,
+ *       "output_file": "/path/to/generated/cached/credentials"
+ *     }
+ *   }
+ * }
+ * 
+ */ +export interface PluggableAuthClientOptions extends BaseExternalAccountClientOptions { + credential_source: { + executable: { + /** + * The command used to retrieve the 3rd party token. + */ + command: string; + /** + * The timeout for executable to run in milliseconds. If none is provided it + * will be set to the default timeout of 30 seconds. + */ + timeout_millis?: number; + /** + * An optional output file location that will be checked for a cached response + * from a previous run of the executable. + */ + output_file?: string; + }; + }; +} +/** + * PluggableAuthClient enables the exchange of workload identity pool external credentials for + * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These + * scripts/executables are completely independent of the Google Cloud Auth libraries. These + * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token + * to be exchanged for a Google access token. + * + *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable + * must be set to '1'. This is for security reasons. + * + *

Both OIDC and SAML are supported. The executable must adhere to a specific response format + * defined below. + * + *

The executable must print out the 3rd party token to STDOUT in JSON format. When an + * output_file is specified in the credential configuration, the executable must also handle writing the + * JSON response to this file. + * + *

+ * OIDC response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
+ *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * SAML2 response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
+ *   "saml_response": "...",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * Error response sample:
+ * {
+ *   "version": 1,
+ *   "success": false,
+ *   "code": "401",
+ *   "message": "Error message."
+ * }
+ * 
+ * + *

The "expiration_time" field in the JSON response is only required for successful + * responses when an output file was specified in the credential configuration + * + *

The auth libraries will populate certain environment variables that will be accessible by the + * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, + * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and + * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. + * + *

Please see this repositories README for a complete executable request/response specification. + */ +export declare class PluggableAuthClient extends BaseExternalAccountClient { + /** + * The command used to retrieve the third party token. + */ + private readonly command; + /** + * The timeout in milliseconds for running executable, + * set to default if none provided. + */ + private readonly timeoutMillis; + /** + * The path to file to check for cached executable response. + */ + private readonly outputFile?; + /** + * Executable and output file handler. + */ + private readonly handler; + /** + * Instantiates a PluggableAuthClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid pluggable auth credential. + * @param options The external account options object typically loaded from + * the external account JSON credential file. + */ + constructor(options: PluggableAuthClientOptions); + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. + * This uses the `options.credential_source` object to figure out how + * to retrieve the token using the current environment. In this case, + * this calls a user provided executable which returns the subject token. + * The logic is summarized as: + * 1. Validated that the executable is allowed to run. The + * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to + * 1 for security reasons. + * 2. If an output file is specified by the user, check the file location + * for a response. If the file exists and contains a valid response, + * return the subject token from the file. + * 3. Call the provided executable and return response. + * @return A promise that resolves with the external subject token. + */ + retrieveSubjectToken(): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js new file mode 100644 index 0000000000000000000000000000000000000000..e9cf39ff8114b7bbc5f1099fcc8844cb1d753329 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js @@ -0,0 +1,220 @@ +"use strict"; +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PluggableAuthClient = exports.ExecutableError = void 0; +const baseexternalclient_1 = require("./baseexternalclient"); +const executable_response_1 = require("./executable-response"); +const pluggable_auth_handler_1 = require("./pluggable-auth-handler"); +var pluggable_auth_handler_2 = require("./pluggable-auth-handler"); +Object.defineProperty(exports, "ExecutableError", { enumerable: true, get: function () { return pluggable_auth_handler_2.ExecutableError; } }); +/** + * The default executable timeout when none is provided, in milliseconds. + */ +const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000; +/** + * The minimum allowed executable timeout in milliseconds. + */ +const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000; +/** + * The maximum allowed executable timeout in milliseconds. + */ +const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000; +/** + * The environment variable to check to see if executable can be run. + * Value must be set to '1' for the executable to run. + */ +const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES'; +/** + * The maximum currently supported executable version. + */ +const MAXIMUM_EXECUTABLE_VERSION = 1; +/** + * PluggableAuthClient enables the exchange of workload identity pool external credentials for + * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These + * scripts/executables are completely independent of the Google Cloud Auth libraries. These + * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token + * to be exchanged for a Google access token. + * + *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable + * must be set to '1'. This is for security reasons. + * + *

Both OIDC and SAML are supported. The executable must adhere to a specific response format + * defined below. + * + *

The executable must print out the 3rd party token to STDOUT in JSON format. When an + * output_file is specified in the credential configuration, the executable must also handle writing the + * JSON response to this file. + * + *

+ * OIDC response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
+ *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * SAML2 response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
+ *   "saml_response": "...",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * Error response sample:
+ * {
+ *   "version": 1,
+ *   "success": false,
+ *   "code": "401",
+ *   "message": "Error message."
+ * }
+ * 
+ * + *

The "expiration_time" field in the JSON response is only required for successful + * responses when an output file was specified in the credential configuration + * + *

The auth libraries will populate certain environment variables that will be accessible by the + * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, + * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and + * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. + * + *

Please see this repositories README for a complete executable request/response specification. + */ +class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * The command used to retrieve the third party token. + */ + command; + /** + * The timeout in milliseconds for running executable, + * set to default if none provided. + */ + timeoutMillis; + /** + * The path to file to check for cached executable response. + */ + outputFile; + /** + * Executable and output file handler. + */ + handler; + /** + * Instantiates a PluggableAuthClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid pluggable auth credential. + * @param options The external account options object typically loaded from + * the external account JSON credential file. + */ + constructor(options) { + super(options); + if (!options.credential_source.executable) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + this.command = options.credential_source.executable.command; + if (!this.command) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + // Check if the provided timeout exists and if it is valid. + if (options.credential_source.executable.timeout_millis === undefined) { + this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS; + } + else { + this.timeoutMillis = options.credential_source.executable.timeout_millis; + if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS || + this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) { + throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` + + `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`); + } + } + this.outputFile = options.credential_source.executable.output_file; + this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({ + command: this.command, + timeoutMillis: this.timeoutMillis, + outputFile: this.outputFile, + }); + this.credentialSourceType = 'executable'; + } + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. + * This uses the `options.credential_source` object to figure out how + * to retrieve the token using the current environment. In this case, + * this calls a user provided executable which returns the subject token. + * The logic is summarized as: + * 1. Validated that the executable is allowed to run. The + * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to + * 1 for security reasons. + * 2. If an output file is specified by the user, check the file location + * for a response. If the file exists and contains a valid response, + * return the subject token from the file. + * 3. Call the provided executable and return response. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Check if the executable is allowed to run. + if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') { + throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' + + 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' + + 'Variable to 1.'); + } + let executableResponse = undefined; + // Try to get cached executable response from output file. + if (this.outputFile) { + executableResponse = await this.handler.retrieveCachedResponse(); + } + // If no response from output file, call the executable. + if (!executableResponse) { + // Set up environment map with required values for the executable. + const envMap = new Map(); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType); + // Always set to 0 because interactive mode is not supported. + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0'); + if (this.outputFile) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile); + } + const serviceAccountEmail = this.getServiceAccountEmail(); + if (serviceAccountEmail) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail); + } + executableResponse = + await this.handler.retrieveResponseFromExecutable(envMap); + } + if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) { + throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`); + } + // Check that response was successful. + if (!executableResponse.success) { + throw new pluggable_auth_handler_1.ExecutableError(executableResponse.errorMessage, executableResponse.errorCode); + } + // Check that response contains expiration time if output file was specified. + if (this.outputFile) { + if (!executableResponse.expirationTime) { + throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.'); + } + } + // Check that response is not expired. + if (executableResponse.isExpired()) { + throw new Error('Executable response is expired.'); + } + // Return subject token from response. + return executableResponse.subjectToken; + } +} +exports.PluggableAuthClient = PluggableAuthClient; +//# sourceMappingURL=pluggable-auth-client.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d881b237c85bf0f9875015db18dfdccfa372ff54 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.d.ts @@ -0,0 +1,61 @@ +import { ExecutableResponse } from './executable-response'; +/** + * Error thrown from the executable run by PluggableAuthClient. + */ +export declare class ExecutableError extends Error { + /** + * The exit code returned by the executable. + */ + readonly code: string; + constructor(message: string, code: string); +} +/** + * Defines the options used for the PluggableAuthHandler class. + */ +export interface PluggableAuthHandlerOptions { + /** + * The command used to retrieve the third party token. + */ + command: string; + /** + * The timeout in milliseconds for running executable, + * set to default if none provided. + */ + timeoutMillis: number; + /** + * The path to file to check for cached executable response. + */ + outputFile?: string; +} +/** + * A handler used to retrieve 3rd party token responses from user defined + * executables and cached file output for the PluggableAuthClient class. + */ +export declare class PluggableAuthHandler { + private readonly commandComponents; + private readonly timeoutMillis; + private readonly outputFile?; + /** + * Instantiates a PluggableAuthHandler instance using the provided + * PluggableAuthHandlerOptions object. + */ + constructor(options: PluggableAuthHandlerOptions); + /** + * Calls user provided executable to get a 3rd party subject token and + * returns the response. + * @param envMap a Map of additional Environment Variables required for + * the executable. + * @return A promise that resolves with the executable response. + */ + retrieveResponseFromExecutable(envMap: Map): Promise; + /** + * Checks user provided output file for response from previous run of + * executable and return the response if it exists, is formatted correctly, and is not expired. + */ + retrieveCachedResponse(): Promise; + /** + * Parses given command string into component array, splitting on spaces unless + * spaces are between quotation marks. + */ + private static parseCommand; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js new file mode 100644 index 0000000000000000000000000000000000000000..c2ddc19fc50cbe06f0b3b89b755d043e8e67b66f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js @@ -0,0 +1,174 @@ +"use strict"; +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PluggableAuthHandler = exports.ExecutableError = void 0; +const executable_response_1 = require("./executable-response"); +const childProcess = require("child_process"); +const fs = require("fs"); +/** + * Error thrown from the executable run by PluggableAuthClient. + */ +class ExecutableError extends Error { + /** + * The exit code returned by the executable. + */ + code; + constructor(message, code) { + super(`The executable failed with exit code: ${code} and error message: ${message}.`); + this.code = code; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.ExecutableError = ExecutableError; +/** + * A handler used to retrieve 3rd party token responses from user defined + * executables and cached file output for the PluggableAuthClient class. + */ +class PluggableAuthHandler { + commandComponents; + timeoutMillis; + outputFile; + /** + * Instantiates a PluggableAuthHandler instance using the provided + * PluggableAuthHandlerOptions object. + */ + constructor(options) { + if (!options.command) { + throw new Error('No command provided.'); + } + this.commandComponents = PluggableAuthHandler.parseCommand(options.command); + this.timeoutMillis = options.timeoutMillis; + if (!this.timeoutMillis) { + throw new Error('No timeoutMillis provided.'); + } + this.outputFile = options.outputFile; + } + /** + * Calls user provided executable to get a 3rd party subject token and + * returns the response. + * @param envMap a Map of additional Environment Variables required for + * the executable. + * @return A promise that resolves with the executable response. + */ + retrieveResponseFromExecutable(envMap) { + return new Promise((resolve, reject) => { + // Spawn process to run executable using added environment variables. + const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), { + env: { ...process.env, ...Object.fromEntries(envMap) }, + }); + let output = ''; + // Append stdout to output as executable runs. + child.stdout.on('data', (data) => { + output += data; + }); + // Append stderr as executable runs. + child.stderr.on('data', (err) => { + output += err; + }); + // Set up a timeout to end the child process and throw an error. + const timeout = setTimeout(() => { + // Kill child process and remove listeners so 'close' event doesn't get + // read after child process is killed. + child.removeAllListeners(); + child.kill(); + return reject(new Error('The executable failed to finish within the timeout specified.')); + }, this.timeoutMillis); + child.on('close', (code) => { + // Cancel timeout if executable closes before timeout is reached. + clearTimeout(timeout); + if (code === 0) { + // If the executable completed successfully, try to return the parsed response. + try { + const responseJson = JSON.parse(output); + const response = new executable_response_1.ExecutableResponse(responseJson); + return resolve(response); + } + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + return reject(error); + } + return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`)); + } + } + else { + return reject(new ExecutableError(output, code.toString())); + } + }); + }); + } + /** + * Checks user provided output file for response from previous run of + * executable and return the response if it exists, is formatted correctly, and is not expired. + */ + async retrieveCachedResponse() { + if (!this.outputFile || this.outputFile.length === 0) { + return undefined; + } + let filePath; + try { + filePath = await fs.promises.realpath(this.outputFile); + } + catch { + // If file path cannot be resolved, return undefined. + return undefined; + } + if (!(await fs.promises.lstat(filePath)).isFile()) { + // If path does not lead to file, return undefined. + return undefined; + } + const responseString = await fs.promises.readFile(filePath, { + encoding: 'utf8', + }); + if (responseString === '') { + return undefined; + } + try { + const responseJson = JSON.parse(responseString); + const response = new executable_response_1.ExecutableResponse(responseJson); + // Check if response is successful and unexpired. + if (response.isValid()) { + return new executable_response_1.ExecutableResponse(responseJson); + } + return undefined; + } + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + throw error; + } + throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`); + } + } + /** + * Parses given command string into component array, splitting on spaces unless + * spaces are between quotation marks. + */ + static parseCommand(command) { + // Split the command into components by splitting on spaces, + // unless spaces are contained in quotation marks. + const components = command.match(/(?:[^\s"]+|"[^"]*")+/g); + if (!components) { + throw new Error(`Provided command: "${command}" could not be parsed.`); + } + // Remove quotation marks from the beginning and end of each component if they are present. + for (let i = 0; i < components.length; i++) { + if (components[i][0] === '"' && components[i].slice(-1) === '"') { + components[i] = components[i].slice(1, -1); + } + } + return components; + } +} +exports.PluggableAuthHandler = PluggableAuthHandler; +//# sourceMappingURL=pluggable-auth-handler.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fdf22b7cd3f241f62a2af78e3c86cf3c7ea139cc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts @@ -0,0 +1,75 @@ +import * as stream from 'stream'; +import { JWTInput } from './credentials'; +import { GetTokenResponse, OAuth2Client, OAuth2ClientOptions } from './oauth2client'; +export declare const USER_REFRESH_ACCOUNT_TYPE = "authorized_user"; +export interface UserRefreshClientOptions extends OAuth2ClientOptions { + /** + * The authentication client ID. + */ + clientId?: string; + /** + * The authentication client secret. + */ + clientSecret?: string; + /** + * The authentication refresh token. + */ + refreshToken?: string; +} +export declare class UserRefreshClient extends OAuth2Client { + _refreshToken?: string | null; + /** + * The User Refresh Token client. + * + * @param optionsOrClientId The User Refresh Token client options. Passing an `clientId` directly is **@DEPRECATED**. + * @param clientSecret **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param refreshToken **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param eagerRefreshThresholdMillis **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param forceRefreshOnFailure **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + */ + constructor(optionsOrClientId?: string | UserRefreshClientOptions, + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + clientSecret?: UserRefreshClientOptions['clientSecret'], + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + refreshToken?: UserRefreshClientOptions['refreshToken'], + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + eagerRefreshThresholdMillis?: UserRefreshClientOptions['eagerRefreshThresholdMillis'], + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + forceRefreshOnFailure?: UserRefreshClientOptions['forceRefreshOnFailure']); + /** + * Refreshes the access token. + * @param refreshToken An ignored refreshToken.. + * @param callback Optional callback. + */ + protected refreshTokenNoCache(): Promise; + fetchIdToken(targetAudience: string): Promise; + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + fromJSON(json: JWTInput): void; + /** + * Create a UserRefreshClient credentials instance using the given input + * stream. + * @param inputStream The input stream. + * @param callback Optional callback. + */ + fromStream(inputStream: stream.Readable): Promise; + fromStream(inputStream: stream.Readable, callback: (err?: Error) => void): void; + private fromStreamAsync; + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + static fromJSON(json: JWTInput): UserRefreshClient; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.js new file mode 100644 index 0000000000000000000000000000000000000000..0c1b8747d956bc8760a2f867f348b4131d3ed3ac --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/refreshclient.js @@ -0,0 +1,159 @@ +"use strict"; +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0; +const oauth2client_1 = require("./oauth2client"); +const authclient_1 = require("./authclient"); +exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user'; +class UserRefreshClient extends oauth2client_1.OAuth2Client { + // TODO: refactor tests to make this private + // In a future gts release, the _propertyName rule will be lifted. + // This is also a hard one because `this.refreshToken` is a function. + _refreshToken; + /** + * The User Refresh Token client. + * + * @param optionsOrClientId The User Refresh Token client options. Passing an `clientId` directly is **@DEPRECATED**. + * @param clientSecret **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param refreshToken **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param eagerRefreshThresholdMillis **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + * @param forceRefreshOnFailure **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead. + */ + constructor(optionsOrClientId, + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + clientSecret, + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + refreshToken, + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + eagerRefreshThresholdMillis, + /** + * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead + */ + forceRefreshOnFailure) { + const opts = optionsOrClientId && typeof optionsOrClientId === 'object' + ? optionsOrClientId + : { + clientId: optionsOrClientId, + clientSecret, + refreshToken, + eagerRefreshThresholdMillis, + forceRefreshOnFailure, + }; + super(opts); + this._refreshToken = opts.refreshToken; + this.credentials.refresh_token = opts.refreshToken; + } + /** + * Refreshes the access token. + * @param refreshToken An ignored refreshToken.. + * @param callback Optional callback. + */ + async refreshTokenNoCache() { + return super.refreshTokenNoCache(this._refreshToken); + } + async fetchIdToken(targetAudience) { + const opts = { + ...UserRefreshClient.RETRY_CONFIG, + url: this.endpoints.oauth2TokenUrl, + method: 'POST', + data: new URLSearchParams({ + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + refresh_token: this._refreshToken, + target_audience: targetAudience, + }), + }; + authclient_1.AuthClient.setMethodName(opts, 'fetchIdToken'); + const res = await this.transporter.request(opts); + return res.data.id_token; + } + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the user refresh token'); + } + if (json.type !== 'authorized_user') { + throw new Error('The incoming JSON object does not have the "authorized_user" type'); + } + if (!json.client_id) { + throw new Error('The incoming JSON object does not contain a client_id field'); + } + if (!json.client_secret) { + throw new Error('The incoming JSON object does not contain a client_secret field'); + } + if (!json.refresh_token) { + throw new Error('The incoming JSON object does not contain a refresh_token field'); + } + this._clientId = json.client_id; + this._clientSecret = json.client_secret; + this._refreshToken = json.refresh_token; + this.credentials.refresh_token = json.refresh_token; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + async fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + return reject(new Error('Must pass in a stream containing the user refresh token.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + return resolve(); + } + catch (err) { + return reject(err); + } + }); + }); + } + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + static fromJSON(json) { + const client = new UserRefreshClient(); + client.fromJSON(json); + return client; + } +} +exports.UserRefreshClient = UserRefreshClient; +//# sourceMappingURL=refreshclient.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2d89570e3044a928f892798c906433145479c52 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.d.ts @@ -0,0 +1,125 @@ +import { GaxiosResponse } from 'gaxios'; +import { HeadersInit } from './authclient'; +import { ClientAuthentication, OAuthClientAuthHandler, OAuthClientAuthHandlerOptions } from './oauth2common'; +/** + * Defines the interface needed to initialize an StsCredentials instance. + * The interface does not directly map to the spec and instead is converted + * to be compliant with the JavaScript style guide. This is because this is + * instantiated internally. + * StsCredentials implement the OAuth 2.0 token exchange based on + * https://tools.ietf.org/html/rfc8693. + * Request options are defined in + * https://tools.ietf.org/html/rfc8693#section-2.1 + */ +export interface StsCredentialsOptions { + /** + * REQUIRED. The value "urn:ietf:params:oauth:grant-type:token-exchange" + * indicates that a token exchange is being performed. + */ + grantType: string; + /** + * OPTIONAL. A URI that indicates the target service or resource where the + * client intends to use the requested security token. + */ + resource?: string; + /** + * OPTIONAL. The logical name of the target service where the client + * intends to use the requested security token. This serves a purpose + * similar to the "resource" parameter but with the client providing a + * logical name for the target service. + */ + audience?: string; + /** + * OPTIONAL. A list of space-delimited, case-sensitive strings, as defined + * in Section 3.3 of [RFC6749], that allow the client to specify the desired + * scope of the requested security token in the context of the service or + * resource where the token will be used. + */ + scope?: string[]; + /** + * OPTIONAL. An identifier, as described in Section 3 of [RFC8693], eg. + * "urn:ietf:params:oauth:token-type:access_token" for the type of the + * requested security token. + */ + requestedTokenType?: string; + /** + * REQUIRED. A security token that represents the identity of the party on + * behalf of whom the request is being made. + */ + subjectToken: string; + /** + * REQUIRED. An identifier, as described in Section 3 of [RFC8693], that + * indicates the type of the security token in the "subject_token" parameter. + */ + subjectTokenType: string; + actingParty?: { + /** + * OPTIONAL. A security token that represents the identity of the acting + * party. Typically, this will be the party that is authorized to use the + * requested security token and act on behalf of the subject. + */ + actorToken: string; + /** + * An identifier, as described in Section 3, that indicates the type of the + * security token in the "actor_token" parameter. This is REQUIRED when the + * "actor_token" parameter is present in the request but MUST NOT be + * included otherwise. + */ + actorTokenType: string; + }; +} +/** + * Defines the OAuth 2.0 token exchange successful response based on + * https://tools.ietf.org/html/rfc8693#section-2.2.1 + */ +export interface StsSuccessfulResponse { + access_token: string; + issued_token_type: string; + token_type: string; + expires_in?: number; + refresh_token?: string; + scope?: string; + res?: GaxiosResponse | null; +} +export interface StsCredentialsConstructionOptions extends OAuthClientAuthHandlerOptions { + /** + * The client authentication credentials if available. + */ + clientAuthentication?: ClientAuthentication; + /** + * The token exchange endpoint. + */ + tokenExchangeEndpoint: string | URL; +} +/** + * Implements the OAuth 2.0 token exchange based on + * https://tools.ietf.org/html/rfc8693 + */ +export declare class StsCredentials extends OAuthClientAuthHandler { + #private; + /** + * Initializes an STS credentials instance. + * + * @param options The STS credentials instance options. Passing an `tokenExchangeEndpoint` directly is **@DEPRECATED**. + * @param clientAuthentication **@DEPRECATED**. Provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead. + */ + constructor(options?: StsCredentialsConstructionOptions | string | URL, + /** + * @deprecated - provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead + */ + clientAuthentication?: ClientAuthentication); + /** + * Exchanges the provided token for another type of token based on the + * rfc8693 spec. + * @param stsCredentialsOptions The token exchange options used to populate + * the token exchange request. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @param options Optional additional GCP-specific non-spec defined options + * to send with the request. + * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` + * @return A promise that resolves with the token exchange response containing + * the requested token and its expiration time. + */ + exchangeToken(stsCredentialsOptions: StsCredentialsOptions, headers?: HeadersInit, options?: Parameters[0]): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.js new file mode 100644 index 0000000000000000000000000000000000000000..c75f473dc55e0961f389525e5eaafb67721b2301 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/stscredentials.js @@ -0,0 +1,106 @@ +"use strict"; +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StsCredentials = void 0; +const gaxios_1 = require("gaxios"); +const authclient_1 = require("./authclient"); +const oauth2common_1 = require("./oauth2common"); +const util_1 = require("../util"); +/** + * Implements the OAuth 2.0 token exchange based on + * https://tools.ietf.org/html/rfc8693 + */ +class StsCredentials extends oauth2common_1.OAuthClientAuthHandler { + #tokenExchangeEndpoint; + /** + * Initializes an STS credentials instance. + * + * @param options The STS credentials instance options. Passing an `tokenExchangeEndpoint` directly is **@DEPRECATED**. + * @param clientAuthentication **@DEPRECATED**. Provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead. + */ + constructor(options = { + tokenExchangeEndpoint: '', + }, + /** + * @deprecated - provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead + */ + clientAuthentication) { + if (typeof options !== 'object' || options instanceof URL) { + options = { + tokenExchangeEndpoint: options, + clientAuthentication, + }; + } + super(options); + this.#tokenExchangeEndpoint = options.tokenExchangeEndpoint; + } + /** + * Exchanges the provided token for another type of token based on the + * rfc8693 spec. + * @param stsCredentialsOptions The token exchange options used to populate + * the token exchange request. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @param options Optional additional GCP-specific non-spec defined options + * to send with the request. + * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` + * @return A promise that resolves with the token exchange response containing + * the requested token and its expiration time. + */ + async exchangeToken(stsCredentialsOptions, headers, options) { + const values = { + grant_type: stsCredentialsOptions.grantType, + resource: stsCredentialsOptions.resource, + audience: stsCredentialsOptions.audience, + scope: stsCredentialsOptions.scope?.join(' '), + requested_token_type: stsCredentialsOptions.requestedTokenType, + subject_token: stsCredentialsOptions.subjectToken, + subject_token_type: stsCredentialsOptions.subjectTokenType, + actor_token: stsCredentialsOptions.actingParty?.actorToken, + actor_token_type: stsCredentialsOptions.actingParty?.actorTokenType, + // Non-standard GCP-specific options. + options: options && JSON.stringify(options), + }; + const opts = { + ...StsCredentials.RETRY_CONFIG, + url: this.#tokenExchangeEndpoint.toString(), + method: 'POST', + headers, + data: new URLSearchParams((0, util_1.removeUndefinedValuesInObject)(values)), + }; + authclient_1.AuthClient.setMethodName(opts, 'exchangeToken'); + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const stsSuccessfulResponse = response.data; + stsSuccessfulResponse.res = response; + return stsSuccessfulResponse; + } + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); + } + // Request could fail before the server responds. + throw error; + } + } +} +exports.StsCredentials = StsCredentials; +//# sourceMappingURL=stscredentials.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c6d088395e397c8d58bf516cb9e5deeb83fd16d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.d.ts @@ -0,0 +1,57 @@ +import { ExternalAccountSupplierContext } from './baseexternalclient'; +import { GaxiosOptions } from 'gaxios'; +import { SubjectTokenFormatType, SubjectTokenSupplier } from './identitypoolclient'; +/** + * Interface that defines options used to build a {@link UrlSubjectTokenSupplier} + */ +export interface UrlSubjectTokenSupplierOptions { + /** + * The URL to call to retrieve the subject token. This is typically a local + * metadata server. + */ + url: string; + /** + * The token file or URL response type (JSON or text). + */ + formatType: SubjectTokenFormatType; + /** + * For JSON response types, this is the subject_token field name. For Azure, + * this is access_token. For text response types, this is ignored. + */ + subjectTokenFieldName?: string; + /** + * The optional additional headers to send with the request to the metadata + * server url. + */ + headers?: { + [key: string]: string; + }; + /** + * Additional gaxios options to use for the request to the specified URL. + */ + additionalGaxiosOptions?: GaxiosOptions; +} +/** + * Internal subject token supplier implementation used when a URL + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +export declare class UrlSubjectTokenSupplier implements SubjectTokenSupplier { + private readonly url; + private readonly headers?; + private readonly formatType; + private readonly subjectTokenFieldName?; + private readonly additionalGaxiosOptions?; + /** + * Instantiates a URL subject token supplier. + * @param opts The URL subject token supplier options to build the supplier with. + */ + constructor(opts: UrlSubjectTokenSupplierOptions); + /** + * Sends a GET request to the URL provided in the constructor and resolves + * with the returned external subject token. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + getSubjectToken(context: ExternalAccountSupplierContext): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.js new file mode 100644 index 0000000000000000000000000000000000000000..76af8b8e5f5cb3bac72d20cae471bf30e55c87c1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.js @@ -0,0 +1,70 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UrlSubjectTokenSupplier = void 0; +const authclient_1 = require("./authclient"); +/** + * Internal subject token supplier implementation used when a URL + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +class UrlSubjectTokenSupplier { + url; + headers; + formatType; + subjectTokenFieldName; + additionalGaxiosOptions; + /** + * Instantiates a URL subject token supplier. + * @param opts The URL subject token supplier options to build the supplier with. + */ + constructor(opts) { + this.url = opts.url; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + this.headers = opts.headers; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; + } + /** + * Sends a GET request to the URL provided in the constructor and resolves + * with the returned external subject token. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken(context) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.url, + method: 'GET', + headers: this.headers, + }; + authclient_1.AuthClient.setMethodName(opts, 'getSubjectToken'); + let subjectToken; + if (this.formatType === 'text') { + const response = await context.transporter.request(opts); + subjectToken = response.data; + } + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const response = await context.transporter.request(opts); + subjectToken = response.data[this.subjectTokenFieldName]; + } + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source URL'); + } + return subjectToken; + } +} +exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier; +//# sourceMappingURL=urlsubjecttokensupplier.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..40a1b24d0043d39d318872394d33247ed75cefcb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.d.ts @@ -0,0 +1,27 @@ +import { Crypto, JwkCertificate } from '../shared'; +export declare class BrowserCrypto implements Crypto { + constructor(); + sha256DigestBase64(str: string): Promise; + randomBytesBase64(count: number): string; + private static padBase64; + verify(pubkey: JwkCertificate, data: string, signature: string): Promise; + sign(privateKey: JwkCertificate, data: string): Promise; + decodeBase64StringUtf8(base64: string): string; + encodeBase64StringUtf8(text: string): string; + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + sha256DigestHex(str: string): Promise; + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + signWithHmacSha256(key: string | ArrayBuffer, msg: string): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.js new file mode 100644 index 0000000000000000000000000000000000000000..1c35c0372560382dca0ba4a85e0377ba89126a08 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/browser/crypto.js @@ -0,0 +1,127 @@ +"use strict"; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +/* global window */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BrowserCrypto = void 0; +// This file implements crypto functions we need using in-browser +// SubtleCrypto interface `window.crypto.subtle`. +const base64js = require("base64-js"); +const shared_1 = require("../shared"); +class BrowserCrypto { + constructor() { + if (typeof window === 'undefined' || + window.crypto === undefined || + window.crypto.subtle === undefined) { + throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); + } + } + async sha256DigestBase64(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return base64js.fromByteArray(new Uint8Array(outputBuffer)); + } + randomBytesBase64(count) { + const array = new Uint8Array(count); + window.crypto.getRandomValues(array); + return base64js.fromByteArray(array); + } + static padBase64(base64) { + // base64js requires padding, so let's add some '=' + while (base64.length % 4 !== 0) { + base64 += '='; + } + return base64; + } + async verify(pubkey, data, signature) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature)); + const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']); + // SubtleCrypto's verify method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.verify(algo, cryptoKey, signatureArray, dataArray); + return result; + } + async sign(privateKey, data) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']); + // SubtleCrypto's sign method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray); + return base64js.fromByteArray(new Uint8Array(result)); + } + decodeBase64StringUtf8(base64) { + const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64)); + const result = new TextDecoder().decode(uint8array); + return result; + } + encodeBase64StringUtf8(text) { + const uint8array = new TextEncoder().encode(text); + const result = base64js.fromByteArray(uint8array); + return result; + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return (0, shared_1.fromArrayBufferToHex)(outputBuffer); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + // Convert key, if provided in ArrayBuffer format, to string. + const rawKey = typeof key === 'string' + ? key + : String.fromCharCode(...new Uint16Array(key)); + const enc = new TextEncoder(); + const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), { + name: 'HMAC', + hash: { + name: 'SHA-256', + }, + }, false, ['sign']); + return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg)); + } +} +exports.BrowserCrypto = BrowserCrypto; +//# sourceMappingURL=crypto.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..10d8d753d1e6e2fa596b2131c098855f708f5809 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.d.ts @@ -0,0 +1,8 @@ +import { Crypto } from './shared'; +export * from './shared'; +export interface CryptoSigner { + update(data: string): void; + sign(key: string, outputFormat: string): string; +} +export declare function createCrypto(): Crypto; +export declare function hasBrowserCrypto(): boolean; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.js new file mode 100644 index 0000000000000000000000000000000000000000..794b528bab0d676350d516ed78b17dab21696efe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/crypto.js @@ -0,0 +1,54 @@ +"use strict"; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +/* global window */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createCrypto = createCrypto; +exports.hasBrowserCrypto = hasBrowserCrypto; +const crypto_1 = require("./browser/crypto"); +const crypto_2 = require("./node/crypto"); +__exportStar(require("./shared"), exports); +// Crypto interface will provide required crypto functions. +// Use `createCrypto()` factory function to create an instance +// of Crypto. It will either use Node.js `crypto` module, or +// use browser's SubtleCrypto interface. Since most of the +// SubtleCrypto methods return promises, we must make those +// methods return promises here as well, even though in Node.js +// they are synchronous. +function createCrypto() { + if (hasBrowserCrypto()) { + return new crypto_1.BrowserCrypto(); + } + return new crypto_2.NodeCrypto(); +} +function hasBrowserCrypto() { + return (typeof window !== 'undefined' && + typeof window.crypto !== 'undefined' && + typeof window.crypto.subtle !== 'undefined'); +} +//# sourceMappingURL=crypto.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ccd6dbb5ea41d4f63c26b5246de509849b36e632 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.d.ts @@ -0,0 +1,25 @@ +import { Crypto } from '../shared'; +export declare class NodeCrypto implements Crypto { + sha256DigestBase64(str: string): Promise; + randomBytesBase64(count: number): string; + verify(pubkey: string, data: string | Buffer, signature: string): Promise; + sign(privateKey: string, data: string | Buffer): Promise; + decodeBase64StringUtf8(base64: string): string; + encodeBase64StringUtf8(text: string): string; + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + sha256DigestHex(str: string): Promise; + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + signWithHmacSha256(key: string | ArrayBuffer, msg: string): Promise; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.js new file mode 100644 index 0000000000000000000000000000000000000000..38e36331a765e3fa9c6cd144e01644b3710e9367 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/node/crypto.js @@ -0,0 +1,83 @@ +"use strict"; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NodeCrypto = void 0; +const crypto = require("crypto"); +class NodeCrypto { + async sha256DigestBase64(str) { + return crypto.createHash('sha256').update(str).digest('base64'); + } + randomBytesBase64(count) { + return crypto.randomBytes(count).toString('base64'); + } + async verify(pubkey, data, signature) { + const verifier = crypto.createVerify('RSA-SHA256'); + verifier.update(data); + verifier.end(); + return verifier.verify(pubkey, signature, 'base64'); + } + async sign(privateKey, data) { + const signer = crypto.createSign('RSA-SHA256'); + signer.update(data); + signer.end(); + return signer.sign(privateKey, 'base64'); + } + decodeBase64StringUtf8(base64) { + return Buffer.from(base64, 'base64').toString('utf-8'); + } + encodeBase64StringUtf8(text) { + return Buffer.from(text, 'utf-8').toString('base64'); + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + return crypto.createHash('sha256').update(str).digest('hex'); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + const cryptoKey = typeof key === 'string' ? key : toBuffer(key); + return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest()); + } +} +exports.NodeCrypto = NodeCrypto; +/** + * Converts a Node.js Buffer to an ArrayBuffer. + * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer + * @param buffer The Buffer input to covert. + * @return The ArrayBuffer representation of the input. + */ +function toArrayBuffer(buffer) { + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); +} +/** + * Converts an ArrayBuffer to a Node.js Buffer. + * @param arrayBuffer The ArrayBuffer input to covert. + * @return The Buffer representation of the input. + */ +function toBuffer(arrayBuffer) { + return Buffer.from(arrayBuffer); +} +//# sourceMappingURL=crypto.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c18f698434241cba6728ecdd66f4d6d007ba37a6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.d.ts @@ -0,0 +1,47 @@ +/** + * Crypto interface will provide required crypto functions. + * Use `createCrypto()` factory function to create an instance + * of Crypto. It will either use Node.js `crypto` module, or + * use browser's SubtleCrypto interface. Since most of the + * SubtleCrypto methods return promises, we must make those + * methods return promises here as well, even though in Node.js + * they are synchronous. + */ +export interface Crypto { + sha256DigestBase64(str: string): Promise; + randomBytesBase64(n: number): string; + verify(pubkey: string | JwkCertificate, data: string | Buffer, signature: string): Promise; + sign(privateKey: string | JwkCertificate, data: string | Buffer): Promise; + decodeBase64StringUtf8(base64: string): string; + encodeBase64StringUtf8(text: string): string; + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + sha256DigestHex(str: string): Promise; + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + signWithHmacSha256(key: string | ArrayBuffer, msg: string): Promise; +} +export interface JwkCertificate { + kty: string; + alg: string; + use?: string; + kid: string; + n: string; + e: string; +} +/** + * Converts an ArrayBuffer to a hexadecimal string. + * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. + * @return The hexadecimal encoding of the ArrayBuffer. + */ +export declare function fromArrayBufferToHex(arrayBuffer: ArrayBuffer): string; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.js new file mode 100644 index 0000000000000000000000000000000000000000..ad3396721ebb8511a7f3668305deb2d3057266dd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/crypto/shared.js @@ -0,0 +1,32 @@ +"use strict"; +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromArrayBufferToHex = fromArrayBufferToHex; +/** + * Converts an ArrayBuffer to a hexadecimal string. + * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. + * @return The hexadecimal encoding of the ArrayBuffer. + */ +function fromArrayBufferToHex(arrayBuffer) { + // Convert buffer to byte array. + const byteArray = Array.from(new Uint8Array(arrayBuffer)); + // Convert bytes to hex string. + return byteArray + .map(byte => { + return byte.toString(16).padStart(2, '0'); + }) + .join(''); +} +//# sourceMappingURL=shared.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1379de9c106537feda2f3dafe08e2a9a1e929446 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.d.ts @@ -0,0 +1,36 @@ +import { GoogleAuth } from './auth/googleauth'; +export * as gcpMetadata from 'gcp-metadata'; +export * as gaxios from 'gaxios'; +import { AuthClient } from './auth/authclient'; +export { AuthClient, DEFAULT_UNIVERSE } from './auth/authclient'; +export { Compute, ComputeOptions } from './auth/computeclient'; +export { CredentialBody, CredentialRequest, Credentials, JWTInput, } from './auth/credentials'; +export { GCPEnv } from './auth/envDetect'; +export { GoogleAuthOptions, ProjectIdCallback } from './auth/googleauth'; +export { IAMAuth, RequestMetadata } from './auth/iam'; +export { IdTokenClient, IdTokenProvider } from './auth/idtokenclient'; +export { Claims, JWTAccess } from './auth/jwtaccess'; +export { JWT, JWTOptions } from './auth/jwtclient'; +export { Impersonated, ImpersonatedOptions } from './auth/impersonated'; +export { Certificates, CodeChallengeMethod, CodeVerifierResults, GenerateAuthUrlOpts, GetTokenOptions, OAuth2Client, OAuth2ClientOptions, RefreshOptions, TokenInfo, VerifyIdTokenOptions, ClientAuthentication, } from './auth/oauth2client'; +export { LoginTicket, TokenPayload } from './auth/loginticket'; +export { UserRefreshClient, UserRefreshClientOptions, } from './auth/refreshclient'; +export { AwsClient, AwsClientOptions, AwsSecurityCredentialsSupplier, } from './auth/awsclient'; +export { AwsSecurityCredentials, AwsRequestSigner, } from './auth/awsrequestsigner'; +export { IdentityPoolClient, IdentityPoolClientOptions, SubjectTokenSupplier, } from './auth/identitypoolclient'; +export { ExternalAccountClient, ExternalAccountClientOptions, } from './auth/externalclient'; +export { BaseExternalAccountClient, BaseExternalAccountClientOptions, SharedExternalAccountClientOptions, ExternalAccountSupplierContext, IamGenerateAccessTokenResponse, } from './auth/baseexternalclient'; +export { CredentialAccessBoundary, DownscopedClient, } from './auth/downscopedclient'; +export { PluggableAuthClient, PluggableAuthClientOptions, ExecutableError, } from './auth/pluggable-auth-client'; +export { PassThroughClient } from './auth/passthrough'; +type ALL_EXPORTS = (typeof import('./'))[keyof typeof import('./')]; +/** + * A union type for all {@link AuthClient `AuthClient`} constructors. + */ +export type AnyAuthClientConstructor = Extract; +/** + * A union type for all {@link AuthClient `AuthClient`}s. + */ +export type AnyAuthClient = InstanceType; +declare const auth: GoogleAuth; +export { auth, GoogleAuth }; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b589b8581aaedaec6412c3a197e8e2cc495d288b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/index.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GoogleAuth = exports.auth = exports.PassThroughClient = exports.ExecutableError = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsRequestSigner = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.ClientAuthentication = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0; +// Copyright 2017 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const googleauth_1 = require("./auth/googleauth"); +Object.defineProperty(exports, "GoogleAuth", { enumerable: true, get: function () { return googleauth_1.GoogleAuth; } }); +// Export common deps to ensure types/instances are the exact match. Useful +// for consistently configuring the library across versions. +exports.gcpMetadata = require("gcp-metadata"); +exports.gaxios = require("gaxios"); +var authclient_1 = require("./auth/authclient"); +Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return authclient_1.AuthClient; } }); +Object.defineProperty(exports, "DEFAULT_UNIVERSE", { enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } }); +var computeclient_1 = require("./auth/computeclient"); +Object.defineProperty(exports, "Compute", { enumerable: true, get: function () { return computeclient_1.Compute; } }); +var envDetect_1 = require("./auth/envDetect"); +Object.defineProperty(exports, "GCPEnv", { enumerable: true, get: function () { return envDetect_1.GCPEnv; } }); +var iam_1 = require("./auth/iam"); +Object.defineProperty(exports, "IAMAuth", { enumerable: true, get: function () { return iam_1.IAMAuth; } }); +var idtokenclient_1 = require("./auth/idtokenclient"); +Object.defineProperty(exports, "IdTokenClient", { enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } }); +var jwtaccess_1 = require("./auth/jwtaccess"); +Object.defineProperty(exports, "JWTAccess", { enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } }); +var jwtclient_1 = require("./auth/jwtclient"); +Object.defineProperty(exports, "JWT", { enumerable: true, get: function () { return jwtclient_1.JWT; } }); +var impersonated_1 = require("./auth/impersonated"); +Object.defineProperty(exports, "Impersonated", { enumerable: true, get: function () { return impersonated_1.Impersonated; } }); +var oauth2client_1 = require("./auth/oauth2client"); +Object.defineProperty(exports, "CodeChallengeMethod", { enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } }); +Object.defineProperty(exports, "OAuth2Client", { enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } }); +Object.defineProperty(exports, "ClientAuthentication", { enumerable: true, get: function () { return oauth2client_1.ClientAuthentication; } }); +var loginticket_1 = require("./auth/loginticket"); +Object.defineProperty(exports, "LoginTicket", { enumerable: true, get: function () { return loginticket_1.LoginTicket; } }); +var refreshclient_1 = require("./auth/refreshclient"); +Object.defineProperty(exports, "UserRefreshClient", { enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } }); +var awsclient_1 = require("./auth/awsclient"); +Object.defineProperty(exports, "AwsClient", { enumerable: true, get: function () { return awsclient_1.AwsClient; } }); +var awsrequestsigner_1 = require("./auth/awsrequestsigner"); +Object.defineProperty(exports, "AwsRequestSigner", { enumerable: true, get: function () { return awsrequestsigner_1.AwsRequestSigner; } }); +var identitypoolclient_1 = require("./auth/identitypoolclient"); +Object.defineProperty(exports, "IdentityPoolClient", { enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } }); +var externalclient_1 = require("./auth/externalclient"); +Object.defineProperty(exports, "ExternalAccountClient", { enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } }); +var baseexternalclient_1 = require("./auth/baseexternalclient"); +Object.defineProperty(exports, "BaseExternalAccountClient", { enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } }); +var downscopedclient_1 = require("./auth/downscopedclient"); +Object.defineProperty(exports, "DownscopedClient", { enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } }); +var pluggable_auth_client_1 = require("./auth/pluggable-auth-client"); +Object.defineProperty(exports, "PluggableAuthClient", { enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } }); +Object.defineProperty(exports, "ExecutableError", { enumerable: true, get: function () { return pluggable_auth_client_1.ExecutableError; } }); +var passthrough_1 = require("./auth/passthrough"); +Object.defineProperty(exports, "PassThroughClient", { enumerable: true, get: function () { return passthrough_1.PassThroughClient; } }); +const auth = new googleauth_1.GoogleAuth(); +exports.auth = auth; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.cjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.cjs new file mode 100644 index 0000000000000000000000000000000000000000..8fb472b6de6e2c56d9cc76b38bd3dae63f214946 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.cjs @@ -0,0 +1,22 @@ +"use strict"; +// Copyright 2023 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.USER_AGENT = exports.PRODUCT_NAME = exports.pkg = void 0; +const pkg = require('../../package.json'); +exports.pkg = pkg; +const PRODUCT_NAME = 'google-api-nodejs-client'; +exports.PRODUCT_NAME = PRODUCT_NAME; +const USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`; +exports.USER_AGENT = USER_AGENT; +//# sourceMappingURL=shared.cjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.d.cts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.d.cts new file mode 100644 index 0000000000000000000000000000000000000000..50fa3df9de13408efec818cfb57b3641f4fda2df --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/shared.d.cts @@ -0,0 +1,7 @@ +declare const pkg: { + name: string; + version: string; +}; +declare const PRODUCT_NAME = "google-api-nodejs-client"; +declare const USER_AGENT: string; +export { pkg, PRODUCT_NAME, USER_AGENT }; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f14b34c1c2a7ab945e8a67a30c62936aac3507e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.d.ts @@ -0,0 +1,151 @@ +/** + * A utility for converting snake_case to camelCase. + * + * For, for example `my_snake_string` becomes `mySnakeString`. + */ +export type SnakeToCamel = S extends `${infer FirstWord}_${infer Remainder}` ? `${FirstWord}${Capitalize>}` : S; +/** + * A utility for converting an type's keys from snake_case + * to camelCase, if the keys are strings. + * + * For example: + * + * ```ts + * { + * my_snake_string: boolean; + * myCamelString: string; + * my_snake_obj: { + * my_snake_obj_string: string; + * }; + * } + * ``` + * + * becomes: + * + * ```ts + * { + * mySnakeString: boolean; + * myCamelString: string; + * mySnakeObj: { + * mySnakeObjString: string; + * } + * } + * ``` + * + * @remarks + * + * The generated documentation for the camelCase'd properties won't be available + * until {@link https://github.com/microsoft/TypeScript/issues/50715} has been + * resolved. + */ +export type SnakeToCamelObject = { + [K in keyof T as SnakeToCamel]: T[K] extends {} ? SnakeToCamelObject : T[K]; +}; +/** + * A utility for adding camelCase versions of a type's snake_case keys, if the + * keys are strings, preserving any existing keys. + * + * For example: + * + * ```ts + * { + * my_snake_boolean: boolean; + * myCamelString: string; + * my_snake_obj: { + * my_snake_obj_string: string; + * }; + * } + * ``` + * + * becomes: + * + * ```ts + * { + * my_snake_boolean: boolean; + * mySnakeBoolean: boolean; + * myCamelString: string; + * my_snake_obj: { + * my_snake_obj_string: string; + * }; + * mySnakeObj: { + * mySnakeObjString: string; + * } + * } + * ``` + * @remarks + * + * The generated documentation for the camelCase'd properties won't be available + * until {@link https://github.com/microsoft/TypeScript/issues/50715} has been + * resolved. + * + * Tracking: {@link https://github.com/googleapis/google-auth-library-nodejs/issues/1686} + */ +export type OriginalAndCamel = { + [K in keyof T as K | SnakeToCamel]: T[K] extends {} ? OriginalAndCamel : T[K]; +}; +/** + * Returns the camel case of a provided string. + * + * @remarks + * + * Match any `_` and not `_` pair, then return the uppercase of the not `_` + * character. + * + * @param str the string to convert + * @returns the camelCase'd string + */ +export declare function snakeToCamel(str: T): SnakeToCamel; +/** + * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference + * for original, non-camelCase key. + * + * @param obj object to lookup a value in + * @returns a `get` function for getting `obj[key || snakeKey]`, if available + */ +export declare function originalOrCamelOptions(obj?: T): { + get: & string>(key: K) => OriginalAndCamel[K]; +}; +export interface LRUCacheOptions { + /** + * The maximum number of items to cache. + */ + capacity: number; + /** + * An optional max age for items in milliseconds. + */ + maxAge?: number; +} +/** + * A simple LRU cache utility. + * Not meant for external usage. + * + * @experimental + */ +export declare class LRUCache { + #private; + readonly capacity: number; + maxAge?: number; + constructor(options: LRUCacheOptions); + /** + * Add an item to the cache. + * + * @param key the key to upsert + * @param value the value of the key + */ + set(key: string, value: T): void; + /** + * Get an item from the cache. + * + * @param key the key to retrieve + */ + get(key: string): T | undefined; +} +export declare function removeUndefinedValuesInObject(object: { + [key: string]: unknown; +}): { + [key: string]: unknown; +}; +/** + * Helper to check if a path points to a valid file. + */ +export declare function isValidFile(filePath: string): Promise; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.js new file mode 100644 index 0000000000000000000000000000000000000000..43228942e0c82fae4962ed38b5043e60bb492a2c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-auth-library/build/src/util.js @@ -0,0 +1,176 @@ +"use strict"; +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = void 0; +exports.snakeToCamel = snakeToCamel; +exports.originalOrCamelOptions = originalOrCamelOptions; +exports.removeUndefinedValuesInObject = removeUndefinedValuesInObject; +exports.isValidFile = isValidFile; +exports.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation; +const fs = require("fs"); +const os = require("os"); +const path = require("path"); +const WELL_KNOWN_CERTIFICATE_CONFIG_FILE = 'certificate_config.json'; +const CLOUDSDK_CONFIG_DIRECTORY = 'gcloud'; +/** + * Returns the camel case of a provided string. + * + * @remarks + * + * Match any `_` and not `_` pair, then return the uppercase of the not `_` + * character. + * + * @param str the string to convert + * @returns the camelCase'd string + */ +function snakeToCamel(str) { + return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase()); +} +/** + * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference + * for original, non-camelCase key. + * + * @param obj object to lookup a value in + * @returns a `get` function for getting `obj[key || snakeKey]`, if available + */ +function originalOrCamelOptions(obj) { + /** + * + * @param key an index of object, preferably snake_case + * @returns the value `obj[key || snakeKey]`, if available + */ + function get(key) { + const o = (obj || {}); + return o[key] ?? o[snakeToCamel(key)]; + } + return { get }; +} +/** + * A simple LRU cache utility. + * Not meant for external usage. + * + * @experimental + */ +class LRUCache { + capacity; + /** + * Maps are in order. Thus, the older item is the first item. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} + */ + #cache = new Map(); + maxAge; + constructor(options) { + this.capacity = options.capacity; + this.maxAge = options.maxAge; + } + /** + * Moves the key to the end of the cache. + * + * @param key the key to move + * @param value the value of the key + */ + #moveToEnd(key, value) { + this.#cache.delete(key); + this.#cache.set(key, { + value, + lastAccessed: Date.now(), + }); + } + /** + * Add an item to the cache. + * + * @param key the key to upsert + * @param value the value of the key + */ + set(key, value) { + this.#moveToEnd(key, value); + this.#evict(); + } + /** + * Get an item from the cache. + * + * @param key the key to retrieve + */ + get(key) { + const item = this.#cache.get(key); + if (!item) + return; + this.#moveToEnd(key, item.value); + this.#evict(); + return item.value; + } + /** + * Maintain the cache based on capacity and TTL. + */ + #evict() { + const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0; + /** + * Because we know Maps are in order, this item is both the + * last item in the list (capacity) and oldest (maxAge). + */ + let oldestItem = this.#cache.entries().next(); + while (!oldestItem.done && + (this.#cache.size > this.capacity || // too many + oldestItem.value[1].lastAccessed < cutoffDate) // too old + ) { + this.#cache.delete(oldestItem.value[0]); + oldestItem = this.#cache.entries().next(); + } + } +} +exports.LRUCache = LRUCache; +// Given and object remove fields where value is undefined. +function removeUndefinedValuesInObject(object) { + Object.entries(object).forEach(([key, value]) => { + if (value === undefined || value === 'undefined') { + delete object[key]; + } + }); + return object; +} +/** + * Helper to check if a path points to a valid file. + */ +async function isValidFile(filePath) { + try { + const stats = await fs.promises.lstat(filePath); + return stats.isFile(); + } + catch (e) { + return false; + } +} +/** + * Determines the well-known gcloud location for the certificate config file. + * @returns The platform-specific path to the configuration file. + * @internal + */ +function getWellKnownCertificateConfigFileLocation() { + const configDir = process.env.CLOUDSDK_CONFIG || + (_isWindows() + ? path.join(process.env.APPDATA || '', CLOUDSDK_CONFIG_DIRECTORY) + : path.join(process.env.HOME || '', '.config', CLOUDSDK_CONFIG_DIRECTORY)); + return path.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE); +} +/** + * Checks if the current operating system is Windows. + * @returns True if the OS is Windows, false otherwise. + * @internal + */ +function _isWindows() { + return os.platform().startsWith('win'); +} +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d7c6bf7f44a9807b1742f36208a83a38f22370a8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.d.ts @@ -0,0 +1,29 @@ +import * as tty from 'tty'; +/** + * Handles figuring out if we can use ANSI colours and handing out the escape codes. + * + * This is for package-internal use only, and may change at any time. + * + * @private + * @internal + */ +export declare class Colours { + static enabled: boolean; + static reset: string; + static bright: string; + static dim: string; + static red: string; + static green: string; + static yellow: string; + static blue: string; + static magenta: string; + static cyan: string; + static white: string; + static grey: string; + /** + * @param stream The stream (e.g. process.stderr) + * @returns true if the stream should have colourization enabled + */ + static isEnabled(stream: tty.WriteStream): boolean; + static refresh(): void; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js new file mode 100644 index 0000000000000000000000000000000000000000..628f8bb4282a972fa8cf80f2e08c6440077cbcc5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js @@ -0,0 +1,81 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Colours = void 0; +/** + * Handles figuring out if we can use ANSI colours and handing out the escape codes. + * + * This is for package-internal use only, and may change at any time. + * + * @private + * @internal + */ +class Colours { + /** + * @param stream The stream (e.g. process.stderr) + * @returns true if the stream should have colourization enabled + */ + static isEnabled(stream) { + return (stream && // May happen in browsers. + stream.isTTY && + (typeof stream.getColorDepth === 'function' + ? stream.getColorDepth() > 2 + : true)); + } + static refresh() { + Colours.enabled = Colours.isEnabled(process === null || process === void 0 ? void 0 : process.stderr); + if (!this.enabled) { + Colours.reset = ''; + Colours.bright = ''; + Colours.dim = ''; + Colours.red = ''; + Colours.green = ''; + Colours.yellow = ''; + Colours.blue = ''; + Colours.magenta = ''; + Colours.cyan = ''; + Colours.white = ''; + Colours.grey = ''; + } + else { + Colours.reset = '\u001b[0m'; + Colours.bright = '\u001b[1m'; + Colours.dim = '\u001b[2m'; + Colours.red = '\u001b[31m'; + Colours.green = '\u001b[32m'; + Colours.yellow = '\u001b[33m'; + Colours.blue = '\u001b[34m'; + Colours.magenta = '\u001b[35m'; + Colours.cyan = '\u001b[36m'; + Colours.white = '\u001b[37m'; + Colours.grey = '\u001b[90m'; + } + } +} +exports.Colours = Colours; +Colours.enabled = false; +Colours.reset = ''; +Colours.bright = ''; +Colours.dim = ''; +Colours.red = ''; +Colours.green = ''; +Colours.yellow = ''; +Colours.blue = ''; +Colours.magenta = ''; +Colours.cyan = ''; +Colours.white = ''; +Colours.grey = ''; +Colours.refresh(); +//# sourceMappingURL=colours.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c58cacc02b33f20e33fcba8ad02045703622ee49 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/colours.js.map @@ -0,0 +1 @@ +{"version":3,"file":"colours.js","sourceRoot":"","sources":["../../src/colours.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAUjC;;;;;;;GAOG;AACH,MAAa,OAAO;IAelB;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,MAAuB;QACtC,OAAO,CACL,MAAM,IAAI,0BAA0B;YACpC,MAAM,CAAC,KAAK;YACZ,CAAC,OAAO,MAAM,CAAC,aAAa,KAAK,UAAU;gBACzC,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC;gBAC5B,CAAC,CAAC,IAAI,CAAC,CAC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AC;AAChB,aAAK,GAAG,EAAE,CAAC;AACX,cAAM,GAAG,EAAE,CAAC;AACZ,WAAG,GAAG,EAAE,CAAC;AAET,WAAG,GAAG,EAAE,CAAC;AACT,aAAK,GAAG,EAAE,CAAC;AACX,cAAM,GAAG,EAAE,CAAC;AACZ,YAAI,GAAG,EAAE,CAAC;AACV,eAAO,GAAG,EAAE,CAAC;AACb,YAAI,GAAG,EAAE,CAAC;AACV,aAAK,GAAG,EAAE,CAAC;AACX,YAAI,GAAG,EAAE,CAAC;AA8CnB,OAAO,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a163f85f950acb1226df3d387e3904210cd98d8c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.d.ts @@ -0,0 +1 @@ +export * from './logging-utils'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..a2d5d17a875fa7eeb66b01062414409251c5898c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js @@ -0,0 +1,31 @@ +"use strict"; +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./logging-utils"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..edf4a2f1f1dc905dfd0f5593949b5e543d7d7e0f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;AAEjC,kDAAgC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3fdfddb1dafbe8e703973fbe6d41243dff6b2edb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.d.ts @@ -0,0 +1,222 @@ +import { EventEmitter } from 'events'; +/** + * This module defines an ad-hoc debug logger for Google Cloud Platform + * client libraries in Node. An ad-hoc debug logger is a tool which lets + * users use an external, unified interface (in this case, environment + * variables) to determine what logging they want to see at runtime. This + * isn't necessarily fed into the console, but is meant to be under the + * control of the user. The kind of logging that will be produced by this + * is more like "call retry happened", not "events you'd want to record + * in Cloud Logger". + * + * More for Googlers implementing libraries with it: + * go/cloud-client-logging-design + */ +/** + * Possible log levels. These are a subset of Cloud Observability levels. + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity + */ +export declare enum LogSeverity { + DEFAULT = "DEFAULT", + DEBUG = "DEBUG", + INFO = "INFO", + WARNING = "WARNING", + ERROR = "ERROR" +} +/** + * A set of suggested log metadata fields. + */ +export interface LogFields { + /** + * Log level - undefined/null === DEFAULT. + */ + severity?: LogSeverity; + /** + * If this log is associated with an OpenTelemetry trace, you can put the + * trace ID here to pass on that association. + */ + telemetryTraceId?: string; + /** + * If this log is associated with an OpenTelemetry trace, you can put the + * span ID here to pass on that association. + */ + telemetrySpanId?: string; + /** + * This is a catch-all for any other items you might want to go into + * structured logs. Library implementers, please see the spec docs above + * for the items envisioned to go here. + */ + other?: unknown; +} +/** + * Adds typings for event sinks. + */ +export declare interface AdhocDebugLogger { + on(event: 'log', listener: (fields: LogFields, args: unknown[]) => void): this; + on(event: string, listener: Function): this; +} +/** + * Our logger instance. This actually contains the meat of dealing + * with log lines, including EventEmitter. This contains the function + * that will be passed back to users of the package. + */ +export declare class AdhocDebugLogger extends EventEmitter { + namespace: string; + upstream: AdhocDebugLogCallable; + func: AdhocDebugLogFunction; + /** + * @param upstream The backend will pass a function that will be + * called whenever our logger function is invoked. + */ + constructor(namespace: string, upstream: AdhocDebugLogCallable); + invoke(fields: LogFields, ...args: unknown[]): void; + invokeSeverity(severity: LogSeverity, ...args: unknown[]): void; +} +/** + * This can be used in place of a real logger while waiting for Promises or disabling logging. + */ +export declare const placeholder: AdhocDebugLogFunction; +/** + * When the user receives a log function (below), this will be the basic function + * call interface for it. + */ +export interface AdhocDebugLogCallable { + (fields: LogFields, ...args: unknown[]): void; +} +/** + * Adds typing info for the EventEmitter we're adding to the returned function. + * + * Note that this interface may change at any time, as we're reserving the + * right to add new backends at the logger level. + * + * @private + * @internal + */ +export interface AdhocDebugLogFunction extends AdhocDebugLogCallable { + instance: AdhocDebugLogger; + on(event: 'log', listener: (fields: LogFields, args: unknown[]) => void): this; + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + sublog(namespace: string): AdhocDebugLogFunction; +} +/** + * One of these can be passed to support a third-party backend, like "debug". + * We're splitting this out because ESM can complicate optional module loading. + * + * Note that this interface may change at any time, as we're reserving the + * right to add new backends at the logger level. + * + * @private + * @internal + */ +export interface DebugLogBackend { + /** + * Outputs a log to this backend. + * + * @param namespace The "system" that will be used for filtering. This may also + * include a "subsystem" in the form "system:subsystem". + * @param fields Logging fields to be included as metadata. + * @param args Any parameters to passed to a utils.format() type formatter. + */ + log(namespace: string, fields: LogFields, ...args: unknown[]): void; + /** + * Passes in the system/subsystem filters from the global environment variables. + * This lets the backend merge with any native ones. + * + * @param filters A list of wildcards matching systems or system:subsystem pairs. + */ + setFilters(filters: string[]): void; +} +/** + * The base class for debug logging backends. It's possible to use this, but the + * same non-guarantees above still apply (unstable interface, etc). + * + * @private + * @internal + */ +export declare abstract class DebugLogBackendBase implements DebugLogBackend { + cached: Map; + filters: string[]; + filtersSet: boolean; + constructor(); + /** + * Creates a callback function that we can call to send log lines out. + * + * @param namespace The system/subsystem namespace. + */ + abstract makeLogger(namespace: string): AdhocDebugLogCallable; + /** + * Provides a callback for the subclass to hook if it needs to do something + * specific with `this.filters`. + */ + abstract setFilters(): void; + log(namespace: string, fields: LogFields, ...args: unknown[]): void; +} +/** + * @returns A backend based on Node util.debuglog; this is the default. + */ +export declare function getNodeBackend(): DebugLogBackend; +type DebugPackage = any; +/** + * Creates a "debug" package backend. The user must call require('debug') and pass + * the resulting object to this function. + * + * ``` + * setBackend(getDebugBackend(require('debug'))) + * ``` + * + * https://www.npmjs.com/package/debug + * + * Note: Google does not explicitly endorse or recommend this package; it's just + * being provided as an option. + * + * @returns A backend based on the npm "debug" package. + */ +export declare function getDebugBackend(debugPkg: DebugPackage): DebugLogBackend; +/** + * Creates a "structured logging" backend. This pretty much works like the + * Node logger, but it outputs structured logging JSON matching Google + * Cloud's ingestion specs instead of plain text. + * + * ``` + * setBackend(getStructuredBackend()) + * ``` + * + * @param upstream If you want to use something besides the Node backend to + * write the actual log lines into, pass that here. + * @returns A backend based on Google Cloud structured logging. + */ +export declare function getStructuredBackend(upstream?: DebugLogBackend): DebugLogBackend; +/** + * The environment variables that we standardized on, for all ad-hoc logging. + */ +export declare const env: { + /** + * Filter wildcards specific to the Node syntax, and similar to the built-in + * utils.debuglog() environment variable. If missing, disables logging. + */ + nodeEnables: string; +}; +/** + * Set the backend to use for our log output. + * - A backend object + * - null to disable logging + * - undefined for "nothing yet", defaults to the Node backend + * + * @param backend Results from one of the get*Backend() functions. + */ +export declare function setBackend(backend: DebugLogBackend | null | undefined): void; +/** + * Creates a logging function. Multiple calls to this with the same namespace + * will produce the same logger, with the same event emitter hooks. + * + * Namespaces can be a simple string ("system" name), or a qualified string + * (system:subsystem), which can be used for filtering, or for "system:*". + * + * @param namespace The namespace, a descriptive text string. + * @returns A function you can call that works similar to console.log(). + */ +export declare function log(namespace: string, parent?: AdhocDebugLogFunction): AdhocDebugLogFunction; +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js new file mode 100644 index 0000000000000000000000000000000000000000..488dbad8a441ada72f5fdb4cce0903d9f8708fb9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js @@ -0,0 +1,437 @@ +"use strict"; +// Copyright 2021-2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.env = exports.DebugLogBackendBase = exports.placeholder = exports.AdhocDebugLogger = exports.LogSeverity = void 0; +exports.getNodeBackend = getNodeBackend; +exports.getDebugBackend = getDebugBackend; +exports.getStructuredBackend = getStructuredBackend; +exports.setBackend = setBackend; +exports.log = log; +const events_1 = require("events"); +const process = __importStar(require("process")); +const util = __importStar(require("util")); +const colours_1 = require("./colours"); +// Some functions (as noted) are based on the Node standard library, from +// the following file: +// +// https://github.com/nodejs/node/blob/main/lib/internal/util/debuglog.js +/** + * This module defines an ad-hoc debug logger for Google Cloud Platform + * client libraries in Node. An ad-hoc debug logger is a tool which lets + * users use an external, unified interface (in this case, environment + * variables) to determine what logging they want to see at runtime. This + * isn't necessarily fed into the console, but is meant to be under the + * control of the user. The kind of logging that will be produced by this + * is more like "call retry happened", not "events you'd want to record + * in Cloud Logger". + * + * More for Googlers implementing libraries with it: + * go/cloud-client-logging-design + */ +/** + * Possible log levels. These are a subset of Cloud Observability levels. + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity + */ +var LogSeverity; +(function (LogSeverity) { + LogSeverity["DEFAULT"] = "DEFAULT"; + LogSeverity["DEBUG"] = "DEBUG"; + LogSeverity["INFO"] = "INFO"; + LogSeverity["WARNING"] = "WARNING"; + LogSeverity["ERROR"] = "ERROR"; +})(LogSeverity || (exports.LogSeverity = LogSeverity = {})); +/** + * Our logger instance. This actually contains the meat of dealing + * with log lines, including EventEmitter. This contains the function + * that will be passed back to users of the package. + */ +class AdhocDebugLogger extends events_1.EventEmitter { + /** + * @param upstream The backend will pass a function that will be + * called whenever our logger function is invoked. + */ + constructor(namespace, upstream) { + super(); + this.namespace = namespace; + this.upstream = upstream; + this.func = Object.assign(this.invoke.bind(this), { + // Also add an instance pointer back to us. + instance: this, + // And pull over the EventEmitter functionality. + on: (event, listener) => this.on(event, listener), + }); + // Convenience methods for log levels. + this.func.debug = (...args) => this.invokeSeverity(LogSeverity.DEBUG, ...args); + this.func.info = (...args) => this.invokeSeverity(LogSeverity.INFO, ...args); + this.func.warn = (...args) => this.invokeSeverity(LogSeverity.WARNING, ...args); + this.func.error = (...args) => this.invokeSeverity(LogSeverity.ERROR, ...args); + this.func.sublog = (namespace) => log(namespace, this.func); + } + invoke(fields, ...args) { + // Push out any upstream logger first. + if (this.upstream) { + try { + this.upstream(fields, ...args); + } + catch (e) { + // Swallow exceptions to avoid interfering with other logging. + } + } + // Emit sink events. + try { + this.emit('log', fields, args); + } + catch (e) { + // Swallow exceptions to avoid interfering with other logging. + } + } + invokeSeverity(severity, ...args) { + this.invoke({ severity }, ...args); + } +} +exports.AdhocDebugLogger = AdhocDebugLogger; +/** + * This can be used in place of a real logger while waiting for Promises or disabling logging. + */ +exports.placeholder = new AdhocDebugLogger('', () => { }).func; +/** + * The base class for debug logging backends. It's possible to use this, but the + * same non-guarantees above still apply (unstable interface, etc). + * + * @private + * @internal + */ +class DebugLogBackendBase { + constructor() { + var _a; + this.cached = new Map(); + this.filters = []; + this.filtersSet = false; + // Look for the Node config variable for what systems to enable. We'll store + // these for the log method below, which will call setFilters() once. + let nodeFlag = (_a = process.env[exports.env.nodeEnables]) !== null && _a !== void 0 ? _a : '*'; + if (nodeFlag === 'all') { + nodeFlag = '*'; + } + this.filters = nodeFlag.split(','); + } + log(namespace, fields, ...args) { + try { + if (!this.filtersSet) { + this.setFilters(); + this.filtersSet = true; + } + let logger = this.cached.get(namespace); + if (!logger) { + logger = this.makeLogger(namespace); + this.cached.set(namespace, logger); + } + logger(fields, ...args); + } + catch (e) { + // Silently ignore all errors; we don't want them to interfere with + // the user's running app. + // e; + console.error(e); + } + } +} +exports.DebugLogBackendBase = DebugLogBackendBase; +// The basic backend. This one definitely works, but it's less feature-filled. +// +// Rather than using util.debuglog, this implements the same basic logic directly. +// The reason for this decision is that debuglog checks the value of the +// NODE_DEBUG environment variable before any user code runs; we therefore +// can't pipe our own enables into it (and util.debuglog will never print unless +// the user duplicates it into NODE_DEBUG, which isn't reasonable). +// +class NodeBackend extends DebugLogBackendBase { + constructor() { + super(...arguments); + // Default to allowing all systems, since we gate earlier based on whether the + // variable is empty. + this.enabledRegexp = /.*/g; + } + isEnabled(namespace) { + return this.enabledRegexp.test(namespace); + } + makeLogger(namespace) { + if (!this.enabledRegexp.test(namespace)) { + return () => { }; + } + return (fields, ...args) => { + var _a; + // TODO: `fields` needs to be turned into a string here, one way or another. + const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`; + const pid = `${colours_1.Colours.yellow}${process.pid}${colours_1.Colours.reset}`; + let level; + switch (fields.severity) { + case LogSeverity.ERROR: + level = `${colours_1.Colours.red}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.INFO: + level = `${colours_1.Colours.magenta}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.WARNING: + level = `${colours_1.Colours.yellow}${fields.severity}${colours_1.Colours.reset}`; + break; + default: + level = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.DEFAULT; + break; + } + const msg = util.formatWithOptions({ colors: colours_1.Colours.enabled }, ...args); + const filteredFields = Object.assign({}, fields); + delete filteredFields.severity; + const fieldsJson = Object.getOwnPropertyNames(filteredFields).length + ? JSON.stringify(filteredFields) + : ''; + const fieldsColour = fieldsJson + ? `${colours_1.Colours.grey}${fieldsJson}${colours_1.Colours.reset}` + : ''; + console.error('%s [%s|%s] %s%s', pid, nscolour, level, msg, fieldsJson ? ` ${fieldsColour}` : ''); + }; + } + // Regexp patterns below are from here: + // https://github.com/nodejs/node/blob/c0aebed4b3395bd65d54b18d1fd00f071002ac20/lib/internal/util/debuglog.js#L36 + setFilters() { + const totalFilters = this.filters.join(','); + const regexp = totalFilters + .replace(/[|\\{}()[\]^$+?.]/g, '\\$&') + .replace(/\*/g, '.*') + .replace(/,/g, '$|^'); + this.enabledRegexp = new RegExp(`^${regexp}$`, 'i'); + } +} +/** + * @returns A backend based on Node util.debuglog; this is the default. + */ +function getNodeBackend() { + return new NodeBackend(); +} +class DebugBackend extends DebugLogBackendBase { + constructor(pkg) { + super(); + this.debugPkg = pkg; + } + makeLogger(namespace) { + const debugLogger = this.debugPkg(namespace); + return (fields, ...args) => { + // TODO: `fields` needs to be turned into a string here. + debugLogger(args[0], ...args.slice(1)); + }; + } + setFilters() { + var _a; + const existingFilters = (_a = process.env['NODE_DEBUG']) !== null && _a !== void 0 ? _a : ''; + process.env['NODE_DEBUG'] = `${existingFilters}${existingFilters ? ',' : ''}${this.filters.join(',')}`; + } +} +/** + * Creates a "debug" package backend. The user must call require('debug') and pass + * the resulting object to this function. + * + * ``` + * setBackend(getDebugBackend(require('debug'))) + * ``` + * + * https://www.npmjs.com/package/debug + * + * Note: Google does not explicitly endorse or recommend this package; it's just + * being provided as an option. + * + * @returns A backend based on the npm "debug" package. + */ +function getDebugBackend(debugPkg) { + return new DebugBackend(debugPkg); +} +/** + * This pretty much works like the Node logger, but it outputs structured + * logging JSON matching Google Cloud's ingestion specs. Rather than handling + * its own output, it wraps another backend. The passed backend must be a subclass + * of `DebugLogBackendBase` (any of the backends exposed by this package will work). + */ +class StructuredBackend extends DebugLogBackendBase { + constructor(upstream) { + var _a; + super(); + this.upstream = (_a = upstream) !== null && _a !== void 0 ? _a : undefined; + } + makeLogger(namespace) { + var _a; + const debugLogger = (_a = this.upstream) === null || _a === void 0 ? void 0 : _a.makeLogger(namespace); + return (fields, ...args) => { + var _a; + const severity = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.INFO; + const json = Object.assign({ + severity, + message: util.format(...args), + }, fields); + const jsonString = JSON.stringify(json); + if (debugLogger) { + debugLogger(fields, jsonString); + } + else { + console.log('%s', jsonString); + } + }; + } + setFilters() { + var _a; + (_a = this.upstream) === null || _a === void 0 ? void 0 : _a.setFilters(); + } +} +/** + * Creates a "structured logging" backend. This pretty much works like the + * Node logger, but it outputs structured logging JSON matching Google + * Cloud's ingestion specs instead of plain text. + * + * ``` + * setBackend(getStructuredBackend()) + * ``` + * + * @param upstream If you want to use something besides the Node backend to + * write the actual log lines into, pass that here. + * @returns A backend based on Google Cloud structured logging. + */ +function getStructuredBackend(upstream) { + return new StructuredBackend(upstream); +} +/** + * The environment variables that we standardized on, for all ad-hoc logging. + */ +exports.env = { + /** + * Filter wildcards specific to the Node syntax, and similar to the built-in + * utils.debuglog() environment variable. If missing, disables logging. + */ + nodeEnables: 'GOOGLE_SDK_NODE_LOGGING', +}; +// Keep a copy of all namespaced loggers so users can reliably .on() them. +// Note that these cached functions will need to deal with changes in the backend. +const loggerCache = new Map(); +// Our current global backend. This might be: +let cachedBackend = undefined; +/** + * Set the backend to use for our log output. + * - A backend object + * - null to disable logging + * - undefined for "nothing yet", defaults to the Node backend + * + * @param backend Results from one of the get*Backend() functions. + */ +function setBackend(backend) { + cachedBackend = backend; + loggerCache.clear(); +} +/** + * Creates a logging function. Multiple calls to this with the same namespace + * will produce the same logger, with the same event emitter hooks. + * + * Namespaces can be a simple string ("system" name), or a qualified string + * (system:subsystem), which can be used for filtering, or for "system:*". + * + * @param namespace The namespace, a descriptive text string. + * @returns A function you can call that works similar to console.log(). + */ +function log(namespace, parent) { + // If the enable environment variable isn't set, do nothing. The user + // can still choose to set a backend of their choice using the manual + // `setBackend()`. + if (!cachedBackend) { + const enablesFlag = process.env[exports.env.nodeEnables]; + if (!enablesFlag) { + return exports.placeholder; + } + } + // This might happen mostly if the typings are dropped in a user's code, + // or if they're calling from JavaScript. + if (!namespace) { + return exports.placeholder; + } + // Handle sub-loggers. + if (parent) { + namespace = `${parent.instance.namespace}:${namespace}`; + } + // Reuse loggers so things like event sinks are persistent. + const existing = loggerCache.get(namespace); + if (existing) { + return existing.func; + } + // Do we have a backend yet? + if (cachedBackend === null) { + // Explicitly disabled. + return exports.placeholder; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + // The logger is further wrapped so we can handle the backend changing out. + const logger = (() => { + let previousBackend = undefined; + const newLogger = new AdhocDebugLogger(namespace, (fields, ...args) => { + if (previousBackend !== cachedBackend) { + // Did the user pass a custom backend? + if (cachedBackend === null) { + // Explicitly disabled. + return; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + previousBackend = cachedBackend; + } + cachedBackend === null || cachedBackend === void 0 ? void 0 : cachedBackend.log(namespace, fields, ...args); + }); + return newLogger; + })(); + loggerCache.set(namespace, logger); + return logger.func; +} +//# sourceMappingURL=logging-utils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2218f8fb8d44862f007d63ee86b77c24e8f903e8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/logging-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logging-utils.js","sourceRoot":"","sources":["../../src/logging-utils.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4VjC,wCAEC;AAgDD,0CAEC;AAuDD,oDAIC;AA4BD,gCAGC;AAYD,kBAmEC;AAvjBD,mCAAoC;AACpC,iDAAmC;AACnC,2CAA6B;AAC7B,uCAAkC;AAElC,yEAAyE;AACzE,sBAAsB;AACtB,EAAE;AACF,yEAAyE;AAEzE;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AA0CD;;;;GAIG;AACH,MAAa,gBAAiB,SAAQ,qBAAY;IAWhD;;;OAGG;IACH,YAAY,SAAiB,EAAE,QAA+B;QAC5D,KAAK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C5B,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;QAC3B,uBAAuB;QACvB,OAAO,mBAAW,CAAC;IACrB,CAAC;SAAM,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QACvC,gDAAgD;QAChD,aAAa,GAAG,cAAc,EAAE,CAAC;IACnC,CAAC;IAED,2EAA2E;IAC3E,MAAM,MAAM,GAAqB,CAAC,GAAG,EAAE;QACrC,IAAI,eAAe,GAAgC,SAAS,CAAC;QAC7D,MAAM,SAAS,GAAG,IAAI,gBAAgB,CACpC,SAAS,EACT,CAAC,MAAiB,EAAE,GAAG,IAAe,EAAE,EAAE;YACxC,IAAI,eAAe,KAAK,aAAa,EAAE,CAAC;gBACtC,sCAAsC;gBACtC,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;oBAC3B,uBAAuB;oBACvB,OAAO;gBACT,CAAC;qBAAM,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBACvC,gDAAgD;oBAChD,aAAa,GAAG,cAAc,EAAE,CAAC;gBACnC,CAAC;gBAED,eAAe,GAAG,aAAa,CAAC;YAClC,CAAC;YAED,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QACjD,CAAC,CACF,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,EAAE,CAAC;IAEL,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..82da9ab790e59035d03b9884c7e7a1c55599e02d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.d.ts @@ -0,0 +1,45 @@ +/** + * Simplified interface analogous to the tc39 Temporal.Duration + * parameter to from(). This doesn't support the full gamut (years, days). + */ +export interface DurationLike { + hours?: number; + minutes?: number; + seconds?: number; + millis?: number; +} +/** + * Simplified list of values to pass to Duration.totalOf(). This + * list is taken from the tc39 Temporal.Duration proposal, but + * larger and smaller units have been left off. + */ +export type TotalOfUnit = 'hour' | 'minute' | 'second' | 'millisecond'; +/** + * Duration class with an interface similar to the tc39 Temporal + * proposal. Since it's not fully finalized, and polyfills have + * inconsistent compatibility, for now this shim class will be + * used to set durations in Pub/Sub. + * + * This class will remain here for at least the next major version, + * eventually to be replaced by the tc39 Temporal built-in. + * + * https://tc39.es/proposal-temporal/docs/duration.html + */ +export declare class Duration { + private millis; + private static secondInMillis; + private static minuteInMillis; + private static hourInMillis; + private constructor(); + /** + * Calculates the total number of units of type 'totalOf' that would + * fit inside this duration. + */ + totalOf(totalOf: TotalOfUnit): number; + /** + * Creates a Duration from a DurationLike, which is an object + * containing zero or more of the following: hours, seconds, + * minutes, millis. + */ + static from(durationLike: DurationLike): Duration; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js new file mode 100644 index 0000000000000000000000000000000000000000..fa59c24a98d71e7416ae6eef792b03be2279d466 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js @@ -0,0 +1,68 @@ +"use strict"; +// Copyright 2022-2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Duration = void 0; +/** + * Duration class with an interface similar to the tc39 Temporal + * proposal. Since it's not fully finalized, and polyfills have + * inconsistent compatibility, for now this shim class will be + * used to set durations in Pub/Sub. + * + * This class will remain here for at least the next major version, + * eventually to be replaced by the tc39 Temporal built-in. + * + * https://tc39.es/proposal-temporal/docs/duration.html + */ +class Duration { + constructor(millis) { + this.millis = millis; + } + /** + * Calculates the total number of units of type 'totalOf' that would + * fit inside this duration. + */ + totalOf(totalOf) { + switch (totalOf) { + case 'hour': + return this.millis / Duration.hourInMillis; + case 'minute': + return this.millis / Duration.minuteInMillis; + case 'second': + return this.millis / Duration.secondInMillis; + case 'millisecond': + return this.millis; + default: + throw new Error(`Invalid unit in call to totalOf(): ${totalOf}`); + } + } + /** + * Creates a Duration from a DurationLike, which is an object + * containing zero or more of the following: hours, seconds, + * minutes, millis. + */ + static from(durationLike) { + var _a, _b, _c, _d; + let millis = (_a = durationLike.millis) !== null && _a !== void 0 ? _a : 0; + millis += ((_b = durationLike.seconds) !== null && _b !== void 0 ? _b : 0) * Duration.secondInMillis; + millis += ((_c = durationLike.minutes) !== null && _c !== void 0 ? _c : 0) * Duration.minuteInMillis; + millis += ((_d = durationLike.hours) !== null && _d !== void 0 ? _d : 0) * Duration.hourInMillis; + return new Duration(millis); + } +} +exports.Duration = Duration; +Duration.secondInMillis = 1000; +Duration.minuteInMillis = Duration.secondInMillis * 60; +Duration.hourInMillis = Duration.minuteInMillis * 60; +//# sourceMappingURL=temporal.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c38c4461edb24c1cf136af85554ea66d7492ee0c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/google-logging-utils/build/src/temporal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"temporal.js","sourceRoot":"","sources":["../../src/temporal.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AA6BjC;;;;;;;;;;GAUG;AACH,MAAa,QAAQ;IAOnB,YAAoB,MAAc;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,OAAoB;QAC1B,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC;YAC7C,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC;YAC/C,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC;YAC/C,KAAK,aAAa;gBAChB,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB;gBACE,MAAM,IAAI,KAAK,CAAC,sCAAsC,OAAO,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,YAA0B;;QACpC,IAAI,MAAM,GAAG,MAAA,YAAY,CAAC,MAAM,mCAAI,CAAC,CAAC;QACtC,MAAM,IAAI,CAAC,MAAA,YAAY,CAAC,OAAO,mCAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC;QAChE,MAAM,IAAI,CAAC,MAAA,YAAY,CAAC,OAAO,mCAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC;QAChE,MAAM,IAAI,CAAC,MAAA,YAAY,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC;QAE5D,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;;AA1CH,4BA2CC;AAxCgB,uBAAc,GAAG,IAAI,CAAC;AACtB,uBAAc,GAAG,QAAQ,CAAC,cAAc,GAAG,EAAE,CAAC;AAC9C,qBAAY,GAAG,QAAQ,CAAC,cAAc,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.cjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9c370cbd587a4c1f63d253481426c22d412a6d07 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.cjs @@ -0,0 +1,450 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GoogleToken = void 0; +var fs = _interopRequireWildcard(require("fs")); +var _gaxios = require("gaxios"); +var jws = _interopRequireWildcard(require("jws")); +var path = _interopRequireWildcard(require("path")); +var _util = require("util"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); } +function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } +function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } +function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } +function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } +function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } +function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } /** + * Copyright 2018 Google LLC + * + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + */ +var readFile = fs.readFile ? (0, _util.promisify)(fs.readFile) : /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() { + return _regenerator().w(function (_context) { + while (1) switch (_context.n) { + case 0: + throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); + case 1: + return _context.a(2); + } + }, _callee); +})); +var GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token'; +var GOOGLE_REVOKE_TOKEN_URL = 'https://oauth2.googleapis.com/revoke?token='; +var ErrorWithCode = /*#__PURE__*/function (_Error) { + function ErrorWithCode(message, code) { + var _this; + _classCallCheck(this, ErrorWithCode); + _this = _callSuper(this, ErrorWithCode, [message]); + _defineProperty(_this, "code", void 0); + _this.code = code; + return _this; + } + _inherits(ErrorWithCode, _Error); + return _createClass(ErrorWithCode); +}(/*#__PURE__*/_wrapNativeSuper(Error)); +var _inFlightRequest = /*#__PURE__*/new WeakMap(); +var _GoogleToken_brand = /*#__PURE__*/new WeakSet(); +var GoogleToken = exports.GoogleToken = /*#__PURE__*/function () { + /** + * Create a GoogleToken. + * + * @param options Configuration object. + */ + function GoogleToken(_options) { + _classCallCheck(this, GoogleToken); + _classPrivateMethodInitSpec(this, _GoogleToken_brand); + _defineProperty(this, "expiresAt", void 0); + _defineProperty(this, "key", void 0); + _defineProperty(this, "keyFile", void 0); + _defineProperty(this, "iss", void 0); + _defineProperty(this, "sub", void 0); + _defineProperty(this, "scope", void 0); + _defineProperty(this, "rawToken", void 0); + _defineProperty(this, "tokenExpires", void 0); + _defineProperty(this, "email", void 0); + _defineProperty(this, "additionalClaims", void 0); + _defineProperty(this, "eagerRefreshThresholdMillis", void 0); + _defineProperty(this, "transporter", { + request: function request(opts) { + return (0, _gaxios.request)(opts); + } + }); + _classPrivateFieldInitSpec(this, _inFlightRequest, void 0); + _assertClassBrand(_GoogleToken_brand, this, _configure).call(this, _options); + } + + /** + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. + */ + return _createClass(GoogleToken, [{ + key: "accessToken", + get: function get() { + return this.rawToken ? this.rawToken.access_token : undefined; + } + }, { + key: "idToken", + get: function get() { + return this.rawToken ? this.rawToken.id_token : undefined; + } + }, { + key: "tokenType", + get: function get() { + return this.rawToken ? this.rawToken.token_type : undefined; + } + }, { + key: "refreshToken", + get: function get() { + return this.rawToken ? this.rawToken.refresh_token : undefined; + } + }, { + key: "hasExpired", + value: function hasExpired() { + var now = new Date().getTime(); + if (this.rawToken && this.expiresAt) { + return now >= this.expiresAt; + } else { + return true; + } + } + + /** + * Returns whether the token will expire within eagerRefreshThresholdMillis + * + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. + */ + }, { + key: "isTokenExpiring", + value: function isTokenExpiring() { + var _this$eagerRefreshThr; + var now = new Date().getTime(); + var eagerRefreshThresholdMillis = (_this$eagerRefreshThr = this.eagerRefreshThresholdMillis) !== null && _this$eagerRefreshThr !== void 0 ? _this$eagerRefreshThr : 0; + if (this.rawToken && this.expiresAt) { + return this.expiresAt <= now + eagerRefreshThresholdMillis; + } else { + return true; + } + } + + /** + * Returns a cached token or retrieves a new one from Google. + * + * @param callback The callback function. + */ + }, { + key: "getToken", + value: function getToken(callback) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + if (_typeof(callback) === 'object') { + opts = callback; + callback = undefined; + } + opts = Object.assign({ + forceRefresh: false + }, opts); + if (callback) { + var cb = callback; + _assertClassBrand(_GoogleToken_brand, this, _getTokenAsync).call(this, opts).then(function (t) { + return cb(null, t); + }, callback); + return; + } + return _assertClassBrand(_GoogleToken_brand, this, _getTokenAsync).call(this, opts); + } + + /** + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties + */ + }, { + key: "getCredentials", + value: (function () { + var _getCredentials = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(keyFile) { + var ext, key, body, privateKey, clientEmail, _privateKey, _t; + return _regenerator().w(function (_context2) { + while (1) switch (_context2.n) { + case 0: + ext = path.extname(keyFile); + _t = ext; + _context2.n = _t === '.json' ? 1 : _t === '.der' ? 4 : _t === '.crt' ? 4 : _t === '.pem' ? 4 : _t === '.p12' ? 6 : _t === '.pfx' ? 6 : 7; + break; + case 1: + _context2.n = 2; + return readFile(keyFile, 'utf8'); + case 2: + key = _context2.v; + body = JSON.parse(key); + privateKey = body.private_key; + clientEmail = body.client_email; + if (!(!privateKey || !clientEmail)) { + _context2.n = 3; + break; + } + throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); + case 3: + return _context2.a(2, { + privateKey: privateKey, + clientEmail: clientEmail + }); + case 4: + _context2.n = 5; + return readFile(keyFile, 'utf8'); + case 5: + _privateKey = _context2.v; + return _context2.a(2, { + privateKey: _privateKey + }); + case 6: + throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); + case 7: + throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); + case 8: + return _context2.a(2); + } + }, _callee2); + })); + function getCredentials(_x) { + return _getCredentials.apply(this, arguments); + } + return getCredentials; + }()) + }, { + key: "revokeToken", + value: function revokeToken(callback) { + if (callback) { + _assertClassBrand(_GoogleToken_brand, this, _revokeTokenAsync).call(this).then(function () { + return callback(); + }, callback); + return; + } + return _assertClassBrand(_GoogleToken_brand, this, _revokeTokenAsync).call(this); + } + }]); +}(); +function _getTokenAsync(_x2) { + return _getTokenAsync2.apply(this, arguments); +} +function _getTokenAsync2() { + _getTokenAsync2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(opts) { + return _regenerator().w(function (_context3) { + while (1) switch (_context3.n) { + case 0: + if (!(_classPrivateFieldGet(_inFlightRequest, this) && !opts.forceRefresh)) { + _context3.n = 1; + break; + } + return _context3.a(2, _classPrivateFieldGet(_inFlightRequest, this)); + case 1: + _context3.p = 1; + _context3.n = 2; + return _classPrivateFieldSet(_inFlightRequest, this, _assertClassBrand(_GoogleToken_brand, this, _getTokenAsyncInner).call(this, opts)); + case 2: + return _context3.a(2, _context3.v); + case 3: + _context3.p = 3; + _classPrivateFieldSet(_inFlightRequest, this, undefined); + return _context3.f(3); + case 4: + return _context3.a(2); + } + }, _callee3, this, [[1,, 3, 4]]); + })); + return _getTokenAsync2.apply(this, arguments); +} +function _getTokenAsyncInner(_x3) { + return _getTokenAsyncInner2.apply(this, arguments); +} +function _getTokenAsyncInner2() { + _getTokenAsyncInner2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(opts) { + var creds; + return _regenerator().w(function (_context4) { + while (1) switch (_context4.n) { + case 0: + if (!(this.isTokenExpiring() === false && opts.forceRefresh === false)) { + _context4.n = 1; + break; + } + return _context4.a(2, Promise.resolve(this.rawToken)); + case 1: + if (!(!this.key && !this.keyFile)) { + _context4.n = 2; + break; + } + throw new Error('No key or keyFile set.'); + case 2: + if (!(!this.key && this.keyFile)) { + _context4.n = 4; + break; + } + _context4.n = 3; + return this.getCredentials(this.keyFile); + case 3: + creds = _context4.v; + this.key = creds.privateKey; + this.iss = creds.clientEmail || this.iss; + if (!creds.clientEmail) { + _assertClassBrand(_GoogleToken_brand, this, _ensureEmail).call(this); + } + case 4: + return _context4.a(2, _assertClassBrand(_GoogleToken_brand, this, _requestToken).call(this)); + } + }, _callee4, this); + })); + return _getTokenAsyncInner2.apply(this, arguments); +} +function _ensureEmail() { + if (!this.iss) { + throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); + } +} +function _revokeTokenAsync() { + return _revokeTokenAsync2.apply(this, arguments); +} +function _revokeTokenAsync2() { + _revokeTokenAsync2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() { + var url; + return _regenerator().w(function (_context5) { + while (1) switch (_context5.n) { + case 0: + if (this.accessToken) { + _context5.n = 1; + break; + } + throw new Error('No token to revoke.'); + case 1: + url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; + _context5.n = 2; + return this.transporter.request({ + url: url, + retry: true + }); + case 2: + _assertClassBrand(_GoogleToken_brand, this, _configure).call(this, { + email: this.iss, + sub: this.sub, + key: this.key, + keyFile: this.keyFile, + scope: this.scope, + additionalClaims: this.additionalClaims + }); + case 3: + return _context5.a(2); + } + }, _callee5, this); + })); + return _revokeTokenAsync2.apply(this, arguments); +} +/** + * Configure the GoogleToken for re-use. + * @param {object} options Configuration object. + */ +function _configure() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + this.keyFile = options.keyFile; + this.key = options.key; + this.rawToken = undefined; + this.iss = options.email || options.iss; + this.sub = options.sub; + this.additionalClaims = options.additionalClaims; + if (_typeof(options.scope) === 'object') { + this.scope = options.scope.join(' '); + } else { + this.scope = options.scope; + } + this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; + if (options.transporter) { + this.transporter = options.transporter; + } +} +/** + * Request the token from Google. + */ +function _requestToken() { + return _requestToken2.apply(this, arguments); +} +function _requestToken2() { + _requestToken2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() { + var iat, additionalClaims, payload, signedJWT, r, _response, _response2, body, desc, _t2; + return _regenerator().w(function (_context6) { + while (1) switch (_context6.n) { + case 0: + iat = Math.floor(new Date().getTime() / 1000); + additionalClaims = this.additionalClaims || {}; + payload = Object.assign({ + iss: this.iss, + scope: this.scope, + aud: GOOGLE_TOKEN_URL, + exp: iat + 3600, + iat: iat, + sub: this.sub + }, additionalClaims); + signedJWT = jws.sign({ + header: { + alg: 'RS256' + }, + payload: payload, + secret: this.key + }); + _context6.p = 1; + _context6.n = 2; + return this.transporter.request({ + method: 'POST', + url: GOOGLE_TOKEN_URL, + data: new URLSearchParams({ + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', + assertion: signedJWT + }), + responseType: 'json', + retryConfig: { + httpMethodsToRetry: ['POST'] + } + }); + case 2: + r = _context6.v; + this.rawToken = r.data; + this.expiresAt = r.data.expires_in === null || r.data.expires_in === undefined ? undefined : (iat + r.data.expires_in) * 1000; + return _context6.a(2, this.rawToken); + case 3: + _context6.p = 3; + _t2 = _context6.v; + this.rawToken = undefined; + this.tokenExpires = undefined; + body = _t2.response && (_response = _t2.response) !== null && _response !== void 0 && _response.data ? (_response2 = _t2.response) === null || _response2 === void 0 ? void 0 : _response2.data : {}; + if (body.error) { + desc = body.error_description ? ": ".concat(body.error_description) : ''; + _t2.message = "".concat(body.error).concat(desc); + } + throw _t2; + case 4: + return _context6.a(2); + } + }, _callee6, this, [[1, 3]]); + })); + return _requestToken2.apply(this, arguments); +} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ffe342984b38b45059d129c753bbaf4d98f8532 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/cjs/src/index.d.ts @@ -0,0 +1,93 @@ +/** + * Copyright 2018 Google LLC + * + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + */ +import { GaxiosOptions, GaxiosPromise } from 'gaxios'; +export interface Transporter { + request(opts: GaxiosOptions): GaxiosPromise; +} +export type GetTokenCallback = (err: Error | null, token?: TokenData) => void; +export interface Credentials { + privateKey: string; + clientEmail?: string; +} +export interface TokenData { + refresh_token?: string; + expires_in?: number; + access_token?: string; + token_type?: string; + id_token?: string; +} +export interface TokenOptions { + keyFile?: string; + key?: string; + email?: string; + iss?: string; + sub?: string; + scope?: string | string[]; + additionalClaims?: {}; + eagerRefreshThresholdMillis?: number; + transporter?: Transporter; +} +export interface GetTokenOptions { + forceRefresh?: boolean; +} +export declare class GoogleToken { + #private; + get accessToken(): string | undefined; + get idToken(): string | undefined; + get tokenType(): string | undefined; + get refreshToken(): string | undefined; + expiresAt?: number; + key?: string; + keyFile?: string; + iss?: string; + sub?: string; + scope?: string; + rawToken?: TokenData; + tokenExpires?: number; + email?: string; + additionalClaims?: {}; + eagerRefreshThresholdMillis?: number; + transporter: Transporter; + /** + * Create a GoogleToken. + * + * @param options Configuration object. + */ + constructor(options?: TokenOptions); + /** + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. + */ + hasExpired(): boolean; + /** + * Returns whether the token will expire within eagerRefreshThresholdMillis + * + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. + */ + isTokenExpiring(): boolean; + /** + * Returns a cached token or retrieves a new one from Google. + * + * @param callback The callback function. + */ + getToken(opts?: GetTokenOptions): Promise; + getToken(callback: GetTokenCallback, opts?: GetTokenOptions): void; + /** + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties + */ + getCredentials(keyFile: string): Promise; + /** + * Revoke the token if one is set. + * + * @param callback The callback function. + */ + revokeToken(): Promise; + revokeToken(callback: (err?: Error) => void): void; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ffe342984b38b45059d129c753bbaf4d98f8532 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.d.ts @@ -0,0 +1,93 @@ +/** + * Copyright 2018 Google LLC + * + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + */ +import { GaxiosOptions, GaxiosPromise } from 'gaxios'; +export interface Transporter { + request(opts: GaxiosOptions): GaxiosPromise; +} +export type GetTokenCallback = (err: Error | null, token?: TokenData) => void; +export interface Credentials { + privateKey: string; + clientEmail?: string; +} +export interface TokenData { + refresh_token?: string; + expires_in?: number; + access_token?: string; + token_type?: string; + id_token?: string; +} +export interface TokenOptions { + keyFile?: string; + key?: string; + email?: string; + iss?: string; + sub?: string; + scope?: string | string[]; + additionalClaims?: {}; + eagerRefreshThresholdMillis?: number; + transporter?: Transporter; +} +export interface GetTokenOptions { + forceRefresh?: boolean; +} +export declare class GoogleToken { + #private; + get accessToken(): string | undefined; + get idToken(): string | undefined; + get tokenType(): string | undefined; + get refreshToken(): string | undefined; + expiresAt?: number; + key?: string; + keyFile?: string; + iss?: string; + sub?: string; + scope?: string; + rawToken?: TokenData; + tokenExpires?: number; + email?: string; + additionalClaims?: {}; + eagerRefreshThresholdMillis?: number; + transporter: Transporter; + /** + * Create a GoogleToken. + * + * @param options Configuration object. + */ + constructor(options?: TokenOptions); + /** + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. + */ + hasExpired(): boolean; + /** + * Returns whether the token will expire within eagerRefreshThresholdMillis + * + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. + */ + isTokenExpiring(): boolean; + /** + * Returns a cached token or retrieves a new one from Google. + * + * @param callback The callback function. + */ + getToken(opts?: GetTokenOptions): Promise; + getToken(callback: GetTokenCallback, opts?: GetTokenOptions): void; + /** + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties + */ + getCredentials(keyFile: string): Promise; + /** + * Revoke the token if one is set. + * + * @param callback The callback function. + */ + revokeToken(): Promise; + revokeToken(callback: (err?: Error) => void): void; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..55303dc8defa9aa800d295a533351bea376721b3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/gtoken/build/esm/src/index.js @@ -0,0 +1,275 @@ +/** + * Copyright 2018 Google LLC + * + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + */ +import * as fs from 'fs'; +import { request } from 'gaxios'; +import * as jws from 'jws'; +import * as path from 'path'; +import { promisify } from 'util'; +const readFile = fs.readFile + ? promisify(fs.readFile) + : async () => { + // if running in the web-browser, fs.readFile may not have been shimmed. + throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); + }; +const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token'; +const GOOGLE_REVOKE_TOKEN_URL = 'https://oauth2.googleapis.com/revoke?token='; +class ErrorWithCode extends Error { + code; + constructor(message, code) { + super(message); + this.code = code; + } +} +export class GoogleToken { + get accessToken() { + return this.rawToken ? this.rawToken.access_token : undefined; + } + get idToken() { + return this.rawToken ? this.rawToken.id_token : undefined; + } + get tokenType() { + return this.rawToken ? this.rawToken.token_type : undefined; + } + get refreshToken() { + return this.rawToken ? this.rawToken.refresh_token : undefined; + } + expiresAt; + key; + keyFile; + iss; + sub; + scope; + rawToken; + tokenExpires; + email; + additionalClaims; + eagerRefreshThresholdMillis; + transporter = { + request: opts => request(opts), + }; + #inFlightRequest; + /** + * Create a GoogleToken. + * + * @param options Configuration object. + */ + constructor(options) { + this.#configure(options); + } + /** + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. + */ + hasExpired() { + const now = new Date().getTime(); + if (this.rawToken && this.expiresAt) { + return now >= this.expiresAt; + } + else { + return true; + } + } + /** + * Returns whether the token will expire within eagerRefreshThresholdMillis + * + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. + */ + isTokenExpiring() { + const now = new Date().getTime(); + const eagerRefreshThresholdMillis = this.eagerRefreshThresholdMillis ?? 0; + if (this.rawToken && this.expiresAt) { + return this.expiresAt <= now + eagerRefreshThresholdMillis; + } + else { + return true; + } + } + getToken(callback, opts = {}) { + if (typeof callback === 'object') { + opts = callback; + callback = undefined; + } + opts = Object.assign({ + forceRefresh: false, + }, opts); + if (callback) { + const cb = callback; + this.#getTokenAsync(opts).then(t => cb(null, t), callback); + return; + } + return this.#getTokenAsync(opts); + } + /** + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties + */ + async getCredentials(keyFile) { + const ext = path.extname(keyFile); + switch (ext) { + case '.json': { + const key = await readFile(keyFile, 'utf8'); + const body = JSON.parse(key); + const privateKey = body.private_key; + const clientEmail = body.client_email; + if (!privateKey || !clientEmail) { + throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); + } + return { privateKey, clientEmail }; + } + case '.der': + case '.crt': + case '.pem': { + const privateKey = await readFile(keyFile, 'utf8'); + return { privateKey }; + } + case '.p12': + case '.pfx': { + throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + + 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + default: + throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + + 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + } + async #getTokenAsync(opts) { + if (this.#inFlightRequest && !opts.forceRefresh) { + return this.#inFlightRequest; + } + try { + return await (this.#inFlightRequest = this.#getTokenAsyncInner(opts)); + } + finally { + this.#inFlightRequest = undefined; + } + } + async #getTokenAsyncInner(opts) { + if (this.isTokenExpiring() === false && opts.forceRefresh === false) { + return Promise.resolve(this.rawToken); + } + if (!this.key && !this.keyFile) { + throw new Error('No key or keyFile set.'); + } + if (!this.key && this.keyFile) { + const creds = await this.getCredentials(this.keyFile); + this.key = creds.privateKey; + this.iss = creds.clientEmail || this.iss; + if (!creds.clientEmail) { + this.#ensureEmail(); + } + } + return this.#requestToken(); + } + #ensureEmail() { + if (!this.iss) { + throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); + } + } + revokeToken(callback) { + if (callback) { + this.#revokeTokenAsync().then(() => callback(), callback); + return; + } + return this.#revokeTokenAsync(); + } + async #revokeTokenAsync() { + if (!this.accessToken) { + throw new Error('No token to revoke.'); + } + const url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; + await this.transporter.request({ + url, + retry: true, + }); + this.#configure({ + email: this.iss, + sub: this.sub, + key: this.key, + keyFile: this.keyFile, + scope: this.scope, + additionalClaims: this.additionalClaims, + }); + } + /** + * Configure the GoogleToken for re-use. + * @param {object} options Configuration object. + */ + #configure(options = {}) { + this.keyFile = options.keyFile; + this.key = options.key; + this.rawToken = undefined; + this.iss = options.email || options.iss; + this.sub = options.sub; + this.additionalClaims = options.additionalClaims; + if (typeof options.scope === 'object') { + this.scope = options.scope.join(' '); + } + else { + this.scope = options.scope; + } + this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; + if (options.transporter) { + this.transporter = options.transporter; + } + } + /** + * Request the token from Google. + */ + async #requestToken() { + const iat = Math.floor(new Date().getTime() / 1000); + const additionalClaims = this.additionalClaims || {}; + const payload = Object.assign({ + iss: this.iss, + scope: this.scope, + aud: GOOGLE_TOKEN_URL, + exp: iat + 3600, + iat, + sub: this.sub, + }, additionalClaims); + const signedJWT = jws.sign({ + header: { alg: 'RS256' }, + payload, + secret: this.key, + }); + try { + const r = await this.transporter.request({ + method: 'POST', + url: GOOGLE_TOKEN_URL, + data: new URLSearchParams({ + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', + assertion: signedJWT, + }), + responseType: 'json', + retryConfig: { + httpMethodsToRetry: ['POST'], + }, + }); + this.rawToken = r.data; + this.expiresAt = + r.data.expires_in === null || r.data.expires_in === undefined + ? undefined + : (iat + r.data.expires_in) * 1000; + return this.rawToken; + } + catch (e) { + this.rawToken = undefined; + this.tokenExpires = undefined; + const body = e.response && e.response?.data + ? e.response?.data + : {}; + if (body.error) { + const desc = body.error_description + ? `: ${body.error_description}` + : ''; + e.message = `${body.error}${desc}`; + } + throw e; + } + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/hasown/.github/FUNDING.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..d68c8b716ff04186cd4c0ed8f85af474cfbfbc6a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8cd1151c2d7d2bb32637df113d8611e32282e423 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts @@ -0,0 +1,47 @@ +/// +/// +/// +/// +import * as net from 'net'; +import * as tls from 'tls'; +import * as http from 'http'; +import { Agent, AgentConnectOpts } from 'agent-base'; +import { URL } from 'url'; +import type { OutgoingHttpHeaders } from 'http'; +type Protocol = T extends `${infer Protocol}:${infer _}` ? Protocol : never; +type ConnectOptsMap = { + http: Omit; + https: Omit; +}; +type ConnectOpts = { + [P in keyof ConnectOptsMap]: Protocol extends P ? ConnectOptsMap[P] : never; +}[keyof ConnectOptsMap]; +export type HttpsProxyAgentOptions = ConnectOpts & http.AgentOptions & { + headers?: OutgoingHttpHeaders | (() => OutgoingHttpHeaders); +}; +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + */ +export declare class HttpsProxyAgent extends Agent { + static protocols: readonly ["http", "https"]; + readonly proxy: URL; + proxyHeaders: OutgoingHttpHeaders | (() => OutgoingHttpHeaders); + connectOpts: net.TcpNetConnectOpts & tls.ConnectionOptions; + constructor(proxy: Uri | URL, opts?: HttpsProxyAgentOptions); + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + connect(req: http.ClientRequest, opts: AgentConnectOpts): Promise; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c23c3a06f07f17da1dd192d2602c6ddf5ee6d228 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAuBhD,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,QAAQ,IAAI,MAAM,CAAC,EAAE,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE/E,KAAK,cAAc,GAAG;IACrB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACnD,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/C,cAAc,CAAC,CAAC,CAAC,GACjB,KAAK;CACR,CAAC,MAAM,cAAc,CAAC,CAAC;AAExB,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GACrD,IAAI,CAAC,YAAY,GAAG;IACnB,OAAO,CAAC,EAAE,mBAAmB,GAAG,CAAC,MAAM,mBAAmB,CAAC,CAAC;CAC5D,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,qBAAa,eAAe,CAAC,GAAG,SAAS,MAAM,CAAE,SAAQ,KAAK;IAC7D,MAAM,CAAC,SAAS,6BAA8B;IAE9C,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IACpB,YAAY,EAAE,mBAAmB,GAAG,CAAC,MAAM,mBAAmB,CAAC,CAAC;IAChE,WAAW,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;gBAE/C,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC;IA0BhE;;;OAGG;IACG,OAAO,CACZ,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,IAAI,EAAE,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;CAwGtB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1857f464724e20a12760b06f194022a4fec26ad0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js @@ -0,0 +1,180 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpsProxyAgent = void 0; +const net = __importStar(require("net")); +const tls = __importStar(require("tls")); +const assert_1 = __importDefault(require("assert")); +const debug_1 = __importDefault(require("debug")); +const agent_base_1 = require("agent-base"); +const url_1 = require("url"); +const parse_proxy_response_1 = require("./parse-proxy-response"); +const debug = (0, debug_1.default)('https-proxy-agent'); +const setServernameFromNonIpHost = (options) => { + if (options.servername === undefined && + options.host && + !net.isIP(options.host)) { + return { + ...options, + servername: options.host, + }; + } + return options; +}; +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + */ +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: undefined }; + this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); + // Trim off the brackets from IPv6 addresses + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); + const port = this.proxy.port + ? parseInt(this.proxy.port, 10) + : this.proxy.protocol === 'https:' + ? 443 + : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ['http/1.1'], + ...(opts ? omit(opts, 'headers') : null), + host, + port, + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); + } + // Create a socket connection to the proxy server. + let socket; + if (proxy.protocol === 'https:') { + debug('Creating `tls.Socket`: %o', this.connectOpts); + socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); + } + else { + debug('Creating `net.Socket`: %o', this.connectOpts); + socket = net.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === 'function' + ? this.proxyHeaders() + : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers['Proxy-Connection']) { + headers['Proxy-Connection'] = this.keepAlive + ? 'Keep-Alive' + : 'close'; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r\n`); + const { connect, buffered } = await proxyResponsePromise; + req.emit('proxyConnect', connect); + this.emit('proxyConnect', connect, req); + if (connect.statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + return tls.connect({ + ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), + socket, + }); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('Replaying proxy buffer for failed request'); + (0, assert_1.default)(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; + } +} +HttpsProxyAgent.protocols = ['http', 'https']; +exports.HttpsProxyAgent = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea7d2f31551bbeac134222c20e678d85ed197156 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,yCAA2B;AAE3B,oDAA4B;AAC5B,kDAAgC;AAChC,2CAAqD;AACrD,6BAA0B;AAC1B,iEAA4D;AAG5D,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAC;AAE/C,MAAM,0BAA0B,GAAG,CAGlC,OAAU,EACT,EAAE;IACH,IACC,OAAO,CAAC,UAAU,KAAK,SAAS;QAChC,OAAO,CAAC,IAAI;QACZ,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EACtB;QACD,OAAO;YACN,GAAG,OAAO;YACV,UAAU,EAAE,OAAO,CAAC,IAAI;SACxB,CAAC;KACF;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAqBF;;;;;;;;;;;GAWG;AACH,MAAa,eAAoC,SAAQ,kBAAK;IAO7D,YAAY,KAAgB,EAAE,IAAkC;QAC/D,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAChE,IAAI,CAAC,YAAY,GAAG,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC;QACxC,KAAK,CAAC,2CAA2C,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpE,4CAA4C;QAC5C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAC5D,UAAU,EACV,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IACnB,CAAC;;AA9IM,yBAAS,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AADlC,0CAAe;AAkJ5B,SAAS,MAAM,CAAC,MAAkC;IACjD,MAAM,CAAC,MAAM,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..84d5a9cd699d64f7bd8d4dde91149124ba28f452 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts @@ -0,0 +1,15 @@ +/// +/// +/// +import { IncomingHttpHeaders } from 'http'; +import { Readable } from 'stream'; +export interface ConnectResponse { + statusCode: number; + statusText: string; + headers: IncomingHttpHeaders; +} +export declare function parseProxyResponse(socket: Readable): Promise<{ + connect: ConnectResponse; + buffered: Buffer; +}>; +//# sourceMappingURL=parse-proxy-response.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..414df556a4353f680e4a7e1a04be7b7b16be03ac --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-proxy-response.d.ts","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,MAAM,WAAW,eAAe;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,QAAQ,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyGzD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js new file mode 100644 index 0000000000000000000000000000000000000000..d3f506f94130667ea0f9371e284a0bfe0935448f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js @@ -0,0 +1,101 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseProxyResponse = void 0; +const debug_1 = __importDefault(require("debug")); +const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); + } + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('readable', read); + } + function onend() { + cleanup(); + debug('onend'); + reject(new Error('Proxy connection ended before receiving CONNECT response')); + } + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; + } + const headerParts = buffered + .slice(0, endOfHeaders) + .toString('ascii') + .split('\r\n'); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error('No header received from proxy CONNECT response')); + } + const firstLineParts = firstLine.split(' '); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(' '); + const headers = {}; + for (const header of headerParts) { + if (!header) + continue; + const firstColon = header.indexOf(':'); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === 'string') { + headers[key] = [current, value]; + } + else if (Array.isArray(current)) { + current.push(value); + } + else { + headers[key] = value; + } + } + debug('got proxy server response: %o %o', firstLine, headers); + cleanup(); + resolve({ + connect: { + statusCode, + statusText, + headers, + }, + buffered, + }); + } + socket.on('error', onerror); + socket.on('end', onend); + read(); + }); +} +exports.parseProxyResponse = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map new file mode 100644 index 0000000000000000000000000000000000000000..71b58bb914d6acfe9db38ea2d828dc8f236925fd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgC;AAIhC,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,wCAAwC,CAAC,CAAC;AAQpE,SAAgB,kBAAkB,CACjC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,KAAK;YACb,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,MAAM,CACL,IAAI,KAAK,CACR,0DAA0D,CAC1D,CACD,CAAC;QACH,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,SAA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B,OAAO,MAAM,CACZ,IAAI,KAAK,CACR,gDAAgD,MAAM,GAAG,CACzD,CACD,CAAC;iBACF;gBACD,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;gBACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;gBACvD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;oBAChC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;iBAChC;qBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;oBAClC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;iBACrB;aACD;YACD,KAAK,CAAC,kCAAkC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YAC9D,OAAO,EAAE,CAAC;YACV,OAAO,CAAC;gBACP,OAAO,EAAE;oBACR,UAAU;oBACV,UAAU;oBACV,OAAO;iBACP;gBACD,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AA3GD,gDA2GC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js new file mode 100644 index 0000000000000000000000000000000000000000..da1ba92f7a72427cbc86c5cb910c01cbfea41716 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js @@ -0,0 +1,1056 @@ +(function (root) { + 'use strict'; + // A list of regular expressions that match arbitrary IPv4 addresses, + // for which a number of weird notations exist. + // Note that an address like 0010.0xa5.1.1 is considered legal. + const ipv4Part = '(0?\\d+|0x[a-f0-9]+)'; + const ipv4Regexes = { + fourOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'), + threeOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'), + twoOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}$`, 'i'), + longValue: new RegExp(`^${ipv4Part}$`, 'i') + }; + + // Regular Expression for checking Octal numbers + const octalRegex = new RegExp(`^0[0-7]+$`, 'i'); + const hexRegex = new RegExp(`^0x[a-f0-9]+$`, 'i'); + + const zoneIndex = '%[0-9a-z]{1,}'; + + // IPv6-matching regular expressions. + // For IPv6, the task is simpler: it is enough to match the colon-delimited + // hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at + // the end. + const ipv6Part = '(?:[0-9a-f]+::?)+'; + const ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, 'i'), + 'native': new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, 'i'), + deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?)$`, 'i'), + transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?$`, 'i') + }; + + // Expand :: in an IPv6 address or address part consisting of `parts` groups. + function expandIPv6 (string, parts) { + // More than one '::' means invalid adddress + if (string.indexOf('::') !== string.lastIndexOf('::')) { + return null; + } + + let colonCount = 0; + let lastColon = -1; + let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0]; + let replacement, replacementCount; + + // Remove zone index and save it for later + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ''); + } + + // How many parts do we already have? + while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { + colonCount++; + } + + // 0::0 is two parts more than :: + if (string.substr(0, 2) === '::') { + colonCount--; + } + + if (string.substr(-2, 2) === '::') { + colonCount--; + } + + // The following loop would hang if colonCount > parts + if (colonCount > parts) { + return null; + } + + // replacement = ':' + '0:' * (parts - colonCount) + replacementCount = parts - colonCount; + replacement = ':'; + while (replacementCount--) { + replacement += '0:'; + } + + // Insert the missing zeroes + string = string.replace('::', replacement); + + // Trim any garbage which may be hanging around if :: was at the edge in + // the source strin + if (string[0] === ':') { + string = string.slice(1); + } + + if (string[string.length - 1] === ':') { + string = string.slice(0, -1); + } + + parts = (function () { + const ref = string.split(':'); + const results = []; + + for (let i = 0; i < ref.length; i++) { + results.push(parseInt(ref[i], 16)); + } + + return results; + })(); + + return { + parts: parts, + zoneId: zoneId + }; + } + + // A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher. + function matchCIDR (first, second, partSize, cidrBits) { + if (first.length !== second.length) { + throw new Error('ipaddr: cannot match CIDR for objects with different lengths'); + } + + let part = 0; + let shift; + + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + + cidrBits -= partSize; + part += 1; + } + + return true; + } + + function parseIntAuto (string) { + // Hexadedimal base 16 (0x#) + if (hexRegex.test(string)) { + return parseInt(string, 16); + } + // While octal representation is discouraged by ECMAScript 3 + // and forbidden by ECMAScript 5, we silently allow it to + // work only if the rest of the string has numbers less than 8. + if (string[0] === '0' && !isNaN(parseInt(string[1], 10))) { + if (octalRegex.test(string)) { + return parseInt(string, 8); + } + throw new Error(`ipaddr: cannot parse ${string} as octal`); + } + // Always include the base 10 radix! + return parseInt(string, 10); + } + + function padPart (part, length) { + while (part.length < length) { + part = `0${part}`; + } + + return part; + } + + const ipaddr = {}; + + // An IPv4 address (RFC791). + ipaddr.IPv4 = (function () { + // Constructs a new IPv4 address from an array of four octets + // in network order (MSB first) + // Verifies the input. + function IPv4 (octets) { + if (octets.length !== 4) { + throw new Error('ipaddr: ipv4 octet count should be 4'); + } + + let i, octet; + + for (i = 0; i < octets.length; i++) { + octet = octets[i]; + if (!((0 <= octet && octet <= 255))) { + throw new Error('ipaddr: ipv4 octet should fit in 8 bits'); + } + } + + this.octets = octets; + } + + // Special IPv4 address ranges. + // See also https://en.wikipedia.org/wiki/Reserved_IP_addresses + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + // RFC3171 + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + // RFC3927 + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + // RFC5735 + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + // RFC6598 + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + // RFC1918 + 'private': [ + [new IPv4([10, 0, 0, 0]), 8], + [new IPv4([172, 16, 0, 0]), 12], + [new IPv4([192, 168, 0, 0]), 16] + ], + // Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700 + reserved: [ + [new IPv4([192, 0, 0, 0]), 24], + [new IPv4([192, 0, 2, 0]), 24], + [new IPv4([192, 88, 99, 0]), 24], + [new IPv4([198, 18, 0, 0]), 15], + [new IPv4([198, 51, 100, 0]), 24], + [new IPv4([203, 0, 113, 0]), 24], + [new IPv4([240, 0, 0, 0]), 4] + ], + // RFC7534, RFC7535 + as112: [ + [new IPv4([192, 175, 48, 0]), 24], + [new IPv4([192, 31, 196, 0]), 24], + ], + // RFC7450 + amt: [ + [new IPv4([192, 52, 193, 0]), 24], + ], + }; + + // The 'kind' method exists on both IPv4 and IPv6 classes. + IPv4.prototype.kind = function () { + return 'ipv4'; + }; + + // Checks if this address matches other one within given CIDR range. + IPv4.prototype.match = function (other, cidrRange) { + let ref; + if (cidrRange === undefined) { + ref = other; + other = ref[0]; + cidrRange = ref[1]; + } + + if (other.kind() !== 'ipv4') { + throw new Error('ipaddr: cannot match ipv4 address with non-ipv4 one'); + } + + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + + // returns a number of leading ones in IPv4 address, making sure that + // the rest is a solid sequence of 0's (valid netmask) + // returns either the CIDR length or null if mask is not valid + IPv4.prototype.prefixLengthFromSubnetMask = function () { + let cidr = 0; + // non-zero encountered stop scanning for zeroes + let stop = false; + // number of zeroes in octet + const zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + let i, octet, zeros; + + for (i = 3; i >= 0; i -= 1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + + if (zeros !== 8) { + stop = true; + } + + cidr += zeros; + } else { + return null; + } + } + + return 32 - cidr; + }; + + // Checks if the address corresponds to one of the special ranges. + IPv4.prototype.range = function () { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + // Returns an array of byte-sized values in network order (MSB first) + IPv4.prototype.toByteArray = function () { + return this.octets.slice(0); + }; + + // Converts this IPv4 address to an IPv4-mapped IPv6 address. + IPv4.prototype.toIPv4MappedAddress = function () { + return ipaddr.IPv6.parse(`::ffff:${this.toString()}`); + }; + + // Symmetrical method strictly for aligning with the IPv6 methods. + IPv4.prototype.toNormalizedString = function () { + return this.toString(); + }; + + // Returns the address in convenient, decimal-dotted format. + IPv4.prototype.toString = function () { + return this.octets.join('.'); + }; + + return IPv4; + })(); + + // A utility function to return broadcast address given the IPv4 interface and prefix length in CIDR notation + ipaddr.IPv4.broadcastAddressFromCIDR = function (string) { + + try { + const cidr = this.parseCIDR(string); + const ipInterfaceOctets = cidr[0].toByteArray(); + const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + const octets = []; + let i = 0; + while (i < 4) { + // Broadcast address is bitwise OR between ip interface and inverted mask + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + + return new this(octets); + } catch (e) { + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + // Checks if a given string is formatted like IPv4 address. + ipaddr.IPv4.isIPv4 = function (string) { + return this.parser(string) !== null; + }; + + // Checks if a given string is a valid IPv4 address. + ipaddr.IPv4.isValid = function (string) { + try { + new this(this.parser(string)); + return true; + } catch (e) { + return false; + } + }; + + // Checks if a given string is a valid IPv4 address in CIDR notation. + ipaddr.IPv4.isValidCIDR = function (string) { + try { + this.parseCIDR(string); + return true; + } catch (e) { + return false; + } + }; + + // Checks if a given string is a full four-part IPv4 Address. + ipaddr.IPv4.isValidFourPartDecimal = function (string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { + return true; + } else { + return false; + } + }; + + // A utility function to return network address given the IPv4 interface and prefix length in CIDR notation + ipaddr.IPv4.networkAddressFromCIDR = function (string) { + let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets; + + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + // Network address is bitwise AND between ip interface and mask + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + + return new this(octets); + } catch (e) { + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + // Tries to parse and validate a string with IPv4 address. + // Throws an error if it fails. + ipaddr.IPv4.parse = function (string) { + const parts = this.parser(string); + + if (parts === null) { + throw new Error('ipaddr: string is not formatted like an IPv4 Address'); + } + + return new this(parts); + }; + + // Parses the string as an IPv4 Address with CIDR Notation. + ipaddr.IPv4.parseCIDR = function (string) { + let match; + + if ((match = string.match(/^(.+)\/(\d+)$/))) { + const maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + const parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, 'toString', { + value: function () { + return this.join('/'); + } + }); + return parsed; + } + } + + throw new Error('ipaddr: string is not formatted like an IPv4 CIDR range'); + }; + + // Classful variants (like a.b, where a is an octet, and b is a 24-bit + // value representing last three octets; this corresponds to a class C + // address) are omitted due to classless nature of modern Internet. + ipaddr.IPv4.parser = function (string) { + let match, part, value; + + // parseInt recognizes all that octal & hexadecimal weirdness for us + if ((match = string.match(ipv4Regexes.fourOctet))) { + return (function () { + const ref = match.slice(1, 6); + const results = []; + + for (let i = 0; i < ref.length; i++) { + part = ref[i]; + results.push(parseIntAuto(part)); + } + + return results; + })(); + } else if ((match = string.match(ipv4Regexes.longValue))) { + value = parseIntAuto(match[1]); + if (value > 0xffffffff || value < 0) { + throw new Error('ipaddr: address outside defined range'); + } + + return ((function () { + const results = []; + let shift; + + for (shift = 0; shift <= 24; shift += 8) { + results.push((value >> shift) & 0xff); + } + + return results; + })()).reverse(); + } else if ((match = string.match(ipv4Regexes.twoOctet))) { + return (function () { + const ref = match.slice(1, 4); + const results = []; + + value = parseIntAuto(ref[1]); + if (value > 0xffffff || value < 0) { + throw new Error('ipaddr: address outside defined range'); + } + + results.push(parseIntAuto(ref[0])); + results.push((value >> 16) & 0xff); + results.push((value >> 8) & 0xff); + results.push( value & 0xff); + + return results; + })(); + } else if ((match = string.match(ipv4Regexes.threeOctet))) { + return (function () { + const ref = match.slice(1, 5); + const results = []; + + value = parseIntAuto(ref[2]); + if (value > 0xffff || value < 0) { + throw new Error('ipaddr: address outside defined range'); + } + + results.push(parseIntAuto(ref[0])); + results.push(parseIntAuto(ref[1])); + results.push((value >> 8) & 0xff); + results.push( value & 0xff); + + return results; + })(); + } else { + return null; + } + }; + + // A utility function to return subnet mask in IPv4 format given the prefix length + ipaddr.IPv4.subnetMaskFromPrefixLength = function (prefix) { + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error('ipaddr: invalid IPv4 prefix length'); + } + + const octets = [0, 0, 0, 0]; + let j = 0; + const filledOctetCount = Math.floor(prefix / 8); + + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8); + } + + return new this(octets); + }; + + // An IPv6 address (RFC2460) + ipaddr.IPv6 = (function () { + // Constructs an IPv6 address from an array of eight 16 - bit parts + // or sixteen 8 - bit parts in network order(MSB first). + // Throws an error if the input is invalid. + function IPv6 (parts, zoneId) { + let i, part; + + if (parts.length === 16) { + this.parts = []; + for (i = 0; i <= 14; i += 2) { + this.parts.push((parts[i] << 8) | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error('ipaddr: ipv6 part count should be 8 or 16'); + } + + for (i = 0; i < this.parts.length; i++) { + part = this.parts[i]; + if (!((0 <= part && part <= 0xffff))) { + throw new Error('ipaddr: ipv6 part should fit in 16 bits'); + } + } + + if (zoneId) { + this.zoneId = zoneId; + } + } + + // Special IPv6 ranges + IPv6.prototype.SpecialRanges = { + // RFC4291, here and after + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], + // RFC6666 + discard: [new IPv6([0x100, 0, 0, 0, 0, 0, 0, 0]), 64], + // RFC6145 + rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], + // RFC6052 + rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], + // RFC3056 + '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], + // RFC6052, RFC6146 + teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], + // RFC5180 + benchmarking: [new IPv6([0x2001, 0x2, 0, 0, 0, 0, 0, 0]), 48], + // RFC7450 + amt: [new IPv6([0x2001, 0x3, 0, 0, 0, 0, 0, 0]), 32], + as112v6: [ + [new IPv6([0x2001, 0x4, 0x112, 0, 0, 0, 0, 0]), 48], + [new IPv6([0x2620, 0x4f, 0x8000, 0, 0, 0, 0, 0]), 48], + ], + deprecated: [new IPv6([0x2001, 0x10, 0, 0, 0, 0, 0, 0]), 28], + orchid2: [new IPv6([0x2001, 0x20, 0, 0, 0, 0, 0, 0]), 28], + droneRemoteIdProtocolEntityTags: [new IPv6([0x2001, 0x30, 0, 0, 0, 0, 0, 0]), 28], + reserved: [ + // RFC3849 + [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 23], + // RFC2928 + [new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32], + ], + }; + + // Checks if this address is an IPv4-mapped IPv6 address. + IPv6.prototype.isIPv4MappedAddress = function () { + return this.range() === 'ipv4Mapped'; + }; + + // The 'kind' method exists on both IPv4 and IPv6 classes. + IPv6.prototype.kind = function () { + return 'ipv6'; + }; + + // Checks if this address matches other one within given CIDR range. + IPv6.prototype.match = function (other, cidrRange) { + let ref; + + if (cidrRange === undefined) { + ref = other; + other = ref[0]; + cidrRange = ref[1]; + } + + if (other.kind() !== 'ipv6') { + throw new Error('ipaddr: cannot match ipv6 address with non-ipv6 one'); + } + + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + + // returns a number of leading ones in IPv6 address, making sure that + // the rest is a solid sequence of 0's (valid netmask) + // returns either the CIDR length or null if mask is not valid + IPv6.prototype.prefixLengthFromSubnetMask = function () { + let cidr = 0; + // non-zero encountered stop scanning for zeroes + let stop = false; + // number of zeroes in octet + const zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + let part, zeros; + + for (let i = 7; i >= 0; i -= 1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + + if (zeros !== 16) { + stop = true; + } + + cidr += zeros; + } else { + return null; + } + } + + return 128 - cidr; + }; + + + // Checks if the address corresponds to one of the special ranges. + IPv6.prototype.range = function () { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + // Returns an array of byte-sized values in network order (MSB first) + IPv6.prototype.toByteArray = function () { + let part; + const bytes = []; + const ref = this.parts; + for (let i = 0; i < ref.length; i++) { + part = ref[i]; + bytes.push(part >> 8); + bytes.push(part & 0xff); + } + + return bytes; + }; + + // Returns the address in expanded format with all zeroes included, like + // 2001:0db8:0008:0066:0000:0000:0000:0001 + IPv6.prototype.toFixedLengthString = function () { + const addr = ((function () { + const results = []; + for (let i = 0; i < this.parts.length; i++) { + results.push(padPart(this.parts[i].toString(16), 4)); + } + + return results; + }).call(this)).join(':'); + + let suffix = ''; + + if (this.zoneId) { + suffix = `%${this.zoneId}`; + } + + return addr + suffix; + }; + + // Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address. + // Throws an error otherwise. + IPv6.prototype.toIPv4Address = function () { + if (!this.isIPv4MappedAddress()) { + throw new Error('ipaddr: trying to convert a generic ipv6 address to ipv4'); + } + + const ref = this.parts.slice(-2); + const high = ref[0]; + const low = ref[1]; + + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); + }; + + // Returns the address in expanded format with all zeroes included, like + // 2001:db8:8:66:0:0:0:1 + // + // Deprecated: use toFixedLengthString() instead. + IPv6.prototype.toNormalizedString = function () { + const addr = ((function () { + const results = []; + + for (let i = 0; i < this.parts.length; i++) { + results.push(this.parts[i].toString(16)); + } + + return results; + }).call(this)).join(':'); + + let suffix = ''; + + if (this.zoneId) { + suffix = `%${this.zoneId}`; + } + + return addr + suffix; + }; + + // Returns the address in compact, human-readable format like + // 2001:db8:8:66::1 + // in line with RFC 5952 (see https://tools.ietf.org/html/rfc5952#section-4) + IPv6.prototype.toRFC5952String = function () { + const regex = /((^|:)(0(:|$)){2,})/g; + const string = this.toNormalizedString(); + let bestMatchIndex = 0; + let bestMatchLength = -1; + let match; + + while ((match = regex.exec(string))) { + if (match[0].length > bestMatchLength) { + bestMatchIndex = match.index; + bestMatchLength = match[0].length; + } + } + + if (bestMatchLength < 0) { + return string; + } + + return `${string.substring(0, bestMatchIndex)}::${string.substring(bestMatchIndex + bestMatchLength)}`; + }; + + // Returns the address in compact, human-readable format like + // 2001:db8:8:66::1 + // Calls toRFC5952String under the hood. + IPv6.prototype.toString = function () { + return this.toRFC5952String(); + }; + + return IPv6; + + })(); + + // A utility function to return broadcast address given the IPv6 interface and prefix length in CIDR notation + ipaddr.IPv6.broadcastAddressFromCIDR = function (string) { + try { + const cidr = this.parseCIDR(string); + const ipInterfaceOctets = cidr[0].toByteArray(); + const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + const octets = []; + let i = 0; + while (i < 16) { + // Broadcast address is bitwise OR between ip interface and inverted mask + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + + return new this(octets); + } catch (e) { + throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`); + } + }; + + // Checks if a given string is formatted like IPv6 address. + ipaddr.IPv6.isIPv6 = function (string) { + return this.parser(string) !== null; + }; + + // Checks to see if string is a valid IPv6 Address + ipaddr.IPv6.isValid = function (string) { + + // Since IPv6.isValid is always called first, this shortcut + // provides a substantial performance gain. + if (typeof string === 'string' && string.indexOf(':') === -1) { + return false; + } + + try { + const addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (e) { + return false; + } + }; + + // Checks if a given string is a valid IPv6 address in CIDR notation. + ipaddr.IPv6.isValidCIDR = function (string) { + + // See note in IPv6.isValid + if (typeof string === 'string' && string.indexOf(':') === -1) { + return false; + } + + try { + this.parseCIDR(string); + return true; + } catch (e) { + return false; + } + }; + + // A utility function to return network address given the IPv6 interface and prefix length in CIDR notation + ipaddr.IPv6.networkAddressFromCIDR = function (string) { + let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets; + + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 16) { + // Network address is bitwise AND between ip interface and mask + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + + return new this(octets); + } catch (e) { + throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`); + } + }; + + // Tries to parse and validate a string with IPv6 address. + // Throws an error if it fails. + ipaddr.IPv6.parse = function (string) { + const addr = this.parser(string); + + if (addr.parts === null) { + throw new Error('ipaddr: string is not formatted like an IPv6 Address'); + } + + return new this(addr.parts, addr.zoneId); + }; + + ipaddr.IPv6.parseCIDR = function (string) { + let maskLength, match, parsed; + + if ((match = string.match(/^(.+)\/(\d+)$/))) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, 'toString', { + value: function () { + return this.join('/'); + } + }); + return parsed; + } + } + + throw new Error('ipaddr: string is not formatted like an IPv6 CIDR range'); + }; + + // Parse an IPv6 address. + ipaddr.IPv6.parser = function (string) { + let addr, i, match, octet, octets, zoneId; + + if ((match = string.match(ipv6Regexes.deprecatedTransitional))) { + return this.parser(`::ffff:${match[1]}`); + } + if (ipv6Regexes.native.test(string)) { + return expandIPv6(string, 8); + } + if ((match = string.match(ipv6Regexes.transitional))) { + zoneId = match[6] || ''; + addr = match[1] + if (!match[1].endsWith('::')) { + addr = addr.slice(0, -1) + } + addr = expandIPv6(addr + zoneId, 6); + if (addr.parts) { + octets = [ + parseInt(match[2]), + parseInt(match[3]), + parseInt(match[4]), + parseInt(match[5]) + ]; + for (i = 0; i < octets.length; i++) { + octet = octets[i]; + if (!((0 <= octet && octet <= 255))) { + return null; + } + } + + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + + return null; + }; + + // A utility function to return subnet mask in IPv6 format given the prefix length + ipaddr.IPv6.subnetMaskFromPrefixLength = function (prefix) { + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 128) { + throw new Error('ipaddr: invalid IPv6 prefix length'); + } + + const octets = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let j = 0; + const filledOctetCount = Math.floor(prefix / 8); + + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + + if (filledOctetCount < 16) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8); + } + + return new this(octets); + }; + + // Try to parse an array in network order (MSB first) for IPv4 and IPv6 + ipaddr.fromByteArray = function (bytes) { + const length = bytes.length; + + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error('ipaddr: the binary input is neither an IPv6 nor IPv4 address'); + } + }; + + // Checks if the address is valid IP address + ipaddr.isValid = function (string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + + // Checks if the address is valid IP address in CIDR notation + ipaddr.isValidCIDR = function (string) { + return ipaddr.IPv6.isValidCIDR(string) || ipaddr.IPv4.isValidCIDR(string); + }; + + + // Attempts to parse an IP Address, first through IPv6 then IPv4. + // Throws an error if it could not be parsed. + ipaddr.parse = function (string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format'); + } + }; + + // Attempt to parse CIDR notation, first through IPv6 then IPv4. + // Throws an error if it could not be parsed. + ipaddr.parseCIDR = function (string) { + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (e) { + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (e2) { + throw new Error('ipaddr: the address has neither IPv6 nor IPv4 CIDR format'); + } + } + }; + + // Parse an address and return plain IPv4 address if it is an IPv4-mapped address + ipaddr.process = function (string) { + const addr = this.parse(string); + + if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + + // An utility function to ease named range matching. See examples below. + // rangeList can contain both IPv4 and IPv6 subnet entries and will not throw errors + // on matching IPv4 addresses to IPv6 ranges or vice versa. + ipaddr.subnetMatch = function (address, rangeList, defaultName) { + let i, rangeName, rangeSubnets, subnet; + + if (defaultName === undefined || defaultName === null) { + defaultName = 'unicast'; + } + + for (rangeName in rangeList) { + if (Object.prototype.hasOwnProperty.call(rangeList, rangeName)) { + rangeSubnets = rangeList[rangeName]; + // ECMA5 Array.isArray isn't available everywhere + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + + for (i = 0; i < rangeSubnets.length; i++) { + subnet = rangeSubnets[i]; + if (address.kind() === subnet[0].kind() && address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + + return defaultName; + }; + + // Export for both the CommonJS and browser-like environment + if (typeof module !== 'undefined' && module.exports) { + module.exports = ipaddr; + + } else { + root.ipaddr = ipaddr; + } + +}(this)); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..62afab336eca6d82eb789658bb6fda7c3ae18d93 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/ipaddr.js/lib/ipaddr.js.d.ts @@ -0,0 +1,71 @@ +declare module "ipaddr.js" { + type IPvXRangeDefaults = 'unicast' | 'unspecified' | 'multicast' | 'linkLocal' | 'loopback' | 'reserved' | 'benchmarking' | 'amt'; + type IPv4Range = IPvXRangeDefaults | 'broadcast' | 'carrierGradeNat' | 'private' | 'as112'; + type IPv6Range = IPvXRangeDefaults | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'as112v6' | 'orchid2' | 'droneRemoteIdProtocolEntityTags'; + + interface RangeList { + [name: string]: [T, number] | [T, number][]; + } + + // Common methods/properties for IPv4 and IPv6 classes. + class IP { + prefixLengthFromSubnetMask(): number | null; + toByteArray(): number[]; + toNormalizedString(): string; + toString(): string; + } + + namespace Address { + export function fromByteArray(bytes: number[]): IPv4 | IPv6; + export function isValid(addr: string): boolean; + export function isValidCIDR(addr: string): boolean; + export function parse(addr: string): IPv4 | IPv6; + export function parseCIDR(mask: string): [IPv4 | IPv6, number]; + export function process(addr: string): IPv4 | IPv6; + export function subnetMatch(addr: IPv4 | IPv6, rangeList: RangeList, defaultName?: string): string; + + export class IPv4 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv4; + static isIPv4(addr: string): boolean; + static isValid(addr: string): boolean; + static isValidCIDR(addr: string): boolean; + static isValidFourPartDecimal(addr: string): boolean; + static networkAddressFromCIDR(addr: string): IPv4; + static parse(addr: string): IPv4; + static parseCIDR(addr: string): [IPv4, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv4; + constructor(octets: number[]); + octets: number[] + + kind(): 'ipv4'; + match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean; + range(): IPv4Range; + subnetMatch(rangeList: RangeList, defaultName?: string): string; + toIPv4MappedAddress(): IPv6; + } + + export class IPv6 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv6; + static isIPv6(addr: string): boolean; + static isValid(addr: string): boolean; + static isValidCIDR(addr: string): boolean; + static networkAddressFromCIDR(addr: string): IPv6; + static parse(addr: string): IPv6; + static parseCIDR(addr: string): [IPv6, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv6; + constructor(parts: number[]); + parts: number[] + zoneId?: string + + isIPv4MappedAddress(): boolean; + kind(): 'ipv6'; + match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean; + range(): IPv6Range; + subnetMatch(rangeList: RangeList, defaultName?: string): string; + toIPv4Address(): IPv4; + toRFC5952String(): string; + } + } + + export = Address; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/is-core-module/test/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7a81e1c7e76e9cfa8cca135b0ada3d431f295115 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/is-core-module/test/index.js @@ -0,0 +1,157 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var Module = require('module'); + var libs = Module.builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + if (semver.satisfies(process.version, '^20.12 || >= 21.7')) { + libs = libs.concat('node:sea'); + } + if (semver.satisfies(process.version, '>= 23.4')) { + libs = libs.concat('node:sqlite'); + } + + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + + if (Module.isBuiltin) { + st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true'); + } + + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + + if (process.getBuiltinModule) { + st.equal( + process.getBuiltinModule(mod), + require(mod), + 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')' + ); + } + + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/isexe/test/basic.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/isexe/test/basic.js new file mode 100644 index 0000000000000000000000000000000000000000..d926df64b902457c1487bb29e3258e7eca9c6753 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed913d54fa30cce60d366bc94792f8ad8745d71e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts @@ -0,0 +1,323 @@ +import { inspect, InspectOptions, ParseArgsConfig } from 'node:util'; +export type ParseArgsOptions = Exclude; +export type ParseArgsOption = ParseArgsOptions[string]; +export type ParseArgsDefault = Exclude; +export type ConfigType = 'number' | 'string' | 'boolean'; +export declare const isConfigType: (t: unknown) => t is ConfigType; +export type ConfigValuePrimitive = string | boolean | number; +export type ConfigValueArray = string[] | boolean[] | number[]; +export type ConfigValue = ConfigValuePrimitive | ConfigValueArray; +/** + * Given a Jack object, get the typeof its ConfigSet + */ +export type Unwrap = J extends Jack ? C : never; +/** + * Defines the type of value that is valid, given a config definition's + * {@link ConfigType} and boolean multiple setting + */ +export type ValidValue = [ + T, + M +] extends ['number', true] ? number[] : [T, M] extends ['string', true] ? string[] : [T, M] extends ['boolean', true] ? boolean[] : [T, M] extends ['number', false] ? number : [T, M] extends ['string', false] ? string : [T, M] extends ['boolean', false] ? boolean : [T, M] extends ['string', boolean] ? string | string[] : [T, M] extends ['boolean', boolean] ? boolean | boolean[] : [T, M] extends ['number', boolean] ? number | number[] : [T, M] extends [ConfigType, false] ? ConfigValuePrimitive : [T, M] extends [ConfigType, true] ? ConfigValueArray : ConfigValue; +export type ReadonlyArrays = readonly number[] | readonly string[]; +/** + * Defines the type of validOptions that are valid, given a config definition's + * {@link ConfigType} + */ +export type ValidOptions = T extends 'boolean' ? undefined : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : ReadonlyArrays; +/** + * A config field definition, in its full representation. + * This is what is passed in to addFields so `type` is required. + */ +export type ConfigOption = undefined | ValidOptions> = { + type: T; + short?: string; + default?: ValidValue & (O extends ReadonlyArrays ? M extends false ? O[number] : O[number][] : unknown); + description?: string; + hint?: T extends 'boolean' ? undefined : string; + validate?: ((v: unknown) => v is ValidValue) | ((v: unknown) => boolean); + validOptions?: O; + delim?: M extends false ? undefined : string; + multiple?: M; +}; +/** + * Determine whether an unknown object is a {@link ConfigOption} based only + * on its `type` and `multiple` property + */ +export declare const isConfigOptionOfType: (o: any, type: T, multi: M) => o is ConfigOption; +/** + * Determine whether an unknown object is a {@link ConfigOption} based on + * it having all valid properties + */ +export declare const isConfigOption: (o: any, type: T, multi: M) => o is ConfigOption; +/** + * The meta information for a config option definition, when the + * type and multiple values can be inferred by the method being used + */ +export type ConfigOptionMeta = ConfigOption> = Pick, 'type'> & Omit; +/** + * A set of {@link ConfigOption} objects, referenced by their longOption + * string values. + */ +export type ConfigSet = { + [longOption: string]: ConfigOption; +}; +/** + * A set of {@link ConfigOptionMeta} fields, referenced by their longOption + * string values. + */ +export type ConfigMetaSet = { + [longOption: string]: ConfigOptionMeta; +}; +/** + * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet} + */ +export type ConfigSetFromMetaSet> = S & { + [longOption in keyof S]: ConfigOption; +}; +/** + * The 'values' field returned by {@link Jack#parse}. If a value has + * a default field it will be required on the object otherwise it is optional. + */ +export type OptionsResults = { + [K in keyof T]: (T[K]['validOptions'] extends ReadonlyArrays ? T[K] extends ConfigOption<'string' | 'number', false> ? T[K]['validOptions'][number] : T[K] extends ConfigOption<'string' | 'number', true> ? T[K]['validOptions'][number][] : never : T[K] extends ConfigOption<'string', false> ? string : T[K] extends ConfigOption<'string', true> ? string[] : T[K] extends ConfigOption<'number', false> ? number : T[K] extends ConfigOption<'number', true> ? number[] : T[K] extends ConfigOption<'boolean', false> ? boolean : T[K] extends ConfigOption<'boolean', true> ? boolean[] : never) | (T[K]['default'] extends ConfigValue ? never : undefined); +}; +/** + * The object retured by {@link Jack#parse} + */ +export type Parsed = { + values: OptionsResults; + positionals: string[]; +}; +/** + * A row used when generating the {@link Jack#usage} string + */ +export interface Row { + left?: string; + text: string; + skipLine?: boolean; + type?: string; +} +/** + * A heading for a section in the usage, created by the jack.heading() + * method. + * + * First heading is always level 1, subsequent headings default to 2. + * + * The level of the nearest heading level sets the indentation of the + * description that follows. + */ +export interface Heading extends Row { + type: 'heading'; + text: string; + left?: ''; + skipLine?: boolean; + level: number; + pre?: boolean; +} +/** + * An arbitrary blob of text describing some stuff, set by the + * jack.description() method. + * + * Indentation determined by level of the nearest header. + */ +export interface Description extends Row { + type: 'description'; + text: string; + left?: ''; + skipLine?: boolean; + pre?: boolean; +} +/** + * A heading or description row used when generating the {@link Jack#usage} + * string + */ +export type TextRow = Heading | Description; +/** + * Either a {@link TextRow} or a reference to a {@link ConfigOption} + */ +export type UsageField = TextRow | { + type: 'config'; + name: string; + value: ConfigOption; +}; +/** + * Options provided to the {@link Jack} constructor + */ +export interface JackOptions { + /** + * Whether to allow positional arguments + * + * @default true + */ + allowPositionals?: boolean; + /** + * Prefix to use when reading/writing the environment variables + * + * If not specified, environment behavior will not be available. + */ + envPrefix?: string; + /** + * Environment object to read/write. Defaults `process.env`. + * No effect if `envPrefix` is not set. + */ + env?: Record; + /** + * A short usage string. If not provided, will be generated from the + * options provided, but that can of course be rather verbose if + * there are a lot of options. + */ + usage?: string; + /** + * Stop parsing flags and opts at the first positional argument. + * This is to support cases like `cmd [flags] [options]`, where + * each subcommand may have different options. This effectively treats + * any positional as a `--` argument. Only relevant if `allowPositionals` + * is true. + * + * To do subcommands, set this option, look at the first positional, and + * parse the remaining positionals as appropriate. + * + * @default false + */ + stopAtPositional?: boolean; + /** + * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function, + * will be called with each positional argument encountered. If the function + * returns true, then parsing will stop at that point. + */ + stopAtPositionalTest?: (arg: string) => boolean; +} +/** + * Class returned by the {@link jack} function and all configuration + * definition methods. This is what gets chained together. + */ +export declare class Jack { + #private; + constructor(options?: JackOptions); + /** + * Resulting definitions, suitable to be passed to Node's `util.parseArgs`, + * but also including `description` and `short` fields, if set. + */ + get definitions(): C; + /** map of `{ : }` strings for each short name defined */ + get shorts(): Record; + /** + * options passed to the {@link Jack} constructor + */ + get jackOptions(): JackOptions; + /** + * the data used to generate {@link Jack#usage} and + * {@link Jack#usageMarkdown} content. + */ + get usageFields(): UsageField[]; + /** + * Set the default value (which will still be overridden by env or cli) + * as if from a parsed config file. The optional `source` param, if + * provided, will be included in error messages if a value is invalid or + * unknown. + */ + setConfigValues(values: Partial>, source?: string): this; + /** + * Parse a string of arguments, and return the resulting + * `{ values, positionals }` object. + * + * If an {@link JackOptions#envPrefix} is set, then it will read default + * values from the environment, and write the resulting values back + * to the environment as well. + * + * Environment values always take precedence over any other value, except + * an explicit CLI setting. + */ + parse(args?: string[]): Parsed; + loadEnvDefaults(): void; + applyDefaults(p: Parsed): void; + /** + * Only parse the command line arguments passed in. + * Does not strip off the `node script.js` bits, so it must be just the + * arguments you wish to have parsed. + * Does not read from or write to the environment, or set defaults. + */ + parseRaw(args: string[]): Parsed; + /** + * Validate that any arbitrary object is a valid configuration `values` + * object. Useful when loading config files or other sources. + */ + validate(o: unknown): asserts o is Parsed['values']; + writeEnv(p: Parsed): void; + /** + * Add a heading to the usage output banner + */ + heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6, { pre }?: { + pre?: boolean; + }): Jack; + /** + * Add a long-form description to the usage output at this position. + */ + description(text: string, { pre }?: { + pre?: boolean; + }): Jack; + /** + * Add one or more number fields. + */ + num>(fields: F): Jack>; + /** + * Add one or more multiple number fields. + */ + numList>(fields: F): Jack>; + /** + * Add one or more string option fields. + */ + opt>(fields: F): Jack>; + /** + * Add one or more multiple string option fields. + */ + optList>(fields: F): Jack>; + /** + * Add one or more flag fields. + */ + flag>(fields: F): Jack>; + /** + * Add one or more multiple flag fields. + */ + flagList>(fields: F): Jack>; + /** + * Generic field definition method. Similar to flag/flagList/number/etc, + * but you must specify the `type` (and optionally `multiple` and `delim`) + * fields on each one, or Jack won't know how to define them. + */ + addFields(fields: F): Jack; + /** + * Return the usage banner for the given configuration + */ + usage(): string; + /** + * Return the usage banner markdown for the given configuration + */ + usageMarkdown(): string; + /** + * Return the configuration options as a plain object + */ + toJSON(): { + [k: string]: { + hint?: string | undefined; + default?: ConfigValue | undefined; + validOptions?: readonly number[] | readonly string[] | undefined; + validate?: ((v: unknown) => boolean) | ((v: unknown) => v is ValidValue) | undefined; + description?: string | undefined; + short?: string | undefined; + delim?: string | undefined; + multiple?: boolean | undefined; + type: ConfigType; + }; + }; + /** + * Custom printer for `util.inspect` + */ + [inspect.custom](_: number, options: InspectOptions): string; +} +/** + * Main entry point. Create and return a {@link Jack} object. + */ +export declare const jack: (options?: JackOptions) => Jack<{}>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b83201746f5cc88193aa7ceffb3cc4fda79beacb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EAEd,eAAe,EAChB,MAAM,WAAW,CAAA;AAOlB,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,eAAe,CAAC,SAAS,CAAC,EAC1B,SAAS,CACV,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AACtD,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAA;AAEtE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD,eAAO,MAAM,YAAY,MAAO,OAAO,KAAG,CAAC,IAAI,UAEQ,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,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AC,CAAC;IAItD;;OAEG;IACH,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,EAC/C,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAIrD;;;;OAIG;IACH,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAwEtD;;OAEG;IACH,KAAK,IAAI,MAAM;IAiGf;;OAEG;IACH,aAAa,IAAI,MAAM;IAgIvB;;OAEG;IACH,MAAM;;;;;4BA1qCG,OAAO,KAAK,OAAO,SADnB,OAAO,KAAK,CAAC,IAAI,UAAU,qBAAM;;;;;;;;IAgsC1C;;OAEG;IACH,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc;CAGpD;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,aAAa,WAAW,aAA2B,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..543412746cc8feaaeef830911925518bbd53cadc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js @@ -0,0 +1,947 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.jack = exports.Jack = exports.isConfigOption = exports.isConfigOptionOfType = exports.isConfigType = void 0; +const node_util_1 = require("node:util"); +// it's a tiny API, just cast it inline, it's fine +//@ts-ignore +const cliui_1 = __importDefault(require("@isaacs/cliui")); +const node_path_1 = require("node:path"); +const isConfigType = (t) => typeof t === 'string' && + (t === 'string' || t === 'number' || t === 'boolean'); +exports.isConfigType = isConfigType; +const isValidValue = (v, type, multi) => { + if (multi) { + if (!Array.isArray(v)) + return false; + return !v.some((v) => !isValidValue(v, type, false)); + } + if (Array.isArray(v)) + return false; + return typeof v === type; +}; +const isValidOption = (v, vo) => !!vo && + (Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v)); +/** + * Determine whether an unknown object is a {@link ConfigOption} based only + * on its `type` and `multiple` property + */ +const isConfigOptionOfType = (o, type, multi) => !!o && + typeof o === 'object' && + (0, exports.isConfigType)(o.type) && + o.type === type && + !!o.multiple === multi; +exports.isConfigOptionOfType = isConfigOptionOfType; +/** + * Determine whether an unknown object is a {@link ConfigOption} based on + * it having all valid properties + */ +const isConfigOption = (o, type, multi) => (0, exports.isConfigOptionOfType)(o, type, multi) && + undefOrType(o.short, 'string') && + undefOrType(o.description, 'string') && + undefOrType(o.hint, 'string') && + undefOrType(o.validate, 'function') && + (o.type === 'boolean' ? + o.validOptions === undefined + : undefOrTypeArray(o.validOptions, o.type)) && + (o.default === undefined || isValidValue(o.default, type, multi)); +exports.isConfigOption = isConfigOption; +const isHeading = (r) => r.type === 'heading'; +const isDescription = (r) => r.type === 'description'; +const width = Math.min(process?.stdout?.columns ?? 80, 80); +// indentation spaces from heading level +const indent = (n) => (n - 1) * 2; +const toEnvKey = (pref, key) => [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] + .join(' ') + .trim() + .toUpperCase() + .replace(/ /g, '_'); +const toEnvVal = (value, delim = '\n') => { + const str = typeof value === 'string' ? value + : typeof value === 'boolean' ? + value ? '1' + : '0' + : typeof value === 'number' ? String(value) + : Array.isArray(value) ? + value.map((v) => toEnvVal(v)).join(delim) + : /* c8 ignore start */ undefined; + if (typeof str !== 'string') { + throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`, { cause: { code: 'JACKSPEAK' } }); + } + /* c8 ignore stop */ + return str; +}; +const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple ? + env ? env.split(delim).map(v => fromEnvVal(v, type, false)) + : [] + : type === 'string' ? env + : type === 'boolean' ? env === '1' + : +env.trim()); +const undefOrType = (v, t) => v === undefined || typeof v === t; +const undefOrTypeArray = (v, t) => v === undefined || (Array.isArray(v) && v.every(x => typeof x === t)); +// print the value type, for error message reporting +const valueType = (v) => typeof v === 'string' ? 'string' + : typeof v === 'boolean' ? 'boolean' + : typeof v === 'number' ? 'number' + : Array.isArray(v) ? + `${joinTypes([...new Set(v.map(v => valueType(v)))])}[]` + : `${v.type}${v.multiple ? '[]' : ''}`; +const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' ? + types[0] + : `(${types.join('|')})`; +const validateFieldMeta = (field, fieldMeta) => { + if (fieldMeta) { + if (field.type !== undefined && field.type !== fieldMeta.type) { + throw new TypeError(`invalid type`, { + cause: { + found: field.type, + wanted: [fieldMeta.type, undefined], + }, + }); + } + if (field.multiple !== undefined && + !!field.multiple !== fieldMeta.multiple) { + throw new TypeError(`invalid multiple`, { + cause: { + found: field.multiple, + wanted: [fieldMeta.multiple, undefined], + }, + }); + } + return fieldMeta; + } + if (!(0, exports.isConfigType)(field.type)) { + throw new TypeError(`invalid type`, { + cause: { + found: field.type, + wanted: ['string', 'number', 'boolean'], + }, + }); + } + return { + type: field.type, + multiple: !!field.multiple, + }; +}; +const validateField = (o, type, multiple) => { + const validateValidOptions = (def, validOptions) => { + if (!undefOrTypeArray(validOptions, type)) { + throw new TypeError('invalid validOptions', { + cause: { + found: validOptions, + wanted: valueType({ type, multiple: true }), + }, + }); + } + if (def !== undefined && validOptions !== undefined) { + const valid = Array.isArray(def) ? + def.every(v => validOptions.includes(v)) + : validOptions.includes(def); + if (!valid) { + throw new TypeError('invalid default value not in validOptions', { + cause: { + found: def, + wanted: validOptions, + }, + }); + } + } + }; + if (o.default !== undefined && + !isValidValue(o.default, type, multiple)) { + throw new TypeError('invalid default value', { + cause: { + found: o.default, + wanted: valueType({ type, multiple }), + }, + }); + } + if ((0, exports.isConfigOptionOfType)(o, 'number', false) || + (0, exports.isConfigOptionOfType)(o, 'number', true)) { + validateValidOptions(o.default, o.validOptions); + } + else if ((0, exports.isConfigOptionOfType)(o, 'string', false) || + (0, exports.isConfigOptionOfType)(o, 'string', true)) { + validateValidOptions(o.default, o.validOptions); + } + else if ((0, exports.isConfigOptionOfType)(o, 'boolean', false) || + (0, exports.isConfigOptionOfType)(o, 'boolean', true)) { + if (o.hint !== undefined) { + throw new TypeError('cannot provide hint for flag'); + } + if (o.validOptions !== undefined) { + throw new TypeError('cannot provide validOptions for flag'); + } + } + return o; +}; +const toParseArgsOptionsConfig = (options) => { + return Object.entries(options).reduce((acc, [longOption, o]) => { + const p = { + type: 'string', + multiple: !!o.multiple, + ...(typeof o.short === 'string' ? { short: o.short } : undefined), + }; + const setNoBool = () => { + if (!longOption.startsWith('no-') && !options[`no-${longOption}`]) { + acc[`no-${longOption}`] = { + type: 'boolean', + multiple: !!o.multiple, + }; + } + }; + const setDefault = (def, fn) => { + if (def !== undefined) { + p.default = fn(def); + } + }; + if ((0, exports.isConfigOption)(o, 'number', false)) { + setDefault(o.default, String); + } + else if ((0, exports.isConfigOption)(o, 'number', true)) { + setDefault(o.default, d => d.map(v => String(v))); + } + else if ((0, exports.isConfigOption)(o, 'string', false) || + (0, exports.isConfigOption)(o, 'string', true)) { + setDefault(o.default, v => v); + } + else if ((0, exports.isConfigOption)(o, 'boolean', false) || + (0, exports.isConfigOption)(o, 'boolean', true)) { + p.type = 'boolean'; + setDefault(o.default, v => v); + setNoBool(); + } + acc[longOption] = p; + return acc; + }, {}); +}; +/** + * Class returned by the {@link jack} function and all configuration + * definition methods. This is what gets chained together. + */ +class Jack { + #configSet; + #shorts; + #options; + #fields = []; + #env; + #envPrefix; + #allowPositionals; + #usage; + #usageMarkdown; + constructor(options = {}) { + this.#options = options; + this.#allowPositionals = options.allowPositionals !== false; + this.#env = + this.#options.env === undefined ? process.env : this.#options.env; + this.#envPrefix = options.envPrefix; + // We need to fib a little, because it's always the same object, but it + // starts out as having an empty config set. Then each method that adds + // fields returns `this as Jack` + this.#configSet = Object.create(null); + this.#shorts = Object.create(null); + } + /** + * Resulting definitions, suitable to be passed to Node's `util.parseArgs`, + * but also including `description` and `short` fields, if set. + */ + get definitions() { + return this.#configSet; + } + /** map of `{ : }` strings for each short name defined */ + get shorts() { + return this.#shorts; + } + /** + * options passed to the {@link Jack} constructor + */ + get jackOptions() { + return this.#options; + } + /** + * the data used to generate {@link Jack#usage} and + * {@link Jack#usageMarkdown} content. + */ + get usageFields() { + return this.#fields; + } + /** + * Set the default value (which will still be overridden by env or cli) + * as if from a parsed config file. The optional `source` param, if + * provided, will be included in error messages if a value is invalid or + * unknown. + */ + setConfigValues(values, source = '') { + try { + this.validate(values); + } + catch (er) { + if (source && er instanceof Error) { + /* c8 ignore next */ + const cause = typeof er.cause === 'object' ? er.cause : {}; + er.cause = { ...cause, path: source }; + Error.captureStackTrace(er, this.setConfigValues); + } + throw er; + } + for (const [field, value] of Object.entries(values)) { + const my = this.#configSet[field]; + // already validated, just for TS's benefit + /* c8 ignore start */ + if (!my) { + throw new Error('unexpected field in config set: ' + field, { + cause: { + code: 'JACKSPEAK', + found: field, + }, + }); + } + /* c8 ignore stop */ + my.default = value; + } + return this; + } + /** + * Parse a string of arguments, and return the resulting + * `{ values, positionals }` object. + * + * If an {@link JackOptions#envPrefix} is set, then it will read default + * values from the environment, and write the resulting values back + * to the environment as well. + * + * Environment values always take precedence over any other value, except + * an explicit CLI setting. + */ + parse(args = process.argv) { + this.loadEnvDefaults(); + const p = this.parseRaw(args); + this.applyDefaults(p); + this.writeEnv(p); + return p; + } + loadEnvDefaults() { + if (this.#envPrefix) { + for (const [field, my] of Object.entries(this.#configSet)) { + const ek = toEnvKey(this.#envPrefix, field); + const env = this.#env[ek]; + if (env !== undefined) { + my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); + } + } + } + } + applyDefaults(p) { + for (const [field, c] of Object.entries(this.#configSet)) { + if (c.default !== undefined && !(field in p.values)) { + //@ts-ignore + p.values[field] = c.default; + } + } + } + /** + * Only parse the command line arguments passed in. + * Does not strip off the `node script.js` bits, so it must be just the + * arguments you wish to have parsed. + * Does not read from or write to the environment, or set defaults. + */ + parseRaw(args) { + if (args === process.argv) { + args = args.slice(process._eval !== undefined ? 1 : 2); + } + const result = (0, node_util_1.parseArgs)({ + args, + options: toParseArgsOptionsConfig(this.#configSet), + // always strict, but using our own logic + strict: false, + allowPositionals: this.#allowPositionals, + tokens: true, + }); + const p = { + values: {}, + positionals: [], + }; + for (const token of result.tokens) { + if (token.kind === 'positional') { + p.positionals.push(token.value); + if (this.#options.stopAtPositional || + this.#options.stopAtPositionalTest?.(token.value)) { + p.positionals.push(...args.slice(token.index + 1)); + break; + } + } + else if (token.kind === 'option') { + let value = undefined; + if (token.name.startsWith('no-')) { + const my = this.#configSet[token.name]; + const pname = token.name.substring('no-'.length); + const pos = this.#configSet[pname]; + if (pos && + pos.type === 'boolean' && + (!my || + (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { + value = false; + token.name = pname; + } + } + const my = this.#configSet[token.name]; + if (!my) { + throw new Error(`Unknown option '${token.rawName}'. ` + + `To specify a positional argument starting with a '-', ` + + `place it at the end of the command after '--', as in ` + + `'-- ${token.rawName}'`, { + cause: { + code: 'JACKSPEAK', + found: token.rawName + (token.value ? `=${token.value}` : ''), + }, + }); + } + if (value === undefined) { + if (token.value === undefined) { + if (my.type !== 'boolean') { + throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`, { + cause: { + code: 'JACKSPEAK', + name: token.rawName, + wanted: valueType(my), + }, + }); + } + value = true; + } + else { + if (my.type === 'boolean') { + throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`, { cause: { code: 'JACKSPEAK', found: token } }); + } + if (my.type === 'string') { + value = token.value; + } + else { + value = +token.value; + if (value !== value) { + throw new Error(`Invalid value '${token.value}' provided for ` + + `'${token.rawName}' option, expected number`, { + cause: { + code: 'JACKSPEAK', + name: token.rawName, + found: token.value, + wanted: 'number', + }, + }); + } + } + } + } + if (my.multiple) { + const pv = p.values; + const tn = pv[token.name] ?? []; + pv[token.name] = tn; + tn.push(value); + } + else { + const pv = p.values; + pv[token.name] = value; + } + } + } + for (const [field, value] of Object.entries(p.values)) { + const valid = this.#configSet[field]?.validate; + const validOptions = this.#configSet[field]?.validOptions; + const cause = validOptions && !isValidOption(value, validOptions) ? + { name: field, found: value, validOptions } + : valid && !valid(value) ? { name: field, found: value } + : undefined; + if (cause) { + throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause: { ...cause, code: 'JACKSPEAK' } }); + } + } + return p; + } + /** + * do not set fields as 'no-foo' if 'foo' exists and both are bools + * just set foo. + */ + #noNoFields(f, val, s = f) { + if (!f.startsWith('no-') || typeof val !== 'boolean') + return; + const yes = f.substring('no-'.length); + // recurse so we get the core config key we care about. + this.#noNoFields(yes, val, s); + if (this.#configSet[yes]?.type === 'boolean') { + throw new Error(`do not set '${s}', instead set '${yes}' as desired.`, { cause: { code: 'JACKSPEAK', found: s, wanted: yes } }); + } + } + /** + * Validate that any arbitrary object is a valid configuration `values` + * object. Useful when loading config files or other sources. + */ + validate(o) { + if (!o || typeof o !== 'object') { + throw new Error('Invalid config: not an object', { + cause: { code: 'JACKSPEAK', found: o }, + }); + } + const opts = o; + for (const field in o) { + const value = opts[field]; + /* c8 ignore next - for TS */ + if (value === undefined) + continue; + this.#noNoFields(field, value); + const config = this.#configSet[field]; + if (!config) { + throw new Error(`Unknown config option: ${field}`, { + cause: { code: 'JACKSPEAK', found: field }, + }); + } + if (!isValidValue(value, config.type, !!config.multiple)) { + throw new Error(`Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`, { + cause: { + code: 'JACKSPEAK', + name: field, + found: value, + wanted: valueType(config), + }, + }); + } + const cause = config.validOptions && !isValidOption(value, config.validOptions) ? + { name: field, found: value, validOptions: config.validOptions } + : config.validate && !config.validate(value) ? + { name: field, found: value } + : undefined; + if (cause) { + throw new Error(`Invalid config value for ${field}: ${value}`, { + cause: { ...cause, code: 'JACKSPEAK' }, + }); + } + } + } + writeEnv(p) { + if (!this.#env || !this.#envPrefix) + return; + for (const [field, value] of Object.entries(p.values)) { + const my = this.#configSet[field]; + this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); + } + } + /** + * Add a heading to the usage output banner + */ + heading(text, level, { pre = false } = {}) { + if (level === undefined) { + level = this.#fields.some(r => isHeading(r)) ? 2 : 1; + } + this.#fields.push({ type: 'heading', text, level, pre }); + return this; + } + /** + * Add a long-form description to the usage output at this position. + */ + description(text, { pre } = {}) { + this.#fields.push({ type: 'description', text, pre }); + return this; + } + /** + * Add one or more number fields. + */ + num(fields) { + return this.#addFieldsWith(fields, 'number', false); + } + /** + * Add one or more multiple number fields. + */ + numList(fields) { + return this.#addFieldsWith(fields, 'number', true); + } + /** + * Add one or more string option fields. + */ + opt(fields) { + return this.#addFieldsWith(fields, 'string', false); + } + /** + * Add one or more multiple string option fields. + */ + optList(fields) { + return this.#addFieldsWith(fields, 'string', true); + } + /** + * Add one or more flag fields. + */ + flag(fields) { + return this.#addFieldsWith(fields, 'boolean', false); + } + /** + * Add one or more multiple flag fields. + */ + flagList(fields) { + return this.#addFieldsWith(fields, 'boolean', true); + } + /** + * Generic field definition method. Similar to flag/flagList/number/etc, + * but you must specify the `type` (and optionally `multiple` and `delim`) + * fields on each one, or Jack won't know how to define them. + */ + addFields(fields) { + return this.#addFields(this, fields); + } + #addFieldsWith(fields, type, multiple) { + return this.#addFields(this, fields, { + type, + multiple, + }); + } + #addFields(next, fields, opt) { + Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { + this.#validateName(name, field); + const { type, multiple } = validateFieldMeta(field, opt); + const value = { ...field, type, multiple }; + validateField(value, type, multiple); + next.#fields.push({ type: 'config', name, value }); + return [name, value]; + }))); + return next; + } + #validateName(name, field) { + if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { + throw new TypeError(`Invalid option name: ${name}, ` + + `must be '-' delimited ASCII alphanumeric`); + } + if (this.#configSet[name]) { + throw new TypeError(`Cannot redefine option ${field}`); + } + if (this.#shorts[name]) { + throw new TypeError(`Cannot redefine option ${name}, already ` + + `in use for ${this.#shorts[name]}`); + } + if (field.short) { + if (!/^[a-zA-Z0-9]$/.test(field.short)) { + throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + + 'must be 1 ASCII alphanumeric character'); + } + if (this.#shorts[field.short]) { + throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + + `already in use for ${this.#shorts[field.short]}`); + } + this.#shorts[field.short] = name; + this.#shorts[name] = name; + } + } + /** + * Return the usage banner for the given configuration + */ + usage() { + if (this.#usage) + return this.#usage; + let headingLevel = 1; + //@ts-ignore + const ui = (0, cliui_1.default)({ width }); + const first = this.#fields[0]; + let start = first?.type === 'heading' ? 1 : 0; + if (first?.type === 'heading') { + ui.div({ + padding: [0, 0, 0, 0], + text: normalize(first.text), + }); + } + ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); + if (this.#options.usage) { + ui.div({ + text: this.#options.usage, + padding: [0, 0, 0, 2], + }); + } + else { + const cmd = (0, node_path_1.basename)(String(process.argv[1])); + const shortFlags = []; + const shorts = []; + const flags = []; + const opts = []; + for (const [field, config] of Object.entries(this.#configSet)) { + if (config.short) { + if (config.type === 'boolean') + shortFlags.push(config.short); + else + shorts.push([config.short, config.hint || field]); + } + else { + if (config.type === 'boolean') + flags.push(field); + else + opts.push([field, config.hint || field]); + } + } + const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; + const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const lf = flags.map(k => ` --${k}`).join(''); + const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); + ui.div({ + text: usage, + padding: [0, 0, 0, 2], + }); + } + ui.div({ padding: [0, 0, 0, 0], text: '' }); + const maybeDesc = this.#fields[start]; + if (maybeDesc && isDescription(maybeDesc)) { + const print = normalize(maybeDesc.text, maybeDesc.pre); + start++; + ui.div({ padding: [0, 0, 0, 0], text: print }); + ui.div({ padding: [0, 0, 0, 0], text: '' }); + } + const { rows, maxWidth } = this.#usageRows(start); + // every heading/description after the first gets indented by 2 + // extra spaces. + for (const row of rows) { + if (row.left) { + // If the row is too long, don't wrap it + // Bump the right-hand side down a line to make room + const configIndent = indent(Math.max(headingLevel, 2)); + if (row.left.length > maxWidth - 3) { + ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); + ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); + } + else { + ui.div({ + text: row.left, + padding: [0, 1, 0, configIndent], + width: maxWidth, + }, { padding: [0, 0, 0, 0], text: row.text }); + } + if (row.skipLine) { + ui.div({ padding: [0, 0, 0, 0], text: '' }); + } + } + else { + if (isHeading(row)) { + const { level } = row; + headingLevel = level; + // only h1 and h2 have bottom padding + // h3-h6 do not + const b = level <= 2 ? 1 : 0; + ui.div({ ...row, padding: [0, 0, b, indent(level)] }); + } + else { + ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); + } + } + } + return (this.#usage = ui.toString()); + } + /** + * Return the usage banner markdown for the given configuration + */ + usageMarkdown() { + if (this.#usageMarkdown) + return this.#usageMarkdown; + const out = []; + let headingLevel = 1; + const first = this.#fields[0]; + let start = first?.type === 'heading' ? 1 : 0; + if (first?.type === 'heading') { + out.push(`# ${normalizeOneLine(first.text)}`); + } + out.push('Usage:'); + if (this.#options.usage) { + out.push(normalizeMarkdown(this.#options.usage, true)); + } + else { + const cmd = (0, node_path_1.basename)(String(process.argv[1])); + const shortFlags = []; + const shorts = []; + const flags = []; + const opts = []; + for (const [field, config] of Object.entries(this.#configSet)) { + if (config.short) { + if (config.type === 'boolean') + shortFlags.push(config.short); + else + shorts.push([config.short, config.hint || field]); + } + else { + if (config.type === 'boolean') + flags.push(field); + else + opts.push([field, config.hint || field]); + } + } + const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; + const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const lf = flags.map(k => ` --${k}`).join(''); + const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); + out.push(normalizeMarkdown(usage, true)); + } + const maybeDesc = this.#fields[start]; + if (maybeDesc && isDescription(maybeDesc)) { + out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); + start++; + } + const { rows } = this.#usageRows(start); + // heading level in markdown is number of # ahead of text + for (const row of rows) { + if (row.left) { + out.push('#'.repeat(headingLevel + 1) + + ' ' + + normalizeOneLine(row.left, true)); + if (row.text) + out.push(normalizeMarkdown(row.text)); + } + else if (isHeading(row)) { + const { level } = row; + headingLevel = level; + out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); + } + else { + out.push(normalizeMarkdown(row.text, !!row.pre)); + } + } + return (this.#usageMarkdown = out.join('\n\n') + '\n'); + } + #usageRows(start) { + // turn each config type into a row, and figure out the width of the + // left hand indentation for the option descriptions. + let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); + let maxWidth = 8; + let prev = undefined; + const rows = []; + for (const field of this.#fields.slice(start)) { + if (field.type !== 'config') { + if (prev?.type === 'config') + prev.skipLine = true; + prev = undefined; + field.text = normalize(field.text, !!field.pre); + rows.push(field); + continue; + } + const { value } = field; + const desc = value.description || ''; + const mult = value.multiple ? 'Can be set multiple times' : ''; + const opts = value.validOptions?.length ? + `Valid options:${value.validOptions.map(v => ` ${JSON.stringify(v)}`)}` + : ''; + const dmDelim = desc.includes('\n') ? '\n\n' : '\n'; + const extra = [opts, mult].join(dmDelim).trim(); + const text = (normalize(desc) + dmDelim + extra).trim(); + const hint = value.hint || + (value.type === 'number' ? 'n' + : value.type === 'string' ? field.name + : undefined); + const short = !value.short ? '' + : value.type === 'boolean' ? `-${value.short} ` + : `-${value.short}<${hint}> `; + const left = value.type === 'boolean' ? + `${short}--${field.name}` + : `${short}--${field.name}=<${hint}>`; + const row = { text, left, type: 'config' }; + if (text.length > width - maxMax) { + row.skipLine = true; + } + if (prev && left.length > maxMax) + prev.skipLine = true; + prev = row; + const len = left.length + 4; + if (len > maxWidth && len < maxMax) { + maxWidth = len; + } + rows.push(row); + } + return { rows, maxWidth }; + } + /** + * Return the configuration options as a plain object + */ + toJSON() { + return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ + field, + { + type: def.type, + ...(def.multiple ? { multiple: true } : {}), + ...(def.delim ? { delim: def.delim } : {}), + ...(def.short ? { short: def.short } : {}), + ...(def.description ? + { description: normalize(def.description) } + : {}), + ...(def.validate ? { validate: def.validate } : {}), + ...(def.validOptions ? { validOptions: def.validOptions } : {}), + ...(def.default !== undefined ? { default: def.default } : {}), + ...(def.hint ? { hint: def.hint } : {}), + }, + ])); + } + /** + * Custom printer for `util.inspect` + */ + [node_util_1.inspect.custom](_, options) { + return `Jack ${(0, node_util_1.inspect)(this.toJSON(), options)}`; + } +} +exports.Jack = Jack; +/** + * Main entry point. Create and return a {@link Jack} object. + */ +const jack = (options = {}) => new Jack(options); +exports.jack = jack; +// Unwrap and un-indent, so we can wrap description +// strings however makes them look nice in the code. +const normalize = (s, pre = false) => { + if (pre) + // prepend a ZWSP to each line so cliui doesn't strip it. + return s + .split('\n') + .map(l => `\u200b${l}`) + .join('\n'); + return s + .split(/^\s*```\s*$/gm) + .map((s, i) => { + if (i % 2 === 1) { + if (!s.trim()) { + return `\`\`\`\n\`\`\`\n`; + } + // outdent the ``` blocks, but preserve whitespace otherwise. + const split = s.split('\n'); + // throw out the \n at the start and end + split.pop(); + split.shift(); + const si = split.reduce((shortest, l) => { + /* c8 ignore next */ + const ind = l.match(/^\s*/)?.[0] ?? ''; + if (ind.length) + return Math.min(ind.length, shortest); + else + return shortest; + }, Infinity); + /* c8 ignore next */ + const i = isFinite(si) ? si : 0; + return ('\n```\n' + + split.map(s => `\u200b${s.substring(i)}`).join('\n') + + '\n```\n'); + } + return (s + // remove single line breaks, except for lists + .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) + // normalize mid-line whitespace + .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') + // two line breaks are enough + .replace(/\n{3,}/g, '\n\n') + // remove any spaces at the start of a line + .replace(/\n[ \t]+/g, '\n') + .trim()); + }) + .join('\n'); +}; +// normalize for markdown printing, remove leading spaces on lines +const normalizeMarkdown = (s, pre = false) => { + const n = normalize(s, pre).replace(/\\/g, '\\\\'); + return pre ? + `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` + : n.replace(/\n +/g, '\n').trim(); +}; +const normalizeOneLine = (s, pre = false) => { + const n = normalize(s, pre) + .replace(/[\s\u200b]+/g, ' ') + .trim(); + return pre ? `\`${n}\`` : n; +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bc346f38df4472d53d6f1525b73df412b889ce46 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAKkB;AAElB,kDAAkD;AAClD,YAAY;AACZ,0DAAiC;AACjC,yCAAoC;AAW7B,MAAM,YAAY,GAAG,CAAC,CAAU,EAAmB,EAAE,CAC1D,OAAO,CAAC,KAAK,QAAQ;IACrB,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,QAAQ,IA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EAAE,IAAI,CAAC;aAC1B,IAAI,EAAE,CACV,CAAA;IACH,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;AACf,CAAC,CAAA;AAED,kEAAkE;AAClE,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAU,EAAE;IACpE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAClD,OAAO,GAAG,CAAC,CAAC;QACR,WAAW,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU;QAC/C,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAE,EAAE;IAC3D,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,IAAI,EAAE,CAAA;IACT,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7B,CAAC,CAAA","sourcesContent":["import {\n inspect,\n InspectOptions,\n parseArgs,\n ParseArgsConfig,\n} from 'node:util'\n\n// it's a tiny API, just cast it inline, it's fine\n//@ts-ignore\nimport cliui from '@isaacs/cliui'\nimport { basename } from 'node:path'\n\nexport type ParseArgsOptions = Exclude<\n ParseArgsConfig['options'],\n undefined\n>\nexport type ParseArgsOption = ParseArgsOptions[string]\nexport type ParseArgsDefault = Exclude\n\nexport type ConfigType = 'number' | 'string' | 'boolean'\n\nexport const isConfigType = (t: unknown): t is ConfigType =>\n typeof t === 'string' &&\n (t === 'string' || t === 'number' || t === 'boolean')\n\nexport type ConfigValuePrimitive = string | boolean | number\nexport type ConfigValueArray = string[] | boolean[] | number[]\nexport type ConfigValue = ConfigValuePrimitive | ConfigValueArray\n\n/**\n * Given a Jack object, get the typeof its ConfigSet\n */\nexport type Unwrap = J extends Jack ? C : never\n\n/**\n * Defines the type of value that is valid, given a config definition's\n * {@link ConfigType} and boolean multiple setting\n */\nexport type ValidValue<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n> =\n [T, M] extends ['number', true] ? number[]\n : [T, M] extends ['string', true] ? string[]\n : [T, M] extends ['boolean', true] ? boolean[]\n : [T, M] extends ['number', false] ? number\n : [T, M] extends ['string', false] ? string\n : [T, M] extends ['boolean', false] ? boolean\n : [T, M] extends ['string', boolean] ? string | string[]\n : [T, M] extends ['boolean', boolean] ? boolean | boolean[]\n : [T, M] extends ['number', boolean] ? number | number[]\n : [T, M] extends [ConfigType, false] ? ConfigValuePrimitive\n : [T, M] extends [ConfigType, true] ? ConfigValueArray\n : ConfigValue\n\nconst isValidValue = (\n v: unknown,\n type: T,\n multi: M,\n): v is ValidValue => {\n if (multi) {\n if (!Array.isArray(v)) return false\n return !v.some((v: unknown) => !isValidValue(v, type, false))\n }\n if (Array.isArray(v)) return false\n return typeof v === type\n}\n\nexport type ReadonlyArrays = readonly number[] | readonly string[]\n\n/**\n * Defines the type of validOptions that are valid, given a config definition's\n * {@link ConfigType}\n */\nexport type ValidOptions =\n T extends 'boolean' ? undefined\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : ReadonlyArrays\n\nconst isValidOption = (\n v: unknown,\n vo: readonly unknown[],\n): vo is Exclude, undefined> =>\n !!vo &&\n (Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v))\n\n/**\n * A config field definition, in its full representation.\n * This is what is passed in to addFields so `type` is required.\n */\nexport type ConfigOption<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n O extends undefined | ValidOptions = undefined | ValidOptions,\n> = {\n type: T\n short?: string\n default?: ValidValue &\n (O extends ReadonlyArrays ?\n M extends false ?\n O[number]\n : O[number][]\n : unknown)\n description?: string\n hint?: T extends 'boolean' ? undefined : string\n validate?:\n | ((v: unknown) => v is ValidValue)\n | ((v: unknown) => boolean)\n validOptions?: O\n delim?: M extends false ? undefined : string\n multiple?: M\n}\n\n/**\n * Determine whether an unknown object is a {@link ConfigOption} based only\n * on its `type` and `multiple` property\n */\nexport const isConfigOptionOfType = <\n T extends ConfigType,\n M extends boolean,\n>(\n o: any,\n type: T,\n multi: M,\n): o is ConfigOption =>\n !!o &&\n typeof o === 'object' &&\n isConfigType(o.type) &&\n o.type === type &&\n !!o.multiple === multi\n\n/**\n * Determine whether an unknown object is a {@link ConfigOption} based on\n * it having all valid properties\n */\nexport const isConfigOption = (\n o: any,\n type: T,\n multi: M,\n): o is ConfigOption =>\n isConfigOptionOfType(o, type, multi) &&\n undefOrType(o.short, 'string') &&\n undefOrType(o.description, 'string') &&\n undefOrType(o.hint, 'string') &&\n undefOrType(o.validate, 'function') &&\n (o.type === 'boolean' ?\n o.validOptions === undefined\n : undefOrTypeArray(o.validOptions, o.type)) &&\n (o.default === undefined || isValidValue(o.default, type, multi))\n\n/**\n * The meta information for a config option definition, when the\n * type and multiple values can be inferred by the method being used\n */\nexport type ConfigOptionMeta<\n T extends ConfigType,\n M extends boolean,\n O extends ConfigOption = ConfigOption,\n> = Pick, 'type'> & Omit\n\n/**\n * A set of {@link ConfigOption} objects, referenced by their longOption\n * string values.\n */\nexport type ConfigSet = {\n [longOption: string]: ConfigOption\n}\n\n/**\n * A set of {@link ConfigOptionMeta} fields, referenced by their longOption\n * string values.\n */\nexport type ConfigMetaSet = {\n [longOption: string]: ConfigOptionMeta\n}\n\n/**\n * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet}\n */\nexport type ConfigSetFromMetaSet<\n T extends ConfigType,\n M extends boolean,\n S extends ConfigMetaSet,\n> = S & { [longOption in keyof S]: ConfigOption }\n\n/**\n * The 'values' field returned by {@link Jack#parse}. If a value has\n * a default field it will be required on the object otherwise it is optional.\n */\nexport type OptionsResults = {\n [K in keyof T]:\n | (T[K]['validOptions'] extends ReadonlyArrays ?\n T[K] extends ConfigOption<'string' | 'number', false> ?\n T[K]['validOptions'][number]\n : T[K] extends ConfigOption<'string' | 'number', true> ?\n T[K]['validOptions'][number][]\n : never\n : T[K] extends ConfigOption<'string', false> ? string\n : T[K] extends ConfigOption<'string', true> ? string[]\n : T[K] extends ConfigOption<'number', false> ? number\n : T[K] extends ConfigOption<'number', true> ? number[]\n : T[K] extends ConfigOption<'boolean', false> ? boolean\n : T[K] extends ConfigOption<'boolean', true> ? boolean[]\n : never)\n | (T[K]['default'] extends ConfigValue ? never : undefined)\n}\n\n/**\n * The object retured by {@link Jack#parse}\n */\nexport type Parsed = {\n values: OptionsResults\n positionals: string[]\n}\n\n/**\n * A row used when generating the {@link Jack#usage} string\n */\nexport interface Row {\n left?: string\n text: string\n skipLine?: boolean\n type?: string\n}\n\n/**\n * A heading for a section in the usage, created by the jack.heading()\n * method.\n *\n * First heading is always level 1, subsequent headings default to 2.\n *\n * The level of the nearest heading level sets the indentation of the\n * description that follows.\n */\nexport interface Heading extends Row {\n type: 'heading'\n text: string\n left?: ''\n skipLine?: boolean\n level: number\n pre?: boolean\n}\n\nconst isHeading = (r: { type?: string }): r is Heading =>\n r.type === 'heading'\n\n/**\n * An arbitrary blob of text describing some stuff, set by the\n * jack.description() method.\n *\n * Indentation determined by level of the nearest header.\n */\nexport interface Description extends Row {\n type: 'description'\n text: string\n left?: ''\n skipLine?: boolean\n pre?: boolean\n}\n\nconst isDescription = (r: { type?: string }): r is Description =>\n r.type === 'description'\n\n/**\n * A heading or description row used when generating the {@link Jack#usage}\n * string\n */\nexport type TextRow = Heading | Description\n\n/**\n * Either a {@link TextRow} or a reference to a {@link ConfigOption}\n */\nexport type UsageField =\n | TextRow\n | {\n type: 'config'\n name: string\n value: ConfigOption\n }\n\nconst width = Math.min(process?.stdout?.columns ?? 80, 80)\n\n// indentation spaces from heading level\nconst indent = (n: number) => (n - 1) * 2\n\nconst toEnvKey = (pref: string, key: string): string =>\n [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')]\n .join(' ')\n .trim()\n .toUpperCase()\n .replace(/ /g, '_')\n\nconst toEnvVal = (value: ConfigValue, delim: string = '\\n'): string => {\n const str =\n typeof value === 'string' ? value\n : typeof value === 'boolean' ?\n value ? '1'\n : '0'\n : typeof value === 'number' ? String(value)\n : Array.isArray(value) ?\n value.map((v: ConfigValue) => toEnvVal(v)).join(delim)\n : /* c8 ignore start */ undefined\n if (typeof str !== 'string') {\n throw new Error(\n `could not serialize value to environment: ${JSON.stringify(value)}`,\n { cause: { code: 'JACKSPEAK' } },\n )\n }\n /* c8 ignore stop */\n return str\n}\n\nconst fromEnvVal = (\n env: string,\n type: T,\n multiple: M,\n delim: string = '\\n',\n): ValidValue =>\n (multiple ?\n env ? env.split(delim).map(v => fromEnvVal(v, type, false))\n : []\n : type === 'string' ? env\n : type === 'boolean' ? env === '1'\n : +env.trim()) as ValidValue\n\nconst undefOrType = (v: unknown, t: string): boolean =>\n v === undefined || typeof v === t\n\nconst undefOrTypeArray = (v: unknown, t: string): boolean =>\n v === undefined || (Array.isArray(v) && v.every(x => typeof x === t))\n\n// print the value type, for error message reporting\nconst valueType = (\n v: ConfigValue | { type: ConfigType; multiple?: boolean },\n): string =>\n typeof v === 'string' ? 'string'\n : typeof v === 'boolean' ? 'boolean'\n : typeof v === 'number' ? 'number'\n : Array.isArray(v) ?\n `${joinTypes([...new Set(v.map(v => valueType(v)))])}[]`\n : `${v.type}${v.multiple ? '[]' : ''}`\n\nconst joinTypes = (types: string[]): string =>\n types.length === 1 && typeof types[0] === 'string' ?\n types[0]\n : `(${types.join('|')})`\n\nconst validateFieldMeta = (\n field: ConfigOptionMeta,\n fieldMeta?: { type: T; multiple: M },\n): { type: ConfigType; multiple: boolean } => {\n if (fieldMeta) {\n if (field.type !== undefined && field.type !== fieldMeta.type) {\n throw new TypeError(`invalid type`, {\n cause: {\n found: field.type,\n wanted: [fieldMeta.type, undefined],\n },\n })\n }\n if (\n field.multiple !== undefined &&\n !!field.multiple !== fieldMeta.multiple\n ) {\n throw new TypeError(`invalid multiple`, {\n cause: {\n found: field.multiple,\n wanted: [fieldMeta.multiple, undefined],\n },\n })\n }\n return fieldMeta\n }\n\n if (!isConfigType(field.type)) {\n throw new TypeError(`invalid type`, {\n cause: {\n found: field.type,\n wanted: ['string', 'number', 'boolean'],\n },\n })\n }\n\n return {\n type: field.type,\n multiple: !!field.multiple,\n }\n}\n\nconst validateField = (\n o: ConfigOption,\n type: ConfigType,\n multiple: boolean,\n): ConfigOption => {\n const validateValidOptions = <\n T extends ConfigValue | undefined,\n V extends T extends Array ? U : T,\n >(\n def: T | undefined,\n validOptions: readonly V[] | undefined,\n ) => {\n if (!undefOrTypeArray(validOptions, type)) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: valueType({ type, multiple: true }),\n },\n })\n }\n if (def !== undefined && validOptions !== undefined) {\n const valid =\n Array.isArray(def) ?\n def.every(v => validOptions.includes(v as V))\n : validOptions.includes(def as V)\n if (!valid) {\n throw new TypeError('invalid default value not in validOptions', {\n cause: {\n found: def,\n wanted: validOptions,\n },\n })\n }\n }\n }\n\n if (\n o.default !== undefined &&\n !isValidValue(o.default, type, multiple)\n ) {\n throw new TypeError('invalid default value', {\n cause: {\n found: o.default,\n wanted: valueType({ type, multiple }),\n },\n })\n }\n\n if (\n isConfigOptionOfType(o, 'number', false) ||\n isConfigOptionOfType(o, 'number', true)\n ) {\n validateValidOptions(o.default, o.validOptions)\n } else if (\n isConfigOptionOfType(o, 'string', false) ||\n isConfigOptionOfType(o, 'string', true)\n ) {\n validateValidOptions(o.default, o.validOptions)\n } else if (\n isConfigOptionOfType(o, 'boolean', false) ||\n isConfigOptionOfType(o, 'boolean', true)\n ) {\n if (o.hint !== undefined) {\n throw new TypeError('cannot provide hint for flag')\n }\n if (o.validOptions !== undefined) {\n throw new TypeError('cannot provide validOptions for flag')\n }\n }\n\n return o\n}\n\nconst toParseArgsOptionsConfig = (\n options: ConfigSet,\n): ParseArgsOptions => {\n return Object.entries(options).reduce((acc, [longOption, o]) => {\n const p: ParseArgsOption = {\n type: 'string',\n multiple: !!o.multiple,\n ...(typeof o.short === 'string' ? { short: o.short } : undefined),\n }\n const setNoBool = () => {\n if (!longOption.startsWith('no-') && !options[`no-${longOption}`]) {\n acc[`no-${longOption}`] = {\n type: 'boolean',\n multiple: !!o.multiple,\n }\n }\n }\n const setDefault = (\n def: T | undefined,\n fn: (d: T) => ParseArgsDefault,\n ) => {\n if (def !== undefined) {\n p.default = fn(def)\n }\n }\n if (isConfigOption(o, 'number', false)) {\n setDefault(o.default, String)\n } else if (isConfigOption(o, 'number', true)) {\n setDefault(o.default, d => d.map(v => String(v)))\n } else if (\n isConfigOption(o, 'string', false) ||\n isConfigOption(o, 'string', true)\n ) {\n setDefault(o.default, v => v)\n } else if (\n isConfigOption(o, 'boolean', false) ||\n isConfigOption(o, 'boolean', true)\n ) {\n p.type = 'boolean'\n setDefault(o.default, v => v)\n setNoBool()\n }\n acc[longOption] = p\n return acc\n }, {} as ParseArgsOptions)\n}\n\n/**\n * Options provided to the {@link Jack} constructor\n */\nexport interface JackOptions {\n /**\n * Whether to allow positional arguments\n *\n * @default true\n */\n allowPositionals?: boolean\n\n /**\n * Prefix to use when reading/writing the environment variables\n *\n * If not specified, environment behavior will not be available.\n */\n envPrefix?: string\n\n /**\n * Environment object to read/write. Defaults `process.env`.\n * No effect if `envPrefix` is not set.\n */\n env?: Record\n\n /**\n * A short usage string. If not provided, will be generated from the\n * options provided, but that can of course be rather verbose if\n * there are a lot of options.\n */\n usage?: string\n\n /**\n * Stop parsing flags and opts at the first positional argument.\n * This is to support cases like `cmd [flags] [options]`, where\n * each subcommand may have different options. This effectively treats\n * any positional as a `--` argument. Only relevant if `allowPositionals`\n * is true.\n *\n * To do subcommands, set this option, look at the first positional, and\n * parse the remaining positionals as appropriate.\n *\n * @default false\n */\n stopAtPositional?: boolean\n\n /**\n * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,\n * will be called with each positional argument encountered. If the function\n * returns true, then parsing will stop at that point.\n */\n stopAtPositionalTest?: (arg: string) => boolean\n}\n\n/**\n * Class returned by the {@link jack} function and all configuration\n * definition methods. This is what gets chained together.\n */\nexport class Jack {\n #configSet: C\n #shorts: Record\n #options: JackOptions\n #fields: UsageField[] = []\n #env: Record\n #envPrefix?: string\n #allowPositionals: boolean\n #usage?: string\n #usageMarkdown?: string\n\n constructor(options: JackOptions = {}) {\n this.#options = options\n this.#allowPositionals = options.allowPositionals !== false\n this.#env =\n this.#options.env === undefined ? process.env : this.#options.env\n this.#envPrefix = options.envPrefix\n // We need to fib a little, because it's always the same object, but it\n // starts out as having an empty config set. Then each method that adds\n // fields returns `this as Jack`\n this.#configSet = Object.create(null) as C\n this.#shorts = Object.create(null)\n }\n\n /**\n * Resulting definitions, suitable to be passed to Node's `util.parseArgs`,\n * but also including `description` and `short` fields, if set.\n */\n get definitions(): C {\n return this.#configSet\n }\n\n /** map of `{ : }` strings for each short name defined */\n get shorts() {\n return this.#shorts\n }\n\n /**\n * options passed to the {@link Jack} constructor\n */\n get jackOptions() {\n return this.#options\n }\n\n /**\n * the data used to generate {@link Jack#usage} and\n * {@link Jack#usageMarkdown} content.\n */\n get usageFields() {\n return this.#fields\n }\n\n /**\n * Set the default value (which will still be overridden by env or cli)\n * as if from a parsed config file. The optional `source` param, if\n * provided, will be included in error messages if a value is invalid or\n * unknown.\n */\n setConfigValues(values: Partial>, source = '') {\n try {\n this.validate(values)\n } catch (er) {\n if (source && er instanceof Error) {\n /* c8 ignore next */\n const cause = typeof er.cause === 'object' ? er.cause : {}\n er.cause = { ...cause, path: source }\n Error.captureStackTrace(er, this.setConfigValues)\n }\n throw er\n }\n for (const [field, value] of Object.entries(values)) {\n const my = this.#configSet[field]\n // already validated, just for TS's benefit\n /* c8 ignore start */\n if (!my) {\n throw new Error('unexpected field in config set: ' + field, {\n cause: {\n code: 'JACKSPEAK',\n found: field,\n },\n })\n }\n /* c8 ignore stop */\n my.default = value as ConfigValue\n }\n return this\n }\n\n /**\n * Parse a string of arguments, and return the resulting\n * `{ values, positionals }` object.\n *\n * If an {@link JackOptions#envPrefix} is set, then it will read default\n * values from the environment, and write the resulting values back\n * to the environment as well.\n *\n * Environment values always take precedence over any other value, except\n * an explicit CLI setting.\n */\n parse(args: string[] = process.argv): Parsed {\n this.loadEnvDefaults()\n const p = this.parseRaw(args)\n this.applyDefaults(p)\n this.writeEnv(p)\n return p\n }\n\n loadEnvDefaults() {\n if (this.#envPrefix) {\n for (const [field, my] of Object.entries(this.#configSet)) {\n const ek = toEnvKey(this.#envPrefix, field)\n const env = this.#env[ek]\n if (env !== undefined) {\n my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim)\n }\n }\n }\n }\n\n applyDefaults(p: Parsed) {\n for (const [field, c] of Object.entries(this.#configSet)) {\n if (c.default !== undefined && !(field in p.values)) {\n //@ts-ignore\n p.values[field] = c.default\n }\n }\n }\n\n /**\n * Only parse the command line arguments passed in.\n * Does not strip off the `node script.js` bits, so it must be just the\n * arguments you wish to have parsed.\n * Does not read from or write to the environment, or set defaults.\n */\n parseRaw(args: string[]): Parsed {\n if (args === process.argv) {\n args = args.slice(\n (process as { _eval?: string })._eval !== undefined ? 1 : 2,\n )\n }\n\n const result = parseArgs({\n args,\n options: toParseArgsOptionsConfig(this.#configSet),\n // always strict, but using our own logic\n strict: false,\n allowPositionals: this.#allowPositionals,\n tokens: true,\n })\n\n const p: Parsed = {\n values: {} as OptionsResults,\n positionals: [],\n }\n for (const token of result.tokens) {\n if (token.kind === 'positional') {\n p.positionals.push(token.value)\n if (\n this.#options.stopAtPositional ||\n this.#options.stopAtPositionalTest?.(token.value)\n ) {\n p.positionals.push(...args.slice(token.index + 1))\n break\n }\n } else if (token.kind === 'option') {\n let value: ConfigValue | undefined = undefined\n if (token.name.startsWith('no-')) {\n const my = this.#configSet[token.name]\n const pname = token.name.substring('no-'.length)\n const pos = this.#configSet[pname]\n if (\n pos &&\n pos.type === 'boolean' &&\n (!my ||\n (my.type === 'boolean' && !!my.multiple === !!pos.multiple))\n ) {\n value = false\n token.name = pname\n }\n }\n const my = this.#configSet[token.name]\n if (!my) {\n throw new Error(\n `Unknown option '${token.rawName}'. ` +\n `To specify a positional argument starting with a '-', ` +\n `place it at the end of the command after '--', as in ` +\n `'-- ${token.rawName}'`,\n {\n cause: {\n code: 'JACKSPEAK',\n found:\n token.rawName + (token.value ? `=${token.value}` : ''),\n },\n },\n )\n }\n if (value === undefined) {\n if (token.value === undefined) {\n if (my.type !== 'boolean') {\n throw new Error(\n `No value provided for ${token.rawName}, expected ${my.type}`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: token.rawName,\n wanted: valueType(my),\n },\n },\n )\n }\n value = true\n } else {\n if (my.type === 'boolean') {\n throw new Error(\n `Flag ${token.rawName} does not take a value, received '${token.value}'`,\n { cause: { code: 'JACKSPEAK', found: token } },\n )\n }\n if (my.type === 'string') {\n value = token.value\n } else {\n value = +token.value\n if (value !== value) {\n throw new Error(\n `Invalid value '${token.value}' provided for ` +\n `'${token.rawName}' option, expected number`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: token.rawName,\n found: token.value,\n wanted: 'number',\n },\n },\n )\n }\n }\n }\n }\n if (my.multiple) {\n const pv = p.values as Record\n const tn = pv[token.name] ?? []\n pv[token.name] = tn\n tn.push(value)\n } else {\n const pv = p.values as Record\n pv[token.name] = value\n }\n }\n }\n\n for (const [field, value] of Object.entries(p.values)) {\n const valid = this.#configSet[field]?.validate\n const validOptions = this.#configSet[field]?.validOptions\n const cause =\n validOptions && !isValidOption(value, validOptions) ?\n { name: field, found: value, validOptions }\n : valid && !valid(value) ? { name: field, found: value }\n : undefined\n if (cause) {\n throw new Error(\n `Invalid value provided for --${field}: ${JSON.stringify(value)}`,\n { cause: { ...cause, code: 'JACKSPEAK' } },\n )\n }\n }\n\n return p\n }\n\n /**\n * do not set fields as 'no-foo' if 'foo' exists and both are bools\n * just set foo.\n */\n #noNoFields(f: string, val: unknown, s: string = f) {\n if (!f.startsWith('no-') || typeof val !== 'boolean') return\n const yes = f.substring('no-'.length)\n // recurse so we get the core config key we care about.\n this.#noNoFields(yes, val, s)\n if (this.#configSet[yes]?.type === 'boolean') {\n throw new Error(\n `do not set '${s}', instead set '${yes}' as desired.`,\n { cause: { code: 'JACKSPEAK', found: s, wanted: yes } },\n )\n }\n }\n\n /**\n * Validate that any arbitrary object is a valid configuration `values`\n * object. Useful when loading config files or other sources.\n */\n validate(o: unknown): asserts o is Parsed['values'] {\n if (!o || typeof o !== 'object') {\n throw new Error('Invalid config: not an object', {\n cause: { code: 'JACKSPEAK', found: o },\n })\n }\n const opts = o as Record\n for (const field in o) {\n const value = opts[field]\n /* c8 ignore next - for TS */\n if (value === undefined) continue\n this.#noNoFields(field, value)\n const config = this.#configSet[field]\n if (!config) {\n throw new Error(`Unknown config option: ${field}`, {\n cause: { code: 'JACKSPEAK', found: field },\n })\n }\n if (!isValidValue(value, config.type, !!config.multiple)) {\n throw new Error(\n `Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: field,\n found: value,\n wanted: valueType(config),\n },\n },\n )\n }\n const cause =\n config.validOptions && !isValidOption(value, config.validOptions) ?\n { name: field, found: value, validOptions: config.validOptions }\n : config.validate && !config.validate(value) ?\n { name: field, found: value }\n : undefined\n if (cause) {\n throw new Error(`Invalid config value for ${field}: ${value}`, {\n cause: { ...cause, code: 'JACKSPEAK' },\n })\n }\n }\n }\n\n writeEnv(p: Parsed) {\n if (!this.#env || !this.#envPrefix) return\n for (const [field, value] of Object.entries(p.values)) {\n const my = this.#configSet[field]\n this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(\n value as ConfigValue,\n my?.delim,\n )\n }\n }\n\n /**\n * Add a heading to the usage output banner\n */\n heading(\n text: string,\n level?: 1 | 2 | 3 | 4 | 5 | 6,\n { pre = false }: { pre?: boolean } = {},\n ): Jack {\n if (level === undefined) {\n level = this.#fields.some(r => isHeading(r)) ? 2 : 1\n }\n this.#fields.push({ type: 'heading', text, level, pre })\n return this\n }\n\n /**\n * Add a long-form description to the usage output at this position.\n */\n description(text: string, { pre }: { pre?: boolean } = {}): Jack {\n this.#fields.push({ type: 'description', text, pre })\n return this\n }\n\n /**\n * Add one or more number fields.\n */\n num>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'number', false)\n }\n\n /**\n * Add one or more multiple number fields.\n */\n numList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'number', true)\n }\n\n /**\n * Add one or more string option fields.\n */\n opt>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'string', false)\n }\n\n /**\n * Add one or more multiple string option fields.\n */\n optList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'string', true)\n }\n\n /**\n * Add one or more flag fields.\n */\n flag>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'boolean', false)\n }\n\n /**\n * Add one or more multiple flag fields.\n */\n flagList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'boolean', true)\n }\n\n /**\n * Generic field definition method. Similar to flag/flagList/number/etc,\n * but you must specify the `type` (and optionally `multiple` and `delim`)\n * fields on each one, or Jack won't know how to define them.\n */\n addFields(fields: F): Jack {\n return this.#addFields(this as unknown as Jack, fields)\n }\n\n #addFieldsWith<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n O extends ConfigSetFromMetaSet,\n >(fields: F, type: ConfigType, multiple: boolean): Jack {\n return this.#addFields(this as unknown as Jack, fields, {\n type,\n multiple,\n })\n }\n\n #addFields<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n O extends Jack,\n >(next: O, fields: F, opt?: { type: T; multiple: M }): O {\n Object.assign(\n next.#configSet,\n Object.fromEntries(\n Object.entries(fields).map(([name, field]) => {\n this.#validateName(name, field)\n const { type, multiple } = validateFieldMeta(field, opt)\n const value = { ...field, type, multiple }\n validateField(value, type, multiple)\n next.#fields.push({ type: 'config', name, value })\n return [name, value]\n }),\n ),\n )\n return next\n }\n\n #validateName(name: string, field: { short?: string }) {\n if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) {\n throw new TypeError(\n `Invalid option name: ${name}, ` +\n `must be '-' delimited ASCII alphanumeric`,\n )\n }\n if (this.#configSet[name]) {\n throw new TypeError(`Cannot redefine option ${field}`)\n }\n if (this.#shorts[name]) {\n throw new TypeError(\n `Cannot redefine option ${name}, already ` +\n `in use for ${this.#shorts[name]}`,\n )\n }\n if (field.short) {\n if (!/^[a-zA-Z0-9]$/.test(field.short)) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n 'must be 1 ASCII alphanumeric character',\n )\n }\n if (this.#shorts[field.short]) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n `already in use for ${this.#shorts[field.short]}`,\n )\n }\n this.#shorts[field.short] = name\n this.#shorts[name] = name\n }\n }\n\n /**\n * Return the usage banner for the given configuration\n */\n usage(): string {\n if (this.#usage) return this.#usage\n\n let headingLevel = 1\n //@ts-ignore\n const ui = cliui({ width })\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n ui.div({\n padding: [0, 0, 0, 0],\n text: normalize(first.text),\n })\n }\n ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' })\n if (this.#options.usage) {\n ui.div({\n text: this.#options.usage,\n padding: [0, 0, 0, 2],\n })\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n ui.div({\n text: usage,\n padding: [0, 0, 0, 2],\n })\n }\n\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n const print = normalize(maybeDesc.text, maybeDesc.pre)\n start++\n ui.div({ padding: [0, 0, 0, 0], text: print })\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n\n const { rows, maxWidth } = this.#usageRows(start)\n\n // every heading/description after the first gets indented by 2\n // extra spaces.\n for (const row of rows) {\n if (row.left) {\n // If the row is too long, don't wrap it\n // Bump the right-hand side down a line to make room\n const configIndent = indent(Math.max(headingLevel, 2))\n if (row.left.length > maxWidth - 3) {\n ui.div({ text: row.left, padding: [0, 0, 0, configIndent] })\n ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] })\n } else {\n ui.div(\n {\n text: row.left,\n padding: [0, 1, 0, configIndent],\n width: maxWidth,\n },\n { padding: [0, 0, 0, 0], text: row.text },\n )\n }\n if (row.skipLine) {\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n } else {\n if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n // only h1 and h2 have bottom padding\n // h3-h6 do not\n const b = level <= 2 ? 1 : 0\n ui.div({ ...row, padding: [0, 0, b, indent(level)] })\n } else {\n ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] })\n }\n }\n }\n\n return (this.#usage = ui.toString())\n }\n\n /**\n * Return the usage banner markdown for the given configuration\n */\n usageMarkdown(): string {\n if (this.#usageMarkdown) return this.#usageMarkdown\n\n const out: string[] = []\n\n let headingLevel = 1\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n out.push(`# ${normalizeOneLine(first.text)}`)\n }\n out.push('Usage:')\n if (this.#options.usage) {\n out.push(normalizeMarkdown(this.#options.usage, true))\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n out.push(normalizeMarkdown(usage, true))\n }\n\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre))\n start++\n }\n\n const { rows } = this.#usageRows(start)\n\n // heading level in markdown is number of # ahead of text\n for (const row of rows) {\n if (row.left) {\n out.push(\n '#'.repeat(headingLevel + 1) +\n ' ' +\n normalizeOneLine(row.left, true),\n )\n if (row.text) out.push(normalizeMarkdown(row.text))\n } else if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n out.push(\n `${'#'.repeat(headingLevel)} ${normalizeOneLine(\n row.text,\n row.pre,\n )}`,\n )\n } else {\n out.push(normalizeMarkdown(row.text, !!(row as Description).pre))\n }\n }\n\n return (this.#usageMarkdown = out.join('\\n\\n') + '\\n')\n }\n\n #usageRows(start: number) {\n // turn each config type into a row, and figure out the width of the\n // left hand indentation for the option descriptions.\n let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3)))\n let maxWidth = 8\n let prev: Row | TextRow | undefined = undefined\n const rows: (Row | TextRow)[] = []\n for (const field of this.#fields.slice(start)) {\n if (field.type !== 'config') {\n if (prev?.type === 'config') prev.skipLine = true\n prev = undefined\n field.text = normalize(field.text, !!field.pre)\n rows.push(field)\n continue\n }\n const { value } = field\n const desc = value.description || ''\n const mult = value.multiple ? 'Can be set multiple times' : ''\n const opts =\n value.validOptions?.length ?\n `Valid options:${value.validOptions.map(\n v => ` ${JSON.stringify(v)}`,\n )}`\n : ''\n const dmDelim = desc.includes('\\n') ? '\\n\\n' : '\\n'\n const extra = [opts, mult].join(dmDelim).trim()\n const text = (normalize(desc) + dmDelim + extra).trim()\n const hint =\n value.hint ||\n (value.type === 'number' ? 'n'\n : value.type === 'string' ? field.name\n : undefined)\n const short =\n !value.short ? ''\n : value.type === 'boolean' ? `-${value.short} `\n : `-${value.short}<${hint}> `\n const left =\n value.type === 'boolean' ?\n `${short}--${field.name}`\n : `${short}--${field.name}=<${hint}>`\n const row: Row = { text, left, type: 'config' }\n if (text.length > width - maxMax) {\n row.skipLine = true\n }\n if (prev && left.length > maxMax) prev.skipLine = true\n prev = row\n const len = left.length + 4\n if (len > maxWidth && len < maxMax) {\n maxWidth = len\n }\n\n rows.push(row)\n }\n\n return { rows, maxWidth }\n }\n\n /**\n * Return the configuration options as a plain object\n */\n toJSON() {\n return Object.fromEntries(\n Object.entries(this.#configSet).map(([field, def]) => [\n field,\n {\n type: def.type,\n ...(def.multiple ? { multiple: true } : {}),\n ...(def.delim ? { delim: def.delim } : {}),\n ...(def.short ? { short: def.short } : {}),\n ...(def.description ?\n { description: normalize(def.description) }\n : {}),\n ...(def.validate ? { validate: def.validate } : {}),\n ...(def.validOptions ? { validOptions: def.validOptions } : {}),\n ...(def.default !== undefined ? { default: def.default } : {}),\n ...(def.hint ? { hint: def.hint } : {}),\n },\n ]),\n )\n }\n\n /**\n * Custom printer for `util.inspect`\n */\n [inspect.custom](_: number, options: InspectOptions) {\n return `Jack ${inspect(this.toJSON(), options)}`\n }\n}\n\n/**\n * Main entry point. Create and return a {@link Jack} object.\n */\nexport const jack = (options: JackOptions = {}) => new Jack(options)\n\n// Unwrap and un-indent, so we can wrap description\n// strings however makes them look nice in the code.\nconst normalize = (s: string, pre = false) => {\n if (pre)\n // prepend a ZWSP to each line so cliui doesn't strip it.\n return s\n .split('\\n')\n .map(l => `\\u200b${l}`)\n .join('\\n')\n return s\n .split(/^\\s*```\\s*$/gm)\n .map((s, i) => {\n if (i % 2 === 1) {\n if (!s.trim()) {\n return `\\`\\`\\`\\n\\`\\`\\`\\n`\n }\n // outdent the ``` blocks, but preserve whitespace otherwise.\n const split = s.split('\\n')\n // throw out the \\n at the start and end\n split.pop()\n split.shift()\n const si = split.reduce((shortest, l) => {\n /* c8 ignore next */\n const ind = l.match(/^\\s*/)?.[0] ?? ''\n if (ind.length) return Math.min(ind.length, shortest)\n else return shortest\n }, Infinity)\n /* c8 ignore next */\n const i = isFinite(si) ? si : 0\n return (\n '\\n```\\n' +\n split.map(s => `\\u200b${s.substring(i)}`).join('\\n') +\n '\\n```\\n'\n )\n }\n return (\n s\n // remove single line breaks, except for lists\n .replace(/([^\\n])\\n[ \\t]*([^\\n])/g, (_, $1, $2) =>\n !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\\n${$2}`,\n )\n // normalize mid-line whitespace\n .replace(/([^\\n])[ \\t]+([^\\n])/g, '$1 $2')\n // two line breaks are enough\n .replace(/\\n{3,}/g, '\\n\\n')\n // remove any spaces at the start of a line\n .replace(/\\n[ \\t]+/g, '\\n')\n .trim()\n )\n })\n .join('\\n')\n}\n\n// normalize for markdown printing, remove leading spaces on lines\nconst normalizeMarkdown = (s: string, pre: boolean = false): string => {\n const n = normalize(s, pre).replace(/\\\\/g, '\\\\\\\\')\n return pre ?\n `\\`\\`\\`\\n${n.replace(/\\u200b/g, '')}\\n\\`\\`\\``\n : n.replace(/\\n +/g, '\\n').trim()\n}\n\nconst normalizeOneLine = (s: string, pre: boolean = false) => {\n const n = normalize(s, pre)\n .replace(/[\\s\\u200b]+/g, ' ')\n .trim()\n return pre ? `\\`${n}\\`` : n\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed913d54fa30cce60d366bc94792f8ad8745d71e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts @@ -0,0 +1,323 @@ +import { inspect, InspectOptions, ParseArgsConfig } from 'node:util'; +export type ParseArgsOptions = Exclude; +export type ParseArgsOption = ParseArgsOptions[string]; +export type ParseArgsDefault = Exclude; +export type ConfigType = 'number' | 'string' | 'boolean'; +export declare const isConfigType: (t: unknown) => t is ConfigType; +export type ConfigValuePrimitive = string | boolean | number; +export type ConfigValueArray = string[] | boolean[] | number[]; +export type ConfigValue = ConfigValuePrimitive | ConfigValueArray; +/** + * Given a Jack object, get the typeof its ConfigSet + */ +export type Unwrap = J extends Jack ? C : never; +/** + * Defines the type of value that is valid, given a config definition's + * {@link ConfigType} and boolean multiple setting + */ +export type ValidValue = [ + T, + M +] extends ['number', true] ? number[] : [T, M] extends ['string', true] ? string[] : [T, M] extends ['boolean', true] ? boolean[] : [T, M] extends ['number', false] ? number : [T, M] extends ['string', false] ? string : [T, M] extends ['boolean', false] ? boolean : [T, M] extends ['string', boolean] ? string | string[] : [T, M] extends ['boolean', boolean] ? boolean | boolean[] : [T, M] extends ['number', boolean] ? number | number[] : [T, M] extends [ConfigType, false] ? ConfigValuePrimitive : [T, M] extends [ConfigType, true] ? ConfigValueArray : ConfigValue; +export type ReadonlyArrays = readonly number[] | readonly string[]; +/** + * Defines the type of validOptions that are valid, given a config definition's + * {@link ConfigType} + */ +export type ValidOptions = T extends 'boolean' ? undefined : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : ReadonlyArrays; +/** + * A config field definition, in its full representation. + * This is what is passed in to addFields so `type` is required. + */ +export type ConfigOption = undefined | ValidOptions> = { + type: T; + short?: string; + default?: ValidValue & (O extends ReadonlyArrays ? M extends false ? O[number] : O[number][] : unknown); + description?: string; + hint?: T extends 'boolean' ? undefined : string; + validate?: ((v: unknown) => v is ValidValue) | ((v: unknown) => boolean); + validOptions?: O; + delim?: M extends false ? undefined : string; + multiple?: M; +}; +/** + * Determine whether an unknown object is a {@link ConfigOption} based only + * on its `type` and `multiple` property + */ +export declare const isConfigOptionOfType: (o: any, type: T, multi: M) => o is ConfigOption; +/** + * Determine whether an unknown object is a {@link ConfigOption} based on + * it having all valid properties + */ +export declare const isConfigOption: (o: any, type: T, multi: M) => o is ConfigOption; +/** + * The meta information for a config option definition, when the + * type and multiple values can be inferred by the method being used + */ +export type ConfigOptionMeta = ConfigOption> = Pick, 'type'> & Omit; +/** + * A set of {@link ConfigOption} objects, referenced by their longOption + * string values. + */ +export type ConfigSet = { + [longOption: string]: ConfigOption; +}; +/** + * A set of {@link ConfigOptionMeta} fields, referenced by their longOption + * string values. + */ +export type ConfigMetaSet = { + [longOption: string]: ConfigOptionMeta; +}; +/** + * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet} + */ +export type ConfigSetFromMetaSet> = S & { + [longOption in keyof S]: ConfigOption; +}; +/** + * The 'values' field returned by {@link Jack#parse}. If a value has + * a default field it will be required on the object otherwise it is optional. + */ +export type OptionsResults = { + [K in keyof T]: (T[K]['validOptions'] extends ReadonlyArrays ? T[K] extends ConfigOption<'string' | 'number', false> ? T[K]['validOptions'][number] : T[K] extends ConfigOption<'string' | 'number', true> ? T[K]['validOptions'][number][] : never : T[K] extends ConfigOption<'string', false> ? string : T[K] extends ConfigOption<'string', true> ? string[] : T[K] extends ConfigOption<'number', false> ? number : T[K] extends ConfigOption<'number', true> ? number[] : T[K] extends ConfigOption<'boolean', false> ? boolean : T[K] extends ConfigOption<'boolean', true> ? boolean[] : never) | (T[K]['default'] extends ConfigValue ? never : undefined); +}; +/** + * The object retured by {@link Jack#parse} + */ +export type Parsed = { + values: OptionsResults; + positionals: string[]; +}; +/** + * A row used when generating the {@link Jack#usage} string + */ +export interface Row { + left?: string; + text: string; + skipLine?: boolean; + type?: string; +} +/** + * A heading for a section in the usage, created by the jack.heading() + * method. + * + * First heading is always level 1, subsequent headings default to 2. + * + * The level of the nearest heading level sets the indentation of the + * description that follows. + */ +export interface Heading extends Row { + type: 'heading'; + text: string; + left?: ''; + skipLine?: boolean; + level: number; + pre?: boolean; +} +/** + * An arbitrary blob of text describing some stuff, set by the + * jack.description() method. + * + * Indentation determined by level of the nearest header. + */ +export interface Description extends Row { + type: 'description'; + text: string; + left?: ''; + skipLine?: boolean; + pre?: boolean; +} +/** + * A heading or description row used when generating the {@link Jack#usage} + * string + */ +export type TextRow = Heading | Description; +/** + * Either a {@link TextRow} or a reference to a {@link ConfigOption} + */ +export type UsageField = TextRow | { + type: 'config'; + name: string; + value: ConfigOption; +}; +/** + * Options provided to the {@link Jack} constructor + */ +export interface JackOptions { + /** + * Whether to allow positional arguments + * + * @default true + */ + allowPositionals?: boolean; + /** + * Prefix to use when reading/writing the environment variables + * + * If not specified, environment behavior will not be available. + */ + envPrefix?: string; + /** + * Environment object to read/write. Defaults `process.env`. + * No effect if `envPrefix` is not set. + */ + env?: Record; + /** + * A short usage string. If not provided, will be generated from the + * options provided, but that can of course be rather verbose if + * there are a lot of options. + */ + usage?: string; + /** + * Stop parsing flags and opts at the first positional argument. + * This is to support cases like `cmd [flags] [options]`, where + * each subcommand may have different options. This effectively treats + * any positional as a `--` argument. Only relevant if `allowPositionals` + * is true. + * + * To do subcommands, set this option, look at the first positional, and + * parse the remaining positionals as appropriate. + * + * @default false + */ + stopAtPositional?: boolean; + /** + * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function, + * will be called with each positional argument encountered. If the function + * returns true, then parsing will stop at that point. + */ + stopAtPositionalTest?: (arg: string) => boolean; +} +/** + * Class returned by the {@link jack} function and all configuration + * definition methods. This is what gets chained together. + */ +export declare class Jack { + #private; + constructor(options?: JackOptions); + /** + * Resulting definitions, suitable to be passed to Node's `util.parseArgs`, + * but also including `description` and `short` fields, if set. + */ + get definitions(): C; + /** map of `{ : }` strings for each short name defined */ + get shorts(): Record; + /** + * options passed to the {@link Jack} constructor + */ + get jackOptions(): JackOptions; + /** + * the data used to generate {@link Jack#usage} and + * {@link Jack#usageMarkdown} content. + */ + get usageFields(): UsageField[]; + /** + * Set the default value (which will still be overridden by env or cli) + * as if from a parsed config file. The optional `source` param, if + * provided, will be included in error messages if a value is invalid or + * unknown. + */ + setConfigValues(values: Partial>, source?: string): this; + /** + * Parse a string of arguments, and return the resulting + * `{ values, positionals }` object. + * + * If an {@link JackOptions#envPrefix} is set, then it will read default + * values from the environment, and write the resulting values back + * to the environment as well. + * + * Environment values always take precedence over any other value, except + * an explicit CLI setting. + */ + parse(args?: string[]): Parsed; + loadEnvDefaults(): void; + applyDefaults(p: Parsed): void; + /** + * Only parse the command line arguments passed in. + * Does not strip off the `node script.js` bits, so it must be just the + * arguments you wish to have parsed. + * Does not read from or write to the environment, or set defaults. + */ + parseRaw(args: string[]): Parsed; + /** + * Validate that any arbitrary object is a valid configuration `values` + * object. Useful when loading config files or other sources. + */ + validate(o: unknown): asserts o is Parsed['values']; + writeEnv(p: Parsed): void; + /** + * Add a heading to the usage output banner + */ + heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6, { pre }?: { + pre?: boolean; + }): Jack; + /** + * Add a long-form description to the usage output at this position. + */ + description(text: string, { pre }?: { + pre?: boolean; + }): Jack; + /** + * Add one or more number fields. + */ + num>(fields: F): Jack>; + /** + * Add one or more multiple number fields. + */ + numList>(fields: F): Jack>; + /** + * Add one or more string option fields. + */ + opt>(fields: F): Jack>; + /** + * Add one or more multiple string option fields. + */ + optList>(fields: F): Jack>; + /** + * Add one or more flag fields. + */ + flag>(fields: F): Jack>; + /** + * Add one or more multiple flag fields. + */ + flagList>(fields: F): Jack>; + /** + * Generic field definition method. Similar to flag/flagList/number/etc, + * but you must specify the `type` (and optionally `multiple` and `delim`) + * fields on each one, or Jack won't know how to define them. + */ + addFields(fields: F): Jack; + /** + * Return the usage banner for the given configuration + */ + usage(): string; + /** + * Return the usage banner markdown for the given configuration + */ + usageMarkdown(): string; + /** + * Return the configuration options as a plain object + */ + toJSON(): { + [k: string]: { + hint?: string | undefined; + default?: ConfigValue | undefined; + validOptions?: readonly number[] | readonly string[] | undefined; + validate?: ((v: unknown) => boolean) | ((v: unknown) => v is ValidValue) | undefined; + description?: string | undefined; + short?: string | undefined; + delim?: string | undefined; + multiple?: boolean | undefined; + type: ConfigType; + }; + }; + /** + * Custom printer for `util.inspect` + */ + [inspect.custom](_: number, options: InspectOptions): string; +} +/** + * Main entry point. Create and return a {@link Jack} object. + */ +export declare const jack: (options?: JackOptions) => Jack<{}>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b83201746f5cc88193aa7ceffb3cc4fda79beacb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA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/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b959f5126423c0701982c782cf15ef118341ba53 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.js @@ -0,0 +1,936 @@ +import { inspect, parseArgs, } from 'node:util'; +// it's a tiny API, just cast it inline, it's fine +//@ts-ignore +import cliui from '@isaacs/cliui'; +import { basename } from 'node:path'; +export const isConfigType = (t) => typeof t === 'string' && + (t === 'string' || t === 'number' || t === 'boolean'); +const isValidValue = (v, type, multi) => { + if (multi) { + if (!Array.isArray(v)) + return false; + return !v.some((v) => !isValidValue(v, type, false)); + } + if (Array.isArray(v)) + return false; + return typeof v === type; +}; +const isValidOption = (v, vo) => !!vo && + (Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v)); +/** + * Determine whether an unknown object is a {@link ConfigOption} based only + * on its `type` and `multiple` property + */ +export const isConfigOptionOfType = (o, type, multi) => !!o && + typeof o === 'object' && + isConfigType(o.type) && + o.type === type && + !!o.multiple === multi; +/** + * Determine whether an unknown object is a {@link ConfigOption} based on + * it having all valid properties + */ +export const isConfigOption = (o, type, multi) => isConfigOptionOfType(o, type, multi) && + undefOrType(o.short, 'string') && + undefOrType(o.description, 'string') && + undefOrType(o.hint, 'string') && + undefOrType(o.validate, 'function') && + (o.type === 'boolean' ? + o.validOptions === undefined + : undefOrTypeArray(o.validOptions, o.type)) && + (o.default === undefined || isValidValue(o.default, type, multi)); +const isHeading = (r) => r.type === 'heading'; +const isDescription = (r) => r.type === 'description'; +const width = Math.min(process?.stdout?.columns ?? 80, 80); +// indentation spaces from heading level +const indent = (n) => (n - 1) * 2; +const toEnvKey = (pref, key) => [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] + .join(' ') + .trim() + .toUpperCase() + .replace(/ /g, '_'); +const toEnvVal = (value, delim = '\n') => { + const str = typeof value === 'string' ? value + : typeof value === 'boolean' ? + value ? '1' + : '0' + : typeof value === 'number' ? String(value) + : Array.isArray(value) ? + value.map((v) => toEnvVal(v)).join(delim) + : /* c8 ignore start */ undefined; + if (typeof str !== 'string') { + throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`, { cause: { code: 'JACKSPEAK' } }); + } + /* c8 ignore stop */ + return str; +}; +const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple ? + env ? env.split(delim).map(v => fromEnvVal(v, type, false)) + : [] + : type === 'string' ? env + : type === 'boolean' ? env === '1' + : +env.trim()); +const undefOrType = (v, t) => v === undefined || typeof v === t; +const undefOrTypeArray = (v, t) => v === undefined || (Array.isArray(v) && v.every(x => typeof x === t)); +// print the value type, for error message reporting +const valueType = (v) => typeof v === 'string' ? 'string' + : typeof v === 'boolean' ? 'boolean' + : typeof v === 'number' ? 'number' + : Array.isArray(v) ? + `${joinTypes([...new Set(v.map(v => valueType(v)))])}[]` + : `${v.type}${v.multiple ? '[]' : ''}`; +const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' ? + types[0] + : `(${types.join('|')})`; +const validateFieldMeta = (field, fieldMeta) => { + if (fieldMeta) { + if (field.type !== undefined && field.type !== fieldMeta.type) { + throw new TypeError(`invalid type`, { + cause: { + found: field.type, + wanted: [fieldMeta.type, undefined], + }, + }); + } + if (field.multiple !== undefined && + !!field.multiple !== fieldMeta.multiple) { + throw new TypeError(`invalid multiple`, { + cause: { + found: field.multiple, + wanted: [fieldMeta.multiple, undefined], + }, + }); + } + return fieldMeta; + } + if (!isConfigType(field.type)) { + throw new TypeError(`invalid type`, { + cause: { + found: field.type, + wanted: ['string', 'number', 'boolean'], + }, + }); + } + return { + type: field.type, + multiple: !!field.multiple, + }; +}; +const validateField = (o, type, multiple) => { + const validateValidOptions = (def, validOptions) => { + if (!undefOrTypeArray(validOptions, type)) { + throw new TypeError('invalid validOptions', { + cause: { + found: validOptions, + wanted: valueType({ type, multiple: true }), + }, + }); + } + if (def !== undefined && validOptions !== undefined) { + const valid = Array.isArray(def) ? + def.every(v => validOptions.includes(v)) + : validOptions.includes(def); + if (!valid) { + throw new TypeError('invalid default value not in validOptions', { + cause: { + found: def, + wanted: validOptions, + }, + }); + } + } + }; + if (o.default !== undefined && + !isValidValue(o.default, type, multiple)) { + throw new TypeError('invalid default value', { + cause: { + found: o.default, + wanted: valueType({ type, multiple }), + }, + }); + } + if (isConfigOptionOfType(o, 'number', false) || + isConfigOptionOfType(o, 'number', true)) { + validateValidOptions(o.default, o.validOptions); + } + else if (isConfigOptionOfType(o, 'string', false) || + isConfigOptionOfType(o, 'string', true)) { + validateValidOptions(o.default, o.validOptions); + } + else if (isConfigOptionOfType(o, 'boolean', false) || + isConfigOptionOfType(o, 'boolean', true)) { + if (o.hint !== undefined) { + throw new TypeError('cannot provide hint for flag'); + } + if (o.validOptions !== undefined) { + throw new TypeError('cannot provide validOptions for flag'); + } + } + return o; +}; +const toParseArgsOptionsConfig = (options) => { + return Object.entries(options).reduce((acc, [longOption, o]) => { + const p = { + type: 'string', + multiple: !!o.multiple, + ...(typeof o.short === 'string' ? { short: o.short } : undefined), + }; + const setNoBool = () => { + if (!longOption.startsWith('no-') && !options[`no-${longOption}`]) { + acc[`no-${longOption}`] = { + type: 'boolean', + multiple: !!o.multiple, + }; + } + }; + const setDefault = (def, fn) => { + if (def !== undefined) { + p.default = fn(def); + } + }; + if (isConfigOption(o, 'number', false)) { + setDefault(o.default, String); + } + else if (isConfigOption(o, 'number', true)) { + setDefault(o.default, d => d.map(v => String(v))); + } + else if (isConfigOption(o, 'string', false) || + isConfigOption(o, 'string', true)) { + setDefault(o.default, v => v); + } + else if (isConfigOption(o, 'boolean', false) || + isConfigOption(o, 'boolean', true)) { + p.type = 'boolean'; + setDefault(o.default, v => v); + setNoBool(); + } + acc[longOption] = p; + return acc; + }, {}); +}; +/** + * Class returned by the {@link jack} function and all configuration + * definition methods. This is what gets chained together. + */ +export class Jack { + #configSet; + #shorts; + #options; + #fields = []; + #env; + #envPrefix; + #allowPositionals; + #usage; + #usageMarkdown; + constructor(options = {}) { + this.#options = options; + this.#allowPositionals = options.allowPositionals !== false; + this.#env = + this.#options.env === undefined ? process.env : this.#options.env; + this.#envPrefix = options.envPrefix; + // We need to fib a little, because it's always the same object, but it + // starts out as having an empty config set. Then each method that adds + // fields returns `this as Jack` + this.#configSet = Object.create(null); + this.#shorts = Object.create(null); + } + /** + * Resulting definitions, suitable to be passed to Node's `util.parseArgs`, + * but also including `description` and `short` fields, if set. + */ + get definitions() { + return this.#configSet; + } + /** map of `{ : }` strings for each short name defined */ + get shorts() { + return this.#shorts; + } + /** + * options passed to the {@link Jack} constructor + */ + get jackOptions() { + return this.#options; + } + /** + * the data used to generate {@link Jack#usage} and + * {@link Jack#usageMarkdown} content. + */ + get usageFields() { + return this.#fields; + } + /** + * Set the default value (which will still be overridden by env or cli) + * as if from a parsed config file. The optional `source` param, if + * provided, will be included in error messages if a value is invalid or + * unknown. + */ + setConfigValues(values, source = '') { + try { + this.validate(values); + } + catch (er) { + if (source && er instanceof Error) { + /* c8 ignore next */ + const cause = typeof er.cause === 'object' ? er.cause : {}; + er.cause = { ...cause, path: source }; + Error.captureStackTrace(er, this.setConfigValues); + } + throw er; + } + for (const [field, value] of Object.entries(values)) { + const my = this.#configSet[field]; + // already validated, just for TS's benefit + /* c8 ignore start */ + if (!my) { + throw new Error('unexpected field in config set: ' + field, { + cause: { + code: 'JACKSPEAK', + found: field, + }, + }); + } + /* c8 ignore stop */ + my.default = value; + } + return this; + } + /** + * Parse a string of arguments, and return the resulting + * `{ values, positionals }` object. + * + * If an {@link JackOptions#envPrefix} is set, then it will read default + * values from the environment, and write the resulting values back + * to the environment as well. + * + * Environment values always take precedence over any other value, except + * an explicit CLI setting. + */ + parse(args = process.argv) { + this.loadEnvDefaults(); + const p = this.parseRaw(args); + this.applyDefaults(p); + this.writeEnv(p); + return p; + } + loadEnvDefaults() { + if (this.#envPrefix) { + for (const [field, my] of Object.entries(this.#configSet)) { + const ek = toEnvKey(this.#envPrefix, field); + const env = this.#env[ek]; + if (env !== undefined) { + my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); + } + } + } + } + applyDefaults(p) { + for (const [field, c] of Object.entries(this.#configSet)) { + if (c.default !== undefined && !(field in p.values)) { + //@ts-ignore + p.values[field] = c.default; + } + } + } + /** + * Only parse the command line arguments passed in. + * Does not strip off the `node script.js` bits, so it must be just the + * arguments you wish to have parsed. + * Does not read from or write to the environment, or set defaults. + */ + parseRaw(args) { + if (args === process.argv) { + args = args.slice(process._eval !== undefined ? 1 : 2); + } + const result = parseArgs({ + args, + options: toParseArgsOptionsConfig(this.#configSet), + // always strict, but using our own logic + strict: false, + allowPositionals: this.#allowPositionals, + tokens: true, + }); + const p = { + values: {}, + positionals: [], + }; + for (const token of result.tokens) { + if (token.kind === 'positional') { + p.positionals.push(token.value); + if (this.#options.stopAtPositional || + this.#options.stopAtPositionalTest?.(token.value)) { + p.positionals.push(...args.slice(token.index + 1)); + break; + } + } + else if (token.kind === 'option') { + let value = undefined; + if (token.name.startsWith('no-')) { + const my = this.#configSet[token.name]; + const pname = token.name.substring('no-'.length); + const pos = this.#configSet[pname]; + if (pos && + pos.type === 'boolean' && + (!my || + (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { + value = false; + token.name = pname; + } + } + const my = this.#configSet[token.name]; + if (!my) { + throw new Error(`Unknown option '${token.rawName}'. ` + + `To specify a positional argument starting with a '-', ` + + `place it at the end of the command after '--', as in ` + + `'-- ${token.rawName}'`, { + cause: { + code: 'JACKSPEAK', + found: token.rawName + (token.value ? `=${token.value}` : ''), + }, + }); + } + if (value === undefined) { + if (token.value === undefined) { + if (my.type !== 'boolean') { + throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`, { + cause: { + code: 'JACKSPEAK', + name: token.rawName, + wanted: valueType(my), + }, + }); + } + value = true; + } + else { + if (my.type === 'boolean') { + throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`, { cause: { code: 'JACKSPEAK', found: token } }); + } + if (my.type === 'string') { + value = token.value; + } + else { + value = +token.value; + if (value !== value) { + throw new Error(`Invalid value '${token.value}' provided for ` + + `'${token.rawName}' option, expected number`, { + cause: { + code: 'JACKSPEAK', + name: token.rawName, + found: token.value, + wanted: 'number', + }, + }); + } + } + } + } + if (my.multiple) { + const pv = p.values; + const tn = pv[token.name] ?? []; + pv[token.name] = tn; + tn.push(value); + } + else { + const pv = p.values; + pv[token.name] = value; + } + } + } + for (const [field, value] of Object.entries(p.values)) { + const valid = this.#configSet[field]?.validate; + const validOptions = this.#configSet[field]?.validOptions; + const cause = validOptions && !isValidOption(value, validOptions) ? + { name: field, found: value, validOptions } + : valid && !valid(value) ? { name: field, found: value } + : undefined; + if (cause) { + throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause: { ...cause, code: 'JACKSPEAK' } }); + } + } + return p; + } + /** + * do not set fields as 'no-foo' if 'foo' exists and both are bools + * just set foo. + */ + #noNoFields(f, val, s = f) { + if (!f.startsWith('no-') || typeof val !== 'boolean') + return; + const yes = f.substring('no-'.length); + // recurse so we get the core config key we care about. + this.#noNoFields(yes, val, s); + if (this.#configSet[yes]?.type === 'boolean') { + throw new Error(`do not set '${s}', instead set '${yes}' as desired.`, { cause: { code: 'JACKSPEAK', found: s, wanted: yes } }); + } + } + /** + * Validate that any arbitrary object is a valid configuration `values` + * object. Useful when loading config files or other sources. + */ + validate(o) { + if (!o || typeof o !== 'object') { + throw new Error('Invalid config: not an object', { + cause: { code: 'JACKSPEAK', found: o }, + }); + } + const opts = o; + for (const field in o) { + const value = opts[field]; + /* c8 ignore next - for TS */ + if (value === undefined) + continue; + this.#noNoFields(field, value); + const config = this.#configSet[field]; + if (!config) { + throw new Error(`Unknown config option: ${field}`, { + cause: { code: 'JACKSPEAK', found: field }, + }); + } + if (!isValidValue(value, config.type, !!config.multiple)) { + throw new Error(`Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`, { + cause: { + code: 'JACKSPEAK', + name: field, + found: value, + wanted: valueType(config), + }, + }); + } + const cause = config.validOptions && !isValidOption(value, config.validOptions) ? + { name: field, found: value, validOptions: config.validOptions } + : config.validate && !config.validate(value) ? + { name: field, found: value } + : undefined; + if (cause) { + throw new Error(`Invalid config value for ${field}: ${value}`, { + cause: { ...cause, code: 'JACKSPEAK' }, + }); + } + } + } + writeEnv(p) { + if (!this.#env || !this.#envPrefix) + return; + for (const [field, value] of Object.entries(p.values)) { + const my = this.#configSet[field]; + this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); + } + } + /** + * Add a heading to the usage output banner + */ + heading(text, level, { pre = false } = {}) { + if (level === undefined) { + level = this.#fields.some(r => isHeading(r)) ? 2 : 1; + } + this.#fields.push({ type: 'heading', text, level, pre }); + return this; + } + /** + * Add a long-form description to the usage output at this position. + */ + description(text, { pre } = {}) { + this.#fields.push({ type: 'description', text, pre }); + return this; + } + /** + * Add one or more number fields. + */ + num(fields) { + return this.#addFieldsWith(fields, 'number', false); + } + /** + * Add one or more multiple number fields. + */ + numList(fields) { + return this.#addFieldsWith(fields, 'number', true); + } + /** + * Add one or more string option fields. + */ + opt(fields) { + return this.#addFieldsWith(fields, 'string', false); + } + /** + * Add one or more multiple string option fields. + */ + optList(fields) { + return this.#addFieldsWith(fields, 'string', true); + } + /** + * Add one or more flag fields. + */ + flag(fields) { + return this.#addFieldsWith(fields, 'boolean', false); + } + /** + * Add one or more multiple flag fields. + */ + flagList(fields) { + return this.#addFieldsWith(fields, 'boolean', true); + } + /** + * Generic field definition method. Similar to flag/flagList/number/etc, + * but you must specify the `type` (and optionally `multiple` and `delim`) + * fields on each one, or Jack won't know how to define them. + */ + addFields(fields) { + return this.#addFields(this, fields); + } + #addFieldsWith(fields, type, multiple) { + return this.#addFields(this, fields, { + type, + multiple, + }); + } + #addFields(next, fields, opt) { + Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { + this.#validateName(name, field); + const { type, multiple } = validateFieldMeta(field, opt); + const value = { ...field, type, multiple }; + validateField(value, type, multiple); + next.#fields.push({ type: 'config', name, value }); + return [name, value]; + }))); + return next; + } + #validateName(name, field) { + if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { + throw new TypeError(`Invalid option name: ${name}, ` + + `must be '-' delimited ASCII alphanumeric`); + } + if (this.#configSet[name]) { + throw new TypeError(`Cannot redefine option ${field}`); + } + if (this.#shorts[name]) { + throw new TypeError(`Cannot redefine option ${name}, already ` + + `in use for ${this.#shorts[name]}`); + } + if (field.short) { + if (!/^[a-zA-Z0-9]$/.test(field.short)) { + throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + + 'must be 1 ASCII alphanumeric character'); + } + if (this.#shorts[field.short]) { + throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + + `already in use for ${this.#shorts[field.short]}`); + } + this.#shorts[field.short] = name; + this.#shorts[name] = name; + } + } + /** + * Return the usage banner for the given configuration + */ + usage() { + if (this.#usage) + return this.#usage; + let headingLevel = 1; + //@ts-ignore + const ui = cliui({ width }); + const first = this.#fields[0]; + let start = first?.type === 'heading' ? 1 : 0; + if (first?.type === 'heading') { + ui.div({ + padding: [0, 0, 0, 0], + text: normalize(first.text), + }); + } + ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); + if (this.#options.usage) { + ui.div({ + text: this.#options.usage, + padding: [0, 0, 0, 2], + }); + } + else { + const cmd = basename(String(process.argv[1])); + const shortFlags = []; + const shorts = []; + const flags = []; + const opts = []; + for (const [field, config] of Object.entries(this.#configSet)) { + if (config.short) { + if (config.type === 'boolean') + shortFlags.push(config.short); + else + shorts.push([config.short, config.hint || field]); + } + else { + if (config.type === 'boolean') + flags.push(field); + else + opts.push([field, config.hint || field]); + } + } + const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; + const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const lf = flags.map(k => ` --${k}`).join(''); + const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); + ui.div({ + text: usage, + padding: [0, 0, 0, 2], + }); + } + ui.div({ padding: [0, 0, 0, 0], text: '' }); + const maybeDesc = this.#fields[start]; + if (maybeDesc && isDescription(maybeDesc)) { + const print = normalize(maybeDesc.text, maybeDesc.pre); + start++; + ui.div({ padding: [0, 0, 0, 0], text: print }); + ui.div({ padding: [0, 0, 0, 0], text: '' }); + } + const { rows, maxWidth } = this.#usageRows(start); + // every heading/description after the first gets indented by 2 + // extra spaces. + for (const row of rows) { + if (row.left) { + // If the row is too long, don't wrap it + // Bump the right-hand side down a line to make room + const configIndent = indent(Math.max(headingLevel, 2)); + if (row.left.length > maxWidth - 3) { + ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); + ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); + } + else { + ui.div({ + text: row.left, + padding: [0, 1, 0, configIndent], + width: maxWidth, + }, { padding: [0, 0, 0, 0], text: row.text }); + } + if (row.skipLine) { + ui.div({ padding: [0, 0, 0, 0], text: '' }); + } + } + else { + if (isHeading(row)) { + const { level } = row; + headingLevel = level; + // only h1 and h2 have bottom padding + // h3-h6 do not + const b = level <= 2 ? 1 : 0; + ui.div({ ...row, padding: [0, 0, b, indent(level)] }); + } + else { + ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); + } + } + } + return (this.#usage = ui.toString()); + } + /** + * Return the usage banner markdown for the given configuration + */ + usageMarkdown() { + if (this.#usageMarkdown) + return this.#usageMarkdown; + const out = []; + let headingLevel = 1; + const first = this.#fields[0]; + let start = first?.type === 'heading' ? 1 : 0; + if (first?.type === 'heading') { + out.push(`# ${normalizeOneLine(first.text)}`); + } + out.push('Usage:'); + if (this.#options.usage) { + out.push(normalizeMarkdown(this.#options.usage, true)); + } + else { + const cmd = basename(String(process.argv[1])); + const shortFlags = []; + const shorts = []; + const flags = []; + const opts = []; + for (const [field, config] of Object.entries(this.#configSet)) { + if (config.short) { + if (config.type === 'boolean') + shortFlags.push(config.short); + else + shorts.push([config.short, config.hint || field]); + } + else { + if (config.type === 'boolean') + flags.push(field); + else + opts.push([field, config.hint || field]); + } + } + const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; + const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const lf = flags.map(k => ` --${k}`).join(''); + const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); + const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); + out.push(normalizeMarkdown(usage, true)); + } + const maybeDesc = this.#fields[start]; + if (maybeDesc && isDescription(maybeDesc)) { + out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); + start++; + } + const { rows } = this.#usageRows(start); + // heading level in markdown is number of # ahead of text + for (const row of rows) { + if (row.left) { + out.push('#'.repeat(headingLevel + 1) + + ' ' + + normalizeOneLine(row.left, true)); + if (row.text) + out.push(normalizeMarkdown(row.text)); + } + else if (isHeading(row)) { + const { level } = row; + headingLevel = level; + out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); + } + else { + out.push(normalizeMarkdown(row.text, !!row.pre)); + } + } + return (this.#usageMarkdown = out.join('\n\n') + '\n'); + } + #usageRows(start) { + // turn each config type into a row, and figure out the width of the + // left hand indentation for the option descriptions. + let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); + let maxWidth = 8; + let prev = undefined; + const rows = []; + for (const field of this.#fields.slice(start)) { + if (field.type !== 'config') { + if (prev?.type === 'config') + prev.skipLine = true; + prev = undefined; + field.text = normalize(field.text, !!field.pre); + rows.push(field); + continue; + } + const { value } = field; + const desc = value.description || ''; + const mult = value.multiple ? 'Can be set multiple times' : ''; + const opts = value.validOptions?.length ? + `Valid options:${value.validOptions.map(v => ` ${JSON.stringify(v)}`)}` + : ''; + const dmDelim = desc.includes('\n') ? '\n\n' : '\n'; + const extra = [opts, mult].join(dmDelim).trim(); + const text = (normalize(desc) + dmDelim + extra).trim(); + const hint = value.hint || + (value.type === 'number' ? 'n' + : value.type === 'string' ? field.name + : undefined); + const short = !value.short ? '' + : value.type === 'boolean' ? `-${value.short} ` + : `-${value.short}<${hint}> `; + const left = value.type === 'boolean' ? + `${short}--${field.name}` + : `${short}--${field.name}=<${hint}>`; + const row = { text, left, type: 'config' }; + if (text.length > width - maxMax) { + row.skipLine = true; + } + if (prev && left.length > maxMax) + prev.skipLine = true; + prev = row; + const len = left.length + 4; + if (len > maxWidth && len < maxMax) { + maxWidth = len; + } + rows.push(row); + } + return { rows, maxWidth }; + } + /** + * Return the configuration options as a plain object + */ + toJSON() { + return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ + field, + { + type: def.type, + ...(def.multiple ? { multiple: true } : {}), + ...(def.delim ? { delim: def.delim } : {}), + ...(def.short ? { short: def.short } : {}), + ...(def.description ? + { description: normalize(def.description) } + : {}), + ...(def.validate ? { validate: def.validate } : {}), + ...(def.validOptions ? { validOptions: def.validOptions } : {}), + ...(def.default !== undefined ? { default: def.default } : {}), + ...(def.hint ? { hint: def.hint } : {}), + }, + ])); + } + /** + * Custom printer for `util.inspect` + */ + [inspect.custom](_, options) { + return `Jack ${inspect(this.toJSON(), options)}`; + } +} +/** + * Main entry point. Create and return a {@link Jack} object. + */ +export const jack = (options = {}) => new Jack(options); +// Unwrap and un-indent, so we can wrap description +// strings however makes them look nice in the code. +const normalize = (s, pre = false) => { + if (pre) + // prepend a ZWSP to each line so cliui doesn't strip it. + return s + .split('\n') + .map(l => `\u200b${l}`) + .join('\n'); + return s + .split(/^\s*```\s*$/gm) + .map((s, i) => { + if (i % 2 === 1) { + if (!s.trim()) { + return `\`\`\`\n\`\`\`\n`; + } + // outdent the ``` blocks, but preserve whitespace otherwise. + const split = s.split('\n'); + // throw out the \n at the start and end + split.pop(); + split.shift(); + const si = split.reduce((shortest, l) => { + /* c8 ignore next */ + const ind = l.match(/^\s*/)?.[0] ?? ''; + if (ind.length) + return Math.min(ind.length, shortest); + else + return shortest; + }, Infinity); + /* c8 ignore next */ + const i = isFinite(si) ? si : 0; + return ('\n```\n' + + split.map(s => `\u200b${s.substring(i)}`).join('\n') + + '\n```\n'); + } + return (s + // remove single line breaks, except for lists + .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) + // normalize mid-line whitespace + .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') + // two line breaks are enough + .replace(/\n{3,}/g, '\n\n') + // remove any spaces at the start of a line + .replace(/\n[ \t]+/g, '\n') + .trim()); + }) + .join('\n'); +}; +// normalize for markdown printing, remove leading spaces on lines +const normalizeMarkdown = (s, pre = false) => { + const n = normalize(s, pre).replace(/\\/g, '\\\\'); + return pre ? + `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` + : n.replace(/\n +/g, '\n').trim(); +}; +const normalizeOneLine = (s, pre = false) => { + const n = normalize(s, pre) + .replace(/[\s\u200b]+/g, ' ') + .trim(); + return pre ? `\`${n}\`` : n; +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a8808d5e25b6eb8cea072082893d9cfde2955e38 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,SAAS,GAEV,MAAM,WAAW,CAAA;AAElB,kDAAkD;AAClD,YAAY;AACZ,OAAO,KAAK,MAAM,eAAe,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAWpC,MAAM,CAAC,MAAM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AC,CAAA;AACf,CAAC,CAAA;AAED,kEAAkE;AAClE,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAU,EAAE;IACpE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAClD,OAAO,GAAG,CAAC,CAAC;QACR,WAAW,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU;QAC/C,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAE,EAAE;IAC3D,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,IAAI,EAAE,CAAA;IACT,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7B,CAAC,CAAA","sourcesContent":["import {\n inspect,\n InspectOptions,\n parseArgs,\n ParseArgsConfig,\n} from 'node:util'\n\n// it's a tiny API, just cast it inline, it's fine\n//@ts-ignore\nimport cliui from '@isaacs/cliui'\nimport { basename } from 'node:path'\n\nexport type ParseArgsOptions = Exclude<\n ParseArgsConfig['options'],\n undefined\n>\nexport type ParseArgsOption = ParseArgsOptions[string]\nexport type ParseArgsDefault = Exclude\n\nexport type ConfigType = 'number' | 'string' | 'boolean'\n\nexport const isConfigType = (t: unknown): t is ConfigType =>\n typeof t === 'string' &&\n (t === 'string' || t === 'number' || t === 'boolean')\n\nexport type ConfigValuePrimitive = string | boolean | number\nexport type ConfigValueArray = string[] | boolean[] | number[]\nexport type ConfigValue = ConfigValuePrimitive | ConfigValueArray\n\n/**\n * Given a Jack object, get the typeof its ConfigSet\n */\nexport type Unwrap = J extends Jack ? C : never\n\n/**\n * Defines the type of value that is valid, given a config definition's\n * {@link ConfigType} and boolean multiple setting\n */\nexport type ValidValue<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n> =\n [T, M] extends ['number', true] ? number[]\n : [T, M] extends ['string', true] ? string[]\n : [T, M] extends ['boolean', true] ? boolean[]\n : [T, M] extends ['number', false] ? number\n : [T, M] extends ['string', false] ? string\n : [T, M] extends ['boolean', false] ? boolean\n : [T, M] extends ['string', boolean] ? string | string[]\n : [T, M] extends ['boolean', boolean] ? boolean | boolean[]\n : [T, M] extends ['number', boolean] ? number | number[]\n : [T, M] extends [ConfigType, false] ? ConfigValuePrimitive\n : [T, M] extends [ConfigType, true] ? ConfigValueArray\n : ConfigValue\n\nconst isValidValue = (\n v: unknown,\n type: T,\n multi: M,\n): v is ValidValue => {\n if (multi) {\n if (!Array.isArray(v)) return false\n return !v.some((v: unknown) => !isValidValue(v, type, false))\n }\n if (Array.isArray(v)) return false\n return typeof v === type\n}\n\nexport type ReadonlyArrays = readonly number[] | readonly string[]\n\n/**\n * Defines the type of validOptions that are valid, given a config definition's\n * {@link ConfigType}\n */\nexport type ValidOptions =\n T extends 'boolean' ? undefined\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : ReadonlyArrays\n\nconst isValidOption = (\n v: unknown,\n vo: readonly unknown[],\n): vo is Exclude, undefined> =>\n !!vo &&\n (Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v))\n\n/**\n * A config field definition, in its full representation.\n * This is what is passed in to addFields so `type` is required.\n */\nexport type ConfigOption<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n O extends undefined | ValidOptions = undefined | ValidOptions,\n> = {\n type: T\n short?: string\n default?: ValidValue &\n (O extends ReadonlyArrays ?\n M extends false ?\n O[number]\n : O[number][]\n : unknown)\n description?: string\n hint?: T extends 'boolean' ? undefined : string\n validate?:\n | ((v: unknown) => v is ValidValue)\n | ((v: unknown) => boolean)\n validOptions?: O\n delim?: M extends false ? undefined : string\n multiple?: M\n}\n\n/**\n * Determine whether an unknown object is a {@link ConfigOption} based only\n * on its `type` and `multiple` property\n */\nexport const isConfigOptionOfType = <\n T extends ConfigType,\n M extends boolean,\n>(\n o: any,\n type: T,\n multi: M,\n): o is ConfigOption =>\n !!o &&\n typeof o === 'object' &&\n isConfigType(o.type) &&\n o.type === type &&\n !!o.multiple === multi\n\n/**\n * Determine whether an unknown object is a {@link ConfigOption} based on\n * it having all valid properties\n */\nexport const isConfigOption = (\n o: any,\n type: T,\n multi: M,\n): o is ConfigOption =>\n isConfigOptionOfType(o, type, multi) &&\n undefOrType(o.short, 'string') &&\n undefOrType(o.description, 'string') &&\n undefOrType(o.hint, 'string') &&\n undefOrType(o.validate, 'function') &&\n (o.type === 'boolean' ?\n o.validOptions === undefined\n : undefOrTypeArray(o.validOptions, o.type)) &&\n (o.default === undefined || isValidValue(o.default, type, multi))\n\n/**\n * The meta information for a config option definition, when the\n * type and multiple values can be inferred by the method being used\n */\nexport type ConfigOptionMeta<\n T extends ConfigType,\n M extends boolean,\n O extends ConfigOption = ConfigOption,\n> = Pick, 'type'> & Omit\n\n/**\n * A set of {@link ConfigOption} objects, referenced by their longOption\n * string values.\n */\nexport type ConfigSet = {\n [longOption: string]: ConfigOption\n}\n\n/**\n * A set of {@link ConfigOptionMeta} fields, referenced by their longOption\n * string values.\n */\nexport type ConfigMetaSet = {\n [longOption: string]: ConfigOptionMeta\n}\n\n/**\n * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet}\n */\nexport type ConfigSetFromMetaSet<\n T extends ConfigType,\n M extends boolean,\n S extends ConfigMetaSet,\n> = S & { [longOption in keyof S]: ConfigOption }\n\n/**\n * The 'values' field returned by {@link Jack#parse}. If a value has\n * a default field it will be required on the object otherwise it is optional.\n */\nexport type OptionsResults = {\n [K in keyof T]:\n | (T[K]['validOptions'] extends ReadonlyArrays ?\n T[K] extends ConfigOption<'string' | 'number', false> ?\n T[K]['validOptions'][number]\n : T[K] extends ConfigOption<'string' | 'number', true> ?\n T[K]['validOptions'][number][]\n : never\n : T[K] extends ConfigOption<'string', false> ? string\n : T[K] extends ConfigOption<'string', true> ? string[]\n : T[K] extends ConfigOption<'number', false> ? number\n : T[K] extends ConfigOption<'number', true> ? number[]\n : T[K] extends ConfigOption<'boolean', false> ? boolean\n : T[K] extends ConfigOption<'boolean', true> ? boolean[]\n : never)\n | (T[K]['default'] extends ConfigValue ? never : undefined)\n}\n\n/**\n * The object retured by {@link Jack#parse}\n */\nexport type Parsed = {\n values: OptionsResults\n positionals: string[]\n}\n\n/**\n * A row used when generating the {@link Jack#usage} string\n */\nexport interface Row {\n left?: string\n text: string\n skipLine?: boolean\n type?: string\n}\n\n/**\n * A heading for a section in the usage, created by the jack.heading()\n * method.\n *\n * First heading is always level 1, subsequent headings default to 2.\n *\n * The level of the nearest heading level sets the indentation of the\n * description that follows.\n */\nexport interface Heading extends Row {\n type: 'heading'\n text: string\n left?: ''\n skipLine?: boolean\n level: number\n pre?: boolean\n}\n\nconst isHeading = (r: { type?: string }): r is Heading =>\n r.type === 'heading'\n\n/**\n * An arbitrary blob of text describing some stuff, set by the\n * jack.description() method.\n *\n * Indentation determined by level of the nearest header.\n */\nexport interface Description extends Row {\n type: 'description'\n text: string\n left?: ''\n skipLine?: boolean\n pre?: boolean\n}\n\nconst isDescription = (r: { type?: string }): r is Description =>\n r.type === 'description'\n\n/**\n * A heading or description row used when generating the {@link Jack#usage}\n * string\n */\nexport type TextRow = Heading | Description\n\n/**\n * Either a {@link TextRow} or a reference to a {@link ConfigOption}\n */\nexport type UsageField =\n | TextRow\n | {\n type: 'config'\n name: string\n value: ConfigOption\n }\n\nconst width = Math.min(process?.stdout?.columns ?? 80, 80)\n\n// indentation spaces from heading level\nconst indent = (n: number) => (n - 1) * 2\n\nconst toEnvKey = (pref: string, key: string): string =>\n [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')]\n .join(' ')\n .trim()\n .toUpperCase()\n .replace(/ /g, '_')\n\nconst toEnvVal = (value: ConfigValue, delim: string = '\\n'): string => {\n const str =\n typeof value === 'string' ? value\n : typeof value === 'boolean' ?\n value ? '1'\n : '0'\n : typeof value === 'number' ? String(value)\n : Array.isArray(value) ?\n value.map((v: ConfigValue) => toEnvVal(v)).join(delim)\n : /* c8 ignore start */ undefined\n if (typeof str !== 'string') {\n throw new Error(\n `could not serialize value to environment: ${JSON.stringify(value)}`,\n { cause: { code: 'JACKSPEAK' } },\n )\n }\n /* c8 ignore stop */\n return str\n}\n\nconst fromEnvVal = (\n env: string,\n type: T,\n multiple: M,\n delim: string = '\\n',\n): ValidValue =>\n (multiple ?\n env ? env.split(delim).map(v => fromEnvVal(v, type, false))\n : []\n : type === 'string' ? env\n : type === 'boolean' ? env === '1'\n : +env.trim()) as ValidValue\n\nconst undefOrType = (v: unknown, t: string): boolean =>\n v === undefined || typeof v === t\n\nconst undefOrTypeArray = (v: unknown, t: string): boolean =>\n v === undefined || (Array.isArray(v) && v.every(x => typeof x === t))\n\n// print the value type, for error message reporting\nconst valueType = (\n v: ConfigValue | { type: ConfigType; multiple?: boolean },\n): string =>\n typeof v === 'string' ? 'string'\n : typeof v === 'boolean' ? 'boolean'\n : typeof v === 'number' ? 'number'\n : Array.isArray(v) ?\n `${joinTypes([...new Set(v.map(v => valueType(v)))])}[]`\n : `${v.type}${v.multiple ? '[]' : ''}`\n\nconst joinTypes = (types: string[]): string =>\n types.length === 1 && typeof types[0] === 'string' ?\n types[0]\n : `(${types.join('|')})`\n\nconst validateFieldMeta = (\n field: ConfigOptionMeta,\n fieldMeta?: { type: T; multiple: M },\n): { type: ConfigType; multiple: boolean } => {\n if (fieldMeta) {\n if (field.type !== undefined && field.type !== fieldMeta.type) {\n throw new TypeError(`invalid type`, {\n cause: {\n found: field.type,\n wanted: [fieldMeta.type, undefined],\n },\n })\n }\n if (\n field.multiple !== undefined &&\n !!field.multiple !== fieldMeta.multiple\n ) {\n throw new TypeError(`invalid multiple`, {\n cause: {\n found: field.multiple,\n wanted: [fieldMeta.multiple, undefined],\n },\n })\n }\n return fieldMeta\n }\n\n if (!isConfigType(field.type)) {\n throw new TypeError(`invalid type`, {\n cause: {\n found: field.type,\n wanted: ['string', 'number', 'boolean'],\n },\n })\n }\n\n return {\n type: field.type,\n multiple: !!field.multiple,\n }\n}\n\nconst validateField = (\n o: ConfigOption,\n type: ConfigType,\n multiple: boolean,\n): ConfigOption => {\n const validateValidOptions = <\n T extends ConfigValue | undefined,\n V extends T extends Array ? U : T,\n >(\n def: T | undefined,\n validOptions: readonly V[] | undefined,\n ) => {\n if (!undefOrTypeArray(validOptions, type)) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: valueType({ type, multiple: true }),\n },\n })\n }\n if (def !== undefined && validOptions !== undefined) {\n const valid =\n Array.isArray(def) ?\n def.every(v => validOptions.includes(v as V))\n : validOptions.includes(def as V)\n if (!valid) {\n throw new TypeError('invalid default value not in validOptions', {\n cause: {\n found: def,\n wanted: validOptions,\n },\n })\n }\n }\n }\n\n if (\n o.default !== undefined &&\n !isValidValue(o.default, type, multiple)\n ) {\n throw new TypeError('invalid default value', {\n cause: {\n found: o.default,\n wanted: valueType({ type, multiple }),\n },\n })\n }\n\n if (\n isConfigOptionOfType(o, 'number', false) ||\n isConfigOptionOfType(o, 'number', true)\n ) {\n validateValidOptions(o.default, o.validOptions)\n } else if (\n isConfigOptionOfType(o, 'string', false) ||\n isConfigOptionOfType(o, 'string', true)\n ) {\n validateValidOptions(o.default, o.validOptions)\n } else if (\n isConfigOptionOfType(o, 'boolean', false) ||\n isConfigOptionOfType(o, 'boolean', true)\n ) {\n if (o.hint !== undefined) {\n throw new TypeError('cannot provide hint for flag')\n }\n if (o.validOptions !== undefined) {\n throw new TypeError('cannot provide validOptions for flag')\n }\n }\n\n return o\n}\n\nconst toParseArgsOptionsConfig = (\n options: ConfigSet,\n): ParseArgsOptions => {\n return Object.entries(options).reduce((acc, [longOption, o]) => {\n const p: ParseArgsOption = {\n type: 'string',\n multiple: !!o.multiple,\n ...(typeof o.short === 'string' ? { short: o.short } : undefined),\n }\n const setNoBool = () => {\n if (!longOption.startsWith('no-') && !options[`no-${longOption}`]) {\n acc[`no-${longOption}`] = {\n type: 'boolean',\n multiple: !!o.multiple,\n }\n }\n }\n const setDefault = (\n def: T | undefined,\n fn: (d: T) => ParseArgsDefault,\n ) => {\n if (def !== undefined) {\n p.default = fn(def)\n }\n }\n if (isConfigOption(o, 'number', false)) {\n setDefault(o.default, String)\n } else if (isConfigOption(o, 'number', true)) {\n setDefault(o.default, d => d.map(v => String(v)))\n } else if (\n isConfigOption(o, 'string', false) ||\n isConfigOption(o, 'string', true)\n ) {\n setDefault(o.default, v => v)\n } else if (\n isConfigOption(o, 'boolean', false) ||\n isConfigOption(o, 'boolean', true)\n ) {\n p.type = 'boolean'\n setDefault(o.default, v => v)\n setNoBool()\n }\n acc[longOption] = p\n return acc\n }, {} as ParseArgsOptions)\n}\n\n/**\n * Options provided to the {@link Jack} constructor\n */\nexport interface JackOptions {\n /**\n * Whether to allow positional arguments\n *\n * @default true\n */\n allowPositionals?: boolean\n\n /**\n * Prefix to use when reading/writing the environment variables\n *\n * If not specified, environment behavior will not be available.\n */\n envPrefix?: string\n\n /**\n * Environment object to read/write. Defaults `process.env`.\n * No effect if `envPrefix` is not set.\n */\n env?: Record\n\n /**\n * A short usage string. If not provided, will be generated from the\n * options provided, but that can of course be rather verbose if\n * there are a lot of options.\n */\n usage?: string\n\n /**\n * Stop parsing flags and opts at the first positional argument.\n * This is to support cases like `cmd [flags] [options]`, where\n * each subcommand may have different options. This effectively treats\n * any positional as a `--` argument. Only relevant if `allowPositionals`\n * is true.\n *\n * To do subcommands, set this option, look at the first positional, and\n * parse the remaining positionals as appropriate.\n *\n * @default false\n */\n stopAtPositional?: boolean\n\n /**\n * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,\n * will be called with each positional argument encountered. If the function\n * returns true, then parsing will stop at that point.\n */\n stopAtPositionalTest?: (arg: string) => boolean\n}\n\n/**\n * Class returned by the {@link jack} function and all configuration\n * definition methods. This is what gets chained together.\n */\nexport class Jack {\n #configSet: C\n #shorts: Record\n #options: JackOptions\n #fields: UsageField[] = []\n #env: Record\n #envPrefix?: string\n #allowPositionals: boolean\n #usage?: string\n #usageMarkdown?: string\n\n constructor(options: JackOptions = {}) {\n this.#options = options\n this.#allowPositionals = options.allowPositionals !== false\n this.#env =\n this.#options.env === undefined ? process.env : this.#options.env\n this.#envPrefix = options.envPrefix\n // We need to fib a little, because it's always the same object, but it\n // starts out as having an empty config set. Then each method that adds\n // fields returns `this as Jack`\n this.#configSet = Object.create(null) as C\n this.#shorts = Object.create(null)\n }\n\n /**\n * Resulting definitions, suitable to be passed to Node's `util.parseArgs`,\n * but also including `description` and `short` fields, if set.\n */\n get definitions(): C {\n return this.#configSet\n }\n\n /** map of `{ : }` strings for each short name defined */\n get shorts() {\n return this.#shorts\n }\n\n /**\n * options passed to the {@link Jack} constructor\n */\n get jackOptions() {\n return this.#options\n }\n\n /**\n * the data used to generate {@link Jack#usage} and\n * {@link Jack#usageMarkdown} content.\n */\n get usageFields() {\n return this.#fields\n }\n\n /**\n * Set the default value (which will still be overridden by env or cli)\n * as if from a parsed config file. The optional `source` param, if\n * provided, will be included in error messages if a value is invalid or\n * unknown.\n */\n setConfigValues(values: Partial>, source = '') {\n try {\n this.validate(values)\n } catch (er) {\n if (source && er instanceof Error) {\n /* c8 ignore next */\n const cause = typeof er.cause === 'object' ? er.cause : {}\n er.cause = { ...cause, path: source }\n Error.captureStackTrace(er, this.setConfigValues)\n }\n throw er\n }\n for (const [field, value] of Object.entries(values)) {\n const my = this.#configSet[field]\n // already validated, just for TS's benefit\n /* c8 ignore start */\n if (!my) {\n throw new Error('unexpected field in config set: ' + field, {\n cause: {\n code: 'JACKSPEAK',\n found: field,\n },\n })\n }\n /* c8 ignore stop */\n my.default = value as ConfigValue\n }\n return this\n }\n\n /**\n * Parse a string of arguments, and return the resulting\n * `{ values, positionals }` object.\n *\n * If an {@link JackOptions#envPrefix} is set, then it will read default\n * values from the environment, and write the resulting values back\n * to the environment as well.\n *\n * Environment values always take precedence over any other value, except\n * an explicit CLI setting.\n */\n parse(args: string[] = process.argv): Parsed {\n this.loadEnvDefaults()\n const p = this.parseRaw(args)\n this.applyDefaults(p)\n this.writeEnv(p)\n return p\n }\n\n loadEnvDefaults() {\n if (this.#envPrefix) {\n for (const [field, my] of Object.entries(this.#configSet)) {\n const ek = toEnvKey(this.#envPrefix, field)\n const env = this.#env[ek]\n if (env !== undefined) {\n my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim)\n }\n }\n }\n }\n\n applyDefaults(p: Parsed) {\n for (const [field, c] of Object.entries(this.#configSet)) {\n if (c.default !== undefined && !(field in p.values)) {\n //@ts-ignore\n p.values[field] = c.default\n }\n }\n }\n\n /**\n * Only parse the command line arguments passed in.\n * Does not strip off the `node script.js` bits, so it must be just the\n * arguments you wish to have parsed.\n * Does not read from or write to the environment, or set defaults.\n */\n parseRaw(args: string[]): Parsed {\n if (args === process.argv) {\n args = args.slice(\n (process as { _eval?: string })._eval !== undefined ? 1 : 2,\n )\n }\n\n const result = parseArgs({\n args,\n options: toParseArgsOptionsConfig(this.#configSet),\n // always strict, but using our own logic\n strict: false,\n allowPositionals: this.#allowPositionals,\n tokens: true,\n })\n\n const p: Parsed = {\n values: {} as OptionsResults,\n positionals: [],\n }\n for (const token of result.tokens) {\n if (token.kind === 'positional') {\n p.positionals.push(token.value)\n if (\n this.#options.stopAtPositional ||\n this.#options.stopAtPositionalTest?.(token.value)\n ) {\n p.positionals.push(...args.slice(token.index + 1))\n break\n }\n } else if (token.kind === 'option') {\n let value: ConfigValue | undefined = undefined\n if (token.name.startsWith('no-')) {\n const my = this.#configSet[token.name]\n const pname = token.name.substring('no-'.length)\n const pos = this.#configSet[pname]\n if (\n pos &&\n pos.type === 'boolean' &&\n (!my ||\n (my.type === 'boolean' && !!my.multiple === !!pos.multiple))\n ) {\n value = false\n token.name = pname\n }\n }\n const my = this.#configSet[token.name]\n if (!my) {\n throw new Error(\n `Unknown option '${token.rawName}'. ` +\n `To specify a positional argument starting with a '-', ` +\n `place it at the end of the command after '--', as in ` +\n `'-- ${token.rawName}'`,\n {\n cause: {\n code: 'JACKSPEAK',\n found:\n token.rawName + (token.value ? `=${token.value}` : ''),\n },\n },\n )\n }\n if (value === undefined) {\n if (token.value === undefined) {\n if (my.type !== 'boolean') {\n throw new Error(\n `No value provided for ${token.rawName}, expected ${my.type}`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: token.rawName,\n wanted: valueType(my),\n },\n },\n )\n }\n value = true\n } else {\n if (my.type === 'boolean') {\n throw new Error(\n `Flag ${token.rawName} does not take a value, received '${token.value}'`,\n { cause: { code: 'JACKSPEAK', found: token } },\n )\n }\n if (my.type === 'string') {\n value = token.value\n } else {\n value = +token.value\n if (value !== value) {\n throw new Error(\n `Invalid value '${token.value}' provided for ` +\n `'${token.rawName}' option, expected number`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: token.rawName,\n found: token.value,\n wanted: 'number',\n },\n },\n )\n }\n }\n }\n }\n if (my.multiple) {\n const pv = p.values as Record\n const tn = pv[token.name] ?? []\n pv[token.name] = tn\n tn.push(value)\n } else {\n const pv = p.values as Record\n pv[token.name] = value\n }\n }\n }\n\n for (const [field, value] of Object.entries(p.values)) {\n const valid = this.#configSet[field]?.validate\n const validOptions = this.#configSet[field]?.validOptions\n const cause =\n validOptions && !isValidOption(value, validOptions) ?\n { name: field, found: value, validOptions }\n : valid && !valid(value) ? { name: field, found: value }\n : undefined\n if (cause) {\n throw new Error(\n `Invalid value provided for --${field}: ${JSON.stringify(value)}`,\n { cause: { ...cause, code: 'JACKSPEAK' } },\n )\n }\n }\n\n return p\n }\n\n /**\n * do not set fields as 'no-foo' if 'foo' exists and both are bools\n * just set foo.\n */\n #noNoFields(f: string, val: unknown, s: string = f) {\n if (!f.startsWith('no-') || typeof val !== 'boolean') return\n const yes = f.substring('no-'.length)\n // recurse so we get the core config key we care about.\n this.#noNoFields(yes, val, s)\n if (this.#configSet[yes]?.type === 'boolean') {\n throw new Error(\n `do not set '${s}', instead set '${yes}' as desired.`,\n { cause: { code: 'JACKSPEAK', found: s, wanted: yes } },\n )\n }\n }\n\n /**\n * Validate that any arbitrary object is a valid configuration `values`\n * object. Useful when loading config files or other sources.\n */\n validate(o: unknown): asserts o is Parsed['values'] {\n if (!o || typeof o !== 'object') {\n throw new Error('Invalid config: not an object', {\n cause: { code: 'JACKSPEAK', found: o },\n })\n }\n const opts = o as Record\n for (const field in o) {\n const value = opts[field]\n /* c8 ignore next - for TS */\n if (value === undefined) continue\n this.#noNoFields(field, value)\n const config = this.#configSet[field]\n if (!config) {\n throw new Error(`Unknown config option: ${field}`, {\n cause: { code: 'JACKSPEAK', found: field },\n })\n }\n if (!isValidValue(value, config.type, !!config.multiple)) {\n throw new Error(\n `Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`,\n {\n cause: {\n code: 'JACKSPEAK',\n name: field,\n found: value,\n wanted: valueType(config),\n },\n },\n )\n }\n const cause =\n config.validOptions && !isValidOption(value, config.validOptions) ?\n { name: field, found: value, validOptions: config.validOptions }\n : config.validate && !config.validate(value) ?\n { name: field, found: value }\n : undefined\n if (cause) {\n throw new Error(`Invalid config value for ${field}: ${value}`, {\n cause: { ...cause, code: 'JACKSPEAK' },\n })\n }\n }\n }\n\n writeEnv(p: Parsed) {\n if (!this.#env || !this.#envPrefix) return\n for (const [field, value] of Object.entries(p.values)) {\n const my = this.#configSet[field]\n this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(\n value as ConfigValue,\n my?.delim,\n )\n }\n }\n\n /**\n * Add a heading to the usage output banner\n */\n heading(\n text: string,\n level?: 1 | 2 | 3 | 4 | 5 | 6,\n { pre = false }: { pre?: boolean } = {},\n ): Jack {\n if (level === undefined) {\n level = this.#fields.some(r => isHeading(r)) ? 2 : 1\n }\n this.#fields.push({ type: 'heading', text, level, pre })\n return this\n }\n\n /**\n * Add a long-form description to the usage output at this position.\n */\n description(text: string, { pre }: { pre?: boolean } = {}): Jack {\n this.#fields.push({ type: 'description', text, pre })\n return this\n }\n\n /**\n * Add one or more number fields.\n */\n num>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'number', false)\n }\n\n /**\n * Add one or more multiple number fields.\n */\n numList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'number', true)\n }\n\n /**\n * Add one or more string option fields.\n */\n opt>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'string', false)\n }\n\n /**\n * Add one or more multiple string option fields.\n */\n optList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'string', true)\n }\n\n /**\n * Add one or more flag fields.\n */\n flag>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'boolean', false)\n }\n\n /**\n * Add one or more multiple flag fields.\n */\n flagList>(\n fields: F,\n ): Jack> {\n return this.#addFieldsWith(fields, 'boolean', true)\n }\n\n /**\n * Generic field definition method. Similar to flag/flagList/number/etc,\n * but you must specify the `type` (and optionally `multiple` and `delim`)\n * fields on each one, or Jack won't know how to define them.\n */\n addFields(fields: F): Jack {\n return this.#addFields(this as unknown as Jack, fields)\n }\n\n #addFieldsWith<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n O extends ConfigSetFromMetaSet,\n >(fields: F, type: ConfigType, multiple: boolean): Jack {\n return this.#addFields(this as unknown as Jack, fields, {\n type,\n multiple,\n })\n }\n\n #addFields<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n O extends Jack,\n >(next: O, fields: F, opt?: { type: T; multiple: M }): O {\n Object.assign(\n next.#configSet,\n Object.fromEntries(\n Object.entries(fields).map(([name, field]) => {\n this.#validateName(name, field)\n const { type, multiple } = validateFieldMeta(field, opt)\n const value = { ...field, type, multiple }\n validateField(value, type, multiple)\n next.#fields.push({ type: 'config', name, value })\n return [name, value]\n }),\n ),\n )\n return next\n }\n\n #validateName(name: string, field: { short?: string }) {\n if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) {\n throw new TypeError(\n `Invalid option name: ${name}, ` +\n `must be '-' delimited ASCII alphanumeric`,\n )\n }\n if (this.#configSet[name]) {\n throw new TypeError(`Cannot redefine option ${field}`)\n }\n if (this.#shorts[name]) {\n throw new TypeError(\n `Cannot redefine option ${name}, already ` +\n `in use for ${this.#shorts[name]}`,\n )\n }\n if (field.short) {\n if (!/^[a-zA-Z0-9]$/.test(field.short)) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n 'must be 1 ASCII alphanumeric character',\n )\n }\n if (this.#shorts[field.short]) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n `already in use for ${this.#shorts[field.short]}`,\n )\n }\n this.#shorts[field.short] = name\n this.#shorts[name] = name\n }\n }\n\n /**\n * Return the usage banner for the given configuration\n */\n usage(): string {\n if (this.#usage) return this.#usage\n\n let headingLevel = 1\n //@ts-ignore\n const ui = cliui({ width })\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n ui.div({\n padding: [0, 0, 0, 0],\n text: normalize(first.text),\n })\n }\n ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' })\n if (this.#options.usage) {\n ui.div({\n text: this.#options.usage,\n padding: [0, 0, 0, 2],\n })\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n ui.div({\n text: usage,\n padding: [0, 0, 0, 2],\n })\n }\n\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n const print = normalize(maybeDesc.text, maybeDesc.pre)\n start++\n ui.div({ padding: [0, 0, 0, 0], text: print })\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n\n const { rows, maxWidth } = this.#usageRows(start)\n\n // every heading/description after the first gets indented by 2\n // extra spaces.\n for (const row of rows) {\n if (row.left) {\n // If the row is too long, don't wrap it\n // Bump the right-hand side down a line to make room\n const configIndent = indent(Math.max(headingLevel, 2))\n if (row.left.length > maxWidth - 3) {\n ui.div({ text: row.left, padding: [0, 0, 0, configIndent] })\n ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] })\n } else {\n ui.div(\n {\n text: row.left,\n padding: [0, 1, 0, configIndent],\n width: maxWidth,\n },\n { padding: [0, 0, 0, 0], text: row.text },\n )\n }\n if (row.skipLine) {\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n } else {\n if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n // only h1 and h2 have bottom padding\n // h3-h6 do not\n const b = level <= 2 ? 1 : 0\n ui.div({ ...row, padding: [0, 0, b, indent(level)] })\n } else {\n ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] })\n }\n }\n }\n\n return (this.#usage = ui.toString())\n }\n\n /**\n * Return the usage banner markdown for the given configuration\n */\n usageMarkdown(): string {\n if (this.#usageMarkdown) return this.#usageMarkdown\n\n const out: string[] = []\n\n let headingLevel = 1\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n out.push(`# ${normalizeOneLine(first.text)}`)\n }\n out.push('Usage:')\n if (this.#options.usage) {\n out.push(normalizeMarkdown(this.#options.usage, true))\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n out.push(normalizeMarkdown(usage, true))\n }\n\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre))\n start++\n }\n\n const { rows } = this.#usageRows(start)\n\n // heading level in markdown is number of # ahead of text\n for (const row of rows) {\n if (row.left) {\n out.push(\n '#'.repeat(headingLevel + 1) +\n ' ' +\n normalizeOneLine(row.left, true),\n )\n if (row.text) out.push(normalizeMarkdown(row.text))\n } else if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n out.push(\n `${'#'.repeat(headingLevel)} ${normalizeOneLine(\n row.text,\n row.pre,\n )}`,\n )\n } else {\n out.push(normalizeMarkdown(row.text, !!(row as Description).pre))\n }\n }\n\n return (this.#usageMarkdown = out.join('\\n\\n') + '\\n')\n }\n\n #usageRows(start: number) {\n // turn each config type into a row, and figure out the width of the\n // left hand indentation for the option descriptions.\n let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3)))\n let maxWidth = 8\n let prev: Row | TextRow | undefined = undefined\n const rows: (Row | TextRow)[] = []\n for (const field of this.#fields.slice(start)) {\n if (field.type !== 'config') {\n if (prev?.type === 'config') prev.skipLine = true\n prev = undefined\n field.text = normalize(field.text, !!field.pre)\n rows.push(field)\n continue\n }\n const { value } = field\n const desc = value.description || ''\n const mult = value.multiple ? 'Can be set multiple times' : ''\n const opts =\n value.validOptions?.length ?\n `Valid options:${value.validOptions.map(\n v => ` ${JSON.stringify(v)}`,\n )}`\n : ''\n const dmDelim = desc.includes('\\n') ? '\\n\\n' : '\\n'\n const extra = [opts, mult].join(dmDelim).trim()\n const text = (normalize(desc) + dmDelim + extra).trim()\n const hint =\n value.hint ||\n (value.type === 'number' ? 'n'\n : value.type === 'string' ? field.name\n : undefined)\n const short =\n !value.short ? ''\n : value.type === 'boolean' ? `-${value.short} `\n : `-${value.short}<${hint}> `\n const left =\n value.type === 'boolean' ?\n `${short}--${field.name}`\n : `${short}--${field.name}=<${hint}>`\n const row: Row = { text, left, type: 'config' }\n if (text.length > width - maxMax) {\n row.skipLine = true\n }\n if (prev && left.length > maxMax) prev.skipLine = true\n prev = row\n const len = left.length + 4\n if (len > maxWidth && len < maxMax) {\n maxWidth = len\n }\n\n rows.push(row)\n }\n\n return { rows, maxWidth }\n }\n\n /**\n * Return the configuration options as a plain object\n */\n toJSON() {\n return Object.fromEntries(\n Object.entries(this.#configSet).map(([field, def]) => [\n field,\n {\n type: def.type,\n ...(def.multiple ? { multiple: true } : {}),\n ...(def.delim ? { delim: def.delim } : {}),\n ...(def.short ? { short: def.short } : {}),\n ...(def.description ?\n { description: normalize(def.description) }\n : {}),\n ...(def.validate ? { validate: def.validate } : {}),\n ...(def.validOptions ? { validOptions: def.validOptions } : {}),\n ...(def.default !== undefined ? { default: def.default } : {}),\n ...(def.hint ? { hint: def.hint } : {}),\n },\n ]),\n )\n }\n\n /**\n * Custom printer for `util.inspect`\n */\n [inspect.custom](_: number, options: InspectOptions) {\n return `Jack ${inspect(this.toJSON(), options)}`\n }\n}\n\n/**\n * Main entry point. Create and return a {@link Jack} object.\n */\nexport const jack = (options: JackOptions = {}) => new Jack(options)\n\n// Unwrap and un-indent, so we can wrap description\n// strings however makes them look nice in the code.\nconst normalize = (s: string, pre = false) => {\n if (pre)\n // prepend a ZWSP to each line so cliui doesn't strip it.\n return s\n .split('\\n')\n .map(l => `\\u200b${l}`)\n .join('\\n')\n return s\n .split(/^\\s*```\\s*$/gm)\n .map((s, i) => {\n if (i % 2 === 1) {\n if (!s.trim()) {\n return `\\`\\`\\`\\n\\`\\`\\`\\n`\n }\n // outdent the ``` blocks, but preserve whitespace otherwise.\n const split = s.split('\\n')\n // throw out the \\n at the start and end\n split.pop()\n split.shift()\n const si = split.reduce((shortest, l) => {\n /* c8 ignore next */\n const ind = l.match(/^\\s*/)?.[0] ?? ''\n if (ind.length) return Math.min(ind.length, shortest)\n else return shortest\n }, Infinity)\n /* c8 ignore next */\n const i = isFinite(si) ? si : 0\n return (\n '\\n```\\n' +\n split.map(s => `\\u200b${s.substring(i)}`).join('\\n') +\n '\\n```\\n'\n )\n }\n return (\n s\n // remove single line breaks, except for lists\n .replace(/([^\\n])\\n[ \\t]*([^\\n])/g, (_, $1, $2) =>\n !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\\n${$2}`,\n )\n // normalize mid-line whitespace\n .replace(/([^\\n])[ \\t]+([^\\n])/g, '$1 $2')\n // two line breaks are enough\n .replace(/\\n{3,}/g, '\\n\\n')\n // remove any spaces at the start of a line\n .replace(/\\n[ \\t]+/g, '\\n')\n .trim()\n )\n })\n .join('\\n')\n}\n\n// normalize for markdown printing, remove leading spaces on lines\nconst normalizeMarkdown = (s: string, pre: boolean = false): string => {\n const n = normalize(s, pre).replace(/\\\\/g, '\\\\\\\\')\n return pre ?\n `\\`\\`\\`\\n${n.replace(/\\u200b/g, '')}\\n\\`\\`\\``\n : n.replace(/\\n +/g, '\\n').trim()\n}\n\nconst normalizeOneLine = (s: string, pre: boolean = false) => {\n const n = normalize(s, pre)\n .replace(/[\\s\\u200b]+/g, ' ')\n .trim()\n return pre ? `\\`${n}\\`` : n\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jackspeak/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..bb4e5ebf2e8717ae77b5147668685055c064c098 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/parse.js @@ -0,0 +1,443 @@ +var BigNumber = null; + +// regexpxs extracted from +// (c) BSD-3-Clause +// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors + +const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/; +const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/; + +/* + json_parse.js + 2012-06-20 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + This file creates a json_parse function. + During create you can (optionally) specify some behavioural switches + + require('json-bigint')(options) + + The optional options parameter holds switches that drive certain + aspects of the parsing process: + * options.strict = true will warn about duplicate-key usage in the json. + The default (strict = false) will silently ignore those and overwrite + values for keys that are in duplicate use. + + The resulting function follows this signature: + json_parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = json_parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + This is a reference implementation. You are free to copy, modify, or + redistribute. + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ + +/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode, + hasOwnProperty, message, n, name, prototype, push, r, t, text +*/ + +var json_parse = function (options) { + 'use strict'; + + // This is a function that can parse a JSON text, producing a JavaScript + // data structure. It is a simple, recursive descent parser. It does not use + // eval or regular expressions, so it can be used as a model for implementing + // a JSON parser in other languages. + + // We are defining the function inside of another function to avoid creating + // global variables. + + // Default options one can override by passing options to the parse() + var _options = { + strict: false, // not being strict means do not generate syntax errors for "duplicate key" + storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string + alwaysParseAsBig: false, // toggles whether all numbers should be Big + useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js + protoAction: 'error', + constructorAction: 'error', + }; + + // If there are options, then use them to override the default _options + if (options !== undefined && options !== null) { + if (options.strict === true) { + _options.strict = true; + } + if (options.storeAsString === true) { + _options.storeAsString = true; + } + _options.alwaysParseAsBig = + options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false; + _options.useNativeBigInt = + options.useNativeBigInt === true ? options.useNativeBigInt : false; + + if (typeof options.constructorAction !== 'undefined') { + if ( + options.constructorAction === 'error' || + options.constructorAction === 'ignore' || + options.constructorAction === 'preserve' + ) { + _options.constructorAction = options.constructorAction; + } else { + throw new Error( + `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}` + ); + } + } + + if (typeof options.protoAction !== 'undefined') { + if ( + options.protoAction === 'error' || + options.protoAction === 'ignore' || + options.protoAction === 'preserve' + ) { + _options.protoAction = options.protoAction; + } else { + throw new Error( + `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}` + ); + } + } + } + + var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t', + }, + text, + error = function (m) { + // Call error when something is wrong. + + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text, + }; + }, + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + number = function () { + // Parse a number value. + + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error('Bad number'); + } else { + if (BigNumber == null) BigNumber = require('bignumber.js'); + //if (number > 9007199254740992 || number < -9007199254740992) + // Bignumber has stricter check: everything with length > 15 digits disallowed + if (string.length > 15) + return _options.storeAsString + ? string + : _options.useNativeBigInt + ? BigInt(string) + : new BigNumber(string); + else + return !_options.alwaysParseAsBig + ? number + : _options.useNativeBigInt + ? BigInt(number) + : new BigNumber(number); + } + }, + string = function () { + // Parse a string value. + + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + + if (ch === '"') { + var startAt = at; + while (next()) { + if (ch === '"') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + return string; + } + if (ch === '\\') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + startAt = at; + } + } + } + error('Bad string'); + }, + white = function () { + // Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + word = function () { + // true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + value, // Place holder for the value function. + array = function () { + // Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error('Bad array'); + }, + object = function () { + // Parse an object value. + + var key, + object = Object.create(null); + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if ( + _options.strict === true && + Object.hasOwnProperty.call(object, key) + ) { + error('Duplicate key "' + key + '"'); + } + + if (suspectProtoRx.test(key) === true) { + if (_options.protoAction === 'error') { + error('Object contains forbidden prototype property'); + } else if (_options.protoAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else if (suspectConstructorRx.test(key) === true) { + if (_options.constructorAction === 'error') { + error('Object contains forbidden constructor property'); + } else if (_options.constructorAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else { + object[key] = value(); + } + + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error('Bad object'); + }; + + value = function () { + // Parse a JSON value. It could be an object, an array, a string, a number, + // or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } + }; + + // Return the json_parse function. It will have access to all of the above + // functions and variables. + + return function (source, reviver) { + var result; + + text = source + ''; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error('Syntax error'); + } + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' + ? (function walk(holder, key) { + var k, + v, + value = holder[key]; + if (value && typeof value === 'object') { + Object.keys(value).forEach(function (k) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + }); + } + return reviver.call(holder, key, value); + })({ '': result }, '') + : result; + }; +}; + +module.exports = json_parse; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/stringify.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/stringify.js new file mode 100644 index 0000000000000000000000000000000000000000..3bd526993aedd9875b688bd5e3d8363b533e0063 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-bigint/lib/stringify.js @@ -0,0 +1,384 @@ +var BigNumber = require('bignumber.js'); + +/* + json2.js + 2013-05-26 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + See http://www.JSON.org/js.html + + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. + + + This file creates a global JSON object containing two methods: stringify + and parse. + + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. + + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. + + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. + + This method produces a JSON text from a JavaScript value. + + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the value + + For example, this would serialize Dates as ISO strings. + + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; + }; + + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. + + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. + + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. + + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. + + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. + + Example: + + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' + + + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' + + + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); + + + This is a reference implementation. You are free to copy, modify, or + redistribute. +*/ + +/*jslint evil: true, regexp: true */ + +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, prototype, push, replace, slice, stringify, + test, toJSON, toString, valueOf +*/ + + +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. + +var JSON = module.exports; + +(function () { + 'use strict'; + + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + + function quote(string) { + +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' + ? c + : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; + } + + + function str(key, holder) { + +// Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key], + isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value)); + +// If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + +// What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + if (isBigNumber) { + return value; + } else { + return quote(value); + } + + case 'number': + +// JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + case 'bigint': + +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. + + return String(value); + +// If the type is 'object', we might be dealing with an object or an array or +// null. + + case 'object': + +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + + if (!value) { + return 'null'; + } + +// Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + +// Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + +// Join all of the elements together, separated with commas, and wrap them in +// brackets. + + v = partial.length === 0 + ? '[]' + : gap + ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' + : '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + +// If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + if (typeof rep[i] === 'string') { + k = rep[i]; + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + +// Otherwise, iterate through all of the keys in the object. + + Object.keys(value).forEach(function(k) { + var v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + }); + } + +// Join all of the member texts together, separated with commas, +// and wrap them in braces. + + v = partial.length === 0 + ? '{}' + : gap + ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' + : '{' + partial.join(',') + '}'; + gap = mind; + return v; + } + } + +// If the JSON object does not yet have a stringify method, give it one. + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { + +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + +// If the space parameter is a number, make an indent string containing that +// many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + +// If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. + + return str('', {'': value}); + }; + } +}()); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/dependabot.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfa7fa6cba823110c8476a4b4ebcc07cfda12535 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/workflows/ci.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e6de39c02301cb654ab9ba1f69a0f09462853ddc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: + - main + - master + - next + - 'v*' + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + +jobs: + test: + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5 + with: + license-check: true + lint: true + node-versions: '["18", "20", "22"]' diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/anchor.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/anchor.test.js new file mode 100644 index 0000000000000000000000000000000000000000..2af6994c7cfc4414a148f4a01cbcb74c22af969f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/anchor.test.js @@ -0,0 +1,56 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should get a sub schema by sub schema anchor', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaAnchor = '#subSchemaId' + const schema = { + $id: schemaId, + definitions: { + subSchema: { + $id: subSchemaAnchor, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(schemaId, subSchemaAnchor) + assert.equal(resolvedSchema, schema.definitions.subSchema) +}) + +test('should fail to find a schema using an anchor instead of schema id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaAnchor = '#subSchemaId' + const schema = { + $id: schemaId, + definitions: { + subSchema: { + $id: subSchemaAnchor, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + refResolver.addSchema(schema) + + try { + refResolver.getSchema(subSchemaAnchor) + } catch (err) { + assert.equal( + err.message, 'Cannot resolve ref "#subSchemaId#". Schema with id "#subSchemaId" is not found.' + ) + } +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/collisions.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/collisions.test.js new file mode 100644 index 0000000000000000000000000000000000000000..db2e77ad8183cde1fa744dfcc3f6941d95e99de7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/collisions.test.js @@ -0,0 +1,199 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should not throw if there is a same schema with a same id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema) + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(schemaId) + assert.deepStrictEqual(resolvedSchema, schema) +}) + +test('should throw if there is a same schema with a same id (allowEqualDuplicates === false)', () => { + const refResolver = new RefResolver({ + allowEqualDuplicates: false + }) + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema) + + try { + refResolver.addSchema(schema) + assert.fail('should throw') + } catch (err) { + assert.equal(err.message, `There is already another schema with id "${schemaId}".`) + } +}) + +test('should throw if there is another schema with a same id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + + const schema1 = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schema2 = { + $id: schemaId, + type: 'object', + properties: { + bar: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + + try { + refResolver.addSchema(schema2) + assert.fail('should throw') + } catch (err) { + assert.equal(err.message, `There is already another schema with id "${schemaId}".`) + } + + const resolvedSchema = refResolver.getSchema(schemaId) + assert.deepStrictEqual(resolvedSchema, schema1) +}) + +test('should not throw if there is a same sub schema with a same id', () => { + const refResolver = new RefResolver() + + const subSchemaId = 'subSchemaId' + + const schema1 = { + $id: 'schemaId1', + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + + const schema2 = { + $id: 'schemaId2', + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const resolvedSchema = refResolver.getSchema(subSchemaId) + assert.deepStrictEqual(resolvedSchema, schema1.definitions.subSchema) + assert.deepStrictEqual(resolvedSchema, schema2.definitions.subSchema) +}) + +test('should throw if there is another different sub schema with a same id', () => { + const refResolver = new RefResolver() + + const subSchemaId = 'subSchemaId' + + const schema1 = { + $id: 'schemaId1', + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + + const schema2 = { + $id: 'schemaId2', + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + bar: { type: 'string' } + } + } + } + } + + refResolver.addSchema(schema1) + + try { + refResolver.addSchema(schema2) + assert.fail('should throw') + } catch (err) { + assert.equal(err.message, `There is already another schema with id "${subSchemaId}".`) + } + + const resolvedSchema = refResolver.getSchema(subSchemaId) + assert.deepStrictEqual(resolvedSchema, schema1.definitions.subSchema) + assert.notDeepStrictEqual(resolvedSchema, schema2.definitions.subSchema) +}) + +test('should throw if there is the same anchor in the same schema', () => { + const refResolver = new RefResolver() + + const subSchemaAnchor = '#subSchemaId' + + const schema = { + $id: 'schemaId1', + definitions: { + subSchema1: { + $id: subSchemaAnchor, + type: 'object', + properties: { + foo: { type: 'string' } + } + }, + subSchema2: { + $id: subSchemaAnchor, + type: 'object', + properties: { + bar: { type: 'string' } + } + } + } + } + + try { + refResolver.addSchema(schema) + assert.fail('should throw') + } catch (err) { + assert.equal(err.message, 'There is already another anchor "#subSchemaId" in schema "schemaId1".') + } +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/deref-schema.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/deref-schema.test.js new file mode 100644 index 0000000000000000000000000000000000000000..2c0e26e3a0af05764089dcad5520019ceceb3428 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/deref-schema.test.js @@ -0,0 +1,287 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should throw id schema not found', () => { + const refResolver = new RefResolver() + + try { + refResolver.derefSchema('schemaId1') + } catch (err) { + assert.strictEqual(err.message, 'Schema with id "schemaId1" is not found.') + } +}) + +test('should throw id source schema has a key with a same key as ref schema, but diff value', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + $ref: schemaId2, + properties: { + foo: { type: 'string' } + } + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'number' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + try { + refResolver.derefSchema('schemaId1') + assert.fail('should throw error') + } catch (err) { + assert.strictEqual( + err.message, + 'Cannot resolve ref "schemaId2". Property "properties" already exists in schema "schemaId1".' + ) + } +}) + +test('should not throw id source schema has a key with a same key and value as ref schema', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + $ref: schemaId2, + properties: { + foo: { type: 'string' } + } + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + refResolver.derefSchema(schemaId1) + + const derefSchema = refResolver.getDerefSchema(schemaId1) + assert.deepStrictEqual(derefSchema, { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + }) +}) + +test('should get deref schema from the cache', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + $ref: schemaId2, + properties: { + foo: { type: 'string' } + } + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + refResolver.derefSchema(schemaId1) + schema1.properties = {} + refResolver.derefSchema(schemaId1) + + const derefSchema = refResolver.getDerefSchema(schemaId1) + assert.deepStrictEqual(derefSchema, { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + }) +}) + +test('should insert ref symbol', () => { + const refResolver = new RefResolver({ + insertRefSymbol: true + }) + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + $ref: schemaId2 + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + refResolver.derefSchema(schemaId1) + + const derefSchema = refResolver.getDerefSchema(schemaId1) + assert.deepStrictEqual(derefSchema, { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + }, + [Symbol.for('json-schema-ref')]: schemaId2 + }) +}) + +test('should clone schema without refs', () => { + const refResolver = new RefResolver({ + cloneSchemaWithoutRefs: true + }) + + const schemaId = 'schemaId2' + + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema) + refResolver.derefSchema(schemaId) + + schema.properties = null + + const derefSchema = refResolver.getDerefSchema(schemaId) + assert.deepStrictEqual(derefSchema, { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + }) +}) + +test('should throw if target ref schema is not found', () => { + const inputSchema = { + $id: 'http://example.com/root.json', + definitions: { + A: { $id: '#foo' }, + B: { + $id: 'other.json', + definitions: { + X: { $id: '#bar', type: 'string' }, + Y: { $id: 't/inner.json' } + } + }, + C: { + $id: 'urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f', + type: 'object' + } + } + } + + const addresSchema = { + $id: 'relativeAddress', // Note: prefer always absolute URI like: http://mysite.com + type: 'object', + properties: { + zip: { $ref: 'urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f' }, + city2: { $ref: '#foo' } + } + } + + const refResolver = new RefResolver() + refResolver.addSchema(inputSchema) + refResolver.addSchema(addresSchema) + + try { + refResolver.derefSchema('relativeAddress') + } catch (error) { + assert.strictEqual( + error.message, + 'Cannot resolve ref "#foo". Ref "#foo" is not found in schema "relativeAddress".' + ) + } +}) + +test('should deref schema without root $id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId1' + const schema = { + type: 'object', + definitions: { + id1: { + type: 'object', + properties: { + id1: { + type: 'integer' + } + } + } + }, + allOf: [ + { + $ref: '#/definitions/id1' + } + ] + } + + refResolver.addSchema(schema, schemaId) + const derefSchema = refResolver.getDerefSchema(schemaId) + + assert.deepStrictEqual(derefSchema, { + type: 'object', + definitions: { + id1: { + type: 'object', + properties: { + id1: { + type: 'integer' + } + } + } + }, + allOf: [ + { + type: 'object', + properties: { + id1: { + type: 'integer' + } + } + } + ] + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-deref-schema.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-deref-schema.test.js new file mode 100644 index 0000000000000000000000000000000000000000..d7253d6e8c925ebff4597b637fdd5133f7892773 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-deref-schema.test.js @@ -0,0 +1,363 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should resolve reference', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schemaId2 = 'schemaId2' + const schema2 = { + $id: schemaId2, + $ref: schemaId1 + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const derefSchema1 = refResolver.getDerefSchema(schemaId1) + assert.deepStrictEqual(derefSchema1, schema1) + + const derefSchema2 = refResolver.getDerefSchema(schemaId2) + assert.deepStrictEqual(derefSchema2, { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' } + } + }) +}) + +test('should get deref schema by anchor', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + definitions: { + $id: '#subschema', + type: 'object', + properties: { + foo: { type: 'string' }, + bar: { $ref: schemaId2 } + } + } + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + baz: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const derefSubSchema = refResolver.getDerefSchema(schemaId1, '#subschema') + assert.deepStrictEqual(derefSubSchema, { + $id: '#subschema', + type: 'object', + properties: { + foo: { type: 'string' }, + bar: { + type: 'object', + properties: { + baz: { type: 'string' } + } + } + } + }) +}) + +test('should merge main and ref schemas', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schemaId2 = 'schemaId2' + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { $ref: schemaId1 + '#/properties/foo' }, + bar: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const derefSchema1 = refResolver.getDerefSchema(schemaId1) + assert.deepStrictEqual(derefSchema1, schema1) + + const derefSchema2 = refResolver.getDerefSchema(schemaId2) + assert.deepStrictEqual(derefSchema2, { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' }, + bar: { type: 'string' } + } + }) +}) + +test('should merge multiple nested schemas', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schemaId2 = 'schemaId2' + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + foo: { $ref: schemaId1 + '#/properties/foo' }, + bar: { type: 'string' } + } + } + + const schemaId3 = 'schemaId3' + const schema3 = { + $id: schemaId3, + type: 'object', + properties: { + foo: { $ref: schemaId2 + '#/properties/foo' }, + bar: { $ref: schemaId2 + '#/properties/bar' }, + baz: { type: 'string' } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + refResolver.addSchema(schema3) + + const derefSchema3 = refResolver.getDerefSchema(schemaId3) + assert.deepStrictEqual(derefSchema3, { + $id: schemaId3, + type: 'object', + properties: { + foo: { type: 'string' }, + bar: { type: 'string' }, + baz: { type: 'string' } + } + }) +}) + +test('should resolve schema with circular reference', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { $ref: '#' } + } + } + + refResolver.addSchema(schema) + + const derefSchema = refResolver.getDerefSchema(schemaId) + const expectedSchema = { + $id: schemaId, + type: 'object', + properties: { + foo: { + type: 'object', + properties: {} + } + } + } + expectedSchema.properties.foo.properties.foo = expectedSchema.properties.foo + assert.deepStrictEqual(derefSchema, expectedSchema) +}) + +test('should resolve schema with cross circular reference', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + + const schema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { $ref: schemaId2 } + } + } + + const schema2 = { + $id: schemaId2, + type: 'object', + properties: { + bar: { $ref: schemaId1 } + } + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const derefSchema1 = refResolver.getDerefSchema(schemaId1) + const derefSchema2 = refResolver.getDerefSchema(schemaId2) + + const expectedSchema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { + type: 'object', + properties: { + bar: { + type: 'object', + properties: {} + } + } + } + } + } + expectedSchema1.properties.foo.properties.bar.properties.foo = expectedSchema1.properties.foo + + const expectedSchema2 = { + $id: schemaId2, + type: 'object', + properties: { + bar: { + type: 'object', + properties: { + foo: { + type: 'object', + properties: {} + } + } + } + } + } + expectedSchema2.properties.bar.properties.foo.properties.bar = expectedSchema2.properties.bar + + assert.deepStrictEqual(derefSchema1, expectedSchema1) + assert.deepStrictEqual(derefSchema2, expectedSchema2) +}) + +test('should resolve nested multiple times refs', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schema1 = { + $id: schemaId1, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schemaId2 = 'schemaId2' + const schema2 = { + $id: schemaId2, + $ref: schemaId1, + required: ['foo'] + } + + const schemaId3 = 'schemaId3' + const schema3 = { + $id: schemaId3, + $ref: schemaId2, + additionalProperties: false + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + refResolver.addSchema(schema3) + + // Don't switch the order of these two lines. + const derefSchema3 = refResolver.getDerefSchema(schemaId3) + const derefSchema2 = refResolver.getDerefSchema(schemaId2) + + assert.deepStrictEqual(derefSchema2, { + $id: schemaId2, + type: 'object', + properties: { + foo: { type: 'string' } + }, + required: ['foo'] + }) + assert.deepStrictEqual(derefSchema3, { + $id: schemaId3, + type: 'object', + properties: { + foo: { type: 'string' } + }, + required: ['foo'], + additionalProperties: false + }) +}) + +test('should resolve infinite ref chain', () => { + const refResolver = new RefResolver() + + const schemaId1 = 'schemaId1' + const schemaId2 = 'schemaId2' + const schemaId3 = 'schemaId3' + + const schema1 = { + $id: schemaId1, + $ref: schemaId2 + } + + const schema2 = { + $id: schemaId2, + $ref: schemaId3 + } + + const schema3 = { + $id: schemaId3, + $ref: schemaId1 + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + refResolver.addSchema(schema3) + + const derefSchema1 = refResolver.getDerefSchema(schemaId1) + const derefSchema2 = refResolver.getDerefSchema(schemaId2) + const derefSchema3 = refResolver.getDerefSchema(schemaId3) + + assert.deepStrictEqual(derefSchema1, { + $id: schemaId1 + }) + + assert.deepStrictEqual(derefSchema2, { + $id: schemaId2 + }) + + assert.deepStrictEqual(derefSchema3, { + $id: schemaId3 + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-dependencies.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-dependencies.test.js new file mode 100644 index 0000000000000000000000000000000000000000..e0a4c0f9328c6c790bfeb6d39082244f0032129d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-dependencies.test.js @@ -0,0 +1,158 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should return all nested schema dependencies', () => { + const refResolver = new RefResolver() + + const schema1Id = 'schemaId1' + const schema1 = { + $id: schema1Id, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schema2Id = 'schemaId2' + const schema2 = { + $id: schema2Id, + $ref: schema1Id + } + + const schema3Id = 'schemaId3' + const schema3 = { + $id: schema3Id, + $ref: schema2Id + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + refResolver.addSchema(schema3) + + const schema1Deps = refResolver.getSchemaDependencies(schema1Id) + assert.deepStrictEqual(schema1Deps, {}) + + const schema2Deps = refResolver.getSchemaDependencies(schema2Id) + assert.deepStrictEqual(schema2Deps, { [schema1Id]: schema1 }) + + const schema3Deps = refResolver.getSchemaDependencies(schema3Id) + assert.deepStrictEqual(schema3Deps, { + [schema1Id]: schema1, + [schema2Id]: schema2 + }) +}) + +test('should resolve a dependency to a subschema', () => { + const refResolver = new RefResolver() + + const schema1Id = 'schemaId1' + const subSchema1Id = 'subSchemaId1' + const schema1 = { + $id: schema1Id, + definitions: { + subSchema: { + $id: subSchema1Id, + type: 'object', + properties: { + bar: { type: 'string' } + } + } + } + } + + const schema2Id = 'schemaId2' + const schema2 = { + $id: schema2Id, + $ref: subSchema1Id + '#/definitions/subSchema' + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const schema1Deps = refResolver.getSchemaDependencies(schema1Id) + assert.deepStrictEqual(schema1Deps, {}) + + const schema2Deps = refResolver.getSchemaDependencies(schema2Id) + assert.deepStrictEqual(schema2Deps, { [subSchema1Id]: schema1.definitions.subSchema }) +}) + +test('should resolve a dependency with a json path', () => { + const refResolver = new RefResolver() + + const schema1Id = 'schemaId1' + const subSchema1Id = 'subSchemaId1' + const schema1 = { + $id: schema1Id, + definitions: { + subSchema: { + $id: subSchema1Id, + type: 'object', + properties: { + bar: { type: 'string' } + } + } + } + } + + const schema2Id = 'schemaId2' + const schema2 = { + $id: schema2Id, + $ref: schema1Id + '#/definitions/subSchema' + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + + const schema1Deps = refResolver.getSchemaDependencies(schema1Id) + assert.deepStrictEqual(schema1Deps, {}) + + const schema2Deps = refResolver.getSchemaDependencies(schema2Id) + assert.deepStrictEqual(schema2Deps, { [schema1Id]: schema1 }) +}) + +test('should include dependency schema only once', () => { + const refResolver = new RefResolver() + + const schema1Id = 'schemaId1' + const schema1 = { + $id: schema1Id, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + const schema2Id = 'schemaId2' + const schema2 = { + $id: schema2Id, + $ref: schema1Id + } + + const schema3Id = 'schemaId3' + const schema3 = { + $id: schema3Id, + allOf: [ + { $ref: schema1Id }, + { $ref: schema2Id } + ] + } + + refResolver.addSchema(schema1) + refResolver.addSchema(schema2) + refResolver.addSchema(schema3) + + const schema1Deps = refResolver.getSchemaDependencies(schema1Id) + assert.deepStrictEqual(schema1Deps, {}) + + const schema2Deps = refResolver.getSchemaDependencies(schema2Id) + assert.deepStrictEqual(schema2Deps, { [schema1Id]: schema1 }) + + const schema3Deps = refResolver.getSchemaDependencies(schema3Id) + assert.deepStrictEqual(schema3Deps, { + [schema1Id]: schema1, + [schema2Id]: schema2 + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-refs.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-refs.test.js new file mode 100644 index 0000000000000000000000000000000000000000..1873a4a5daec5ac525bef459027f250027529a2f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema-refs.test.js @@ -0,0 +1,87 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should return schema refs', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: 'schemaId', + type: 'object', + properties: { + foo: { $ref: 'schemaId2#/definitions/foo' }, + bar: { $ref: 'schemaId3#/definitions/bar' }, + baz: { + type: 'object', + properties: { + qux: { $ref: 'schemaId4#/definitions/qux' } + } + } + } + } + + refResolver.addSchema(schema) + + const schemaRefs = refResolver.getSchemaRefs(schemaId) + assert.deepStrictEqual(schemaRefs, [ + { schemaId: 'schemaId2', jsonPointer: '#/definitions/foo' }, + { schemaId: 'schemaId3', jsonPointer: '#/definitions/bar' }, + { schemaId: 'schemaId4', jsonPointer: '#/definitions/qux' } + ]) +}) + +test('should return nested schema refs', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaId = 'subSchemaId' + + const schema = { + $id: 'schemaId', + $ref: 'schemaId2#/definitions/subschema', + definitions: { + subschema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { $ref: 'schemaId2#/definitions/foo' }, + bar: { $ref: 'schemaId3#/definitions/bar' }, + baz: { + type: 'object', + properties: { + qux: { $ref: 'schemaId4#/definitions/qux' } + } + } + } + } + } + } + + refResolver.addSchema(schema) + + const schemaRefs = refResolver.getSchemaRefs(schemaId) + assert.deepStrictEqual(schemaRefs, [ + { schemaId: 'schemaId2', jsonPointer: '#/definitions/subschema' } + ]) + + const subSchemaRefs = refResolver.getSchemaRefs(subSchemaId) + assert.deepStrictEqual(subSchemaRefs, [ + { schemaId: 'schemaId2', jsonPointer: '#/definitions/foo' }, + { schemaId: 'schemaId3', jsonPointer: '#/definitions/bar' }, + { schemaId: 'schemaId4', jsonPointer: '#/definitions/qux' } + ]) +}) + +test('should throw is schema does not exist', () => { + const refResolver = new RefResolver() + + try { + refResolver.getSchemaRefs('schemaId') + assert.fail('should throw error') + } catch (error) { + assert.equal(error.message, 'Schema with id "schemaId" is not found.') + } +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a7849e902d341e83ced11745569a86fafef5fee8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/get-schema.test.js @@ -0,0 +1,222 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should get schema by schema id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(schemaId) + assert.equal(resolvedSchema, schema) +}) + +test('should return null if schema was not found', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(schemaId, '#/definitions/missingSchema') + assert.equal(resolvedSchema, null) +}) + +test('should get a sub schema by sub schema id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaId = 'subSchemaId' + const schema = { + $id: schemaId, + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(subSchemaId) + assert.equal(resolvedSchema, schema.definitions.subSchema) +}) + +test('should get a sub schema by schema json pointer', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaId = 'subSchemaId' + const schema = { + $id: schemaId, + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + refResolver.addSchema(schema) + + const jsonPointer = '#/definitions/subSchema' + const resolvedSchema = refResolver.getSchema(schemaId, jsonPointer) + assert.equal(resolvedSchema, schema.definitions.subSchema) +}) + +test('should get a sub schema by sub schema json pointer', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const subSchemaId = 'subSchemaId' + const schema = { + $id: schemaId, + definitions: { + subSchema: { + $id: subSchemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + } + } + refResolver.addSchema(schema) + + const jsonPointer = '#/properties/foo' + const resolvedSchema = refResolver.getSchema(subSchemaId, jsonPointer) + assert.equal(resolvedSchema, schema.definitions.subSchema.properties.foo) +}) + +test('should handle null schema correctly', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: schemaId, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema) + + const resolvedSchema = refResolver.getSchema(schemaId) + assert.equal(resolvedSchema, schema) +}) + +test('should add a schema without root $id', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema, schemaId) + + const resolvedSchema = refResolver.getSchema(schemaId) + assert.equal(resolvedSchema, schema) +}) + +test('root $id has higher priority than a schemaId argument', () => { + const refResolver = new RefResolver() + + const schemaIdProperty = 'schemaId1' + const schemaIdArgument = 'schemaId2' + + const schema = { + $id: schemaIdProperty, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema, schemaIdArgument) + + const resolvedSchema = refResolver.getSchema(schemaIdProperty) + assert.equal(resolvedSchema, schema) + + try { + refResolver.getSchema(schemaIdArgument) + assert.fail('should have thrown an error') + } catch (err) { + assert.equal( + err.message, + `Cannot resolve ref "${schemaIdArgument}#". Schema with id "${schemaIdArgument}" is not found.` + ) + } +}) + +test('should not use a root $id if it is an anchor', () => { + const refResolver = new RefResolver() + + const schemaIdProperty = '#schemaId1' + const schemaIdArgument = 'schemaId2' + + const schema = { + $id: schemaIdProperty, + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema, schemaIdArgument) + + try { + refResolver.getSchema(schemaIdProperty) + assert.fail('should have thrown an error') + } catch (err) { + assert.equal( + err.message, + `Cannot resolve ref "${schemaIdProperty}#". Schema with id "${schemaIdProperty}" is not found.` + ) + } + + const resolvedSchema2 = refResolver.getSchema(schemaIdArgument) + assert.equal(resolvedSchema2, schema) + + const resolvedSchema3 = refResolver.getSchema(schemaIdArgument, schemaIdProperty) + assert.equal(resolvedSchema3, schema) +}) + +test('should return null if sub schema by json pointer is not found', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: 'schemaId', + type: 'object', + properties: { + foo: { type: 'string' } + } + } + + refResolver.addSchema(schema) + + const schemaRefs = refResolver.getSchema(schemaId, '#/missingSchema') + assert.equal(schemaRefs, null) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/has-schema.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/has-schema.test.js new file mode 100644 index 0000000000000000000000000000000000000000..490df2982a75529d590d53ae92cfa626a857a0af --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/test/has-schema.test.js @@ -0,0 +1,28 @@ +'use strict' + +const assert = require('node:assert/strict') +const { test } = require('node:test') +const { RefResolver } = require('../index.js') + +test('should return true if schema exists', () => { + const refResolver = new RefResolver() + + const schemaId = 'schemaId' + const schema = { + $id: 'schemaId', + type: 'object', + properties: { + foo: { type: 'string' } + } + } + refResolver.addSchema(schema) + + const hasSchema = refResolver.hasSchema(schemaId) + assert.strictEqual(hasSchema, true) +}) + +test('should return false if schema does not exist', () => { + const refResolver = new RefResolver() + const hasSchema = refResolver.hasSchema('schemaId') + assert.strictEqual(hasSchema, false) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a802c397452ef1602e3aa4cba43126bfb2de05f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.d.ts @@ -0,0 +1,67 @@ +/** + * RefResolver class is used to resolve JSON references. + * @class + * @constructor + */ +declare class RefResolver { + /** + * @param {object} opts - Options for the resolver. + * @param {boolean} opts.allowEqualDuplicates - Whether to allow schemas with equal ids to be added to the resolver. + */ + constructor (opts?: { allowEqualDuplicates?: boolean }) + + /** + * Adds the given schema to the resolver. + * @param {any} schema - The schema to be added. + * @param {string} schemaId - The default schema id of the schema to be added. + */ + addSchema (schema: any, schemaId?: string): void + + /** + * Returns the schema by the given schema id and jsonPointer. + * If jsonPointer is not provided, returns the root schema. + * @param {string} schemaId - The schema id of the schema to be returned. + * @param {string} jsonPointer - The jsonPointer of the schema to be returned. + * @returns {any | null} The schema by the given schema id and jsonPointer. + */ + getSchema (schemaId: string, jsonPointer?: string): any | null + + /** + * Returns true if the schema by the given schema id is added to the resolver. + * @param {string} schemaId - The schema id of the schema to be checked. + * @returns {boolean} True if the schema by the given schema id is added to the resolver. + */ + hasSchema (schemaId: string): boolean + + /** + * Returns the schema references of the schema by the given schema id. + * @param {string} schemaId - The schema id of the schema whose references are to be returned. + * @returns {Array<{ schemaId: string; jsonPointer: string }>} The schema references of the schema by the given schema id. + */ + getSchemaRefs (schemaId: string): { schemaId: string; jsonPointer: string }[] + + /** + * Returns all the schema dependencies of the schema by the given schema id. + * @param {string} schemaId - The schema id of the schema whose dependencies are to be returned. + * @returns {object} The schema dependencies of the schema by the given schema id. + */ + getSchemaDependencies (schemaId: string): { [key: string]: any } + + /** + * Dereferences the schema by the given schema id. + * @param {string} schemaId - The schema id of the schema to be dereferenced. + */ + derefSchema (schemaId: string): void + + /** + * Returns the dereferenced schema by the given schema id and jsonPointer. + * If jsonPointer is not provided, returns the dereferenced root schema. + * If the schema is not dereferenced yet, dereferences it first. + * @param {string} schemaId - The schema id of the schema to be returned. + * @param {string} jsonPointer - The jsonPointer of the schema to be returned. + * @returns {any | null} The dereferenced schema by the given schema id and jsonPointer. + */ + getDerefSchema (schemaId: string, jsonPointer?: string): any | null +} + +export { RefResolver } diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.test-d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.test-d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9de4ed46c2c141fc4538c909d3cba0b44e5afc29 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-ref-resolver/types/index.test-d.ts @@ -0,0 +1,23 @@ +import { RefResolver } from '..' +import { expectType } from 'tsd' + +const resolver = new RefResolver({ + allowEqualDuplicates: true +}) + +expectType(resolver.addSchema({})) +expectType(resolver.addSchema({}, 'schemaId')) + +expectType(resolver.getSchema('schemaId')) +expectType(resolver.getSchema('schemaId', 'jsonPointer')) + +expectType(resolver.hasSchema('schemaId')) + +expectType<{ schemaId: string; jsonPointer: string }[]>(resolver.getSchemaRefs('schemaId')) + +expectType<{ [key: string]: any }>(resolver.getSchemaDependencies('schemaId')) + +expectType(resolver.derefSchema('schemaId')) + +expectType(resolver.getDerefSchema('schemaId')) +expectType(resolver.getDerefSchema('schemaId', 'jsonPointer')) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/FUNDING.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..44f80f417e337a906a3b9add76031c86d2b711a1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: epoberezkin +tidelift: "npm/json-schema-traverse" diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/build.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/build.yml new file mode 100644 index 0000000000000000000000000000000000000000..f8ef5ba80e38fcda634d962658df3168dbc07aee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: build + +on: + push: + branches: [master] + pull_request: + branches: ["*"] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/publish.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/publish.yml new file mode 100644 index 0000000000000000000000000000000000000000..924825b12dccc025c5b642798312759aef3e3c0a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: publish + +on: + release: + types: [published] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + - run: npm install + - run: npm test + - name: Publish beta version to npm + if: "github.event.release.prerelease" + run: npm publish --tag beta + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish to npm + if: "!github.event.release.prerelease" + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/.eslintrc.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/.eslintrc.yml new file mode 100644 index 0000000000000000000000000000000000000000..3344da7eb323ba9a85c74de6ff6f70738d8bd040 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/.eslintrc.yml @@ -0,0 +1,6 @@ +parserOptions: + ecmaVersion: 6 +globals: + beforeEach: false + describe: false + it: false diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/fixtures/schema.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/fixtures/schema.js new file mode 100644 index 0000000000000000000000000000000000000000..c51430cdc3d34f28f8010c3c7c472f3cfbf84bd0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/fixtures/schema.js @@ -0,0 +1,125 @@ +'use strict'; + +var schema = { + additionalItems: subschema('additionalItems'), + items: subschema('items'), + contains: subschema('contains'), + additionalProperties: subschema('additionalProperties'), + propertyNames: subschema('propertyNames'), + not: subschema('not'), + allOf: [ + subschema('allOf_0'), + subschema('allOf_1'), + { + items: [ + subschema('items_0'), + subschema('items_1'), + ] + } + ], + anyOf: [ + subschema('anyOf_0'), + subschema('anyOf_1'), + ], + oneOf: [ + subschema('oneOf_0'), + subschema('oneOf_1'), + ], + definitions: { + foo: subschema('definitions_foo'), + bar: subschema('definitions_bar'), + }, + properties: { + foo: subschema('properties_foo'), + bar: subschema('properties_bar'), + }, + patternProperties: { + foo: subschema('patternProperties_foo'), + bar: subschema('patternProperties_bar'), + }, + dependencies: { + foo: subschema('dependencies_foo'), + bar: subschema('dependencies_bar'), + }, + required: ['foo', 'bar'] +}; + + +function subschema(keyword) { + var sch = { + properties: {}, + additionalProperties: false, + additionalItems: false, + anyOf: [ + {format: 'email'}, + {format: 'hostname'} + ] + }; + sch.properties['foo_' + keyword] = {title: 'foo'}; + sch.properties['bar_' + keyword] = {title: 'bar'}; + return sch; +} + + +module.exports = { + schema: schema, + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]] + .concat(expectedCalls('additionalItems')) + .concat(expectedCalls('items')) + .concat(expectedCalls('contains')) + .concat(expectedCalls('additionalProperties')) + .concat(expectedCalls('propertyNames')) + .concat(expectedCalls('not')) + .concat(expectedCallsChild('allOf', 0)) + .concat(expectedCallsChild('allOf', 1)) + .concat([ + [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2], + [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0], + [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'], + [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'], + [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0], + [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1], + + [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1], + [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'], + [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'], + [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0], + [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1] + ]) + .concat(expectedCallsChild('anyOf', 0)) + .concat(expectedCallsChild('anyOf', 1)) + .concat(expectedCallsChild('oneOf', 0)) + .concat(expectedCallsChild('oneOf', 1)) + .concat(expectedCallsChild('definitions', 'foo')) + .concat(expectedCallsChild('definitions', 'bar')) + .concat(expectedCallsChild('properties', 'foo')) + .concat(expectedCallsChild('properties', 'bar')) + .concat(expectedCallsChild('patternProperties', 'foo')) + .concat(expectedCallsChild('patternProperties', 'bar')) + .concat(expectedCallsChild('dependencies', 'foo')) + .concat(expectedCallsChild('dependencies', 'bar')) +}; + + +function expectedCalls(keyword) { + return [ + [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined], + [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`], + [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`], + [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0], + [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1] + ]; +} + + +function expectedCallsChild(keyword, i) { + return [ + [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i], + [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`], + [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`], + [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0], + [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1] + ]; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/index.spec.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/index.spec.js new file mode 100644 index 0000000000000000000000000000000000000000..c76b64fc8496ca677ca2d9c0cb620a565530f3fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json-schema-traverse/spec/index.spec.js @@ -0,0 +1,171 @@ +'use strict'; + +var traverse = require('../index'); +var assert = require('assert'); + +describe('json-schema-traverse', function() { + var calls; + + beforeEach(function() { + calls = []; + }); + + it('should traverse all keywords containing schemas recursively', function() { + var schema = require('./fixtures/schema').schema; + var expectedCalls = require('./fixtures/schema').expectedCalls; + + traverse(schema, {cb: callback}); + assert.deepStrictEqual(calls, expectedCalls); + }); + + describe('Legacy v0.3.1 API', function() { + it('should traverse all keywords containing schemas recursively', function() { + var schema = require('./fixtures/schema').schema; + var expectedCalls = require('./fixtures/schema').expectedCalls; + + traverse(schema, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + it('should work when an options object is provided', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var schema = require('./fixtures/schema').schema; + var expectedCalls = require('./fixtures/schema').expectedCalls; + + traverse(schema, {}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + }); + + + describe('allKeys option', function() { + var schema = { + someObject: { + minimum: 1, + maximum: 2 + } + }; + + it('should traverse objects with allKeys: true option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined], + [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined] + ]; + + traverse(schema, {allKeys: true, cb: callback}); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects with allKeys: false option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, {allKeys: false, cb: callback}); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects without allKeys option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, {cb: callback}); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT travers objects in standard keywords which value is not a schema', function() { + var schema2 = { + const: {foo: 'bar'}, + enum: ['a', 'b'], + required: ['foo'], + another: { + + }, + patternProperties: {}, // will not traverse - no properties + dependencies: true, // will not traverse - invalid + properties: { + smaller: { + type: 'number' + }, + larger: { + type: 'number', + minimum: {$data: '1/smaller'} + } + } + }; + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema2, '', schema2, undefined, undefined, undefined, undefined], + [schema2.another, '/another', schema2, '', 'another', schema2, undefined], + [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'], + [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'], + ]; + + traverse(schema2, {allKeys: true, cb: callback}); + assert.deepStrictEqual(calls, expectedCalls); + }); + }); + + describe('pre and post', function() { + var schema = { + type: 'object', + properties: { + name: {type: 'string'}, + age: {type: 'number'} + } + }; + + it('should traverse schema in pre-order', function() { + traverse(schema, {cb: {pre}}); + var expectedCalls = [ + ['pre', schema, '', schema, undefined, undefined, undefined, undefined], + ['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'], + ['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'], + ]; + assert.deepStrictEqual(calls, expectedCalls); + }); + + it('should traverse schema in post-order', function() { + traverse(schema, {cb: {post}}); + var expectedCalls = [ + ['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'], + ['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'], + ['post', schema, '', schema, undefined, undefined, undefined, undefined], + ]; + assert.deepStrictEqual(calls, expectedCalls); + }); + + it('should traverse schema in pre- and post-order at the same time', function() { + traverse(schema, {cb: {pre, post}}); + var expectedCalls = [ + ['pre', schema, '', schema, undefined, undefined, undefined, undefined], + ['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'], + ['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'], + ['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'], + ['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'], + ['post', schema, '', schema, undefined, undefined, undefined, undefined], + ]; + assert.deepStrictEqual(calls, expectedCalls); + }); + }); + + function callback() { + calls.push(Array.prototype.slice.call(arguments)); + } + + function pre() { + calls.push(['pre'].concat(Array.prototype.slice.call(arguments))); + } + + function post() { + calls.push(['post'].concat(Array.prototype.slice.call(arguments))); + } +}); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..bf86533e36ceb54e825468ea611a8c4b5051308e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.js @@ -0,0 +1,1737 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.JSON5 = factory()); +}(this, (function () { 'use strict'; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.6.5' }; + if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef + }); + var _core_1 = _core.version; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); } + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document) && _isObject(document.createElement); + var _domCreate = function (it) { + return is ? document.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) { return it; } + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) { try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } } + if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); } + if ('value' in Attributes) { O[P] = Attributes.value; } + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var _library = false; + + var _shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: _core.version, + mode: _library ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); + }); + + var _functionToString = _shared('native-function-to-string', Function.toString); + + var _redefine = createCommonjsModule(function (module) { + var SRC = _uid('src'); + + var TO_STRING = 'toString'; + var TPL = ('' + _functionToString).split(TO_STRING); + + _core.inspectSource = function (it) { + return _functionToString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); } + if (O[key] === val) { return; } + if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); } + if (O === _global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + _hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + _hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || _functionToString.call(this); + }); + }); + + var _aFunction = function (it) { + if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); } + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) { return fn; } + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) { source = name; } + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // extend global + if (target) { _redefine(target, key, out, type & $export.U); } + // export + if (exports[key] != out) { _hide(exports, key, exp); } + if (IS_PROTO && expProto[key] != out) { expProto[key] = out; } + } + }; + _global.core = _core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) { throw TypeError("Can't call method on " + it); } + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; } + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var $at = _stringAt(false); + _export(_export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } + }); + + var codePointAt = _core.String.codePointAt; + + var max = Math.max; + var min = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + var arguments$1 = arguments; + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments$1[i++]; + if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); } + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + + var fromCodePoint = _core.String.fromCodePoint; + + // This is a generated file. Do not edit. + var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0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u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB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DF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098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8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\u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CC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + + var unicode = { + Space_Separator: Space_Separator, + ID_Start: ID_Start, + ID_Continue: ID_Continue + }; + + var util = { + isSpaceSeparator: function isSpaceSeparator (c) { + return typeof c === 'string' && unicode.Space_Separator.test(c) + }, + + isIdStartChar: function isIdStartChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar: function isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit: function isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit: function isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, + }; + + var source; + var parseState; + var stack; + var pos; + var line; + var column; + var token; + var key; + var root; + + var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root + }; + + function internalize (holder, name, reviver) { + var value = holder[name]; + if (value != null && typeof value === 'object') { + if (Array.isArray(value)) { + for (var i = 0; i < value.length; i++) { + var key = String(i); + var replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + Object.defineProperty(value, key, { + value: replacement, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + } else { + for (var key$1 in value) { + var replacement$1 = internalize(value, key$1, reviver); + if (replacement$1 === undefined) { + delete value[key$1]; + } else { + Object.defineProperty(value, key$1, { + value: replacement$1, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + } + } + + return reviver.call(holder, name, value) + } + + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + + function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + var token = lexStates[lexState](); + if (token) { + return token + } + } + } + + function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } + } + + function read () { + var c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c + } + + var lexStates = { + default: function default$1 () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment: function comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment: function multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk: function multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment: function singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value: function value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape: function identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName: function identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape: function identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign: function sign$1 () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero: function zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger: function decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading: function decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint: function decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction: function decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent: function decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign: function decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger: function decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal: function hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger: function hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string: function string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start: function start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName: function beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName: function afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue: function beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue: function afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue: function beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue: function afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end: function end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, + }; + + function newToken (type, value) { + return { + type: type, + value: value, + line: line, + column: column, + } + } + + function literal (s) { + for (var i = 0, list = s; i < list.length; i += 1) { + var c = list[i]; + + var p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } + } + + function escape () { + var c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() + } + + function hexEscape () { + var buffer = ''; + var c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + function unicodeEscape () { + var buffer = ''; + var count = 4; + + while (count-- > 0) { + var c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + var parseStates = { + start: function start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName: function beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName: function afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue: function beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue: function beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue: function afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue: function afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end: function end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, + }; + + function push () { + var value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + var parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + Object.defineProperty(parent, key, { + value: value, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + } + + function pop () { + stack.pop(); + + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + + // This code is unreachable. + // function invalidParseState () { + // return new Error(`JSON5: invalid parse state '${parseState}'`) + // } + + // This code is unreachable. + // function invalidLexState (state) { + // return new Error(`JSON5: invalid lex state '${state}'`) + // } + + function invalidChar (c) { + if (c === undefined) { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column)) + } + + function invalidEOF () { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + // This code is unreachable. + // function invalidToken () { + // if (token.type === 'eof') { + // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + // } + + // const c = String.fromCodePoint(token.value.codePointAt(0)) + // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) + // } + + function invalidIdentifier () { + column -= 5; + return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column)) + } + + function separatorChar (c) { + console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping")); + } + + function formatChar (c) { + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c + } + + function syntaxError (message) { + var err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err + } + + var stringify = function stringify (value, replacer, space) { + var stack = []; + var indent = ''; + var propertyList; + var replacerFunc; + var gap = ''; + var quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (var i = 0, list = replacer; i < list.length; i += 1) { + var v = list[i]; + + var item = (void 0); + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + var value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + var quotes = { + "'": 0.1, + '"': 0.2, + }; + + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + var product = ''; + + for (var i = 0; i < value.length; i++) { + var c = value[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; }); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var keys = propertyList || Object.keys(value); + var partial = []; + for (var i = 0, list = keys; i < list.length; i += 1) { + var key = list[i]; + + var propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + var member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + var final; + if (partial.length === 0) { + final = '{}'; + } else { + var properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + var separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + var firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (var i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var partial = []; + for (var i = 0; i < value.length; i++) { + var propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + var final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + var properties = partial.join(','); + final = '[' + properties + ']'; + } else { + var separator = ',\n' + indent; + var properties$1 = partial.join(separator); + final = '[\n' + indent + properties$1 + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } + }; + + var JSON5 = { + parse: parse, + stringify: stringify, + }; + + var lib = JSON5; + + var es5 = lib; + + return es5; + +}))); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.min.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.min.js new file mode 100644 index 0000000000000000000000000000000000000000..ddce3e2d49c3227cd05a541ed72278d5e8f4f773 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/dist/index.min.js @@ -0,0 +1 @@ +!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),r=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),t=function(u){if(!r(u))throw TypeError(u+" is not an object!");return u},n=function(u){try{return!!u()}catch(u){return!0}},F=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=r(C)&&r(C.createElement),i=!F&&!n(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:F?Object.defineProperty:function(u,D,e){if(t(u),D=function(u,D){if(!r(u))return u;var e,t;if(D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;if("function"==typeof(e=u.valueOf)&&!r(t=e.call(u)))return t;if(!D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;throw TypeError("Can't convert object to primitive value")}(D,!0),t(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=F?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var r=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return r[u]||(r[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var r,t="Symbol(".concat(void 0===(r="src")?"":r,")_",(++s+f).toString(36)),n=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,r,F){var C="function"==typeof r;C&&(B(r,"name")||a(r,"name",e)),u[e]!==r&&(C&&(B(r,t)||a(r,t,u[e]?""+u[e]:n.join(String(e)))),u===D?u[e]=r:F?u[e]?u[e]=r:a(u,e,r):(delete u[e],a(u,e,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,r){return u.call(D,e,r)};case 3:return function(e,r,t){return u.call(D,e,r,t)}}return function(){return u.apply(D,arguments)}},p=function(u,r,t){var n,F,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[r]||(D[r]={}):(D[r]||{}).prototype,f=E?e:e[r]||(e[r]={}),l=f.prototype||(f.prototype={});for(n in E&&(t=r),t)C=((F=!i&&s&&void 0!==s[n])?s:t)[n],A=B&&F?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,n,C,u&p.U),f[n]!=C&&a(f,n,A),c&&l[n]!=C&&(l[n]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},b=(h=!1,function(u,D){var e,r,t=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),n=w(D),F=t.length;return n<0||n>=F?h?"":void 0:(e=t.charCodeAt(n))<55296||e>56319||n+1===F||(r=t.charCodeAt(n+1))<56320||r>57343?h?t.charAt(n):e:h?t.slice(n,n+2):r-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return b(this,u)}});e.String.codePointAt;var S=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,r,t=arguments,n=[],F=arguments.length,C=0;F>C;){if(D=+t[C++],r=1114111,((e=w(e=D))<0?S(e+r,0):x(e,r))!==D)throw RangeError(D+" is not a valid code point");n.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return n.join("")}});e.String.fromCodePoint;var _,O,j,I,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09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065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFD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F33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\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DC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[I])return String.fromCodePoint(_.codePointAt(I))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(I+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[O]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw ru(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw ru(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw ru(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw ru(W())},identifierNameStartEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw nu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw nu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw ru(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw ru(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw ru(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw ru(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw ru(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw ru(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw ru(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw ru(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+Fu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw ru(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw ru(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw ru(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw ru(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw ru(W())},end:function(){throw ru(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D0;){var e=q();if(!U.isHexDigit(e))throw ru(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw tu();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(O="afterPropertyName");case"punctuator":return void eu();case"eof":throw tu()}},afterPropertyName:function(){if("eof"===M.type)throw tu();O="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw tu();Du()},beforeArrayValue:function(){if("eof"===M.type)throw tu();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=j[j.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,k,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)j.push(u),O=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=j[j.length-1];O=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){j.pop();var u=j[j.length-1];O=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function ru(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+Fu(u)+"' at "+V+":"+J)}function tu(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function nu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function Fu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),O="start",j=[],I=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[O]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,r){var t=D[e];if(null!=t&&"object"==typeof t)if(Array.isArray(t))for(var n=0;n0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),t&&(e=t.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(F.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,r=[],t=0;t=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,t,n=r||Object.keys(u),i=[],E=0,o=n;E"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)if(Array.isArray(r))for(let u=0;u0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,key,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),n("",{"":u});function n(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?E(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=n(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function E(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;tD[u]= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, +}; + +let source; +let parseState; +let stack; +let pos; +let line; +let column; +let token; +let key; +let root; + +var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +}; + +function internalize (holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === 'object') { + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i++) { + const key = String(i); + const replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + Object.defineProperty(value, key, { + value: replacement, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + } else { + for (const key in value) { + const replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + Object.defineProperty(value, key, { + value: replacement, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState; +let buffer; +let doubleQuote; +let sign; +let c; + +function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState](); + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +}; + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } +} + +function escape () { + const c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = ''; + let c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = ''; + let count = 4; + + while (count-- > 0) { + const c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +}; + +function push () { + let value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + Object.defineProperty(parent, key, { + value, + writable: true, + enumerable: true, + configurable: true, + }); + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } +} + +function pop () { + stack.pop(); + + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err +} + +var stringify = function stringify (value, replacer, space) { + const stack = []; + let indent = ''; + let propertyList; + let replacerFunc; + let gap = ''; + let quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + }; + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + let product = ''; + + for (let i = 0; i < value.length; i++) { + const c = value[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let keys = propertyList || Object.keys(value); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + let member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + let final; + if (partial.length === 0) { + final = '{}'; + } else { + let properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + let separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let partial = []; + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + let final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + let properties = partial.join(','); + final = '[' + properties + ']'; + } else { + let separator = ',\n' + indent; + let properties = partial.join(separator); + final = '[\n' + indent + properties + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } +}; + +const JSON5 = { + parse, + stringify, +}; + +var lib = JSON5; + +export default lib; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/cli.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/cli.js new file mode 100644 index 0000000000000000000000000000000000000000..93cb80921e21aed8acfdd81bf5c096138f2e228f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/cli.js @@ -0,0 +1,152 @@ +#!/usr/bin/env node + +const fs = require('fs') +const path = require('path') +const pkg = require('../package.json') +const JSON5 = require('./') + +const argv = parseArgs() + +if (argv.version) { + version() +} else if (argv.help) { + usage() +} else { + const inFilename = argv.defaults[0] + + let readStream + if (inFilename) { + readStream = fs.createReadStream(inFilename) + } else { + readStream = process.stdin + } + + let json5 = '' + readStream.on('data', data => { + json5 += data + }) + + readStream.on('end', () => { + let space + if (argv.space === 't' || argv.space === 'tab') { + space = '\t' + } else { + space = Number(argv.space) + } + + let value + try { + value = JSON5.parse(json5) + if (!argv.validate) { + const json = JSON.stringify(value, null, space) + + let writeStream + + // --convert is for backward compatibility with v0.5.1. If + // specified with and not --out-file, then a file with + // the same name but with a .json extension will be written. + if (argv.convert && inFilename && !argv.outFile) { + const parsedFilename = path.parse(inFilename) + const outFilename = path.format( + Object.assign( + parsedFilename, + {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'} + ) + ) + + writeStream = fs.createWriteStream(outFilename) + } else if (argv.outFile) { + writeStream = fs.createWriteStream(argv.outFile) + } else { + writeStream = process.stdout + } + + writeStream.write(json) + } + } catch (err) { + console.error(err.message) + process.exit(1) + } + }) +} + +function parseArgs () { + let convert + let space + let validate + let outFile + let version + let help + const defaults = [] + + const args = process.argv.slice(2) + for (let i = 0; i < args.length; i++) { + const arg = args[i] + switch (arg) { + case '--convert': + case '-c': + convert = true + break + + case '--space': + case '-s': + space = args[++i] + break + + case '--validate': + case '-v': + validate = true + break + + case '--out-file': + case '-o': + outFile = args[++i] + break + + case '--version': + case '-V': + version = true + break + + case '--help': + case '-h': + help = true + break + + default: + defaults.push(arg) + break + } + } + + return { + convert, + space, + validate, + outFile, + version, + help, + defaults, + } +} + +function version () { + console.log(pkg.version) +} + +function usage () { + console.log( + ` + Usage: json5 [options] + + If is not provided, then STDIN is used. + + Options: + + -s, --space The number of spaces to indent or 't' for tabs + -o, --out-file [file] Output to the specified file, otherwise STDOUT + -v, --validate Validate JSON5 but do not output JSON + -V, --version Output the version number + -h, --help Output usage information` + ) +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c45bca5876aa88b947b4ae32b85f23e64aa1143 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.d.ts @@ -0,0 +1,4 @@ +import parse = require('./parse') +import stringify = require('./stringify') + +export {parse, stringify} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..36796388892da3dc8cfecd4168d4368aa01edfe1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/index.js @@ -0,0 +1,9 @@ +const parse = require('./parse') +const stringify = require('./stringify') + +const JSON5 = { + parse, + stringify, +} + +module.exports = JSON5 diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c8d883a27f7b32f48c6c551da323d8885416d24 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.d.ts @@ -0,0 +1,15 @@ +/** + * Parses a JSON5 string, constructing the JavaScript value or object described + * by the string. + * @template T The type of the return value. + * @param text The string to parse as JSON5. + * @param reviver A function that prescribes how the value originally produced + * by parsing is transformed before being returned. + * @returns The JavaScript value converted from the JSON5 string. + */ +declare function parse( + text: string, + reviver?: ((this: any, key: string, value: any) => any) | null, +): T + +export = parse diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..da2078a62efd6a47d9ce3e6c70cab55ad262479c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/parse.js @@ -0,0 +1,1114 @@ +const util = require('./util') + +let source +let parseState +let stack +let pos +let line +let column +let token +let key +let root + +module.exports = function parse (text, reviver) { + source = String(text) + parseState = 'start' + stack = [] + pos = 0 + line = 1 + column = 0 + token = undefined + key = undefined + root = undefined + + do { + token = lex() + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState]() + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +} + +function internalize (holder, name, reviver) { + const value = holder[name] + if (value != null && typeof value === 'object') { + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i++) { + const key = String(i) + const replacement = internalize(value, key, reviver) + if (replacement === undefined) { + delete value[key] + } else { + Object.defineProperty(value, key, { + value: replacement, + writable: true, + enumerable: true, + configurable: true, + }) + } + } + } else { + for (const key in value) { + const replacement = internalize(value, key, reviver) + if (replacement === undefined) { + delete value[key] + } else { + Object.defineProperty(value, key, { + value: replacement, + writable: true, + enumerable: true, + configurable: true, + }) + } + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState +let buffer +let doubleQuote +let sign +let c + +function lex () { + lexState = 'default' + buffer = '' + doubleQuote = false + sign = 1 + + for (;;) { + c = peek() + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState]() + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek() + + if (c === '\n') { + line++ + column = 0 + } else if (c) { + column += c.length + } else { + column++ + } + + if (c) { + pos += c.length + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + return + + case '/': + read() + lexState = 'comment' + return + + case undefined: + read() + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read() + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read() + lexState = 'multiLineComment' + return + + case '/': + read() + lexState = 'singleLineComment' + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read() + lexState = 'multiLineCommentAsterisk' + return + + case undefined: + throw invalidChar(read()) + } + + read() + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read() + return + + case '/': + read() + lexState = 'default' + return + + case undefined: + throw invalidChar(read()) + } + + read() + lexState = 'multiLineComment' + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + lexState = 'default' + return + + case undefined: + read() + return newToken('eof') + } + + read() + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read() + literal('ull') + return newToken('null', null) + + case 't': + read() + literal('rue') + return newToken('boolean', true) + + case 'f': + read() + literal('alse') + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1 + } + + lexState = 'sign' + return + + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"') + buffer = '' + lexState = 'string' + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read() + return + + case '\\': + read() + lexState = 'identifierNameEscape' + return + } + + if (util.isIdContinueChar(c)) { + buffer += read() + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + sign () { + switch (c) { + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', sign * Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + + case 'x': + case 'X': + buffer += read() + lexState = 'hexadecimal' + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read() + lexState = 'decimalExponentSign' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read() + lexState = 'hexadecimalInteger' + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read() + buffer += escape() + return + + case '"': + if (doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case "'": + if (!doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c) + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read() + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value' + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read() + lexState = 'identifierName' + return + + case '\\': + read() + lexState = 'identifierNameStartEscape' + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"') + lexState = 'string' + return + } + + if (util.isIdStartChar(c)) { + buffer += read() + lexState = 'identifierName' + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value' + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value' + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +} + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek() + + if (p !== c) { + throw invalidChar(read()) + } + + read() + } +} + +function escape () { + const c = peek() + switch (c) { + case 'b': + read() + return '\b' + + case 'f': + read() + return '\f' + + case 'n': + read() + return '\n' + + case 'r': + read() + return '\r' + + case 't': + read() + return '\t' + + case 'v': + read() + return '\v' + + case '0': + read() + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read() + return hexEscape() + + case 'u': + read() + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read() + return '' + + case '\r': + read() + if (peek() === '\n') { + read() + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = '' + let c = peek() + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = '' + let count = 4 + + while (count-- > 0) { + const c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value + parseState = 'afterPropertyName' + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop() + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue' + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop() + return + } + + push() + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName' + return + + case '}': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue' + return + + case ']': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +} + +function push () { + let value + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {} + break + + case '[': + value = [] + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value + } else { + const parent = stack[stack.length - 1] + if (Array.isArray(parent)) { + parent.push(value) + } else { + Object.defineProperty(parent, key, { + value, + writable: true, + enumerable: true, + configurable: true, + }) + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value) + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue' + } else { + parseState = 'beforePropertyName' + } + } else { + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } + } +} + +function pop () { + stack.pop() + + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5 + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16) + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message) + err.lineNumber = line + err.columnNumber = column + return err +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/register.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/register.js new file mode 100644 index 0000000000000000000000000000000000000000..935cdbafb323ac615fc22c86cfbaf3f2359771b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/register.js @@ -0,0 +1,13 @@ +const fs = require('fs') +const JSON5 = require('./') + +// eslint-disable-next-line node/no-deprecated-api +require.extensions['.json5'] = function (module, filename) { + const content = fs.readFileSync(filename, 'utf8') + try { + module.exports = JSON5.parse(content) + } catch (err) { + err.message = filename + ': ' + err.message + throw err + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/require.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/require.js new file mode 100644 index 0000000000000000000000000000000000000000..3aa29bee0344ef9a7c800ccc7a1fd71c55ade4a0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/require.js @@ -0,0 +1,4 @@ +// This file is for backward compatibility with v0.5.1. +require('./register') + +console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.") diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3c348389eaf56c9c743ad7755bb115a87c19ba68 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.d.ts @@ -0,0 +1,89 @@ +declare type StringifyOptions = { + /** + * A function that alters the behavior of the stringification process, or an + * array of String and Number objects that serve as a allowlist for + * selecting/filtering the properties of the value object to be included in + * the JSON5 string. If this value is null or not provided, all properties + * of the object are included in the resulting JSON5 string. + */ + replacer?: + | ((this: any, key: string, value: any) => any) + | (string | number)[] + | null + + /** + * A String or Number object that's used to insert white space into the + * output JSON5 string for readability purposes. If this is a Number, it + * indicates the number of space characters to use as white space; this + * number is capped at 10 (if it is greater, the value is just 10). Values + * less than 1 indicate that no space should be used. If this is a String, + * the string (or the first 10 characters of the string, if it's longer than + * that) is used as white space. If this parameter is not provided (or is + * null), no white space is used. If white space is used, trailing commas + * will be used in objects and arrays. + */ + space?: string | number | null + + /** + * A String representing the quote character to use when serializing + * strings. + */ + quote?: string | null +} + +/** + * Converts a JavaScript value to a JSON5 string. + * @param value The value to convert to a JSON5 string. + * @param replacer A function that alters the behavior of the stringification + * process. If this value is null or not provided, all properties of the object + * are included in the resulting JSON5 string. + * @param space A String or Number object that's used to insert white space into + * the output JSON5 string for readability purposes. If this is a Number, it + * indicates the number of space characters to use as white space; this number + * is capped at 10 (if it is greater, the value is just 10). Values less than 1 + * indicate that no space should be used. If this is a String, the string (or + * the first 10 characters of the string, if it's longer than that) is used as + * white space. If this parameter is not provided (or is null), no white space + * is used. If white space is used, trailing commas will be used in objects and + * arrays. + * @returns The JSON5 string converted from the JavaScript value. + */ +declare function stringify( + value: any, + replacer?: ((this: any, key: string, value: any) => any) | null, + space?: string | number | null, +): string + +/** + * Converts a JavaScript value to a JSON5 string. + * @param value The value to convert to a JSON5 string. + * @param replacer An array of String and Number objects that serve as a + * allowlist for selecting/filtering the properties of the value object to be + * included in the JSON5 string. If this value is null or not provided, all + * properties of the object are included in the resulting JSON5 string. + * @param space A String or Number object that's used to insert white space into + * the output JSON5 string for readability purposes. If this is a Number, it + * indicates the number of space characters to use as white space; this number + * is capped at 10 (if it is greater, the value is just 10). Values less than 1 + * indicate that no space should be used. If this is a String, the string (or + * the first 10 characters of the string, if it's longer than that) is used as + * white space. If this parameter is not provided (or is null), no white space + * is used. If white space is used, trailing commas will be used in objects and + * arrays. + * @returns The JSON5 string converted from the JavaScript value. + */ +declare function stringify( + value: any, + replacer: (string | number)[], + space?: string | number | null, +): string + +/** + * Converts a JavaScript value to a JSON5 string. + * @param value The value to convert to a JSON5 string. + * @param options An object specifying options. + * @returns The JSON5 string converted from the JavaScript value. + */ +declare function stringify(value: any, options: StringifyOptions): string + +export = stringify diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.js new file mode 100644 index 0000000000000000000000000000000000000000..7cb3b0e101840b22bf620e4b15f46c733054e8e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/stringify.js @@ -0,0 +1,261 @@ +const util = require('./util') + +module.exports = function stringify (value, replacer, space) { + const stack = [] + let indent = '' + let propertyList + let replacerFunc + let gap = '' + let quote + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space + quote = replacer.quote + replacer = replacer.replacer + } + + if (typeof replacer === 'function') { + replacerFunc = replacer + } else if (Array.isArray(replacer)) { + propertyList = [] + for (const v of replacer) { + let item + + if (typeof v === 'string') { + item = v + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v) + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item) + } + } + } + + if (space instanceof Number) { + space = Number(space) + } else if (space instanceof String) { + space = String(space) + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)) + gap = ' '.substr(0, space) + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10) + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key] + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key) + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key) + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value) + } + + if (value instanceof Number) { + value = Number(value) + } else if (value instanceof String) { + value = String(value) + } else if (value instanceof Boolean) { + value = value.valueOf() + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + } + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + let product = '' + + for (let i = 0; i < value.length; i++) { + const c = value[i] + switch (c) { + case "'": + case '"': + quotes[c]++ + product += c + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00' + continue + } + } + + if (replacements[c]) { + product += replacements[c] + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16) + product += '\\x' + ('00' + hexString).substring(hexString.length) + continue + } + + product += c + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let keys = propertyList || Object.keys(value) + let partial = [] + for (const key of keys) { + const propertyString = serializeProperty(key, value) + if (propertyString !== undefined) { + let member = serializeKey(key) + ':' + if (gap !== '') { + member += ' ' + } + member += propertyString + partial.push(member) + } + } + + let final + if (partial.length === 0) { + final = '{}' + } else { + let properties + if (gap === '') { + properties = partial.join(',') + final = '{' + properties + '}' + } else { + let separator = ',\n' + indent + properties = partial.join(separator) + final = '{\n' + indent + properties + ',\n' + stepback + '}' + } + } + + stack.pop() + indent = stepback + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)) + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let partial = [] + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value) + partial.push((propertyString !== undefined) ? propertyString : 'null') + } + + let final + if (partial.length === 0) { + final = '[]' + } else { + if (gap === '') { + let properties = partial.join(',') + final = '[' + properties + ']' + } else { + let separator = ',\n' + indent + let properties = partial.join(separator) + final = '[\n' + indent + properties + ',\n' + stepback + ']' + } + } + + stack.pop() + indent = stepback + return final + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..610f8057af421224d81b03adc2de89c9d295850e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.d.ts @@ -0,0 +1,3 @@ +export declare const Space_Separator: RegExp +export declare const ID_Start: RegExp +export declare const ID_Continue: RegExp diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.js new file mode 100644 index 0000000000000000000000000000000000000000..215ccd843abc25c3805ed9307f813f046dcb1459 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/unicode.js @@ -0,0 +1,4 @@ +// This is a generated file. Do not edit. +module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ +module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\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]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ +module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA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250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\u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DC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE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E9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a940ceadbb079bf7c80360c35b25bbbb9d5aa699 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.d.ts @@ -0,0 +1,5 @@ +export declare function isSpaceSeparator(c?: string): boolean +export declare function isIdStartChar(c?: string): boolean +export declare function isIdContinueChar(c?: string): boolean +export declare function isDigit(c?: string): boolean +export declare function isHexDigit(c?: string): boolean diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.js new file mode 100644 index 0000000000000000000000000000000000000000..40bfe2fa6a67b2cc686467eb131fcdf8a0b07cf8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/json5/lib/util.js @@ -0,0 +1,35 @@ +const unicode = require('../lib/unicode') + +module.exports = { + isSpaceSeparator (c) { + return typeof c === 'string' && unicode.Space_Separator.test(c) + }, + + isIdStartChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/bin/cli.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/bin/cli.js new file mode 100644 index 0000000000000000000000000000000000000000..a80d9390b802d8f3a1bc1882fc84b6ae039d108f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/bin/cli.js @@ -0,0 +1,179 @@ +#!/usr/bin/env node +import { createReadStream, createWriteStream, readFileSync, renameSync } from 'node:fs' +import { dirname, join } from 'node:path' +import { pipeline as pipelineCallback } from 'node:stream' +import { fileURLToPath } from 'node:url' +import { promisify } from 'node:util' +import { jsonrepairTransform } from '../lib/esm/stream.js' + +const pipeline = promisify(pipelineCallback) +const __filename = fileURLToPath(import.meta.url) +const __dirname = dirname(__filename) + +function processArgs(args) { + const options = { + version: false, + help: false, + overwrite: false, + bufferSize: undefined, + inputFile: null, + outputFile: null + } + + // we skip the first two args, since they contain node and the script path + let i = 2 + while (i < args.length) { + const arg = args[i] + + switch (arg) { + case '-v': + case '--version': + options.version = true + break + + case '-h': + case '--help': + options.help = true + break + + case '--overwrite': + options.overwrite = true + break + + case '--buffer': + i++ + options.bufferSize = parseSize(args[i]) + break + + case '-o': + case '--output': + i++ + options.outputFile = args[i] + break + + default: + if (options.inputFile == null) { + options.inputFile = arg + } else { + throw new Error(`Unexpected argument "${arg}"`) + } + } + + i++ + } + + return options +} + +async function run(options) { + if (options.version) { + outputVersion() + return + } + + if (options.help) { + outputHelp() + return + } + + if (options.overwrite) { + if (!options.inputFile) { + console.error('Error: cannot use --overwrite: no input file provided') + process.exit(1) + } + if (options.outputFile) { + console.error('Error: cannot use --overwrite: there is also an --output provided') + process.exit(1) + } + + const dateStr = new Date().toISOString().replace(/\W/g, '-') + const tempFileSuffix = `.repair-${dateStr}.json` + const tempFile = options.inputFile + tempFileSuffix + + try { + const readStream = createReadStream(options.inputFile) + const writeStream = createWriteStream(tempFile) + await pipeline( + readStream, + jsonrepairTransform({ bufferSize: options.bufferSize }), + writeStream + ) + renameSync(tempFile, options.inputFile) + } catch (err) { + process.stderr.write(err.toString()) + process.exit(1) + } + + return + } + + try { + const readStream = options.inputFile ? createReadStream(options.inputFile) : process.stdin + const writeStream = options.outputFile ? createWriteStream(options.outputFile) : process.stdout + await pipeline(readStream, jsonrepairTransform({ bufferSize: options.bufferSize }), writeStream) + } catch (err) { + process.stderr.write(err.toString()) + process.exit(1) + } +} + +function outputVersion() { + const file = join(__dirname, '../package.json') + const pkg = JSON.parse(String(readFileSync(file, 'utf-8'))) + + console.log(pkg.version) +} + +function parseSize(size) { + // match + const match = size.match(/^(\d+)([KMG]?)$/) + if (!match) { + throw new Error(`Buffer size "${size}" not recognized. Examples: 65536, 512K, 2M`) + } + + const num = Number.parseInt(match[1]) + const suffix = match[2] // K, M, or G + + switch (suffix) { + case 'K': + return num * 1024 + case 'M': + return num * 1024 * 1024 + case 'G': + return num * 1024 * 1024 * 1024 + default: + return num + } +} + +const help = ` +jsonrepair +https://github.com/josdejong/jsonrepair + +Repair invalid JSON documents. When a document could not be repaired, the output will be left unchanged. + +Usage: + jsonrepair [filename] {OPTIONS} + +Options: + --version, -v Show application version + --help, -h Show this message + --output, -o Output file + --overwrite Overwrite the input file + --buffer Buffer size in bytes, for example 64K (default) or 1M + +Example usage: + jsonrepair broken.json # Repair a file, output to console + jsonrepair broken.json > repaired.json # Repair a file, output to file + jsonrepair broken.json --output repaired.json # Repair a file, output to file + jsonrepair broken.json --overwrite # Repair a file, replace the file itself + cat broken.json | jsonrepair # Repair data from an input stream + cat broken.json | jsonrepair > repaired.json # Repair data from an input stream, output to file +` + +function outputHelp() { + console.log(help) +} + +const options = processArgs(process.argv) +await run(options) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5adad596c53126d1d0ff90a52033b9219a564c13 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "JSONRepairError", { + enumerable: true, + get: function () { + return _JSONRepairError.JSONRepairError; + } +}); +Object.defineProperty(exports, "jsonrepair", { + enumerable: true, + get: function () { + return _jsonrepair.jsonrepair; + } +}); +var _jsonrepair = require("./regular/jsonrepair.js"); +var _JSONRepairError = require("./utils/JSONRepairError.js"); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6e0c022eec3a90217cdc28dd104709c23892b85d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["_jsonrepair","require","_JSONRepairError"],"sources":["../../src/index.ts"],"sourcesContent":["// Cross-platform, non-streaming JavaScript API\nexport { jsonrepair } from './regular/jsonrepair.js'\nexport { JSONRepairError } from './utils/JSONRepairError.js'\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js new file mode 100644 index 0000000000000000000000000000000000000000..d37ed12be69d1bfdee26077250388e7e7d090f80 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js @@ -0,0 +1,745 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.jsonrepair = jsonrepair; +var _JSONRepairError = require("../utils/JSONRepairError.js"); +var _stringUtils = require("../utils/stringUtils.js"); +const controlCharacters = { + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' +}; + +// map with all escape characters +const escapeCharacters = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + // note that \u is handled separately in parseString() +}; + +/** + * Repair a string containing an invalid JSON document. + * For example changes JavaScript notation into JSON notation. + * + * Example: + * + * try { + * const json = "{name: 'John'}" + * const repaired = jsonrepair(json) + * console.log(repaired) + * // '{"name": "John"}' + * } catch (err) { + * console.error(err) + * } + * + */ +function jsonrepair(text) { + let i = 0; // current index in text + let output = ''; // generated output + + parseMarkdownCodeBlock(['```', '[```', '{```']); + const processed = parseValue(); + if (!processed) { + throwUnexpectedEnd(); + } + parseMarkdownCodeBlock(['```', '```]', '```}']); + const processedComma = parseCharacter(','); + if (processedComma) { + parseWhitespaceAndSkipComments(); + } + if ((0, _stringUtils.isStartOfValue)(text[i]) && (0, _stringUtils.endsWithCommaOrNewline)(output)) { + // start of a new value after end of the root level object: looks like + // newline delimited JSON -> turn into a root level array + if (!processedComma) { + // repair missing comma + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ','); + } + parseNewlineDelimitedJSON(); + } else if (processedComma) { + // repair: remove trailing comma + output = (0, _stringUtils.stripLastOccurrence)(output, ','); + } + + // repair redundant end quotes + while (text[i] === '}' || text[i] === ']') { + i++; + parseWhitespaceAndSkipComments(); + } + if (i >= text.length) { + // reached the end of the document properly + return output; + } + throwUnexpectedCharacter(); + function parseValue() { + parseWhitespaceAndSkipComments(); + const processed = parseObject() || parseArray() || parseString() || parseNumber() || parseKeywords() || parseUnquotedString(false) || parseRegex(); + parseWhitespaceAndSkipComments(); + return processed; + } + function parseWhitespaceAndSkipComments() { + let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const start = i; + let changed = parseWhitespace(skipNewline); + do { + changed = parseComment(); + if (changed) { + changed = parseWhitespace(skipNewline); + } + } while (changed); + return i > start; + } + function parseWhitespace(skipNewline) { + const _isWhiteSpace = skipNewline ? _stringUtils.isWhitespace : _stringUtils.isWhitespaceExceptNewline; + let whitespace = ''; + while (true) { + if (_isWhiteSpace(text, i)) { + whitespace += text[i]; + i++; + } else if ((0, _stringUtils.isSpecialWhitespace)(text, i)) { + // repair special whitespace + whitespace += ' '; + i++; + } else { + break; + } + } + if (whitespace.length > 0) { + output += whitespace; + return true; + } + return false; + } + function parseComment() { + // find a block comment '/* ... */' + if (text[i] === '/' && text[i + 1] === '*') { + // repair block comment by skipping it + while (i < text.length && !atEndOfBlockComment(text, i)) { + i++; + } + i += 2; + return true; + } + + // find a line comment '// ...' + if (text[i] === '/' && text[i + 1] === '/') { + // repair line comment by skipping it + while (i < text.length && text[i] !== '\n') { + i++; + } + return true; + } + return false; + } + function parseMarkdownCodeBlock(blocks) { + // find and skip over a Markdown fenced code block: + // ``` ... ``` + // or + // ```json ... ``` + if (skipMarkdownCodeBlock(blocks)) { + if ((0, _stringUtils.isFunctionNameCharStart)(text[i])) { + // strip the optional language specifier like "json" + while (i < text.length && (0, _stringUtils.isFunctionNameChar)(text[i])) { + i++; + } + } + parseWhitespaceAndSkipComments(); + return true; + } + return false; + } + function skipMarkdownCodeBlock(blocks) { + for (const block of blocks) { + const end = i + block.length; + if (text.slice(i, end) === block) { + i = end; + return true; + } + } + return false; + } + function parseCharacter(char) { + if (text[i] === char) { + output += text[i]; + i++; + return true; + } + return false; + } + function skipCharacter(char) { + if (text[i] === char) { + i++; + return true; + } + return false; + } + function skipEscapeCharacter() { + return skipCharacter('\\'); + } + + /** + * Skip ellipsis like "[1,2,3,...]" or "[1,2,3,...,9]" or "[...,7,8,9]" + * or a similar construct in objects. + */ + function skipEllipsis() { + parseWhitespaceAndSkipComments(); + if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') { + // repair: remove the ellipsis (three dots) and optionally a comma + i += 3; + parseWhitespaceAndSkipComments(); + skipCharacter(','); + return true; + } + return false; + } + + /** + * Parse an object like '{"key": "value"}' + */ + function parseObject() { + if (text[i] === '{') { + output += '{'; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in {, message: "hi"} + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== '}') { + let processedComma; + if (!initial) { + processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ','); + } + parseWhitespaceAndSkipComments(); + } else { + processedComma = true; + initial = false; + } + skipEllipsis(); + const processedKey = parseString() || parseUnquotedString(true); + if (!processedKey) { + if (text[i] === '}' || text[i] === '{' || text[i] === ']' || text[i] === '[' || text[i] === undefined) { + // repair trailing comma + output = (0, _stringUtils.stripLastOccurrence)(output, ','); + } else { + throwObjectKeyExpected(); + } + break; + } + parseWhitespaceAndSkipComments(); + const processedColon = parseCharacter(':'); + const truncatedText = i >= text.length; + if (!processedColon) { + if ((0, _stringUtils.isStartOfValue)(text[i]) || truncatedText) { + // repair missing colon + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ':'); + } else { + throwColonExpected(); + } + } + const processedValue = parseValue(); + if (!processedValue) { + if (processedColon || truncatedText) { + // repair missing object value + output += 'null'; + } else { + throwColonExpected(); + } + } + } + if (text[i] === '}') { + output += '}'; + i++; + } else { + // repair missing end bracket + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, '}'); + } + return true; + } + return false; + } + + /** + * Parse an array like '["item1", "item2", ...]' + */ + function parseArray() { + if (text[i] === '[') { + output += '['; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in [,1,2,3] + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== ']') { + if (!initial) { + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ','); + } + } else { + initial = false; + } + skipEllipsis(); + const processedValue = parseValue(); + if (!processedValue) { + // repair trailing comma + output = (0, _stringUtils.stripLastOccurrence)(output, ','); + break; + } + } + if (text[i] === ']') { + output += ']'; + i++; + } else { + // repair missing closing array bracket + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ']'); + } + return true; + } + return false; + } + + /** + * Parse and repair Newline Delimited JSON (NDJSON): + * multiple JSON objects separated by a newline character + */ + function parseNewlineDelimitedJSON() { + // repair NDJSON + let initial = true; + let processedValue = true; + while (processedValue) { + if (!initial) { + // parse optional comma, insert when missing + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair: add missing comma + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, ','); + } + } else { + initial = false; + } + processedValue = parseValue(); + } + if (!processedValue) { + // repair: remove trailing comma + output = (0, _stringUtils.stripLastOccurrence)(output, ','); + } + + // repair: wrap the output inside array brackets + output = `[\n${output}\n]`; + } + + /** + * Parse a string enclosed by double quotes "...". Can contain escaped quotes + * Repair strings enclosed in single quotes or special quotes + * Repair an escaped string + * + * The function can run in two stages: + * - First, it assumes the string has a valid end quote + * - If it turns out that the string does not have a valid end quote followed + * by a delimiter (which should be the case), the function runs again in a + * more conservative way, stopping the string at the first next delimiter + * and fixing the string by inserting a quote there, or stopping at a + * stop index detected in the first iteration. + */ + function parseString() { + let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + let skipEscapeChars = text[i] === '\\'; + if (skipEscapeChars) { + // repair: remove the first escape character + i++; + skipEscapeChars = true; + } + if ((0, _stringUtils.isQuote)(text[i])) { + // double quotes are correct JSON, + // single quotes come from JavaScript for example, we assume it will have a correct single end quote too + // otherwise, we will match any double-quote-like start with a double-quote-like end, + // or any single-quote-like start with a single-quote-like end + const isEndQuote = (0, _stringUtils.isDoubleQuote)(text[i]) ? _stringUtils.isDoubleQuote : (0, _stringUtils.isSingleQuote)(text[i]) ? _stringUtils.isSingleQuote : (0, _stringUtils.isSingleQuoteLike)(text[i]) ? _stringUtils.isSingleQuoteLike : _stringUtils.isDoubleQuoteLike; + const iBefore = i; + const oBefore = output.length; + let str = '"'; + i++; + while (true) { + if (i >= text.length) { + // end of text, we are missing an end quote + + const iPrev = prevNonWhitespaceIndex(i - 1); + if (!stopAtDelimiter && (0, _stringUtils.isDelimiter)(text.charAt(iPrev))) { + // if the text ends with a delimiter, like ["hello], + // so the missing end quote should be inserted before this delimiter + // retry parsing the string, stopping at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // repair missing quote + str = (0, _stringUtils.insertBeforeLastWhitespace)(str, '"'); + output += str; + return true; + } + if (i === stopAtIndex) { + // use the stop index detected in the first iteration, and repair end quote + str = (0, _stringUtils.insertBeforeLastWhitespace)(str, '"'); + output += str; + return true; + } + if (isEndQuote(text[i])) { + // end quote + // let us check what is before and after the quote to verify whether this is a legit end quote + const iQuote = i; + const oQuote = str.length; + str += '"'; + i++; + output += str; + parseWhitespaceAndSkipComments(false); + if (stopAtDelimiter || i >= text.length || (0, _stringUtils.isDelimiter)(text[i]) || (0, _stringUtils.isQuote)(text[i]) || (0, _stringUtils.isDigit)(text[i])) { + // The quote is followed by the end of the text, a delimiter, + // or a next value. So the quote is indeed the end of the string. + parseConcatenatedString(); + return true; + } + const iPrevChar = prevNonWhitespaceIndex(iQuote - 1); + const prevChar = text.charAt(iPrevChar); + if (prevChar === ',') { + // A comma followed by a quote, like '{"a":"b,c,"d":"e"}'. + // We assume that the quote is a start quote, and that the end quote + // should have been located right before the comma but is missing. + i = iBefore; + output = output.substring(0, oBefore); + return parseString(false, iPrevChar); + } + if ((0, _stringUtils.isDelimiter)(prevChar)) { + // This is not the right end quote: it is preceded by a delimiter, + // and NOT followed by a delimiter. So, there is an end quote missing + // parse the string again and then stop at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // revert to right after the quote but before any whitespace, and continue parsing the string + output = output.substring(0, oBefore); + i = iQuote + 1; + + // repair unescaped quote + str = `${str.substring(0, oQuote)}\\${str.substring(oQuote)}`; + } else if (stopAtDelimiter && (0, _stringUtils.isUnquotedStringDelimiter)(text[i])) { + // we're in the mode to stop the string at the first delimiter + // because there is an end quote missing + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && _stringUtils.regexUrlStart.test(text.substring(iBefore + 1, i + 2))) { + while (i < text.length && _stringUtils.regexUrlChar.test(text[i])) { + str += text[i]; + i++; + } + } + + // repair missing quote + str = (0, _stringUtils.insertBeforeLastWhitespace)(str, '"'); + output += str; + parseConcatenatedString(); + return true; + } else if (text[i] === '\\') { + // handle escaped content like \n or \u2605 + const char = text.charAt(i + 1); + const escapeChar = escapeCharacters[char]; + if (escapeChar !== undefined) { + str += text.slice(i, i + 2); + i += 2; + } else if (char === 'u') { + let j = 2; + while (j < 6 && (0, _stringUtils.isHex)(text[i + j])) { + j++; + } + if (j === 6) { + str += text.slice(i, i + 6); + i += 6; + } else if (i + j >= text.length) { + // repair invalid or truncated unicode char at the end of the text + // by removing the unicode char and ending the string here + i = text.length; + } else { + throwInvalidUnicodeCharacter(); + } + } else { + // repair invalid escape character: remove it + str += char; + i += 2; + } + } else { + // handle regular characters + const char = text.charAt(i); + if (char === '"' && text[i - 1] !== '\\') { + // repair unescaped double quote + str += `\\${char}`; + i++; + } else if ((0, _stringUtils.isControlCharacter)(char)) { + // unescaped control character + str += controlCharacters[char]; + i++; + } else { + if (!(0, _stringUtils.isValidStringCharacter)(char)) { + throwInvalidCharacter(char); + } + str += char; + i++; + } + } + if (skipEscapeChars) { + // repair: skipped escape character (nothing to do) + skipEscapeCharacter(); + } + } + } + return false; + } + + /** + * Repair concatenated strings like "hello" + "world", change this into "helloworld" + */ + function parseConcatenatedString() { + let processed = false; + parseWhitespaceAndSkipComments(); + while (text[i] === '+') { + processed = true; + i++; + parseWhitespaceAndSkipComments(); + + // repair: remove the end quote of the first string + output = (0, _stringUtils.stripLastOccurrence)(output, '"', true); + const start = output.length; + const parsedStr = parseString(); + if (parsedStr) { + // repair: remove the start quote of the second string + output = (0, _stringUtils.removeAtIndex)(output, start, 1); + } else { + // repair: remove the + because it is not followed by a string + output = (0, _stringUtils.insertBeforeLastWhitespace)(output, '"'); + } + } + return processed; + } + + /** + * Parse a number like 2.4 or 2.4e6 + */ + function parseNumber() { + const start = i; + if (text[i] === '-') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!(0, _stringUtils.isDigit)(text[i])) { + i = start; + return false; + } + } + + // Note that in JSON leading zeros like "00789" are not allowed. + // We will allow all leading zeros here though and at the end of parseNumber + // check against trailing zeros and repair that if needed. + // Leading zeros can have meaning, so we should not clear them. + while ((0, _stringUtils.isDigit)(text[i])) { + i++; + } + if (text[i] === '.') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!(0, _stringUtils.isDigit)(text[i])) { + i = start; + return false; + } + while ((0, _stringUtils.isDigit)(text[i])) { + i++; + } + } + if (text[i] === 'e' || text[i] === 'E') { + i++; + if (text[i] === '-' || text[i] === '+') { + i++; + } + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!(0, _stringUtils.isDigit)(text[i])) { + i = start; + return false; + } + while ((0, _stringUtils.isDigit)(text[i])) { + i++; + } + } + + // if we're not at the end of the number by this point, allow this to be parsed as another type + if (!atEndOfNumber()) { + i = start; + return false; + } + if (i > start) { + // repair a number with leading zeros like "00789" + const num = text.slice(start, i); + const hasInvalidLeadingZero = /^0\d/.test(num); + output += hasInvalidLeadingZero ? `"${num}"` : num; + return true; + } + return false; + } + + /** + * Parse keywords true, false, null + * Repair Python keywords True, False, None + */ + function parseKeywords() { + return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') || + // repair Python keywords True, False, None + parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null'); + } + function parseKeyword(name, value) { + if (text.slice(i, i + name.length) === name) { + output += value; + i += name.length; + return true; + } + return false; + } + + /** + * Repair an unquoted string by adding quotes around it + * Repair a MongoDB function call like NumberLong("2") + * Repair a JSONP function call like callback({...}); + */ + function parseUnquotedString(isKey) { + // note that the symbol can end with whitespaces: we stop at the next delimiter + // also, note that we allow strings to contain a slash / in order to support repairing regular expressions + const start = i; + if ((0, _stringUtils.isFunctionNameCharStart)(text[i])) { + while (i < text.length && (0, _stringUtils.isFunctionNameChar)(text[i])) { + i++; + } + let j = i; + while ((0, _stringUtils.isWhitespace)(text, j)) { + j++; + } + if (text[j] === '(') { + // repair a MongoDB function call like NumberLong("2") + // repair a JSONP function call like callback({...}); + i = j + 1; + parseValue(); + if (text[i] === ')') { + // repair: skip close bracket of function call + i++; + if (text[i] === ';') { + // repair: skip semicolon after JSONP call + i++; + } + } + return true; + } + } + while (i < text.length && !(0, _stringUtils.isUnquotedStringDelimiter)(text[i]) && !(0, _stringUtils.isQuote)(text[i]) && (!isKey || text[i] !== ':')) { + i++; + } + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && _stringUtils.regexUrlStart.test(text.substring(start, i + 2))) { + while (i < text.length && _stringUtils.regexUrlChar.test(text[i])) { + i++; + } + } + if (i > start) { + // repair unquoted string + // also, repair undefined into null + + // first, go back to prevent getting trailing whitespaces in the string + while ((0, _stringUtils.isWhitespace)(text, i - 1) && i > 0) { + i--; + } + const symbol = text.slice(start, i); + output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol); + if (text[i] === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return true; + } + } + function parseRegex() { + if (text[i] === '/') { + const start = i; + i++; + while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\')) { + i++; + } + i++; + output += `"${text.substring(start, i)}"`; + return true; + } + } + function prevNonWhitespaceIndex(start) { + let prev = start; + while (prev > 0 && (0, _stringUtils.isWhitespace)(text, prev)) { + prev--; + } + return prev; + } + function atEndOfNumber() { + return i >= text.length || (0, _stringUtils.isDelimiter)(text[i]) || (0, _stringUtils.isWhitespace)(text, i); + } + function repairNumberEndingWithNumericSymbol(start) { + // repair numbers cut off at the end + // this will only be called when we end after a '.', '-', or 'e' and does not + // change the number more than it needs to make it valid JSON + output += `${text.slice(start, i)}0`; + } + function throwInvalidCharacter(char) { + throw new _JSONRepairError.JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i); + } + function throwUnexpectedCharacter() { + throw new _JSONRepairError.JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i); + } + function throwUnexpectedEnd() { + throw new _JSONRepairError.JSONRepairError('Unexpected end of json string', text.length); + } + function throwObjectKeyExpected() { + throw new _JSONRepairError.JSONRepairError('Object key expected', i); + } + function throwColonExpected() { + throw new _JSONRepairError.JSONRepairError('Colon expected', i); + } + function throwInvalidUnicodeCharacter() { + const chars = text.slice(i, i + 6); + throw new _JSONRepairError.JSONRepairError(`Invalid unicode character "${chars}"`, i); + } +} +function atEndOfBlockComment(text, i) { + return text[i] === '*' && text[i + 1] === '/'; +} +//# sourceMappingURL=jsonrepair.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0a5ece808e290ad70e662ce8c20f64cc204885b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/regular/jsonrepair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonrepair.js","names":["_JSONRepairError","require","_stringUtils","controlCharacters","escapeCharacters","b","f","n","r","t","jsonrepair","text","i","output","parseMarkdownCodeBlock","processed","parseValue","throwUnexpectedEnd","processedComma","parseCharacter","parseWhitespaceAndSkipComments","isStartOfValue","endsWithCommaOrNewline","insertBeforeLastWhitespace","parseNewlineDelimitedJSON","stripLastOccurrence","length","throwUnexpectedCharacter","parseObject","parseArray","parseString","parseNumber","parseKeywords","parseUnquotedString","parseRegex","skipNewline","arguments","undefined","start","changed","parseWhitespace","parseComment","_isWhiteSpace","isWhitespace","isWhitespaceExceptNewline","whitespace","isSpecialWhitespace","atEndOfBlockComment","blocks","skipMarkdownCodeBlock","isFunctionNameCharStart","isFunctionNameChar","block","end","slice","char","skipCharacter","skipEscapeCharacter","skipEllipsis","initial","processedKey","throwObjectKeyExpected","processedColon","truncatedText","throwColonExpected","processedValue","stopAtDelimiter","stopAtIndex","skipEscapeChars","isQuote","isEndQuote","isDoubleQuote","isSingleQuote","isSingleQuoteLike","isDoubleQuoteLike","iBefore","oBefore","str","iPrev","prevNonWhitespaceIndex","isDelimiter","charAt","substring","iQuote","oQuote","isDigit","parseConcatenatedString","iPrevChar","prevChar","isUnquotedStringDelimiter","regexUrlStart","test","regexUrlChar","escapeChar","j","isHex","throwInvalidUnicodeCharacter","isControlCharacter","isValidStringCharacter","throwInvalidCharacter","parsedStr","removeAtIndex","atEndOfNumber","repairNumberEndingWithNumericSymbol","num","hasInvalidLeadingZero","parseKeyword","name","value","isKey","symbol","JSON","stringify","prev","JSONRepairError","chars"],"sources":["../../../src/regular/jsonrepair.ts"],"sourcesContent":["import { JSONRepairError } from '../utils/JSONRepairError.js'\nimport {\n endsWithCommaOrNewline,\n insertBeforeLastWhitespace,\n isControlCharacter,\n isDelimiter,\n isDigit,\n isDoubleQuote,\n isDoubleQuoteLike,\n isFunctionNameChar,\n isFunctionNameCharStart,\n isHex,\n isQuote,\n isSingleQuote,\n isSingleQuoteLike,\n isSpecialWhitespace,\n isStartOfValue,\n isUnquotedStringDelimiter,\n isValidStringCharacter,\n isWhitespace,\n isWhitespaceExceptNewline,\n regexUrlChar,\n regexUrlStart,\n removeAtIndex,\n stripLastOccurrence\n} from '../utils/stringUtils.js'\n\nconst controlCharacters: { [key: string]: string } = {\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t'\n}\n\n// map with all escape characters\nconst escapeCharacters: { [key: string]: string } = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\n/**\n * Repair a string containing an invalid JSON document.\n * For example changes JavaScript notation into JSON notation.\n *\n * Example:\n *\n * try {\n * const json = \"{name: 'John'}\"\n * const repaired = jsonrepair(json)\n * console.log(repaired)\n * // '{\"name\": \"John\"}'\n * } catch (err) {\n * console.error(err)\n * }\n *\n */\nexport function jsonrepair(text: string): string {\n let i = 0 // current index in text\n let output = '' // generated output\n\n parseMarkdownCodeBlock(['```', '[```', '{```'])\n\n const processed = parseValue()\n if (!processed) {\n throwUnexpectedEnd()\n }\n\n parseMarkdownCodeBlock(['```', '```]', '```}'])\n\n const processedComma = parseCharacter(',')\n if (processedComma) {\n parseWhitespaceAndSkipComments()\n }\n\n if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) {\n // start of a new value after end of the root level object: looks like\n // newline delimited JSON -> turn into a root level array\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n\n parseNewlineDelimitedJSON()\n } else if (processedComma) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',')\n }\n\n // repair redundant end quotes\n while (text[i] === '}' || text[i] === ']') {\n i++\n parseWhitespaceAndSkipComments()\n }\n\n if (i >= text.length) {\n // reached the end of the document properly\n return output\n }\n\n throwUnexpectedCharacter()\n\n function parseValue(): boolean {\n parseWhitespaceAndSkipComments()\n const processed =\n parseObject() ||\n parseArray() ||\n parseString() ||\n parseNumber() ||\n parseKeywords() ||\n parseUnquotedString(false) ||\n parseRegex()\n parseWhitespaceAndSkipComments()\n\n return processed\n }\n\n function parseWhitespaceAndSkipComments(skipNewline = true): boolean {\n const start = i\n\n let changed = parseWhitespace(skipNewline)\n do {\n changed = parseComment()\n if (changed) {\n changed = parseWhitespace(skipNewline)\n }\n } while (changed)\n\n return i > start\n }\n\n function parseWhitespace(skipNewline: boolean): boolean {\n const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline\n let whitespace = ''\n\n while (true) {\n if (_isWhiteSpace(text, i)) {\n whitespace += text[i]\n i++\n } else if (isSpecialWhitespace(text, i)) {\n // repair special whitespace\n whitespace += ' '\n i++\n } else {\n break\n }\n }\n\n if (whitespace.length > 0) {\n output += whitespace\n return true\n }\n\n return false\n }\n\n function parseComment(): boolean {\n // find a block comment '/* ... */'\n if (text[i] === '/' && text[i + 1] === '*') {\n // repair block comment by skipping it\n while (i < text.length && !atEndOfBlockComment(text, i)) {\n i++\n }\n i += 2\n\n return true\n }\n\n // find a line comment '// ...'\n if (text[i] === '/' && text[i + 1] === '/') {\n // repair line comment by skipping it\n while (i < text.length && text[i] !== '\\n') {\n i++\n }\n\n return true\n }\n\n return false\n }\n\n function parseMarkdownCodeBlock(blocks: string[]): boolean {\n // find and skip over a Markdown fenced code block:\n // ``` ... ```\n // or\n // ```json ... ```\n if (skipMarkdownCodeBlock(blocks)) {\n if (isFunctionNameCharStart(text[i])) {\n // strip the optional language specifier like \"json\"\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++\n }\n }\n\n parseWhitespaceAndSkipComments()\n\n return true\n }\n\n return false\n }\n\n function skipMarkdownCodeBlock(blocks: string[]): boolean {\n for (const block of blocks) {\n const end = i + block.length\n if (text.slice(i, end) === block) {\n i = end\n return true\n }\n }\n\n return false\n }\n\n function parseCharacter(char: string): boolean {\n if (text[i] === char) {\n output += text[i]\n i++\n return true\n }\n\n return false\n }\n\n function skipCharacter(char: string): boolean {\n if (text[i] === char) {\n i++\n return true\n }\n\n return false\n }\n\n function skipEscapeCharacter(): boolean {\n return skipCharacter('\\\\')\n }\n\n /**\n * Skip ellipsis like \"[1,2,3,...]\" or \"[1,2,3,...,9]\" or \"[...,7,8,9]\"\n * or a similar construct in objects.\n */\n function skipEllipsis(): boolean {\n parseWhitespaceAndSkipComments()\n\n if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') {\n // repair: remove the ellipsis (three dots) and optionally a comma\n i += 3\n parseWhitespaceAndSkipComments()\n skipCharacter(',')\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse an object like '{\"key\": \"value\"}'\n */\n function parseObject(): boolean {\n if (text[i] === '{') {\n output += '{'\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: skip leading comma like in {, message: \"hi\"}\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n let initial = true\n while (i < text.length && text[i] !== '}') {\n let processedComma: boolean\n if (!initial) {\n processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n parseWhitespaceAndSkipComments()\n } else {\n processedComma = true\n initial = false\n }\n\n skipEllipsis()\n\n const processedKey = parseString() || parseUnquotedString(true)\n if (!processedKey) {\n if (\n text[i] === '}' ||\n text[i] === '{' ||\n text[i] === ']' ||\n text[i] === '[' ||\n text[i] === undefined\n ) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',')\n } else {\n throwObjectKeyExpected()\n }\n break\n }\n\n parseWhitespaceAndSkipComments()\n const processedColon = parseCharacter(':')\n const truncatedText = i >= text.length\n if (!processedColon) {\n if (isStartOfValue(text[i]) || truncatedText) {\n // repair missing colon\n output = insertBeforeLastWhitespace(output, ':')\n } else {\n throwColonExpected()\n }\n }\n const processedValue = parseValue()\n if (!processedValue) {\n if (processedColon || truncatedText) {\n // repair missing object value\n output += 'null'\n } else {\n throwColonExpected()\n }\n }\n }\n\n if (text[i] === '}') {\n output += '}'\n i++\n } else {\n // repair missing end bracket\n output = insertBeforeLastWhitespace(output, '}')\n }\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse an array like '[\"item1\", \"item2\", ...]'\n */\n function parseArray(): boolean {\n if (text[i] === '[') {\n output += '['\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: skip leading comma like in [,1,2,3]\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n let initial = true\n while (i < text.length && text[i] !== ']') {\n if (!initial) {\n const processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n } else {\n initial = false\n }\n\n skipEllipsis()\n\n const processedValue = parseValue()\n if (!processedValue) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',')\n break\n }\n }\n\n if (text[i] === ']') {\n output += ']'\n i++\n } else {\n // repair missing closing array bracket\n output = insertBeforeLastWhitespace(output, ']')\n }\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse and repair Newline Delimited JSON (NDJSON):\n * multiple JSON objects separated by a newline character\n */\n function parseNewlineDelimitedJSON() {\n // repair NDJSON\n let initial = true\n let processedValue = true\n while (processedValue) {\n if (!initial) {\n // parse optional comma, insert when missing\n const processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair: add missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n } else {\n initial = false\n }\n\n processedValue = parseValue()\n }\n\n if (!processedValue) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',')\n }\n\n // repair: wrap the output inside array brackets\n output = `[\\n${output}\\n]`\n }\n\n /**\n * Parse a string enclosed by double quotes \"...\". Can contain escaped quotes\n * Repair strings enclosed in single quotes or special quotes\n * Repair an escaped string\n *\n * The function can run in two stages:\n * - First, it assumes the string has a valid end quote\n * - If it turns out that the string does not have a valid end quote followed\n * by a delimiter (which should be the case), the function runs again in a\n * more conservative way, stopping the string at the first next delimiter\n * and fixing the string by inserting a quote there, or stopping at a\n * stop index detected in the first iteration.\n */\n function parseString(stopAtDelimiter = false, stopAtIndex = -1): boolean {\n let skipEscapeChars = text[i] === '\\\\'\n if (skipEscapeChars) {\n // repair: remove the first escape character\n i++\n skipEscapeChars = true\n }\n\n if (isQuote(text[i])) {\n // double quotes are correct JSON,\n // single quotes come from JavaScript for example, we assume it will have a correct single end quote too\n // otherwise, we will match any double-quote-like start with a double-quote-like end,\n // or any single-quote-like start with a single-quote-like end\n const isEndQuote = isDoubleQuote(text[i])\n ? isDoubleQuote\n : isSingleQuote(text[i])\n ? isSingleQuote\n : isSingleQuoteLike(text[i])\n ? isSingleQuoteLike\n : isDoubleQuoteLike\n\n const iBefore = i\n const oBefore = output.length\n\n let str = '\"'\n i++\n\n while (true) {\n if (i >= text.length) {\n // end of text, we are missing an end quote\n\n const iPrev = prevNonWhitespaceIndex(i - 1)\n if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) {\n // if the text ends with a delimiter, like [\"hello],\n // so the missing end quote should be inserted before this delimiter\n // retry parsing the string, stopping at the first next delimiter\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(true)\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n return true\n }\n\n if (i === stopAtIndex) {\n // use the stop index detected in the first iteration, and repair end quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n return true\n }\n\n if (isEndQuote(text[i])) {\n // end quote\n // let us check what is before and after the quote to verify whether this is a legit end quote\n const iQuote = i\n const oQuote = str.length\n str += '\"'\n i++\n output += str\n\n parseWhitespaceAndSkipComments(false)\n\n if (\n stopAtDelimiter ||\n i >= text.length ||\n isDelimiter(text[i]) ||\n isQuote(text[i]) ||\n isDigit(text[i])\n ) {\n // The quote is followed by the end of the text, a delimiter,\n // or a next value. So the quote is indeed the end of the string.\n parseConcatenatedString()\n\n return true\n }\n\n const iPrevChar = prevNonWhitespaceIndex(iQuote - 1)\n const prevChar = text.charAt(iPrevChar)\n\n if (prevChar === ',') {\n // A comma followed by a quote, like '{\"a\":\"b,c,\"d\":\"e\"}'.\n // We assume that the quote is a start quote, and that the end quote\n // should have been located right before the comma but is missing.\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(false, iPrevChar)\n }\n\n if (isDelimiter(prevChar)) {\n // This is not the right end quote: it is preceded by a delimiter,\n // and NOT followed by a delimiter. So, there is an end quote missing\n // parse the string again and then stop at the first next delimiter\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(true)\n }\n\n // revert to right after the quote but before any whitespace, and continue parsing the string\n output = output.substring(0, oBefore)\n i = iQuote + 1\n\n // repair unescaped quote\n str = `${str.substring(0, oQuote)}\\\\${str.substring(oQuote)}`\n } else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) {\n // we're in the mode to stop the string at the first delimiter\n // because there is an end quote missing\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n str += text[i]\n i++\n }\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n parseConcatenatedString()\n\n return true\n } else if (text[i] === '\\\\') {\n // handle escaped content like \\n or \\u2605\n const char = text.charAt(i + 1)\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n str += text.slice(i, i + 2)\n i += 2\n } else if (char === 'u') {\n let j = 2\n while (j < 6 && isHex(text[i + j])) {\n j++\n }\n\n if (j === 6) {\n str += text.slice(i, i + 6)\n i += 6\n } else if (i + j >= text.length) {\n // repair invalid or truncated unicode char at the end of the text\n // by removing the unicode char and ending the string here\n i = text.length\n } else {\n throwInvalidUnicodeCharacter()\n }\n } else {\n // repair invalid escape character: remove it\n str += char\n i += 2\n }\n } else {\n // handle regular characters\n const char = text.charAt(i)\n\n if (char === '\"' && text[i - 1] !== '\\\\') {\n // repair unescaped double quote\n str += `\\\\${char}`\n i++\n } else if (isControlCharacter(char)) {\n // unescaped control character\n str += controlCharacters[char]\n i++\n } else {\n if (!isValidStringCharacter(char)) {\n throwInvalidCharacter(char)\n }\n str += char\n i++\n }\n }\n\n if (skipEscapeChars) {\n // repair: skipped escape character (nothing to do)\n skipEscapeCharacter()\n }\n }\n }\n\n return false\n }\n\n /**\n * Repair concatenated strings like \"hello\" + \"world\", change this into \"helloworld\"\n */\n function parseConcatenatedString(): boolean {\n let processed = false\n\n parseWhitespaceAndSkipComments()\n while (text[i] === '+') {\n processed = true\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: remove the end quote of the first string\n output = stripLastOccurrence(output, '\"', true)\n const start = output.length\n const parsedStr = parseString()\n if (parsedStr) {\n // repair: remove the start quote of the second string\n output = removeAtIndex(output, start, 1)\n } else {\n // repair: remove the + because it is not followed by a string\n output = insertBeforeLastWhitespace(output, '\"')\n }\n }\n\n return processed\n }\n\n /**\n * Parse a number like 2.4 or 2.4e6\n */\n function parseNumber(): boolean {\n const start = i\n if (text[i] === '-') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n }\n\n // Note that in JSON leading zeros like \"00789\" are not allowed.\n // We will allow all leading zeros here though and at the end of parseNumber\n // check against trailing zeros and repair that if needed.\n // Leading zeros can have meaning, so we should not clear them.\n while (isDigit(text[i])) {\n i++\n }\n\n if (text[i] === '.') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n while (isDigit(text[i])) {\n i++\n }\n }\n\n if (text[i] === 'e' || text[i] === 'E') {\n i++\n if (text[i] === '-' || text[i] === '+') {\n i++\n }\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n while (isDigit(text[i])) {\n i++\n }\n }\n\n // if we're not at the end of the number by this point, allow this to be parsed as another type\n if (!atEndOfNumber()) {\n i = start\n return false\n }\n\n if (i > start) {\n // repair a number with leading zeros like \"00789\"\n const num = text.slice(start, i)\n const hasInvalidLeadingZero = /^0\\d/.test(num)\n\n output += hasInvalidLeadingZero ? `\"${num}\"` : num\n return true\n }\n\n return false\n }\n\n /**\n * Parse keywords true, false, null\n * Repair Python keywords True, False, None\n */\n function parseKeywords(): boolean {\n return (\n parseKeyword('true', 'true') ||\n parseKeyword('false', 'false') ||\n parseKeyword('null', 'null') ||\n // repair Python keywords True, False, None\n parseKeyword('True', 'true') ||\n parseKeyword('False', 'false') ||\n parseKeyword('None', 'null')\n )\n }\n\n function parseKeyword(name: string, value: string): boolean {\n if (text.slice(i, i + name.length) === name) {\n output += value\n i += name.length\n return true\n }\n\n return false\n }\n\n /**\n * Repair an unquoted string by adding quotes around it\n * Repair a MongoDB function call like NumberLong(\"2\")\n * Repair a JSONP function call like callback({...});\n */\n function parseUnquotedString(isKey: boolean) {\n // note that the symbol can end with whitespaces: we stop at the next delimiter\n // also, note that we allow strings to contain a slash / in order to support repairing regular expressions\n const start = i\n\n if (isFunctionNameCharStart(text[i])) {\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++\n }\n\n let j = i\n while (isWhitespace(text, j)) {\n j++\n }\n\n if (text[j] === '(') {\n // repair a MongoDB function call like NumberLong(\"2\")\n // repair a JSONP function call like callback({...});\n i = j + 1\n\n parseValue()\n\n if (text[i] === ')') {\n // repair: skip close bracket of function call\n i++\n if (text[i] === ';') {\n // repair: skip semicolon after JSONP call\n i++\n }\n }\n\n return true\n }\n }\n\n while (\n i < text.length &&\n !isUnquotedStringDelimiter(text[i]) &&\n !isQuote(text[i]) &&\n (!isKey || text[i] !== ':')\n ) {\n i++\n }\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(start, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n i++\n }\n }\n\n if (i > start) {\n // repair unquoted string\n // also, repair undefined into null\n\n // first, go back to prevent getting trailing whitespaces in the string\n while (isWhitespace(text, i - 1) && i > 0) {\n i--\n }\n\n const symbol = text.slice(start, i)\n output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol)\n\n if (text[i] === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return true\n }\n }\n\n function parseRegex() {\n if (text[i] === '/') {\n const start = i\n i++\n\n while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\\\')) {\n i++\n }\n i++\n\n output += `\"${text.substring(start, i)}\"`\n\n return true\n }\n }\n\n function prevNonWhitespaceIndex(start: number): number {\n let prev = start\n\n while (prev > 0 && isWhitespace(text, prev)) {\n prev--\n }\n\n return prev\n }\n\n function atEndOfNumber() {\n return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i)\n }\n\n function repairNumberEndingWithNumericSymbol(start: number) {\n // repair numbers cut off at the end\n // this will only be called when we end after a '.', '-', or 'e' and does not\n // change the number more than it needs to make it valid JSON\n output += `${text.slice(start, i)}0`\n }\n\n function throwInvalidCharacter(char: string) {\n throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i)\n }\n\n function throwUnexpectedCharacter() {\n throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i)\n }\n\n function throwUnexpectedEnd() {\n throw new JSONRepairError('Unexpected end of json string', text.length)\n }\n\n function throwObjectKeyExpected() {\n throw new JSONRepairError('Object key expected', i)\n }\n\n function throwColonExpected() {\n throw new JSONRepairError('Colon expected', i)\n }\n\n function throwInvalidUnicodeCharacter() {\n const chars = text.slice(i, i + 6)\n throw new JSONRepairError(`Invalid unicode character \"${chars}\"`, i)\n }\n}\n\nfunction atEndOfBlockComment(text: string, i: number) {\n return text[i] === '*' && text[i + 1] === '/'\n}\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AA0BA,MAAME,iBAA4C,GAAG;EACnD,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE;AACR,CAAC;;AAED;AACA,MAAMC,gBAA2C,GAAG;EAClD,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,IAAI;EACV,GAAG,EAAE,GAAG;EACRC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE;EACH;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACC,IAAY,EAAU;EAC/C,IAAIC,CAAC,GAAG,CAAC,EAAC;EACV,IAAIC,MAAM,GAAG,EAAE,EAAC;;EAEhBC,sBAAsB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;EAE/C,MAAMC,SAAS,GAAGC,UAAU,CAAC,CAAC;EAC9B,IAAI,CAACD,SAAS,EAAE;IACdE,kBAAkB,CAAC,CAAC;EACtB;EAEAH,sBAAsB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;EAE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,EAAEtG,CAAC,CAAC;EACrD;EAEA,SAASoD,kBAAkBA,CAAA,EAAG;IAC5B,MAAM,IAAIkD,gCAAe,CAAC,gBAAgB,EAAEtG,CAAC,CAAC;EAChD;EAEA,SAASoF,4BAA4BA,CAAA,EAAG;IACtC,MAAMmB,KAAK,GAAGxG,IAAI,CAAC2C,KAAK,CAAC1C,CAAC,EAAEA,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,IAAIsG,gCAAe,CAAC,8BAA8BC,KAAK,GAAG,EAAEvG,CAAC,CAAC;EACtE;AACF;AAEA,SAASmC,mBAAmBA,CAACpC,IAAY,EAAEC,CAAS,EAAE;EACpD,OAAOD,IAAI,CAACC,CAAC,CAAC,KAAK,GAAG,IAAID,IAAI,CAACC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;AAC/C","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js new file mode 100644 index 0000000000000000000000000000000000000000..40b7bf5bbb51a0fb2bb3f66bbfdfdb898b9706f5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "jsonrepairTransform", { + enumerable: true, + get: function () { + return _stream.jsonrepairTransform; + } +}); +var _stream = require("./streaming/stream.js"); +//# sourceMappingURL=stream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e15e649619a0277e8dd6cf6e0f071cd0305666ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.js","names":["_stream","require"],"sources":["../../src/stream.ts"],"sourcesContent":["// Node.js streaming API\nexport { type JsonRepairTransformOptions, jsonrepairTransform } from './streaming/stream.js'\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js new file mode 100644 index 0000000000000000000000000000000000000000..2b3b186ec3c4c92914e7bf326d699a679768aa16 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js @@ -0,0 +1,75 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createInputBuffer = createInputBuffer; +function createInputBuffer() { + let buffer = ''; + let offset = 0; + let currentLength = 0; + let closed = false; + function ensure(index) { + if (index < offset) { + throw new Error(`${indexOutOfRangeMessage} (index: ${index}, offset: ${offset})`); + } + if (index >= currentLength) { + if (!closed) { + throw new Error(`${indexOutOfRangeMessage} (index: ${index})`); + } + } + } + function push(chunk) { + buffer += chunk; + currentLength += chunk.length; + } + function flush(position) { + if (position > currentLength) { + return; + } + buffer = buffer.substring(position - offset); + offset = position; + } + function charAt(index) { + ensure(index); + return buffer.charAt(index - offset); + } + function charCodeAt(index) { + ensure(index); + return buffer.charCodeAt(index - offset); + } + function substring(start, end) { + ensure(end - 1); // -1 because end is excluded + ensure(start); + return buffer.slice(start - offset, end - offset); + } + function length() { + if (!closed) { + throw new Error('Cannot get length: input is not yet closed'); + } + return currentLength; + } + function isEnd(index) { + if (!closed) { + ensure(index); + } + return index >= currentLength; + } + function close() { + closed = true; + } + return { + push, + flush, + charAt, + charCodeAt, + substring, + length, + currentLength: () => currentLength, + currentBufferSize: () => buffer.length, + isEnd, + close + }; +} +const indexOutOfRangeMessage = 'Index out of range, please configure a larger buffer size'; +//# sourceMappingURL=InputBuffer.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..aae31a745a1cf09c9e1ba658d0c7c941da114dbb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/InputBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"InputBuffer.js","names":["createInputBuffer","buffer","offset","currentLength","closed","ensure","index","Error","indexOutOfRangeMessage","push","chunk","length","flush","position","substring","charAt","charCodeAt","start","end","slice","isEnd","close","currentBufferSize"],"sources":["../../../../src/streaming/buffer/InputBuffer.ts"],"sourcesContent":["export interface InputBuffer {\n push: (chunk: string) => void\n flush: (position: number) => void\n charAt: (index: number) => string\n charCodeAt: (index: number) => number\n substring: (start: number, end: number) => string\n length: () => number\n currentLength: () => number\n currentBufferSize: () => number\n isEnd: (index: number) => boolean\n close: () => void\n}\n\nexport function createInputBuffer(): InputBuffer {\n let buffer = ''\n let offset = 0\n let currentLength = 0\n let closed = false\n\n function ensure(index: number) {\n if (index < offset) {\n throw new Error(`${indexOutOfRangeMessage} (index: ${index}, offset: ${offset})`)\n }\n\n if (index >= currentLength) {\n if (!closed) {\n throw new Error(`${indexOutOfRangeMessage} (index: ${index})`)\n }\n }\n }\n\n function push(chunk: string) {\n buffer += chunk\n currentLength += chunk.length\n }\n\n function flush(position: number) {\n if (position > currentLength) {\n return\n }\n\n buffer = buffer.substring(position - offset)\n offset = position\n }\n\n function charAt(index: number): string {\n ensure(index)\n\n return buffer.charAt(index - offset)\n }\n\n function charCodeAt(index: number): number {\n ensure(index)\n\n return buffer.charCodeAt(index - offset)\n }\n\n function substring(start: number, end: number): string {\n ensure(end - 1) // -1 because end is excluded\n ensure(start)\n\n return buffer.slice(start - offset, end - offset)\n }\n\n function length(): number {\n if (!closed) {\n throw new Error('Cannot get length: input is not yet closed')\n }\n\n return currentLength\n }\n\n function isEnd(index: number): boolean {\n if (!closed) {\n ensure(index)\n }\n\n return index >= currentLength\n }\n\n function close() {\n closed = true\n }\n\n return {\n push,\n flush,\n charAt,\n charCodeAt,\n substring,\n length,\n currentLength: () => currentLength,\n currentBufferSize: () => buffer.length,\n isEnd,\n close\n }\n}\n\nconst indexOutOfRangeMessage = 'Index out of range, please configure a larger buffer size'\n"],"mappings":";;;;;;AAaO,SAASA,iBAAiBA,CAAA,EAAgB;EAC/C,IAAIC,MAAM,GAAG,EAAE;EACf,IAAIC,MAAM,GAAG,CAAC;EACd,IAAIC,aAAa,GAAG,CAAC;EACrB,IAAIC,MAAM,GAAG,KAAK;EAElB,SAASC,MAAMA,CAACC,KAAa,EAAE;IAC7B,IAAIA,KAAK,GAAGJ,MAAM,EAAE;MAClB,MAAM,IAAIK,KAAK,CAAC,GAAGC,sBAAsB,YAAYF,KAAK,aAAaJ,MAAM,GAAG,CAAC;IACnF;IAEA,IAAII,KAAK,IAAIH,aAAa,EAAE;MAC1B,IAAI,CAACC,MAAM,EAAE;QACX,MAAM,IAAIG,KAAK,CAAC,GAAGC,sBAAsB,YAAYF,KAAK,GAAG,CAAC;MAChE;IACF;EACF;EAEA,SAASG,IAAIA,CAACC,KAAa,EAAE;IAC3BT,MAAM,IAAIS,KAAK;IACfP,aAAa,IAAIO,KAAK,CAACC,MAAM;EAC/B;EAEA,SAASC,KAAKA,CAACC,QAAgB,EAAE;IAC/B,IAAIA,QAAQ,GAAGV,aAAa,EAAE;MAC5B;IACF;IAEAF,MAAM,GAAGA,MAAM,CAACa,SAAS,CAACD,QAAQ,GAAGX,MAAM,CAAC;IAC5CA,MAAM,GAAGW,QAAQ;EACnB;EAEA,SAASE,MAAMA,CAACT,KAAa,EAAU;IACrCD,MAAM,CAACC,KAAK,CAAC;IAEb,OAAOL,MAAM,CAACc,MAAM,CAACT,KAAK,GAAGJ,MAAM,CAAC;EACtC;EAEA,SAASc,UAAUA,CAACV,KAAa,EAAU;IACzCD,MAAM,CAACC,KAAK,CAAC;IAEb,OAAOL,MAAM,CAACe,UAAU,CAACV,KAAK,GAAGJ,MAAM,CAAC;EAC1C;EAEA,SAASY,SAASA,CAACG,KAAa,EAAEC,GAAW,EAAU;IACrDb,MAAM,CAACa,GAAG,GAAG,CAAC,CAAC,EAAC;IAChBb,MAAM,CAACY,KAAK,CAAC;IAEb,OAAOhB,MAAM,CAACkB,KAAK,CAACF,KAAK,GAAGf,MAAM,EAAEgB,GAAG,GAAGhB,MAAM,CAAC;EACnD;EAEA,SAASS,MAAMA,CAAA,EAAW;IACxB,IAAI,CAACP,MAAM,EAAE;MACX,MAAM,IAAIG,KAAK,CAAC,4CAA4C,CAAC;IAC/D;IAEA,OAAOJ,aAAa;EACtB;EAEA,SAASiB,KAAKA,CAACd,KAAa,EAAW;IACrC,IAAI,CAACF,MAAM,EAAE;MACXC,MAAM,CAACC,KAAK,CAAC;IACf;IAEA,OAAOA,KAAK,IAAIH,aAAa;EAC/B;EAEA,SAASkB,KAAKA,CAAA,EAAG;IACfjB,MAAM,GAAG,IAAI;EACf;EAEA,OAAO;IACLK,IAAI;IACJG,KAAK;IACLG,MAAM;IACNC,UAAU;IACVF,SAAS;IACTH,MAAM;IACNR,aAAa,EAAEA,CAAA,KAAMA,aAAa;IAClCmB,iBAAiB,EAAEA,CAAA,KAAMrB,MAAM,CAACU,MAAM;IACtCS,KAAK;IACLC;EACF,CAAC;AACH;AAEA,MAAMb,sBAAsB,GAAG,2DAA2D","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js new file mode 100644 index 0000000000000000000000000000000000000000..ec00531d09d67c8a7d26045cab8f1d424e886cd0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js @@ -0,0 +1,117 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createOutputBuffer = createOutputBuffer; +var _stringUtils = require("../../utils/stringUtils.js"); +function createOutputBuffer(_ref) { + let { + write, + chunkSize, + bufferSize + } = _ref; + let buffer = ''; + let offset = 0; + function flushChunks() { + let minSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bufferSize; + while (buffer.length >= minSize + chunkSize) { + const chunk = buffer.substring(0, chunkSize); + write(chunk); + offset += chunkSize; + buffer = buffer.substring(chunkSize); + } + } + function flush() { + flushChunks(0); + if (buffer.length > 0) { + write(buffer); + offset += buffer.length; + buffer = ''; + } + } + function push(text) { + buffer += text; + flushChunks(); + } + function unshift(text) { + if (offset > 0) { + throw new Error(`Cannot unshift: ${flushedMessage}`); + } + buffer = text + buffer; + flushChunks(); + } + function remove(start, end) { + if (start < offset) { + throw new Error(`Cannot remove: ${flushedMessage}`); + } + if (end !== undefined) { + buffer = buffer.substring(0, start - offset) + buffer.substring(end - offset); + } else { + buffer = buffer.substring(0, start - offset); + } + } + function insertAt(index, text) { + if (index < offset) { + throw new Error(`Cannot insert: ${flushedMessage}`); + } + buffer = buffer.substring(0, index - offset) + text + buffer.substring(index - offset); + } + function length() { + return offset + buffer.length; + } + function stripLastOccurrence(textToStrip) { + let stripRemainingText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + const bufferIndex = buffer.lastIndexOf(textToStrip); + if (bufferIndex !== -1) { + if (stripRemainingText) { + buffer = buffer.substring(0, bufferIndex); + } else { + buffer = buffer.substring(0, bufferIndex) + buffer.substring(bufferIndex + textToStrip.length); + } + } + } + function insertBeforeLastWhitespace(textToInsert) { + let bufferIndex = buffer.length; // index relative to the start of the buffer, not taking `offset` into account + + if (!(0, _stringUtils.isWhitespace)(buffer, bufferIndex - 1)) { + // no trailing whitespaces + push(textToInsert); + return; + } + while ((0, _stringUtils.isWhitespace)(buffer, bufferIndex - 1)) { + bufferIndex--; + } + if (bufferIndex <= 0) { + throw new Error(`Cannot insert: ${flushedMessage}`); + } + buffer = buffer.substring(0, bufferIndex) + textToInsert + buffer.substring(bufferIndex); + flushChunks(); + } + function endsWithIgnoringWhitespace(char) { + let i = buffer.length - 1; + while (i > 0) { + if (char === buffer.charAt(i)) { + return true; + } + if (!(0, _stringUtils.isWhitespace)(buffer, i)) { + return false; + } + i--; + } + return false; + } + return { + push, + unshift, + remove, + insertAt, + length, + flush, + stripLastOccurrence, + insertBeforeLastWhitespace, + endsWithIgnoringWhitespace + }; +} +const flushedMessage = 'start of the output is already flushed from the buffer'; +//# sourceMappingURL=OutputBuffer.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0de4cb7c5aa5f7b2e9801d877f1d3e9b82df3615 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/buffer/OutputBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OutputBuffer.js","names":["_stringUtils","require","createOutputBuffer","_ref","write","chunkSize","bufferSize","buffer","offset","flushChunks","minSize","arguments","length","undefined","chunk","substring","flush","push","text","unshift","Error","flushedMessage","remove","start","end","insertAt","index","stripLastOccurrence","textToStrip","stripRemainingText","bufferIndex","lastIndexOf","insertBeforeLastWhitespace","textToInsert","isWhitespace","endsWithIgnoringWhitespace","char","i","charAt"],"sources":["../../../../src/streaming/buffer/OutputBuffer.ts"],"sourcesContent":["import { isWhitespace } from '../../utils/stringUtils.js'\n\nexport interface OutputBuffer {\n push: (text: string) => void\n unshift: (text: string) => void\n remove: (start: number, end?: number) => void\n insertAt: (index: number, text: string) => void\n length: () => number\n flush: () => void\n\n stripLastOccurrence: (textToStrip: string, stripRemainingText?: boolean) => void\n insertBeforeLastWhitespace: (textToInsert: string) => void\n endsWithIgnoringWhitespace: (char: string) => boolean\n}\n\nexport interface OutputBufferOptions {\n write: (chunk: string) => void\n chunkSize: number\n bufferSize: number\n}\n\nexport function createOutputBuffer({\n write,\n chunkSize,\n bufferSize\n}: OutputBufferOptions): OutputBuffer {\n let buffer = ''\n let offset = 0\n\n function flushChunks(minSize = bufferSize) {\n while (buffer.length >= minSize + chunkSize) {\n const chunk = buffer.substring(0, chunkSize)\n write(chunk)\n offset += chunkSize\n buffer = buffer.substring(chunkSize)\n }\n }\n\n function flush() {\n flushChunks(0)\n\n if (buffer.length > 0) {\n write(buffer)\n offset += buffer.length\n buffer = ''\n }\n }\n\n function push(text: string) {\n buffer += text\n flushChunks()\n }\n\n function unshift(text: string) {\n if (offset > 0) {\n throw new Error(`Cannot unshift: ${flushedMessage}`)\n }\n\n buffer = text + buffer\n flushChunks()\n }\n\n function remove(start: number, end?: number) {\n if (start < offset) {\n throw new Error(`Cannot remove: ${flushedMessage}`)\n }\n\n if (end !== undefined) {\n buffer = buffer.substring(0, start - offset) + buffer.substring(end - offset)\n } else {\n buffer = buffer.substring(0, start - offset)\n }\n }\n\n function insertAt(index: number, text: string) {\n if (index < offset) {\n throw new Error(`Cannot insert: ${flushedMessage}`)\n }\n\n buffer = buffer.substring(0, index - offset) + text + buffer.substring(index - offset)\n }\n\n function length(): number {\n return offset + buffer.length\n }\n\n function stripLastOccurrence(textToStrip: string, stripRemainingText = false) {\n const bufferIndex = buffer.lastIndexOf(textToStrip)\n\n if (bufferIndex !== -1) {\n if (stripRemainingText) {\n buffer = buffer.substring(0, bufferIndex)\n } else {\n buffer =\n buffer.substring(0, bufferIndex) + buffer.substring(bufferIndex + textToStrip.length)\n }\n }\n }\n\n function insertBeforeLastWhitespace(textToInsert: string) {\n let bufferIndex = buffer.length // index relative to the start of the buffer, not taking `offset` into account\n\n if (!isWhitespace(buffer, bufferIndex - 1)) {\n // no trailing whitespaces\n push(textToInsert)\n return\n }\n\n while (isWhitespace(buffer, bufferIndex - 1)) {\n bufferIndex--\n }\n\n if (bufferIndex <= 0) {\n throw new Error(`Cannot insert: ${flushedMessage}`)\n }\n\n buffer = buffer.substring(0, bufferIndex) + textToInsert + buffer.substring(bufferIndex)\n flushChunks()\n }\n\n function endsWithIgnoringWhitespace(char: string): boolean {\n let i = buffer.length - 1\n\n while (i > 0) {\n if (char === buffer.charAt(i)) {\n return true\n }\n\n if (!isWhitespace(buffer, i)) {\n return false\n }\n\n i--\n }\n\n return false\n }\n\n return {\n push,\n unshift,\n remove,\n insertAt,\n length,\n flush,\n\n stripLastOccurrence,\n insertBeforeLastWhitespace,\n endsWithIgnoringWhitespace\n }\n}\n\nconst flushedMessage = 'start of the output is already flushed from the buffer'\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAqBO,SAASC,kBAAkBA,CAAAC,IAAA,EAII;EAAA,IAJH;IACjCC,KAAK;IACLC,SAAS;IACTC;EACmB,CAAC,GAAAH,IAAA;EACpB,IAAII,MAAM,GAAG,EAAE;EACf,IAAIC,MAAM,GAAG,CAAC;EAEd,SAASC,WAAWA,CAAA,EAAuB;IAAA,IAAtBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGL,UAAU;IACvC,OAAOC,MAAM,CAACK,MAAM,IAAIF,OAAO,GAAGL,SAAS,EAAE;MAC3C,MAAMS,KAAK,GAAGP,MAAM,CAACQ,SAAS,CAAC,CAAC,EAA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AAc,EAAE,CAAC;IACrD;IAEAd,MAAM,GAAGA,MAAM,CAACQ,SAAS,CAAC,CAAC,EAAEe,WAAW,CAAC,GAAGG,YAAY,GAAG1B,MAAM,CAACQ,SAAS,CAACe,WAAW,CAAC;IACxFrB,WAAW,CAAC,CAAC;EACf;EAEA,SAAS0B,0BAA0BA,CAACC,IAAY,EAAW;IACzD,IAAIC,CAAC,GAAG9B,MAAM,CAACK,MAAM,GAAG,CAAC;IAEzB,OAAOyB,CAAC,GAAG,CAAC,EAAE;MACZ,IAAID,IAAI,KAAK7B,MAAM,CAAC+B,MAAM,CAACD,CAAC,CAAC,EAAE;QAC7B,OAAO,IAAI;MACb;MAEA,IAAI,CAAC,IAAAH,yBAAY,EAAC3B,MAAM,EAAE8B,CAAC,CAAC,EAAE;QAC5B,OAAO,KAAK;MACd;MAEAA,CAAC,EAAE;IACL;IAEA,OAAO,KAAK;EACd;EAEA,OAAO;IACLpB,IAAI;IACJE,OAAO;IACPG,MAAM;IACNG,QAAQ;IACRb,MAAM;IACNI,KAAK;IAELW,mBAAmB;IACnBK,0BAA0B;IAC1BG;EACF,CAAC;AACH;AAEA,MAAMd,cAAc,GAAG,wDAAwD","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js new file mode 100644 index 0000000000000000000000000000000000000000..f2f2eb520e96588da23d8bc2dc4c86e5c2e9b733 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js @@ -0,0 +1,824 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.jsonrepairCore = jsonrepairCore; +var _JSONRepairError = require("../utils/JSONRepairError.js"); +var _stringUtils = require("../utils/stringUtils.js"); +var _InputBuffer = require("./buffer/InputBuffer.js"); +var _OutputBuffer = require("./buffer/OutputBuffer.js"); +var _stack = require("./stack.js"); +const controlCharacters = { + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' +}; + +// map with all escape characters +const escapeCharacters = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + // note that \u is handled separately in parseString() +}; +function jsonrepairCore(_ref) { + let { + onData, + bufferSize = 65536, + chunkSize = 65536 + } = _ref; + const input = (0, _InputBuffer.createInputBuffer)(); + const output = (0, _OutputBuffer.createOutputBuffer)({ + write: onData, + bufferSize, + chunkSize + }); + let i = 0; + let iFlushed = 0; + const stack = (0, _stack.createStack)(); + function flushInputBuffer() { + while (iFlushed < i - bufferSize - chunkSize) { + iFlushed += chunkSize; + input.flush(iFlushed); + } + } + function transform(chunk) { + input.push(chunk); + while (i < input.currentLength() - bufferSize && parse()) { + // loop until there is nothing more to process + } + flushInputBuffer(); + } + function flush() { + input.close(); + while (parse()) { + // loop until there is nothing more to process + } + output.flush(); + } + function parse() { + parseWhitespaceAndSkipComments(); + switch (stack.type) { + case _stack.StackType.object: + { + switch (stack.caret) { + case _stack.Caret.beforeKey: + return skipEllipsis() || parseObjectKey() || parseUnexpectedColon() || parseRepairTrailingComma() || parseRepairObjectEndOrComma(); + case _stack.Caret.beforeValue: + return parseValue() || parseRepairMissingObjectValue(); + case _stack.Caret.afterValue: + return parseObjectComma() || parseObjectEnd() || parseRepairObjectEndOrComma(); + default: + return false; + } + } + case _stack.StackType.array: + { + switch (stack.caret) { + case _stack.Caret.beforeValue: + return skipEllipsis() || parseValue() || parseRepairTrailingComma() || parseRepairArrayEnd(); + case _stack.Caret.afterValue: + return parseArrayComma() || parseArrayEnd() || parseRepairMissingComma() || parseRepairArrayEnd(); + default: + return false; + } + } + case _stack.StackType.ndJson: + { + switch (stack.caret) { + case _stack.Caret.beforeValue: + return parseValue() || parseRepairTrailingComma(); + case _stack.Caret.afterValue: + return parseArrayComma() || parseRepairMissingComma() || parseRepairNdJsonEnd(); + default: + return false; + } + } + case _stack.StackType.functionCall: + { + switch (stack.caret) { + case _stack.Caret.beforeValue: + return parseValue(); + case _stack.Caret.afterValue: + return parseFunctionCallEnd(); + default: + return false; + } + } + case _stack.StackType.root: + { + switch (stack.caret) { + case _stack.Caret.beforeValue: + return parseRootStart(); + case _stack.Caret.afterValue: + return parseRootEnd(); + default: + return false; + } + } + default: + return false; + } + } + function parseValue() { + return parseObjectStart() || parseArrayStart() || parseString() || parseNumber() || parseKeywords() || parseRepairUnquotedString() || parseRepairRegex(); + } + function parseObjectStart() { + if (parseCharacter('{')) { + parseWhitespaceAndSkipComments(); + skipEllipsis(); + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + if (parseCharacter('}')) { + return stack.update(_stack.Caret.afterValue); + } + return stack.push(_stack.StackType.object, _stack.Caret.beforeKey); + } + return false; + } + function parseArrayStart() { + if (parseCharacter('[')) { + parseWhitespaceAndSkipComments(); + skipEllipsis(); + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + if (parseCharacter(']')) { + return stack.update(_stack.Caret.afterValue); + } + return stack.push(_stack.StackType.array, _stack.Caret.beforeValue); + } + return false; + } + function parseRepairUnquotedString() { + let j = i; + if ((0, _stringUtils.isFunctionNameCharStart)(input.charAt(j))) { + while (!input.isEnd(j) && (0, _stringUtils.isFunctionNameChar)(input.charAt(j))) { + j++; + } + let k = j; + while ((0, _stringUtils.isWhitespace)(input, k)) { + k++; + } + if (input.charAt(k) === '(') { + // repair a MongoDB function call like NumberLong("2") + // repair a JSONP function call like callback({...}); + k++; + i = k; + return stack.push(_stack.StackType.functionCall, _stack.Caret.beforeValue); + } + } + j = findNextDelimiter(false, j); + if (j !== null) { + // test start of an url like "https://..." (this would be parsed as a comment) + if (input.charAt(j - 1) === ':' && _stringUtils.regexUrlStart.test(input.substring(i, j + 2))) { + while (!input.isEnd(j) && _stringUtils.regexUrlChar.test(input.charAt(j))) { + j++; + } + } + const symbol = input.substring(i, j); + i = j; + output.push(symbol === 'undefined' ? 'null' : JSON.stringify(symbol)); + if (input.charAt(i) === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return stack.update(_stack.Caret.afterValue); + } + return false; + } + function parseRepairRegex() { + if (input.charAt(i) === '/') { + const start = i; + i++; + while (!input.isEnd(i) && (input.charAt(i) !== '/' || input.charAt(i - 1) === '\\')) { + i++; + } + i++; + output.push(`"${input.substring(start, i)}"`); + return stack.update(_stack.Caret.afterValue); + } + } + function parseRepairMissingObjectValue() { + // repair missing object value + output.push('null'); + return stack.update(_stack.Caret.afterValue); + } + function parseRepairTrailingComma() { + // repair trailing comma + if (output.endsWithIgnoringWhitespace(',')) { + output.stripLastOccurrence(','); + return stack.update(_stack.Caret.afterValue); + } + return false; + } + function parseUnexpectedColon() { + if (input.charAt(i) === ':') { + throwObjectKeyExpected(); + } + return false; + } + function parseUnexpectedEnd() { + if (input.isEnd(i)) { + throwUnexpectedEnd(); + } else { + throwUnexpectedCharacter(); + } + return false; + } + function parseObjectKey() { + const parsedKey = parseString() || parseUnquotedKey(); + if (parsedKey) { + parseWhitespaceAndSkipComments(); + if (parseCharacter(':')) { + // expect a value after the : + return stack.update(_stack.Caret.beforeValue); + } + const truncatedText = input.isEnd(i); + if ((0, _stringUtils.isStartOfValue)(input.charAt(i)) || truncatedText) { + // repair missing colon + output.insertBeforeLastWhitespace(':'); + return stack.update(_stack.Caret.beforeValue); + } + throwColonExpected(); + } + return false; + } + function parseObjectComma() { + if (parseCharacter(',')) { + return stack.update(_stack.Caret.beforeKey); + } + return false; + } + function parseObjectEnd() { + if (parseCharacter('}')) { + return stack.pop(); + } + return false; + } + function parseRepairObjectEndOrComma() { + // repair missing object end and trailing comma + if (input.charAt(i) === '{') { + output.stripLastOccurrence(','); + output.insertBeforeLastWhitespace('}'); + return stack.pop(); + } + + // repair missing comma + if (!input.isEnd(i) && (0, _stringUtils.isStartOfValue)(input.charAt(i))) { + output.insertBeforeLastWhitespace(','); + return stack.update(_stack.Caret.beforeKey); + } + + // repair missing closing brace + output.insertBeforeLastWhitespace('}'); + return stack.pop(); + } + function parseArrayComma() { + if (parseCharacter(',')) { + return stack.update(_stack.Caret.beforeValue); + } + return false; + } + function parseArrayEnd() { + if (parseCharacter(']')) { + return stack.pop(); + } + return false; + } + function parseRepairMissingComma() { + // repair missing comma + if (!input.isEnd(i) && (0, _stringUtils.isStartOfValue)(input.charAt(i))) { + output.insertBeforeLastWhitespace(','); + return stack.update(_stack.Caret.beforeValue); + } + return false; + } + function parseRepairArrayEnd() { + // repair missing closing bracket + output.insertBeforeLastWhitespace(']'); + return stack.pop(); + } + function parseRepairNdJsonEnd() { + if (input.isEnd(i)) { + output.push('\n]'); + return stack.pop(); + } + throwUnexpectedEnd(); + return false; // just to make TS happy + } + function parseFunctionCallEnd() { + if (skipCharacter(')')) { + skipCharacter(';'); + } + return stack.pop(); + } + function parseRootStart() { + parseMarkdownCodeBlock(['```', '[```', '{```']); + return parseValue() || parseUnexpectedEnd(); + } + function parseRootEnd() { + parseMarkdownCodeBlock(['```', '```]', '```}']); + const parsedComma = parseCharacter(','); + parseWhitespaceAndSkipComments(); + if ((0, _stringUtils.isStartOfValue)(input.charAt(i)) && (output.endsWithIgnoringWhitespace(',') || output.endsWithIgnoringWhitespace('\n'))) { + // start of a new value after end of the root level object: looks like + // newline delimited JSON -> turn into a root level array + if (!parsedComma) { + // repair missing comma + output.insertBeforeLastWhitespace(','); + } + output.unshift('[\n'); + return stack.push(_stack.StackType.ndJson, _stack.Caret.beforeValue); + } + if (parsedComma) { + // repair: remove trailing comma + output.stripLastOccurrence(','); + return stack.update(_stack.Caret.afterValue); + } + + // repair redundant end braces and brackets + while (input.charAt(i) === '}' || input.charAt(i) === ']') { + i++; + parseWhitespaceAndSkipComments(); + } + if (!input.isEnd(i)) { + throwUnexpectedCharacter(); + } + return false; + } + function parseWhitespaceAndSkipComments() { + let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const start = i; + let changed = parseWhitespace(skipNewline); + do { + changed = parseComment(); + if (changed) { + changed = parseWhitespace(skipNewline); + } + } while (changed); + return i > start; + } + function parseWhitespace(skipNewline) { + const _isWhiteSpace = skipNewline ? _stringUtils.isWhitespace : _stringUtils.isWhitespaceExceptNewline; + let whitespace = ''; + while (true) { + if (_isWhiteSpace(input, i)) { + whitespace += input.charAt(i); + i++; + } else if ((0, _stringUtils.isSpecialWhitespace)(input, i)) { + // repair special whitespace + whitespace += ' '; + i++; + } else { + break; + } + } + if (whitespace.length > 0) { + output.push(whitespace); + return true; + } + return false; + } + function parseComment() { + // find a block comment '/* ... */' + if (input.charAt(i) === '/' && input.charAt(i + 1) === '*') { + // repair block comment by skipping it + while (!input.isEnd(i) && !atEndOfBlockComment(i)) { + i++; + } + i += 2; + return true; + } + + // find a line comment '// ...' + if (input.charAt(i) === '/' && input.charAt(i + 1) === '/') { + // repair line comment by skipping it + while (!input.isEnd(i) && input.charAt(i) !== '\n') { + i++; + } + return true; + } + return false; + } + function parseMarkdownCodeBlock(blocks) { + // find and skip over a Markdown fenced code block: + // ``` ... ``` + // or + // ```json ... ``` + if (skipMarkdownCodeBlock(blocks)) { + if ((0, _stringUtils.isFunctionNameCharStart)(input.charAt(i))) { + // strip the optional language specifier like "json" + while (!input.isEnd(i) && (0, _stringUtils.isFunctionNameChar)(input.charAt(i))) { + i++; + } + } + parseWhitespaceAndSkipComments(); + return true; + } + return false; + } + function skipMarkdownCodeBlock(blocks) { + for (const block of blocks) { + const end = i + block.length; + if (input.substring(i, end) === block) { + i = end; + return true; + } + } + return false; + } + function parseCharacter(char) { + if (input.charAt(i) === char) { + output.push(input.charAt(i)); + i++; + return true; + } + return false; + } + function skipCharacter(char) { + if (input.charAt(i) === char) { + i++; + return true; + } + return false; + } + function skipEscapeCharacter() { + return skipCharacter('\\'); + } + + /** + * Skip ellipsis like "[1,2,3,...]" or "[1,2,3,...,9]" or "[...,7,8,9]" + * or a similar construct in objects. + */ + function skipEllipsis() { + parseWhitespaceAndSkipComments(); + if (input.charAt(i) === '.' && input.charAt(i + 1) === '.' && input.charAt(i + 2) === '.') { + // repair: remove the ellipsis (three dots) and optionally a comma + i += 3; + parseWhitespaceAndSkipComments(); + skipCharacter(','); + return true; + } + return false; + } + + /** + * Parse a string enclosed by double quotes "...". Can contain escaped quotes + * Repair strings enclosed in single quotes or special quotes + * Repair an escaped string + * + * The function can run in two stages: + * - First, it assumes the string has a valid end quote + * - If it turns out that the string does not have a valid end quote followed + * by a delimiter (which should be the case), the function runs again in a + * more conservative way, stopping the string at the first next delimiter + * and fixing the string by inserting a quote there, or stopping at a + * stop index detected in the first iteration. + */ + function parseString() { + let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + let skipEscapeChars = input.charAt(i) === '\\'; + if (skipEscapeChars) { + // repair: remove the first escape character + i++; + skipEscapeChars = true; + } + if ((0, _stringUtils.isQuote)(input.charAt(i))) { + // double quotes are correct JSON, + // single quotes come from JavaScript for example, we assume it will have a correct single end quote too + // otherwise, we will match any double-quote-like start with a double-quote-like end, + // or any single-quote-like start with a single-quote-like end + const isEndQuote = (0, _stringUtils.isDoubleQuote)(input.charAt(i)) ? _stringUtils.isDoubleQuote : (0, _stringUtils.isSingleQuote)(input.charAt(i)) ? _stringUtils.isSingleQuote : (0, _stringUtils.isSingleQuoteLike)(input.charAt(i)) ? _stringUtils.isSingleQuoteLike : _stringUtils.isDoubleQuoteLike; + const iBefore = i; + const oBefore = output.length(); + output.push('"'); + i++; + while (true) { + if (input.isEnd(i)) { + // end of text, we have a missing quote somewhere + + const iPrev = prevNonWhitespaceIndex(i - 1); + if (!stopAtDelimiter && (0, _stringUtils.isDelimiter)(input.charAt(iPrev))) { + // if the text ends with a delimiter, like ["hello], + // so the missing end quote should be inserted before this delimiter + // retry parsing the string, stopping at the first next delimiter + i = iBefore; + output.remove(oBefore); + return parseString(true); + } + + // repair missing quote + output.insertBeforeLastWhitespace('"'); + return stack.update(_stack.Caret.afterValue); + } + if (i === stopAtIndex) { + // use the stop index detected in the first iteration, and repair end quote + output.insertBeforeLastWhitespace('"'); + return stack.update(_stack.Caret.afterValue); + } + if (isEndQuote(input.charAt(i))) { + // end quote + // let us check what is before and after the quote to verify whether this is a legit end quote + const iQuote = i; + const oQuote = output.length(); + output.push('"'); + i++; + parseWhitespaceAndSkipComments(false); + if (stopAtDelimiter || input.isEnd(i) || (0, _stringUtils.isDelimiter)(input.charAt(i)) || (0, _stringUtils.isQuote)(input.charAt(i)) || (0, _stringUtils.isDigit)(input.charAt(i))) { + // The quote is followed by the end of the text, a delimiter, or a next value + // so the quote is indeed the end of the string + parseConcatenatedString(); + return stack.update(_stack.Caret.afterValue); + } + const iPrevChar = prevNonWhitespaceIndex(iQuote - 1); + const prevChar = input.charAt(iPrevChar); + if (prevChar === ',') { + // A comma followed by a quote, like '{"a":"b,c,"d":"e"}'. + // We assume that the quote is a start quote, and that the end quote + // should have been located right before the comma but is missing. + i = iBefore; + output.remove(oBefore); + return parseString(false, iPrevChar); + } + if ((0, _stringUtils.isDelimiter)(prevChar)) { + // This is not the right end quote: it is preceded by a delimiter, + // and NOT followed by a delimiter. So, there is an end quote missing + // parse the string again and then stop at the first next delimiter + i = iBefore; + output.remove(oBefore); + return parseString(true); + } + + // revert to right after the quote but before any whitespace, and continue parsing the string + output.remove(oQuote + 1); + i = iQuote + 1; + + // repair unescaped quote + output.insertAt(oQuote, '\\'); + } else if (stopAtDelimiter && (0, _stringUtils.isUnquotedStringDelimiter)(input.charAt(i))) { + // we're in the mode to stop the string at the first delimiter + // because there is an end quote missing + + // test start of an url like "https://..." (this would be parsed as a comment) + if (input.charAt(i - 1) === ':' && _stringUtils.regexUrlStart.test(input.substring(iBefore + 1, i + 2))) { + while (!input.isEnd(i) && _stringUtils.regexUrlChar.test(input.charAt(i))) { + output.push(input.charAt(i)); + i++; + } + } + + // repair missing quote + output.insertBeforeLastWhitespace('"'); + parseConcatenatedString(); + return stack.update(_stack.Caret.afterValue); + } else if (input.charAt(i) === '\\') { + // handle escaped content like \n or \u2605 + const char = input.charAt(i + 1); + const escapeChar = escapeCharacters[char]; + if (escapeChar !== undefined) { + output.push(input.substring(i, i + 2)); + i += 2; + } else if (char === 'u') { + let j = 2; + while (j < 6 && (0, _stringUtils.isHex)(input.charAt(i + j))) { + j++; + } + if (j === 6) { + output.push(input.substring(i, i + 6)); + i += 6; + } else if (input.isEnd(i + j)) { + // repair invalid or truncated unicode char at the end of the text + // by removing the unicode char and ending the string here + i += j; + } else { + throwInvalidUnicodeCharacter(); + } + } else { + // repair invalid escape character: remove it + output.push(char); + i += 2; + } + } else { + // handle regular characters + const char = input.charAt(i); + if (char === '"' && input.charAt(i - 1) !== '\\') { + // repair unescaped double quote + output.push(`\\${char}`); + i++; + } else if ((0, _stringUtils.isControlCharacter)(char)) { + // unescaped control character + output.push(controlCharacters[char]); + i++; + } else { + if (!(0, _stringUtils.isValidStringCharacter)(char)) { + throwInvalidCharacter(char); + } + output.push(char); + i++; + } + } + if (skipEscapeChars) { + // repair: skipped escape character (nothing to do) + skipEscapeCharacter(); + } + } + } + return false; + } + + /** + * Repair concatenated strings like "hello" + "world", change this into "helloworld" + */ + function parseConcatenatedString() { + let parsed = false; + parseWhitespaceAndSkipComments(); + while (input.charAt(i) === '+') { + parsed = true; + i++; + parseWhitespaceAndSkipComments(); + + // repair: remove the end quote of the first string + output.stripLastOccurrence('"', true); + const start = output.length(); + const parsedStr = parseString(); + if (parsedStr) { + // repair: remove the start quote of the second string + output.remove(start, start + 1); + } else { + // repair: remove the + because it is not followed by a string + output.insertBeforeLastWhitespace('"'); + } + } + return parsed; + } + + /** + * Parse a number like 2.4 or 2.4e6 + */ + function parseNumber() { + const start = i; + if (input.charAt(i) === '-') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(_stack.Caret.afterValue); + } + if (!(0, _stringUtils.isDigit)(input.charAt(i))) { + i = start; + return false; + } + } + + // Note that in JSON leading zeros like "00789" are not allowed. + // We will allow all leading zeros here though and at the end of parseNumber + // check against trailing zeros and repair that if needed. + // Leading zeros can have meaning, so we should not clear them. + while ((0, _stringUtils.isDigit)(input.charAt(i))) { + i++; + } + if (input.charAt(i) === '.') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(_stack.Caret.afterValue); + } + if (!(0, _stringUtils.isDigit)(input.charAt(i))) { + i = start; + return false; + } + while ((0, _stringUtils.isDigit)(input.charAt(i))) { + i++; + } + } + if (input.charAt(i) === 'e' || input.charAt(i) === 'E') { + i++; + if (input.charAt(i) === '-' || input.charAt(i) === '+') { + i++; + } + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(_stack.Caret.afterValue); + } + if (!(0, _stringUtils.isDigit)(input.charAt(i))) { + i = start; + return false; + } + while ((0, _stringUtils.isDigit)(input.charAt(i))) { + i++; + } + } + + // if we're not at the end of the number by this point, allow this to be parsed as another type + if (!atEndOfNumber()) { + i = start; + return false; + } + if (i > start) { + // repair a number with leading zeros like "00789" + const num = input.substring(start, i); + const hasInvalidLeadingZero = /^0\d/.test(num); + output.push(hasInvalidLeadingZero ? `"${num}"` : num); + return stack.update(_stack.Caret.afterValue); + } + return false; + } + + /** + * Parse keywords true, false, null + * Repair Python keywords True, False, None + */ + function parseKeywords() { + return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') || + // repair Python keywords True, False, None + parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null'); + } + function parseKeyword(name, value) { + if (input.substring(i, i + name.length) === name) { + output.push(value); + i += name.length; + return stack.update(_stack.Caret.afterValue); + } + return false; + } + function parseUnquotedKey() { + let end = findNextDelimiter(true, i); + if (end !== null) { + // first, go back to prevent getting trailing whitespaces in the string + while ((0, _stringUtils.isWhitespace)(input, end - 1) && end > i) { + end--; + } + const symbol = input.substring(i, end); + output.push(JSON.stringify(symbol)); + i = end; + if (input.charAt(i) === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return stack.update(_stack.Caret.afterValue); // we do not have a state Caret.afterKey, therefore we use afterValue here + } + return false; + } + function findNextDelimiter(isKey, start) { + // note that the symbol can end with whitespaces: we stop at the next delimiter + // also, note that we allow strings to contain a slash / in order to support repairing regular expressions + let j = start; + while (!input.isEnd(j) && !(0, _stringUtils.isUnquotedStringDelimiter)(input.charAt(j)) && !(0, _stringUtils.isQuote)(input.charAt(j)) && (!isKey || input.charAt(j) !== ':')) { + j++; + } + return j > i ? j : null; + } + function prevNonWhitespaceIndex(start) { + let prev = start; + while (prev > 0 && (0, _stringUtils.isWhitespace)(input, prev)) { + prev--; + } + return prev; + } + function atEndOfNumber() { + return input.isEnd(i) || (0, _stringUtils.isDelimiter)(input.charAt(i)) || (0, _stringUtils.isWhitespace)(input, i); + } + function repairNumberEndingWithNumericSymbol(start) { + // repair numbers cut off at the end + // this will only be called when we end after a '.', '-', or 'e' and does not + // change the number more than it needs to make it valid JSON + output.push(`${input.substring(start, i)}0`); + } + function throwInvalidCharacter(char) { + throw new _JSONRepairError.JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i); + } + function throwUnexpectedCharacter() { + throw new _JSONRepairError.JSONRepairError(`Unexpected character ${JSON.stringify(input.charAt(i))}`, i); + } + function throwUnexpectedEnd() { + throw new _JSONRepairError.JSONRepairError('Unexpected end of json string', i); + } + function throwObjectKeyExpected() { + throw new _JSONRepairError.JSONRepairError('Object key expected', i); + } + function throwColonExpected() { + throw new _JSONRepairError.JSONRepairError('Colon expected', i); + } + function throwInvalidUnicodeCharacter() { + const chars = input.substring(i, i + 6); + throw new _JSONRepairError.JSONRepairError(`Invalid unicode character "${chars}"`, i); + } + function atEndOfBlockComment(i) { + return input.charAt(i) === '*' && input.charAt(i + 1) === '/'; + } + return { + transform, + flush + }; +} +//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6dba9598fba3bd33217b2041ae4ce87f5e321fab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"core.js","names":["_JSONRepairError","require","_stringUtils","_InputBuffer","_OutputBuffer","_stack","controlCharacters","escapeCharacters","b","f","n","r","t","jsonrepairCore","_ref","onData","bufferSize","chunkSize","input","createInputBuffer","output","createOutputBuffer","write","i","iFlushed","stack","createStack","flushInputBuffer","flush","transform","chunk","push","currentLength","parse","close","parseWhitespaceAndSkipComments","type","StackType","object","caret","Caret","beforeKey","skipEllipsis","parseObjectKey","parseUnexpectedColon","parseRepairTrailingComma","parseRepairObjectEndOrComma","beforeValue","parseValue","parseRepairMissingObjectValue","afterValue","parseObjectComma","parseObjectEnd","array","parseRepairArrayEnd","parseArrayComma","parseArrayEnd","parseRepairMissingComma","ndJson","parseRepairNdJsonEnd","functionCall","parseFunctionCallEnd","root","parseRootStart","parseRootEnd","parseObjectStart","parseArrayStart","parseString","parseNumber","parseKeywords","parseRepairUnquotedString","parseRepairRegex","parseCharacter","skipCharacter","update","j","isFunctionNameCharStart","charAt","isEnd","isFunctionNameChar","k","isWhitespace","findNextDelimiter","regexUrlStart","test","substring","regexUrlChar","symbol","JSON","stringify","start","endsWithIgnoringWhitespace","stripLastOccurrence","throwObjectKeyExpected","parseUnexpectedEnd","throwUnexpectedEnd","throwUnexpectedCharacter","parsedKey","parseUnquotedKey","truncatedText","isStartOfValue","insertBeforeLastWhitespace","throwColonExpected","pop","parseMarkdownCodeBlock","parsedComma","unshift","skipNewline","arguments","length","undefined","changed","parseWhitespace","parseComment","_isWhiteSpace","isWhitespaceExceptNewline","whitespace","isSpecialWhitespace","atEndOfBlockComment","blocks","skipMarkdownCodeBlock","block","end","char","skipEscapeCharacter","stopAtDelimiter","stopAtIndex","skipEscapeChars","isQuote","isEndQuote","isDoubleQuote","isSingleQuote","isSingleQuoteLike","isDoubleQuoteLike","iBefore","oBefore","iPrev","prevNonWhitespaceIndex","isDelimiter","remove","iQuote","oQuote","isDigit","parseConcatenatedString","iPrevChar","prevChar","insertAt","isUnquotedStringDelimiter","escapeChar","isHex","throwInvalidUnicodeCharacter","isControlCharacter","isValidStringCharacter","throwInvalidCharacter","parsed","parsedStr","atEndOfNumber","repairNumberEndingWithNumericSymbol","num","hasInvalidLeadingZero","parseKeyword","name","value","isKey","prev","JSONRepairError","chars"],"sources":["../../../src/streaming/core.ts"],"sourcesContent":["import { JSONRepairError } from '../utils/JSONRepairError.js'\nimport {\n isControlCharacter,\n isDelimiter,\n isDigit,\n isDoubleQuote,\n isDoubleQuoteLike,\n isFunctionNameChar,\n isFunctionNameCharStart,\n isHex,\n isQuote,\n isSingleQuote,\n isSingleQuoteLike,\n isSpecialWhitespace,\n isStartOfValue,\n isUnquotedStringDelimiter,\n isValidStringCharacter,\n isWhitespace,\n isWhitespaceExceptNewline,\n regexUrlChar,\n regexUrlStart\n} from '../utils/stringUtils.js'\nimport { createInputBuffer } from './buffer/InputBuffer.js'\nimport { createOutputBuffer } from './buffer/OutputBuffer.js'\nimport { Caret, createStack, StackType } from './stack.js'\n\nconst controlCharacters: { [key: string]: string } = {\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t'\n}\n\n// map with all escape characters\nconst escapeCharacters: { [key: string]: string } = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\nexport interface JsonRepairCoreOptions {\n onData: (chunk: string) => void\n chunkSize?: number\n bufferSize?: number\n}\n\nexport interface JsonRepairCore {\n transform: (chunk: string) => void\n flush: () => void\n}\n\nexport function jsonrepairCore({\n onData,\n bufferSize = 65536,\n chunkSize = 65536\n}: JsonRepairCoreOptions): JsonRepairCore {\n const input = createInputBuffer()\n\n const output = createOutputBuffer({\n write: onData,\n bufferSize,\n chunkSize\n })\n\n let i = 0\n let iFlushed = 0\n const stack = createStack()\n\n function flushInputBuffer() {\n while (iFlushed < i - bufferSize - chunkSize) {\n iFlushed += chunkSize\n input.flush(iFlushed)\n }\n }\n\n function transform(chunk: string) {\n input.push(chunk)\n\n while (i < input.currentLength() - bufferSize && parse()) {\n // loop until there is nothing more to process\n }\n\n flushInputBuffer()\n }\n\n function flush() {\n input.close()\n\n while (parse()) {\n // loop until there is nothing more to process\n }\n\n output.flush()\n }\n\n function parse(): boolean {\n parseWhitespaceAndSkipComments()\n\n switch (stack.type) {\n case StackType.object: {\n switch (stack.caret) {\n case Caret.beforeKey:\n return (\n skipEllipsis() ||\n parseObjectKey() ||\n parseUnexpectedColon() ||\n parseRepairTrailingComma() ||\n parseRepairObjectEndOrComma()\n )\n case Caret.beforeValue:\n return parseValue() || parseRepairMissingObjectValue()\n case Caret.afterValue:\n return parseObjectComma() || parseObjectEnd() || parseRepairObjectEndOrComma()\n default:\n return false\n }\n }\n\n case StackType.array: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return (\n skipEllipsis() || parseValue() || parseRepairTrailingComma() || parseRepairArrayEnd()\n )\n case Caret.afterValue:\n return (\n parseArrayComma() ||\n parseArrayEnd() ||\n parseRepairMissingComma() ||\n parseRepairArrayEnd()\n )\n default:\n return false\n }\n }\n\n case StackType.ndJson: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseValue() || parseRepairTrailingComma()\n case Caret.afterValue:\n return parseArrayComma() || parseRepairMissingComma() || parseRepairNdJsonEnd()\n default:\n return false\n }\n }\n\n case StackType.functionCall: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseValue()\n case Caret.afterValue:\n return parseFunctionCallEnd()\n default:\n return false\n }\n }\n\n case StackType.root: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseRootStart()\n case Caret.afterValue:\n return parseRootEnd()\n default:\n return false\n }\n }\n\n default:\n return false\n }\n }\n\n function parseValue(): boolean {\n return (\n parseObjectStart() ||\n parseArrayStart() ||\n parseString() ||\n parseNumber() ||\n parseKeywords() ||\n parseRepairUnquotedString() ||\n parseRepairRegex()\n )\n }\n\n function parseObjectStart(): boolean {\n if (parseCharacter('{')) {\n parseWhitespaceAndSkipComments()\n\n skipEllipsis()\n\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n if (parseCharacter('}')) {\n return stack.update(Caret.afterValue)\n }\n\n return stack.push(StackType.object, Caret.beforeKey)\n }\n\n return false\n }\n\n function parseArrayStart(): boolean {\n if (parseCharacter('[')) {\n parseWhitespaceAndSkipComments()\n\n skipEllipsis()\n\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n if (parseCharacter(']')) {\n return stack.update(Caret.afterValue)\n }\n\n return stack.push(StackType.array, Caret.beforeValue)\n }\n\n return false\n }\n\n function parseRepairUnquotedString(): boolean {\n let j = i\n\n if (isFunctionNameCharStart(input.charAt(j))) {\n while (!input.isEnd(j) && isFunctionNameChar(input.charAt(j))) {\n j++\n }\n\n let k = j\n while (isWhitespace(input, k)) {\n k++\n }\n\n if (input.charAt(k) === '(') {\n // repair a MongoDB function call like NumberLong(\"2\")\n // repair a JSONP function call like callback({...});\n k++\n i = k\n return stack.push(StackType.functionCall, Caret.beforeValue)\n }\n }\n\n j = findNextDelimiter(false, j)\n if (j !== null) {\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (input.charAt(j - 1) === ':' && regexUrlStart.test(input.substring(i, j + 2))) {\n while (!input.isEnd(j) && regexUrlChar.test(input.charAt(j))) {\n j++\n }\n }\n\n const symbol = input.substring(i, j)\n i = j\n\n output.push(symbol === 'undefined' ? 'null' : JSON.stringify(symbol))\n\n if (input.charAt(i) === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseRepairRegex() {\n if (input.charAt(i) === '/') {\n const start = i\n i++\n\n while (!input.isEnd(i) && (input.charAt(i) !== '/' || input.charAt(i - 1) === '\\\\')) {\n i++\n }\n i++\n\n output.push(`\"${input.substring(start, i)}\"`)\n\n return stack.update(Caret.afterValue)\n }\n }\n\n function parseRepairMissingObjectValue(): boolean {\n // repair missing object value\n output.push('null')\n return stack.update(Caret.afterValue)\n }\n\n function parseRepairTrailingComma(): boolean {\n // repair trailing comma\n if (output.endsWithIgnoringWhitespace(',')) {\n output.stripLastOccurrence(',')\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseUnexpectedColon(): boolean {\n if (input.charAt(i) === ':') {\n throwObjectKeyExpected()\n }\n\n return false\n }\n\n function parseUnexpectedEnd(): boolean {\n if (input.isEnd(i)) {\n throwUnexpectedEnd()\n } else {\n throwUnexpectedCharacter()\n }\n\n return false\n }\n\n function parseObjectKey(): boolean {\n const parsedKey = parseString() || parseUnquotedKey()\n if (parsedKey) {\n parseWhitespaceAndSkipComments()\n\n if (parseCharacter(':')) {\n // expect a value after the :\n return stack.update(Caret.beforeValue)\n }\n\n const truncatedText = input.isEnd(i)\n if (isStartOfValue(input.charAt(i)) || truncatedText) {\n // repair missing colon\n output.insertBeforeLastWhitespace(':')\n return stack.update(Caret.beforeValue)\n }\n\n throwColonExpected()\n }\n\n return false\n }\n\n function parseObjectComma(): boolean {\n if (parseCharacter(',')) {\n return stack.update(Caret.beforeKey)\n }\n\n return false\n }\n\n function parseObjectEnd(): boolean {\n if (parseCharacter('}')) {\n return stack.pop()\n }\n\n return false\n }\n\n function parseRepairObjectEndOrComma(): true {\n // repair missing object end and trailing comma\n if (input.charAt(i) === '{') {\n output.stripLastOccurrence(',')\n output.insertBeforeLastWhitespace('}')\n return stack.pop()\n }\n\n // repair missing comma\n if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) {\n output.insertBeforeLastWhitespace(',')\n return stack.update(Caret.beforeKey)\n }\n\n // repair missing closing brace\n output.insertBeforeLastWhitespace('}')\n return stack.pop()\n }\n\n function parseArrayComma(): boolean {\n if (parseCharacter(',')) {\n return stack.update(Caret.beforeValue)\n }\n\n return false\n }\n\n function parseArrayEnd(): boolean {\n if (parseCharacter(']')) {\n return stack.pop()\n }\n\n return false\n }\n\n function parseRepairMissingComma(): boolean {\n // repair missing comma\n if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) {\n output.insertBeforeLastWhitespace(',')\n return stack.update(Caret.beforeValue)\n }\n\n return false\n }\n\n function parseRepairArrayEnd(): true {\n // repair missing closing bracket\n output.insertBeforeLastWhitespace(']')\n return stack.pop()\n }\n\n function parseRepairNdJsonEnd(): boolean {\n if (input.isEnd(i)) {\n output.push('\\n]')\n return stack.pop()\n }\n\n throwUnexpectedEnd()\n return false // just to make TS happy\n }\n\n function parseFunctionCallEnd(): true {\n if (skipCharacter(')')) {\n skipCharacter(';')\n }\n\n return stack.pop()\n }\n\n function parseRootStart(): boolean {\n parseMarkdownCodeBlock(['```', '[```', '{```'])\n\n return parseValue() || parseUnexpectedEnd()\n }\n\n function parseRootEnd(): boolean {\n parseMarkdownCodeBlock(['```', '```]', '```}'])\n\n const parsedComma = parseCharacter(',')\n parseWhitespaceAndSkipComments()\n\n if (\n isStartOfValue(input.charAt(i)) &&\n (output.endsWithIgnoringWhitespace(',') || output.endsWithIgnoringWhitespace('\\n'))\n ) {\n // start of a new value after end of the root level object: looks like\n // newline delimited JSON -> turn into a root level array\n if (!parsedComma) {\n // repair missing comma\n output.insertBeforeLastWhitespace(',')\n }\n\n output.unshift('[\\n')\n\n return stack.push(StackType.ndJson, Caret.beforeValue)\n }\n\n if (parsedComma) {\n // repair: remove trailing comma\n output.stripLastOccurrence(',')\n\n return stack.update(Caret.afterValue)\n }\n\n // repair redundant end braces and brackets\n while (input.charAt(i) === '}' || input.charAt(i) === ']') {\n i++\n parseWhitespaceAndSkipComments()\n }\n\n if (!input.isEnd(i)) {\n throwUnexpectedCharacter()\n }\n\n return false\n }\n\n function parseWhitespaceAndSkipComments(skipNewline = true): boolean {\n const start = i\n\n let changed = parseWhitespace(skipNewline)\n do {\n changed = parseComment()\n if (changed) {\n changed = parseWhitespace(skipNewline)\n }\n } while (changed)\n\n return i > start\n }\n\n function parseWhitespace(skipNewline: boolean): boolean {\n const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline\n let whitespace = ''\n\n while (true) {\n if (_isWhiteSpace(input, i)) {\n whitespace += input.charAt(i)\n i++\n } else if (isSpecialWhitespace(input, i)) {\n // repair special whitespace\n whitespace += ' '\n i++\n } else {\n break\n }\n }\n\n if (whitespace.length > 0) {\n output.push(whitespace)\n return true\n }\n\n return false\n }\n\n function parseComment(): boolean {\n // find a block comment '/* ... */'\n if (input.charAt(i) === '/' && input.charAt(i + 1) === '*') {\n // repair block comment by skipping it\n while (!input.isEnd(i) && !atEndOfBlockComment(i)) {\n i++\n }\n i += 2\n\n return true\n }\n\n // find a line comment '// ...'\n if (input.charAt(i) === '/' && input.charAt(i + 1) === '/') {\n // repair line comment by skipping it\n while (!input.isEnd(i) && input.charAt(i) !== '\\n') {\n i++\n }\n\n return true\n }\n\n return false\n }\n\n function parseMarkdownCodeBlock(blocks: string[]): boolean {\n // find and skip over a Markdown fenced code block:\n // ``` ... ```\n // or\n // ```json ... ```\n if (skipMarkdownCodeBlock(blocks)) {\n if (isFunctionNameCharStart(input.charAt(i))) {\n // strip the optional language specifier like \"json\"\n while (!input.isEnd(i) && isFunctionNameChar(input.charAt(i))) {\n i++\n }\n }\n\n parseWhitespaceAndSkipComments()\n\n return true\n }\n\n return false\n }\n\n function skipMarkdownCodeBlock(blocks: string[]): boolean {\n for (const block of blocks) {\n const end = i + block.length\n if (input.substring(i, end) === block) {\n i = end\n return true\n }\n }\n\n return false\n }\n\n function parseCharacter(char: string): boolean {\n if (input.charAt(i) === char) {\n output.push(input.charAt(i))\n i++\n return true\n }\n\n return false\n }\n\n function skipCharacter(char: string): boolean {\n if (input.charAt(i) === char) {\n i++\n return true\n }\n\n return false\n }\n\n function skipEscapeCharacter(): boolean {\n return skipCharacter('\\\\')\n }\n\n /**\n * Skip ellipsis like \"[1,2,3,...]\" or \"[1,2,3,...,9]\" or \"[...,7,8,9]\"\n * or a similar construct in objects.\n */\n function skipEllipsis(): boolean {\n parseWhitespaceAndSkipComments()\n\n if (input.charAt(i) === '.' && input.charAt(i + 1) === '.' && input.charAt(i + 2) === '.') {\n // repair: remove the ellipsis (three dots) and optionally a comma\n i += 3\n parseWhitespaceAndSkipComments()\n skipCharacter(',')\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse a string enclosed by double quotes \"...\". Can contain escaped quotes\n * Repair strings enclosed in single quotes or special quotes\n * Repair an escaped string\n *\n * The function can run in two stages:\n * - First, it assumes the string has a valid end quote\n * - If it turns out that the string does not have a valid end quote followed\n * by a delimiter (which should be the case), the function runs again in a\n * more conservative way, stopping the string at the first next delimiter\n * and fixing the string by inserting a quote there, or stopping at a\n * stop index detected in the first iteration.\n */\n function parseString(stopAtDelimiter = false, stopAtIndex = -1): boolean {\n let skipEscapeChars = input.charAt(i) === '\\\\'\n if (skipEscapeChars) {\n // repair: remove the first escape character\n i++\n skipEscapeChars = true\n }\n\n if (isQuote(input.charAt(i))) {\n // double quotes are correct JSON,\n // single quotes come from JavaScript for example, we assume it will have a correct single end quote too\n // otherwise, we will match any double-quote-like start with a double-quote-like end,\n // or any single-quote-like start with a single-quote-like end\n const isEndQuote = isDoubleQuote(input.charAt(i))\n ? isDoubleQuote\n : isSingleQuote(input.charAt(i))\n ? isSingleQuote\n : isSingleQuoteLike(input.charAt(i))\n ? isSingleQuoteLike\n : isDoubleQuoteLike\n\n const iBefore = i\n const oBefore = output.length()\n\n output.push('\"')\n i++\n\n while (true) {\n if (input.isEnd(i)) {\n // end of text, we have a missing quote somewhere\n\n const iPrev = prevNonWhitespaceIndex(i - 1)\n if (!stopAtDelimiter && isDelimiter(input.charAt(iPrev))) {\n // if the text ends with a delimiter, like [\"hello],\n // so the missing end quote should be inserted before this delimiter\n // retry parsing the string, stopping at the first next delimiter\n i = iBefore\n output.remove(oBefore)\n\n return parseString(true)\n }\n\n // repair missing quote\n output.insertBeforeLastWhitespace('\"')\n\n return stack.update(Caret.afterValue)\n }\n\n if (i === stopAtIndex) {\n // use the stop index detected in the first iteration, and repair end quote\n output.insertBeforeLastWhitespace('\"')\n\n return stack.update(Caret.afterValue)\n }\n\n if (isEndQuote(input.charAt(i))) {\n // end quote\n // let us check what is before and after the quote to verify whether this is a legit end quote\n const iQuote = i\n const oQuote = output.length()\n output.push('\"')\n i++\n\n parseWhitespaceAndSkipComments(false)\n\n if (\n stopAtDelimiter ||\n input.isEnd(i) ||\n isDelimiter(input.charAt(i)) ||\n isQuote(input.charAt(i)) ||\n isDigit(input.charAt(i))\n ) {\n // The quote is followed by the end of the text, a delimiter, or a next value\n // so the quote is indeed the end of the string\n parseConcatenatedString()\n\n return stack.update(Caret.afterValue)\n }\n\n const iPrevChar = prevNonWhitespaceIndex(iQuote - 1)\n const prevChar = input.charAt(iPrevChar)\n\n if (prevChar === ',') {\n // A comma followed by a quote, like '{\"a\":\"b,c,\"d\":\"e\"}'.\n // We assume that the quote is a start quote, and that the end quote\n // should have been located right before the comma but is missing.\n i = iBefore\n output.remove(oBefore)\n\n return parseString(false, iPrevChar)\n }\n\n if (isDelimiter(prevChar)) {\n // This is not the right end quote: it is preceded by a delimiter,\n // and NOT followed by a delimiter. So, there is an end quote missing\n // parse the string again and then stop at the first next delimiter\n i = iBefore\n output.remove(oBefore)\n\n return parseString(true)\n }\n\n // revert to right after the quote but before any whitespace, and continue parsing the string\n output.remove(oQuote + 1)\n i = iQuote + 1\n\n // repair unescaped quote\n output.insertAt(oQuote, '\\\\')\n } else if (stopAtDelimiter && isUnquotedStringDelimiter(input.charAt(i))) {\n // we're in the mode to stop the string at the first delimiter\n // because there is an end quote missing\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (\n input.charAt(i - 1) === ':' &&\n regexUrlStart.test(input.substring(iBefore + 1, i + 2))\n ) {\n while (!input.isEnd(i) && regexUrlChar.test(input.charAt(i))) {\n output.push(input.charAt(i))\n i++\n }\n }\n\n // repair missing quote\n output.insertBeforeLastWhitespace('\"')\n\n parseConcatenatedString()\n\n return stack.update(Caret.afterValue)\n } else if (input.charAt(i) === '\\\\') {\n // handle escaped content like \\n or \\u2605\n const char = input.charAt(i + 1)\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n output.push(input.substring(i, i + 2))\n i += 2\n } else if (char === 'u') {\n let j = 2\n while (j < 6 && isHex(input.charAt(i + j))) {\n j++\n }\n\n if (j === 6) {\n output.push(input.substring(i, i + 6))\n i += 6\n } else if (input.isEnd(i + j)) {\n // repair invalid or truncated unicode char at the end of the text\n // by removing the unicode char and ending the string here\n i += j\n } else {\n throwInvalidUnicodeCharacter()\n }\n } else {\n // repair invalid escape character: remove it\n output.push(char)\n i += 2\n }\n } else {\n // handle regular characters\n const char = input.charAt(i)\n\n if (char === '\"' && input.charAt(i - 1) !== '\\\\') {\n // repair unescaped double quote\n output.push(`\\\\${char}`)\n i++\n } else if (isControlCharacter(char)) {\n // unescaped control character\n output.push(controlCharacters[char])\n i++\n } else {\n if (!isValidStringCharacter(char)) {\n throwInvalidCharacter(char)\n }\n output.push(char)\n i++\n }\n }\n\n if (skipEscapeChars) {\n // repair: skipped escape character (nothing to do)\n skipEscapeCharacter()\n }\n }\n }\n\n return false\n }\n\n /**\n * Repair concatenated strings like \"hello\" + \"world\", change this into \"helloworld\"\n */\n function parseConcatenatedString(): boolean {\n let parsed = false\n\n parseWhitespaceAndSkipComments()\n while (input.charAt(i) === '+') {\n parsed = true\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: remove the end quote of the first string\n output.stripLastOccurrence('\"', true)\n const start = output.length()\n const parsedStr = parseString()\n if (parsedStr) {\n // repair: remove the start quote of the second string\n output.remove(start, start + 1)\n } else {\n // repair: remove the + because it is not followed by a string\n output.insertBeforeLastWhitespace('\"')\n }\n }\n\n return parsed\n }\n\n /**\n * Parse a number like 2.4 or 2.4e6\n */\n function parseNumber(): boolean {\n const start = i\n if (input.charAt(i) === '-') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n }\n\n // Note that in JSON leading zeros like \"00789\" are not allowed.\n // We will allow all leading zeros here though and at the end of parseNumber\n // check against trailing zeros and repair that if needed.\n // Leading zeros can have meaning, so we should not clear them.\n while (isDigit(input.charAt(i))) {\n i++\n }\n\n if (input.charAt(i) === '.') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n while (isDigit(input.charAt(i))) {\n i++\n }\n }\n\n if (input.charAt(i) === 'e' || input.charAt(i) === 'E') {\n i++\n if (input.charAt(i) === '-' || input.charAt(i) === '+') {\n i++\n }\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n while (isDigit(input.charAt(i))) {\n i++\n }\n }\n\n // if we're not at the end of the number by this point, allow this to be parsed as another type\n if (!atEndOfNumber()) {\n i = start\n return false\n }\n\n if (i > start) {\n // repair a number with leading zeros like \"00789\"\n const num = input.substring(start, i)\n const hasInvalidLeadingZero = /^0\\d/.test(num)\n\n output.push(hasInvalidLeadingZero ? `\"${num}\"` : num)\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n /**\n * Parse keywords true, false, null\n * Repair Python keywords True, False, None\n */\n function parseKeywords(): boolean {\n return (\n parseKeyword('true', 'true') ||\n parseKeyword('false', 'false') ||\n parseKeyword('null', 'null') ||\n // repair Python keywords True, False, None\n parseKeyword('True', 'true') ||\n parseKeyword('False', 'false') ||\n parseKeyword('None', 'null')\n )\n }\n\n function parseKeyword(name: string, value: string): boolean {\n if (input.substring(i, i + name.length) === name) {\n output.push(value)\n i += name.length\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseUnquotedKey(): boolean {\n let end = findNextDelimiter(true, i)\n\n if (end !== null) {\n // first, go back to prevent getting trailing whitespaces in the string\n while (isWhitespace(input, end - 1) && end > i) {\n end--\n }\n\n const symbol = input.substring(i, end)\n output.push(JSON.stringify(symbol))\n i = end\n\n if (input.charAt(i) === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return stack.update(Caret.afterValue) // we do not have a state Caret.afterKey, therefore we use afterValue here\n }\n\n return false\n }\n\n function findNextDelimiter(isKey: boolean, start: number): number | null {\n // note that the symbol can end with whitespaces: we stop at the next delimiter\n // also, note that we allow strings to contain a slash / in order to support repairing regular expressions\n let j = start\n while (\n !input.isEnd(j) &&\n !isUnquotedStringDelimiter(input.charAt(j)) &&\n !isQuote(input.charAt(j)) &&\n (!isKey || input.charAt(j) !== ':')\n ) {\n j++\n }\n\n return j > i ? j : null\n }\n\n function prevNonWhitespaceIndex(start: number): number {\n let prev = start\n\n while (prev > 0 && isWhitespace(input, prev)) {\n prev--\n }\n\n return prev\n }\n\n function atEndOfNumber() {\n return input.isEnd(i) || isDelimiter(input.charAt(i)) || isWhitespace(input, i)\n }\n\n function repairNumberEndingWithNumericSymbol(start: number) {\n // repair numbers cut off at the end\n // this will only be called when we end after a '.', '-', or 'e' and does not\n // change the number more than it needs to make it valid JSON\n output.push(`${input.substring(start, i)}0`)\n }\n\n function throwInvalidCharacter(char: string) {\n throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i)\n }\n\n function throwUnexpectedCharacter() {\n throw new JSONRepairError(`Unexpected character ${JSON.stringify(input.charAt(i))}`, i)\n }\n\n function throwUnexpectedEnd() {\n throw new JSONRepairError('Unexpected end of json string', i)\n }\n\n function throwObjectKeyExpected() {\n throw new JSONRepairError('Object key expected', i)\n }\n\n function throwColonExpected() {\n throw new JSONRepairError('Colon expected', i)\n }\n\n function throwInvalidUnicodeCharacter() {\n const chars = input.substring(i, i + 6)\n throw new JSONRepairError(`Invalid unicode character \"${chars}\"`, i)\n }\n\n function atEndOfBlockComment(i: number) {\n return input.charAt(i) === '*' && input.charAt(i + 1) === '/'\n }\n\n return {\n transform,\n flush\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAqBA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,MAAMK,iBAA4C,GAAG;EACnD,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE;AACR,CAAC;;AAED;AACA,MAAMC,gBAA2C,GAAG;EAClD,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,IAAI;EACV,GAAG,EAAE,GAAG;EACRC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE;EACH;AACF,CAAC;AAaM,SAASC,cAAcA,CAAAC,IAAA,EAIY;EAAA,IAJX;IAC7BC,MAAM;IACNC,UAAU,GAAG,KAAK;IAClBC,SAAS,GAAG;EACS,CAAC,GAAAH,IAAA;EACtB,MAAMI,KAAK,GAAG,IAAAC,8BAAiB,EAAC,CAAC;EAEjC,MAAMC,MAAM,GAAG,IAAAC,gCAAkB,EAAC;IAChCC,KAAK,EAAEP,MAAM;IACbC,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,IAAIM,CA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EAEA,SAAS+F,mBAAmBA,CAAC/F,CAAS,EAAE;IACtC,OAAOL,KAAK,CAAC2D,MAAM,CAACtD,CAAC,CAAC,KAAK,GAAG,IAAIL,KAAK,CAAC2D,MAAM,CAACtD,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;EAC/D;EAEA,OAAO;IACLM,SAAS;IACTD;EACF,CAAC;AACH","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js new file mode 100644 index 0000000000000000000000000000000000000000..7170df85d756b2f92cefa73eb1f5db05ce7c7559 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StackType = exports.Caret = void 0; +exports.createStack = createStack; +let Caret = exports.Caret = /*#__PURE__*/function (Caret) { + Caret["beforeValue"] = "beforeValue"; + Caret["afterValue"] = "afterValue"; + Caret["beforeKey"] = "beforeKey"; + return Caret; +}({}); +let StackType = exports.StackType = /*#__PURE__*/function (StackType) { + StackType["root"] = "root"; + StackType["object"] = "object"; + StackType["array"] = "array"; + StackType["ndJson"] = "ndJson"; + StackType["functionCall"] = "dataType"; + return StackType; +}({}); +function createStack() { + const stack = [StackType.root]; + let caret = Caret.beforeValue; + return { + get type() { + return last(stack); + }, + get caret() { + return caret; + }, + pop() { + stack.pop(); + caret = Caret.afterValue; + return true; + }, + push(type, newCaret) { + stack.push(type); + caret = newCaret; + return true; + }, + update(newCaret) { + caret = newCaret; + return true; + } + }; +} +function last(array) { + return array[array.length - 1]; +} +//# sourceMappingURL=stack.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6952c4a7c4b8f25f3448290b5b25ad655387c8f5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stack.js","names":["Caret","exports","StackType","createStack","stack","root","caret","beforeValue","type","last","pop","afterValue","push","newCaret","update","array","length"],"sources":["../../../src/streaming/stack.ts"],"sourcesContent":["export enum Caret {\n beforeValue = 'beforeValue',\n afterValue = 'afterValue',\n beforeKey = 'beforeKey'\n}\n\nexport enum StackType {\n root = 'root',\n object = 'object',\n array = 'array',\n ndJson = 'ndJson',\n functionCall = 'dataType'\n}\n\nexport function createStack() {\n const stack: StackType[] = [StackType.root]\n let caret = Caret.beforeValue\n\n return {\n get type() {\n return last(stack)\n },\n\n get caret() {\n return caret\n },\n\n pop(): true {\n stack.pop()\n caret = Caret.afterValue\n\n return true\n },\n\n push(type: StackType, newCaret: Caret): true {\n stack.push(type)\n caret = newCaret\n\n return true\n },\n\n update(newCaret: Caret): true {\n caret = newCaret\n\n return true\n }\n }\n}\n\nfunction last(array: T[]): T | undefined {\n return array[array.length - 1]\n}\n"],"mappings":";;;;;;;IAAYA,KAAK,GAAAC,OAAA,CAAAD,KAAA,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAAA,IAMLE,SAAS,GAAAD,OAAA,CAAAC,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAQd,SAASC,WAAWA,CAAA,EAAG;EAC5B,MAAMC,KAAkB,GAAG,CAACF,SAAS,CAACG,IAAI,CAAC;EAC3C,IAAIC,KAAK,GAAGN,KAAK,CAACO,WAAW;EAE7B,OAAO;IACL,IAAIC,IAAIA,CAAA,EAAG;MACT,OAAOC,IAAI,CAACL,KAAK,CAAC;IACpB,CAAC;IAED,IAAIE,KAAKA,CAAA,EAAG;MACV,OAAOA,KAAK;IACd,CAAC;IAEDI,GAAGA,CAAA,EAAS;MACVN,KAAK,CAACM,GAAG,CAAC,CAAC;MACXJ,KAAK,GAAGN,KAAK,CAACW,UAAU;MAExB,OAAO,IAAI;IACb,CAAC;IAEDC,IAAIA,CAACJ,IAAe,EAAEK,QAAe,EAAQ;MAC3CT,KAAK,CAACQ,IAAI,CAACJ,IAAI,CAAC;MAChBF,KAAK,GAAGO,QAAQ;MAEhB,OAAO,IAAI;IACb,CAAC;IAEDC,MAAMA,CAACD,QAAe,EAAQ;MAC5BP,KAAK,GAAGO,QAAQ;MAEhB,OAAO,IAAI;IACb;EACF,CAAC;AACH;AAEA,SAASJ,IAAIA,CAAIM,KAAU,EAAiB;EAC1C,OAAOA,KAAK,CAACA,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC;AAChC","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js new file mode 100644 index 0000000000000000000000000000000000000000..24949216e4d8b73d0c97ad7dfe8fba019d31b7c5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.jsonrepairTransform = jsonrepairTransform; +var _nodeStream = require("node:stream"); +var _core = require("./core.js"); +function jsonrepairTransform(options) { + const repair = (0, _core.jsonrepairCore)({ + onData: chunk => transform.push(chunk), + bufferSize: options?.bufferSize, + chunkSize: options?.chunkSize + }); + const transform = new _nodeStream.Transform({ + transform(chunk, _encoding, callback) { + try { + repair.transform(chunk.toString()); + } catch (err) { + this.emit('error', err); + } finally { + callback(); + } + }, + flush(callback) { + try { + repair.flush(); + } catch (err) { + this.emit('error', err); + } finally { + callback(); + } + } + }); + return transform; +} +//# sourceMappingURL=stream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2d44c7a1796948caa011635d53e07c0e729f57a5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/streaming/stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.js","names":["_nodeStream","require","_core","jsonrepairTransform","options","repair","jsonrepairCore","onData","chunk","transform","push","bufferSize","chunkSize","Transform","_encoding","callback","toString","err","emit","flush"],"sources":["../../../src/streaming/stream.ts"],"sourcesContent":["import { Transform } from 'node:stream'\nimport { jsonrepairCore } from './core.js'\n\nexport interface JsonRepairTransformOptions {\n chunkSize?: number\n bufferSize?: number\n}\n\nexport function jsonrepairTransform(options?: JsonRepairTransformOptions): Transform {\n const repair = jsonrepairCore({\n onData: (chunk) => transform.push(chunk),\n bufferSize: options?.bufferSize,\n chunkSize: options?.chunkSize\n })\n\n const transform = new Transform({\n transform(chunk, _encoding, callback) {\n try {\n repair.transform(chunk.toString())\n } catch (err) {\n this.emit('error', err)\n } finally {\n callback()\n }\n },\n\n flush(callback) {\n try {\n repair.flush()\n } catch (err) {\n this.emit('error', err)\n } finally {\n callback()\n }\n }\n })\n\n return transform\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAOO,SAASE,mBAAmBA,CAACC,OAAoC,EAAa;EACnF,MAAMC,MAAM,GAAG,IAAAC,oBAAc,EAAC;IAC5BC,MAAM,EAAGC,KAAK,IAAKC,SAAS,CAACC,IAAI,CAACF,KAAK,CAAC;IACxCG,UAAU,EAAEP,OAAO,EAAEO,UAAU;IAC/BC,SAAS,EAAER,OAAO,EAAEQ;EACtB,CAAC,CAAC;EAEF,MAAMH,SAAS,GAAG,IAAII,qBAAS,CAAC;IAC9BJ,SAASA,CAACD,KAAK,EAAEM,SAAS,EAAEC,QAAQ,EAAE;MACpC,IAAI;QACFV,MAAM,CAACI,SAAS,CAACD,KAAK,CAACQ,QAAQ,CAAC,CAAC,CAAC;MACpC,CAAC,CAAC,OAAOC,GAAG,EAAE;QACZ,IAAI,CAACC,IAAI,CAAC,OAAO,EAAED,GAAG,CAAC;MACzB,CAAC,SAAS;QACRF,QAAQ,CAAC,CAAC;MACZ;IACF,CAAC;IAEDI,KAAKA,CAACJ,QAAQ,EAAE;MACd,IAAI;QACFV,MAAM,CAACc,KAAK,CAAC,CAAC;MAChB,CAAC,CAAC,OAAOF,GAAG,EAAE;QACZ,IAAI,CAACC,IAAI,CAAC,OAAO,EAAED,GAAG,CAAC;MACzB,CAAC,SAAS;QACRF,QAAQ,CAAC,CAAC;MACZ;IACF;EACF,CAAC,CAAC;EAEF,OAAON,SAAS;AAClB","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js new file mode 100644 index 0000000000000000000000000000000000000000..eb0fd80504d1f76fda3263840a078a7e67efd96c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JSONRepairError = void 0; +class JSONRepairError extends Error { + constructor(message, position) { + super(`${message} at position ${position}`); + this.position = position; + } +} +exports.JSONRepairError = JSONRepairError; +//# sourceMappingURL=JSONRepairError.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js.map new file mode 100644 index 0000000000000000000000000000000000000000..107e08c2cbe7500ed15cc57f806dede61ebd5c30 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/JSONRepairError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"JSONRepairError.js","names":["JSONRepairError","Error","constructor","message","position","exports"],"sources":["../../../src/utils/JSONRepairError.ts"],"sourcesContent":["export class JSONRepairError extends Error {\n position: number\n\n constructor(message: string, position: number) {\n super(`${message} at position ${position}`)\n\n this.position = position\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,SAASC,KAAK,CAAC;EAGzCC,WAAWA,CAACC,OAAe,EAAEC,QAAgB,EAAE;IAC7C,KAAK,CAAC,GAAGD,OAAO,gBAAgBC,QAAQ,EAAE,CAAC;IAE3C,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;AACF;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..22c0a5244e18f93dbb415098c2a3bb406ba9fb33 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js @@ -0,0 +1,174 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.endsWithCommaOrNewline = endsWithCommaOrNewline; +exports.insertBeforeLastWhitespace = insertBeforeLastWhitespace; +exports.isControlCharacter = isControlCharacter; +exports.isDelimiter = isDelimiter; +exports.isDigit = isDigit; +exports.isDoubleQuote = isDoubleQuote; +exports.isDoubleQuoteLike = isDoubleQuoteLike; +exports.isFunctionNameChar = isFunctionNameChar; +exports.isFunctionNameCharStart = isFunctionNameCharStart; +exports.isHex = isHex; +exports.isQuote = isQuote; +exports.isSingleQuote = isSingleQuote; +exports.isSingleQuoteLike = isSingleQuoteLike; +exports.isSpecialWhitespace = isSpecialWhitespace; +exports.isStartOfValue = isStartOfValue; +exports.isUnquotedStringDelimiter = isUnquotedStringDelimiter; +exports.isValidStringCharacter = isValidStringCharacter; +exports.isWhitespace = isWhitespace; +exports.isWhitespaceExceptNewline = isWhitespaceExceptNewline; +exports.regexUrlStart = exports.regexUrlChar = void 0; +exports.removeAtIndex = removeAtIndex; +exports.stripLastOccurrence = stripLastOccurrence; +const codeSpace = 0x20; // " " +const codeNewline = 0xa; // "\n" +const codeTab = 0x9; // "\t" +const codeReturn = 0xd; // "\r" +const codeNonBreakingSpace = 0xa0; +const codeEnQuad = 0x2000; +const codeHairSpace = 0x200a; +const codeNarrowNoBreakSpace = 0x202f; +const codeMediumMathematicalSpace = 0x205f; +const codeIdeographicSpace = 0x3000; +function isHex(char) { + return /^[0-9A-Fa-f]$/.test(char); +} +function isDigit(char) { + return char >= '0' && char <= '9'; +} +function isValidStringCharacter(char) { + // note that the valid range is between \u{0020} and \u{10ffff}, + // but in JavaScript it is not possible to create a code point larger than + // \u{10ffff}, so there is no need to test for that here. + return char >= '\u0020'; +} +function isDelimiter(char) { + return ',:[]/{}()\n+'.includes(char); +} +function isFunctionNameCharStart(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$'; +} +function isFunctionNameChar(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$' || char >= '0' && char <= '9'; +} + +// matches "https://" and other schemas +const regexUrlStart = exports.regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\/\/$/; + +// matches all valid URL characters EXCEPT "[", "]", and ",", since that are important JSON delimiters +const regexUrlChar = exports.regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/; +function isUnquotedStringDelimiter(char) { + return ',[]/{}\n+'.includes(char); +} +function isStartOfValue(char) { + return isQuote(char) || regexStartOfValue.test(char); +} + +// alpha, number, minus, or opening bracket or brace +const regexStartOfValue = /^[[{\w-]$/; +function isControlCharacter(char) { + return char === '\n' || char === '\r' || char === '\t' || char === '\b' || char === '\f'; +} +/** + * Check if the given character is a whitespace character like space, tab, or + * newline + */ +function isWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn; +} + +/** + * Check if the given character is a whitespace character like space or tab, + * but NOT a newline + */ +function isWhitespaceExceptNewline(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeTab || code === codeReturn; +} + +/** + * Check if the given character is a special whitespace character, some + * unicode variant + */ +function isSpecialWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeNonBreakingSpace || code >= codeEnQuad && code <= codeHairSpace || code === codeNarrowNoBreakSpace || code === codeMediumMathematicalSpace || code === codeIdeographicSpace; +} + +/** + * Test whether the given character is a quote or double quote character. + * Also tests for special variants of quotes. + */ +function isQuote(char) { + // the first check double quotes, since that occurs most often + return isDoubleQuoteLike(char) || isSingleQuoteLike(char); +} + +/** + * Test whether the given character is a double quote character. + * Also tests for special variants of double quotes. + */ +function isDoubleQuoteLike(char) { + return char === '"' || char === '\u201c' || char === '\u201d'; +} + +/** + * Test whether the given character is a double quote character. + * Does NOT test for special variants of double quotes. + */ +function isDoubleQuote(char) { + return char === '"'; +} + +/** + * Test whether the given character is a single quote character. + * Also tests for special variants of single quotes. + */ +function isSingleQuoteLike(char) { + return char === "'" || char === '\u2018' || char === '\u2019' || char === '\u0060' || char === '\u00b4'; +} + +/** + * Test whether the given character is a single quote character. + * Does NOT test for special variants of single quotes. + */ +function isSingleQuote(char) { + return char === "'"; +} + +/** + * Strip last occurrence of textToStrip from text + */ +function stripLastOccurrence(text, textToStrip) { + let stripRemainingText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + const index = text.lastIndexOf(textToStrip); + return index !== -1 ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1)) : text; +} +function insertBeforeLastWhitespace(text, textToInsert) { + let index = text.length; + if (!isWhitespace(text, index - 1)) { + // no trailing whitespaces + return text + textToInsert; + } + while (isWhitespace(text, index - 1)) { + index--; + } + return text.substring(0, index) + textToInsert + text.substring(index); +} +function removeAtIndex(text, start, count) { + return text.substring(0, start) + text.substring(start + count); +} + +/** + * Test whether a string ends with a newline or comma character and optional whitespace + */ +function endsWithCommaOrNewline(text) { + return /[,\n][ \t\r]*$/.test(text); +} +//# sourceMappingURL=stringUtils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5a4edde289a7810b4bae21ba978d5cf89004c485 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/cjs/utils/stringUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stringUtils.js","names":["codeSpace","codeNewline","codeTab","codeReturn","codeNonBreakingSpace","codeEnQuad","codeHairSpace","codeNarrowNoBreakSpace","codeMediumMathematicalSpace","codeIdeographicSpace","isHex","char","test","isDigit","isValidStringCharacter","isDelimiter","includes","isFunctionNameCharStart","isFunctionNameChar","regexUrlStart","exports","regexUrlChar","isUnquotedStringDelimiter","isStartOfValue","isQuote","regexStartOfValue","isControlCharacter","isWhitespace","text","index","code","charCodeAt","isWhitespaceExceptNewline","isSpecialWhitespace","isDoubleQuoteLike","isSingleQuoteLike","isDoubleQuote","isSingleQuote","stripLastOccurrence","textToStrip","stripRemainingText","arguments","length","undefined","lastIndexOf","substring","insertBeforeLastWhitespace","textToInsert","removeAtIndex","start","count","endsWithCommaOrNewline"],"sources":["../../../src/utils/stringUtils.ts"],"sourcesContent":["const codeSpace = 0x20 // \" \"\nconst codeNewline = 0xa // \"\\n\"\nconst codeTab = 0x9 // \"\\t\"\nconst codeReturn = 0xd // \"\\r\"\nconst codeNonBreakingSpace = 0xa0\nconst codeEnQuad = 0x2000\nconst codeHairSpace = 0x200a\nconst codeNarrowNoBreakSpace = 0x202f\nconst codeMediumMathematicalSpace = 0x205f\nconst codeIdeographicSpace = 0x3000\n\nexport function isHex(char: string): boolean {\n return /^[0-9A-Fa-f]$/.test(char)\n}\n\nexport function isDigit(char: string): boolean {\n return char >= '0' && char <= '9'\n}\n\nexport function isValidStringCharacter(char: string): boolean {\n // note that the valid range is between \\u{0020} and \\u{10ffff},\n // but in JavaScript it is not possible to create a code point larger than\n // \\u{10ffff}, so there is no need to test for that here.\n return char >= '\\u0020'\n}\n\nexport function isDelimiter(char: string): boolean {\n return ',:[]/{}()\\n+'.includes(char)\n}\n\nexport function isFunctionNameCharStart(char: string) {\n return (\n (char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || char === '_' || char === '$'\n )\n}\n\nexport function isFunctionNameChar(char: string) {\n return (\n (char >= 'a' && char <= 'z') ||\n (char >= 'A' && char <= 'Z') ||\n char === '_' ||\n char === '$' ||\n (char >= '0' && char <= '9')\n )\n}\n\n// matches \"https://\" and other schemas\nexport const regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\\/\\/$/\n\n// matches all valid URL characters EXCEPT \"[\", \"]\", and \",\", since that are important JSON delimiters\nexport const regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/\n\nexport function isUnquotedStringDelimiter(char: string): boolean {\n return ',[]/{}\\n+'.includes(char)\n}\n\nexport function isStartOfValue(char: string): boolean {\n return isQuote(char) || regexStartOfValue.test(char)\n}\n\n// alpha, number, minus, or opening bracket or brace\nconst regexStartOfValue = /^[[{\\w-]$/\n\nexport function isControlCharacter(char: string) {\n return char === '\\n' || char === '\\r' || char === '\\t' || char === '\\b' || char === '\\f'\n}\n\nexport interface Text {\n charCodeAt: (index: number) => number\n}\n\n/**\n * Check if the given character is a whitespace character like space, tab, or\n * newline\n */\nexport function isWhitespace(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn\n}\n\n/**\n * Check if the given character is a whitespace character like space or tab,\n * but NOT a newline\n */\nexport function isWhitespaceExceptNewline(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return code === codeSpace || code === codeTab || code === codeReturn\n}\n\n/**\n * Check if the given character is a special whitespace character, some\n * unicode variant\n */\nexport function isSpecialWhitespace(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return (\n code === codeNonBreakingSpace ||\n (code >= codeEnQuad && code <= codeHairSpace) ||\n code === codeNarrowNoBreakSpace ||\n code === codeMediumMathematicalSpace ||\n code === codeIdeographicSpace\n )\n}\n\n/**\n * Test whether the given character is a quote or double quote character.\n * Also tests for special variants of quotes.\n */\nexport function isQuote(char: string): boolean {\n // the first check double quotes, since that occurs most often\n return isDoubleQuoteLike(char) || isSingleQuoteLike(char)\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Also tests for special variants of double quotes.\n */\nexport function isDoubleQuoteLike(char: string): boolean {\n return char === '\"' || char === '\\u201c' || char === '\\u201d'\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Does NOT test for special variants of double quotes.\n */\nexport function isDoubleQuote(char: string): boolean {\n return char === '\"'\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Also tests for special variants of single quotes.\n */\nexport function isSingleQuoteLike(char: string): boolean {\n return (\n char === \"'\" || char === '\\u2018' || char === '\\u2019' || char === '\\u0060' || char === '\\u00b4'\n )\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Does NOT test for special variants of single quotes.\n */\nexport function isSingleQuote(char: string): boolean {\n return char === \"'\"\n}\n\n/**\n * Strip last occurrence of textToStrip from text\n */\nexport function stripLastOccurrence(\n text: string,\n textToStrip: string,\n stripRemainingText = false\n): string {\n const index = text.lastIndexOf(textToStrip)\n return index !== -1\n ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1))\n : text\n}\n\nexport function insertBeforeLastWhitespace(text: string, textToInsert: string): string {\n let index = text.length\n\n if (!isWhitespace(text, index - 1)) {\n // no trailing whitespaces\n return text + textToInsert\n }\n\n while (isWhitespace(text, index - 1)) {\n index--\n }\n\n return text.substring(0, index) + textToInsert + text.substring(index)\n}\n\nexport function removeAtIndex(text: string, start: number, count: number) {\n return text.substring(0, start) + text.substring(start + count)\n}\n\n/**\n * Test whether a string ends with a newline or comma character and optional whitespace\n */\nexport function endsWithCommaOrNewline(text: string): boolean {\n return /[,\\n][ \\t\\r]*$/.test(text)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAMA,SAAS,GAAG,IAAI,EAAC;AACvB,MAAMC,WAAW,GAAG,GAAG,EAAC;AACxB,MAAMC,OAAO,GAAG,GAAG,EAAC;AACpB,MAAMC,UAAU,GAAG,GAAG,EAAC;AACvB,MAAMC,oBAAoB,GAAG,IAAI;AACjC,MAAMC,UAAU,GAAG,MAAM;AACzB,MAAMC,aAAa,GAAG,MAAM;AAC5B,MAAMC,sBAAsB,GAAG,MAAM;AACrC,MAAMC,2BAA2B,GAAG,MAAM;AAC1C,MAAMC,oBAAoB,GAAG,MAAM;AAE5B,SAASC,KAAKA,CAACC,IAAY,EAAW;EAC3C,OAAO,eAAe,CAACC,IAAI,CAACD,IAAI,CAAC;AACnC;AAEO,SAASE,OAAOA,CAACF,IAAY,EAAW;EAC7C,OAAOA,IAAI,IAAI,GAAG,IAAIA,IAAI,IAAI,GAAG;AACnC;AAEO,SAASG,sBAAsBA,CAACH,IAAY,EAAW;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xE,OAAOtB,IAAI,CAACiB,SAAS,CAAC,CAAC,EAAEI,KAAK,CAAC,GAAGrB,IAAI,CAACiB,SAAS,CAACI,KAAK,GAAGC,KAAK,CAAC;AACjE;;AAEA;AACA;AACA;AACO,SAASC,sBAAsBA,CAACvB,IAAY,EAAW;EAC5D,OAAO,gBAAgB,CAAChB,IAAI,CAACgB,IAAI,CAAC;AACpC","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..18e8dc22386cfc17829e07881ebda4d91b29159b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js @@ -0,0 +1,4 @@ +// Cross-platform, non-streaming JavaScript API +export { jsonrepair } from './regular/jsonrepair.js'; +export { JSONRepairError } from './utils/JSONRepairError.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3f8eb817d131435555d78b9d9389a29ccf7ebb30 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["jsonrepair","JSONRepairError"],"sources":["../../src/index.ts"],"sourcesContent":["// Cross-platform, non-streaming JavaScript API\nexport { jsonrepair } from './regular/jsonrepair.js'\nexport { JSONRepairError } from './utils/JSONRepairError.js'\n"],"mappings":"AAAA;AACA,SAASA,UAAU,QAAQ,yBAAyB;AACpD,SAASC,eAAe,QAAQ,4BAA4B","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js new file mode 100644 index 0000000000000000000000000000000000000000..bc1baa7539aabf67105c006ddb191ce2f5e65880 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js @@ -0,0 +1,739 @@ +import { JSONRepairError } from '../utils/JSONRepairError.js'; +import { endsWithCommaOrNewline, insertBeforeLastWhitespace, isControlCharacter, isDelimiter, isDigit, isDoubleQuote, isDoubleQuoteLike, isFunctionNameChar, isFunctionNameCharStart, isHex, isQuote, isSingleQuote, isSingleQuoteLike, isSpecialWhitespace, isStartOfValue, isUnquotedStringDelimiter, isValidStringCharacter, isWhitespace, isWhitespaceExceptNewline, regexUrlChar, regexUrlStart, removeAtIndex, stripLastOccurrence } from '../utils/stringUtils.js'; +const controlCharacters = { + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' +}; + +// map with all escape characters +const escapeCharacters = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + // note that \u is handled separately in parseString() +}; + +/** + * Repair a string containing an invalid JSON document. + * For example changes JavaScript notation into JSON notation. + * + * Example: + * + * try { + * const json = "{name: 'John'}" + * const repaired = jsonrepair(json) + * console.log(repaired) + * // '{"name": "John"}' + * } catch (err) { + * console.error(err) + * } + * + */ +export function jsonrepair(text) { + let i = 0; // current index in text + let output = ''; // generated output + + parseMarkdownCodeBlock(['```', '[```', '{```']); + const processed = parseValue(); + if (!processed) { + throwUnexpectedEnd(); + } + parseMarkdownCodeBlock(['```', '```]', '```}']); + const processedComma = parseCharacter(','); + if (processedComma) { + parseWhitespaceAndSkipComments(); + } + if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) { + // start of a new value after end of the root level object: looks like + // newline delimited JSON -> turn into a root level array + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + parseNewlineDelimitedJSON(); + } else if (processedComma) { + // repair: remove trailing comma + output = stripLastOccurrence(output, ','); + } + + // repair redundant end quotes + while (text[i] === '}' || text[i] === ']') { + i++; + parseWhitespaceAndSkipComments(); + } + if (i >= text.length) { + // reached the end of the document properly + return output; + } + throwUnexpectedCharacter(); + function parseValue() { + parseWhitespaceAndSkipComments(); + const processed = parseObject() || parseArray() || parseString() || parseNumber() || parseKeywords() || parseUnquotedString(false) || parseRegex(); + parseWhitespaceAndSkipComments(); + return processed; + } + function parseWhitespaceAndSkipComments() { + let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const start = i; + let changed = parseWhitespace(skipNewline); + do { + changed = parseComment(); + if (changed) { + changed = parseWhitespace(skipNewline); + } + } while (changed); + return i > start; + } + function parseWhitespace(skipNewline) { + const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline; + let whitespace = ''; + while (true) { + if (_isWhiteSpace(text, i)) { + whitespace += text[i]; + i++; + } else if (isSpecialWhitespace(text, i)) { + // repair special whitespace + whitespace += ' '; + i++; + } else { + break; + } + } + if (whitespace.length > 0) { + output += whitespace; + return true; + } + return false; + } + function parseComment() { + // find a block comment '/* ... */' + if (text[i] === '/' && text[i + 1] === '*') { + // repair block comment by skipping it + while (i < text.length && !atEndOfBlockComment(text, i)) { + i++; + } + i += 2; + return true; + } + + // find a line comment '// ...' + if (text[i] === '/' && text[i + 1] === '/') { + // repair line comment by skipping it + while (i < text.length && text[i] !== '\n') { + i++; + } + return true; + } + return false; + } + function parseMarkdownCodeBlock(blocks) { + // find and skip over a Markdown fenced code block: + // ``` ... ``` + // or + // ```json ... ``` + if (skipMarkdownCodeBlock(blocks)) { + if (isFunctionNameCharStart(text[i])) { + // strip the optional language specifier like "json" + while (i < text.length && isFunctionNameChar(text[i])) { + i++; + } + } + parseWhitespaceAndSkipComments(); + return true; + } + return false; + } + function skipMarkdownCodeBlock(blocks) { + for (const block of blocks) { + const end = i + block.length; + if (text.slice(i, end) === block) { + i = end; + return true; + } + } + return false; + } + function parseCharacter(char) { + if (text[i] === char) { + output += text[i]; + i++; + return true; + } + return false; + } + function skipCharacter(char) { + if (text[i] === char) { + i++; + return true; + } + return false; + } + function skipEscapeCharacter() { + return skipCharacter('\\'); + } + + /** + * Skip ellipsis like "[1,2,3,...]" or "[1,2,3,...,9]" or "[...,7,8,9]" + * or a similar construct in objects. + */ + function skipEllipsis() { + parseWhitespaceAndSkipComments(); + if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') { + // repair: remove the ellipsis (three dots) and optionally a comma + i += 3; + parseWhitespaceAndSkipComments(); + skipCharacter(','); + return true; + } + return false; + } + + /** + * Parse an object like '{"key": "value"}' + */ + function parseObject() { + if (text[i] === '{') { + output += '{'; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in {, message: "hi"} + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== '}') { + let processedComma; + if (!initial) { + processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + parseWhitespaceAndSkipComments(); + } else { + processedComma = true; + initial = false; + } + skipEllipsis(); + const processedKey = parseString() || parseUnquotedString(true); + if (!processedKey) { + if (text[i] === '}' || text[i] === '{' || text[i] === ']' || text[i] === '[' || text[i] === undefined) { + // repair trailing comma + output = stripLastOccurrence(output, ','); + } else { + throwObjectKeyExpected(); + } + break; + } + parseWhitespaceAndSkipComments(); + const processedColon = parseCharacter(':'); + const truncatedText = i >= text.length; + if (!processedColon) { + if (isStartOfValue(text[i]) || truncatedText) { + // repair missing colon + output = insertBeforeLastWhitespace(output, ':'); + } else { + throwColonExpected(); + } + } + const processedValue = parseValue(); + if (!processedValue) { + if (processedColon || truncatedText) { + // repair missing object value + output += 'null'; + } else { + throwColonExpected(); + } + } + } + if (text[i] === '}') { + output += '}'; + i++; + } else { + // repair missing end bracket + output = insertBeforeLastWhitespace(output, '}'); + } + return true; + } + return false; + } + + /** + * Parse an array like '["item1", "item2", ...]' + */ + function parseArray() { + if (text[i] === '[') { + output += '['; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in [,1,2,3] + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== ']') { + if (!initial) { + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + } else { + initial = false; + } + skipEllipsis(); + const processedValue = parseValue(); + if (!processedValue) { + // repair trailing comma + output = stripLastOccurrence(output, ','); + break; + } + } + if (text[i] === ']') { + output += ']'; + i++; + } else { + // repair missing closing array bracket + output = insertBeforeLastWhitespace(output, ']'); + } + return true; + } + return false; + } + + /** + * Parse and repair Newline Delimited JSON (NDJSON): + * multiple JSON objects separated by a newline character + */ + function parseNewlineDelimitedJSON() { + // repair NDJSON + let initial = true; + let processedValue = true; + while (processedValue) { + if (!initial) { + // parse optional comma, insert when missing + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair: add missing comma + output = insertBeforeLastWhitespace(output, ','); + } + } else { + initial = false; + } + processedValue = parseValue(); + } + if (!processedValue) { + // repair: remove trailing comma + output = stripLastOccurrence(output, ','); + } + + // repair: wrap the output inside array brackets + output = `[\n${output}\n]`; + } + + /** + * Parse a string enclosed by double quotes "...". Can contain escaped quotes + * Repair strings enclosed in single quotes or special quotes + * Repair an escaped string + * + * The function can run in two stages: + * - First, it assumes the string has a valid end quote + * - If it turns out that the string does not have a valid end quote followed + * by a delimiter (which should be the case), the function runs again in a + * more conservative way, stopping the string at the first next delimiter + * and fixing the string by inserting a quote there, or stopping at a + * stop index detected in the first iteration. + */ + function parseString() { + let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + let skipEscapeChars = text[i] === '\\'; + if (skipEscapeChars) { + // repair: remove the first escape character + i++; + skipEscapeChars = true; + } + if (isQuote(text[i])) { + // double quotes are correct JSON, + // single quotes come from JavaScript for example, we assume it will have a correct single end quote too + // otherwise, we will match any double-quote-like start with a double-quote-like end, + // or any single-quote-like start with a single-quote-like end + const isEndQuote = isDoubleQuote(text[i]) ? isDoubleQuote : isSingleQuote(text[i]) ? isSingleQuote : isSingleQuoteLike(text[i]) ? isSingleQuoteLike : isDoubleQuoteLike; + const iBefore = i; + const oBefore = output.length; + let str = '"'; + i++; + while (true) { + if (i >= text.length) { + // end of text, we are missing an end quote + + const iPrev = prevNonWhitespaceIndex(i - 1); + if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) { + // if the text ends with a delimiter, like ["hello], + // so the missing end quote should be inserted before this delimiter + // retry parsing the string, stopping at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // repair missing quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + return true; + } + if (i === stopAtIndex) { + // use the stop index detected in the first iteration, and repair end quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + return true; + } + if (isEndQuote(text[i])) { + // end quote + // let us check what is before and after the quote to verify whether this is a legit end quote + const iQuote = i; + const oQuote = str.length; + str += '"'; + i++; + output += str; + parseWhitespaceAndSkipComments(false); + if (stopAtDelimiter || i >= text.length || isDelimiter(text[i]) || isQuote(text[i]) || isDigit(text[i])) { + // The quote is followed by the end of the text, a delimiter, + // or a next value. So the quote is indeed the end of the string. + parseConcatenatedString(); + return true; + } + const iPrevChar = prevNonWhitespaceIndex(iQuote - 1); + const prevChar = text.charAt(iPrevChar); + if (prevChar === ',') { + // A comma followed by a quote, like '{"a":"b,c,"d":"e"}'. + // We assume that the quote is a start quote, and that the end quote + // should have been located right before the comma but is missing. + i = iBefore; + output = output.substring(0, oBefore); + return parseString(false, iPrevChar); + } + if (isDelimiter(prevChar)) { + // This is not the right end quote: it is preceded by a delimiter, + // and NOT followed by a delimiter. So, there is an end quote missing + // parse the string again and then stop at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // revert to right after the quote but before any whitespace, and continue parsing the string + output = output.substring(0, oBefore); + i = iQuote + 1; + + // repair unescaped quote + str = `${str.substring(0, oQuote)}\\${str.substring(oQuote)}`; + } else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) { + // we're in the mode to stop the string at the first delimiter + // because there is an end quote missing + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) { + while (i < text.length && regexUrlChar.test(text[i])) { + str += text[i]; + i++; + } + } + + // repair missing quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + parseConcatenatedString(); + return true; + } else if (text[i] === '\\') { + // handle escaped content like \n or \u2605 + const char = text.charAt(i + 1); + const escapeChar = escapeCharacters[char]; + if (escapeChar !== undefined) { + str += text.slice(i, i + 2); + i += 2; + } else if (char === 'u') { + let j = 2; + while (j < 6 && isHex(text[i + j])) { + j++; + } + if (j === 6) { + str += text.slice(i, i + 6); + i += 6; + } else if (i + j >= text.length) { + // repair invalid or truncated unicode char at the end of the text + // by removing the unicode char and ending the string here + i = text.length; + } else { + throwInvalidUnicodeCharacter(); + } + } else { + // repair invalid escape character: remove it + str += char; + i += 2; + } + } else { + // handle regular characters + const char = text.charAt(i); + if (char === '"' && text[i - 1] !== '\\') { + // repair unescaped double quote + str += `\\${char}`; + i++; + } else if (isControlCharacter(char)) { + // unescaped control character + str += controlCharacters[char]; + i++; + } else { + if (!isValidStringCharacter(char)) { + throwInvalidCharacter(char); + } + str += char; + i++; + } + } + if (skipEscapeChars) { + // repair: skipped escape character (nothing to do) + skipEscapeCharacter(); + } + } + } + return false; + } + + /** + * Repair concatenated strings like "hello" + "world", change this into "helloworld" + */ + function parseConcatenatedString() { + let processed = false; + parseWhitespaceAndSkipComments(); + while (text[i] === '+') { + processed = true; + i++; + parseWhitespaceAndSkipComments(); + + // repair: remove the end quote of the first string + output = stripLastOccurrence(output, '"', true); + const start = output.length; + const parsedStr = parseString(); + if (parsedStr) { + // repair: remove the start quote of the second string + output = removeAtIndex(output, start, 1); + } else { + // repair: remove the + because it is not followed by a string + output = insertBeforeLastWhitespace(output, '"'); + } + } + return processed; + } + + /** + * Parse a number like 2.4 or 2.4e6 + */ + function parseNumber() { + const start = i; + if (text[i] === '-') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + } + + // Note that in JSON leading zeros like "00789" are not allowed. + // We will allow all leading zeros here though and at the end of parseNumber + // check against trailing zeros and repair that if needed. + // Leading zeros can have meaning, so we should not clear them. + while (isDigit(text[i])) { + i++; + } + if (text[i] === '.') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + while (isDigit(text[i])) { + i++; + } + } + if (text[i] === 'e' || text[i] === 'E') { + i++; + if (text[i] === '-' || text[i] === '+') { + i++; + } + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + while (isDigit(text[i])) { + i++; + } + } + + // if we're not at the end of the number by this point, allow this to be parsed as another type + if (!atEndOfNumber()) { + i = start; + return false; + } + if (i > start) { + // repair a number with leading zeros like "00789" + const num = text.slice(start, i); + const hasInvalidLeadingZero = /^0\d/.test(num); + output += hasInvalidLeadingZero ? `"${num}"` : num; + return true; + } + return false; + } + + /** + * Parse keywords true, false, null + * Repair Python keywords True, False, None + */ + function parseKeywords() { + return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') || + // repair Python keywords True, False, None + parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null'); + } + function parseKeyword(name, value) { + if (text.slice(i, i + name.length) === name) { + output += value; + i += name.length; + return true; + } + return false; + } + + /** + * Repair an unquoted string by adding quotes around it + * Repair a MongoDB function call like NumberLong("2") + * Repair a JSONP function call like callback({...}); + */ + function parseUnquotedString(isKey) { + // note that the symbol can end with whitespaces: we stop at the next delimiter + // also, note that we allow strings to contain a slash / in order to support repairing regular expressions + const start = i; + if (isFunctionNameCharStart(text[i])) { + while (i < text.length && isFunctionNameChar(text[i])) { + i++; + } + let j = i; + while (isWhitespace(text, j)) { + j++; + } + if (text[j] === '(') { + // repair a MongoDB function call like NumberLong("2") + // repair a JSONP function call like callback({...}); + i = j + 1; + parseValue(); + if (text[i] === ')') { + // repair: skip close bracket of function call + i++; + if (text[i] === ';') { + // repair: skip semicolon after JSONP call + i++; + } + } + return true; + } + } + while (i < text.length && !isUnquotedStringDelimiter(text[i]) && !isQuote(text[i]) && (!isKey || text[i] !== ':')) { + i++; + } + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && regexUrlStart.test(text.substring(start, i + 2))) { + while (i < text.length && regexUrlChar.test(text[i])) { + i++; + } + } + if (i > start) { + // repair unquoted string + // also, repair undefined into null + + // first, go back to prevent getting trailing whitespaces in the string + while (isWhitespace(text, i - 1) && i > 0) { + i--; + } + const symbol = text.slice(start, i); + output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol); + if (text[i] === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return true; + } + } + function parseRegex() { + if (text[i] === '/') { + const start = i; + i++; + while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\')) { + i++; + } + i++; + output += `"${text.substring(start, i)}"`; + return true; + } + } + function prevNonWhitespaceIndex(start) { + let prev = start; + while (prev > 0 && isWhitespace(text, prev)) { + prev--; + } + return prev; + } + function atEndOfNumber() { + return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i); + } + function repairNumberEndingWithNumericSymbol(start) { + // repair numbers cut off at the end + // this will only be called when we end after a '.', '-', or 'e' and does not + // change the number more than it needs to make it valid JSON + output += `${text.slice(start, i)}0`; + } + function throwInvalidCharacter(char) { + throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i); + } + function throwUnexpectedCharacter() { + throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i); + } + function throwUnexpectedEnd() { + throw new JSONRepairError('Unexpected end of json string', text.length); + } + function throwObjectKeyExpected() { + throw new JSONRepairError('Object key expected', i); + } + function throwColonExpected() { + throw new JSONRepairError('Colon expected', i); + } + function throwInvalidUnicodeCharacter() { + const chars = text.slice(i, i + 6); + throw new JSONRepairError(`Invalid unicode character "${chars}"`, i); + } +} +function atEndOfBlockComment(text, i) { + return text[i] === '*' && text[i + 1] === '/'; +} +//# sourceMappingURL=jsonrepair.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2e7b3de39ae116d15817962c1a2d8430c238804b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/regular/jsonrepair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonrepair.js","names":["JSONRepairError","endsWithCommaOrNewline","insertBeforeLastWhitespace","isControlCharacter","isDelimiter","isDigit","isDoubleQuote","isDoubleQuoteLike","isFunctionNameChar","isFunctionNameCharStart","isHex","isQuote","isSingleQuote","isSingleQuoteLike","isSpecialWhitespace","isStartOfValue","isUnquotedStringDelimiter","isValidStringCharacter","isWhitespace","isWhitespaceExceptNewline","regexUrlChar","regexUrlStart","removeAtIndex","stripLastOccurrence","controlCharacters","escapeCharacters","b","f","n","r","t","jsonrepair","text","i","output","parseMarkdownCodeBlock","processed","parseValue","throwUnexpectedEnd","processedComma","parseCharacter","parseWhitespaceAndSkipComments","parseNewlineDelimitedJSON","length","throwUnexpectedCharacter","parseObject","parseArray","parseString","parseNumber","parseKeywords","parseUnquotedString","parseRegex","skipNewline","arguments","undefined","start","changed","parseWhitespace","parseComment","_isWhiteSpace","whitespace","atEndOfBlockComment","blocks","skipMarkdownCodeBlock","block","end","slice","char","skipCharacter","skipEscapeCharacter","skipEllipsis","initial","processedKey","throwObjectKeyExpected","processedColon","truncatedText","throwColonExpected","processedValue","stopAtDelimiter","stopAtIndex","skipEscapeChars","isEndQuote","iBefore","oBefore","str","iPrev","prevNonWhitespaceIndex","charAt","substring","iQuote","oQuote","parseConcatenatedString","iPrevChar","prevChar","test","escapeChar","j","throwInvalidUnicodeCharacter","throwInvalidCharacter","parsedStr","atEndOfNumber","repairNumberEndingWithNumericSymbol","num","hasInvalidLeadingZero","parseKeyword","name","value","isKey","symbol","JSON","stringify","prev","chars"],"sources":["../../../src/regular/jsonrepair.ts"],"sourcesContent":["import { JSONRepairError } from '../utils/JSONRepairError.js'\nimport {\n endsWithCommaOrNewline,\n insertBeforeLastWhitespace,\n isControlCharacter,\n isDelimiter,\n isDigit,\n isDoubleQuote,\n isDoubleQuoteLike,\n isFunctionNameChar,\n isFunctionNameCharStart,\n isHex,\n isQuote,\n isSingleQuote,\n isSingleQuoteLike,\n isSpecialWhitespace,\n isStartOfValue,\n isUnquotedStringDelimiter,\n isValidStringCharacter,\n isWhitespace,\n isWhitespaceExceptNewline,\n regexUrlChar,\n regexUrlStart,\n removeAtIndex,\n stripLastOccurrence\n} from '../utils/stringUtils.js'\n\nconst controlCharacters: { [key: string]: string } = {\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t'\n}\n\n// map with all escape characters\nconst escapeCharacters: { [key: string]: string } = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\n/**\n * Repair a string containing an invalid JSON document.\n * For example changes JavaScript notation into JSON notation.\n *\n * Example:\n *\n * try {\n * const json = \"{name: 'John'}\"\n * const repaired = jsonrepair(json)\n * console.log(repaired)\n * // '{\"name\": \"John\"}'\n * } catch (err) {\n * console.error(err)\n * }\n *\n */\nexport function jsonrepair(text: string): string {\n let i = 0 // current index in text\n let output = '' // generated output\n\n parseMarkdownCodeBlock(['```', '[```', '{```'])\n\n const processed = parseValue()\n if (!processed) {\n throwUnexpectedEnd()\n }\n\n parseMarkdownCodeBlock(['```', '```]', '```}'])\n\n const processedComma = parseCharacter(',')\n if (processedComma) {\n parseWhitespaceAndSkipComments()\n }\n\n if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) {\n // start of a new value after end of the root level object: looks like\n // newline delimited JSON -> turn into a root level array\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n\n parseNewlineDelimitedJSON()\n } else if (processedComma) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',')\n }\n\n // repair redundant end quotes\n while (text[i] === '}' || text[i] === ']') {\n i++\n parseWhitespaceAndSkipComments()\n }\n\n if (i >= text.length) {\n // reached the end of the document properly\n return output\n }\n\n throwUnexpectedCharacter()\n\n function parseValue(): boolean {\n parseWhitespaceAndSkipComments()\n const processed =\n parseObject() ||\n parseArray() ||\n parseString() ||\n parseNumber() ||\n parseKeywords() ||\n parseUnquotedString(false) ||\n parseRegex()\n parseWhitespaceAndSkipComments()\n\n return processed\n }\n\n function parseWhitespaceAndSkipComments(skipNewline = true): boolean {\n const start = i\n\n let changed = parseWhitespace(skipNewline)\n do {\n changed = parseComment()\n if (changed) {\n changed = parseWhitespace(skipNewline)\n }\n } while (changed)\n\n return i > start\n }\n\n function parseWhitespace(skipNewline: boolean): boolean {\n const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline\n let whitespace = ''\n\n while (true) {\n if (_isWhiteSpace(text, i)) {\n whitespace += text[i]\n i++\n } else if (isSpecialWhitespace(text, i)) {\n // repair special whitespace\n whitespace += ' '\n i++\n } else {\n break\n }\n }\n\n if (whitespace.length > 0) {\n output += whitespace\n return true\n }\n\n return false\n }\n\n function parseComment(): boolean {\n // find a block comment '/* ... */'\n if (text[i] === '/' && text[i + 1] === '*') {\n // repair block comment by skipping it\n while (i < text.length && !atEndOfBlockComment(text, i)) {\n i++\n }\n i += 2\n\n return true\n }\n\n // find a line comment '// ...'\n if (text[i] === '/' && text[i + 1] === '/') {\n // repair line comment by skipping it\n while (i < text.length && text[i] !== '\\n') {\n i++\n }\n\n return true\n }\n\n return false\n }\n\n function parseMarkdownCodeBlock(blocks: string[]): boolean {\n // find and skip over a Markdown fenced code block:\n // ``` ... ```\n // or\n // ```json ... ```\n if (skipMarkdownCodeBlock(blocks)) {\n if (isFunctionNameCharStart(text[i])) {\n // strip the optional language specifier like \"json\"\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++\n }\n }\n\n parseWhitespaceAndSkipComments()\n\n return true\n }\n\n return false\n }\n\n function skipMarkdownCodeBlock(blocks: string[]): boolean {\n for (const block of blocks) {\n const end = i + block.length\n if (text.slice(i, end) === block) {\n i = end\n return true\n }\n }\n\n return false\n }\n\n function parseCharacter(char: string): boolean {\n if (text[i] === char) {\n output += text[i]\n i++\n return true\n }\n\n return false\n }\n\n function skipCharacter(char: string): boolean {\n if (text[i] === char) {\n i++\n return true\n }\n\n return false\n }\n\n function skipEscapeCharacter(): boolean {\n return skipCharacter('\\\\')\n }\n\n /**\n * Skip ellipsis like \"[1,2,3,...]\" or \"[1,2,3,...,9]\" or \"[...,7,8,9]\"\n * or a similar construct in objects.\n */\n function skipEllipsis(): boolean {\n parseWhitespaceAndSkipComments()\n\n if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') {\n // repair: remove the ellipsis (three dots) and optionally a comma\n i += 3\n parseWhitespaceAndSkipComments()\n skipCharacter(',')\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse an object like '{\"key\": \"value\"}'\n */\n function parseObject(): boolean {\n if (text[i] === '{') {\n output += '{'\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: skip leading comma like in {, message: \"hi\"}\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n let initial = true\n while (i < text.length && text[i] !== '}') {\n let processedComma: boolean\n if (!initial) {\n processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n parseWhitespaceAndSkipComments()\n } else {\n processedComma = true\n initial = false\n }\n\n skipEllipsis()\n\n const processedKey = parseString() || parseUnquotedString(true)\n if (!processedKey) {\n if (\n text[i] === '}' ||\n text[i] === '{' ||\n text[i] === ']' ||\n text[i] === '[' ||\n text[i] === undefined\n ) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',')\n } else {\n throwObjectKeyExpected()\n }\n break\n }\n\n parseWhitespaceAndSkipComments()\n const processedColon = parseCharacter(':')\n const truncatedText = i >= text.length\n if (!processedColon) {\n if (isStartOfValue(text[i]) || truncatedText) {\n // repair missing colon\n output = insertBeforeLastWhitespace(output, ':')\n } else {\n throwColonExpected()\n }\n }\n const processedValue = parseValue()\n if (!processedValue) {\n if (processedColon || truncatedText) {\n // repair missing object value\n output += 'null'\n } else {\n throwColonExpected()\n }\n }\n }\n\n if (text[i] === '}') {\n output += '}'\n i++\n } else {\n // repair missing end bracket\n output = insertBeforeLastWhitespace(output, '}')\n }\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse an array like '[\"item1\", \"item2\", ...]'\n */\n function parseArray(): boolean {\n if (text[i] === '[') {\n output += '['\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: skip leading comma like in [,1,2,3]\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n let initial = true\n while (i < text.length && text[i] !== ']') {\n if (!initial) {\n const processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n } else {\n initial = false\n }\n\n skipEllipsis()\n\n const processedValue = parseValue()\n if (!processedValue) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',')\n break\n }\n }\n\n if (text[i] === ']') {\n output += ']'\n i++\n } else {\n // repair missing closing array bracket\n output = insertBeforeLastWhitespace(output, ']')\n }\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse and repair Newline Delimited JSON (NDJSON):\n * multiple JSON objects separated by a newline character\n */\n function parseNewlineDelimitedJSON() {\n // repair NDJSON\n let initial = true\n let processedValue = true\n while (processedValue) {\n if (!initial) {\n // parse optional comma, insert when missing\n const processedComma = parseCharacter(',')\n if (!processedComma) {\n // repair: add missing comma\n output = insertBeforeLastWhitespace(output, ',')\n }\n } else {\n initial = false\n }\n\n processedValue = parseValue()\n }\n\n if (!processedValue) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',')\n }\n\n // repair: wrap the output inside array brackets\n output = `[\\n${output}\\n]`\n }\n\n /**\n * Parse a string enclosed by double quotes \"...\". Can contain escaped quotes\n * Repair strings enclosed in single quotes or special quotes\n * Repair an escaped string\n *\n * The function can run in two stages:\n * - First, it assumes the string has a valid end quote\n * - If it turns out that the string does not have a valid end quote followed\n * by a delimiter (which should be the case), the function runs again in a\n * more conservative way, stopping the string at the first next delimiter\n * and fixing the string by inserting a quote there, or stopping at a\n * stop index detected in the first iteration.\n */\n function parseString(stopAtDelimiter = false, stopAtIndex = -1): boolean {\n let skipEscapeChars = text[i] === '\\\\'\n if (skipEscapeChars) {\n // repair: remove the first escape character\n i++\n skipEscapeChars = true\n }\n\n if (isQuote(text[i])) {\n // double quotes are correct JSON,\n // single quotes come from JavaScript for example, we assume it will have a correct single end quote too\n // otherwise, we will match any double-quote-like start with a double-quote-like end,\n // or any single-quote-like start with a single-quote-like end\n const isEndQuote = isDoubleQuote(text[i])\n ? isDoubleQuote\n : isSingleQuote(text[i])\n ? isSingleQuote\n : isSingleQuoteLike(text[i])\n ? isSingleQuoteLike\n : isDoubleQuoteLike\n\n const iBefore = i\n const oBefore = output.length\n\n let str = '\"'\n i++\n\n while (true) {\n if (i >= text.length) {\n // end of text, we are missing an end quote\n\n const iPrev = prevNonWhitespaceIndex(i - 1)\n if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) {\n // if the text ends with a delimiter, like [\"hello],\n // so the missing end quote should be inserted before this delimiter\n // retry parsing the string, stopping at the first next delimiter\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(true)\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n return true\n }\n\n if (i === stopAtIndex) {\n // use the stop index detected in the first iteration, and repair end quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n return true\n }\n\n if (isEndQuote(text[i])) {\n // end quote\n // let us check what is before and after the quote to verify whether this is a legit end quote\n const iQuote = i\n const oQuote = str.length\n str += '\"'\n i++\n output += str\n\n parseWhitespaceAndSkipComments(false)\n\n if (\n stopAtDelimiter ||\n i >= text.length ||\n isDelimiter(text[i]) ||\n isQuote(text[i]) ||\n isDigit(text[i])\n ) {\n // The quote is followed by the end of the text, a delimiter,\n // or a next value. So the quote is indeed the end of the string.\n parseConcatenatedString()\n\n return true\n }\n\n const iPrevChar = prevNonWhitespaceIndex(iQuote - 1)\n const prevChar = text.charAt(iPrevChar)\n\n if (prevChar === ',') {\n // A comma followed by a quote, like '{\"a\":\"b,c,\"d\":\"e\"}'.\n // We assume that the quote is a start quote, and that the end quote\n // should have been located right before the comma but is missing.\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(false, iPrevChar)\n }\n\n if (isDelimiter(prevChar)) {\n // This is not the right end quote: it is preceded by a delimiter,\n // and NOT followed by a delimiter. So, there is an end quote missing\n // parse the string again and then stop at the first next delimiter\n i = iBefore\n output = output.substring(0, oBefore)\n\n return parseString(true)\n }\n\n // revert to right after the quote but before any whitespace, and continue parsing the string\n output = output.substring(0, oBefore)\n i = iQuote + 1\n\n // repair unescaped quote\n str = `${str.substring(0, oQuote)}\\\\${str.substring(oQuote)}`\n } else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) {\n // we're in the mode to stop the string at the first delimiter\n // because there is an end quote missing\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n str += text[i]\n i++\n }\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"')\n output += str\n\n parseConcatenatedString()\n\n return true\n } else if (text[i] === '\\\\') {\n // handle escaped content like \\n or \\u2605\n const char = text.charAt(i + 1)\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n str += text.slice(i, i + 2)\n i += 2\n } else if (char === 'u') {\n let j = 2\n while (j < 6 && isHex(text[i + j])) {\n j++\n }\n\n if (j === 6) {\n str += text.slice(i, i + 6)\n i += 6\n } else if (i + j >= text.length) {\n // repair invalid or truncated unicode char at the end of the text\n // by removing the unicode char and ending the string here\n i = text.length\n } else {\n throwInvalidUnicodeCharacter()\n }\n } else {\n // repair invalid escape character: remove it\n str += char\n i += 2\n }\n } else {\n // handle regular characters\n const char = text.charAt(i)\n\n if (char === '\"' && text[i - 1] !== '\\\\') {\n // repair unescaped double quote\n str += `\\\\${char}`\n i++\n } else if (isControlCharacter(char)) {\n // unescaped control character\n str += controlCharacters[char]\n i++\n } else {\n if (!isValidStringCharacter(char)) {\n throwInvalidCharacter(char)\n }\n str += char\n i++\n }\n }\n\n if (skipEscapeChars) {\n // repair: skipped escape character (nothing to do)\n skipEscapeCharacter()\n }\n }\n }\n\n return false\n }\n\n /**\n * Repair concatenated strings like \"hello\" + \"world\", change this into \"helloworld\"\n */\n function parseConcatenatedString(): boolean {\n let processed = false\n\n parseWhitespaceAndSkipComments()\n while (text[i] === '+') {\n processed = true\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: remove the end quote of the first string\n output = stripLastOccurrence(output, '\"', true)\n const start = output.length\n const parsedStr = parseString()\n if (parsedStr) {\n // repair: remove the start quote of the second string\n output = removeAtIndex(output, start, 1)\n } else {\n // repair: remove the + because it is not followed by a string\n output = insertBeforeLastWhitespace(output, '\"')\n }\n }\n\n return processed\n }\n\n /**\n * Parse a number like 2.4 or 2.4e6\n */\n function parseNumber(): boolean {\n const start = i\n if (text[i] === '-') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n }\n\n // Note that in JSON leading zeros like \"00789\" are not allowed.\n // We will allow all leading zeros here though and at the end of parseNumber\n // check against trailing zeros and repair that if needed.\n // Leading zeros can have meaning, so we should not clear them.\n while (isDigit(text[i])) {\n i++\n }\n\n if (text[i] === '.') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n while (isDigit(text[i])) {\n i++\n }\n }\n\n if (text[i] === 'e' || text[i] === 'E') {\n i++\n if (text[i] === '-' || text[i] === '+') {\n i++\n }\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return true\n }\n if (!isDigit(text[i])) {\n i = start\n return false\n }\n while (isDigit(text[i])) {\n i++\n }\n }\n\n // if we're not at the end of the number by this point, allow this to be parsed as another type\n if (!atEndOfNumber()) {\n i = start\n return false\n }\n\n if (i > start) {\n // repair a number with leading zeros like \"00789\"\n const num = text.slice(start, i)\n const hasInvalidLeadingZero = /^0\\d/.test(num)\n\n output += hasInvalidLeadingZero ? `\"${num}\"` : num\n return true\n }\n\n return false\n }\n\n /**\n * Parse keywords true, false, null\n * Repair Python keywords True, False, None\n */\n function parseKeywords(): boolean {\n return (\n parseKeyword('true', 'true') ||\n parseKeyword('false', 'false') ||\n parseKeyword('null', 'null') ||\n // repair Python keywords True, False, None\n parseKeyword('True', 'true') ||\n parseKeyword('False', 'false') ||\n parseKeyword('None', 'null')\n )\n }\n\n function parseKeyword(name: string, value: string): boolean {\n if (text.slice(i, i + name.length) === name) {\n output += value\n i += name.length\n return true\n }\n\n return false\n }\n\n /**\n * Repair an unquoted string by adding quotes around it\n * Repair a MongoDB function call like NumberLong(\"2\")\n * Repair a JSONP function call like callback({...});\n */\n function parseUnquotedString(isKey: boolean) {\n // note that the symbol can end with whitespaces: we stop at the next delimiter\n // also, note that we allow strings to contain a slash / in order to support repairing regular expressions\n const start = i\n\n if (isFunctionNameCharStart(text[i])) {\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++\n }\n\n let j = i\n while (isWhitespace(text, j)) {\n j++\n }\n\n if (text[j] === '(') {\n // repair a MongoDB function call like NumberLong(\"2\")\n // repair a JSONP function call like callback({...});\n i = j + 1\n\n parseValue()\n\n if (text[i] === ')') {\n // repair: skip close bracket of function call\n i++\n if (text[i] === ';') {\n // repair: skip semicolon after JSONP call\n i++\n }\n }\n\n return true\n }\n }\n\n while (\n i < text.length &&\n !isUnquotedStringDelimiter(text[i]) &&\n !isQuote(text[i]) &&\n (!isKey || text[i] !== ':')\n ) {\n i++\n }\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(start, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n i++\n }\n }\n\n if (i > start) {\n // repair unquoted string\n // also, repair undefined into null\n\n // first, go back to prevent getting trailing whitespaces in the string\n while (isWhitespace(text, i - 1) && i > 0) {\n i--\n }\n\n const symbol = text.slice(start, i)\n output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol)\n\n if (text[i] === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return true\n }\n }\n\n function parseRegex() {\n if (text[i] === '/') {\n const start = i\n i++\n\n while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\\\')) {\n i++\n }\n i++\n\n output += `\"${text.substring(start, i)}\"`\n\n return true\n }\n }\n\n function prevNonWhitespaceIndex(start: number): number {\n let prev = start\n\n while (prev > 0 && isWhitespace(text, prev)) {\n prev--\n }\n\n return prev\n }\n\n function atEndOfNumber() {\n return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i)\n }\n\n function repairNumberEndingWithNumericSymbol(start: number) {\n // repair numbers cut off at the end\n // this will only be called when we end after a '.', '-', or 'e' and does not\n // change the number more than it needs to make it valid JSON\n output += `${text.slice(start, i)}0`\n }\n\n function throwInvalidCharacter(char: string) {\n throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i)\n }\n\n function throwUnexpectedCharacter() {\n throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i)\n }\n\n function throwUnexpectedEnd() {\n throw new JSONRepairError('Unexpected end of json string', text.length)\n }\n\n function throwObjectKeyExpected() {\n throw new JSONRepairError('Object key expected', i)\n }\n\n function throwColonExpected() {\n throw new JSONRepairError('Colon expected', i)\n }\n\n function throwInvalidUnicodeCharacter() {\n const chars = text.slice(i, i + 6)\n throw new JSONRepairError(`Invalid unicode character \"${chars}\"`, i)\n }\n}\n\nfunction atEndOfBlockComment(text: string, i: number) {\n return text[i] === '*' && text[i + 1] === '/'\n}\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SACEC,sBAAsB,EACtBC,0BAA0B,EAC1BC,kBAAkB,EAClBC,WAAW,EACXC,OAAO,EACPC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB,EAClBC,uBAAuB,EACvBC,KAAK,EACLC,OAAO,EACPC,aAAa,EACbC,iBAAiB,EACjBC,mBAAmB,EACnBC,cAAc,EACdC,yBAAyB,EACzBC,sBAAsB,EACtBC,YAAY,EACZC,yBAAyB,EACzBC,YAAY,EACZC,aAAa,EACbC,aAAa,EACbC,mBAAmB,QACd,yBAAyB;AAEhC,MAAMC,iBAA4C,GAAG;EACnD,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE,KAAK;EACX,IAAI,EAAE;AACR,CAAC;;AAED;AACA,MAAMC,gBAA2C,GAAG;EAClD,GAAG,EAAE,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,CAACC,SAAS,CAAC9E,IAAI,CAACC,CAAC,CAAC,CAAC,EAAE,EAAEA,CAAC,CAAC;EACjF;EAEA,SAASK,kBAAkBA,CAAA,EAAG;IAC5B,MAAM,IAAItC,eAAe,CAAC,+BAA+B,EAAEgC,IAAI,CAACW,MAAM,CAAC;EACzE;EAEA,SAAS8B,sBAAsBA,CAAA,EAAG;IAChC,MAAM,IAAIzE,eAAe,CAAC,qBAAqB,EAAEiC,CAAC,CAAC;EACrD;EAEA,SAAS2C,kBAAkBA,CAAA,EAAG;IAC5B,MAAM,IAAI5E,eAAe,CAAC,gBAAgB,EAAEiC,CAAC,CAAC;EAChD;EAEA,SAASgE,4BAA4BA,CAAA,EAAG;IACtC,MAAMe,KAAK,GAAGhF,IAAI,CAACkC,KAAK,CAACjC,CAAC,EAAEA,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,IAAIjC,eAAe,CAAC,8BAA8BgH,KAAK,GAAG,EAAE/E,CAAC,CAAC;EACtE;AACF;AAEA,SAAS4B,mBAAmBA,CAAC7B,IAAY,EAAEC,CAAS,EAAE;EACpD,OAAOD,IAAI,CAACC,CAAC,CAAC,KAAK,GAAG,IAAID,IAAI,CAACC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;AAC/C","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js new file mode 100644 index 0000000000000000000000000000000000000000..a3d84c8d058a69d0286069d3097d81a7a1f1695f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js @@ -0,0 +1,3 @@ +// Node.js streaming API +export { jsonrepairTransform } from './streaming/stream.js'; +//# sourceMappingURL=stream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d8f3eb9c1cc728ec0f3a852c64c4a12b579b0831 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.js","names":["jsonrepairTransform"],"sources":["../../src/stream.ts"],"sourcesContent":["// Node.js streaming API\nexport { type JsonRepairTransformOptions, jsonrepairTransform } from './streaming/stream.js'\n"],"mappings":"AAAA;AACA,SAA0CA,mBAAmB,QAAQ,uBAAuB","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js new file mode 100644 index 0000000000000000000000000000000000000000..cd9c1ff8fbb5106717c90b1ceaaac42fc457f573 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js @@ -0,0 +1,69 @@ +export function createInputBuffer() { + let buffer = ''; + let offset = 0; + let currentLength = 0; + let closed = false; + function ensure(index) { + if (index < offset) { + throw new Error(`${indexOutOfRangeMessage} (index: ${index}, offset: ${offset})`); + } + if (index >= currentLength) { + if (!closed) { + throw new Error(`${indexOutOfRangeMessage} (index: ${index})`); + } + } + } + function push(chunk) { + buffer += chunk; + currentLength += chunk.length; + } + function flush(position) { + if (position > currentLength) { + return; + } + buffer = buffer.substring(position - offset); + offset = position; + } + function charAt(index) { + ensure(index); + return buffer.charAt(index - offset); + } + function charCodeAt(index) { + ensure(index); + return buffer.charCodeAt(index - offset); + } + function substring(start, end) { + ensure(end - 1); // -1 because end is excluded + ensure(start); + return buffer.slice(start - offset, end - offset); + } + function length() { + if (!closed) { + throw new Error('Cannot get length: input is not yet closed'); + } + return currentLength; + } + function isEnd(index) { + if (!closed) { + ensure(index); + } + return index >= currentLength; + } + function close() { + closed = true; + } + return { + push, + flush, + charAt, + charCodeAt, + substring, + length, + currentLength: () => currentLength, + currentBufferSize: () => buffer.length, + isEnd, + close + }; +} +const indexOutOfRangeMessage = 'Index out of range, please configure a larger buffer size'; +//# sourceMappingURL=InputBuffer.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bc719a80b68af335cc88e97eb0dd07f55dca9787 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/InputBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"InputBuffer.js","names":["createInputBuffer","buffer","offset","currentLength","closed","ensure","index","Error","indexOutOfRangeMessage","push","chunk","length","flush","position","substring","charAt","charCodeAt","start","end","slice","isEnd","close","currentBufferSize"],"sources":["../../../../src/streaming/buffer/InputBuffer.ts"],"sourcesContent":["export interface InputBuffer {\n push: (chunk: string) => void\n flush: (position: number) => void\n charAt: (index: number) => string\n charCodeAt: (index: number) => number\n substring: (start: number, end: number) => string\n length: () => number\n currentLength: () => number\n currentBufferSize: () => number\n isEnd: (index: number) => boolean\n close: () => void\n}\n\nexport function createInputBuffer(): InputBuffer {\n let buffer = ''\n let offset = 0\n let currentLength = 0\n let closed = false\n\n function ensure(index: number) {\n if (index < offset) {\n throw new Error(`${indexOutOfRangeMessage} (index: ${index}, offset: ${offset})`)\n }\n\n if (index >= currentLength) {\n if (!closed) {\n throw new Error(`${indexOutOfRangeMessage} (index: ${index})`)\n }\n }\n }\n\n function push(chunk: string) {\n buffer += chunk\n currentLength += chunk.length\n }\n\n function flush(position: number) {\n if (position > currentLength) {\n return\n }\n\n buffer = buffer.substring(position - offset)\n offset = position\n }\n\n function charAt(index: number): string {\n ensure(index)\n\n return buffer.charAt(index - offset)\n }\n\n function charCodeAt(index: number): number {\n ensure(index)\n\n return buffer.charCodeAt(index - offset)\n }\n\n function substring(start: number, end: number): string {\n ensure(end - 1) // -1 because end is excluded\n ensure(start)\n\n return buffer.slice(start - offset, end - offset)\n }\n\n function length(): number {\n if (!closed) {\n throw new Error('Cannot get length: input is not yet closed')\n }\n\n return currentLength\n }\n\n function isEnd(index: number): boolean {\n if (!closed) {\n ensure(index)\n }\n\n return index >= currentLength\n }\n\n function close() {\n closed = true\n }\n\n return {\n push,\n flush,\n charAt,\n charCodeAt,\n substring,\n length,\n currentLength: () => currentLength,\n currentBufferSize: () => buffer.length,\n isEnd,\n close\n }\n}\n\nconst indexOutOfRangeMessage = 'Index out of range, please configure a larger buffer size'\n"],"mappings":"AAaA,OAAO,SAASA,iBAAiBA,CAAA,EAAgB;EAC/C,IAAIC,MAAM,GAAG,EAAE;EACf,IAAIC,MAAM,GAAG,CAAC;EACd,IAAIC,aAAa,GAAG,CAAC;EACrB,IAAIC,MAAM,GAAG,KAAK;EAElB,SAASC,MAAMA,CAACC,KAAa,EAAE;IAC7B,IAAIA,KAAK,GAAGJ,MAAM,EAAE;MAClB,MAAM,IAAIK,KAAK,CAAC,GAAGC,sBAAsB,YAAYF,KAAK,aAAaJ,MAAM,GAAG,CAAC;IACnF;IAEA,IAAII,KAAK,IAAIH,aAAa,EAAE;MAC1B,IAAI,CAACC,MAAM,EAAE;QACX,MAAM,IAAIG,KAAK,CAAC,GAAGC,sBAAsB,YAAYF,KAAK,GAAG,CAAC;MAChE;IACF;EACF;EAEA,SAASG,IAAIA,CAACC,KAAa,EAAE;IAC3BT,MAAM,IAAIS,KAAK;IACfP,aAAa,IAAIO,KAAK,CAACC,MAAM;EAC/B;EAEA,SAASC,KAAKA,CAACC,QAAgB,EAAE;IAC/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b,sBAAsB,GAAG,2DAA2D","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js new file mode 100644 index 0000000000000000000000000000000000000000..e153592e032b8bf38f2bb64f1b66b05ff923b4c9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js @@ -0,0 +1,111 @@ +import { isWhitespace } from '../../utils/stringUtils.js'; +export function createOutputBuffer(_ref) { + let { + write, + chunkSize, + bufferSize + } = _ref; + let buffer = ''; + let offset = 0; + function flushChunks() { + let minSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bufferSize; + while (buffer.length >= minSize + chunkSize) { + const chunk = buffer.substring(0, chunkSize); + write(chunk); + offset += chunkSize; + buffer = buffer.substring(chunkSize); + } + } + function flush() { + flushChunks(0); + if (buffer.length > 0) { + write(buffer); + offset += buffer.length; + buffer = ''; + } + } + function push(text) { + buffer += text; + flushChunks(); + } + function unshift(text) { + if (offset > 0) { + throw new Error(`Cannot unshift: ${flushedMessage}`); + } + buffer = text + buffer; + flushChunks(); + } + function remove(start, end) { + if (start < offset) { + throw new Error(`Cannot remove: ${flushedMessage}`); + } + if (end !== undefined) { + buffer = buffer.substring(0, start - offset) + buffer.substring(end - offset); + } else { + buffer = buffer.substring(0, start - offset); + } + } + function insertAt(index, text) { + if (index < offset) { + throw new Error(`Cannot insert: ${flushedMessage}`); + } + buffer = buffer.substring(0, index - offset) + text + buffer.substring(index - offset); + } + function length() { + return offset + buffer.length; + } + function stripLastOccurrence(textToStrip) { + let stripRemainingText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + const bufferIndex = buffer.lastIndexOf(textToStrip); + if (bufferIndex !== -1) { + if (stripRemainingText) { + buffer = buffer.substring(0, bufferIndex); + } else { + buffer = buffer.substring(0, bufferIndex) + buffer.substring(bufferIndex + textToStrip.length); + } + } + } + function insertBeforeLastWhitespace(textToInsert) { + let bufferIndex = buffer.length; // index relative to the start of the buffer, not taking `offset` into account + + if (!isWhitespace(buffer, bufferIndex - 1)) { + // no trailing whitespaces + push(textToInsert); + return; + } + while (isWhitespace(buffer, bufferIndex - 1)) { + bufferIndex--; + } + if (bufferIndex <= 0) { + throw new Error(`Cannot insert: ${flushedMessage}`); + } + buffer = buffer.substring(0, bufferIndex) + textToInsert + buffer.substring(bufferIndex); + flushChunks(); + } + function endsWithIgnoringWhitespace(char) { + let i = buffer.length - 1; + while (i > 0) { + if (char === buffer.charAt(i)) { + return true; + } + if (!isWhitespace(buffer, i)) { + return false; + } + i--; + } + return false; + } + return { + push, + unshift, + remove, + insertAt, + length, + flush, + stripLastOccurrence, + insertBeforeLastWhitespace, + endsWithIgnoringWhitespace + }; +} +const flushedMessage = 'start of the output is already flushed from the buffer'; +//# sourceMappingURL=OutputBuffer.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c3d1ddf90961d6e110fad47629ec545a669f5312 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/buffer/OutputBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OutputBuffer.js","names":["isWhitespace","createOutputBuffer","_ref","write","chunkSize","bufferSize","buffer","offset","flushChunks","minSize","arguments","length","undefined","chunk","substring","flush","push","text","unshift","Error","flushedMessage","remove","start","end","insertAt","index","stripLastOccurrence","textToStrip","stripRemainingText","bufferIndex","lastIndexOf","insertBeforeLastWhitespace","textToInsert","endsWithIgnoringWhitespace","char","i","charAt"],"sources":["../../../../src/streaming/buffer/OutputBuffer.ts"],"sourcesContent":["import { isWhitespace } from '../../utils/stringUtils.js'\n\nexport interface OutputBuffer {\n push: (text: string) => void\n unshift: (text: string) => void\n remove: (start: number, end?: number) => void\n insertAt: (index: number, text: string) => void\n length: () => number\n flush: () => void\n\n stripLastOccurrence: (textToStrip: string, stripRemainingText?: boolean) => void\n insertBeforeLastWhitespace: (textToInsert: string) => void\n endsWithIgnoringWhitespace: (char: string) => boolean\n}\n\nexport interface OutputBufferOptions {\n write: (chunk: string) => void\n chunkSize: number\n bufferSize: number\n}\n\nexport function createOutputBuffer({\n write,\n chunkSize,\n bufferSize\n}: OutputBufferOptions): OutputBuffer {\n let buffer = ''\n let offset = 0\n\n function flushChunks(minSize = bufferSize) {\n while (buffer.length >= minSize + chunkSize) {\n const chunk = buffer.substring(0, chunkSize)\n write(chunk)\n offset += chunkSize\n buffer = buffer.substring(chunkSize)\n }\n }\n\n function flush() {\n flushChunks(0)\n\n if (buffer.length > 0) {\n write(buffer)\n offset += buffer.length\n buffer = ''\n }\n }\n\n function push(text: string) {\n buffer += text\n flushChunks()\n }\n\n function unshift(text: string) {\n if (offset > 0) {\n throw new Error(`Cannot unshift: ${flushedMessage}`)\n }\n\n buffer = text + buffer\n flushChunks()\n }\n\n function remove(start: number, end?: number) {\n if (start < offset) {\n throw new Error(`Cannot remove: ${flushedMessage}`)\n }\n\n if (end !== undefined) {\n buffer = buffer.substring(0, start - offset) + buffer.substring(end - offset)\n } else {\n buffer = buffer.substring(0, start - offset)\n }\n }\n\n function insertAt(index: number, text: string) {\n if (index < offset) {\n throw new Error(`Cannot insert: ${flushedMessage}`)\n }\n\n buffer = buffer.substring(0, index - offset) + text + buffer.substring(index - offset)\n }\n\n function length(): number {\n return offset + buffer.length\n }\n\n function stripLastOccurrence(textToStrip: string, stripRemainingText = false) {\n const bufferIndex = buffer.lastIndexOf(textToStrip)\n\n if (bufferIndex !== -1) {\n if (stripRemainingText) {\n buffer = buffer.substring(0, bufferIndex)\n } else {\n buffer =\n buffer.substring(0, bufferIndex) + buffer.substring(bufferIndex + textToStrip.length)\n }\n }\n }\n\n function insertBeforeLastWhitespace(textToInsert: string) {\n let bufferIndex = buffer.length // index relative to the start of the buffer, not taking `offset` into account\n\n if (!isWhitespace(buffer, bufferIndex - 1)) {\n // no trailing whitespaces\n push(textToInsert)\n return\n }\n\n while (isWhitespace(buffer, bufferIndex - 1)) {\n bufferIndex--\n }\n\n if (bufferIndex <= 0) {\n throw new Error(`Cannot insert: ${flushedMessage}`)\n }\n\n buffer = buffer.substring(0, bufferIndex) + textToInsert + buffer.substring(bufferIndex)\n flushChunks()\n }\n\n function endsWithIgnoringWhitespace(char: string): boolean {\n let i = buffer.length - 1\n\n while (i > 0) {\n if (char === buffer.charAt(i)) {\n return true\n }\n\n if (!isWhitespace(buffer, i)) {\n return false\n }\n\n i--\n }\n\n return false\n }\n\n return {\n push,\n unshift,\n remove,\n insertAt,\n length,\n flush,\n\n stripLastOccurrence,\n insertBeforeLastWhitespace,\n endsWithIgnoringWhitespace\n }\n}\n\nconst flushedMessage = 'start of the output is already flushed from the buffer'\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAqBzD,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAII;EAAA,IAJH;IACjCC,KAAK;IACLC,SAAS;IACTC;EACmB,CAAC,GAAAH,IAAA;EACpB,IAAII,MAAM,GAAG,EAAE;EACf,IAAIC,MAAM,GAAG,CAAC;EAEd,SAASC,WAAWA,CAAA,EAAuB;IAAA,IAAtBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGL,UAAU;IACvC,OAAOC,MAAM,CAACK,MAAM,IAAIF,OAAO,GAAGL,SAAS,EAAE;MAC3C,MAAMS,KAAK,GAAGP,MAAM,CAACQ,SAAS,CAAC,CAAC,EAAEV,SAAS,CAAC;MAC5CD,KAA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,CAACQ,SAAS,CAAC,CAAC,EAAEe,WAAW,CAAC,GAAGG,YAAY,GAAG1B,MAAM,CAACQ,SAAS,CAACe,WAAW,CAAC;IACxFrB,WAAW,CAAC,CAAC;EACf;EAEA,SAASyB,0BAA0BA,CAACC,IAAY,EAAW;IACzD,IAAIC,CAAC,GAAG7B,MAAM,CAACK,MAAM,GAAG,CAAC;IAEzB,OAAOwB,CAAC,GAAG,CAAC,EAAE;MACZ,IAAID,IAAI,KAAK5B,MAAM,CAAC8B,MAAM,CAACD,CAAC,CAAC,EAAE;QAC7B,OAAO,IAAI;MACb;MAEA,IAAI,CAACnC,YAAY,CAACM,MAAM,EAAE6B,CAAC,CAAC,EAAE;QAC5B,OAAO,KAAK;MACd;MAEAA,CAAC,EAAE;IACL;IAEA,OAAO,KAAK;EACd;EAEA,OAAO;IACLnB,IAAI;IACJE,OAAO;IACPG,MAAM;IACNG,QAAQ;IACRb,MAAM;IACNI,KAAK;IAELW,mBAAmB;IACnBK,0BAA0B;IAC1BE;EACF,CAAC;AACH;AAEA,MAAMb,cAAc,GAAG,wDAAwD","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js new file mode 100644 index 0000000000000000000000000000000000000000..f5c002bdf464dd0b4a4a16f53b7fda3a7f352665 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js @@ -0,0 +1,818 @@ +import { JSONRepairError } from '../utils/JSONRepairError.js'; +import { isControlCharacter, isDelimiter, isDigit, isDoubleQuote, isDoubleQuoteLike, isFunctionNameChar, isFunctionNameCharStart, isHex, isQuote, isSingleQuote, isSingleQuoteLike, isSpecialWhitespace, isStartOfValue, isUnquotedStringDelimiter, isValidStringCharacter, isWhitespace, isWhitespaceExceptNewline, regexUrlChar, regexUrlStart } from '../utils/stringUtils.js'; +import { createInputBuffer } from './buffer/InputBuffer.js'; +import { createOutputBuffer } from './buffer/OutputBuffer.js'; +import { Caret, createStack, StackType } from './stack.js'; +const controlCharacters = { + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' +}; + +// map with all escape characters +const escapeCharacters = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + // note that \u is handled separately in parseString() +}; +export function jsonrepairCore(_ref) { + let { + onData, + bufferSize = 65536, + chunkSize = 65536 + } = _ref; + const input = createInputBuffer(); + const output = createOutputBuffer({ + write: onData, + bufferSize, + chunkSize + }); + let i = 0; + let iFlushed = 0; + const stack = createStack(); + function flushInputBuffer() { + while (iFlushed < i - bufferSize - chunkSize) { + iFlushed += chunkSize; + input.flush(iFlushed); + } + } + function transform(chunk) { + input.push(chunk); + while (i < input.currentLength() - bufferSize && parse()) { + // loop until there is nothing more to process + } + flushInputBuffer(); + } + function flush() { + input.close(); + while (parse()) { + // loop until there is nothing more to process + } + output.flush(); + } + function parse() { + parseWhitespaceAndSkipComments(); + switch (stack.type) { + case StackType.object: + { + switch (stack.caret) { + case Caret.beforeKey: + return skipEllipsis() || parseObjectKey() || parseUnexpectedColon() || parseRepairTrailingComma() || parseRepairObjectEndOrComma(); + case Caret.beforeValue: + return parseValue() || parseRepairMissingObjectValue(); + case Caret.afterValue: + return parseObjectComma() || parseObjectEnd() || parseRepairObjectEndOrComma(); + default: + return false; + } + } + case StackType.array: + { + switch (stack.caret) { + case Caret.beforeValue: + return skipEllipsis() || parseValue() || parseRepairTrailingComma() || parseRepairArrayEnd(); + case Caret.afterValue: + return parseArrayComma() || parseArrayEnd() || parseRepairMissingComma() || parseRepairArrayEnd(); + default: + return false; + } + } + case StackType.ndJson: + { + switch (stack.caret) { + case Caret.beforeValue: + return parseValue() || parseRepairTrailingComma(); + case Caret.afterValue: + return parseArrayComma() || parseRepairMissingComma() || parseRepairNdJsonEnd(); + default: + return false; + } + } + case StackType.functionCall: + { + switch (stack.caret) { + case Caret.beforeValue: + return parseValue(); + case Caret.afterValue: + return parseFunctionCallEnd(); + default: + return false; + } + } + case StackType.root: + { + switch (stack.caret) { + case Caret.beforeValue: + return parseRootStart(); + case Caret.afterValue: + return parseRootEnd(); + default: + return false; + } + } + default: + return false; + } + } + function parseValue() { + return parseObjectStart() || parseArrayStart() || parseString() || parseNumber() || parseKeywords() || parseRepairUnquotedString() || parseRepairRegex(); + } + function parseObjectStart() { + if (parseCharacter('{')) { + parseWhitespaceAndSkipComments(); + skipEllipsis(); + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + if (parseCharacter('}')) { + return stack.update(Caret.afterValue); + } + return stack.push(StackType.object, Caret.beforeKey); + } + return false; + } + function parseArrayStart() { + if (parseCharacter('[')) { + parseWhitespaceAndSkipComments(); + skipEllipsis(); + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + if (parseCharacter(']')) { + return stack.update(Caret.afterValue); + } + return stack.push(StackType.array, Caret.beforeValue); + } + return false; + } + function parseRepairUnquotedString() { + let j = i; + if (isFunctionNameCharStart(input.charAt(j))) { + while (!input.isEnd(j) && isFunctionNameChar(input.charAt(j))) { + j++; + } + let k = j; + while (isWhitespace(input, k)) { + k++; + } + if (input.charAt(k) === '(') { + // repair a MongoDB function call like NumberLong("2") + // repair a JSONP function call like callback({...}); + k++; + i = k; + return stack.push(StackType.functionCall, Caret.beforeValue); + } + } + j = findNextDelimiter(false, j); + if (j !== null) { + // test start of an url like "https://..." (this would be parsed as a comment) + if (input.charAt(j - 1) === ':' && regexUrlStart.test(input.substring(i, j + 2))) { + while (!input.isEnd(j) && regexUrlChar.test(input.charAt(j))) { + j++; + } + } + const symbol = input.substring(i, j); + i = j; + output.push(symbol === 'undefined' ? 'null' : JSON.stringify(symbol)); + if (input.charAt(i) === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return stack.update(Caret.afterValue); + } + return false; + } + function parseRepairRegex() { + if (input.charAt(i) === '/') { + const start = i; + i++; + while (!input.isEnd(i) && (input.charAt(i) !== '/' || input.charAt(i - 1) === '\\')) { + i++; + } + i++; + output.push(`"${input.substring(start, i)}"`); + return stack.update(Caret.afterValue); + } + } + function parseRepairMissingObjectValue() { + // repair missing object value + output.push('null'); + return stack.update(Caret.afterValue); + } + function parseRepairTrailingComma() { + // repair trailing comma + if (output.endsWithIgnoringWhitespace(',')) { + output.stripLastOccurrence(','); + return stack.update(Caret.afterValue); + } + return false; + } + function parseUnexpectedColon() { + if (input.charAt(i) === ':') { + throwObjectKeyExpected(); + } + return false; + } + function parseUnexpectedEnd() { + if (input.isEnd(i)) { + throwUnexpectedEnd(); + } else { + throwUnexpectedCharacter(); + } + return false; + } + function parseObjectKey() { + const parsedKey = parseString() || parseUnquotedKey(); + if (parsedKey) { + parseWhitespaceAndSkipComments(); + if (parseCharacter(':')) { + // expect a value after the : + return stack.update(Caret.beforeValue); + } + const truncatedText = input.isEnd(i); + if (isStartOfValue(input.charAt(i)) || truncatedText) { + // repair missing colon + output.insertBeforeLastWhitespace(':'); + return stack.update(Caret.beforeValue); + } + throwColonExpected(); + } + return false; + } + function parseObjectComma() { + if (parseCharacter(',')) { + return stack.update(Caret.beforeKey); + } + return false; + } + function parseObjectEnd() { + if (parseCharacter('}')) { + return stack.pop(); + } + return false; + } + function parseRepairObjectEndOrComma() { + // repair missing object end and trailing comma + if (input.charAt(i) === '{') { + output.stripLastOccurrence(','); + output.insertBeforeLastWhitespace('}'); + return stack.pop(); + } + + // repair missing comma + if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) { + output.insertBeforeLastWhitespace(','); + return stack.update(Caret.beforeKey); + } + + // repair missing closing brace + output.insertBeforeLastWhitespace('}'); + return stack.pop(); + } + function parseArrayComma() { + if (parseCharacter(',')) { + return stack.update(Caret.beforeValue); + } + return false; + } + function parseArrayEnd() { + if (parseCharacter(']')) { + return stack.pop(); + } + return false; + } + function parseRepairMissingComma() { + // repair missing comma + if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) { + output.insertBeforeLastWhitespace(','); + return stack.update(Caret.beforeValue); + } + return false; + } + function parseRepairArrayEnd() { + // repair missing closing bracket + output.insertBeforeLastWhitespace(']'); + return stack.pop(); + } + function parseRepairNdJsonEnd() { + if (input.isEnd(i)) { + output.push('\n]'); + return stack.pop(); + } + throwUnexpectedEnd(); + return false; // just to make TS happy + } + function parseFunctionCallEnd() { + if (skipCharacter(')')) { + skipCharacter(';'); + } + return stack.pop(); + } + function parseRootStart() { + parseMarkdownCodeBlock(['```', '[```', '{```']); + return parseValue() || parseUnexpectedEnd(); + } + function parseRootEnd() { + parseMarkdownCodeBlock(['```', '```]', '```}']); + const parsedComma = parseCharacter(','); + parseWhitespaceAndSkipComments(); + if (isStartOfValue(input.charAt(i)) && (output.endsWithIgnoringWhitespace(',') || output.endsWithIgnoringWhitespace('\n'))) { + // start of a new value after end of the root level object: looks like + // newline delimited JSON -> turn into a root level array + if (!parsedComma) { + // repair missing comma + output.insertBeforeLastWhitespace(','); + } + output.unshift('[\n'); + return stack.push(StackType.ndJson, Caret.beforeValue); + } + if (parsedComma) { + // repair: remove trailing comma + output.stripLastOccurrence(','); + return stack.update(Caret.afterValue); + } + + // repair redundant end braces and brackets + while (input.charAt(i) === '}' || input.charAt(i) === ']') { + i++; + parseWhitespaceAndSkipComments(); + } + if (!input.isEnd(i)) { + throwUnexpectedCharacter(); + } + return false; + } + function parseWhitespaceAndSkipComments() { + let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const start = i; + let changed = parseWhitespace(skipNewline); + do { + changed = parseComment(); + if (changed) { + changed = parseWhitespace(skipNewline); + } + } while (changed); + return i > start; + } + function parseWhitespace(skipNewline) { + const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline; + let whitespace = ''; + while (true) { + if (_isWhiteSpace(input, i)) { + whitespace += input.charAt(i); + i++; + } else if (isSpecialWhitespace(input, i)) { + // repair special whitespace + whitespace += ' '; + i++; + } else { + break; + } + } + if (whitespace.length > 0) { + output.push(whitespace); + return true; + } + return false; + } + function parseComment() { + // find a block comment '/* ... */' + if (input.charAt(i) === '/' && input.charAt(i + 1) === '*') { + // repair block comment by skipping it + while (!input.isEnd(i) && !atEndOfBlockComment(i)) { + i++; + } + i += 2; + return true; + } + + // find a line comment '// ...' + if (input.charAt(i) === '/' && input.charAt(i + 1) === '/') { + // repair line comment by skipping it + while (!input.isEnd(i) && input.charAt(i) !== '\n') { + i++; + } + return true; + } + return false; + } + function parseMarkdownCodeBlock(blocks) { + // find and skip over a Markdown fenced code block: + // ``` ... ``` + // or + // ```json ... ``` + if (skipMarkdownCodeBlock(blocks)) { + if (isFunctionNameCharStart(input.charAt(i))) { + // strip the optional language specifier like "json" + while (!input.isEnd(i) && isFunctionNameChar(input.charAt(i))) { + i++; + } + } + parseWhitespaceAndSkipComments(); + return true; + } + return false; + } + function skipMarkdownCodeBlock(blocks) { + for (const block of blocks) { + const end = i + block.length; + if (input.substring(i, end) === block) { + i = end; + return true; + } + } + return false; + } + function parseCharacter(char) { + if (input.charAt(i) === char) { + output.push(input.charAt(i)); + i++; + return true; + } + return false; + } + function skipCharacter(char) { + if (input.charAt(i) === char) { + i++; + return true; + } + return false; + } + function skipEscapeCharacter() { + return skipCharacter('\\'); + } + + /** + * Skip ellipsis like "[1,2,3,...]" or "[1,2,3,...,9]" or "[...,7,8,9]" + * or a similar construct in objects. + */ + function skipEllipsis() { + parseWhitespaceAndSkipComments(); + if (input.charAt(i) === '.' && input.charAt(i + 1) === '.' && input.charAt(i + 2) === '.') { + // repair: remove the ellipsis (three dots) and optionally a comma + i += 3; + parseWhitespaceAndSkipComments(); + skipCharacter(','); + return true; + } + return false; + } + + /** + * Parse a string enclosed by double quotes "...". Can contain escaped quotes + * Repair strings enclosed in single quotes or special quotes + * Repair an escaped string + * + * The function can run in two stages: + * - First, it assumes the string has a valid end quote + * - If it turns out that the string does not have a valid end quote followed + * by a delimiter (which should be the case), the function runs again in a + * more conservative way, stopping the string at the first next delimiter + * and fixing the string by inserting a quote there, or stopping at a + * stop index detected in the first iteration. + */ + function parseString() { + let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + let skipEscapeChars = input.charAt(i) === '\\'; + if (skipEscapeChars) { + // repair: remove the first escape character + i++; + skipEscapeChars = true; + } + if (isQuote(input.charAt(i))) { + // double quotes are correct JSON, + // single quotes come from JavaScript for example, we assume it will have a correct single end quote too + // otherwise, we will match any double-quote-like start with a double-quote-like end, + // or any single-quote-like start with a single-quote-like end + const isEndQuote = isDoubleQuote(input.charAt(i)) ? isDoubleQuote : isSingleQuote(input.charAt(i)) ? isSingleQuote : isSingleQuoteLike(input.charAt(i)) ? isSingleQuoteLike : isDoubleQuoteLike; + const iBefore = i; + const oBefore = output.length(); + output.push('"'); + i++; + while (true) { + if (input.isEnd(i)) { + // end of text, we have a missing quote somewhere + + const iPrev = prevNonWhitespaceIndex(i - 1); + if (!stopAtDelimiter && isDelimiter(input.charAt(iPrev))) { + // if the text ends with a delimiter, like ["hello], + // so the missing end quote should be inserted before this delimiter + // retry parsing the string, stopping at the first next delimiter + i = iBefore; + output.remove(oBefore); + return parseString(true); + } + + // repair missing quote + output.insertBeforeLastWhitespace('"'); + return stack.update(Caret.afterValue); + } + if (i === stopAtIndex) { + // use the stop index detected in the first iteration, and repair end quote + output.insertBeforeLastWhitespace('"'); + return stack.update(Caret.afterValue); + } + if (isEndQuote(input.charAt(i))) { + // end quote + // let us check what is before and after the quote to verify whether this is a legit end quote + const iQuote = i; + const oQuote = output.length(); + output.push('"'); + i++; + parseWhitespaceAndSkipComments(false); + if (stopAtDelimiter || input.isEnd(i) || isDelimiter(input.charAt(i)) || isQuote(input.charAt(i)) || isDigit(input.charAt(i))) { + // The quote is followed by the end of the text, a delimiter, or a next value + // so the quote is indeed the end of the string + parseConcatenatedString(); + return stack.update(Caret.afterValue); + } + const iPrevChar = prevNonWhitespaceIndex(iQuote - 1); + const prevChar = input.charAt(iPrevChar); + if (prevChar === ',') { + // A comma followed by a quote, like '{"a":"b,c,"d":"e"}'. + // We assume that the quote is a start quote, and that the end quote + // should have been located right before the comma but is missing. + i = iBefore; + output.remove(oBefore); + return parseString(false, iPrevChar); + } + if (isDelimiter(prevChar)) { + // This is not the right end quote: it is preceded by a delimiter, + // and NOT followed by a delimiter. So, there is an end quote missing + // parse the string again and then stop at the first next delimiter + i = iBefore; + output.remove(oBefore); + return parseString(true); + } + + // revert to right after the quote but before any whitespace, and continue parsing the string + output.remove(oQuote + 1); + i = iQuote + 1; + + // repair unescaped quote + output.insertAt(oQuote, '\\'); + } else if (stopAtDelimiter && isUnquotedStringDelimiter(input.charAt(i))) { + // we're in the mode to stop the string at the first delimiter + // because there is an end quote missing + + // test start of an url like "https://..." (this would be parsed as a comment) + if (input.charAt(i - 1) === ':' && regexUrlStart.test(input.substring(iBefore + 1, i + 2))) { + while (!input.isEnd(i) && regexUrlChar.test(input.charAt(i))) { + output.push(input.charAt(i)); + i++; + } + } + + // repair missing quote + output.insertBeforeLastWhitespace('"'); + parseConcatenatedString(); + return stack.update(Caret.afterValue); + } else if (input.charAt(i) === '\\') { + // handle escaped content like \n or \u2605 + const char = input.charAt(i + 1); + const escapeChar = escapeCharacters[char]; + if (escapeChar !== undefined) { + output.push(input.substring(i, i + 2)); + i += 2; + } else if (char === 'u') { + let j = 2; + while (j < 6 && isHex(input.charAt(i + j))) { + j++; + } + if (j === 6) { + output.push(input.substring(i, i + 6)); + i += 6; + } else if (input.isEnd(i + j)) { + // repair invalid or truncated unicode char at the end of the text + // by removing the unicode char and ending the string here + i += j; + } else { + throwInvalidUnicodeCharacter(); + } + } else { + // repair invalid escape character: remove it + output.push(char); + i += 2; + } + } else { + // handle regular characters + const char = input.charAt(i); + if (char === '"' && input.charAt(i - 1) !== '\\') { + // repair unescaped double quote + output.push(`\\${char}`); + i++; + } else if (isControlCharacter(char)) { + // unescaped control character + output.push(controlCharacters[char]); + i++; + } else { + if (!isValidStringCharacter(char)) { + throwInvalidCharacter(char); + } + output.push(char); + i++; + } + } + if (skipEscapeChars) { + // repair: skipped escape character (nothing to do) + skipEscapeCharacter(); + } + } + } + return false; + } + + /** + * Repair concatenated strings like "hello" + "world", change this into "helloworld" + */ + function parseConcatenatedString() { + let parsed = false; + parseWhitespaceAndSkipComments(); + while (input.charAt(i) === '+') { + parsed = true; + i++; + parseWhitespaceAndSkipComments(); + + // repair: remove the end quote of the first string + output.stripLastOccurrence('"', true); + const start = output.length(); + const parsedStr = parseString(); + if (parsedStr) { + // repair: remove the start quote of the second string + output.remove(start, start + 1); + } else { + // repair: remove the + because it is not followed by a string + output.insertBeforeLastWhitespace('"'); + } + } + return parsed; + } + + /** + * Parse a number like 2.4 or 2.4e6 + */ + function parseNumber() { + const start = i; + if (input.charAt(i) === '-') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(Caret.afterValue); + } + if (!isDigit(input.charAt(i))) { + i = start; + return false; + } + } + + // Note that in JSON leading zeros like "00789" are not allowed. + // We will allow all leading zeros here though and at the end of parseNumber + // check against trailing zeros and repair that if needed. + // Leading zeros can have meaning, so we should not clear them. + while (isDigit(input.charAt(i))) { + i++; + } + if (input.charAt(i) === '.') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(Caret.afterValue); + } + if (!isDigit(input.charAt(i))) { + i = start; + return false; + } + while (isDigit(input.charAt(i))) { + i++; + } + } + if (input.charAt(i) === 'e' || input.charAt(i) === 'E') { + i++; + if (input.charAt(i) === '-' || input.charAt(i) === '+') { + i++; + } + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return stack.update(Caret.afterValue); + } + if (!isDigit(input.charAt(i))) { + i = start; + return false; + } + while (isDigit(input.charAt(i))) { + i++; + } + } + + // if we're not at the end of the number by this point, allow this to be parsed as another type + if (!atEndOfNumber()) { + i = start; + return false; + } + if (i > start) { + // repair a number with leading zeros like "00789" + const num = input.substring(start, i); + const hasInvalidLeadingZero = /^0\d/.test(num); + output.push(hasInvalidLeadingZero ? `"${num}"` : num); + return stack.update(Caret.afterValue); + } + return false; + } + + /** + * Parse keywords true, false, null + * Repair Python keywords True, False, None + */ + function parseKeywords() { + return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') || + // repair Python keywords True, False, None + parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null'); + } + function parseKeyword(name, value) { + if (input.substring(i, i + name.length) === name) { + output.push(value); + i += name.length; + return stack.update(Caret.afterValue); + } + return false; + } + function parseUnquotedKey() { + let end = findNextDelimiter(true, i); + if (end !== null) { + // first, go back to prevent getting trailing whitespaces in the string + while (isWhitespace(input, end - 1) && end > i) { + end--; + } + const symbol = input.substring(i, end); + output.push(JSON.stringify(symbol)); + i = end; + if (input.charAt(i) === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return stack.update(Caret.afterValue); // we do not have a state Caret.afterKey, therefore we use afterValue here + } + return false; + } + function findNextDelimiter(isKey, start) { + // note that the symbol can end with whitespaces: we stop at the next delimiter + // also, note that we allow strings to contain a slash / in order to support repairing regular expressions + let j = start; + while (!input.isEnd(j) && !isUnquotedStringDelimiter(input.charAt(j)) && !isQuote(input.charAt(j)) && (!isKey || input.charAt(j) !== ':')) { + j++; + } + return j > i ? j : null; + } + function prevNonWhitespaceIndex(start) { + let prev = start; + while (prev > 0 && isWhitespace(input, prev)) { + prev--; + } + return prev; + } + function atEndOfNumber() { + return input.isEnd(i) || isDelimiter(input.charAt(i)) || isWhitespace(input, i); + } + function repairNumberEndingWithNumericSymbol(start) { + // repair numbers cut off at the end + // this will only be called when we end after a '.', '-', or 'e' and does not + // change the number more than it needs to make it valid JSON + output.push(`${input.substring(start, i)}0`); + } + function throwInvalidCharacter(char) { + throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i); + } + function throwUnexpectedCharacter() { + throw new JSONRepairError(`Unexpected character ${JSON.stringify(input.charAt(i))}`, i); + } + function throwUnexpectedEnd() { + throw new JSONRepairError('Unexpected end of json string', i); + } + function throwObjectKeyExpected() { + throw new JSONRepairError('Object key expected', i); + } + function throwColonExpected() { + throw new JSONRepairError('Colon expected', i); + } + function throwInvalidUnicodeCharacter() { + const chars = input.substring(i, i + 6); + throw new JSONRepairError(`Invalid unicode character "${chars}"`, i); + } + function atEndOfBlockComment(i) { + return input.charAt(i) === '*' && input.charAt(i + 1) === '/'; + } + return { + transform, + flush + }; +} +//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js.map new file mode 100644 index 0000000000000000000000000000000000000000..60ff7194a5a938d435dabdf9116bf1e2346d1fc5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"core.js","names":["JSONRepairError","isControlCharacter","isDelimiter","isDigit","isDoubleQuote","isDoubleQuoteLike","isFunctionNameChar","isFunctionNameCharStart","isHex","isQuote","isSingleQuote","isSingleQuoteLike","isSpecialWhitespace","isStartOfValue","isUnquotedStringDelimiter","isValidStringCharacter","isWhitespace","isWhitespaceExceptNewline","regexUrlChar","regexUrlStart","createInputBuffer","createOutputBuffer","Caret","createStack","StackType","controlCharacters","escapeCharacters","b","f","n","r","t","jsonrepairCore","_ref","onData","bufferSize","chunkSize","input","output","write","i","iFlushed","stack","flushInputBuffer","flush","transform","chunk","push","currentLength","parse","close","parseWhitespaceAndSkipComments","type","object","caret","beforeKey","skipEllipsis","parseObjectKey","parseUnexpectedColon","parseRepairTrailingComma","parseRepairObjectEndOrComma","beforeValue","parseValue","parseRepairMissingObjectValue","afterValue","parseObjectComma","parseObjectEnd","array","parseRepairArrayEnd","parseArrayComma","parseArrayEnd","parseRepairMissingComma","ndJson","parseRepairNdJsonEnd","functionCall","parseFunctionCallEnd","root","parseRootStart","parseRootEnd","parseObjectStart","parseArrayStart","parseString","parseNumber","parseKeywords","parseRepairUnquotedString","parseRepairRegex","parseCharacter","skipCharacter","update","j","charAt","isEnd","k","findNextDelimiter","test","substring","symbol","JSON","stringify","start","endsWithIgnoringWhitespace","stripLastOccurrence","throwObjectKeyExpected","parseUnexpectedEnd","throwUnexpectedEnd","throwUnexpectedCharacter","parsedKey","parseUnquotedKey","truncatedText","insertBeforeLastWhitespace","throwColonExpected","pop","parseMarkdownCodeBlock","parsedComma","unshift","skipNewline","arguments","length","undefined","changed","parseWhitespace","parseComment","_isWhiteSpace","whitespace","atEndOfBlockComment","blocks","skipMarkdownCodeBlock","block","end","char","skipEscapeCharacter","stopAtDelimiter","stopAtIndex","skipEscapeChars","isEndQuote","iBefore","oBefore","iPrev","prevNonWhitespaceIndex","remove","iQuote","oQuote","parseConcatenatedString","iPrevChar","prevChar","insertAt","escapeChar","throwInvalidUnicodeCharacter","throwInvalidCharacter","parsed","parsedStr","atEndOfNumber","repairNumberEndingWithNumericSymbol","num","hasInvalidLeadingZero","parseKeyword","name","value","isKey","prev","chars"],"sources":["../../../src/streaming/core.ts"],"sourcesContent":["import { JSONRepairError } from '../utils/JSONRepairError.js'\nimport {\n isControlCharacter,\n isDelimiter,\n isDigit,\n isDoubleQuote,\n isDoubleQuoteLike,\n isFunctionNameChar,\n isFunctionNameCharStart,\n isHex,\n isQuote,\n isSingleQuote,\n isSingleQuoteLike,\n isSpecialWhitespace,\n isStartOfValue,\n isUnquotedStringDelimiter,\n isValidStringCharacter,\n isWhitespace,\n isWhitespaceExceptNewline,\n regexUrlChar,\n regexUrlStart\n} from '../utils/stringUtils.js'\nimport { createInputBuffer } from './buffer/InputBuffer.js'\nimport { createOutputBuffer } from './buffer/OutputBuffer.js'\nimport { Caret, createStack, StackType } from './stack.js'\n\nconst controlCharacters: { [key: string]: string } = {\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t'\n}\n\n// map with all escape characters\nconst escapeCharacters: { [key: string]: string } = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\nexport interface JsonRepairCoreOptions {\n onData: (chunk: string) => void\n chunkSize?: number\n bufferSize?: number\n}\n\nexport interface JsonRepairCore {\n transform: (chunk: string) => void\n flush: () => void\n}\n\nexport function jsonrepairCore({\n onData,\n bufferSize = 65536,\n chunkSize = 65536\n}: JsonRepairCoreOptions): JsonRepairCore {\n const input = createInputBuffer()\n\n const output = createOutputBuffer({\n write: onData,\n bufferSize,\n chunkSize\n })\n\n let i = 0\n let iFlushed = 0\n const stack = createStack()\n\n function flushInputBuffer() {\n while (iFlushed < i - bufferSize - chunkSize) {\n iFlushed += chunkSize\n input.flush(iFlushed)\n }\n }\n\n function transform(chunk: string) {\n input.push(chunk)\n\n while (i < input.currentLength() - bufferSize && parse()) {\n // loop until there is nothing more to process\n }\n\n flushInputBuffer()\n }\n\n function flush() {\n input.close()\n\n while (parse()) {\n // loop until there is nothing more to process\n }\n\n output.flush()\n }\n\n function parse(): boolean {\n parseWhitespaceAndSkipComments()\n\n switch (stack.type) {\n case StackType.object: {\n switch (stack.caret) {\n case Caret.beforeKey:\n return (\n skipEllipsis() ||\n parseObjectKey() ||\n parseUnexpectedColon() ||\n parseRepairTrailingComma() ||\n parseRepairObjectEndOrComma()\n )\n case Caret.beforeValue:\n return parseValue() || parseRepairMissingObjectValue()\n case Caret.afterValue:\n return parseObjectComma() || parseObjectEnd() || parseRepairObjectEndOrComma()\n default:\n return false\n }\n }\n\n case StackType.array: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return (\n skipEllipsis() || parseValue() || parseRepairTrailingComma() || parseRepairArrayEnd()\n )\n case Caret.afterValue:\n return (\n parseArrayComma() ||\n parseArrayEnd() ||\n parseRepairMissingComma() ||\n parseRepairArrayEnd()\n )\n default:\n return false\n }\n }\n\n case StackType.ndJson: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseValue() || parseRepairTrailingComma()\n case Caret.afterValue:\n return parseArrayComma() || parseRepairMissingComma() || parseRepairNdJsonEnd()\n default:\n return false\n }\n }\n\n case StackType.functionCall: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseValue()\n case Caret.afterValue:\n return parseFunctionCallEnd()\n default:\n return false\n }\n }\n\n case StackType.root: {\n switch (stack.caret) {\n case Caret.beforeValue:\n return parseRootStart()\n case Caret.afterValue:\n return parseRootEnd()\n default:\n return false\n }\n }\n\n default:\n return false\n }\n }\n\n function parseValue(): boolean {\n return (\n parseObjectStart() ||\n parseArrayStart() ||\n parseString() ||\n parseNumber() ||\n parseKeywords() ||\n parseRepairUnquotedString() ||\n parseRepairRegex()\n )\n }\n\n function parseObjectStart(): boolean {\n if (parseCharacter('{')) {\n parseWhitespaceAndSkipComments()\n\n skipEllipsis()\n\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n if (parseCharacter('}')) {\n return stack.update(Caret.afterValue)\n }\n\n return stack.push(StackType.object, Caret.beforeKey)\n }\n\n return false\n }\n\n function parseArrayStart(): boolean {\n if (parseCharacter('[')) {\n parseWhitespaceAndSkipComments()\n\n skipEllipsis()\n\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments()\n }\n\n if (parseCharacter(']')) {\n return stack.update(Caret.afterValue)\n }\n\n return stack.push(StackType.array, Caret.beforeValue)\n }\n\n return false\n }\n\n function parseRepairUnquotedString(): boolean {\n let j = i\n\n if (isFunctionNameCharStart(input.charAt(j))) {\n while (!input.isEnd(j) && isFunctionNameChar(input.charAt(j))) {\n j++\n }\n\n let k = j\n while (isWhitespace(input, k)) {\n k++\n }\n\n if (input.charAt(k) === '(') {\n // repair a MongoDB function call like NumberLong(\"2\")\n // repair a JSONP function call like callback({...});\n k++\n i = k\n return stack.push(StackType.functionCall, Caret.beforeValue)\n }\n }\n\n j = findNextDelimiter(false, j)\n if (j !== null) {\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (input.charAt(j - 1) === ':' && regexUrlStart.test(input.substring(i, j + 2))) {\n while (!input.isEnd(j) && regexUrlChar.test(input.charAt(j))) {\n j++\n }\n }\n\n const symbol = input.substring(i, j)\n i = j\n\n output.push(symbol === 'undefined' ? 'null' : JSON.stringify(symbol))\n\n if (input.charAt(i) === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseRepairRegex() {\n if (input.charAt(i) === '/') {\n const start = i\n i++\n\n while (!input.isEnd(i) && (input.charAt(i) !== '/' || input.charAt(i - 1) === '\\\\')) {\n i++\n }\n i++\n\n output.push(`\"${input.substring(start, i)}\"`)\n\n return stack.update(Caret.afterValue)\n }\n }\n\n function parseRepairMissingObjectValue(): boolean {\n // repair missing object value\n output.push('null')\n return stack.update(Caret.afterValue)\n }\n\n function parseRepairTrailingComma(): boolean {\n // repair trailing comma\n if (output.endsWithIgnoringWhitespace(',')) {\n output.stripLastOccurrence(',')\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseUnexpectedColon(): boolean {\n if (input.charAt(i) === ':') {\n throwObjectKeyExpected()\n }\n\n return false\n }\n\n function parseUnexpectedEnd(): boolean {\n if (input.isEnd(i)) {\n throwUnexpectedEnd()\n } else {\n throwUnexpectedCharacter()\n }\n\n return false\n }\n\n function parseObjectKey(): boolean {\n const parsedKey = parseString() || parseUnquotedKey()\n if (parsedKey) {\n parseWhitespaceAndSkipComments()\n\n if (parseCharacter(':')) {\n // expect a value after the :\n return stack.update(Caret.beforeValue)\n }\n\n const truncatedText = input.isEnd(i)\n if (isStartOfValue(input.charAt(i)) || truncatedText) {\n // repair missing colon\n output.insertBeforeLastWhitespace(':')\n return stack.update(Caret.beforeValue)\n }\n\n throwColonExpected()\n }\n\n return false\n }\n\n function parseObjectComma(): boolean {\n if (parseCharacter(',')) {\n return stack.update(Caret.beforeKey)\n }\n\n return false\n }\n\n function parseObjectEnd(): boolean {\n if (parseCharacter('}')) {\n return stack.pop()\n }\n\n return false\n }\n\n function parseRepairObjectEndOrComma(): true {\n // repair missing object end and trailing comma\n if (input.charAt(i) === '{') {\n output.stripLastOccurrence(',')\n output.insertBeforeLastWhitespace('}')\n return stack.pop()\n }\n\n // repair missing comma\n if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) {\n output.insertBeforeLastWhitespace(',')\n return stack.update(Caret.beforeKey)\n }\n\n // repair missing closing brace\n output.insertBeforeLastWhitespace('}')\n return stack.pop()\n }\n\n function parseArrayComma(): boolean {\n if (parseCharacter(',')) {\n return stack.update(Caret.beforeValue)\n }\n\n return false\n }\n\n function parseArrayEnd(): boolean {\n if (parseCharacter(']')) {\n return stack.pop()\n }\n\n return false\n }\n\n function parseRepairMissingComma(): boolean {\n // repair missing comma\n if (!input.isEnd(i) && isStartOfValue(input.charAt(i))) {\n output.insertBeforeLastWhitespace(',')\n return stack.update(Caret.beforeValue)\n }\n\n return false\n }\n\n function parseRepairArrayEnd(): true {\n // repair missing closing bracket\n output.insertBeforeLastWhitespace(']')\n return stack.pop()\n }\n\n function parseRepairNdJsonEnd(): boolean {\n if (input.isEnd(i)) {\n output.push('\\n]')\n return stack.pop()\n }\n\n throwUnexpectedEnd()\n return false // just to make TS happy\n }\n\n function parseFunctionCallEnd(): true {\n if (skipCharacter(')')) {\n skipCharacter(';')\n }\n\n return stack.pop()\n }\n\n function parseRootStart(): boolean {\n parseMarkdownCodeBlock(['```', '[```', '{```'])\n\n return parseValue() || parseUnexpectedEnd()\n }\n\n function parseRootEnd(): boolean {\n parseMarkdownCodeBlock(['```', '```]', '```}'])\n\n const parsedComma = parseCharacter(',')\n parseWhitespaceAndSkipComments()\n\n if (\n isStartOfValue(input.charAt(i)) &&\n (output.endsWithIgnoringWhitespace(',') || output.endsWithIgnoringWhitespace('\\n'))\n ) {\n // start of a new value after end of the root level object: looks like\n // newline delimited JSON -> turn into a root level array\n if (!parsedComma) {\n // repair missing comma\n output.insertBeforeLastWhitespace(',')\n }\n\n output.unshift('[\\n')\n\n return stack.push(StackType.ndJson, Caret.beforeValue)\n }\n\n if (parsedComma) {\n // repair: remove trailing comma\n output.stripLastOccurrence(',')\n\n return stack.update(Caret.afterValue)\n }\n\n // repair redundant end braces and brackets\n while (input.charAt(i) === '}' || input.charAt(i) === ']') {\n i++\n parseWhitespaceAndSkipComments()\n }\n\n if (!input.isEnd(i)) {\n throwUnexpectedCharacter()\n }\n\n return false\n }\n\n function parseWhitespaceAndSkipComments(skipNewline = true): boolean {\n const start = i\n\n let changed = parseWhitespace(skipNewline)\n do {\n changed = parseComment()\n if (changed) {\n changed = parseWhitespace(skipNewline)\n }\n } while (changed)\n\n return i > start\n }\n\n function parseWhitespace(skipNewline: boolean): boolean {\n const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline\n let whitespace = ''\n\n while (true) {\n if (_isWhiteSpace(input, i)) {\n whitespace += input.charAt(i)\n i++\n } else if (isSpecialWhitespace(input, i)) {\n // repair special whitespace\n whitespace += ' '\n i++\n } else {\n break\n }\n }\n\n if (whitespace.length > 0) {\n output.push(whitespace)\n return true\n }\n\n return false\n }\n\n function parseComment(): boolean {\n // find a block comment '/* ... */'\n if (input.charAt(i) === '/' && input.charAt(i + 1) === '*') {\n // repair block comment by skipping it\n while (!input.isEnd(i) && !atEndOfBlockComment(i)) {\n i++\n }\n i += 2\n\n return true\n }\n\n // find a line comment '// ...'\n if (input.charAt(i) === '/' && input.charAt(i + 1) === '/') {\n // repair line comment by skipping it\n while (!input.isEnd(i) && input.charAt(i) !== '\\n') {\n i++\n }\n\n return true\n }\n\n return false\n }\n\n function parseMarkdownCodeBlock(blocks: string[]): boolean {\n // find and skip over a Markdown fenced code block:\n // ``` ... ```\n // or\n // ```json ... ```\n if (skipMarkdownCodeBlock(blocks)) {\n if (isFunctionNameCharStart(input.charAt(i))) {\n // strip the optional language specifier like \"json\"\n while (!input.isEnd(i) && isFunctionNameChar(input.charAt(i))) {\n i++\n }\n }\n\n parseWhitespaceAndSkipComments()\n\n return true\n }\n\n return false\n }\n\n function skipMarkdownCodeBlock(blocks: string[]): boolean {\n for (const block of blocks) {\n const end = i + block.length\n if (input.substring(i, end) === block) {\n i = end\n return true\n }\n }\n\n return false\n }\n\n function parseCharacter(char: string): boolean {\n if (input.charAt(i) === char) {\n output.push(input.charAt(i))\n i++\n return true\n }\n\n return false\n }\n\n function skipCharacter(char: string): boolean {\n if (input.charAt(i) === char) {\n i++\n return true\n }\n\n return false\n }\n\n function skipEscapeCharacter(): boolean {\n return skipCharacter('\\\\')\n }\n\n /**\n * Skip ellipsis like \"[1,2,3,...]\" or \"[1,2,3,...,9]\" or \"[...,7,8,9]\"\n * or a similar construct in objects.\n */\n function skipEllipsis(): boolean {\n parseWhitespaceAndSkipComments()\n\n if (input.charAt(i) === '.' && input.charAt(i + 1) === '.' && input.charAt(i + 2) === '.') {\n // repair: remove the ellipsis (three dots) and optionally a comma\n i += 3\n parseWhitespaceAndSkipComments()\n skipCharacter(',')\n\n return true\n }\n\n return false\n }\n\n /**\n * Parse a string enclosed by double quotes \"...\". Can contain escaped quotes\n * Repair strings enclosed in single quotes or special quotes\n * Repair an escaped string\n *\n * The function can run in two stages:\n * - First, it assumes the string has a valid end quote\n * - If it turns out that the string does not have a valid end quote followed\n * by a delimiter (which should be the case), the function runs again in a\n * more conservative way, stopping the string at the first next delimiter\n * and fixing the string by inserting a quote there, or stopping at a\n * stop index detected in the first iteration.\n */\n function parseString(stopAtDelimiter = false, stopAtIndex = -1): boolean {\n let skipEscapeChars = input.charAt(i) === '\\\\'\n if (skipEscapeChars) {\n // repair: remove the first escape character\n i++\n skipEscapeChars = true\n }\n\n if (isQuote(input.charAt(i))) {\n // double quotes are correct JSON,\n // single quotes come from JavaScript for example, we assume it will have a correct single end quote too\n // otherwise, we will match any double-quote-like start with a double-quote-like end,\n // or any single-quote-like start with a single-quote-like end\n const isEndQuote = isDoubleQuote(input.charAt(i))\n ? isDoubleQuote\n : isSingleQuote(input.charAt(i))\n ? isSingleQuote\n : isSingleQuoteLike(input.charAt(i))\n ? isSingleQuoteLike\n : isDoubleQuoteLike\n\n const iBefore = i\n const oBefore = output.length()\n\n output.push('\"')\n i++\n\n while (true) {\n if (input.isEnd(i)) {\n // end of text, we have a missing quote somewhere\n\n const iPrev = prevNonWhitespaceIndex(i - 1)\n if (!stopAtDelimiter && isDelimiter(input.charAt(iPrev))) {\n // if the text ends with a delimiter, like [\"hello],\n // so the missing end quote should be inserted before this delimiter\n // retry parsing the string, stopping at the first next delimiter\n i = iBefore\n output.remove(oBefore)\n\n return parseString(true)\n }\n\n // repair missing quote\n output.insertBeforeLastWhitespace('\"')\n\n return stack.update(Caret.afterValue)\n }\n\n if (i === stopAtIndex) {\n // use the stop index detected in the first iteration, and repair end quote\n output.insertBeforeLastWhitespace('\"')\n\n return stack.update(Caret.afterValue)\n }\n\n if (isEndQuote(input.charAt(i))) {\n // end quote\n // let us check what is before and after the quote to verify whether this is a legit end quote\n const iQuote = i\n const oQuote = output.length()\n output.push('\"')\n i++\n\n parseWhitespaceAndSkipComments(false)\n\n if (\n stopAtDelimiter ||\n input.isEnd(i) ||\n isDelimiter(input.charAt(i)) ||\n isQuote(input.charAt(i)) ||\n isDigit(input.charAt(i))\n ) {\n // The quote is followed by the end of the text, a delimiter, or a next value\n // so the quote is indeed the end of the string\n parseConcatenatedString()\n\n return stack.update(Caret.afterValue)\n }\n\n const iPrevChar = prevNonWhitespaceIndex(iQuote - 1)\n const prevChar = input.charAt(iPrevChar)\n\n if (prevChar === ',') {\n // A comma followed by a quote, like '{\"a\":\"b,c,\"d\":\"e\"}'.\n // We assume that the quote is a start quote, and that the end quote\n // should have been located right before the comma but is missing.\n i = iBefore\n output.remove(oBefore)\n\n return parseString(false, iPrevChar)\n }\n\n if (isDelimiter(prevChar)) {\n // This is not the right end quote: it is preceded by a delimiter,\n // and NOT followed by a delimiter. So, there is an end quote missing\n // parse the string again and then stop at the first next delimiter\n i = iBefore\n output.remove(oBefore)\n\n return parseString(true)\n }\n\n // revert to right after the quote but before any whitespace, and continue parsing the string\n output.remove(oQuote + 1)\n i = iQuote + 1\n\n // repair unescaped quote\n output.insertAt(oQuote, '\\\\')\n } else if (stopAtDelimiter && isUnquotedStringDelimiter(input.charAt(i))) {\n // we're in the mode to stop the string at the first delimiter\n // because there is an end quote missing\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (\n input.charAt(i - 1) === ':' &&\n regexUrlStart.test(input.substring(iBefore + 1, i + 2))\n ) {\n while (!input.isEnd(i) && regexUrlChar.test(input.charAt(i))) {\n output.push(input.charAt(i))\n i++\n }\n }\n\n // repair missing quote\n output.insertBeforeLastWhitespace('\"')\n\n parseConcatenatedString()\n\n return stack.update(Caret.afterValue)\n } else if (input.charAt(i) === '\\\\') {\n // handle escaped content like \\n or \\u2605\n const char = input.charAt(i + 1)\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n output.push(input.substring(i, i + 2))\n i += 2\n } else if (char === 'u') {\n let j = 2\n while (j < 6 && isHex(input.charAt(i + j))) {\n j++\n }\n\n if (j === 6) {\n output.push(input.substring(i, i + 6))\n i += 6\n } else if (input.isEnd(i + j)) {\n // repair invalid or truncated unicode char at the end of the text\n // by removing the unicode char and ending the string here\n i += j\n } else {\n throwInvalidUnicodeCharacter()\n }\n } else {\n // repair invalid escape character: remove it\n output.push(char)\n i += 2\n }\n } else {\n // handle regular characters\n const char = input.charAt(i)\n\n if (char === '\"' && input.charAt(i - 1) !== '\\\\') {\n // repair unescaped double quote\n output.push(`\\\\${char}`)\n i++\n } else if (isControlCharacter(char)) {\n // unescaped control character\n output.push(controlCharacters[char])\n i++\n } else {\n if (!isValidStringCharacter(char)) {\n throwInvalidCharacter(char)\n }\n output.push(char)\n i++\n }\n }\n\n if (skipEscapeChars) {\n // repair: skipped escape character (nothing to do)\n skipEscapeCharacter()\n }\n }\n }\n\n return false\n }\n\n /**\n * Repair concatenated strings like \"hello\" + \"world\", change this into \"helloworld\"\n */\n function parseConcatenatedString(): boolean {\n let parsed = false\n\n parseWhitespaceAndSkipComments()\n while (input.charAt(i) === '+') {\n parsed = true\n i++\n parseWhitespaceAndSkipComments()\n\n // repair: remove the end quote of the first string\n output.stripLastOccurrence('\"', true)\n const start = output.length()\n const parsedStr = parseString()\n if (parsedStr) {\n // repair: remove the start quote of the second string\n output.remove(start, start + 1)\n } else {\n // repair: remove the + because it is not followed by a string\n output.insertBeforeLastWhitespace('\"')\n }\n }\n\n return parsed\n }\n\n /**\n * Parse a number like 2.4 or 2.4e6\n */\n function parseNumber(): boolean {\n const start = i\n if (input.charAt(i) === '-') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n }\n\n // Note that in JSON leading zeros like \"00789\" are not allowed.\n // We will allow all leading zeros here though and at the end of parseNumber\n // check against trailing zeros and repair that if needed.\n // Leading zeros can have meaning, so we should not clear them.\n while (isDigit(input.charAt(i))) {\n i++\n }\n\n if (input.charAt(i) === '.') {\n i++\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n while (isDigit(input.charAt(i))) {\n i++\n }\n }\n\n if (input.charAt(i) === 'e' || input.charAt(i) === 'E') {\n i++\n if (input.charAt(i) === '-' || input.charAt(i) === '+') {\n i++\n }\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start)\n return stack.update(Caret.afterValue)\n }\n if (!isDigit(input.charAt(i))) {\n i = start\n return false\n }\n while (isDigit(input.charAt(i))) {\n i++\n }\n }\n\n // if we're not at the end of the number by this point, allow this to be parsed as another type\n if (!atEndOfNumber()) {\n i = start\n return false\n }\n\n if (i > start) {\n // repair a number with leading zeros like \"00789\"\n const num = input.substring(start, i)\n const hasInvalidLeadingZero = /^0\\d/.test(num)\n\n output.push(hasInvalidLeadingZero ? `\"${num}\"` : num)\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n /**\n * Parse keywords true, false, null\n * Repair Python keywords True, False, None\n */\n function parseKeywords(): boolean {\n return (\n parseKeyword('true', 'true') ||\n parseKeyword('false', 'false') ||\n parseKeyword('null', 'null') ||\n // repair Python keywords True, False, None\n parseKeyword('True', 'true') ||\n parseKeyword('False', 'false') ||\n parseKeyword('None', 'null')\n )\n }\n\n function parseKeyword(name: string, value: string): boolean {\n if (input.substring(i, i + name.length) === name) {\n output.push(value)\n i += name.length\n return stack.update(Caret.afterValue)\n }\n\n return false\n }\n\n function parseUnquotedKey(): boolean {\n let end = findNextDelimiter(true, i)\n\n if (end !== null) {\n // first, go back to prevent getting trailing whitespaces in the string\n while (isWhitespace(input, end - 1) && end > i) {\n end--\n }\n\n const symbol = input.substring(i, end)\n output.push(JSON.stringify(symbol))\n i = end\n\n if (input.charAt(i) === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++\n }\n\n return stack.update(Caret.afterValue) // we do not have a state Caret.afterKey, therefore we use afterValue here\n }\n\n return false\n }\n\n function findNextDelimiter(isKey: boolean, start: number): number | null {\n // note that the symbol can end with whitespaces: we stop at the next delimiter\n // also, note that we allow strings to contain a slash / in order to support repairing regular expressions\n let j = start\n while (\n !input.isEnd(j) &&\n !isUnquotedStringDelimiter(input.charAt(j)) &&\n !isQuote(input.charAt(j)) &&\n (!isKey || input.charAt(j) !== ':')\n ) {\n j++\n }\n\n return j > i ? j : null\n }\n\n function prevNonWhitespaceIndex(start: number): number {\n let prev = start\n\n while (prev > 0 && isWhitespace(input, prev)) {\n prev--\n }\n\n return prev\n }\n\n function atEndOfNumber() {\n return input.isEnd(i) || isDelimiter(input.charAt(i)) || isWhitespace(input, i)\n }\n\n function repairNumberEndingWithNumericSymbol(start: number) {\n // repair numbers cut off at the end\n // this will only be called when we end after a '.', '-', or 'e' and does not\n // change the number more than it needs to make it valid JSON\n output.push(`${input.substring(start, i)}0`)\n }\n\n function throwInvalidCharacter(char: string) {\n throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i)\n }\n\n function throwUnexpectedCharacter() {\n throw new JSONRepairError(`Unexpected character ${JSON.stringify(input.charAt(i))}`, i)\n }\n\n function throwUnexpectedEnd() {\n throw new JSONRepairError('Unexpected end of json string', i)\n }\n\n function throwObjectKeyExpected() {\n throw new JSONRepairError('Object key expected', i)\n }\n\n function throwColonExpected() {\n throw new JSONRepairError('Colon expected', i)\n }\n\n function throwInvalidUnicodeCharacter() {\n const chars = input.substring(i, i + 6)\n throw new JSONRepairError(`Invalid unicode character \"${chars}\"`, i)\n }\n\n function atEndOfBlockComment(i: number) {\n return input.charAt(i) === '*' && input.charAt(i + 1) === '/'\n }\n\n return {\n transform,\n flush\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SACEC,kBAAkB,EAClBC,WAAW,EACXC,OAAO,EACPC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB,EAClBC,uBAAuB,EACvBC,KAAK,EACLC,OAAO,EACPC,aAAa,EACbC,iBAAiB,EACjBC,mBAAmB,EACnBC,cAAc,EACdC,yBAAyB,EACzBC,sBAAsB,EACtBC,YAAY,EACZC,yBAAyB,EACzBC,YAAY,EACZC,aAAa,QACR,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,KAAK,EAAEC,WAAW,EAAEC,SAAS,QAAQ,YAAY;AAE1D,MAAMC,iBAA4C,GAAG;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A,SAAS8D,sBAAsBA,CAAA,EAAG;IAChC,MAAM,IAAItG,eAAe,CAAC,qBAAqB,EAAEwC,CAAC,CAAC;EACrD;EAEA,SAASsE,kBAAkBA,CAAA,EAAG;IAC5B,MAAM,IAAI9G,eAAe,CAAC,gBAAgB,EAAEwC,CAAC,CAAC;EAChD;EAEA,SAAS2G,4BAA4BA,CAAA,EAAG;IACtC,MAAMa,KAAK,GAAG3H,KAAK,CAAC0D,SAAS,CAACvD,CAAC,EAAEA,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,IAAIxC,eAAe,CAAC,8BAA8BgK,KAAK,GAAG,EAAExH,CAAC,CAAC;EACtE;EAEA,SAASoF,mBAAmBA,CAACpF,CAAS,EAAE;IACtC,OAAOH,KAAK,CAACqD,MAAM,CAAClD,CAAC,CAAC,KAAK,GAAG,IAAIH,KAAK,CAACqD,MAAM,CAAClD,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;EAC/D;EAEA,OAAO;IACLK,SAAS;IACTD;EACF,CAAC;AACH","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js new file mode 100644 index 0000000000000000000000000000000000000000..9cd665e56547aae115ca07589bb7c3b7e956da1d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js @@ -0,0 +1,44 @@ +export let Caret = /*#__PURE__*/function (Caret) { + Caret["beforeValue"] = "beforeValue"; + Caret["afterValue"] = "afterValue"; + Caret["beforeKey"] = "beforeKey"; + return Caret; +}({}); +export let StackType = /*#__PURE__*/function (StackType) { + StackType["root"] = "root"; + StackType["object"] = "object"; + StackType["array"] = "array"; + StackType["ndJson"] = "ndJson"; + StackType["functionCall"] = "dataType"; + return StackType; +}({}); +export function createStack() { + const stack = [StackType.root]; + let caret = Caret.beforeValue; + return { + get type() { + return last(stack); + }, + get caret() { + return caret; + }, + pop() { + stack.pop(); + caret = Caret.afterValue; + return true; + }, + push(type, newCaret) { + stack.push(type); + caret = newCaret; + return true; + }, + update(newCaret) { + caret = newCaret; + return true; + } + }; +} +function last(array) { + return array[array.length - 1]; +} +//# sourceMappingURL=stack.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js.map new file mode 100644 index 0000000000000000000000000000000000000000..945c44a0a227f1dfd862752fa4b492c36193bbc7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stack.js","names":["Caret","StackType","createStack","stack","root","caret","beforeValue","type","last","pop","afterValue","push","newCaret","update","array","length"],"sources":["../../../src/streaming/stack.ts"],"sourcesContent":["export enum Caret {\n beforeValue = 'beforeValue',\n afterValue = 'afterValue',\n beforeKey = 'beforeKey'\n}\n\nexport enum StackType {\n root = 'root',\n object = 'object',\n array = 'array',\n ndJson = 'ndJson',\n functionCall = 'dataType'\n}\n\nexport function createStack() {\n const stack: StackType[] = [StackType.root]\n let caret = Caret.beforeValue\n\n return {\n get type() {\n return last(stack)\n },\n\n get caret() {\n return caret\n },\n\n pop(): true {\n stack.pop()\n caret = Caret.afterValue\n\n return true\n },\n\n push(type: StackType, newCaret: Caret): true {\n stack.push(type)\n caret = newCaret\n\n return true\n },\n\n update(newCaret: Caret): true {\n caret = newCaret\n\n return true\n }\n }\n}\n\nfunction last(array: T[]): T | undefined {\n return array[array.length - 1]\n}\n"],"mappings":"AAAA,WAAYA,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAMjB,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAQrB,OAAO,SAASC,WAAWA,CAAA,EAAG;EAC5B,MAAMC,KAAkB,GAAG,CAACF,SAAS,CAACG,IAAI,CAAC;EAC3C,IAAIC,KAAK,GAAGL,KAAK,CAACM,WAAW;EAE7B,OAAO;IACL,IAAIC,IAAIA,CAAA,EAAG;MACT,OAAOC,IAAI,CAACL,KAAK,CAAC;IACpB,CAAC;IAED,IAAIE,KAAKA,CAAA,EAAG;MACV,OAAOA,KAAK;IACd,CAAC;IAEDI,GAAGA,CAAA,EAAS;MACVN,KAAK,CAACM,GAAG,CAAC,CAAC;MACXJ,KAAK,GAAGL,KAAK,CAACU,UAAU;MAExB,OAAO,IAAI;IACb,CAAC;IAEDC,IAAIA,CAACJ,IAAe,EAAEK,QAAe,EAAQ;MAC3CT,KAAK,CAACQ,IAAI,CAACJ,IAAI,CAAC;MAChBF,KAAK,GAAGO,QAAQ;MAEhB,OAAO,IAAI;IACb,CAAC;IAEDC,MAAMA,CAACD,QAAe,EAAQ;MAC5BP,KAAK,GAAGO,QAAQ;MAEhB,OAAO,IAAI;IACb;EACF,CAAC;AACH;AAEA,SAASJ,IAAIA,CAAIM,KAAU,EAAiB;EAC1C,OAAOA,KAAK,CAACA,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC;AAChC","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js new file mode 100644 index 0000000000000000000000000000000000000000..d52333711746fbb6f3d530857a09cc8bf8f10c29 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js @@ -0,0 +1,31 @@ +import { Transform } from 'node:stream'; +import { jsonrepairCore } from './core.js'; +export function jsonrepairTransform(options) { + const repair = jsonrepairCore({ + onData: chunk => transform.push(chunk), + bufferSize: options?.bufferSize, + chunkSize: options?.chunkSize + }); + const transform = new Transform({ + transform(chunk, _encoding, callback) { + try { + repair.transform(chunk.toString()); + } catch (err) { + this.emit('error', err); + } finally { + callback(); + } + }, + flush(callback) { + try { + repair.flush(); + } catch (err) { + this.emit('error', err); + } finally { + callback(); + } + } + }); + return transform; +} +//# sourceMappingURL=stream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..14f1e9d2462f05c5d7f4924637db3afa09120a56 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/streaming/stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.js","names":["Transform","jsonrepairCore","jsonrepairTransform","options","repair","onData","chunk","transform","push","bufferSize","chunkSize","_encoding","callback","toString","err","emit","flush"],"sources":["../../../src/streaming/stream.ts"],"sourcesContent":["import { Transform } from 'node:stream'\nimport { jsonrepairCore } from './core.js'\n\nexport interface JsonRepairTransformOptions {\n chunkSize?: number\n bufferSize?: number\n}\n\nexport function jsonrepairTransform(options?: JsonRepairTransformOptions): Transform {\n const repair = jsonrepairCore({\n onData: (chunk) => transform.push(chunk),\n bufferSize: options?.bufferSize,\n chunkSize: options?.chunkSize\n })\n\n const transform = new Transform({\n transform(chunk, _encoding, callback) {\n try {\n repair.transform(chunk.toString())\n } catch (err) {\n this.emit('error', err)\n } finally {\n callback()\n }\n },\n\n flush(callback) {\n try {\n repair.flush()\n } catch (err) {\n this.emit('error', err)\n } finally {\n callback()\n }\n }\n })\n\n return transform\n}\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,aAAa;AACvC,SAASC,cAAc,QAAQ,WAAW;AAO1C,OAAO,SAASC,mBAAmBA,CAACC,OAAoC,EAAa;EACnF,MAAMC,MAAM,GAAGH,cAAc,CAAC;IAC5BI,MAAM,EAAGC,KAAK,IAAKC,SAAS,CAACC,IAAI,CAACF,KAAK,CAAC;IACxCG,UAAU,EAAEN,OAAO,EAAEM,UAAU;IAC/BC,SAAS,EAAEP,OAAO,EAAEO;EACtB,CAAC,CAAC;EAEF,MAAMH,SAAS,GAAG,IAAIP,SAAS,CAAC;IAC9BO,SAASA,CAACD,KAAK,EAAEK,SAAS,EAAEC,QAAQ,EAAE;MACpC,IAAI;QACFR,MAAM,CAACG,SAAS,CAACD,KAAK,CAACO,QAAQ,CAAC,CAAC,CAAC;MACpC,CAAC,CAAC,OAAOC,GAAG,EAAE;QACZ,IAAI,CAACC,IAAI,CAAC,OAAO,EAAED,GAAG,CAAC;MACzB,CAAC,SAAS;QACRF,QAAQ,CAAC,CAAC;MACZ;IACF,CAAC;IAEDI,KAAKA,CAACJ,QAAQ,EAAE;MACd,IAAI;QACFR,MAAM,CAACY,KAAK,CAAC,CAAC;MAChB,CAAC,CAAC,OAAOF,GAAG,EAAE;QACZ,IAAI,CAACC,IAAI,CAAC,OAAO,EAAED,GAAG,CAAC;MACzB,CAAC,SAAS;QACRF,QAAQ,CAAC,CAAC;MACZ;IACF;EACF,CAAC,CAAC;EAEF,OAAOL,SAAS;AAClB","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js new file mode 100644 index 0000000000000000000000000000000000000000..0631aa571a2985ef8e436531a24d3ab378d91130 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js @@ -0,0 +1,7 @@ +export class JSONRepairError extends Error { + constructor(message, position) { + super(`${message} at position ${position}`); + this.position = position; + } +} +//# sourceMappingURL=JSONRepairError.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3dcf1a79e34dbbe94e6e3ef1c72521dfe4fb2738 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"JSONRepairError.js","names":["JSONRepairError","Error","constructor","message","position"],"sources":["../../../src/utils/JSONRepairError.ts"],"sourcesContent":["export class JSONRepairError extends Error {\n position: number\n\n constructor(message: string, position: number) {\n super(`${message} at position ${position}`)\n\n this.position = position\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,eAAe,SAASC,KAAK,CAAC;EAGzCC,WAAWA,CAACC,OAAe,EAAEC,QAAgB,EAAE;IAC7C,KAAK,CAAC,GAAGD,OAAO,gBAAgBC,QAAQ,EAAE,CAAC;IAE3C,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;AACF","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..9482762a12dd7eefc21b97bcb54a0e44e5fc6dcf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js @@ -0,0 +1,147 @@ +const codeSpace = 0x20; // " " +const codeNewline = 0xa; // "\n" +const codeTab = 0x9; // "\t" +const codeReturn = 0xd; // "\r" +const codeNonBreakingSpace = 0xa0; +const codeEnQuad = 0x2000; +const codeHairSpace = 0x200a; +const codeNarrowNoBreakSpace = 0x202f; +const codeMediumMathematicalSpace = 0x205f; +const codeIdeographicSpace = 0x3000; +export function isHex(char) { + return /^[0-9A-Fa-f]$/.test(char); +} +export function isDigit(char) { + return char >= '0' && char <= '9'; +} +export function isValidStringCharacter(char) { + // note that the valid range is between \u{0020} and \u{10ffff}, + // but in JavaScript it is not possible to create a code point larger than + // \u{10ffff}, so there is no need to test for that here. + return char >= '\u0020'; +} +export function isDelimiter(char) { + return ',:[]/{}()\n+'.includes(char); +} +export function isFunctionNameCharStart(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$'; +} +export function isFunctionNameChar(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$' || char >= '0' && char <= '9'; +} + +// matches "https://" and other schemas +export const regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\/\/$/; + +// matches all valid URL characters EXCEPT "[", "]", and ",", since that are important JSON delimiters +export const regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/; +export function isUnquotedStringDelimiter(char) { + return ',[]/{}\n+'.includes(char); +} +export function isStartOfValue(char) { + return isQuote(char) || regexStartOfValue.test(char); +} + +// alpha, number, minus, or opening bracket or brace +const regexStartOfValue = /^[[{\w-]$/; +export function isControlCharacter(char) { + return char === '\n' || char === '\r' || char === '\t' || char === '\b' || char === '\f'; +} +/** + * Check if the given character is a whitespace character like space, tab, or + * newline + */ +export function isWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn; +} + +/** + * Check if the given character is a whitespace character like space or tab, + * but NOT a newline + */ +export function isWhitespaceExceptNewline(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeTab || code === codeReturn; +} + +/** + * Check if the given character is a special whitespace character, some + * unicode variant + */ +export function isSpecialWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeNonBreakingSpace || code >= codeEnQuad && code <= codeHairSpace || code === codeNarrowNoBreakSpace || code === codeMediumMathematicalSpace || code === codeIdeographicSpace; +} + +/** + * Test whether the given character is a quote or double quote character. + * Also tests for special variants of quotes. + */ +export function isQuote(char) { + // the first check double quotes, since that occurs most often + return isDoubleQuoteLike(char) || isSingleQuoteLike(char); +} + +/** + * Test whether the given character is a double quote character. + * Also tests for special variants of double quotes. + */ +export function isDoubleQuoteLike(char) { + return char === '"' || char === '\u201c' || char === '\u201d'; +} + +/** + * Test whether the given character is a double quote character. + * Does NOT test for special variants of double quotes. + */ +export function isDoubleQuote(char) { + return char === '"'; +} + +/** + * Test whether the given character is a single quote character. + * Also tests for special variants of single quotes. + */ +export function isSingleQuoteLike(char) { + return char === "'" || char === '\u2018' || char === '\u2019' || char === '\u0060' || char === '\u00b4'; +} + +/** + * Test whether the given character is a single quote character. + * Does NOT test for special variants of single quotes. + */ +export function isSingleQuote(char) { + return char === "'"; +} + +/** + * Strip last occurrence of textToStrip from text + */ +export function stripLastOccurrence(text, textToStrip) { + let stripRemainingText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + const index = text.lastIndexOf(textToStrip); + return index !== -1 ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1)) : text; +} +export function insertBeforeLastWhitespace(text, textToInsert) { + let index = text.length; + if (!isWhitespace(text, index - 1)) { + // no trailing whitespaces + return text + textToInsert; + } + while (isWhitespace(text, index - 1)) { + index--; + } + return text.substring(0, index) + textToInsert + text.substring(index); +} +export function removeAtIndex(text, start, count) { + return text.substring(0, start) + text.substring(start + count); +} + +/** + * Test whether a string ends with a newline or comma character and optional whitespace + */ +export function endsWithCommaOrNewline(text) { + return /[,\n][ \t\r]*$/.test(text); +} +//# sourceMappingURL=stringUtils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f5c677cc02b4497c0e977d3fd31d22690ade2438 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/esm/utils/stringUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stringUtils.js","names":["codeSpace","codeNewline","codeTab","codeReturn","codeNonBreakingSpace","codeEnQuad","codeHairSpace","codeNarrowNoBreakSpace","codeMediumMathematicalSpace","codeIdeographicSpace","isHex","char","test","isDigit","isValidStringCharacter","isDelimiter","includes","isFunctionNameCharStart","isFunctionNameChar","regexUrlStart","regexUrlChar","isUnquotedStringDelimiter","isStartOfValue","isQuote","regexStartOfValue","isControlCharacter","isWhitespace","text","index","code","charCodeAt","isWhitespaceExceptNewline","isSpecialWhitespace","isDoubleQuoteLike","isSingleQuoteLike","isDoubleQuote","isSingleQuote","stripLastOccurrence","textToStrip","stripRemainingText","arguments","length","undefined","lastIndexOf","substring","insertBeforeLastWhitespace","textToInsert","removeAtIndex","start","count","endsWithCommaOrNewline"],"sources":["../../../src/utils/stringUtils.ts"],"sourcesContent":["const codeSpace = 0x20 // \" \"\nconst codeNewline = 0xa // \"\\n\"\nconst codeTab = 0x9 // \"\\t\"\nconst codeReturn = 0xd // \"\\r\"\nconst codeNonBreakingSpace = 0xa0\nconst codeEnQuad = 0x2000\nconst codeHairSpace = 0x200a\nconst codeNarrowNoBreakSpace = 0x202f\nconst codeMediumMathematicalSpace = 0x205f\nconst codeIdeographicSpace = 0x3000\n\nexport function isHex(char: string): boolean {\n return /^[0-9A-Fa-f]$/.test(char)\n}\n\nexport function isDigit(char: string): boolean {\n return char >= '0' && char <= '9'\n}\n\nexport function isValidStringCharacter(char: string): boolean {\n // note that the valid range is between \\u{0020} and \\u{10ffff},\n // but in JavaScript it is not possible to create a code point larger than\n // \\u{10ffff}, so there is no need to test for that here.\n return char >= '\\u0020'\n}\n\nexport function isDelimiter(char: string): boolean {\n return ',:[]/{}()\\n+'.includes(char)\n}\n\nexport function isFunctionNameCharStart(char: string) {\n return (\n (char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || char === '_' || char === '$'\n )\n}\n\nexport function isFunctionNameChar(char: string) {\n return (\n (char >= 'a' && char <= 'z') ||\n (char >= 'A' && char <= 'Z') ||\n char === '_' ||\n char === '$' ||\n (char >= '0' && char <= '9')\n )\n}\n\n// matches \"https://\" and other schemas\nexport const regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\\/\\/$/\n\n// matches all valid URL characters EXCEPT \"[\", \"]\", and \",\", since that are important JSON delimiters\nexport const regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/\n\nexport function isUnquotedStringDelimiter(char: string): boolean {\n return ',[]/{}\\n+'.includes(char)\n}\n\nexport function isStartOfValue(char: string): boolean {\n return isQuote(char) || regexStartOfValue.test(char)\n}\n\n// alpha, number, minus, or opening bracket or brace\nconst regexStartOfValue = /^[[{\\w-]$/\n\nexport function isControlCharacter(char: string) {\n return char === '\\n' || char === '\\r' || char === '\\t' || char === '\\b' || char === '\\f'\n}\n\nexport interface Text {\n charCodeAt: (index: number) => number\n}\n\n/**\n * Check if the given character is a whitespace character like space, tab, or\n * newline\n */\nexport function isWhitespace(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn\n}\n\n/**\n * Check if the given character is a whitespace character like space or tab,\n * but NOT a newline\n */\nexport function isWhitespaceExceptNewline(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return code === codeSpace || code === codeTab || code === codeReturn\n}\n\n/**\n * Check if the given character is a special whitespace character, some\n * unicode variant\n */\nexport function isSpecialWhitespace(text: Text, index: number): boolean {\n const code = text.charCodeAt(index)\n\n return (\n code === codeNonBreakingSpace ||\n (code >= codeEnQuad && code <= codeHairSpace) ||\n code === codeNarrowNoBreakSpace ||\n code === codeMediumMathematicalSpace ||\n code === codeIdeographicSpace\n )\n}\n\n/**\n * Test whether the given character is a quote or double quote character.\n * Also tests for special variants of quotes.\n */\nexport function isQuote(char: string): boolean {\n // the first check double quotes, since that occurs most often\n return isDoubleQuoteLike(char) || isSingleQuoteLike(char)\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Also tests for special variants of double quotes.\n */\nexport function isDoubleQuoteLike(char: string): boolean {\n return char === '\"' || char === '\\u201c' || char === '\\u201d'\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Does NOT test for special variants of double quotes.\n */\nexport function isDoubleQuote(char: string): boolean {\n return char === '\"'\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Also tests for special variants of single quotes.\n */\nexport function isSingleQuoteLike(char: string): boolean {\n return (\n char === \"'\" || char === '\\u2018' || char === '\\u2019' || char === '\\u0060' || char === '\\u00b4'\n )\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Does NOT test for special variants of single quotes.\n */\nexport function isSingleQuote(char: string): boolean {\n return char === \"'\"\n}\n\n/**\n * Strip last occurrence of textToStrip from text\n */\nexport function stripLastOccurrence(\n text: string,\n textToStrip: string,\n stripRemainingText = false\n): string {\n const index = text.lastIndexOf(textToStrip)\n return index !== -1\n ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1))\n : text\n}\n\nexport function insertBeforeLastWhitespace(text: string, textToInsert: string): string {\n let index = text.length\n\n if (!isWhitespace(text, index - 1)) {\n // no trailing whitespaces\n return text + textToInsert\n }\n\n while (isWhitespace(text, index - 1)) {\n index--\n }\n\n return text.substring(0, index) + textToInsert + text.substring(index)\n}\n\nexport function removeAtIndex(text: string, start: number, count: number) {\n return text.substring(0, start) + text.substring(start + count)\n}\n\n/**\n * Test whether a string ends with a newline or comma character and optional whitespace\n */\nexport function endsWithCommaOrNewline(text: string): boolean {\n return /[,\\n][ \\t\\r]*$/.test(text)\n}\n"],"mappings":"AAAA,MAAMA,SAAS,GAAG,IAAI,EAAC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AAG,EAAE,GAAGZ,IAAI,CAACiB,SAAS,CAAChB,KAAK,GAAG,CAAC,CAAC,CAAC,GAChFD,IAAI;AACV;AAEA,OAAO,SAASkB,0BAA0BA,CAAClB,IAAY,EAAEmB,YAAoB,EAAU;EACrF,IAAIlB,KAAK,GAAGD,IAAI,CAACc,MAAM;EAEvB,IAAI,CAACf,YAAY,CAACC,IAAI,EAAEC,KAAK,GAAG,CAAC,CAAC,EAAE;IAClC;IACA,OAAOD,IAAI,GAAGmB,YAAY;EAC5B;EAEA,OAAOpB,YAAY,CAACC,IAAI,EAAEC,KAAK,GAAG,CAAC,CAAC,EAAE;IACpCA,KAAK,EAAE;EACT;EAEA,OAAOD,IAAI,CAACiB,SAAS,CAAC,CAAC,EAAEhB,KAAK,CAAC,GAAGkB,YAAY,GAAGnB,IAAI,CAACiB,SAAS,CAAChB,KAAK,CAAC;AACxE;AAEA,OAAO,SAASmB,aAAaA,CAACpB,IAAY,EAAEqB,KAAa,EAAEC,KAAa,EAAE;EACxE,OAAOtB,IAAI,CAACiB,SAAS,CAAC,CAAC,EAAEI,KAAK,CAAC,GAAGrB,IAAI,CAACiB,SAAS,CAACI,KAAK,GAAGC,KAAK,CAAC;AACjE;;AAEA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACvB,IAAY,EAAW;EAC5D,OAAO,gBAAgB,CAACf,IAAI,CAACe,IAAI,CAAC;AACpC","ignoreList":[]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..88f8fea1b65f636c916fabd5b9ae5b088171b88e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts @@ -0,0 +1,3 @@ +export { jsonrepair } from './regular/jsonrepair.js'; +export { JSONRepairError } from './utils/JSONRepairError.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b02ff6c537f9485dfcdeb1b1c08646b4282c7313 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c746fa45e84b2fcc95396bc7678256f6e014166 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts @@ -0,0 +1,18 @@ +/** + * Repair a string containing an invalid JSON document. + * For example changes JavaScript notation into JSON notation. + * + * Example: + * + * try { + * const json = "{name: 'John'}" + * const repaired = jsonrepair(json) + * console.log(repaired) + * // '{"name": "John"}' + * } catch (err) { + * console.error(err) + * } + * + */ +export declare function jsonrepair(text: string): string; +//# sourceMappingURL=jsonrepair.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..4e79ddcdaa01be63be53d48cbac2b3d3f9848c31 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/regular/jsonrepair.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonrepair.d.ts","sourceRoot":"","sources":["../../../src/regular/jsonrepair.ts"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAm0B/C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..714a13bfa7b54421acf263b91d69bf9464139c9d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts @@ -0,0 +1,2 @@ +export { type JsonRepairTransformOptions, jsonrepairTransform } from './streaming/stream.js'; +//# sourceMappingURL=stream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1eba06f7c9fa13196365b7b7b4c47b8941562998 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/stream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../src/stream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c53b92476af1390ae4163beb88a19086b02bfe1d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts @@ -0,0 +1,14 @@ +export interface InputBuffer { + push: (chunk: string) => void; + flush: (position: number) => void; + charAt: (index: number) => string; + charCodeAt: (index: number) => number; + substring: (start: number, end: number) => string; + length: () => number; + currentLength: () => number; + currentBufferSize: () => number; + isEnd: (index: number) => boolean; + close: () => void; +} +export declare function createInputBuffer(): InputBuffer; +//# sourceMappingURL=InputBuffer.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..4b20a4b08f51c682c04c3dd1ed273620a847c059 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/InputBuffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"InputBuffer.d.ts","sourceRoot":"","sources":["../../../../src/streaming/buffer/InputBuffer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACjC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IACjD,MAAM,EAAE,MAAM,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,MAAM,CAAA;IAC3B,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IACjC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAmF/C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff2abe16274942bdabf8f4e2e89d7bddca3d658a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts @@ -0,0 +1,18 @@ +export interface OutputBuffer { + push: (text: string) => void; + unshift: (text: string) => void; + remove: (start: number, end?: number) => void; + insertAt: (index: number, text: string) => void; + length: () => number; + flush: () => void; + stripLastOccurrence: (textToStrip: string, stripRemainingText?: boolean) => void; + insertBeforeLastWhitespace: (textToInsert: string) => void; + endsWithIgnoringWhitespace: (char: string) => boolean; +} +export interface OutputBufferOptions { + write: (chunk: string) => void; + chunkSize: number; + bufferSize: number; +} +export declare function createOutputBuffer({ write, chunkSize, bufferSize }: OutputBufferOptions): OutputBuffer; +//# sourceMappingURL=OutputBuffer.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..16bc55d190f1f9f45d96190e9f93116f05a1aa8f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/buffer/OutputBuffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"OutputBuffer.d.ts","sourceRoot":"","sources":["../../../../src/streaming/buffer/OutputBuffer.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,MAAM,EAAE,MAAM,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAChF,0BAA0B,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,0BAA0B,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CACtD;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,SAAS,EACT,UAAU,EACX,EAAE,mBAAmB,GAAG,YAAY,CA6HpC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0040a4857daf07db67ce7cb3148c7006b0b6e381 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts @@ -0,0 +1,11 @@ +export interface JsonRepairCoreOptions { + onData: (chunk: string) => void; + chunkSize?: number; + bufferSize?: number; +} +export interface JsonRepairCore { + transform: (chunk: string) => void; + flush: () => void; +} +export declare function jsonrepairCore({ onData, bufferSize, chunkSize }: JsonRepairCoreOptions): JsonRepairCore; +//# sourceMappingURL=core.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..be169f81acc886508f45b8673ba1a210c9ce040f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/core.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/streaming/core.ts"],"names":[],"mappings":"AA+CA,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,UAAkB,EAClB,SAAiB,EAClB,EAAE,qBAAqB,GAAG,cAAc,CA49BxC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0fd139cda08a42ab7f8cbbfbf2bb00c179c5dbf6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts @@ -0,0 +1,20 @@ +export declare enum Caret { + beforeValue = "beforeValue", + afterValue = "afterValue", + beforeKey = "beforeKey" +} +export declare enum StackType { + root = "root", + object = "object", + array = "array", + ndJson = "ndJson", + functionCall = "dataType" +} +export declare function createStack(): { + readonly type: StackType; + readonly caret: Caret; + pop(): true; + push(type: StackType, newCaret: Caret): true; + update(newCaret: Caret): true; +}; +//# sourceMappingURL=stack.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8f243feb12abcbb028633987629e1d78ffe031d9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/streaming/stack.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,YAAY,aAAa;CAC1B;AAED,wBAAgB,WAAW;;;WAahB,IAAI;eAOA,SAAS,YAAY,KAAK,GAAG,IAAI;qBAO3B,KAAK,GAAG,IAAI;EAMhC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8be2afc615cb8d79203c97d1d9ce0cd183af424d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts @@ -0,0 +1,7 @@ +import { Transform } from 'node:stream'; +export interface JsonRepairTransformOptions { + chunkSize?: number; + bufferSize?: number; +} +export declare function jsonrepairTransform(options?: JsonRepairTransformOptions): Transform; +//# sourceMappingURL=stream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..42531807728414dbeb761c8e253b579da2e6e71b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/streaming/stream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/streaming/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,SAAS,CA8BnF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..275b38bb61f451376a3626c3b02d9dee25f638f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts @@ -0,0 +1,5 @@ +export declare class JSONRepairError extends Error { + position: number; + constructor(message: string, position: number); +} +//# sourceMappingURL=JSONRepairError.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..abbe1b43da0c3a0a02a7a7e17a7f495a601ca5aa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/JSONRepairError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"JSONRepairError.d.ts","sourceRoot":"","sources":["../../../src/utils/JSONRepairError.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,EAAE,MAAM,CAAA;gBAEJ,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAK9C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..080a2e69318e24ec735db492727baf85bd8159dd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts @@ -0,0 +1,65 @@ +export declare function isHex(char: string): boolean; +export declare function isDigit(char: string): boolean; +export declare function isValidStringCharacter(char: string): boolean; +export declare function isDelimiter(char: string): boolean; +export declare function isFunctionNameCharStart(char: string): boolean; +export declare function isFunctionNameChar(char: string): boolean; +export declare const regexUrlStart: RegExp; +export declare const regexUrlChar: RegExp; +export declare function isUnquotedStringDelimiter(char: string): boolean; +export declare function isStartOfValue(char: string): boolean; +export declare function isControlCharacter(char: string): char is "\n" | "\r" | "\t" | "\b" | "\f"; +export interface Text { + charCodeAt: (index: number) => number; +} +/** + * Check if the given character is a whitespace character like space, tab, or + * newline + */ +export declare function isWhitespace(text: Text, index: number): boolean; +/** + * Check if the given character is a whitespace character like space or tab, + * but NOT a newline + */ +export declare function isWhitespaceExceptNewline(text: Text, index: number): boolean; +/** + * Check if the given character is a special whitespace character, some + * unicode variant + */ +export declare function isSpecialWhitespace(text: Text, index: number): boolean; +/** + * Test whether the given character is a quote or double quote character. + * Also tests for special variants of quotes. + */ +export declare function isQuote(char: string): boolean; +/** + * Test whether the given character is a double quote character. + * Also tests for special variants of double quotes. + */ +export declare function isDoubleQuoteLike(char: string): boolean; +/** + * Test whether the given character is a double quote character. + * Does NOT test for special variants of double quotes. + */ +export declare function isDoubleQuote(char: string): boolean; +/** + * Test whether the given character is a single quote character. + * Also tests for special variants of single quotes. + */ +export declare function isSingleQuoteLike(char: string): boolean; +/** + * Test whether the given character is a single quote character. + * Does NOT test for special variants of single quotes. + */ +export declare function isSingleQuote(char: string): boolean; +/** + * Strip last occurrence of textToStrip from text + */ +export declare function stripLastOccurrence(text: string, textToStrip: string, stripRemainingText?: boolean): string; +export declare function insertBeforeLastWhitespace(text: string, textToInsert: string): string; +export declare function removeAtIndex(text: string, start: number, count: number): string; +/** + * Test whether a string ends with a newline or comma character and optional whitespace + */ +export declare function endsWithCommaOrNewline(text: string): boolean; +//# sourceMappingURL=stringUtils.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7f62ddc57e021147daf89a34ddd7fb4d8a9359cd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/types/utils/stringUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/stringUtils.ts"],"names":[],"mappings":"AAWA,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAK5D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,WAInD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,WAQ9C;AAGD,eAAO,MAAM,aAAa,QAAiD,CAAA;AAG3E,eAAO,MAAM,YAAY,QAAqC,CAAA;AAE9D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAKD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,4CAE9C;AAED,MAAM,WAAW,IAAI;IACnB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACtC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAI/D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAI5E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAUtE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIvD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,kBAAkB,UAAQ,GACzB,MAAM,CAKR;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAarF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAEvE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js new file mode 100644 index 0000000000000000000000000000000000000000..31aefbf44e7ea74d854a9c8798d2e7d8427a795b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js @@ -0,0 +1,902 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSONRepair = {})); +})(this, (function (exports) { 'use strict'; + + class JSONRepairError extends Error { + constructor(message, position) { + super(`${message} at position ${position}`); + this.position = position; + } + } + + const codeSpace = 0x20; // " " + const codeNewline = 0xa; // "\n" + const codeTab = 0x9; // "\t" + const codeReturn = 0xd; // "\r" + const codeNonBreakingSpace = 0xa0; + const codeEnQuad = 0x2000; + const codeHairSpace = 0x200a; + const codeNarrowNoBreakSpace = 0x202f; + const codeMediumMathematicalSpace = 0x205f; + const codeIdeographicSpace = 0x3000; + function isHex(char) { + return /^[0-9A-Fa-f]$/.test(char); + } + function isDigit(char) { + return char >= '0' && char <= '9'; + } + function isValidStringCharacter(char) { + // note that the valid range is between \u{0020} and \u{10ffff}, + // but in JavaScript it is not possible to create a code point larger than + // \u{10ffff}, so there is no need to test for that here. + return char >= '\u0020'; + } + function isDelimiter(char) { + return ',:[]/{}()\n+'.includes(char); + } + function isFunctionNameCharStart(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$'; + } + function isFunctionNameChar(char) { + return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$' || char >= '0' && char <= '9'; + } + + // matches "https://" and other schemas + const regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\/\/$/; + + // matches all valid URL characters EXCEPT "[", "]", and ",", since that are important JSON delimiters + const regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/; + function isUnquotedStringDelimiter(char) { + return ',[]/{}\n+'.includes(char); + } + function isStartOfValue(char) { + return isQuote(char) || regexStartOfValue.test(char); + } + + // alpha, number, minus, or opening bracket or brace + const regexStartOfValue = /^[[{\w-]$/; + function isControlCharacter(char) { + return char === '\n' || char === '\r' || char === '\t' || char === '\b' || char === '\f'; + } + /** + * Check if the given character is a whitespace character like space, tab, or + * newline + */ + function isWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn; + } + + /** + * Check if the given character is a whitespace character like space or tab, + * but NOT a newline + */ + function isWhitespaceExceptNewline(text, index) { + const code = text.charCodeAt(index); + return code === codeSpace || code === codeTab || code === codeReturn; + } + + /** + * Check if the given character is a special whitespace character, some + * unicode variant + */ + function isSpecialWhitespace(text, index) { + const code = text.charCodeAt(index); + return code === codeNonBreakingSpace || code >= codeEnQuad && code <= codeHairSpace || code === codeNarrowNoBreakSpace || code === codeMediumMathematicalSpace || code === codeIdeographicSpace; + } + + /** + * Test whether the given character is a quote or double quote character. + * Also tests for special variants of quotes. + */ + function isQuote(char) { + // the first check double quotes, since that occurs most often + return isDoubleQuoteLike(char) || isSingleQuoteLike(char); + } + + /** + * Test whether the given character is a double quote character. + * Also tests for special variants of double quotes. + */ + function isDoubleQuoteLike(char) { + return char === '"' || char === '\u201c' || char === '\u201d'; + } + + /** + * Test whether the given character is a double quote character. + * Does NOT test for special variants of double quotes. + */ + function isDoubleQuote(char) { + return char === '"'; + } + + /** + * Test whether the given character is a single quote character. + * Also tests for special variants of single quotes. + */ + function isSingleQuoteLike(char) { + return char === "'" || char === '\u2018' || char === '\u2019' || char === '\u0060' || char === '\u00b4'; + } + + /** + * Test whether the given character is a single quote character. + * Does NOT test for special variants of single quotes. + */ + function isSingleQuote(char) { + return char === "'"; + } + + /** + * Strip last occurrence of textToStrip from text + */ + function stripLastOccurrence(text, textToStrip) { + let stripRemainingText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + const index = text.lastIndexOf(textToStrip); + return index !== -1 ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1)) : text; + } + function insertBeforeLastWhitespace(text, textToInsert) { + let index = text.length; + if (!isWhitespace(text, index - 1)) { + // no trailing whitespaces + return text + textToInsert; + } + while (isWhitespace(text, index - 1)) { + index--; + } + return text.substring(0, index) + textToInsert + text.substring(index); + } + function removeAtIndex(text, start, count) { + return text.substring(0, start) + text.substring(start + count); + } + + /** + * Test whether a string ends with a newline or comma character and optional whitespace + */ + function endsWithCommaOrNewline(text) { + return /[,\n][ \t\r]*$/.test(text); + } + + const controlCharacters = { + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' + }; + + // map with all escape characters + const escapeCharacters = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + // note that \u is handled separately in parseString() + }; + + /** + * Repair a string containing an invalid JSON document. + * For example changes JavaScript notation into JSON notation. + * + * Example: + * + * try { + * const json = "{name: 'John'}" + * const repaired = jsonrepair(json) + * console.log(repaired) + * // '{"name": "John"}' + * } catch (err) { + * console.error(err) + * } + * + */ + function jsonrepair(text) { + let i = 0; // current index in text + let output = ''; // generated output + + parseMarkdownCodeBlock(['```', '[```', '{```']); + const processed = parseValue(); + if (!processed) { + throwUnexpectedEnd(); + } + parseMarkdownCodeBlock(['```', '```]', '```}']); + const processedComma = parseCharacter(','); + if (processedComma) { + parseWhitespaceAndSkipComments(); + } + if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) { + // start of a new value after end of the root level object: looks like + // newline delimited JSON -> turn into a root level array + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + parseNewlineDelimitedJSON(); + } else if (processedComma) { + // repair: remove trailing comma + output = stripLastOccurrence(output, ','); + } + + // repair redundant end quotes + while (text[i] === '}' || text[i] === ']') { + i++; + parseWhitespaceAndSkipComments(); + } + if (i >= text.length) { + // reached the end of the document properly + return output; + } + throwUnexpectedCharacter(); + function parseValue() { + parseWhitespaceAndSkipComments(); + const processed = parseObject() || parseArray() || parseString() || parseNumber() || parseKeywords() || parseUnquotedString(false) || parseRegex(); + parseWhitespaceAndSkipComments(); + return processed; + } + function parseWhitespaceAndSkipComments() { + let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const start = i; + let changed = parseWhitespace(skipNewline); + do { + changed = parseComment(); + if (changed) { + changed = parseWhitespace(skipNewline); + } + } while (changed); + return i > start; + } + function parseWhitespace(skipNewline) { + const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline; + let whitespace = ''; + while (true) { + if (_isWhiteSpace(text, i)) { + whitespace += text[i]; + i++; + } else if (isSpecialWhitespace(text, i)) { + // repair special whitespace + whitespace += ' '; + i++; + } else { + break; + } + } + if (whitespace.length > 0) { + output += whitespace; + return true; + } + return false; + } + function parseComment() { + // find a block comment '/* ... */' + if (text[i] === '/' && text[i + 1] === '*') { + // repair block comment by skipping it + while (i < text.length && !atEndOfBlockComment(text, i)) { + i++; + } + i += 2; + return true; + } + + // find a line comment '// ...' + if (text[i] === '/' && text[i + 1] === '/') { + // repair line comment by skipping it + while (i < text.length && text[i] !== '\n') { + i++; + } + return true; + } + return false; + } + function parseMarkdownCodeBlock(blocks) { + // find and skip over a Markdown fenced code block: + // ``` ... ``` + // or + // ```json ... ``` + if (skipMarkdownCodeBlock(blocks)) { + if (isFunctionNameCharStart(text[i])) { + // strip the optional language specifier like "json" + while (i < text.length && isFunctionNameChar(text[i])) { + i++; + } + } + parseWhitespaceAndSkipComments(); + return true; + } + return false; + } + function skipMarkdownCodeBlock(blocks) { + for (const block of blocks) { + const end = i + block.length; + if (text.slice(i, end) === block) { + i = end; + return true; + } + } + return false; + } + function parseCharacter(char) { + if (text[i] === char) { + output += text[i]; + i++; + return true; + } + return false; + } + function skipCharacter(char) { + if (text[i] === char) { + i++; + return true; + } + return false; + } + function skipEscapeCharacter() { + return skipCharacter('\\'); + } + + /** + * Skip ellipsis like "[1,2,3,...]" or "[1,2,3,...,9]" or "[...,7,8,9]" + * or a similar construct in objects. + */ + function skipEllipsis() { + parseWhitespaceAndSkipComments(); + if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') { + // repair: remove the ellipsis (three dots) and optionally a comma + i += 3; + parseWhitespaceAndSkipComments(); + skipCharacter(','); + return true; + } + return false; + } + + /** + * Parse an object like '{"key": "value"}' + */ + function parseObject() { + if (text[i] === '{') { + output += '{'; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in {, message: "hi"} + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== '}') { + let processedComma; + if (!initial) { + processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + parseWhitespaceAndSkipComments(); + } else { + processedComma = true; + initial = false; + } + skipEllipsis(); + const processedKey = parseString() || parseUnquotedString(true); + if (!processedKey) { + if (text[i] === '}' || text[i] === '{' || text[i] === ']' || text[i] === '[' || text[i] === undefined) { + // repair trailing comma + output = stripLastOccurrence(output, ','); + } else { + throwObjectKeyExpected(); + } + break; + } + parseWhitespaceAndSkipComments(); + const processedColon = parseCharacter(':'); + const truncatedText = i >= text.length; + if (!processedColon) { + if (isStartOfValue(text[i]) || truncatedText) { + // repair missing colon + output = insertBeforeLastWhitespace(output, ':'); + } else { + throwColonExpected(); + } + } + const processedValue = parseValue(); + if (!processedValue) { + if (processedColon || truncatedText) { + // repair missing object value + output += 'null'; + } else { + throwColonExpected(); + } + } + } + if (text[i] === '}') { + output += '}'; + i++; + } else { + // repair missing end bracket + output = insertBeforeLastWhitespace(output, '}'); + } + return true; + } + return false; + } + + /** + * Parse an array like '["item1", "item2", ...]' + */ + function parseArray() { + if (text[i] === '[') { + output += '['; + i++; + parseWhitespaceAndSkipComments(); + + // repair: skip leading comma like in [,1,2,3] + if (skipCharacter(',')) { + parseWhitespaceAndSkipComments(); + } + let initial = true; + while (i < text.length && text[i] !== ']') { + if (!initial) { + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair missing comma + output = insertBeforeLastWhitespace(output, ','); + } + } else { + initial = false; + } + skipEllipsis(); + const processedValue = parseValue(); + if (!processedValue) { + // repair trailing comma + output = stripLastOccurrence(output, ','); + break; + } + } + if (text[i] === ']') { + output += ']'; + i++; + } else { + // repair missing closing array bracket + output = insertBeforeLastWhitespace(output, ']'); + } + return true; + } + return false; + } + + /** + * Parse and repair Newline Delimited JSON (NDJSON): + * multiple JSON objects separated by a newline character + */ + function parseNewlineDelimitedJSON() { + // repair NDJSON + let initial = true; + let processedValue = true; + while (processedValue) { + if (!initial) { + // parse optional comma, insert when missing + const processedComma = parseCharacter(','); + if (!processedComma) { + // repair: add missing comma + output = insertBeforeLastWhitespace(output, ','); + } + } else { + initial = false; + } + processedValue = parseValue(); + } + if (!processedValue) { + // repair: remove trailing comma + output = stripLastOccurrence(output, ','); + } + + // repair: wrap the output inside array brackets + output = `[\n${output}\n]`; + } + + /** + * Parse a string enclosed by double quotes "...". Can contain escaped quotes + * Repair strings enclosed in single quotes or special quotes + * Repair an escaped string + * + * The function can run in two stages: + * - First, it assumes the string has a valid end quote + * - If it turns out that the string does not have a valid end quote followed + * by a delimiter (which should be the case), the function runs again in a + * more conservative way, stopping the string at the first next delimiter + * and fixing the string by inserting a quote there, or stopping at a + * stop index detected in the first iteration. + */ + function parseString() { + let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + let skipEscapeChars = text[i] === '\\'; + if (skipEscapeChars) { + // repair: remove the first escape character + i++; + skipEscapeChars = true; + } + if (isQuote(text[i])) { + // double quotes are correct JSON, + // single quotes come from JavaScript for example, we assume it will have a correct single end quote too + // otherwise, we will match any double-quote-like start with a double-quote-like end, + // or any single-quote-like start with a single-quote-like end + const isEndQuote = isDoubleQuote(text[i]) ? isDoubleQuote : isSingleQuote(text[i]) ? isSingleQuote : isSingleQuoteLike(text[i]) ? isSingleQuoteLike : isDoubleQuoteLike; + const iBefore = i; + const oBefore = output.length; + let str = '"'; + i++; + while (true) { + if (i >= text.length) { + // end of text, we are missing an end quote + + const iPrev = prevNonWhitespaceIndex(i - 1); + if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) { + // if the text ends with a delimiter, like ["hello], + // so the missing end quote should be inserted before this delimiter + // retry parsing the string, stopping at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // repair missing quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + return true; + } + if (i === stopAtIndex) { + // use the stop index detected in the first iteration, and repair end quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + return true; + } + if (isEndQuote(text[i])) { + // end quote + // let us check what is before and after the quote to verify whether this is a legit end quote + const iQuote = i; + const oQuote = str.length; + str += '"'; + i++; + output += str; + parseWhitespaceAndSkipComments(false); + if (stopAtDelimiter || i >= text.length || isDelimiter(text[i]) || isQuote(text[i]) || isDigit(text[i])) { + // The quote is followed by the end of the text, a delimiter, + // or a next value. So the quote is indeed the end of the string. + parseConcatenatedString(); + return true; + } + const iPrevChar = prevNonWhitespaceIndex(iQuote - 1); + const prevChar = text.charAt(iPrevChar); + if (prevChar === ',') { + // A comma followed by a quote, like '{"a":"b,c,"d":"e"}'. + // We assume that the quote is a start quote, and that the end quote + // should have been located right before the comma but is missing. + i = iBefore; + output = output.substring(0, oBefore); + return parseString(false, iPrevChar); + } + if (isDelimiter(prevChar)) { + // This is not the right end quote: it is preceded by a delimiter, + // and NOT followed by a delimiter. So, there is an end quote missing + // parse the string again and then stop at the first next delimiter + i = iBefore; + output = output.substring(0, oBefore); + return parseString(true); + } + + // revert to right after the quote but before any whitespace, and continue parsing the string + output = output.substring(0, oBefore); + i = iQuote + 1; + + // repair unescaped quote + str = `${str.substring(0, oQuote)}\\${str.substring(oQuote)}`; + } else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) { + // we're in the mode to stop the string at the first delimiter + // because there is an end quote missing + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) { + while (i < text.length && regexUrlChar.test(text[i])) { + str += text[i]; + i++; + } + } + + // repair missing quote + str = insertBeforeLastWhitespace(str, '"'); + output += str; + parseConcatenatedString(); + return true; + } else if (text[i] === '\\') { + // handle escaped content like \n or \u2605 + const char = text.charAt(i + 1); + const escapeChar = escapeCharacters[char]; + if (escapeChar !== undefined) { + str += text.slice(i, i + 2); + i += 2; + } else if (char === 'u') { + let j = 2; + while (j < 6 && isHex(text[i + j])) { + j++; + } + if (j === 6) { + str += text.slice(i, i + 6); + i += 6; + } else if (i + j >= text.length) { + // repair invalid or truncated unicode char at the end of the text + // by removing the unicode char and ending the string here + i = text.length; + } else { + throwInvalidUnicodeCharacter(); + } + } else { + // repair invalid escape character: remove it + str += char; + i += 2; + } + } else { + // handle regular characters + const char = text.charAt(i); + if (char === '"' && text[i - 1] !== '\\') { + // repair unescaped double quote + str += `\\${char}`; + i++; + } else if (isControlCharacter(char)) { + // unescaped control character + str += controlCharacters[char]; + i++; + } else { + if (!isValidStringCharacter(char)) { + throwInvalidCharacter(char); + } + str += char; + i++; + } + } + if (skipEscapeChars) { + // repair: skipped escape character (nothing to do) + skipEscapeCharacter(); + } + } + } + return false; + } + + /** + * Repair concatenated strings like "hello" + "world", change this into "helloworld" + */ + function parseConcatenatedString() { + let processed = false; + parseWhitespaceAndSkipComments(); + while (text[i] === '+') { + processed = true; + i++; + parseWhitespaceAndSkipComments(); + + // repair: remove the end quote of the first string + output = stripLastOccurrence(output, '"', true); + const start = output.length; + const parsedStr = parseString(); + if (parsedStr) { + // repair: remove the start quote of the second string + output = removeAtIndex(output, start, 1); + } else { + // repair: remove the + because it is not followed by a string + output = insertBeforeLastWhitespace(output, '"'); + } + } + return processed; + } + + /** + * Parse a number like 2.4 or 2.4e6 + */ + function parseNumber() { + const start = i; + if (text[i] === '-') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + } + + // Note that in JSON leading zeros like "00789" are not allowed. + // We will allow all leading zeros here though and at the end of parseNumber + // check against trailing zeros and repair that if needed. + // Leading zeros can have meaning, so we should not clear them. + while (isDigit(text[i])) { + i++; + } + if (text[i] === '.') { + i++; + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + while (isDigit(text[i])) { + i++; + } + } + if (text[i] === 'e' || text[i] === 'E') { + i++; + if (text[i] === '-' || text[i] === '+') { + i++; + } + if (atEndOfNumber()) { + repairNumberEndingWithNumericSymbol(start); + return true; + } + if (!isDigit(text[i])) { + i = start; + return false; + } + while (isDigit(text[i])) { + i++; + } + } + + // if we're not at the end of the number by this point, allow this to be parsed as another type + if (!atEndOfNumber()) { + i = start; + return false; + } + if (i > start) { + // repair a number with leading zeros like "00789" + const num = text.slice(start, i); + const hasInvalidLeadingZero = /^0\d/.test(num); + output += hasInvalidLeadingZero ? `"${num}"` : num; + return true; + } + return false; + } + + /** + * Parse keywords true, false, null + * Repair Python keywords True, False, None + */ + function parseKeywords() { + return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') || + // repair Python keywords True, False, None + parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null'); + } + function parseKeyword(name, value) { + if (text.slice(i, i + name.length) === name) { + output += value; + i += name.length; + return true; + } + return false; + } + + /** + * Repair an unquoted string by adding quotes around it + * Repair a MongoDB function call like NumberLong("2") + * Repair a JSONP function call like callback({...}); + */ + function parseUnquotedString(isKey) { + // note that the symbol can end with whitespaces: we stop at the next delimiter + // also, note that we allow strings to contain a slash / in order to support repairing regular expressions + const start = i; + if (isFunctionNameCharStart(text[i])) { + while (i < text.length && isFunctionNameChar(text[i])) { + i++; + } + let j = i; + while (isWhitespace(text, j)) { + j++; + } + if (text[j] === '(') { + // repair a MongoDB function call like NumberLong("2") + // repair a JSONP function call like callback({...}); + i = j + 1; + parseValue(); + if (text[i] === ')') { + // repair: skip close bracket of function call + i++; + if (text[i] === ';') { + // repair: skip semicolon after JSONP call + i++; + } + } + return true; + } + } + while (i < text.length && !isUnquotedStringDelimiter(text[i]) && !isQuote(text[i]) && (!isKey || text[i] !== ':')) { + i++; + } + + // test start of an url like "https://..." (this would be parsed as a comment) + if (text[i - 1] === ':' && regexUrlStart.test(text.substring(start, i + 2))) { + while (i < text.length && regexUrlChar.test(text[i])) { + i++; + } + } + if (i > start) { + // repair unquoted string + // also, repair undefined into null + + // first, go back to prevent getting trailing whitespaces in the string + while (isWhitespace(text, i - 1) && i > 0) { + i--; + } + const symbol = text.slice(start, i); + output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol); + if (text[i] === '"') { + // we had a missing start quote, but now we encountered the end quote, so we can skip that one + i++; + } + return true; + } + } + function parseRegex() { + if (text[i] === '/') { + const start = i; + i++; + while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\')) { + i++; + } + i++; + output += `"${text.substring(start, i)}"`; + return true; + } + } + function prevNonWhitespaceIndex(start) { + let prev = start; + while (prev > 0 && isWhitespace(text, prev)) { + prev--; + } + return prev; + } + function atEndOfNumber() { + return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i); + } + function repairNumberEndingWithNumericSymbol(start) { + // repair numbers cut off at the end + // this will only be called when we end after a '.', '-', or 'e' and does not + // change the number more than it needs to make it valid JSON + output += `${text.slice(start, i)}0`; + } + function throwInvalidCharacter(char) { + throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i); + } + function throwUnexpectedCharacter() { + throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i); + } + function throwUnexpectedEnd() { + throw new JSONRepairError('Unexpected end of json string', text.length); + } + function throwObjectKeyExpected() { + throw new JSONRepairError('Object key expected', i); + } + function throwColonExpected() { + throw new JSONRepairError('Colon expected', i); + } + function throwInvalidUnicodeCharacter() { + const chars = text.slice(i, i + 6); + throw new JSONRepairError(`Invalid unicode character "${chars}"`, i); + } + } + function atEndOfBlockComment(text, i) { + return text[i] === '*' && text[i + 1] === '/'; + } + + exports.JSONRepairError = JSONRepairError; + exports.jsonrepair = jsonrepair; + +})); +//# sourceMappingURL=jsonrepair.js.map diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ddd6a44839cea88751a93d09b5d5170d87563a1a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonrepair.js","sources":["../esm/utils/JSONRepairError.js","../esm/utils/stringUtils.js","../esm/regular/jsonrepair.js"],"sourcesContent":["export class JSONRepairError extends Error {\n constructor(message, position) {\n super(`${message} at position ${position}`);\n this.position = position;\n }\n}\n//# sourceMappingURL=JSONRepairError.js.map","const codeSpace = 0x20; // \" \"\nconst codeNewline = 0xa; // \"\\n\"\nconst codeTab = 0x9; // \"\\t\"\nconst codeReturn = 0xd; // \"\\r\"\nconst codeNonBreakingSpace = 0xa0;\nconst codeEnQuad = 0x2000;\nconst codeHairSpace = 0x200a;\nconst codeNarrowNoBreakSpace = 0x202f;\nconst codeMediumMathematicalSpace = 0x205f;\nconst codeIdeographicSpace = 0x3000;\nexport function isHex(char) {\n return /^[0-9A-Fa-f]$/.test(char);\n}\nexport function isDigit(char) {\n return char >= '0' && char <= '9';\n}\nexport function isValidStringCharacter(char) {\n // note that the valid range is between \\u{0020} and \\u{10ffff},\n // but in JavaScript it is not possible to create a code point larger than\n // \\u{10ffff}, so there is no need to test for that here.\n return char >= '\\u0020';\n}\nexport function isDelimiter(char) {\n return ',:[]/{}()\\n+'.includes(char);\n}\nexport function isFunctionNameCharStart(char) {\n return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$';\n}\nexport function isFunctionNameChar(char) {\n return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char === '_' || char === '$' || char >= '0' && char <= '9';\n}\n\n// matches \"https://\" and other schemas\nexport const regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\\/\\/$/;\n\n// matches all valid URL characters EXCEPT \"[\", \"]\", and \",\", since that are important JSON delimiters\nexport const regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;\nexport function isUnquotedStringDelimiter(char) {\n return ',[]/{}\\n+'.includes(char);\n}\nexport function isStartOfValue(char) {\n return isQuote(char) || regexStartOfValue.test(char);\n}\n\n// alpha, number, minus, or opening bracket or brace\nconst regexStartOfValue = /^[[{\\w-]$/;\nexport function isControlCharacter(char) {\n return char === '\\n' || char === '\\r' || char === '\\t' || char === '\\b' || char === '\\f';\n}\n/**\n * Check if the given character is a whitespace character like space, tab, or\n * newline\n */\nexport function isWhitespace(text, index) {\n const code = text.charCodeAt(index);\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;\n}\n\n/**\n * Check if the given character is a whitespace character like space or tab,\n * but NOT a newline\n */\nexport function isWhitespaceExceptNewline(text, index) {\n const code = text.charCodeAt(index);\n return code === codeSpace || code === codeTab || code === codeReturn;\n}\n\n/**\n * Check if the given character is a special whitespace character, some\n * unicode variant\n */\nexport function isSpecialWhitespace(text, index) {\n const code = text.charCodeAt(index);\n return code === codeNonBreakingSpace || code >= codeEnQuad && code <= codeHairSpace || code === codeNarrowNoBreakSpace || code === codeMediumMathematicalSpace || code === codeIdeographicSpace;\n}\n\n/**\n * Test whether the given character is a quote or double quote character.\n * Also tests for special variants of quotes.\n */\nexport function isQuote(char) {\n // the first check double quotes, since that occurs most often\n return isDoubleQuoteLike(char) || isSingleQuoteLike(char);\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Also tests for special variants of double quotes.\n */\nexport function isDoubleQuoteLike(char) {\n return char === '\"' || char === '\\u201c' || char === '\\u201d';\n}\n\n/**\n * Test whether the given character is a double quote character.\n * Does NOT test for special variants of double quotes.\n */\nexport function isDoubleQuote(char) {\n return char === '\"';\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Also tests for special variants of single quotes.\n */\nexport function isSingleQuoteLike(char) {\n return char === \"'\" || char === '\\u2018' || char === '\\u2019' || char === '\\u0060' || char === '\\u00b4';\n}\n\n/**\n * Test whether the given character is a single quote character.\n * Does NOT test for special variants of single quotes.\n */\nexport function isSingleQuote(char) {\n return char === \"'\";\n}\n\n/**\n * Strip last occurrence of textToStrip from text\n */\nexport function stripLastOccurrence(text, textToStrip) {\n let stripRemainingText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n const index = text.lastIndexOf(textToStrip);\n return index !== -1 ? text.substring(0, index) + (stripRemainingText ? '' : text.substring(index + 1)) : text;\n}\nexport function insertBeforeLastWhitespace(text, textToInsert) {\n let index = text.length;\n if (!isWhitespace(text, index - 1)) {\n // no trailing whitespaces\n return text + textToInsert;\n }\n while (isWhitespace(text, index - 1)) {\n index--;\n }\n return text.substring(0, index) + textToInsert + text.substring(index);\n}\nexport function removeAtIndex(text, start, count) {\n return text.substring(0, start) + text.substring(start + count);\n}\n\n/**\n * Test whether a string ends with a newline or comma character and optional whitespace\n */\nexport function endsWithCommaOrNewline(text) {\n return /[,\\n][ \\t\\r]*$/.test(text);\n}\n//# sourceMappingURL=stringUtils.js.map","import { JSONRepairError } from '../utils/JSONRepairError.js';\nimport { endsWithCommaOrNewline, insertBeforeLastWhitespace, isControlCharacter, isDelimiter, isDigit, isDoubleQuote, isDoubleQuoteLike, isFunctionNameChar, isFunctionNameCharStart, isHex, isQuote, isSingleQuote, isSingleQuoteLike, isSpecialWhitespace, isStartOfValue, isUnquotedStringDelimiter, isValidStringCharacter, isWhitespace, isWhitespaceExceptNewline, regexUrlChar, regexUrlStart, removeAtIndex, stripLastOccurrence } from '../utils/stringUtils.js';\nconst controlCharacters = {\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t'\n};\n\n// map with all escape characters\nconst escapeCharacters = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n};\n\n/**\n * Repair a string containing an invalid JSON document.\n * For example changes JavaScript notation into JSON notation.\n *\n * Example:\n *\n * try {\n * const json = \"{name: 'John'}\"\n * const repaired = jsonrepair(json)\n * console.log(repaired)\n * // '{\"name\": \"John\"}'\n * } catch (err) {\n * console.error(err)\n * }\n *\n */\nexport function jsonrepair(text) {\n let i = 0; // current index in text\n let output = ''; // generated output\n\n parseMarkdownCodeBlock(['```', '[```', '{```']);\n const processed = parseValue();\n if (!processed) {\n throwUnexpectedEnd();\n }\n parseMarkdownCodeBlock(['```', '```]', '```}']);\n const processedComma = parseCharacter(',');\n if (processedComma) {\n parseWhitespaceAndSkipComments();\n }\n if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) {\n // start of a new value after end of the root level object: looks like\n // newline delimited JSON -> turn into a root level array\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',');\n }\n parseNewlineDelimitedJSON();\n } else if (processedComma) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',');\n }\n\n // repair redundant end quotes\n while (text[i] === '}' || text[i] === ']') {\n i++;\n parseWhitespaceAndSkipComments();\n }\n if (i >= text.length) {\n // reached the end of the document properly\n return output;\n }\n throwUnexpectedCharacter();\n function parseValue() {\n parseWhitespaceAndSkipComments();\n const processed = parseObject() || parseArray() || parseString() || parseNumber() || parseKeywords() || parseUnquotedString(false) || parseRegex();\n parseWhitespaceAndSkipComments();\n return processed;\n }\n function parseWhitespaceAndSkipComments() {\n let skipNewline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n const start = i;\n let changed = parseWhitespace(skipNewline);\n do {\n changed = parseComment();\n if (changed) {\n changed = parseWhitespace(skipNewline);\n }\n } while (changed);\n return i > start;\n }\n function parseWhitespace(skipNewline) {\n const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline;\n let whitespace = '';\n while (true) {\n if (_isWhiteSpace(text, i)) {\n whitespace += text[i];\n i++;\n } else if (isSpecialWhitespace(text, i)) {\n // repair special whitespace\n whitespace += ' ';\n i++;\n } else {\n break;\n }\n }\n if (whitespace.length > 0) {\n output += whitespace;\n return true;\n }\n return false;\n }\n function parseComment() {\n // find a block comment '/* ... */'\n if (text[i] === '/' && text[i + 1] === '*') {\n // repair block comment by skipping it\n while (i < text.length && !atEndOfBlockComment(text, i)) {\n i++;\n }\n i += 2;\n return true;\n }\n\n // find a line comment '// ...'\n if (text[i] === '/' && text[i + 1] === '/') {\n // repair line comment by skipping it\n while (i < text.length && text[i] !== '\\n') {\n i++;\n }\n return true;\n }\n return false;\n }\n function parseMarkdownCodeBlock(blocks) {\n // find and skip over a Markdown fenced code block:\n // ``` ... ```\n // or\n // ```json ... ```\n if (skipMarkdownCodeBlock(blocks)) {\n if (isFunctionNameCharStart(text[i])) {\n // strip the optional language specifier like \"json\"\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++;\n }\n }\n parseWhitespaceAndSkipComments();\n return true;\n }\n return false;\n }\n function skipMarkdownCodeBlock(blocks) {\n for (const block of blocks) {\n const end = i + block.length;\n if (text.slice(i, end) === block) {\n i = end;\n return true;\n }\n }\n return false;\n }\n function parseCharacter(char) {\n if (text[i] === char) {\n output += text[i];\n i++;\n return true;\n }\n return false;\n }\n function skipCharacter(char) {\n if (text[i] === char) {\n i++;\n return true;\n }\n return false;\n }\n function skipEscapeCharacter() {\n return skipCharacter('\\\\');\n }\n\n /**\n * Skip ellipsis like \"[1,2,3,...]\" or \"[1,2,3,...,9]\" or \"[...,7,8,9]\"\n * or a similar construct in objects.\n */\n function skipEllipsis() {\n parseWhitespaceAndSkipComments();\n if (text[i] === '.' && text[i + 1] === '.' && text[i + 2] === '.') {\n // repair: remove the ellipsis (three dots) and optionally a comma\n i += 3;\n parseWhitespaceAndSkipComments();\n skipCharacter(',');\n return true;\n }\n return false;\n }\n\n /**\n * Parse an object like '{\"key\": \"value\"}'\n */\n function parseObject() {\n if (text[i] === '{') {\n output += '{';\n i++;\n parseWhitespaceAndSkipComments();\n\n // repair: skip leading comma like in {, message: \"hi\"}\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments();\n }\n let initial = true;\n while (i < text.length && text[i] !== '}') {\n let processedComma;\n if (!initial) {\n processedComma = parseCharacter(',');\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',');\n }\n parseWhitespaceAndSkipComments();\n } else {\n processedComma = true;\n initial = false;\n }\n skipEllipsis();\n const processedKey = parseString() || parseUnquotedString(true);\n if (!processedKey) {\n if (text[i] === '}' || text[i] === '{' || text[i] === ']' || text[i] === '[' || text[i] === undefined) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',');\n } else {\n throwObjectKeyExpected();\n }\n break;\n }\n parseWhitespaceAndSkipComments();\n const processedColon = parseCharacter(':');\n const truncatedText = i >= text.length;\n if (!processedColon) {\n if (isStartOfValue(text[i]) || truncatedText) {\n // repair missing colon\n output = insertBeforeLastWhitespace(output, ':');\n } else {\n throwColonExpected();\n }\n }\n const processedValue = parseValue();\n if (!processedValue) {\n if (processedColon || truncatedText) {\n // repair missing object value\n output += 'null';\n } else {\n throwColonExpected();\n }\n }\n }\n if (text[i] === '}') {\n output += '}';\n i++;\n } else {\n // repair missing end bracket\n output = insertBeforeLastWhitespace(output, '}');\n }\n return true;\n }\n return false;\n }\n\n /**\n * Parse an array like '[\"item1\", \"item2\", ...]'\n */\n function parseArray() {\n if (text[i] === '[') {\n output += '[';\n i++;\n parseWhitespaceAndSkipComments();\n\n // repair: skip leading comma like in [,1,2,3]\n if (skipCharacter(',')) {\n parseWhitespaceAndSkipComments();\n }\n let initial = true;\n while (i < text.length && text[i] !== ']') {\n if (!initial) {\n const processedComma = parseCharacter(',');\n if (!processedComma) {\n // repair missing comma\n output = insertBeforeLastWhitespace(output, ',');\n }\n } else {\n initial = false;\n }\n skipEllipsis();\n const processedValue = parseValue();\n if (!processedValue) {\n // repair trailing comma\n output = stripLastOccurrence(output, ',');\n break;\n }\n }\n if (text[i] === ']') {\n output += ']';\n i++;\n } else {\n // repair missing closing array bracket\n output = insertBeforeLastWhitespace(output, ']');\n }\n return true;\n }\n return false;\n }\n\n /**\n * Parse and repair Newline Delimited JSON (NDJSON):\n * multiple JSON objects separated by a newline character\n */\n function parseNewlineDelimitedJSON() {\n // repair NDJSON\n let initial = true;\n let processedValue = true;\n while (processedValue) {\n if (!initial) {\n // parse optional comma, insert when missing\n const processedComma = parseCharacter(',');\n if (!processedComma) {\n // repair: add missing comma\n output = insertBeforeLastWhitespace(output, ',');\n }\n } else {\n initial = false;\n }\n processedValue = parseValue();\n }\n if (!processedValue) {\n // repair: remove trailing comma\n output = stripLastOccurrence(output, ',');\n }\n\n // repair: wrap the output inside array brackets\n output = `[\\n${output}\\n]`;\n }\n\n /**\n * Parse a string enclosed by double quotes \"...\". Can contain escaped quotes\n * Repair strings enclosed in single quotes or special quotes\n * Repair an escaped string\n *\n * The function can run in two stages:\n * - First, it assumes the string has a valid end quote\n * - If it turns out that the string does not have a valid end quote followed\n * by a delimiter (which should be the case), the function runs again in a\n * more conservative way, stopping the string at the first next delimiter\n * and fixing the string by inserting a quote there, or stopping at a\n * stop index detected in the first iteration.\n */\n function parseString() {\n let stopAtDelimiter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n let stopAtIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n let skipEscapeChars = text[i] === '\\\\';\n if (skipEscapeChars) {\n // repair: remove the first escape character\n i++;\n skipEscapeChars = true;\n }\n if (isQuote(text[i])) {\n // double quotes are correct JSON,\n // single quotes come from JavaScript for example, we assume it will have a correct single end quote too\n // otherwise, we will match any double-quote-like start with a double-quote-like end,\n // or any single-quote-like start with a single-quote-like end\n const isEndQuote = isDoubleQuote(text[i]) ? isDoubleQuote : isSingleQuote(text[i]) ? isSingleQuote : isSingleQuoteLike(text[i]) ? isSingleQuoteLike : isDoubleQuoteLike;\n const iBefore = i;\n const oBefore = output.length;\n let str = '\"';\n i++;\n while (true) {\n if (i >= text.length) {\n // end of text, we are missing an end quote\n\n const iPrev = prevNonWhitespaceIndex(i - 1);\n if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) {\n // if the text ends with a delimiter, like [\"hello],\n // so the missing end quote should be inserted before this delimiter\n // retry parsing the string, stopping at the first next delimiter\n i = iBefore;\n output = output.substring(0, oBefore);\n return parseString(true);\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"');\n output += str;\n return true;\n }\n if (i === stopAtIndex) {\n // use the stop index detected in the first iteration, and repair end quote\n str = insertBeforeLastWhitespace(str, '\"');\n output += str;\n return true;\n }\n if (isEndQuote(text[i])) {\n // end quote\n // let us check what is before and after the quote to verify whether this is a legit end quote\n const iQuote = i;\n const oQuote = str.length;\n str += '\"';\n i++;\n output += str;\n parseWhitespaceAndSkipComments(false);\n if (stopAtDelimiter || i >= text.length || isDelimiter(text[i]) || isQuote(text[i]) || isDigit(text[i])) {\n // The quote is followed by the end of the text, a delimiter,\n // or a next value. So the quote is indeed the end of the string.\n parseConcatenatedString();\n return true;\n }\n const iPrevChar = prevNonWhitespaceIndex(iQuote - 1);\n const prevChar = text.charAt(iPrevChar);\n if (prevChar === ',') {\n // A comma followed by a quote, like '{\"a\":\"b,c,\"d\":\"e\"}'.\n // We assume that the quote is a start quote, and that the end quote\n // should have been located right before the comma but is missing.\n i = iBefore;\n output = output.substring(0, oBefore);\n return parseString(false, iPrevChar);\n }\n if (isDelimiter(prevChar)) {\n // This is not the right end quote: it is preceded by a delimiter,\n // and NOT followed by a delimiter. So, there is an end quote missing\n // parse the string again and then stop at the first next delimiter\n i = iBefore;\n output = output.substring(0, oBefore);\n return parseString(true);\n }\n\n // revert to right after the quote but before any whitespace, and continue parsing the string\n output = output.substring(0, oBefore);\n i = iQuote + 1;\n\n // repair unescaped quote\n str = `${str.substring(0, oQuote)}\\\\${str.substring(oQuote)}`;\n } else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) {\n // we're in the mode to stop the string at the first delimiter\n // because there is an end quote missing\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n str += text[i];\n i++;\n }\n }\n\n // repair missing quote\n str = insertBeforeLastWhitespace(str, '\"');\n output += str;\n parseConcatenatedString();\n return true;\n } else if (text[i] === '\\\\') {\n // handle escaped content like \\n or \\u2605\n const char = text.charAt(i + 1);\n const escapeChar = escapeCharacters[char];\n if (escapeChar !== undefined) {\n str += text.slice(i, i + 2);\n i += 2;\n } else if (char === 'u') {\n let j = 2;\n while (j < 6 && isHex(text[i + j])) {\n j++;\n }\n if (j === 6) {\n str += text.slice(i, i + 6);\n i += 6;\n } else if (i + j >= text.length) {\n // repair invalid or truncated unicode char at the end of the text\n // by removing the unicode char and ending the string here\n i = text.length;\n } else {\n throwInvalidUnicodeCharacter();\n }\n } else {\n // repair invalid escape character: remove it\n str += char;\n i += 2;\n }\n } else {\n // handle regular characters\n const char = text.charAt(i);\n if (char === '\"' && text[i - 1] !== '\\\\') {\n // repair unescaped double quote\n str += `\\\\${char}`;\n i++;\n } else if (isControlCharacter(char)) {\n // unescaped control character\n str += controlCharacters[char];\n i++;\n } else {\n if (!isValidStringCharacter(char)) {\n throwInvalidCharacter(char);\n }\n str += char;\n i++;\n }\n }\n if (skipEscapeChars) {\n // repair: skipped escape character (nothing to do)\n skipEscapeCharacter();\n }\n }\n }\n return false;\n }\n\n /**\n * Repair concatenated strings like \"hello\" + \"world\", change this into \"helloworld\"\n */\n function parseConcatenatedString() {\n let processed = false;\n parseWhitespaceAndSkipComments();\n while (text[i] === '+') {\n processed = true;\n i++;\n parseWhitespaceAndSkipComments();\n\n // repair: remove the end quote of the first string\n output = stripLastOccurrence(output, '\"', true);\n const start = output.length;\n const parsedStr = parseString();\n if (parsedStr) {\n // repair: remove the start quote of the second string\n output = removeAtIndex(output, start, 1);\n } else {\n // repair: remove the + because it is not followed by a string\n output = insertBeforeLastWhitespace(output, '\"');\n }\n }\n return processed;\n }\n\n /**\n * Parse a number like 2.4 or 2.4e6\n */\n function parseNumber() {\n const start = i;\n if (text[i] === '-') {\n i++;\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start);\n return true;\n }\n if (!isDigit(text[i])) {\n i = start;\n return false;\n }\n }\n\n // Note that in JSON leading zeros like \"00789\" are not allowed.\n // We will allow all leading zeros here though and at the end of parseNumber\n // check against trailing zeros and repair that if needed.\n // Leading zeros can have meaning, so we should not clear them.\n while (isDigit(text[i])) {\n i++;\n }\n if (text[i] === '.') {\n i++;\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start);\n return true;\n }\n if (!isDigit(text[i])) {\n i = start;\n return false;\n }\n while (isDigit(text[i])) {\n i++;\n }\n }\n if (text[i] === 'e' || text[i] === 'E') {\n i++;\n if (text[i] === '-' || text[i] === '+') {\n i++;\n }\n if (atEndOfNumber()) {\n repairNumberEndingWithNumericSymbol(start);\n return true;\n }\n if (!isDigit(text[i])) {\n i = start;\n return false;\n }\n while (isDigit(text[i])) {\n i++;\n }\n }\n\n // if we're not at the end of the number by this point, allow this to be parsed as another type\n if (!atEndOfNumber()) {\n i = start;\n return false;\n }\n if (i > start) {\n // repair a number with leading zeros like \"00789\"\n const num = text.slice(start, i);\n const hasInvalidLeadingZero = /^0\\d/.test(num);\n output += hasInvalidLeadingZero ? `\"${num}\"` : num;\n return true;\n }\n return false;\n }\n\n /**\n * Parse keywords true, false, null\n * Repair Python keywords True, False, None\n */\n function parseKeywords() {\n return parseKeyword('true', 'true') || parseKeyword('false', 'false') || parseKeyword('null', 'null') ||\n // repair Python keywords True, False, None\n parseKeyword('True', 'true') || parseKeyword('False', 'false') || parseKeyword('None', 'null');\n }\n function parseKeyword(name, value) {\n if (text.slice(i, i + name.length) === name) {\n output += value;\n i += name.length;\n return true;\n }\n return false;\n }\n\n /**\n * Repair an unquoted string by adding quotes around it\n * Repair a MongoDB function call like NumberLong(\"2\")\n * Repair a JSONP function call like callback({...});\n */\n function parseUnquotedString(isKey) {\n // note that the symbol can end with whitespaces: we stop at the next delimiter\n // also, note that we allow strings to contain a slash / in order to support repairing regular expressions\n const start = i;\n if (isFunctionNameCharStart(text[i])) {\n while (i < text.length && isFunctionNameChar(text[i])) {\n i++;\n }\n let j = i;\n while (isWhitespace(text, j)) {\n j++;\n }\n if (text[j] === '(') {\n // repair a MongoDB function call like NumberLong(\"2\")\n // repair a JSONP function call like callback({...});\n i = j + 1;\n parseValue();\n if (text[i] === ')') {\n // repair: skip close bracket of function call\n i++;\n if (text[i] === ';') {\n // repair: skip semicolon after JSONP call\n i++;\n }\n }\n return true;\n }\n }\n while (i < text.length && !isUnquotedStringDelimiter(text[i]) && !isQuote(text[i]) && (!isKey || text[i] !== ':')) {\n i++;\n }\n\n // test start of an url like \"https://...\" (this would be parsed as a comment)\n if (text[i - 1] === ':' && regexUrlStart.test(text.substring(start, i + 2))) {\n while (i < text.length && regexUrlChar.test(text[i])) {\n i++;\n }\n }\n if (i > start) {\n // repair unquoted string\n // also, repair undefined into null\n\n // first, go back to prevent getting trailing whitespaces in the string\n while (isWhitespace(text, i - 1) && i > 0) {\n i--;\n }\n const symbol = text.slice(start, i);\n output += symbol === 'undefined' ? 'null' : JSON.stringify(symbol);\n if (text[i] === '\"') {\n // we had a missing start quote, but now we encountered the end quote, so we can skip that one\n i++;\n }\n return true;\n }\n }\n function parseRegex() {\n if (text[i] === '/') {\n const start = i;\n i++;\n while (i < text.length && (text[i] !== '/' || text[i - 1] === '\\\\')) {\n i++;\n }\n i++;\n output += `\"${text.substring(start, i)}\"`;\n return true;\n }\n }\n function prevNonWhitespaceIndex(start) {\n let prev = start;\n while (prev > 0 && isWhitespace(text, prev)) {\n prev--;\n }\n return prev;\n }\n function atEndOfNumber() {\n return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i);\n }\n function repairNumberEndingWithNumericSymbol(start) {\n // repair numbers cut off at the end\n // this will only be called when we end after a '.', '-', or 'e' and does not\n // change the number more than it needs to make it valid JSON\n output += `${text.slice(start, i)}0`;\n }\n function throwInvalidCharacter(char) {\n throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i);\n }\n function throwUnexpectedCharacter() {\n throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i);\n }\n function throwUnexpectedEnd() {\n throw new JSONRepairError('Unexpected end of json string', text.length);\n }\n function throwObjectKeyExpected() {\n throw new JSONRepairError('Object key expected', i);\n }\n function throwColonExpected() {\n throw new JSONRepairError('Colon expected', i);\n }\n function throwInvalidUnicodeCharacter() {\n const chars = text.slice(i, i + 6);\n throw new JSONRepairError(`Invalid unicode character \"${chars}\"`, i);\n }\n}\nfunction atEndOfBlockComment(text, i) {\n return text[i] === '*' && text[i + 1] === '/';\n}\n//# sourceMappingURL=jsonrepair.js.map"],"names":[],"mappings":";;;;;;EAAO,MAAM,eAAe,SAAS,KAAK,CAAC;EAC3C,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE;EACjC,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;EAC/C,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ;EAC5B;EACA;;ECLA,MAAM,SAAS,GAAG,IAAI,CAAC;EACvB,MAAM,WAAW,GAAG,GAAG,CAAC;EACxB,MAAM,OAAO,GAAG,GAAG,CAAC;EACpB,MAAM,UAAU,GAAG,GAAG,CAAC;EACvB,MAAM,oBAAoB,GAAG,IAAI;EACjC,MAAM,UAAU,GAAG,MAAM;EACzB,MAAM,aAAa,GAAG,MAAM;EAC5B,MAAM,sBAAsB,GAAG,MAAM;EACrC,MAAM,2BAA2B,GAAG,MAAM;EAC1C,MAAM,oBAAoB,GAAG,MAAM;EAC5B,SAAS,KAAK,CAAC,IAAI,EAAE;EAC5B,EAAE,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;EACnC;EACO,SAAS,OAAO,CAAC,IAAI,EAAE;EAC9B,EAAE,OAAO,IAAI,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,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;EAC/C;;;;;;;;;"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js new file mode 100644 index 0000000000000000000000000000000000000000..efe0f47cb6de6e3d792814fab959ae01a4389455 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js @@ -0,0 +1,3 @@ +((t,n)=>{"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).JSONRepair={})})(this,function(t){class x extends Error{constructor(t,n){super(t+" at position "+n),this.position=n}}let r=32,e=10,i=9,f=13,a=160,h=8192,y=8202,O=8239,N=8287,J=12288;function S(t){return"0"<=t&&t<="9"}function j(t){return",:[]/{}()\n+".includes(t)}function k(t){return"a"<=t&&t<="z"||"A"<=t&&t<="Z"||"_"===t||"$"===t}function C(t){return"a"<=t&&t<="z"||"A"<=t&&t<="Z"||"_"===t||"$"===t||"0"<=t&&t<="9"}let m=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,z=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function E(t){return",[]/{}\n+".includes(t)}function I(t){return _(t)||n.test(t)}let n=/^[[{\w-]$/;function T(t,n){t=t.charCodeAt(n);return t===r||t===e||t===i||t===f}function Z(t,n){t=t.charCodeAt(n);return t===r||t===i||t===f}function _(t){return F(t)||U(t)}function F(t){return'"'===t||"“"===t||"”"===t}function R(t){return'"'===t}function U(t){return"'"===t||"‘"===t||"’"===t||"`"===t||"´"===t}function q(t){return"'"===t}function B(t,n,r){r=2=g.length)return v;throw new x("Unexpected character "+JSON.stringify(g[d]),d);function f(){b();var t=(()=>{if("{"!==g[d])return!1;{v+="{",d++,b(),p(",")&&b();let n=!0;for(;d{throw new x("Object key expected",d)})();break}b();var r=u(":"),e=d>=g.length,i=(r||(I(g[d])||e?v=D(v,":"):c()),f());i||(r||e?v+="null":c())}return"}"===g[d]?(v+="}",d++):v=D(v,"}"),!0}})()||(()=>{if("["!==g[d])return!1;{v+="[",d++,b(),p(",")&&b();let t=!0;for(;d{var t,n,r=d;if("-"===g[d]){if(d++,i())return s(r),!0;if(!S(g[d]))return d=r,!1}for(;S(g[d]);)d++;if("."===g[d]){if(d++,i())return s(r),!0;if(!S(g[d]))return d=r,!1;for(;S(g[d]);)d++}if("e"===g[d]||"E"===g[d]){if(d++,"-"!==g[d]&&"+"!==g[d]||d++,i())return s(r),!0;if(!S(g[d]))return d=r,!1;for(;S(g[d]);)d++}if(i()){if(d>r)return t=g.slice(r,d),n=/^0\d/.test(t),v+=n?`"${t}"`:t,!0}else d=r;return!1})()||r("true","true")||r("false","false")||r("null","null")||r("True","true")||r("False","false")||r("None","null")||l(!1)||(()=>{if("/"===g[d]){var t=d;for(d++;d{if("/"===g[d]&&"*"===g[d+1]){for(;d"*"===t[n]&&"/"===t[n+1])(g,d);)d++;d+=2}else{if("/"!==g[d]||"/"!==g[d+1])return!1;for(;d=h&&n<=y||n===O||n===N||n===J))break;i+=" "}d++}return 0{for(var n of t){var r=d+n.length;if(g.slice(d,r)===n)return d=r,1}})(t)){if(k(g[d]))for(;d=g.length)return l=A(d-1),!r&&j(g.charAt(l))?(d=u,v=v.substring(0,o),w(!0)):(n=D(n,'"'),v+=n,!0);if(d===e)return n=D(n,'"'),v+=n,!0;if(f(g[d])){var l=d,s=n.length;if(n+='"',d++,v+=n,b(!1),r||d>=g.length||j(g[d])||_(g[d])||S(g[d]))return $(),!0;var c=A(l-1),a=g.charAt(c);if(","===a)return d=u,v=v.substring(0,o),w(!1,c);if(j(a))return d=u,v=v.substring(0,o),w(!0);v=v.substring(0,o),d=l+1,n=n.substring(0,s)+"\\"+n.substring(s)}else{if(r&&E(g[d])){if(":"===g[d-1]&&m.test(g.substring(u+1,d+2)))for(;d=g.length))throw a=void 0,a=g.slice(d,d+6),new x(`Invalid unicode character "${a}"`,d);d=g.length}}else n+=c,d+=2}else{var h,s=g.charAt(d);if('"'===s&&"\\"!==g[d-1])n+="\\"+s;else if("\n"===(h=s)||"\r"===h||"\t"===h||"\b"===h||"\f"===h)n+=G[s];else{if(!(" "<=s))throw h=void 0,h=s,new x("Invalid character "+JSON.stringify(h),d);n+=s}d++}}i&&p("\\")}}return!1}function $(){let t=!1;for(b();"+"===g[d];){t=!0,d++,b();var n=(v=B(v,'"',!0)).length,r=w();v=r?(r=v,n=n,e=1,r.substring(0,n)+r.substring(n+e)):D(v,'"')}var e;t}function r(t,n){return g.slice(d,d+t.length)===t&&(v+=n,d+=t.length,!0)}function l(t){var n=d;if(k(g[d])){for(;dn){for(;T(g,d-1)&&0=g.length||j(g[d])||T(g,d)}function s(t){v+=g.slice(t,d)+"0"}function c(){throw new x("Colon expected",d)}}}); \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cd0eacbf2958a368fad5dc26e1d27b2139f9ad1c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/jsonrepair.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/umd/jsonrepair.js"],"names":["global","factory","exports","module","define","amd","globalThis","self","JSONRepair","this","JSONRepairError","Error","constructor","message","position","super","codeSpace","codeNewline","codeTab","codeReturn","codeNonBreakingSpace","codeEnQuad","codeHairSpace","codeNarrowNoBreakSpace","codeMediumMathematicalSpace","codeIdeographicSpace","isDigit","char","isDelimiter","includes","isFunctionNameCharStart","isFunctionNameChar","regexUrlStart","regexUrlChar","isUnquotedStringDelimiter","isStartOfValue","isQuote","regexStartOfValue","test","isWhitespace","text","index","code","charCodeAt","isWhitespaceExceptNewline","isDoubleQuoteLike","isSingleQuoteLike","isDoubleQuote","isSingleQuote","stripLastOccurrence","textToStrip","stripRemainingText","arguments","length","undefined","lastIndexOf","substring","insertBeforeLastWhitespace","textToInsert","let","controlCharacters","\b","\f","\n","\r","\t","escapeCharacters","\"","\\","/","b","f","n","r","t","jsonrepair","i","output","parseMarkdownCodeBlock","parseValue","processedComma","parseCharacter","parseWhitespaceAndSkipComments","parseNewlineDelimitedJSON","initial","processedValue","JSON","stringify","processed","skipCharacter","skipEllipsis","parseString","parseUnquotedString","processedColon","truncatedText","throwColonExpected","num","hasInvalidLeadingZero","start","atEndOfNumber","repairNumberEndingWithNumericSymbol","slice","parseKeyword","skipNewline","changed","parseWhitespace","_isWhiteSpace","whitespace","blocks","block","end","stopAtDelimiter","stopAtIndex","skipEscapeChars","isEndQuote","iBefore","oBefore","str","iPrev","prevNonWhitespaceIndex","charAt","iQuote","oQuote","parseConcatenatedString","iPrevChar","prevChar","j","chars","parsedStr","count","name","value","isKey","symbol","prev"],"mappings":"CAAA,CAAWA,EAAQC,KACE,UAAnB,OAAOC,SAA0C,aAAlB,OAAOC,OAAyBF,EAAQC,OAAO,EAC5D,YAAlB,OAAOE,QAAyBA,OAAOC,IAAMD,OAAO,CAAC,WAAYH,CAAO,EACGA,GAA1ED,EAA+B,aAAtB,OAAOM,WAA6BA,WAAaN,GAAUO,MAAqBC,WAAa,EAAE,CAC1G,GAAEC,KAAM,SAAWP,SAEZQ,UAAwBC,MAC5BC,YAAYC,EAASC,GACnBC,MAASF,EAAH,gBAA0BC,CAAU,EAC1CL,KAAKK,SAAWA,CAClB,CACF,CAEA,IAAME,EAAY,GACZC,EAAc,GACdC,EAAU,EACVC,EAAa,GACbC,EAAuB,IACvBC,EAAa,KACbC,EAAgB,KAChBC,EAAyB,KACzBC,EAA8B,KAC9BC,EAAuB,MAI7B,SAASC,EAAQC,GAC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MAAhBpC,EAAKoC,EAAI,IAAc5C,EAAcM,KAAKE,EAAKgB,UAAU0C,EAAOtB,EAAI,CAAC,CAAC,EACxE,KAAOA,EAAIpC,EAAKa,QAAUpB,EAAaK,KAAKE,EAAKoC,EAAE,GACjDA,CAAC,GAGL,GAAIA,EAAIsB,EAAO,CAKb,KAAO3D,EAAaC,EAAMoC,EAAI,CAAC,GAAS,EAAJA,GAClCA,CAAC,GAEGyD,EAAS7F,EAAK6D,MAAMH,EAAOtB,CAAC,EAMlC,OALAC,GAAqB,cAAXwD,EAAyB,OAAS/C,KAAKC,UAAU8C,CAAM,EACjD,MAAZ7F,EAAKoC,IAEPA,CAAC,GAEI,CAAA,CACT,CACF,CAaA,SAAS2C,EAAuBrB,GAC9BvC,IAAI2E,EAAOpC,EACX,KAAc,EAAPoC,GAAY/F,EAAaC,EAAM8F,CAAI,GACxCA,CAAI,GAEN,OAAOA,CACT,CACA,SAASnC,IACP,OAAOvB,GAAKpC,EAAKa,QAAUzB,EAAYY,EAAKoC,EAAE,GAAKrC,EAAaC,EAAMoC,CAAC,CACzE,CACA,SAASwB,EAAoCF,GAI3CrB,GAAarC,EAAK6D,MAAMH,EAAOtB,CAAC,EAAtB,GACZ,CAaA,SAASmB,IACP,MAAM,IAAIrF,EAAgB,iBAAkBkE,CAAC,CAC/C,CAKF,CAQD,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jsonrepair/lib/umd/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/data-stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/data-stream.js new file mode 100644 index 0000000000000000000000000000000000000000..3535d31d9fb315ab94cff7ce2e0dc7e220b283fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/data-stream.js @@ -0,0 +1,55 @@ +/*global module, process*/ +var Buffer = require('safe-buffer').Buffer; +var Stream = require('stream'); +var util = require('util'); + +function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + + // No input + if (!data) { + this.buffer = Buffer.alloc(0); + return this; + } + + // Stream + if (typeof data.pipe === 'function') { + this.buffer = Buffer.alloc(0); + data.pipe(this); + return this; + } + + // Buffer or String + // or Object (assumedly a passworded key) + if (data.length || typeof data === 'object') { + this.buffer = data; + this.writable = false; + process.nextTick(function () { + this.emit('end', data); + this.readable = false; + this.emit('close'); + }.bind(this)); + return this; + } + + throw new TypeError('Unexpected data type ('+ typeof data + ')'); +} +util.inherits(DataStream, Stream); + +DataStream.prototype.write = function write(data) { + this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); + this.emit('data', data); +}; + +DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit('end', data); + this.emit('close'); + this.writable = false; + this.readable = false; +}; + +module.exports = DataStream; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/sign-stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/sign-stream.js new file mode 100644 index 0000000000000000000000000000000000000000..6a7ee42f2632039611751c9202c9e5bd85daa063 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/sign-stream.js @@ -0,0 +1,78 @@ +/*global module*/ +var Buffer = require('safe-buffer').Buffer; +var DataStream = require('./data-stream'); +var jwa = require('jwa'); +var Stream = require('stream'); +var toString = require('./tostring'); +var util = require('util'); + +function base64url(string, encoding) { + return Buffer + .from(string, encoding) + .toString('base64') + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} + +function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || 'utf8'; + var encodedHeader = base64url(toString(header), 'binary'); + var encodedPayload = base64url(toString(payload), encoding); + return util.format('%s.%s', encodedHeader, encodedPayload); +} + +function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util.format('%s.%s', securedInput, signature); +} + +function SignStream(opts) { + var secret = opts.secret||opts.privateKey||opts.key; + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once('close', function () { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + + this.payload.once('close', function () { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); +} +util.inherits(SignStream, Stream); + +SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit('done', signature); + this.emit('data', signature); + this.emit('end'); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; + +SignStream.sign = jwsSign; + +module.exports = SignStream; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/tostring.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/tostring.js new file mode 100644 index 0000000000000000000000000000000000000000..f5a49a36548b1e299042c9e3d1cdd60c71d8ec0c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/tostring.js @@ -0,0 +1,10 @@ +/*global module*/ +var Buffer = require('buffer').Buffer; + +module.exports = function toString(obj) { + if (typeof obj === 'string') + return obj; + if (typeof obj === 'number' || Buffer.isBuffer(obj)) + return obj.toString(); + return JSON.stringify(obj); +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/verify-stream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/verify-stream.js new file mode 100644 index 0000000000000000000000000000000000000000..39f7c73e2829091acfaef2e64f4194d73196625a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/jws/lib/verify-stream.js @@ -0,0 +1,120 @@ +/*global module*/ +var Buffer = require('safe-buffer').Buffer; +var DataStream = require('./data-stream'); +var jwa = require('jwa'); +var Stream = require('stream'); +var toString = require('./tostring'); +var util = require('util'); +var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + +function isObject(thing) { + return Object.prototype.toString.call(thing) === '[object Object]'; +} + +function safeJsonParse(thing) { + if (isObject(thing)) + return thing; + try { return JSON.parse(thing); } + catch (e) { return undefined; } +} + +function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split('.', 1)[0]; + return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); +} + +function securedInputFromJWS(jwsSig) { + return jwsSig.split('.', 2).join('.'); +} + +function signatureFromJWS(jwsSig) { + return jwsSig.split('.')[2]; +} + +function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || 'utf8'; + var payload = jwsSig.split('.')[1]; + return Buffer.from(payload, 'base64').toString(encoding); +} + +function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); +} + +function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); +} + +function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString(jwsSig); + + if (!isValidJws(jwsSig)) + return null; + + var header = headerFromJWS(jwsSig); + + if (!header) + return null; + + var payload = payloadFromJWS(jwsSig); + if (header.typ === 'JWT' || opts.json) + payload = JSON.parse(payload, opts.encoding); + + return { + header: header, + payload: payload, + signature: signatureFromJWS(jwsSig) + }; +} + +function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret||opts.publicKey||opts.key; + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once('close', function () { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); + + this.signature.once('close', function () { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); +} +util.inherits(VerifyStream, Stream); +VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj = jwsDecode(this.signature.buffer, this.encoding); + this.emit('done', valid, obj); + this.emit('data', valid); + this.emit('end'); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; + +VerifyStream.decode = jwsDecode; +VerifyStream.isValid = isValidJws; +VerifyStream.verify = jwsVerify; + +module.exports = VerifyStream; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/dependabot.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..35d66ca7ac75f125b9c9c5b3dee0987fdfca4a45 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/stale.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/stale.yml new file mode 100644 index 0000000000000000000000000000000000000000..d51ce639022226bc44471aa18bb218b50876cd52 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/stale.yml @@ -0,0 +1,21 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 15 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - "discussion" + - "feature request" + - "bug" + - "help wanted" + - "plugin suggestion" + - "good first issue" +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/benchmark.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/benchmark.yml new file mode 100644 index 0000000000000000000000000000000000000000..924352d64e456aa48c35566a9ad1a3e97b135a20 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/benchmark.yml @@ -0,0 +1,30 @@ +name: Benchmark PR + +on: + pull_request_target: + types: + - labeled + +jobs: + benchmark: + if: ${{ github.event.label.name == 'benchmark' }} + uses: fastify/workflows/.github/workflows/plugins-benchmark-pr.yml@v5 + with: + npm-script: benchmark + + remove-label: + if: "always()" + needs: + - benchmark + runs-on: ubuntu-latest + steps: + - name: Remove benchmark label + uses: octokit/request-action@v2.x + id: remove-label + with: + route: DELETE /repos/{repo}/issues/{issue_number}/labels/{name} + repo: ${{ github.event.pull_request.head.repo.full_name }} + issue_number: ${{ github.event.pull_request.number }} + name: benchmark + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/ci.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..7f287452bb861b44759784aa6d602de548d3136c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + branches: + - main + - next + - 'v*' + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + +jobs: + test: + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5 + with: + fastify-dependency-integration: true + license-check: true + lint: true diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/benchmark/benchmark.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/benchmark/benchmark.js new file mode 100644 index 0000000000000000000000000000000000000000..661b35bbf697daa25803297683b8cb2613ae1ff6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/benchmark/benchmark.js @@ -0,0 +1,164 @@ +'use strict' + +const http = require('node:http') +const Request = require('../lib/request') +const Response = require('../lib/response') +const inject = require('..') +const parseURL = require('../lib/parse-url') +const { Readable } = require('node:stream') +const { assert } = require('node:console') +const { Bench } = require('tinybench') + +const suite = new Bench() + +const mockReq = { + url: 'http://localhost', + method: 'GET', + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + } +} +const mockCustomReq = { + url: 'http://localhost', + method: 'GET', + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + }, + Request: http.IncomingMessage +} +const mockReqCookies = { + url: 'http://localhost', + method: 'GET', + cookies: { foo: 'bar', grass: 'àìùòlé' }, + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + } +} +const mockReqCookiesPayload = { + url: 'http://localhost', + method: 'GET', + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + }, + payload: { + foo: { bar: 'fiz' }, + bim: { bar: { boom: 'paf' } } + } +} +const mockReqCookiesPayloadBuffer = { + url: 'http://localhost', + method: 'GET', + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + }, + payload: Buffer.from('foo') +} +const mockReqCookiesPayloadReadable = () => ({ + url: 'http://localhost', + method: 'GET', + headers: { + foo: 'bar', + 'content-type': 'html', + accepts: 'json', + authorization: 'granted' + }, + payload: Readable.from(['foo', 'bar', 'baz']) +}) + +suite + .add('Request', function () { + new Request(mockReq) // eslint-disable-line no-new + }) + .add('Custom Request', function () { + new Request.CustomRequest(mockCustomReq) // eslint-disable-line no-new + }) + .add('Request With Cookies', function () { + new Request(mockReqCookies) // eslint-disable-line no-new + }) + .add('Request With Cookies n payload', function () { + new Request(mockReqCookiesPayload) // eslint-disable-line no-new + }) + .add('ParseUrl', function () { + parseURL('http://example.com:8080/hello') + }) + .add('ParseUrl and query', function () { + parseURL('http://example.com:8080/hello', { + foo: 'bar', + message: 'OK', + xs: ['foo', 'bar'] + }) + }) + .add('read request body JSON', function () { + return new Promise((resolve) => { + const req = new Request(mockReqCookiesPayload) + req.prepare(() => { + req.on('data', () => {}) + req.on('end', resolve) + }) + }) + }) + .add('read request body buffer', function () { + return new Promise((resolve) => { + const req = new Request(mockReqCookiesPayloadBuffer) + req.prepare(() => { + req.on('data', () => {}) + req.on('end', resolve) + }) + }) + }) + .add('read request body readable', function () { + return new Promise((resolve) => { + const req = new Request(mockReqCookiesPayloadReadable()) + req.prepare(() => { + req.on('data', () => {}) + req.on('end', resolve) + }) + }) + }) + .add('Response write end', function () { + const req = new Request(mockReq) + return new Promise((resolve) => { + const res = new Response(req, resolve) + res.write('foo') + res.end() + }) + }) + .add('Response writeHead end', function () { + const req = new Request(mockReq) + return new Promise((resolve) => { + const res = new Response(req, resolve) + res.writeHead(400, { 'content-length': 200 }) + res.end() + }) + }) + .add('base inject', async function () { + const d = await inject((req, res) => { + req.on('data', () => {}) + req.on('end', () => { res.end('1') }) + }, mockReqCookiesPayload) + assert(d.payload === '1') + }) + .run() + .then((tasks) => { + const errors = tasks.map(t => t.result?.error).filter((t) => t) + if (errors.length) { + errors.map((e) => console.error(e)) + } else { + console.table(suite.table()) + } + }) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/build/build-validation.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/build/build-validation.js new file mode 100644 index 0000000000000000000000000000000000000000..4dc71317e6c025bb9e52ace2c8a229f97bec5bd2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/build/build-validation.js @@ -0,0 +1,100 @@ +'use strict' + +const http = require('node:http') +const AjvStandaloneCompiler = require('@fastify/ajv-compiler/standalone') +const fs = require('node:fs') +const path = require('node:path') + +const urlSchema = { + oneOf: [ + { type: 'string' }, + { + type: 'object', + properties: { + protocol: { type: 'string' }, + hostname: { type: 'string' }, + pathname: { type: 'string' } + // port type => any + // query type => any + }, + additionalProperties: true, + required: ['pathname'] + } + ] +} + +const schema = { + type: 'object', + properties: { + url: urlSchema, + path: urlSchema, + cookies: { + type: 'object', + additionalProperties: true + }, + headers: { + type: 'object', + additionalProperties: true + }, + query: { + anyOf: [ + { + type: 'object', + additionalProperties: true + }, + { + type: 'string' + } + ] + }, + simulate: { + type: 'object', + properties: { + end: { type: 'boolean' }, + split: { type: 'boolean' }, + error: { type: 'boolean' }, + close: { type: 'boolean' } + } + }, + authority: { type: 'string' }, + remoteAddress: { type: 'string' }, + method: { type: 'string', enum: http.METHODS.concat(http.METHODS.map(toLowerCase)) }, + validate: { type: 'boolean' } + // payload type => any + }, + additionalProperties: true, + oneOf: [ + { required: ['url'] }, + { required: ['path'] } + ] +} + +function toLowerCase (m) { return m.toLowerCase() } + +const factory = AjvStandaloneCompiler({ + readMode: false, + storeFunction (routeOpts, schemaValidationCode) { + const moduleCode = `// This file is autogenerated by ${__filename.replace(__dirname, 'build')}, do not edit +/* c8 ignore start */ +/* eslint-disable */ +${schemaValidationCode} +` + const file = path.join(__dirname, '..', 'lib', 'config-validator.js') + fs.writeFileSync(file, moduleCode) + console.log(`Saved ${file} file successfully`) + } +}) + +const compiler = factory({}, { + customOptions: { + code: { + source: true, + lines: true, + optimize: 3 + }, + removeAdditional: true, + coerceTypes: true + } +}) + +compiler({ schema }) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/config-validator.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/config-validator.js new file mode 100644 index 0000000000000000000000000000000000000000..fd185ad274d1b4308dba30ee55985d72c952e5c5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/config-validator.js @@ -0,0 +1,919 @@ +// This file is autogenerated by build/build-validation.js, do not edit +/* c8 ignore start */ +/* eslint-disable */ +"use strict"; +module.exports = validate10; +module.exports.default = validate10; +const schema11 = {"type":"object","properties":{"url":{"oneOf":[{"type":"string"},{"type":"object","properties":{"protocol":{"type":"string"},"hostname":{"type":"string"},"pathname":{"type":"string"}},"additionalProperties":true,"required":["pathname"]}]},"path":{"oneOf":[{"type":"string"},{"type":"object","properties":{"protocol":{"type":"string"},"hostname":{"type":"string"},"pathname":{"type":"string"}},"additionalProperties":true,"required":["pathname"]}]},"cookies":{"type":"object","additionalProperties":true},"headers":{"type":"object","additionalProperties":true},"query":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"string"}]},"simulate":{"type":"object","properties":{"end":{"type":"boolean"},"split":{"type":"boolean"},"error":{"type":"boolean"},"close":{"type":"boolean"}}},"authority":{"type":"string"},"remoteAddress":{"type":"string"},"method":{"type":"string","enum":["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE","acl","bind","checkout","connect","copy","delete","get","head","link","lock","m-search","merge","mkactivity","mkcalendar","mkcol","move","notify","options","patch","post","propfind","proppatch","purge","put","query","rebind","report","search","source","subscribe","trace","unbind","unlink","unlock","unsubscribe"]},"validate":{"type":"boolean"}},"additionalProperties":true,"oneOf":[{"required":["url"]},{"required":["path"]}]}; + +function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs1 = errors; +let valid0 = false; +let passing0 = null; +const _errs2 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +let missing0; +if((data.url === undefined) && (missing0 = "url")){ +const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +var _valid0 = _errs2 === errors; +if(_valid0){ +valid0 = true; +passing0 = 0; +} +const _errs3 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +let missing1; +if((data.path === undefined) && (missing1 = "path")){ +const err1 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +var _valid0 = _errs3 === errors; +if(_valid0 && valid0){ +valid0 = false; +passing0 = [passing0, 1]; +} +else { +if(_valid0){ +valid0 = true; +passing0 = 1; +} +} +if(!valid0){ +const err2 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +validate10.errors = vErrors; +return false; +} +else { +errors = _errs1; +if(vErrors !== null){ +if(_errs1){ +vErrors.length = _errs1; +} +else { +vErrors = null; +} +} +} +if(errors === 0){ +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.url !== undefined){ +let data0 = data.url; +const _errs5 = errors; +const _errs6 = errors; +let valid2 = false; +let passing1 = null; +const _errs7 = errors; +if(typeof data0 !== "string"){ +let dataType0 = typeof data0; +let coerced0 = undefined; +if(!(coerced0 !== undefined)){ +if(dataType0 == "number" || dataType0 == "boolean"){ +coerced0 = "" + data0; +} +else if(data0 === null){ +coerced0 = ""; +} +else { +const err3 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +} +if(coerced0 !== undefined){ +data0 = coerced0; +if(data !== undefined){ +data["url"] = coerced0; +} +} +} +var _valid1 = _errs7 === errors; +if(_valid1){ +valid2 = true; +passing1 = 0; +} +const _errs9 = errors; +if(errors === _errs9){ +if(data0 && typeof data0 == "object" && !Array.isArray(data0)){ +let missing2; +if((data0.pathname === undefined) && (missing2 = "pathname")){ +const err4 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +else { +if(data0.protocol !== undefined){ +let data1 = data0.protocol; +const _errs12 = errors; +if(typeof data1 !== "string"){ +let dataType1 = typeof data1; +let coerced1 = undefined; +if(!(coerced1 !== undefined)){ +if(dataType1 == "number" || dataType1 == "boolean"){ +coerced1 = "" + data1; +} +else if(data1 === null){ +coerced1 = ""; +} +else { +const err5 = {instancePath:instancePath+"/url/protocol",schemaPath:"#/properties/url/oneOf/1/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +} +if(coerced1 !== undefined){ +data1 = coerced1; +if(data0 !== undefined){ +data0["protocol"] = coerced1; +} +} +} +var valid3 = _errs12 === errors; +} +else { +var valid3 = true; +} +if(valid3){ +if(data0.hostname !== undefined){ +let data2 = data0.hostname; +const _errs14 = errors; +if(typeof data2 !== "string"){ +let dataType2 = typeof data2; +let coerced2 = undefined; +if(!(coerced2 !== undefined)){ +if(dataType2 == "number" || dataType2 == "boolean"){ +coerced2 = "" + data2; +} +else if(data2 === null){ +coerced2 = ""; +} +else { +const err6 = {instancePath:instancePath+"/url/hostname",schemaPath:"#/properties/url/oneOf/1/properties/hostname/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err6]; +} +else { +vErrors.push(err6); +} +errors++; +} +} +if(coerced2 !== undefined){ +data2 = coerced2; +if(data0 !== undefined){ +data0["hostname"] = coerced2; +} +} +} +var valid3 = _errs14 === errors; +} +else { +var valid3 = true; +} +if(valid3){ +if(data0.pathname !== undefined){ +let data3 = data0.pathname; +const _errs16 = errors; +if(typeof data3 !== "string"){ +let dataType3 = typeof data3; +let coerced3 = undefined; +if(!(coerced3 !== undefined)){ +if(dataType3 == "number" || dataType3 == "boolean"){ +coerced3 = "" + data3; +} +else if(data3 === null){ +coerced3 = ""; +} +else { +const err7 = {instancePath:instancePath+"/url/pathname",schemaPath:"#/properties/url/oneOf/1/properties/pathname/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err7]; +} +else { +vErrors.push(err7); +} +errors++; +} +} +if(coerced3 !== undefined){ +data3 = coerced3; +if(data0 !== undefined){ +data0["pathname"] = coerced3; +} +} +} +var valid3 = _errs16 === errors; +} +else { +var valid3 = true; +} +} +} +} +} +else { +const err8 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}; +if(vErrors === null){ +vErrors = [err8]; +} +else { +vErrors.push(err8); +} +errors++; +} +} +var _valid1 = _errs9 === errors; +if(_valid1 && valid2){ +valid2 = false; +passing1 = [passing1, 1]; +} +else { +if(_valid1){ +valid2 = true; +passing1 = 1; +} +} +if(!valid2){ +const err9 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"}; +if(vErrors === null){ +vErrors = [err9]; +} +else { +vErrors.push(err9); +} +errors++; +validate10.errors = vErrors; +return false; +} +else { +errors = _errs6; +if(vErrors !== null){ +if(_errs6){ +vErrors.length = _errs6; +} +else { +vErrors = null; +} +} +} +var valid1 = _errs5 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.path !== undefined){ +let data4 = data.path; +const _errs18 = errors; +const _errs19 = errors; +let valid4 = false; +let passing2 = null; +const _errs20 = errors; +if(typeof data4 !== "string"){ +let dataType4 = typeof data4; +let coerced4 = undefined; +if(!(coerced4 !== undefined)){ +if(dataType4 == "number" || dataType4 == "boolean"){ +coerced4 = "" + data4; +} +else if(data4 === null){ +coerced4 = ""; +} +else { +const err10 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err10]; +} +else { +vErrors.push(err10); +} +errors++; +} +} +if(coerced4 !== undefined){ +data4 = coerced4; +if(data !== undefined){ +data["path"] = coerced4; +} +} +} +var _valid2 = _errs20 === errors; +if(_valid2){ +valid4 = true; +passing2 = 0; +} +const _errs22 = errors; +if(errors === _errs22){ +if(data4 && typeof data4 == "object" && !Array.isArray(data4)){ +let missing3; +if((data4.pathname === undefined) && (missing3 = "pathname")){ +const err11 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}; +if(vErrors === null){ +vErrors = [err11]; +} +else { +vErrors.push(err11); +} +errors++; +} +else { +if(data4.protocol !== undefined){ +let data5 = data4.protocol; +const _errs25 = errors; +if(typeof data5 !== "string"){ +let dataType5 = typeof data5; +let coerced5 = undefined; +if(!(coerced5 !== undefined)){ +if(dataType5 == "number" || dataType5 == "boolean"){ +coerced5 = "" + data5; +} +else if(data5 === null){ +coerced5 = ""; +} +else { +const err12 = {instancePath:instancePath+"/path/protocol",schemaPath:"#/properties/path/oneOf/1/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err12]; +} +else { +vErrors.push(err12); +} +errors++; +} +} +if(coerced5 !== undefined){ +data5 = coerced5; +if(data4 !== undefined){ +data4["protocol"] = coerced5; +} +} +} +var valid5 = _errs25 === errors; +} +else { +var valid5 = true; +} +if(valid5){ +if(data4.hostname !== undefined){ +let data6 = data4.hostname; +const _errs27 = errors; +if(typeof data6 !== "string"){ +let dataType6 = typeof data6; +let coerced6 = undefined; +if(!(coerced6 !== undefined)){ +if(dataType6 == "number" || dataType6 == "boolean"){ +coerced6 = "" + data6; +} +else if(data6 === null){ +coerced6 = ""; +} +else { +const err13 = {instancePath:instancePath+"/path/hostname",schemaPath:"#/properties/path/oneOf/1/properties/hostname/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err13]; +} +else { +vErrors.push(err13); +} +errors++; +} +} +if(coerced6 !== undefined){ +data6 = coerced6; +if(data4 !== undefined){ +data4["hostname"] = coerced6; +} +} +} +var valid5 = _errs27 === errors; +} +else { +var valid5 = true; +} +if(valid5){ +if(data4.pathname !== undefined){ +let data7 = data4.pathname; +const _errs29 = errors; +if(typeof data7 !== "string"){ +let dataType7 = typeof data7; +let coerced7 = undefined; +if(!(coerced7 !== undefined)){ +if(dataType7 == "number" || dataType7 == "boolean"){ +coerced7 = "" + data7; +} +else if(data7 === null){ +coerced7 = ""; +} +else { +const err14 = {instancePath:instancePath+"/path/pathname",schemaPath:"#/properties/path/oneOf/1/properties/pathname/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err14]; +} +else { +vErrors.push(err14); +} +errors++; +} +} +if(coerced7 !== undefined){ +data7 = coerced7; +if(data4 !== undefined){ +data4["pathname"] = coerced7; +} +} +} +var valid5 = _errs29 === errors; +} +else { +var valid5 = true; +} +} +} +} +} +else { +const err15 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}; +if(vErrors === null){ +vErrors = [err15]; +} +else { +vErrors.push(err15); +} +errors++; +} +} +var _valid2 = _errs22 === errors; +if(_valid2 && valid4){ +valid4 = false; +passing2 = [passing2, 1]; +} +else { +if(_valid2){ +valid4 = true; +passing2 = 1; +} +} +if(!valid4){ +const err16 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf",keyword:"oneOf",params:{passingSchemas: passing2},message:"must match exactly one schema in oneOf"}; +if(vErrors === null){ +vErrors = [err16]; +} +else { +vErrors.push(err16); +} +errors++; +validate10.errors = vErrors; +return false; +} +else { +errors = _errs19; +if(vErrors !== null){ +if(_errs19){ +vErrors.length = _errs19; +} +else { +vErrors = null; +} +} +} +var valid1 = _errs18 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.cookies !== undefined){ +let data8 = data.cookies; +const _errs31 = errors; +if(errors === _errs31){ +if(!(data8 && typeof data8 == "object" && !Array.isArray(data8))){ +validate10.errors = [{instancePath:instancePath+"/cookies",schemaPath:"#/properties/cookies/type",keyword:"type",params:{type: "object"},message:"must be object"}]; +return false; +} +} +var valid1 = _errs31 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.headers !== undefined){ +let data9 = data.headers; +const _errs34 = errors; +if(errors === _errs34){ +if(!(data9 && typeof data9 == "object" && !Array.isArray(data9))){ +validate10.errors = [{instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"}]; +return false; +} +} +var valid1 = _errs34 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.query !== undefined){ +let data10 = data.query; +const _errs37 = errors; +const _errs38 = errors; +let valid6 = false; +const _errs39 = errors; +if(errors === _errs39){ +if(!(data10 && typeof data10 == "object" && !Array.isArray(data10))){ +const err17 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"}; +if(vErrors === null){ +vErrors = [err17]; +} +else { +vErrors.push(err17); +} +errors++; +} +} +var _valid3 = _errs39 === errors; +valid6 = valid6 || _valid3; +if(!valid6){ +const _errs42 = errors; +if(typeof data10 !== "string"){ +let dataType8 = typeof data10; +let coerced8 = undefined; +if(!(coerced8 !== undefined)){ +if(dataType8 == "number" || dataType8 == "boolean"){ +coerced8 = "" + data10; +} +else if(data10 === null){ +coerced8 = ""; +} +else { +const err18 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"}; +if(vErrors === null){ +vErrors = [err18]; +} +else { +vErrors.push(err18); +} +errors++; +} +} +if(coerced8 !== undefined){ +data10 = coerced8; +if(data !== undefined){ +data["query"] = coerced8; +} +} +} +var _valid3 = _errs42 === errors; +valid6 = valid6 || _valid3; +} +if(!valid6){ +const err19 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"}; +if(vErrors === null){ +vErrors = [err19]; +} +else { +vErrors.push(err19); +} +errors++; +validate10.errors = vErrors; +return false; +} +else { +errors = _errs38; +if(vErrors !== null){ +if(_errs38){ +vErrors.length = _errs38; +} +else { +vErrors = null; +} +} +} +var valid1 = _errs37 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.simulate !== undefined){ +let data11 = data.simulate; +const _errs44 = errors; +if(errors === _errs44){ +if(data11 && typeof data11 == "object" && !Array.isArray(data11)){ +if(data11.end !== undefined){ +let data12 = data11.end; +const _errs46 = errors; +if(typeof data12 !== "boolean"){ +let coerced9 = undefined; +if(!(coerced9 !== undefined)){ +if(data12 === "false" || data12 === 0 || data12 === null){ +coerced9 = false; +} +else if(data12 === "true" || data12 === 1){ +coerced9 = true; +} +else { +validate10.errors = [{instancePath:instancePath+"/simulate/end",schemaPath:"#/properties/simulate/properties/end/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}]; +return false; +} +} +if(coerced9 !== undefined){ +data12 = coerced9; +if(data11 !== undefined){ +data11["end"] = coerced9; +} +} +} +var valid7 = _errs46 === errors; +} +else { +var valid7 = true; +} +if(valid7){ +if(data11.split !== undefined){ +let data13 = data11.split; +const _errs48 = errors; +if(typeof data13 !== "boolean"){ +let coerced10 = undefined; +if(!(coerced10 !== undefined)){ +if(data13 === "false" || data13 === 0 || data13 === null){ +coerced10 = false; +} +else if(data13 === "true" || data13 === 1){ +coerced10 = true; +} +else { +validate10.errors = [{instancePath:instancePath+"/simulate/split",schemaPath:"#/properties/simulate/properties/split/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}]; +return false; +} +} +if(coerced10 !== undefined){ +data13 = coerced10; +if(data11 !== undefined){ +data11["split"] = coerced10; +} +} +} +var valid7 = _errs48 === errors; +} +else { +var valid7 = true; +} +if(valid7){ +if(data11.error !== undefined){ +let data14 = data11.error; +const _errs50 = errors; +if(typeof data14 !== "boolean"){ +let coerced11 = undefined; +if(!(coerced11 !== undefined)){ +if(data14 === "false" || data14 === 0 || data14 === null){ +coerced11 = false; +} +else if(data14 === "true" || data14 === 1){ +coerced11 = true; +} +else { +validate10.errors = [{instancePath:instancePath+"/simulate/error",schemaPath:"#/properties/simulate/properties/error/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}]; +return false; +} +} +if(coerced11 !== undefined){ +data14 = coerced11; +if(data11 !== undefined){ +data11["error"] = coerced11; +} +} +} +var valid7 = _errs50 === errors; +} +else { +var valid7 = true; +} +if(valid7){ +if(data11.close !== undefined){ +let data15 = data11.close; +const _errs52 = errors; +if(typeof data15 !== "boolean"){ +let coerced12 = undefined; +if(!(coerced12 !== undefined)){ +if(data15 === "false" || data15 === 0 || data15 === null){ +coerced12 = false; +} +else if(data15 === "true" || data15 === 1){ +coerced12 = true; +} +else { +validate10.errors = [{instancePath:instancePath+"/simulate/close",schemaPath:"#/properties/simulate/properties/close/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}]; +return false; +} +} +if(coerced12 !== undefined){ +data15 = coerced12; +if(data11 !== undefined){ +data11["close"] = coerced12; +} +} +} +var valid7 = _errs52 === errors; +} +else { +var valid7 = true; +} +} +} +} +} +else { +validate10.errors = [{instancePath:instancePath+"/simulate",schemaPath:"#/properties/simulate/type",keyword:"type",params:{type: "object"},message:"must be object"}]; +return false; +} +} +var valid1 = _errs44 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.authority !== undefined){ +let data16 = data.authority; +const _errs54 = errors; +if(typeof data16 !== "string"){ +let dataType13 = typeof data16; +let coerced13 = undefined; +if(!(coerced13 !== undefined)){ +if(dataType13 == "number" || dataType13 == "boolean"){ +coerced13 = "" + data16; +} +else if(data16 === null){ +coerced13 = ""; +} +else { +validate10.errors = [{instancePath:instancePath+"/authority",schemaPath:"#/properties/authority/type",keyword:"type",params:{type: "string"},message:"must be string"}]; +return false; +} +} +if(coerced13 !== undefined){ +data16 = coerced13; +if(data !== undefined){ +data["authority"] = coerced13; +} +} +} +var valid1 = _errs54 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.remoteAddress !== undefined){ +let data17 = data.remoteAddress; +const _errs56 = errors; +if(typeof data17 !== "string"){ +let dataType14 = typeof data17; +let coerced14 = undefined; +if(!(coerced14 !== undefined)){ +if(dataType14 == "number" || dataType14 == "boolean"){ +coerced14 = "" + data17; +} +else if(data17 === null){ +coerced14 = ""; +} +else { +validate10.errors = [{instancePath:instancePath+"/remoteAddress",schemaPath:"#/properties/remoteAddress/type",keyword:"type",params:{type: "string"},message:"must be string"}]; +return false; +} +} +if(coerced14 !== undefined){ +data17 = coerced14; +if(data !== undefined){ +data["remoteAddress"] = coerced14; +} +} +} +var valid1 = _errs56 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.method !== undefined){ +let data18 = data.method; +const _errs58 = errors; +if(typeof data18 !== "string"){ +let dataType15 = typeof data18; +let coerced15 = undefined; +if(!(coerced15 !== undefined)){ +if(dataType15 == "number" || dataType15 == "boolean"){ +coerced15 = "" + data18; +} +else if(data18 === null){ +coerced15 = ""; +} +else { +validate10.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}]; +return false; +} +} +if(coerced15 !== undefined){ +data18 = coerced15; +if(data !== undefined){ +data["method"] = coerced15; +} +} +} +if(!((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((data18 === "ACL") || (data18 === "BIND")) || (data18 === "CHECKOUT")) || (data18 === "CONNECT")) || (data18 === "COPY")) || (data18 === "DELETE")) || (data18 === "GET")) || (data18 === "HEAD")) || (data18 === "LINK")) || (data18 === "LOCK")) || (data18 === "M-SEARCH")) || (data18 === "MERGE")) || (data18 === "MKACTIVITY")) || (data18 === "MKCALENDAR")) || (data18 === "MKCOL")) || (data18 === "MOVE")) || (data18 === "NOTIFY")) || (data18 === "OPTIONS")) || (data18 === "PATCH")) || (data18 === "POST")) || (data18 === "PROPFIND")) || (data18 === "PROPPATCH")) || (data18 === "PURGE")) || (data18 === "PUT")) || (data18 === "QUERY")) || (data18 === "REBIND")) || (data18 === "REPORT")) || (data18 === "SEARCH")) || (data18 === "SOURCE")) || (data18 === "SUBSCRIBE")) || (data18 === "TRACE")) || (data18 === "UNBIND")) || (data18 === "UNLINK")) || (data18 === "UNLOCK")) || (data18 === "UNSUBSCRIBE")) || (data18 === "acl")) || (data18 === "bind")) || (data18 === "checkout")) || (data18 === "connect")) || (data18 === "copy")) || (data18 === "delete")) || (data18 === "get")) || (data18 === "head")) || (data18 === "link")) || (data18 === "lock")) || (data18 === "m-search")) || (data18 === "merge")) || (data18 === "mkactivity")) || (data18 === "mkcalendar")) || (data18 === "mkcol")) || (data18 === "move")) || (data18 === "notify")) || (data18 === "options")) || (data18 === "patch")) || (data18 === "post")) || (data18 === "propfind")) || (data18 === "proppatch")) || (data18 === "purge")) || (data18 === "put")) || (data18 === "query")) || (data18 === "rebind")) || (data18 === "report")) || (data18 === "search")) || (data18 === "source")) || (data18 === "subscribe")) || (data18 === "trace")) || (data18 === "unbind")) || (data18 === "unlink")) || (data18 === "unlock")) || (data18 === "unsubscribe"))){ +validate10.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues: schema11.properties.method.enum},message:"must be equal to one of the allowed values"}]; +return false; +} +var valid1 = _errs58 === errors; +} +else { +var valid1 = true; +} +if(valid1){ +if(data.validate !== undefined){ +let data19 = data.validate; +const _errs60 = errors; +if(typeof data19 !== "boolean"){ +let coerced16 = undefined; +if(!(coerced16 !== undefined)){ +if(data19 === "false" || data19 === 0 || data19 === null){ +coerced16 = false; +} +else if(data19 === "true" || data19 === 1){ +coerced16 = true; +} +else { +validate10.errors = [{instancePath:instancePath+"/validate",schemaPath:"#/properties/validate/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}]; +return false; +} +} +if(coerced16 !== undefined){ +data19 = coerced16; +if(data !== undefined){ +data["validate"] = coerced16; +} +} +} +var valid1 = _errs60 === errors; +} +else { +var valid1 = true; +} +} +} +} +} +} +} +} +} +} +} +else { +validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}]; +return false; +} +} +validate10.errors = vErrors; +return errors === 0; +} + diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/form-data.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/form-data.js new file mode 100644 index 0000000000000000000000000000000000000000..2812f143fc4c8d12937ee1eac8b094c85c4d91d5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/form-data.js @@ -0,0 +1,79 @@ +'use strict' + +const { randomUUID } = require('node:crypto') +const { Readable } = require('node:stream') + +let textEncoder + +function isFormDataLike (payload) { + return ( + payload && + typeof payload === 'object' && + typeof payload.append === 'function' && + typeof payload.delete === 'function' && + typeof payload.get === 'function' && + typeof payload.getAll === 'function' && + typeof payload.has === 'function' && + typeof payload.set === 'function' && + payload[Symbol.toStringTag] === 'FormData' + ) +} + +/* + partial code extraction and refactoring of `undici`. + MIT License. https://github.com/nodejs/undici/blob/043d8f1a89f606b1db259fc71f4c9bc8eb2aa1e6/lib/web/fetch/LICENSE + Reference https://github.com/nodejs/undici/blob/043d8f1a89f606b1db259fc71f4c9bc8eb2aa1e6/lib/web/fetch/body.js#L102-L168 +*/ +function formDataToStream (formdata) { + // lazy creation of TextEncoder + textEncoder = textEncoder ?? new TextEncoder() + + // we expect the function argument must be FormData + const boundary = `----formdata-${randomUUID()}` + const prefix = `--${boundary}\r\nContent-Disposition: form-data` + + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => + str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') + + const linebreak = new Uint8Array([13, 10]) // '\r\n' + + async function * asyncIterator () { + for (const [name, value] of formdata) { + if (typeof value === 'string') { + // header + yield textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n`) + // body + yield textEncoder.encode(`${normalizeLinefeeds(value)}\r\n`) + } else { + let header = `${prefix}; name="${escape(normalizeLinefeeds(name))}"` + value.name && (header += `; filename="${escape(value.name)}"`) + header += `\r\nContent-Type: ${value.type || 'application/octet-stream'}\r\n\r\n` + // header + yield textEncoder.encode(header) + // body + if (value.stream) { + yield * value.stream() + } /* c8 ignore start */ else { + // shouldn't be here since Blob / File should provide .stream + // and FormData always convert to USVString + yield value + } /* c8 ignore stop */ + yield linebreak + } + } + // end + yield textEncoder.encode(`--${boundary}--`) + } + + const stream = Readable.from(asyncIterator()) + + return { + stream, + contentType: `multipart/form-data; boundary=${boundary}` + } +} + +module.exports.isFormDataLike = isFormDataLike +module.exports.formDataToStream = formDataToStream diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/parse-url.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/parse-url.js new file mode 100644 index 0000000000000000000000000000000000000000..88afedd17d1406071fd4d358b87df50bfcd46994 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/parse-url.js @@ -0,0 +1,47 @@ +'use strict' + +const { URL } = require('node:url') + +const BASE_URL = 'http://localhost' + +/** + * Parse URL + * + * @param {(Object|String)} url + * @param {Object} [query] + * @return {URL} + */ +module.exports = function parseURL (url, query) { + if ((typeof url === 'string' || Object.prototype.toString.call(url) === '[object String]') && url.startsWith('//')) { + url = BASE_URL + url + } + const result = typeof url === 'object' + ? Object.assign(new URL(BASE_URL), url) + : new URL(url, BASE_URL) + + if (typeof query === 'string') { + query = new URLSearchParams(query) + for (const key of query.keys()) { + result.searchParams.delete(key) + for (const value of query.getAll(key)) { + result.searchParams.append(key, value) + } + } + } else { + const merged = Object.assign({}, url.query, query) + for (const key in merged) { + const value = merged[key] + + if (Array.isArray(value)) { + result.searchParams.delete(key) + for (const param of value) { + result.searchParams.append(key, param) + } + } else { + result.searchParams.set(key, value) + } + } + } + + return result +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/request.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/request.js new file mode 100644 index 0000000000000000000000000000000000000000..8f68a4529b729b178da3dbe73bc70ead1298a444 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/request.js @@ -0,0 +1,290 @@ +'use strict' + +/* eslint no-prototype-builtins: 0 */ + +const { Readable, addAbortSignal } = require('node:stream') +const util = require('node:util') +const cookie = require('cookie') +const assert = require('node:assert') +const { createDeprecation } = require('process-warning') + +const parseURL = require('./parse-url') +const { isFormDataLike, formDataToStream } = require('./form-data') +const { EventEmitter } = require('node:events') + +// request.connectin deprecation https://nodejs.org/api/http.html#http_request_connection +const FST_LIGHTMYREQUEST_DEP01 = createDeprecation({ + name: 'FastifyDeprecationLightMyRequest', + code: 'FST_LIGHTMYREQUEST_DEP01', + message: 'You are accessing "request.connection", use "request.socket" instead.' +}) + +/** + * Get hostname:port + * + * @param {URL} parsedURL + * @return {String} + */ +function hostHeaderFromURL (parsedURL) { + return parsedURL.port + ? parsedURL.host + : parsedURL.hostname + (parsedURL.protocol === 'https:' ? ':443' : ':80') +} + +/** + * Mock socket object used to fake access to a socket for a request + * + * @constructor + * @param {String} remoteAddress the fake address to show consumers of the socket + */ +class MockSocket extends EventEmitter { + constructor (remoteAddress) { + super() + this.remoteAddress = remoteAddress + } +} + +/** + * CustomRequest + * + * @constructor + * @param {Object} options + * @param {(Object|String)} options.url || options.path + * @param {String} [options.method='GET'] + * @param {String} [options.remoteAddress] + * @param {Object} [options.cookies] + * @param {Object} [options.headers] + * @param {Object} [options.query] + * @param {Object} [options.Request] + * @param {any} [options.payload] + */ +function CustomRequest (options) { + return new _CustomLMRRequest(this) + + function _CustomLMRRequest (obj) { + Request.call(obj, { + ...options, + Request: undefined + }) + Object.assign(this, obj) + + for (const fn of Object.keys(Request.prototype)) { + this.constructor.prototype[fn] = Request.prototype[fn] + } + + util.inherits(this.constructor, options.Request) + return this + } +} + +/** + * Request + * + * @constructor + * @param {Object} options + * @param {(Object|String)} options.url || options.path + * @param {String} [options.method='GET'] + * @param {String} [options.remoteAddress] + * @param {Object} [options.cookies] + * @param {Object} [options.headers] + * @param {Object} [options.query] + * @param {any} [options.payload] + */ +function Request (options) { + Readable.call(this, { + autoDestroy: false + }) + + const parsedURL = parseURL(options.url || options.path, options.query) + + this.url = parsedURL.pathname + parsedURL.search + + this.aborted = false + this.httpVersionMajor = 1 + this.httpVersionMinor = 1 + this.httpVersion = '1.1' + this.method = options.method ? options.method.toUpperCase() : 'GET' + + this.headers = {} + this.rawHeaders = [] + + const headers = options.headers || {} + + for (const field in headers) { + const fieldLowerCase = field.toLowerCase() + if ( + ( + fieldLowerCase === 'user-agent' || + fieldLowerCase === 'content-type' + ) && headers[field] === undefined + ) { + this.headers[fieldLowerCase] = undefined + continue + } + const value = headers[field] + assert(value !== undefined, 'invalid value "undefined" for header ' + field) + this.headers[fieldLowerCase] = '' + value + } + + if (('user-agent' in this.headers) === false) { + this.headers['user-agent'] = 'lightMyRequest' + } + this.headers.host = this.headers.host || options.authority || hostHeaderFromURL(parsedURL) + + if (options.cookies) { + const { cookies } = options + const cookieValues = Object.keys(cookies).map(key => cookie.serialize(key, cookies[key])) + if (this.headers.cookie) { + cookieValues.unshift(this.headers.cookie) + } + this.headers.cookie = cookieValues.join('; ') + } + + this.socket = new MockSocket(options.remoteAddress || '127.0.0.1') + + Object.defineProperty(this, 'connection', { + get () { + FST_LIGHTMYREQUEST_DEP01() + return this.socket + }, + configurable: true + }) + + // we keep both payload and body for compatibility reasons + let payload = options.payload || options.body || null + let payloadResume = payload && typeof payload.resume === 'function' + + if (isFormDataLike(payload)) { + const stream = formDataToStream(payload) + payload = stream.stream + payloadResume = true + // we override the content-type + this.headers['content-type'] = stream.contentType + this.headers['transfer-encoding'] = 'chunked' + } + + if (payload && typeof payload !== 'string' && !payloadResume && !Buffer.isBuffer(payload)) { + payload = JSON.stringify(payload) + + if (('content-type' in this.headers) === false) { + this.headers['content-type'] = 'application/json' + } + } + + // Set the content-length for the corresponding payload if none set + if (payload && !payloadResume && !Object.hasOwn(this.headers, 'content-length')) { + this.headers['content-length'] = (Buffer.isBuffer(payload) ? payload.length : Buffer.byteLength(payload)).toString() + } + + for (const header of Object.keys(this.headers)) { + this.rawHeaders.push(header, this.headers[header]) + } + + // Use _lightMyRequest namespace to avoid collision with Node + this._lightMyRequest = { + payload, + isDone: false, + simulate: options.simulate || {}, + payloadAsStream: options.payloadAsStream, + signal: options.signal + } + + const signal = options.signal + /* c8 ignore next 3 */ + if (signal) { + addAbortSignal(signal, this) + } + + { + const payload = this._lightMyRequest.payload + if (payload?._readableState) { // does quack like a modern stream + this._read = readStream + + payload.on('error', (err) => { + this.destroy(err) + }) + + payload.on('end', () => { + this.push(null) + }) + } else { + // Stream v1 are handled in index.js synchronously + this._read = readEverythingElse + } + } + + return this +} + +function readStream () { + const payload = this._lightMyRequest.payload + + let more = true + let pushed = false + let chunk + while (more && (chunk = payload.read())) { + pushed = true + more = this.push(chunk) + } + + // We set up a recursive 'readable' event only if we didn't read anything. + // Otheriwse, the stream machinery will call _read() for us. + if (more && !pushed) { + this._lightMyRequest.payload.once('readable', this._read.bind(this)) + } +} + +function readEverythingElse () { + setImmediate(() => { + if (this._lightMyRequest.isDone) { + // 'end' defaults to true + if (this._lightMyRequest.simulate.end !== false) { + this.push(null) + } + return + } + + this._lightMyRequest.isDone = true + + if (this._lightMyRequest.payload) { + if (this._lightMyRequest.simulate.split) { + this.push(this._lightMyRequest.payload.slice(0, 1)) + this.push(this._lightMyRequest.payload.slice(1)) + } else { + this.push(this._lightMyRequest.payload) + } + } + + if (this._lightMyRequest.simulate.error) { + this.emit('error', new Error('Simulated')) + } + + if (this._lightMyRequest.simulate.close) { + this.emit('close') + } + + // 'end' defaults to true + if (this._lightMyRequest.simulate.end !== false) { + this.push(null) + } + }) +} + +util.inherits(Request, Readable) +util.inherits(CustomRequest, Request) + +Request.prototype.destroy = function (error) { + if (this.destroyed || this._lightMyRequest.isDone) return + this.destroyed = true + + if (error) { + this._error = true + process.nextTick(() => this.emit('error', error)) + } + + process.nextTick(() => this.emit('close')) +} + +module.exports = Request +module.exports.Request = Request +module.exports.CustomRequest = CustomRequest diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/response.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/response.js new file mode 100644 index 0000000000000000000000000000000000000000..7555983b7ecc2a39981ae114179424283bc86829 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/lib/response.js @@ -0,0 +1,240 @@ +'use strict' + +const http = require('node:http') +const { Writable, Readable, addAbortSignal } = require('node:stream') +const util = require('node:util') + +const setCookie = require('set-cookie-parser') + +function Response (req, onEnd, reject) { + http.ServerResponse.call(this, req) + + if (req._lightMyRequest?.payloadAsStream) { + const read = this.emit.bind(this, 'drain') + this._lightMyRequest = { headers: null, trailers: {}, stream: new Readable({ read }) } + const signal = req._lightMyRequest.signal + + if (signal) { + addAbortSignal(signal, this._lightMyRequest.stream) + } + } else { + this._lightMyRequest = { headers: null, trailers: {}, payloadChunks: [] } + } + // This forces node@8 to always render the headers + this.setHeader('foo', 'bar'); this.removeHeader('foo') + + this.assignSocket(getNullSocket()) + + this._promiseCallback = typeof reject === 'function' + + let called = false + const onEndSuccess = (payload) => { + if (called) return + called = true + if (this._promiseCallback) { + return process.nextTick(() => onEnd(payload)) + } + process.nextTick(() => onEnd(null, payload)) + } + this._lightMyRequest.onEndSuccess = onEndSuccess + + let finished = false + const onEndFailure = (err) => { + if (called) { + if (this._lightMyRequest.stream && !finished) { + if (!err) { + err = new Error('response destroyed before completion') + err.code = 'LIGHT_ECONNRESET' + } + this._lightMyRequest.stream.destroy(err) + this._lightMyRequest.stream.on('error', () => {}) + } + return + } + called = true + if (!err) { + err = new Error('response destroyed before completion') + err.code = 'LIGHT_ECONNRESET' + } + if (this._promiseCallback) { + return process.nextTick(() => reject(err)) + } + process.nextTick(() => onEnd(err, null)) + } + + if (this._lightMyRequest.stream) { + this.once('finish', () => { + finished = true + this._lightMyRequest.stream.push(null) + }) + } else { + this.once('finish', () => { + const res = generatePayload(this) + res.raw.req = req + onEndSuccess(res) + }) + } + + this.connection.once('error', onEndFailure) + + this.once('error', onEndFailure) + + this.once('close', onEndFailure) +} + +util.inherits(Response, http.ServerResponse) + +Response.prototype.setTimeout = function (msecs, callback) { + this.timeoutHandle = setTimeout(() => { + this.emit('timeout') + }, msecs) + this.on('timeout', callback) + return this +} + +Response.prototype.writeHead = function () { + const result = http.ServerResponse.prototype.writeHead.apply(this, arguments) + + copyHeaders(this) + + if (this._lightMyRequest.stream) { + this._lightMyRequest.onEndSuccess(generatePayload(this)) + } + + return result +} + +Response.prototype.write = function (data, encoding, callback) { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle) + } + http.ServerResponse.prototype.write.call(this, data, encoding, callback) + if (this._lightMyRequest.stream) { + return this._lightMyRequest.stream.push(Buffer.from(data, encoding)) + } else { + this._lightMyRequest.payloadChunks.push(Buffer.from(data, encoding)) + return true + } +} + +Response.prototype.end = function (data, encoding, callback) { + if (data) { + this.write(data, encoding) + } + + http.ServerResponse.prototype.end.call(this, callback) + + this.emit('finish') + + // We need to emit 'close' otherwise stream.finished() would + // not pick it up on Node v16 + + this.destroy() +} + +Response.prototype.destroy = function (error) { + if (this.destroyed) return + this.destroyed = true + + if (error) { + process.nextTick(() => this.emit('error', error)) + } + + process.nextTick(() => this.emit('close')) +} + +Response.prototype.addTrailers = function (trailers) { + for (const key in trailers) { + this._lightMyRequest.trailers[key.toLowerCase().trim()] = trailers[key].toString().trim() + } +} + +function generatePayload (response) { + // This seems only to happen when using `fastify-express` - see https://github.com/fastify/fastify-express/issues/47 + /* c8 ignore next 3 */ + if (response._lightMyRequest.headers === null) { + copyHeaders(response) + } + serializeHeaders(response) + // Prepare response object + const res = { + raw: { + res: response + }, + headers: response._lightMyRequest.headers, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + trailers: {}, + get cookies () { + return setCookie.parse(this) + } + } + + res.trailers = response._lightMyRequest.trailers + + if (response._lightMyRequest.payloadChunks) { + // Prepare payload and trailers + const rawBuffer = Buffer.concat(response._lightMyRequest.payloadChunks) + res.rawPayload = rawBuffer + + // we keep both of them for compatibility reasons + res.payload = rawBuffer.toString() + res.body = res.payload + + // Prepare payload parsers + res.json = function parseJsonPayload () { + return JSON.parse(res.payload) + } + } else { + res.json = function () { + throw new Error('Response payload is not available with payloadAsStream: true') + } + } + + // Provide stream Readable for advanced user + res.stream = function streamPayload () { + if (response._lightMyRequest.stream) { + return response._lightMyRequest.stream + } + return Readable.from(response._lightMyRequest.payloadChunks) + } + + return res +} + +// Throws away all written data to prevent response from buffering payload +function getNullSocket () { + return new Writable({ + write (_chunk, _encoding, callback) { + setImmediate(callback) + } + }) +} + +function serializeHeaders (response) { + const headers = response._lightMyRequest.headers + + for (const headerName of Object.keys(headers)) { + const headerValue = headers[headerName] + if (Array.isArray(headerValue)) { + headers[headerName] = headerValue.map(value => '' + value) + } else { + headers[headerName] = '' + headerValue + } + } +} + +function copyHeaders (response) { + response._lightMyRequest.headers = Object.assign({}, response.getHeaders()) + + // Add raw headers + ;['Date', 'Connection', 'Transfer-Encoding'].forEach((name) => { + const regex = new RegExp('\\r\\n' + name + ': ([^\\r]*)\\r\\n') + const field = response._header?.match(regex) + if (field) { + response._lightMyRequest.headers[name.toLowerCase()] = field[1] + } + }) +} + +module.exports = Response diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.gitattributes @@ -0,0 +1,2 @@ +# Set default behavior to automatically convert line endings +* text=auto eol=lf diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/dependabot.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfa7fa6cba823110c8476a4b4ebcc07cfda12535 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/workflows/ci.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2c109e17a84efeb611caffc2b141ac74893e72c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: + - main + - master + - next + - 'v*' + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + +jobs: + test: + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5 + with: + license-check: true + lint: true + node-versions: '["16", "18", "20", "22"]' diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.taprc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.taprc new file mode 100644 index 0000000000000000000000000000000000000000..aeac42558417adfd3fb1fcc9d4a21870be7b364e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/.taprc @@ -0,0 +1,2 @@ +files: + - test/**/*[!jest].test.js diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..24f78a7a238fbb5c9f89e3243b58c22a478e431d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Fastify + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bde885a1c14c55909f539491b45fefd69e5ff552 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/README.md @@ -0,0 +1,118 @@ +# process-warning + +[![CI](https://github.com/fastify/process-warning/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/process-warning/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/process-warning.svg?style=flat)](https://www.npmjs.com/package/process-warning) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +A small utility for generating consistent warning objects across your codebase. +It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise). + +_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._ + +### Install + +``` +npm i process-warning +``` + +### Usage + +The module exports two builder functions for creating warnings. + +```js +const { + createWarning, + createDeprecation +} = require('process-warning') + +const warning = createWarning({ + name: 'ExampleWarning', + code: 'EXP_WRN_001', + message: 'Hello %s', + unlimited: true +}) +warning('world') +``` + +#### Methods + +##### `createWarning({ name, code, message[, unlimited] })` + +- `name` (`string`, required) - The error name, you can access it later with +`error.name`. For consistency, we recommend prefixing module error names +with `{YourModule}Warning` +- `code` (`string`, required) - The warning code, you can access it later with +`error.code`. For consistency, we recommend prefixing plugin error codes with +`{ThreeLetterModuleName}_`, e.g. `FST_`. NOTE: codes should be all uppercase. +- `message` (`string`, required) - The warning message. You can also use +interpolated strings for formatting the message. +- `options` (`object`, optional) - Optional options with the following +properties: + + `unlimited` (`boolean`, optional) - Should the warning be emitted more than + once? Defaults to `false`. + + +##### `createDeprecation({code, message[, options]})` + +This is a wrapper for `createWarning`. It is equivalent to invoking +`createWarning` with the `name` parameter set to "DeprecationWarning". + +Deprecation warnings have extended support for the Node.js CLI options: +`--throw-deprecation`, `--no-deprecation`, and `--trace-deprecation`. + +##### `warning([, a [, b [, c]]])` + +The returned `warning` function can used for emitting warnings. +A warning is guaranteed to be emitted at least once. + +- `[, a [, b [, c]]]` (`any`, optional) - Parameters for string interpolation. + +```js +const { createWarning } = require('process-warning') +const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'message' }) +FST_ERROR_CODE() +``` + +How to use an interpolated string: +```js +const { createWarning } = require('process-warning') +const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'}) +FST_ERROR_CODE('world') +``` + +The `warning` object has methods and properties for managing the warning's state. Useful for testing. +```js +const { createWarning } = require('process-warning') +const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'}) +console.log(FST_ERROR_CODE.emitted) // false +FST_ERROR_CODE('world') +console.log(FST_ERROR_CODE.emitted) // true + +const FST_ERROR_CODE_2 = createWarning('MyAppWarning', 'FST_ERROR_CODE_2', 'Hello %s') +FST_ERROR_CODE_2.emitted = true +FST_ERROR_CODE_2('world') // will not be emitted because it is not unlimited +``` + +How to use an unlimited warning: +```js +const { createWarning } = require('process-warning') +const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s', unlimited: true }) +FST_ERROR_CODE('world') // will be emitted +FST_ERROR_CODE('world') // will be emitted again +``` + +#### Suppressing warnings + +It is possible to suppress warnings by utilizing one of node's built-in warning suppression mechanisms. + +Warnings can be suppressed: + +- by setting the `NODE_NO_WARNINGS` environment variable to `1` +- by passing the `--no-warnings` flag to the node process +- by setting '--no-warnings' in the `NODE_OPTIONS` environment variable + +For more information see [node's documentation](https://nodejs.org/api/cli.html). + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/benchmarks/warn.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/benchmarks/warn.js new file mode 100644 index 0000000000000000000000000000000000000000..1f49bf67caaa8ecf2dbfb6192c8f69d5503561e8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/benchmarks/warn.js @@ -0,0 +1,25 @@ +'use strict' + +const { Suite } = require('benchmark') +const { createWarning } = require('..') + +const err1 = createWarning({ + name: 'TestWarning', + code: 'TST_ERROR_CODE_1', + message: 'message' +}) +const err2 = createWarning({ + name: 'TestWarning', + code: 'TST_ERROR_CODE_2', + message: 'message' +}) + +new Suite() + .add('warn', function () { + err1() + err2() + }) + .on('cycle', function (event) { + console.log(String(event.target)) + }) + .run() diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/examples/example.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/examples/example.js new file mode 100644 index 0000000000000000000000000000000000000000..db9d86282945dddcbd97736e61f147e1e6d4dfcf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/examples/example.js @@ -0,0 +1,11 @@ +'use strict' + +const { createWarning } = require('..') + +const CUSTDEP001 = createWarning({ + name: 'DeprecationWarning', + code: 'CUSTDEP001', + message: 'This is a deprecation warning' +}) + +CUSTDEP001() diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e0d4ab831bd7fb3072fe442e20cd4c8715c36a7c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/index.js @@ -0,0 +1,124 @@ +'use strict' + +const { format } = require('node:util') + +/** + * @namespace processWarning + */ + +/** + * Represents a warning item with details. + * @typedef {Function} WarningItem + * @param {*} [a] Possible message interpolation value. + * @param {*} [b] Possible message interpolation value. + * @param {*} [c] Possible message interpolation value. + * @property {string} name - The name of the warning. + * @property {string} code - The code associated with the warning. + * @property {string} message - The warning message. + * @property {boolean} emitted - Indicates if the warning has been emitted. + * @property {function} format - Formats the warning message. + */ + +/** + * Options for creating a process warning. + * @typedef {Object} ProcessWarningOptions + * @property {string} name - The name of the warning. + * @property {string} code - The code associated with the warning. + * @property {string} message - The warning message. + * @property {boolean} [unlimited=false] - If true, allows unlimited emissions of the warning. + */ + +/** + * Represents the process warning functionality. + * @typedef {Object} ProcessWarning + * @property {function} createWarning - Creates a warning item. + * @property {function} createDeprecation - Creates a deprecation warning item. + */ + +/** + * Creates a deprecation warning item. + * @function + * @memberof processWarning + * @param {ProcessWarningOptions} params - Options for creating the warning. + * @returns {WarningItem} The created deprecation warning item. + */ +function createDeprecation (params) { + return createWarning({ ...params, name: 'DeprecationWarning' }) +} + +/** + * Creates a warning item. + * @function + * @memberof processWarning + * @param {ProcessWarningOptions} params - Options for creating the warning. + * @returns {WarningItem} The created warning item. + * @throws {Error} Throws an error if name, code, or message is empty, or if opts.unlimited is not a boolean. + */ +function createWarning ({ name, code, message, unlimited = false } = {}) { + if (!name) throw new Error('Warning name must not be empty') + if (!code) throw new Error('Warning code must not be empty') + if (!message) throw new Error('Warning message must not be empty') + if (typeof unlimited !== 'boolean') throw new Error('Warning opts.unlimited must be a boolean') + + code = code.toUpperCase() + + let warningContainer = { + [name]: function (a, b, c) { + if (warning.emitted === true && warning.unlimited !== true) { + return + } + warning.emitted = true + process.emitWarning(warning.format(a, b, c), warning.name, warning.code) + } + } + if (unlimited) { + warningContainer = { + [name]: function (a, b, c) { + warning.emitted = true + process.emitWarning(warning.format(a, b, c), warning.name, warning.code) + } + } + } + + const warning = warningContainer[name] + + warning.emitted = false + warning.message = message + warning.unlimited = unlimited + warning.code = code + + /** + * Formats the warning message. + * @param {*} [a] Possible message interpolation value. + * @param {*} [b] Possible message interpolation value. + * @param {*} [c] Possible message interpolation value. + * @returns {string} The formatted warning message. + */ + warning.format = function (a, b, c) { + let formatted + if (a && b && c) { + formatted = format(message, a, b, c) + } else if (a && b) { + formatted = format(message, a, b) + } else if (a) { + formatted = format(message, a) + } else { + formatted = message + } + return formatted + } + + return warning +} + +/** + * Module exports containing the process warning functionality. + * @namespace + * @property {function} createWarning - Creates a warning item. + * @property {function} createDeprecation - Creates a deprecation warning item. + * @property {ProcessWarning} processWarning - Represents the process warning functionality. + */ +const out = { createWarning, createDeprecation } +module.exports = out +module.exports.default = out +module.exports.processWarning = out diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/package.json new file mode 100644 index 0000000000000000000000000000000000000000..12ba41929e14421f5df234b173f4fd3cb7158492 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/package.json @@ -0,0 +1,73 @@ +{ + "name": "process-warning", + "version": "4.0.1", + "description": "A small utility for creating warnings and emitting them.", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:jest && npm run test:typescript", + "test:jest": "jest jest.test.js", + "test:unit": "tap", + "test:typescript": "tsd" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/process-warning.git" + }, + "keywords": [ + "fastify", + "error", + "warning", + "utility", + "plugin", + "emit", + "once" + ], + "author": "Tomas Della Vedova", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Manuel Spigolon", + "email": "behemoth89@gmail.com" + }, + { + "name": "James Sumners", + "url": "https://james.sumners.info" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/fastify-warning/issues" + }, + "homepage": "https://github.com/fastify/fastify-warning#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "benchmark": "^2.1.4", + "eslint": "^9.17.0", + "jest": "^29.7.0", + "neostandard": "^0.12.0", + "tap": "^18.7.2", + "tsd": "^0.31.0" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-interpolated-string.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-interpolated-string.test.js new file mode 100644 index 0000000000000000000000000000000000000000..7a5b9d635fa01954d12d034da74c19f2ca995ab6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-interpolated-string.test.js @@ -0,0 +1,29 @@ +'use strict' + +const test = require('tap').test +const { createWarning } = require('..') + +test('emit with interpolated string', t => { + t.plan(4) + + process.on('warning', onWarning) + function onWarning (warning) { + t.equal(warning.name, 'TestDeprecation') + t.equal(warning.code, 'CODE') + t.equal(warning.message, 'Hello world') + t.ok(codeWarning.emitted) + } + + const codeWarning = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello %s' + }) + codeWarning('world') + codeWarning('world') + + setImmediate(() => { + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-once-only.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-once-only.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a14d06cb141efc8639657f1b244923af9e691925 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-once-only.test.js @@ -0,0 +1,28 @@ +'use strict' + +const test = require('tap').test +const { createWarning } = require('..') + +test('emit should emit a given code only once', t => { + t.plan(4) + + process.on('warning', onWarning) + function onWarning (warning) { + t.equal(warning.name, 'TestDeprecation') + t.equal(warning.code, 'CODE') + t.equal(warning.message, 'Hello world') + t.ok(warn.emitted) + } + + const warn = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello world' + }) + warn() + warn() + setImmediate(() => { + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-reset.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-reset.test.js new file mode 100644 index 0000000000000000000000000000000000000000..cdfc635251cdb24f256596fc91123189af60c532 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-reset.test.js @@ -0,0 +1,36 @@ +'use strict' + +const test = require('tap').test +const { createWarning } = require('../') + +test('a limited warning can be re-set', t => { + t.plan(4) + + let count = 0 + process.on('warning', onWarning) + function onWarning () { + count++ + } + + const warn = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello world' + }) + + warn() + t.ok(warn.emitted) + + warn() + t.ok(warn.emitted) + + warn.emitted = false + warn() + t.ok(warn.emitted) + + setImmediate(() => { + t.equal(count, 2) + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-set.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-set.test.js new file mode 100644 index 0000000000000000000000000000000000000000..695132cb88adda055c29303f773dfeab2cffb8cf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-set.test.js @@ -0,0 +1,30 @@ +'use strict' + +const test = require('tap').test +const { createWarning } = require('../') + +test('emit should set the emitted state', t => { + t.plan(3) + + process.on('warning', onWarning) + function onWarning () { + t.fail('should not be called') + } + + const warn = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello world' + }) + t.notOk(warn.emitted) + warn.emitted = true + t.ok(warn.emitted) + + warn() + t.ok(warn.emitted) + + setImmediate(() => { + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-unlimited.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-unlimited.test.js new file mode 100644 index 0000000000000000000000000000000000000000..bfce3e379b7d66aaf2c49e0425c6981de2419a96 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/emit-unlimited.test.js @@ -0,0 +1,37 @@ +'use strict' + +const test = require('tap').test +const { createWarning } = require('..') + +test('emit should emit a given code unlimited times', t => { + t.plan(50) + + let runs = 0 + const expectedRun = [] + const times = 10 + + process.on('warning', onWarning) + function onWarning (warning) { + t.equal(warning.name, 'TestDeprecation') + t.equal(warning.code, 'CODE') + t.equal(warning.message, 'Hello world') + t.ok(warn.emitted) + t.equal(runs++, expectedRun.shift()) + } + + const warn = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello world', + unlimited: true + }) + + for (let i = 0; i < times; i++) { + expectedRun.push(i) + warn() + } + setImmediate(() => { + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/index.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/index.test.js new file mode 100644 index 0000000000000000000000000000000000000000..59a3676aa6ac51a4b59c4f3ad783deff27b30f6a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/index.test.js @@ -0,0 +1,99 @@ +'use strict' + +const test = require('tap').test +const { createWarning, createDeprecation } = require('..') + +process.removeAllListeners('warning') + +test('Create warning with zero parameter', t => { + t.plan(3) + + const warnItem = createWarning({ + name: 'TestWarning', + code: 'CODE', + message: 'Not available' + }) + t.equal(warnItem.name, 'TestWarning') + t.equal(warnItem.message, 'Not available') + t.equal(warnItem.code, 'CODE') +}) + +test('Create error with 1 parameter', t => { + t.plan(3) + + const warnItem = createWarning({ + name: 'TestWarning', + code: 'CODE', + message: 'hey %s' + }) + t.equal(warnItem.name, 'TestWarning') + t.equal(warnItem.format('alice'), 'hey alice') + t.equal(warnItem.code, 'CODE') +}) + +test('Create error with 2 parameters', t => { + t.plan(3) + + const warnItem = createWarning({ + name: 'TestWarning', + code: 'CODE', + message: 'hey %s, I like your %s' + }) + t.equal(warnItem.name, 'TestWarning') + t.equal(warnItem.format('alice', 'attitude'), 'hey alice, I like your attitude') + t.equal(warnItem.code, 'CODE') +}) + +test('Create error with 3 parameters', t => { + t.plan(3) + + const warnItem = createWarning({ + name: 'TestWarning', + code: 'CODE', + message: 'hey %s, I like your %s %s' + }) + t.equal(warnItem.name, 'TestWarning') + t.equal(warnItem.format('alice', 'attitude', 'see you'), 'hey alice, I like your attitude see you') + t.equal(warnItem.code, 'CODE') +}) + +test('Creates a deprecation warning', t => { + t.plan(3) + + const deprecationItem = createDeprecation({ + name: 'DeprecationWarning', + code: 'CODE', + message: 'hello %s' + }) + t.equal(deprecationItem.name, 'DeprecationWarning') + t.equal(deprecationItem.format('world'), 'hello world') + t.equal(deprecationItem.code, 'CODE') +}) + +test('Should throw when error code has no name', t => { + t.plan(1) + t.throws(() => createWarning(), new Error('Warning name must not be empty')) +}) + +test('Should throw when error has no code', t => { + t.plan(1) + t.throws(() => createWarning({ name: 'name' }), new Error('Warning code must not be empty')) +}) + +test('Should throw when error has no message', t => { + t.plan(1) + t.throws(() => createWarning({ + name: 'name', + code: 'code' + }), new Error('Warning message must not be empty')) +}) + +test('Cannot set unlimited other than boolean', t => { + t.plan(1) + t.throws(() => createWarning({ + name: 'name', + code: 'code', + message: 'message', + unlimited: 'unlimited' + }), new Error('Warning opts.unlimited must be a boolean')) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/issue-88.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/issue-88.test.js new file mode 100644 index 0000000000000000000000000000000000000000..cc2d66fb01d3d4b7b13a9127f09816a00d739442 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/issue-88.test.js @@ -0,0 +1,33 @@ +'use strict' + +const { test } = require('tap') +const { createWarning } = require('..') + +test('Must not overwrite config', t => { + t.plan(1) + + function onWarning (warning) { + t.equal(warning.code, 'CODE_1') + } + + const a = createWarning({ + name: 'TestWarning', + code: 'CODE_1', + message: 'Msg' + }) + createWarning({ + name: 'TestWarning', + code: 'CODE_2', + message: 'Msg', + unlimited: true + }) + + process.on('warning', onWarning) + a('CODE_1') + a('CODE_1') + + setImmediate(() => { + process.removeListener('warning', onWarning) + t.end() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/jest.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/jest.test.js new file mode 100644 index 0000000000000000000000000000000000000000..894ae764a15edf92a18987c2efe957fc2ffa5d88 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/jest.test.js @@ -0,0 +1,22 @@ +/* global test, expect */ +'use strict' + +const { createWarning } = require('..') + +test('works with jest', done => { + const code = createWarning({ + name: 'TestDeprecation', + code: 'CODE', + message: 'Hello world' + }) + code('world') + + // we cannot actually listen to process warning event + // because jest messes with it (that's the point of this test) + // we can only test it was emitted indirectly + // and test no exception is raised + setImmediate(() => { + expect(code.emitted).toBeTruthy() + done() + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/no-warnings.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/no-warnings.test.js new file mode 100644 index 0000000000000000000000000000000000000000..c296e1f41818a7b23007dbe797968db1e6cab27f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/test/no-warnings.test.js @@ -0,0 +1,80 @@ +'use strict' + +const { test } = require('tap') +const { spawnSync } = require('node:child_process') +const { resolve } = require('node:path') + +const entry = resolve(__dirname, '../examples', 'example.js') + +test('--no-warnings is set in cli', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + '--no-warnings', + entry + ]) + + const stderr = child.stderr.toString() + t.equal(stderr, '') +}) + +test('--no-warnings is not set in cli', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + entry + ]) + + const stderr = child.stderr.toString() + t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) +}) + +test('NODE_NO_WARNINGS is set to 1', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + entry + ], { + env: { + NODE_NO_WARNINGS: '1' + } + }) + + const stderr = child.stderr.toString() + t.equal(stderr, '') +}) + +test('NODE_NO_WARNINGS is set to 0', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + entry + ], { + env: { + NODE_NO_WARNINGS: '0' + } + }) + + const stderr = child.stderr.toString() + t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) +}) + +test('NODE_NO_WARNINGS is not set', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + entry + ]) + + const stderr = child.stderr.toString() + t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) +}) + +test('NODE_Options contains --no-warnings', t => { + t.plan(1) + const child = spawnSync(process.execPath, [ + entry + ], { + env: { + NODE_OPTIONS: '--no-warnings' + } + }) + + const stderr = child.stderr.toString() + t.equal(stderr, '') +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0728405c6e5257cd8fde2ca6696e44d42483feb0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.d.ts @@ -0,0 +1,37 @@ +declare namespace processWarning { + export interface WarningItem { + (a?: any, b?: any, c?: any): void; + name: string; + code: string; + message: string; + emitted: boolean; + unlimited: boolean; + format(a?: any, b?: any, c?: any): string; + } + + export type WarningOptions = { + name: string; + code: string; + message: string; + unlimited?: boolean; + } + + export type DeprecationOptions = Omit + + export type ProcessWarningOptions = { + unlimited?: boolean; + } + + export type ProcessWarning = { + createWarning(params: WarningOptions): WarningItem; + createDeprecation(params: DeprecationOptions): WarningItem; + } + + export function createWarning (params: WarningOptions): WarningItem + export function createDeprecation (params: DeprecationOptions): WarningItem + + const processWarning: ProcessWarning + export { processWarning as default } +} + +export = processWarning diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.test-d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.test-d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fe338e15f2cd3693e1583e7c15f4a9203e941955 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/node_modules/process-warning/types/index.test-d.ts @@ -0,0 +1,36 @@ +import { expectType } from 'tsd' +import { createWarning, createDeprecation } from '..' + +const WarnInstance = createWarning({ + name: 'TypeScriptWarning', + code: 'CODE', + message: 'message' +}) + +expectType(WarnInstance.code) +expectType(WarnInstance.message) +expectType(WarnInstance.name) +expectType(WarnInstance.emitted) +expectType(WarnInstance.unlimited) + +expectType(WarnInstance()) +expectType(WarnInstance('foo')) +expectType(WarnInstance('foo', 'bar')) + +const buildWarnUnlimited = createWarning({ + name: 'TypeScriptWarning', + code: 'CODE', + message: 'message', + unlimited: true +}) +expectType(buildWarnUnlimited.unlimited) + +const DeprecationInstance = createDeprecation({ + code: 'CODE', + message: 'message' +}) +expectType(DeprecationInstance.code) + +DeprecationInstance() +DeprecationInstance('foo') +DeprecationInstance('foo', 'bar') diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/async-await.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/async-await.test.js new file mode 100644 index 0000000000000000000000000000000000000000..446d88e36e4db415fe12563f246746894a60122d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/async-await.test.js @@ -0,0 +1,55 @@ +'use strict' + +const { test } = require('node:test') +const inject = require('../index') + +test('basic async await', async t => { + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + try { + const res = await inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }) + t.assert.strictEqual(res.payload, 'hello') + } catch (err) { + t.assert.fail(err) + } +}) + +test('basic async await (errored)', async t => { + const dispatch = function (_req, res) { + res.connection.destroy(new Error('kaboom')) + } + + await t.assert.rejects(() => inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }), Error) +}) + +test('chainable api with async await', async t => { + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + try { + const chain = inject(dispatch).get('http://example.com:8080/hello') + const res = await chain.end() + t.assert.strictEqual(res.payload, 'hello') + } catch (err) { + t.assert.fail(err) + } +}) + +test('chainable api with async await without end()', async t => { + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + try { + const res = await inject(dispatch).get('http://example.com:8080/hello') + t.assert.strictEqual(res.payload, 'hello') + } catch (err) { + t.assert.fail(err) + } +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/index.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/index.test.js new file mode 100644 index 0000000000000000000000000000000000000000..c8bb1891d932ea612a4a114163a2dc87753857e6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/index.test.js @@ -0,0 +1,2316 @@ +'use strict' + +const { test } = require('node:test') +const { Readable, finished, pipeline } = require('node:stream') +const qs = require('node:querystring') +const fs = require('node:fs') +const zlib = require('node:zlib') +const http = require('node:http') +const eos = require('end-of-stream') +const express = require('express') +const multer = require('multer') + +const inject = require('../index') +const parseURL = require('../lib/parse-url') + +const NpmFormData = require('form-data') +const formAutoContent = require('form-auto-content') +const httpMethods = [ + 'delete', + 'get', + 'head', + 'options', + 'patch', + 'post', + 'put', + 'trace' +] + +test('returns non-chunked payload', (t, done) => { + t.plan(7) + const output = 'example.com:8080|/hello' + + const dispatch = function (req, res) { + res.statusMessage = 'Super' + res.setHeader('x-extra', 'hello') + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': output.length }) + res.end(req.headers.host + '|' + req.url) + } + + inject(dispatch, 'http://example.com:8080/hello', (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.statusMessage, 'Super') + t.assert.ok(res.headers.date) + t.assert.deepStrictEqual(res.headers, { + date: res.headers.date, + connection: 'keep-alive', + 'x-extra': 'hello', + 'content-type': 'text/plain', + 'content-length': output.length.toString() + }) + t.assert.strictEqual(res.payload, output) + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|/hello') + done() + }) +}) + +test('returns single buffer payload', (t, done) => { + t.plan(6) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host + '|' + req.url) + } + + inject(dispatch, { url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.headers.date) + t.assert.ok(res.headers.connection) + t.assert.strictEqual(res.headers['transfer-encoding'], 'chunked') + t.assert.strictEqual(res.payload, 'example.com:8080|/hello') + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|/hello') + done() + }) +}) + +test('passes headers', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.super) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', headers: { Super: 'duper' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'duper') + done() + }) +}) + +test('request has rawHeaders', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + t.assert.ok(Array.isArray(req.rawHeaders)) + t.assert.deepStrictEqual(req.rawHeaders, ['super', 'duper', 'user-agent', 'lightMyRequest', 'host', 'example.com:8080']) + res.writeHead(200) + res.end() + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', headers: { Super: 'duper' } }, (err) => { + t.assert.ifError(err) + done() + }) +}) + +test('request inherits from custom class', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + t.assert.ok(req instanceof http.IncomingMessage) + res.writeHead(200) + res.end() + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', Request: http.IncomingMessage }, (err) => { + t.assert.ifError(err) + done() + }) +}) + +test('request with custom class preserves stream data', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + t.assert.ok(req._readableState) + res.writeHead(200) + res.end() + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', Request: http.IncomingMessage }, (err) => { + t.assert.ifError(err) + done() + }) +}) + +test('assert Request option has a valid prototype', (t) => { + t.plan(2) + const dispatch = function (_req, res) { + t.assert.ifError('should not get here') + res.writeHead(500) + res.end() + } + + const MyInvalidRequest = {} + + t.assert.throws(() => { + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', Request: MyInvalidRequest }, () => {}) + }, Error) + + t.assert.throws(() => { + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', Request: 'InvalidRequest' }, () => {}) + }, Error) +}) + +test('passes remote address', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.socket.remoteAddress) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', remoteAddress: '1.2.3.4' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '1.2.3.4') + done() + }) +}) + +test('passes a socket which emits events like a normal one does', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + req.socket.on('timeout', () => {}) + res.end('added') + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'added') + done() + }) +}) + +test('includes deprecated connection on request', (t, done) => { + t.plan(3) + const warnings = process.listeners('warning') + process.removeAllListeners('warning') + function onWarning (err) { + t.assert.strictEqual(err.code, 'FST_LIGHTMYREQUEST_DEP01') + return false + } + process.on('warning', onWarning) + t.after(() => { + process.removeListener('warning', onWarning) + for (const fn of warnings) { + process.on('warning', fn) + } + }) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.connection.remoteAddress) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', remoteAddress: '1.2.3.4' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '1.2.3.4') + done() + }) +}) + +const parseQuery = url => { + const parsedURL = parseURL(url) + return qs.parse(parsedURL.search.slice(1)) +} + +test('passes query', (t, done) => { + t.plan(2) + + const query = { + message: 'OK', + xs: ['foo', 'bar'] + } + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', query }, (err, res) => { + t.assert.ifError(err) + t.assert.deepEqual(parseQuery(res.payload), query) + done() + }) +}) + +test('query will be merged into that in url', (t, done) => { + t.plan(2) + + const query = { + xs: ['foo', 'bar'] + } + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello?message=OK', query }, (err, res) => { + t.assert.ifError(err) + t.assert.deepEqual(parseQuery(res.payload), Object.assign({ message: 'OK' }, query)) + done() + }) +}) + +test('passes query as a string', (t, done) => { + t.plan(2) + + const query = 'message=OK&xs=foo&xs=bar' + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', query }, (err, res) => { + t.assert.ifError(err) + t.assert.deepEqual(parseQuery(res.payload), { + message: 'OK', + xs: ['foo', 'bar'] + }) + done() + }) +}) + +test('query as a string will be merged into that in url', (t, done) => { + t.plan(2) + + const query = 'xs=foo&xs=bar' + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello?message=OK', query }, (err, res) => { + t.assert.ifError(err) + t.assert.deepEqual(parseQuery(res.payload), Object.assign({ message: 'OK' }, { + xs: ['foo', 'bar'] + })) + done() + }) +}) + +test('passes localhost as default remote address', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.socket.remoteAddress) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '127.0.0.1') + done() + }) +}) + +test('passes host option as host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, { method: 'GET', url: '/hello', headers: { host: 'test.example.com' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'test.example.com') + done() + }) +}) + +test('passes localhost as default host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, { method: 'GET', url: '/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'localhost:80') + done() + }) +}) + +test('passes authority as host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, { method: 'GET', url: '/hello', authority: 'something' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'something') + done() + }) +}) + +test('passes uri host as host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:8080') + done() + }) +}) + +test('includes default http port in host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, 'http://example.com', (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:80') + done() + }) +}) + +test('includes default https port in host header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host) + } + + inject(dispatch, 'https://example.com', (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:443') + done() + }) +}) + +test('optionally accepts an object as url', (t, done) => { + t.plan(5) + const output = 'example.com:8080|/hello?test=1234' + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': output.length }) + res.end(req.headers.host + '|' + req.url) + } + + const url = { + protocol: 'http', + hostname: 'example.com', + port: '8080', + pathname: 'hello', + query: { + test: '1234' + } + } + + inject(dispatch, { url }, (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.headers.date) + t.assert.ok(res.headers.connection) + t.assert.ifError(res.headers['transfer-encoding']) + t.assert.strictEqual(res.payload, output) + done() + }) +}) + +test('leaves user-agent unmodified', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers['user-agent']) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', headers: { 'user-agent': 'duper' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'duper') + done() + }) +}) + +test('returns chunked payload', (t, done) => { + t.plan(5) + const dispatch = function (_req, res) { + res.writeHead(200, 'OK') + res.write('a') + res.write('b') + res.end() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.headers.date) + t.assert.ok(res.headers.connection) + t.assert.strictEqual(res.headers['transfer-encoding'], 'chunked') + t.assert.strictEqual(res.payload, 'ab') + done() + }) +}) + +test('sets trailers in response object', (t, done) => { + t.plan(4) + const dispatch = function (_req, res) { + res.setHeader('Trailer', 'Test') + res.addTrailers({ Test: 123 }) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers.trailer, 'Test') + t.assert.strictEqual(res.headers.test, undefined) + t.assert.strictEqual(res.trailers.test, '123') + done() + }) +}) + +test('parses zipped payload', (t, done) => { + t.plan(4) + const dispatch = function (_req, res) { + res.writeHead(200, 'OK') + const stream = fs.createReadStream('./package.json') + stream.pipe(zlib.createGzip()).pipe(res) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + fs.readFile('./package.json', { encoding: 'utf-8' }, (err, file) => { + t.assert.ifError(err) + + zlib.unzip(res.rawPayload, (err, unzipped) => { + t.assert.ifError(err) + t.assert.strictEqual(unzipped.toString('utf-8'), file) + done() + }) + }) + }) +}) + +test('returns multi buffer payload', (t, done) => { + t.plan(2) + const dispatch = function (_req, res) { + res.writeHead(200) + res.write('a') + res.write(Buffer.from('b')) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'ab') + done() + }) +}) + +test('returns null payload', (t, done) => { + t.plan(2) + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Length': 0 }) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '') + done() + }) +}) + +test('allows ending twice', (t, done) => { + t.plan(2) + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Length': 0 }) + res.end() + res.end() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '') + done() + }) +}) + +test('identifies injection object', (t, done) => { + t.plan(6) + const dispatchRequest = function (req, res) { + t.assert.strictEqual(inject.isInjection(req), true) + t.assert.strictEqual(inject.isInjection(res), true) + + res.writeHead(200, { 'Content-Length': 0 }) + res.end() + } + + const dispatchCustomRequest = function (req, res) { + t.assert.strictEqual(inject.isInjection(req), true) + t.assert.strictEqual(inject.isInjection(res), true) + + res.writeHead(200, { 'Content-Length': 0 }) + res.end() + } + + const options = { method: 'GET', url: '/' } + const cb = (err) => { t.assert.ifError(err) } + const cbDone = (err) => { + t.assert.ifError(err) + done() + } + + inject(dispatchRequest, options, cb) + inject(dispatchCustomRequest, { ...options, Request: http.IncomingMessage }, cbDone) +}) + +test('pipes response', (t, done) => { + t.plan(3) + let finished = false + const dispatch = function (_req, res) { + res.writeHead(200) + const stream = getTestStream() + + res.on('finish', () => { + finished = true + }) + + stream.pipe(res) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(finished, true) + t.assert.strictEqual(res.payload, 'hi') + done() + }) +}) + +test('pipes response with old stream', (t, done) => { + t.plan(3) + let finished = false + const dispatch = function (_req, res) { + res.writeHead(200) + const stream = getTestStream() + stream.pause() + const stream2 = new Readable().wrap(stream) + stream.resume() + + res.on('finish', () => { + finished = true + }) + + stream2.pipe(res) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(finished, true) + t.assert.strictEqual(res.payload, 'hi') + done() + }) +}) + +test('echos object payload', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: { a: 1 } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'application/json') + t.assert.strictEqual(res.payload, '{"a":1}') + done() + }) +}) + +test('supports body option in Request and property in Response', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test', body: { a: 1 } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'application/json') + t.assert.strictEqual(res.body, '{"a":1}') + done() + }) +}) + +test('echos buffer payload', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: Buffer.from('test!') }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'test!') + done() + }) +}) + +test('echos object payload with non-english utf-8 string', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: { a: '½½א' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'application/json') + t.assert.strictEqual(res.payload, '{"a":"½½א"}') + done() + }) +}) + +test('echos object payload without payload', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '') + done() + }) +}) + +test('retains content-type header', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: { a: 1 }, headers: { 'content-type': 'something' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'something') + t.assert.strictEqual(res.payload, '{"a":1}') + done() + }) +}) + +test('adds a content-length header if none set when payload specified', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers['content-length']) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: { a: 1 } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '{"a":1}'.length.toString()) + done() + }) +}) + +test('retains a content-length header when payload specified', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers['content-length']) + } + + inject(dispatch, { method: 'POST', url: '/test', payload: '', headers: { 'content-length': '10' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '10') + done() + }) +}) + +test('can handle a stream payload', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + readStream(req, (buff) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(buff) + }) + } + + inject(dispatch, { method: 'POST', url: '/', payload: getTestStream() }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'hi') + done() + }) +}) + +test('can handle a stream payload that errors', (t, done) => { + t.plan(2) + const dispatch = function (req) { + req.resume() + } + + const payload = new Readable({ + read () { + this.destroy(new Error('kaboom')) + } + }) + + inject(dispatch, { method: 'POST', url: '/', payload }, (err) => { + t.assert.ok(err) + t.assert.equal(err.message, 'kaboom') + done() + }) +}) + +test('can handle a stream payload of utf-8 strings', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + readStream(req, (buff) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(buff) + }) + } + + inject(dispatch, { method: 'POST', url: '/', payload: getTestStream('utf8') }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'hi') + done() + }) +}) + +test('can override stream payload content-length header', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers['content-length']) + } + + const headers = { 'content-length': '100' } + + inject(dispatch, { method: 'POST', url: '/', payload: getTestStream(), headers }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '100') + done() + }) +}) + +test('writeHead returns single buffer payload', (t, done) => { + t.plan(4) + const reply = 'Hello World' + const statusCode = 200 + const statusMessage = 'OK' + const dispatch = function (_req, res) { + res.writeHead(statusCode, statusMessage, { 'Content-Type': 'text/plain', 'Content-Length': reply.length }) + res.end(reply) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, statusCode) + t.assert.strictEqual(res.statusMessage, statusMessage) + t.assert.strictEqual(res.payload, reply) + done() + }) +}) + +test('_read() plays payload', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + let buffer = '' + req.on('readable', () => { + buffer = buffer + (req.read() || '') + }) + + req.on('close', () => { + }) + + req.on('end', () => { + res.writeHead(200, { 'Content-Length': 0 }) + res.end(buffer) + req.destroy() + }) + } + + const body = 'something special just for you' + inject(dispatch, { method: 'GET', url: '/', payload: body }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, body) + done() + }) +}) + +test('simulates split', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + let buffer = '' + req.on('readable', () => { + buffer = buffer + (req.read() || '') + }) + + req.on('close', () => { + }) + + req.on('end', () => { + res.writeHead(200, { 'Content-Length': 0 }) + res.end(buffer) + req.destroy() + }) + } + + const body = 'something special just for you' + inject(dispatch, { method: 'GET', url: '/', payload: body, simulate: { split: true } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, body) + done() + }) +}) + +test('simulates error', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + req.on('readable', () => { + }) + + req.on('error', () => { + res.writeHead(200, { 'Content-Length': 0 }) + res.end('error') + }) + } + + const body = 'something special just for you' + inject(dispatch, { method: 'GET', url: '/', payload: body, simulate: { error: true } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'error') + done() + }) +}) + +test('simulates no end without payload', (t, done) => { + t.plan(2) + let end = false + const dispatch = function (req) { + req.resume() + req.on('end', () => { + end = true + }) + } + + let replied = false + inject(dispatch, { method: 'GET', url: '/', simulate: { end: false } }, () => { + replied = true + }) + + setTimeout(() => { + t.assert.strictEqual(end, false) + t.assert.strictEqual(replied, false) + done() + }, 10) +}) + +test('simulates no end with payload', (t, done) => { + t.plan(2) + let end = false + const dispatch = function (req) { + req.resume() + req.on('end', () => { + end = true + }) + } + + let replied = false + inject(dispatch, { method: 'GET', url: '/', payload: '1234567', simulate: { end: false } }, () => { + replied = true + }) + + setTimeout(() => { + t.assert.strictEqual(end, false) + t.assert.strictEqual(replied, false) + done() + }, 10) +}) + +test('simulates close', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + let buffer = '' + req.on('readable', () => { + buffer = buffer + (req.read() || '') + }) + + req.on('close', () => { + res.writeHead(200, { 'Content-Length': 0 }) + res.end('close') + }) + + req.on('end', () => { + }) + } + + const body = 'something special just for you' + inject(dispatch, { method: 'GET', url: '/', payload: body, simulate: { close: true } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'close') + done() + }) +}) + +test('errors for invalid input options', (t) => { + t.plan(1) + + t.assert.throws( + () => inject({}, {}, () => {}), + { name: 'AssertionError', message: 'dispatchFunc should be a function' } + ) +}) + +test('errors for missing url', (t) => { + t.plan(1) + + t.assert.throws( + () => inject(() => {}, {}, () => {}), + { message: /must have required property 'url'/ } + ) +}) + +test('errors for an incorrect simulation object', (t) => { + t.plan(1) + + t.assert.throws( + () => inject(() => {}, { url: '/', simulate: 'sample string' }, () => {}), + { message: /^must be object$/ } + ) +}) + +test('ignores incorrect simulation object', (t) => { + t.plan(1) + + t.assert.doesNotThrow(() => inject(() => { }, { url: '/', simulate: 'sample string', validate: false }, () => { })) +}) + +test('errors for an incorrect simulation object values', (t) => { + t.plan(1) + + t.assert.throws( + () => inject(() => {}, { url: '/', simulate: { end: 'wrong input' } }, () => {}), + { message: /^must be boolean$/ } + ) +}) + +test('promises support', (t, done) => { + t.plan(1) + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }) + .then(res => { + t.assert.strictEqual(res.payload, 'hello') + done() + }) + .catch(t.assert.fail) +}) + +test('this should be the server instance', (t, done) => { + t.plan(2) + + const server = http.createServer() + + const dispatch = function (_req, res) { + t.assert.strictEqual(this, server) + res.end('hello') + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', server }) + .then(res => t.assert.strictEqual(res.statusCode, 200)) + .catch(t.assert.fail) + .finally(done) +}) + +test('should handle response errors', (t, done) => { + t.plan(1) + const dispatch = function (_req, res) { + res.connection.destroy(new Error('kaboom')) + } + + inject(dispatch, 'http://example.com:8080/hello', (err) => { + t.assert.ok(err) + done() + }) +}) + +test('should handle response errors (promises)', async (t) => { + t.plan(1) + const dispatch = function (_req, res) { + res.connection.destroy(new Error('kaboom')) + } + + await t.assert.rejects( + () => inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello' }), + { name: 'Error', message: 'kaboom' } + ) +}) + +test('should handle response timeout handler', (t, done) => { + t.plan(3) + const dispatch = function (_req, res) { + const handle = setTimeout(() => { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('incorrect') + }, 200) + res.setTimeout(100, () => { + clearTimeout(handle) + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('correct') + }) + res.on('timeout', () => { + t.assert.ok(true, 'Response timeout event not emitted') + }) + } + inject(dispatch, { method: 'GET', url: '/test' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'correct') + done() + }) +}) + +test('should throw on unknown HTTP method', (t) => { + t.plan(1) + const dispatch = function () { } + + t.assert.throws(() => inject(dispatch, { method: 'UNKNOWN_METHOD', url: 'http://example.com:8080/hello' }, (err, _res) => { + t.assert.ok(err) + }), Error) +}) + +test('should throw on unknown HTTP method (promises)', (t) => { + t.plan(1) + const dispatch = function () { } + + t.assert.throws(() => inject(dispatch, { method: 'UNKNOWN_METHOD', url: 'http://example.com:8080/hello' }) + .then(() => {}), Error) +}) + +test('HTTP method is case insensitive', (t, done) => { + t.plan(3) + + const dispatch = function (_req, res) { + res.end('Hi!') + } + + inject(dispatch, { method: 'get', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'Hi!') + done() + }) +}) + +test('form-data should be handled correctly', (t, done) => { + t.plan(4) + + const dispatch = function (req, res) { + t.assert.strictEqual(req.headers['transfer-encoding'], undefined) + let body = '' + req.on('data', d => { + body += d + }) + req.on('end', () => { + res.end(body) + }) + } + + const form = new NpmFormData() + form.append('my_field', 'my value') + + inject(dispatch, { + method: 'POST', + url: 'http://example.com:8080/hello', + headers: { + // Transfer-encoding is automatically deleted if Stream1 is used + 'transfer-encoding': 'chunked' + }, + payload: form + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + t.assert.ok(/--.+\r\nContent-Disposition: form-data; name="my_field"\r\n\r\nmy value\r\n--.+--\r\n/.test(res.payload)) + done() + }) +}) + +test('path as alias to url', (t, done) => { + t.plan(2) + + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, '/hello') + done() + }) +}) + +test('Should throw if both path and url are missing', (t) => { + t.plan(1) + + t.assert.throws( + () => inject(() => {}, { method: 'GET' }, () => {}), + { message: /must have required property 'url',must have required property 'path'/ } + ) +}) + +test('chainable api: backwards compatibility for promise (then)', (t, done) => { + t.plan(1) + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + inject(dispatch) + .get('/') + .then(res => t.assert.strictEqual(res.payload, 'hello')) + .catch(t.assert.fail) + .finally(done) +}) + +test('chainable api: backwards compatibility for promise (catch)', (t, done) => { + t.plan(1) + + function dispatch () { + throw Error + } + + inject(dispatch) + .get('/') + .catch(err => t.assert.ok(err)) + .finally(done) +}) + +test('chainable api: multiple call of then should return the same promise', (t, done) => { + t.plan(2) + let id = 0 + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain', 'Request-Id': id }) + ++id + t.assert.ok('request id incremented') + res.end('hello') + } + + const chain = inject(dispatch).get('/') + chain.then(res => { + chain.then(rep => { + t.assert.strictEqual(res.headers['request-id'], rep.headers['request-id']) + done() + }) + }) +}) + +test('chainable api: http methods should work correctly', (t, done) => { + t.plan(16) + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.method) + } + + httpMethods.forEach((method, index) => { + inject(dispatch)[method]('http://example.com:8080/hello') + .end((err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.body, method.toUpperCase()) + if (index === httpMethods.length - 1) { + done() + } + }) + }) +}) + +test('chainable api: http methods should throw if already invoked', (t, done) => { + t.plan(8) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + httpMethods.forEach((method, index) => { + const chain = inject(dispatch)[method]('http://example.com:8080/hello') + chain.end() + t.assert.throws(() => chain[method]('/'), Error) + if (index === httpMethods.length - 1) { + done() + } + }) +}) + +test('chainable api: body method should work correctly', (t, done) => { + t.plan(2) + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + req.pipe(res) + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .body('test') + .end((err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.body, 'test') + done() + }) +}) + +test('chainable api: cookie', (t, done) => { + t.plan(2) + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.cookie) + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .body('test') + .cookies({ hello: 'world', fastify: 'rulez' }) + .end((err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.body, 'hello=world; fastify=rulez') + done() + }) +}) + +test('chainable api: body method should throw if already invoked', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch) + chain + .get('http://example.com:8080/hello') + .end() + t.assert.throws(() => chain.body('test'), Error) +}) + +test('chainable api: headers method should work correctly', (t, done) => { + t.plan(2) + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.foo) + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .headers({ foo: 'bar' }) + .end((err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'bar') + done() + }) +}) + +test('chainable api: headers method should throw if already invoked', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch) + chain + .get('http://example.com:8080/hello') + .end() + t.assert.throws(() => chain.headers({ foo: 'bar' }), Error) +}) + +test('chainable api: payload method should work correctly', (t, done) => { + t.plan(2) + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + req.pipe(res) + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .payload('payload') + .end((err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'payload') + done() + }) +}) + +test('chainable api: payload method should throw if already invoked', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch) + chain + .get('http://example.com:8080/hello') + .end() + t.assert.throws(() => chain.payload('payload'), Error) +}) + +test('chainable api: query method should work correctly', (t, done) => { + t.plan(2) + + const query = { + message: 'OK', + xs: ['foo', 'bar'] + } + + function dispatch (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.url) + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .query(query) + .end((err, res) => { + t.assert.ifError(err) + t.assert.deepEqual(parseQuery(res.payload), query) + done() + }) +}) + +test('chainable api: query method should throw if already invoked', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch) + chain + .get('http://example.com:8080/hello') + .end() + t.assert.throws(() => chain.query({ foo: 'bar' }), Error) +}) + +test('chainable api: invoking end method after promise method should throw', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch).get('http://example.com:8080/hello') + + chain.then() + t.assert.throws(() => chain.end(), Error) +}) + +test('chainable api: invoking promise method after end method with a callback function should throw', (t, done) => { + t.plan(2) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch).get('http://example.com:8080/hello') + + chain.end((err) => { + t.assert.ifError(err) + done() + }) + t.assert.throws(() => chain.then(), Error) +}) + +test('chainable api: invoking promise method after end method without a callback function should work properly', (t, done) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + inject(dispatch) + .get('http://example.com:8080/hello') + .end() + .then(res => t.assert.strictEqual(res.payload, 'hello')) + .finally(done) +}) + +test('chainable api: invoking end method multiple times should throw', (t) => { + t.plan(1) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + const chain = inject(dispatch).get('http://example.com:8080/hello') + + chain.end() + t.assert.throws(() => chain.end(), Error) +}) + +test('chainable api: string url', (t, done) => { + t.plan(2) + + function dispatch (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + t.assert.ok('pass') + } + + const chain = inject(dispatch, 'http://example.com:8080/hello') + + chain.then(() => t.assert.ok('pass')).finally(done) +}) + +test('Response.json() should parse the JSON payload', (t, done) => { + t.plan(2) + + const jsonData = { + a: 1, + b: '2' + } + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'application/json' }) + res.end(JSON.stringify(jsonData)) + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + const { json } = res + t.assert.deepStrictEqual(json(), jsonData) + done() + }) +}) + +test('Response.json() should not throw an error if content-type is not application/json', (t, done) => { + t.plan(2) + + const jsonData = { + a: 1, + b: '2' + } + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(JSON.stringify(jsonData)) + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + const { json } = res + t.assert.deepStrictEqual(json(), jsonData) + done() + }) +}) + +test('Response.json() should throw an error if the payload is not of valid JSON format', (t, done) => { + t.plan(2) + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'application/json' }) + res.end('notAJSON') + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.throws(res.json, Error) + done() + }) +}) + +test('Response.stream() should provide a Readable stream', (t, done) => { + const lines = [ + JSON.stringify({ foo: 'bar' }), + JSON.stringify({ hello: 'world' }) + ] + + t.plan(2 + lines.length) + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'multiple/json' }) + for (const line of lines) { + res.write(line) + } + res.end() + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + const readable = res.stream() + const payload = [] + t.assert.strictEqual(readable instanceof Readable, true) + readable.on('data', function (chunk) { + payload.push(chunk) + }) + readable.on('end', function () { + for (let i = 0; i < lines.length; i++) { + t.assert.strictEqual(lines[i], payload[i].toString()) + } + done() + }) + }) +}) + +test('promise api should auto start (fire and forget)', (t, done) => { + t.plan(1) + + function dispatch (_req, res) { + t.assert.ok('dispatch called') + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + } + + inject(dispatch, 'http://example.com:8080/hello') + process.nextTick(done) +}) + +test('disabling autostart', (t, done) => { + t.plan(3) + + let called = false + + function dispatch (_req, res) { + t.assert.ok('dispatch called') + called = true + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end() + done() + } + + const p = inject(dispatch, { + url: 'http://example.com:8080/hello', + autoStart: false + }) + + setImmediate(() => { + t.assert.strictEqual(called, false) + p.then(() => { + t.assert.strictEqual(called, true) + }) + }) +}) + +function getTestStream (encoding) { + const word = 'hi' + let i = 0 + + const stream = new Readable({ + read () { + this.push(word[i] ? word[i++] : null) + } + }) + + if (encoding) { + stream.setEncoding(encoding) + } + + return stream +} + +function readStream (stream, callback) { + const chunks = [] + + stream.on('data', (chunk) => chunks.push(chunk)) + + stream.on('end', () => { + return callback(Buffer.concat(chunks)) + }) +} + +test('send cookie', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host + '|' + req.headers.cookie) + } + + inject(dispatch, { url: 'http://example.com:8080/hello', cookies: { foo: 'bar', grass: 'àìùòlé' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:8080|foo=bar; grass=%C3%A0%C3%AC%C3%B9%C3%B2l%C3%A9') + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|foo=bar; grass=%C3%A0%C3%AC%C3%B9%C3%B2l%C3%A9') + done() + }) +}) + +test('send cookie with header already set', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host + '|' + req.headers.cookie) + } + + inject(dispatch, { + url: 'http://example.com:8080/hello', + headers: { cookie: 'custom=one' }, + cookies: { foo: 'bar', grass: 'àìùòlé' } + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:8080|custom=one; foo=bar; grass=%C3%A0%C3%AC%C3%B9%C3%B2l%C3%A9') + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|custom=one; foo=bar; grass=%C3%A0%C3%AC%C3%B9%C3%B2l%C3%A9') + done() + }) +}) + +test('read cookie', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.setHeader('Set-Cookie', [ + 'type=ninja', + 'dev=me; Expires=Fri, 17 Jan 2020 20:26:08 -0000; Max-Age=1234; Domain=.home.com; Path=/wow; Secure; HttpOnly; SameSite=Strict' + ]) + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host + '|' + req.headers.cookie) + } + + inject(dispatch, { url: 'http://example.com:8080/hello', cookies: { foo: 'bar' } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:8080|foo=bar') + t.assert.deepStrictEqual(res.cookies, [ + { name: 'type', value: 'ninja' }, + { + name: 'dev', + value: 'me', + expires: new Date('Fri, 17 Jan 2020 20:26:08 -0000'), + maxAge: 1234, + domain: '.home.com', + path: '/wow', + secure: true, + httpOnly: true, + sameSite: 'Strict' + } + ]) + done() + }) +}) + +test('correctly handles no string headers', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + const payload = JSON.stringify(req.headers) + res.writeHead(200, { + 'Content-Type': 'application/json', + integer: 12, + float: 3.14, + null: null, + string: 'string', + object: { foo: 'bar' }, + array: [1, 'two', 3], + date, + true: true, + false: false + }) + res.end(payload) + } + + const date = new Date(0) + const headers = { + integer: 12, + float: 3.14, + null: null, + string: 'string', + object: { foo: 'bar' }, + array: [1, 'two', 3], + date, + true: true, + false: false + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', headers }, (err, res) => { + t.assert.ifError(err) + + t.assert.deepStrictEqual(res.headers, { + integer: '12', + float: '3.14', + null: 'null', + string: 'string', + object: '[object Object]', + array: ['1', 'two', '3'], + date: date.toString(), + true: 'true', + false: 'false', + connection: 'keep-alive', + 'transfer-encoding': 'chunked', + 'content-type': 'application/json' + }) + + t.assert.deepStrictEqual(JSON.parse(res.payload), { + integer: '12', + float: '3.14', + null: 'null', + string: 'string', + object: '[object Object]', + array: '1,two,3', + date: date.toString(), + true: 'true', + false: 'false', + host: 'example.com:8080', + 'user-agent': 'lightMyRequest' + }) + done() + }) +}) + +test('errors for invalid undefined header value', (t, done) => { + t.plan(1) + try { + inject(() => {}, { url: '/', headers: { 'header-key': undefined } }, () => {}) + } catch (err) { + t.assert.ok(err) + done() + } +}) + +test('example with form-auto-content', (t, done) => { + t.plan(4) + const dispatch = function (req, res) { + let body = '' + req.on('data', d => { + body += d + }) + req.on('end', () => { + res.end(body) + }) + } + + const form = formAutoContent({ + myField: 'my value', + myFile: fs.createReadStream('./LICENSE') + }) + + inject(dispatch, { + method: 'POST', + url: 'http://example.com:8080/hello', + payload: form.payload, + headers: form.headers + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + t.assert.ok(/--.+\r\nContent-Disposition: form-data; name="myField"\r\n\r\nmy value\r\n--.*/.test(res.payload)) + t.assert.ok(/--.+\r\nContent-Disposition: form-data; name="myFile"; filename="LICENSE"\r\n.*/.test(res.payload)) + done() + }) +}) + +test('simulate invalid alter _lightMyRequest.isDone with end', (t, done) => { + const dispatch = function (req) { + req.resume() + req._lightMyRequest.isDone = true + req.on('end', () => { + t.assert.ok('should have end event') + done() + }) + } + + inject(dispatch, { method: 'GET', url: '/', simulate: { end: true } }, () => { + t.assert.fail('should not have reply') + }) +}) + +test('simulate invalid alter _lightMyRequest.isDone without end', (t, done) => { + const dispatch = function (req) { + req.resume() + req._lightMyRequest.isDone = true + req.on('end', () => { + t.assert.fail('should not have end event') + }) + done() + } + + inject(dispatch, { method: 'GET', url: '/', simulate: { end: false } }, () => { + t.assert.fail('should not have reply') + }) +}) + +test('no error for response destroy', (t, done) => { + t.plan(2) + + const dispatch = function (_req, res) { + res.destroy() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.equal(res, null) + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + done() + }) +}) + +test('request destory without.assert.ifError', (t, done) => { + t.plan(2) + + const dispatch = function (req) { + req.destroy() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + t.assert.equal(res, null) + done() + }) +}) + +test('request destory with error', (t, done) => { + t.plan(2) + + const fakeError = new Error('some-err') + + const dispatch = function (req) { + req.destroy(fakeError) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.strictEqual(err, fakeError) + t.assert.strictEqual(res, null) + done() + }) +}) + +test('compatible with stream.finished', (t, done) => { + t.plan(3) + + const dispatch = function (req, res) { + finished(res, (err) => { + t.assert.ok(err instanceof Error) + }) + + req.destroy() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + t.assert.equal(res, null) + done() + }) +}) + +test('compatible with eos', (t, done) => { + t.plan(4) + + const dispatch = function (req, res) { + eos(res, (err) => { + t.assert.ok(err instanceof Error) + }) + + req.destroy() + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ok(err) + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + t.assert.equal(res, null) + done() + }) +}) + +test('compatible with stream.finished pipe a Stream', (t, done) => { + t.plan(3) + + const dispatch = function (_req, res) { + finished(res, (err) => { + t.assert.ifError(err) + }) + + new Readable({ + read () { + this.push('hello world') + this.push(null) + } + }).pipe(res) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.body, 'hello world') + done() + }) +}) + +test('compatible with eos, passes error correctly', (t, done) => { + t.plan(3) + + const fakeError = new Error('some-error') + + const dispatch = function (req, res) { + eos(res, (err) => { + t.assert.strictEqual(err, fakeError) + }) + + req.destroy(fakeError) + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.strictEqual(err, fakeError) + t.assert.strictEqual(res, null) + done() + }) +}) + +test('multiple calls to req.destroy should not be called', (t, done) => { + t.plan(2) + + const dispatch = function (req) { + req.destroy() + req.destroy() // twice + } + + inject(dispatch, { method: 'GET', url: '/' }, (err, res) => { + t.assert.equal(res, null) + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + done() + }) +}) + +test('passes headers when using an express app', (t, done) => { + t.plan(2) + + const app = express() + + app.get('/hello', (_req, res) => { + res.setHeader('Some-Fancy-Header', 'a very cool value') + res.end() + }) + + inject(app, { method: 'GET', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['some-fancy-header'], 'a very cool value') + done() + }) +}) + +test('value of request url when using inject should not differ', (t, done) => { + t.plan(1) + + const server = http.createServer() + + const dispatch = function (req, res) { + res.end(req.url) + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080//hello', server }) + .then(res => { t.assert.strictEqual(res.body, '//hello') }) + .catch(err => t.assert.ifError(err)) + .finally(done) +}) + +test('Can parse paths with single leading slash', (t) => { + t.plan(1) + const parsedURL = parseURL('/test', undefined) + t.assert.strictEqual(parsedURL.href, 'http://localhost/test') +}) + +test('Can parse paths with two leading slashes', (t) => { + t.plan(1) + const parsedURL = parseURL('//test', undefined) + t.assert.strictEqual(parsedURL.href, 'http://localhost//test') +}) + +test('Can parse URLs with two leading slashes', (t) => { + t.plan(1) + const parsedURL = parseURL('https://example.com//test', undefined) + t.assert.strictEqual(parsedURL.href, 'https://example.com//test') +}) + +test('Can parse URLs with single leading slash', (t) => { + t.plan(1) + const parsedURL = parseURL('https://example.com/test', undefined) + t.assert.strictEqual(parsedURL.href, 'https://example.com/test') +}) + +test('Can abort a request using AbortController/AbortSignal', (t) => { + t.plan(1) + + const dispatch = function () {} + + const controller = new AbortController() + const promise = inject(dispatch, { + method: 'GET', + url: 'http://example.com:8080/hello', + signal: controller.signal + }) + controller.abort() + const wanted = new Error('The operation was aborted') + wanted.name = 'AbortError' + t.assert.rejects(promise, wanted) +}, { skip: globalThis.AbortController == null }) + +test('should pass req to ServerResponse', (t, done) => { + if (parseInt(process.versions.node.split('.', 1)[0], 10) < 16) { + t.assert.ok('Skip because Node version < 16') + t.end() + return + } + + t.plan(5) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.host + '|' + req.url) + } + + inject(dispatch, 'http://example.com:8080/hello', (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.raw.req === res.raw.res.req) + t.assert.ok(res.raw.res.req.removeListener) + t.assert.strictEqual(res.payload, 'example.com:8080|/hello') + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|/hello') + done() + }) +}) + +test('should work with pipeline', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + pipeline(req.headers.host + '|' + req.url, res, () => res.end()) + } + + inject(dispatch, 'http://example.com:8080/hello', (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, 'example.com:8080|/hello') + t.assert.strictEqual(res.rawPayload.toString(), 'example.com:8080|/hello') + done() + }) +}) + +test('should leave the headers user-agent and content-type undefined when the headers are explicitly set to undefined in the inject', (t, done) => { + t.plan(5) + const dispatch = function (req, res) { + t.assert.ok(Array.isArray(req.rawHeaders)) + t.assert.strictEqual(req.headers['user-agent'], undefined) + t.assert.strictEqual(req.headers['content-type'], undefined) + t.assert.strictEqual(req.headers['x-foo'], 'bar') + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('Ok') + } + + inject(dispatch, { + url: 'http://example.com:8080/hello', + method: 'POST', + headers: { + 'x-foo': 'bar', + 'user-agent': undefined, + 'content-type': undefined + }, + body: {} + }, (err) => { + t.assert.ifError(err) + done() + }) +}) + +test("passes payload when using express' send", (t, done) => { + t.plan(3) + + const app = express() + + app.get('/hello', (_req, res) => { + res.send('some text') + }) + + inject(app, { method: 'GET', url: 'http://example.com:8080/hello' }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-length'], '9') + t.assert.strictEqual(res.payload, 'some text') + done() + }) +}) + +test('request that is destroyed errors', (t, done) => { + t.plan(2) + const dispatch = function (req, res) { + readStream(req, () => { + req.destroy() // this should be a no-op + setImmediate(() => { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hi') + }) + }) + } + + const payload = getTestStream() + + inject(dispatch, { method: 'POST', url: '/', payload }, (err, res) => { + t.assert.equal(res, null) + t.assert.equal(err.code, 'LIGHT_ECONNRESET') + done() + }) +}) + +function runFormDataUnitTest (name, { FormData, Blob }) { + test(`${name} - form-data should be handled correctly`, (t, done) => { + t.plan(23) + + const dispatch = function (req, res) { + let body = '' + t.assert.ok(/multipart\/form-data; boundary=----formdata-[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}(--)?$/.test(req.headers['content-type']), 'proper Content-Type provided') + req.on('data', d => { + body += d + }) + req.on('end', () => { + res.end(body) + }) + } + + const form = new FormData() + form.append('field', 'value') + form.append('blob', new Blob(['value']), '') + form.append('blob-with-type', new Blob(['value'], { type: 'text/plain' }), '') + form.append('blob-with-name', new Blob(['value']), 'file.txt') + form.append('number', 1) + + inject(dispatch, { + method: 'POST', + url: 'http://example.com:8080/hello', + payload: form + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + + const regexp = [ + // header + /^------formdata-[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}(--)?$/, + // content-disposition + /^Content-Disposition: form-data; name="(.*)"(; filename="(.*)")?$/, + // content-type + /^Content-Type: (.*)$/ + ] + const readable = Readable.from(res.body.split('\r\n')) + let i = 1 + readable.on('data', function (chunk) { + switch (i) { + case 1: + case 5: + case 10: + case 15: + case 20: { + // header + t.assert.ok(regexp[0].test(chunk), 'correct header') + break + } + case 2: + case 6: + case 11: + case 16: { + // content-disposition + t.assert.ok(regexp[1].test(chunk), 'correct content-disposition') + break + } + case 7: + case 12: + case 17: { + // content-type + t.assert.ok(regexp[2].test(chunk), 'correct content-type') + break + } + case 3: + case 8: + case 13: + case 18: { + // empty + t.assert.strictEqual(chunk, '', 'correct space') + break + } + case 4: + case 9: + case 14: + case 19: { + // value + t.assert.strictEqual(chunk, 'value', 'correct value') + break + } + } + i++ + }) + done() + }) + }, { skip: FormData == null || Blob == null }) +} + +// supports >= node@18 +runFormDataUnitTest('native', { FormData: globalThis.FormData, Blob: globalThis.Blob }) +// supports >= node@16 +runFormDataUnitTest('undici', { FormData: require('undici').FormData, Blob: require('node:buffer').Blob }) +// supports >= node@14 +runFormDataUnitTest('formdata-node', { FormData: require('formdata-node').FormData, Blob: require('formdata-node').Blob }) + +test('QUERY method works', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'QUERY', url: '/test', payload: { a: 1 } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'application/json') + t.assert.strictEqual(res.payload, '{"a":1}') + done() + }) +}) + +test('query method works', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'content-type': req.headers['content-type'] }) + req.pipe(res) + } + + inject(dispatch, { method: 'query', url: '/test', payload: { a: 1 } }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-type'], 'application/json') + t.assert.strictEqual(res.payload, '{"a":1}') + done() + }) +}) + +test('should return the file content', async (t) => { + const multerMiddleware = multer({ + storage: multer.memoryStorage(), + limits: { + fileSize: 1024 + } + }) + + const app = express() + + app.use((req, res, next) => { + if (req.headers['content-type'].indexOf('multipart/form-data') === 0) { + req.multipart = true + } + next() + }) + + app.post('/hello', multerMiddleware.single('textFile'), (req, res) => { + res.send(req.file.buffer.toString('utf8')) + }) + app.use((err, req, res, next) => { + console.warn(err) + res.status(500).send('Something was wrong') + }) + + const formData = new FormData() + formData.append('textFile', new Blob(['some data']), 'sample.txt') + + const response = await inject(app, { + method: 'POST', + url: 'http://example.com:8080/hello', + payload: formData + }) + + t.assert.equal(response.statusCode, 200) + t.assert.equal(response.payload, 'some data') +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/request.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/request.test.js new file mode 100644 index 0000000000000000000000000000000000000000..1f8a46d1479725b41ed556c5d7c75ebf05930a8c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/request.test.js @@ -0,0 +1,16 @@ +'use strict' + +const { test } = require('node:test') + +const Request = require('../lib/request') + +test('aborted property should be false', async (t) => { + const mockReq = { + url: 'http://localhost', + method: 'GET', + headers: {} + } + const req = new Request(mockReq) + + t.assert.strictEqual(req.aborted, false) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/response.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/response.test.js new file mode 100644 index 0000000000000000000000000000000000000000..0806b4582d1d99e51e8cff2e080ec6fa0f33185f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/response.test.js @@ -0,0 +1,19 @@ +'use strict' + +const { test } = require('node:test') + +const Response = require('../lib/response') + +test('multiple calls to res.destroy should not be called', (t, done) => { + t.plan(2) + + const mockReq = {} + const res = new Response(mockReq, (err) => { + t.assert.ok(err) + t.assert.strictEqual(err.code, 'LIGHT_ECONNRESET') + done() + }) + + res.destroy() + res.destroy() +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/stream.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/stream.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a80ce2dd43e56ef110c8a0181e837d38740a5109 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/test/stream.test.js @@ -0,0 +1,359 @@ +'use strict' + +const t = require('node:test') +const fs = require('node:fs') +const test = t.test +const zlib = require('node:zlib') +const express = require('express') + +const inject = require('../index') + +function accumulate (stream, cb) { + const chunks = [] + stream.on('error', cb) + stream.on('data', (chunk) => { + chunks.push(chunk) + }) + stream.on('end', () => { + cb(null, Buffer.concat(chunks)) + }) +} + +test('stream mode - non-chunked payload', (t, done) => { + t.plan(9) + const output = 'example.com:8080|/hello' + + const dispatch = function (req, res) { + res.statusMessage = 'Super' + res.setHeader('x-extra', 'hello') + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': output.length }) + res.end(req.headers.host + '|' + req.url) + } + + inject(dispatch, { + url: 'http://example.com:8080/hello', + payloadAsStream: true + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.statusMessage, 'Super') + t.assert.ok(res.headers.date) + t.assert.deepStrictEqual(res.headers, { + date: res.headers.date, + connection: 'keep-alive', + 'x-extra': 'hello', + 'content-type': 'text/plain', + 'content-length': output.length.toString() + }) + t.assert.strictEqual(res.payload, undefined) + t.assert.strictEqual(res.rawPayload, undefined) + + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), 'example.com:8080|/hello') + done() + }) + }) +}) + +test('stream mode - passes headers', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end(req.headers.super) + } + + inject(dispatch, { + method: 'GET', + url: 'http://example.com:8080/hello', + headers: { Super: 'duper' }, + payloadAsStream: true + }, (err, res) => { + t.assert.ifError(err) + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), 'duper') + done() + }) + }) +}) + +test('stream mode - returns chunked payload', (t, done) => { + t.plan(6) + const dispatch = function (_req, res) { + res.writeHead(200, 'OK') + res.write('a') + res.write('b') + res.end() + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.headers.date) + t.assert.ok(res.headers.connection) + t.assert.strictEqual(res.headers['transfer-encoding'], 'chunked') + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), 'ab') + done() + }) + }) +}) + +test('stream mode - backpressure', (t, done) => { + t.plan(7) + let expected + const dispatch = function (_req, res) { + res.writeHead(200, 'OK') + res.write('a') + const buf = Buffer.alloc(1024 * 1024).fill('b') + t.assert.strictEqual(res.write(buf), false) + expected = 'a' + buf.toString() + res.on('drain', () => { + res.end() + }) + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + t.assert.ok(res.headers.date) + t.assert.ok(res.headers.connection) + t.assert.strictEqual(res.headers['transfer-encoding'], 'chunked') + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), expected) + done() + }) + }) +}) + +test('stream mode - sets trailers in response object', (t, done) => { + t.plan(4) + const dispatch = function (_req, res) { + res.setHeader('Trailer', 'Test') + res.addTrailers({ Test: 123 }) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers.trailer, 'Test') + t.assert.strictEqual(res.headers.test, undefined) + t.assert.strictEqual(res.trailers.test, '123') + done() + }) +}) + +test('stream mode - parses zipped payload', (t, done) => { + t.plan(5) + const dispatch = function (_req, res) { + res.writeHead(200, 'OK') + const stream = fs.createReadStream('./package.json') + stream.pipe(zlib.createGzip()).pipe(res) + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + fs.readFile('./package.json', { encoding: 'utf-8' }, (err, file) => { + t.assert.ifError(err) + + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + + zlib.unzip(payload, (err, unzipped) => { + t.assert.ifError(err) + t.assert.strictEqual(unzipped.toString('utf-8'), file) + done() + }) + }) + }) + }) +}) + +test('stream mode - returns multi buffer payload', (t, done) => { + t.plan(3) + const dispatch = function (_req, res) { + res.writeHead(200) + res.write('a') + res.write(Buffer.from('b')) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + + const chunks = [] + const stream = res.stream() + stream.on('data', (chunk) => { + chunks.push(chunk) + }) + + stream.on('end', () => { + t.assert.strictEqual(chunks.length, 2) + t.assert.strictEqual(Buffer.concat(chunks).toString(), 'ab') + done() + }) + }) +}) + +test('stream mode - returns null payload', (t, done) => { + t.plan(4) + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Length': 0 }) + res.end() + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.payload, undefined) + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), '') + done() + }) + }) +}) + +test('stream mode - simulates error', (t, done) => { + t.plan(3) + const dispatch = function (req, res) { + req.on('readable', () => { + }) + + req.on('error', () => { + res.writeHead(200, { 'Content-Length': 0 }) + res.end('error') + }) + } + + const body = 'something special just for you' + inject(dispatch, { method: 'GET', url: '/', payload: body, simulate: { error: true }, payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + accumulate(res.stream(), (err, payload) => { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), 'error') + done() + }) + }) +}) + +test('stream mode - promises support', (t, done) => { + t.plan(1) + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }) + res.end('hello') + } + + inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', payloadAsStream: true }) + .then((res) => { + return new Promise((resolve, reject) => { + accumulate(res.stream(), (err, payload) => { + if (err) { + return reject(err) + } + resolve(payload) + }) + }) + }) + .then(payload => t.assert.strictEqual(payload.toString(), 'hello')) + .catch(t.assert.fail) + .finally(done) +}) + +test('stream mode - Response.json() should throw', (t, done) => { + t.plan(2) + + const jsonData = { + a: 1, + b: '2' + } + + const dispatch = function (_req, res) { + res.writeHead(200, { 'Content-Type': 'application/json' }) + res.end(JSON.stringify(jsonData)) + } + + inject(dispatch, { method: 'GET', path: 'http://example.com:8080/hello', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + const { json } = res + t.assert.throws(json, Error) + done() + }) +}) + +test('stream mode - error for response destroy', (t, done) => { + t.plan(2) + + const dispatch = function (_req, res) { + res.writeHead(200) + setImmediate(() => { + res.destroy() + }) + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + accumulate(res.stream(), (err) => { + t.assert.ok(err) + done() + }) + }) +}) + +test('stream mode - request destroy with error', (t, done) => { + t.plan(3) + + const fakeError = new Error('some-err') + + const dispatch = function (req) { + req.destroy(fakeError) + } + + inject(dispatch, { method: 'GET', url: '/', payloadAsStream: true }, (err, res) => { + t.assert.ok(err) + t.assert.strictEqual(err, fakeError) + t.assert.strictEqual(res, null) + done() + }) +}) + +test('stream mode - Can abort a request using AbortController/AbortSignal', async (t) => { + const dispatch = function (_req, res) { + res.writeHead(200) + } + + const controller = new AbortController() + const res = await inject(dispatch, { + method: 'GET', + url: 'http://example.com:8080/hello', + signal: controller.signal, + payloadAsStream: true + }) + controller.abort() + + await t.assert.rejects(async () => { + for await (const c of res.stream()) { + t.assert.fail(`should not loop, got ${c.toString()}`) + } + }, Error) +}, { skip: globalThis.AbortController == null }) + +test("stream mode - passes payload when using express' send", (t, done) => { + t.plan(4) + + const app = express() + + app.get('/hello', (_req, res) => { + res.send('some text') + }) + + inject(app, { method: 'GET', url: 'http://example.com:8080/hello', payloadAsStream: true }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.headers['content-length'], '9') + accumulate(res.stream(), function (err, payload) { + t.assert.ifError(err) + t.assert.strictEqual(payload.toString(), 'some text') + done() + }) + }) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..360fb0e80413bbe4ccb44fe02fe38138ff8b6ace --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.d.ts @@ -0,0 +1,128 @@ +import * as http from 'node:http' +import { Readable } from 'node:stream' + +type HTTPMethods = 'DELETE' | 'delete' | + 'GET' | 'get' | + 'HEAD' | 'head' | + 'PATCH' | 'patch' | + 'POST' | 'post' | + 'PUT' | 'put' | + 'OPTIONS' | 'options' + +type Inject = typeof inject + +declare namespace inject { + + export type DispatchFunc = http.RequestListener + + export type CallbackFunc = (err: Error | undefined, response: Response | undefined) => void + + export type InjectPayload = string | object | Buffer | NodeJS.ReadableStream + + export function isInjection (obj: http.IncomingMessage | http.ServerResponse): boolean + + export interface AbortSignal { + readonly aborted: boolean; + } + + export interface InjectOptions { + url?: string | { + pathname: string + protocol?: string + hostname?: string + port?: string | number + query?: string | { [k: string]: string | string[] } + } + path?: string | { + pathname: string + protocol?: string + hostname?: string + port?: string | number + query?: string | { [k: string]: string | string[] } + } + headers?: http.IncomingHttpHeaders | http.OutgoingHttpHeaders + query?: string | { [k: string]: string | string[] } + simulate?: { + end: boolean, + split: boolean, + error: boolean, + close: boolean + } + authority?: string + remoteAddress?: string + method?: HTTPMethods + validate?: boolean + payload?: InjectPayload + body?: InjectPayload + server?: http.Server + autoStart?: boolean + cookies?: { [k: string]: string }, + signal?: AbortSignal, + Request?: object, + payloadAsStream?: boolean + } + + /** + * https://github.com/nfriedly/set-cookie-parser/blob/3eab8b7d5d12c8ed87832532861c1a35520cf5b3/lib/set-cookie.js#L41 + */ + interface Cookie { + name: string; + value: string; + expires?: Date; + maxAge?: number; + secure?: boolean; + httpOnly?: boolean; + sameSite?: string; + [name: string]: unknown + } + + export interface Response { + raw: { + res: http.ServerResponse, + req: http.IncomingMessage + } + rawPayload: Buffer + headers: http.OutgoingHttpHeaders + statusCode: number + statusMessage: string + trailers: { [key: string]: string } + payload: string + body: string + json: () => T + stream: () => Readable + cookies: Array + } + + export interface Chain extends Promise { + delete: (url: string) => Chain + get: (url: string) => Chain + head: (url: string) => Chain + options: (url: string) => Chain + patch: (url: string) => Chain + post: (url: string) => Chain + put: (url: string) => Chain + trace: (url: string) => Chain + body: (body: InjectPayload) => Chain + headers: (headers: http.IncomingHttpHeaders | http.OutgoingHttpHeaders) => Chain + payload: (payload: InjectPayload) => Chain + query: (query: string | { [k: string]: string | string[] }) => Chain + cookies: (query: object) => Chain + end(): Promise + end(callback: CallbackFunc): void + } + + export const inject: Inject + export { inject as default } +} + +declare function inject ( + dispatchFunc: inject.DispatchFunc, + options?: string | inject.InjectOptions +): inject.Chain +declare function inject ( + dispatchFunc: inject.DispatchFunc, + options: string | inject.InjectOptions, + callback: inject.CallbackFunc +): void + +export = inject diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.test-d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.test-d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5181184187fffea2b30368d79472b721461d80e8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/light-my-request/types/index.test-d.ts @@ -0,0 +1,149 @@ +import * as http from 'node:http' +import { inject, isInjection, Response, DispatchFunc, InjectOptions, Chain } from '..' +import { expectType, expectAssignable, expectNotAssignable } from 'tsd' +import { Readable } from 'node:stream' + +expectAssignable({ url: '/' }) +expectAssignable({ autoStart: true }) +expectAssignable({ autoStart: false }) +expectAssignable({ validate: true }) +expectAssignable({ validate: false }) + +const dispatch: http.RequestListener = function (req, res) { + expectAssignable(req) + expectAssignable(res) + expectType(isInjection(req)) + expectType(isInjection(res)) + + const reply = 'Hello World' + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': reply.length }) + res.end(reply) +} + +const expectResponse = function (res: Response | undefined) { + if (!res) { + return + } + expectType(res) + console.log(res.payload) + expectAssignable(res.json) + expectAssignable(res.stream) + expectAssignable(res.raw.res) + expectAssignable(res.raw.req) + expectType(res.stream()) + expectType(res.payload) + expectType(res.body) + expectAssignable>(res.cookies) + const cookie = res.cookies[0] + expectType(cookie.name) + expectType(cookie.value) + expectType(cookie.expires) + expectType(cookie.maxAge) + expectType(cookie.httpOnly) + expectType(cookie.secure) + expectType(cookie.sameSite) + expectType(cookie.additional) +} + +expectType(dispatch) + +inject(dispatch, { method: 'get', url: '/' }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +const url = { + protocol: 'http', + hostname: 'example.com', + port: '8080', + pathname: 'hello', + query: { + test: '1234' + } +} +inject(dispatch, { method: 'get', url }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'get', url: '/', cookies: { name1: 'value1', value2: 'value2' } }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'get', url: '/', query: { name1: 'value1', value2: 'value2' } }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'get', url: '/', query: { name1: ['value1', 'value2'] } }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'get', url: '/', query: 'name1=value1' }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'post', url: '/', payload: { name1: 'value1', value2: 'value2' } }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(dispatch, { method: 'post', url: '/', body: { name1: 'value1', value2: 'value2' } }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +expectType( + inject(dispatch) + .get('/') + .end((err, res) => { + expectType(err) + expectType(res) + console.log(res?.payload) + }) +) + +inject(dispatch) + .get('/') + .then((value) => { + expectType(value) + }) + +expectType(inject(dispatch)) +expectType>(inject(dispatch).end()) +expectType(inject(dispatch, { method: 'get', url: '/' })) +// @ts-ignore tsd supports top-level await, but normal ts does not so ignore +expectType(await inject(dispatch, { method: 'get', url: '/' })) + +type ParsedValue = { field: string } +// @ts-ignore tsd supports top-level await, but normal ts does not so ignore +const response: Response = await inject(dispatch) +const parsedValue: ParsedValue = response.json() +expectType(parsedValue) + +const parsedValueUsingGeneric = response.json() +expectType(parsedValueUsingGeneric) + +expectNotAssignable(response) + +const httpDispatch = function (req: http.IncomingMessage, res: http.ServerResponse) { + expectType(isInjection(req)) + expectType(isInjection(res)) + + const reply = 'Hello World' + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': reply.length }) + res.end(reply) +} + +inject(httpDispatch, { method: 'get', url: '/' }, (err, res) => { + expectType(err) + expectResponse(res) +}) + +inject(httpDispatch, { method: 'get', url: '/', payloadAsStream: true }, (err, res) => { + expectType(err) + expectResponse(res) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..99b3b05dfaab753814e4aeaef40c4c5e9d06268e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts @@ -0,0 +1,1306 @@ +/** + * @module LRUCache + */ +declare const TYPE: unique symbol; +export type PosInt = number & { + [TYPE]: 'Positive Integer'; +}; +export type Index = number & { + [TYPE]: 'LRUCache Index'; +}; +export type UintArray = Uint8Array | Uint16Array | Uint32Array; +export type NumberArray = UintArray | number[]; +declare class ZeroArray extends Array { + constructor(size: number); +} +export type { ZeroArray }; +export type { Stack }; +export type StackLike = Stack | Index[]; +declare class Stack { + #private; + heap: NumberArray; + length: number; + static create(max: number): StackLike; + constructor(max: number, HeapCls: { + new (n: number): NumberArray; + }); + push(n: Index): void; + pop(): Index; +} +/** + * Promise representing an in-progress {@link LRUCache#fetch} call + */ +export type BackgroundFetch = Promise & { + __returned: BackgroundFetch | undefined; + __abortController: AbortController; + __staleWhileFetching: V | undefined; +}; +export type DisposeTask = [ + value: V, + key: K, + reason: LRUCache.DisposeReason +]; +export declare namespace LRUCache { + /** + * An integer greater than 0, reflecting the calculated size of items + */ + type Size = number; + /** + * Integer greater than 0, representing some number of milliseconds, or the + * time at which a TTL started counting from. + */ + type Milliseconds = number; + /** + * An integer greater than 0, reflecting a number of items + */ + type Count = number; + /** + * The reason why an item was removed from the cache, passed + * to the {@link Disposer} methods. + * + * - `evict`: The item was evicted because it is the least recently used, + * and the cache is full. + * - `set`: A new value was set, overwriting the old value being disposed. + * - `delete`: The item was explicitly deleted, either by calling + * {@link LRUCache#delete}, {@link LRUCache#clear}, or + * {@link LRUCache#set} with an undefined value. + * - `expire`: The item was removed due to exceeding its TTL. + * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned + * `undefined` or was aborted, causing the item to be deleted. + */ + type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch'; + /** + * A method called upon item removal, passed as the + * {@link OptionsBase.dispose} and/or + * {@link OptionsBase.disposeAfter} options. + */ + type Disposer = (value: V, key: K, reason: DisposeReason) => void; + /** + * The reason why an item was added to the cache, passed + * to the {@link Inserter} methods. + * + * - `add`: the item was not found in the cache, and was added + * - `update`: the item was in the cache, with the same value provided + * - `replace`: the item was in the cache, and replaced + */ + type InsertReason = 'add' | 'update' | 'replace'; + /** + * A method called upon item insertion, passed as the + * {@link OptionsBase.insert} + */ + type Inserter = (value: V, key: K, reason: InsertReason) => void; + /** + * A function that returns the effective calculated size + * of an entry in the cache. + */ + type SizeCalculator = (value: V, key: K) => Size; + /** + * Options provided to the + * {@link OptionsBase.fetchMethod} function. + */ + interface FetcherOptions { + signal: AbortSignal; + options: FetcherFetchOptions; + /** + * Object provided in the {@link FetchOptions.context} option to + * {@link LRUCache#fetch} + */ + context: FC; + } + /** + * Occasionally, it may be useful to track the internal behavior of the + * cache, particularly for logging, debugging, or for behavior within the + * `fetchMethod`. To do this, you can pass a `status` object to the + * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set}, + * {@link LRUCache#memo}, and {@link LRUCache#has} methods. + * + * The `status` option should be a plain JavaScript object. The following + * fields will be set on it appropriately, depending on the situation. + */ + interface Status { + /** + * The status of a set() operation. + * + * - add: the item was not found in the cache, and was added + * - update: the item was in the cache, with the same value provided + * - replace: the item was in the cache, and replaced + * - miss: the item was not added to the cache for some reason + */ + set?: 'add' | 'update' | 'replace' | 'miss'; + /** + * the ttl stored for the item, or undefined if ttls are not used. + */ + ttl?: Milliseconds; + /** + * the start time for the item, or undefined if ttls are not used. + */ + start?: Milliseconds; + /** + * The timestamp used for TTL calculation + */ + now?: Milliseconds; + /** + * the remaining ttl for the item, or undefined if ttls are not used. + */ + remainingTTL?: Milliseconds; + /** + * The calculated size for the item, if sizes are used. + */ + entrySize?: Size; + /** + * The total calculated size of the cache, if sizes are used. + */ + totalCalculatedSize?: Size; + /** + * A flag indicating that the item was not stored, due to exceeding the + * {@link OptionsBase.maxEntrySize} + */ + maxEntrySizeExceeded?: true; + /** + * The old value, specified in the case of `set:'update'` or + * `set:'replace'` + */ + oldValue?: V; + /** + * The results of a {@link LRUCache#has} operation + * + * - hit: the item was found in the cache + * - stale: the item was found in the cache, but is stale + * - miss: the item was not found in the cache + */ + has?: 'hit' | 'stale' | 'miss'; + /** + * The status of a {@link LRUCache#fetch} operation. + * Note that this can change as the underlying fetch() moves through + * various states. + * + * - inflight: there is another fetch() for this key which is in process + * - get: there is no {@link OptionsBase.fetchMethod}, so + * {@link LRUCache#get} was called. + * - miss: the item is not in cache, and will be fetched. + * - hit: the item is in the cache, and was resolved immediately. + * - stale: the item is in the cache, but stale. + * - refresh: the item is in the cache, and not stale, but + * {@link FetchOptions.forceRefresh} was specified. + */ + fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'; + /** + * The {@link OptionsBase.fetchMethod} was called + */ + fetchDispatched?: true; + /** + * The cached value was updated after a successful call to + * {@link OptionsBase.fetchMethod} + */ + fetchUpdated?: true; + /** + * The reason for a fetch() rejection. Either the error raised by the + * {@link OptionsBase.fetchMethod}, or the reason for an + * AbortSignal. + */ + fetchError?: Error; + /** + * The fetch received an abort signal + */ + fetchAborted?: true; + /** + * The abort signal received was ignored, and the fetch was allowed to + * continue. + */ + fetchAbortIgnored?: true; + /** + * The fetchMethod promise resolved successfully + */ + fetchResolved?: true; + /** + * The fetchMethod promise was rejected + */ + fetchRejected?: true; + /** + * The status of a {@link LRUCache#get} operation. + * + * - fetching: The item is currently being fetched. If a previous value + * is present and allowed, that will be returned. + * - stale: The item is in the cache, and is stale. + * - hit: the item is in the cache + * - miss: the item is not in the cache + */ + get?: 'stale' | 'hit' | 'miss'; + /** + * A fetch or get operation returned a stale value. + */ + returnedStale?: true; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#fetch}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link OptionsBase.noDeleteOnFetchRejection}, + * {@link OptionsBase.allowStaleOnFetchRejection}, + * {@link FetchOptions.forceRefresh}, and + * {@link FetcherOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.fetchMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the fetchMethod is called. + */ + interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + status?: Status; + size?: Size; + } + /** + * Options that may be passed to the {@link LRUCache#fetch} method. + */ + interface FetchOptions extends FetcherFetchOptions { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.fetchMethod} as + * the {@link FetcherOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + signal?: AbortSignal; + status?: Status; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface FetchOptionsWithContext extends FetchOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is + * `undefined` or `void` + */ + interface FetchOptionsNoContext extends FetchOptions { + context?: undefined; + } + interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.memoMethod} as + * the {@link MemoizerOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + status?: Status; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface MemoOptionsWithContext extends MemoOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is + * `undefined` or `void` + */ + interface MemoOptionsNoContext extends MemoOptions { + context?: undefined; + } + /** + * Options provided to the + * {@link OptionsBase.memoMethod} function. + */ + interface MemoizerOptions { + options: MemoizerMemoOptions; + /** + * Object provided in the {@link MemoOptions.context} option to + * {@link LRUCache#memo} + */ + context: FC; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#memo}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link MemoOptions.forceRefresh}, and + * {@link MemoOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.memoMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the memoMethod is called. + */ + interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + status?: Status; + size?: Size; + start?: Milliseconds; + } + /** + * Options that may be passed to the {@link LRUCache#has} method. + */ + interface HasOptions extends Pick, 'updateAgeOnHas'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#get} method. + */ + interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#peek} method. + */ + interface PeekOptions extends Pick, 'allowStale'> { + } + /** + * Options that may be passed to the {@link LRUCache#set} method. + */ + interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + /** + * If size tracking is enabled, then setting an explicit size + * in the {@link LRUCache#set} call will prevent calling the + * {@link OptionsBase.sizeCalculation} function. + */ + size?: Size; + /** + * If TTL tracking is enabled, then setting an explicit start + * time in the {@link LRUCache#set} call will override the + * default time from `performance.now()` or `Date.now()`. + * + * Note that it must be a valid value for whichever time-tracking + * method is in use. + */ + start?: Milliseconds; + status?: Status; + } + /** + * The type signature for the {@link OptionsBase.fetchMethod} option. + */ + type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void; + /** + * the type signature for the {@link OptionsBase.memoMethod} option. + */ + type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V; + /** + * Options which may be passed to the {@link LRUCache} constructor. + * + * Most of these may be overridden in the various options that use + * them. + * + * Despite all being technically optional, the constructor requires that + * a cache is at minimum limited by one or more of {@link OptionsBase.max}, + * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}. + * + * If {@link OptionsBase.ttl} is used alone, then it is strongly advised + * (and in fact required by the type definitions here) that the cache + * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially + * unbounded storage. + * + * All options are also available on the {@link LRUCache} instance, making + * it safe to pass an LRUCache instance as the options argumemnt to + * make another empty cache of the same type. + * + * Some options are marked as read-only, because changing them after + * instantiation is not safe. Changing any of the other options will of + * course only have an effect on subsequent method calls. + */ + interface OptionsBase { + /** + * The maximum number of items to store in the cache before evicting + * old entries. This is read-only on the {@link LRUCache} instance, + * and may not be overridden. + * + * If set, then storage space will be pre-allocated at construction + * time, and the cache will perform significantly faster. + * + * Note that significantly fewer items may be stored, if + * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also + * set. + * + * **It is strongly recommended to set a `max` to prevent unbounded growth + * of the cache.** + */ + max?: Count; + /** + * Max time in milliseconds for items to live in cache before they are + * considered stale. Note that stale items are NOT preemptively removed by + * default, and MAY live in the cache, contributing to its LRU max, long + * after they have expired, unless {@link OptionsBase.ttlAutopurge} is + * set. + * + * If set to `0` (the default value), then that means "do not track + * TTL", not "expire immediately". + * + * Also, as this cache is optimized for LRU/MRU operations, some of + * the staleness/TTL checks will reduce performance, as they will incur + * overhead by deleting items. + * + * This is not primarily a TTL cache, and does not make strong TTL + * guarantees. There is no pre-emptive pruning of expired items, but you + * _may_ set a TTL on the cache, and it will treat expired items as missing + * when they are fetched, and delete them. + * + * Optional, but must be a non-negative integer in ms if specified. + * + * This may be overridden by passing an options object to `cache.set()`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if ttl tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * If ttl tracking is enabled, and `max` and `maxSize` are not set, + * and `ttlAutopurge` is not set, then a warning will be emitted + * cautioning about the potential for unbounded memory consumption. + * (The TypeScript definitions will also discourage this.) + */ + ttl?: Milliseconds; + /** + * Minimum amount of time in ms in which to check for staleness. + * Defaults to 1, which means that the current time is checked + * at most once per millisecond. + * + * Set to 0 to check the current time every time staleness is tested. + * (This reduces performance, and is theoretically unnecessary.) + * + * Setting this to a higher value will improve performance somewhat + * while using ttl tracking, albeit at the expense of keeping stale + * items around a bit longer than their TTLs would indicate. + * + * @default 1 + */ + ttlResolution?: Milliseconds; + /** + * Preemptively remove stale items from the cache. + * + * Note that this may *significantly* degrade performance, especially if + * the cache is storing a large number of items. It is almost always best + * to just leave the stale items in the cache, and let them fall out as new + * items are added. + * + * Note that this means that {@link OptionsBase.allowStale} is a bit + * pointless, as stale items will be deleted almost as soon as they + * expire. + * + * Use with caution! + */ + ttlAutopurge?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever it is retrieved from cache with + * {@link LRUCache#get}, causing it to not expire. (It can still fall out + * of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + * + * This may be overridden by passing an options object to `cache.get()`. + */ + updateAgeOnGet?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever its presence in the cache is + * checked with {@link LRUCache#has}, causing it to not expire. (It can + * still fall out of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + */ + updateAgeOnHas?: boolean; + /** + * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return + * stale data, if available. + * + * By default, if you set `ttl`, stale items will only be deleted from the + * cache when you `get(key)`. That is, it's not preemptively pruning items, + * unless {@link OptionsBase.ttlAutopurge} is set. + * + * If you set `allowStale:true`, it'll return the stale value *as well as* + * deleting it. If you don't set this, then it'll return `undefined` when + * you try to get a stale entry. + * + * Note that when a stale entry is fetched, _even if it is returned due to + * `allowStale` being set_, it is removed from the cache immediately. You + * can suppress this behavior by setting + * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in + * the options provided to {@link LRUCache#get}. + * + * This may be overridden by passing an options object to `cache.get()`. + * The `cache.has()` method will always return `false` for stale items. + * + * Only relevant if a ttl is set. + */ + allowStale?: boolean; + /** + * Function that is called on items when they are dropped from the + * cache, as `dispose(value, key, reason)`. + * + * This can be handy if you want to close file descriptors or do + * other cleanup tasks when items are no longer stored in the cache. + * + * **NOTE**: It is called _before_ the item has been fully removed + * from the cache, so if you want to put it right back in, you need + * to wait until the next tick. If you try to add it back in during + * the `dispose()` function call, it will break things in subtle and + * weird ways. + * + * Unlike several other options, this may _not_ be overridden by + * passing an option to `set()`, for performance reasons. + * + * The `reason` will be one of the following strings, corresponding + * to the reason for the item's deletion: + * + * - `evict` Item was evicted to make space for a new addition + * - `set` Item was overwritten by a new value + * - `expire` Item expired its TTL + * - `fetch` Item was deleted due to a failed or aborted fetch, or a + * fetchMethod returning `undefined. + * - `delete` Item was removed by explicit `cache.delete(key)`, + * `cache.clear()`, or `cache.set(key, undefined)`. + */ + dispose?: Disposer; + /** + * Function that is called when new items are inserted into the cache, + * as `onInsert(value, key, reason)`. + * + * This can be useful if you need to perform actions when an item is + * added, such as logging or tracking insertions. + * + * Unlike some other options, this may _not_ be overridden by passing + * an option to `set()`, for performance and consistency reasons. + */ + onInsert?: Inserter; + /** + * The same as {@link OptionsBase.dispose}, but called *after* the entry + * is completely removed and the cache is once again in a clean state. + * + * It is safe to add an item right back into the cache at this point. + * However, note that it is *very* easy to inadvertently create infinite + * recursion this way. + */ + disposeAfter?: Disposer; + /** + * Set to true to suppress calling the + * {@link OptionsBase.dispose} function if the entry key is + * still accessible within the cache. + * + * This may be overridden by passing an options object to + * {@link LRUCache#set}. + * + * Only relevant if `dispose` or `disposeAfter` are set. + */ + noDisposeOnSet?: boolean; + /** + * Boolean flag to tell the cache to not update the TTL when setting a new + * value for an existing key (ie, when updating a value rather than + * inserting a new value). Note that the TTL value is _always_ set (if + * provided) when adding a new entry into the cache. + * + * Has no effect if a {@link OptionsBase.ttl} is not set. + * + * May be passed as an option to {@link LRUCache#set}. + */ + noUpdateTTL?: boolean; + /** + * Set to a positive integer to track the sizes of items added to the + * cache, and automatically evict items in order to stay below this size. + * Note that this may result in fewer than `max` items being stored. + * + * Attempting to add an item to the cache whose calculated size is greater + * that this amount will be a no-op. The item will not be cached, and no + * other items will be evicted. + * + * Optional, must be a positive integer if provided. + * + * Sets `maxEntrySize` to the same value, unless a different value is + * provided for `maxEntrySize`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if size tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * Note also that size tracking can negatively impact performance, + * though for most cases, only minimally. + */ + maxSize?: Size; + /** + * The maximum allowed size for any single item in the cache. + * + * If a larger item is passed to {@link LRUCache#set} or returned by a + * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then + * it will not be stored in the cache. + * + * Attempting to add an item whose calculated size is greater than + * this amount will not cache the item or evict any old items, but + * WILL delete an existing value if one is already present. + * + * Optional, must be a positive integer if provided. Defaults to + * the value of `maxSize` if provided. + */ + maxEntrySize?: Size; + /** + * A function that returns a number indicating the item's size. + * + * Requires {@link OptionsBase.maxSize} to be set. + * + * If not provided, and {@link OptionsBase.maxSize} or + * {@link OptionsBase.maxEntrySize} are set, then all + * {@link LRUCache#set} calls **must** provide an explicit + * {@link SetOptions.size} or sizeCalculation param. + */ + sizeCalculation?: SizeCalculator; + /** + * Method that provides the implementation for {@link LRUCache#fetch} + * + * ```ts + * fetchMethod(key, staleValue, { signal, options, context }) + * ``` + * + * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent + * to `Promise.resolve(cache.get(key))`. + * + * If at any time, `signal.aborted` is set to `true`, or if the + * `signal.onabort` method is called, or if it emits an `'abort'` event + * which you can listen to with `addEventListener`, then that means that + * the fetch should be abandoned. This may be passed along to async + * functions aware of AbortController/AbortSignal behavior. + * + * The `fetchMethod` should **only** return `undefined` or a Promise + * resolving to `undefined` if the AbortController signaled an `abort` + * event. In all other cases, it should return or resolve to a value + * suitable for adding to the cache. + * + * The `options` object is a union of the options that may be provided to + * `set()` and `get()`. If they are modified, then that will result in + * modifying the settings to `cache.set()` when the value is resolved, and + * in the case of + * {@link OptionsBase.noDeleteOnFetchRejection} and + * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of + * `fetchMethod` failures. + * + * For example, a DNS cache may update the TTL based on the value returned + * from a remote DNS server by changing `options.ttl` in the `fetchMethod`. + */ + fetchMethod?: Fetcher; + /** + * Method that provides the implementation for {@link LRUCache#memo} + */ + memoMethod?: Memoizer; + /** + * Set to true to suppress the deletion of stale data when a + * {@link OptionsBase.fetchMethod} returns a rejected promise. + */ + noDeleteOnFetchRejection?: boolean; + /** + * Do not delete stale items when they are retrieved with + * {@link LRUCache#get}. + * + * Note that the `get` return value will still be `undefined` + * unless {@link OptionsBase.allowStale} is true. + * + * When using time-expiring entries with `ttl`, by default stale + * items will be removed from the cache when the key is accessed + * with `cache.get()`. + * + * Setting this option will cause stale items to remain in the cache, until + * they are explicitly deleted with `cache.delete(key)`, or retrieved with + * `noDeleteOnStaleGet` set to `false`. + * + * This may be overridden by passing an options object to `cache.get()`. + * + * Only relevant if a ttl is used. + */ + noDeleteOnStaleGet?: boolean; + /** + * Set to true to allow returning stale data when a + * {@link OptionsBase.fetchMethod} throws an error or returns a rejected + * promise. + * + * This differs from using {@link OptionsBase.allowStale} in that stale + * data will ONLY be returned in the case that the {@link LRUCache#fetch} + * fails, not any other times. + * + * If a `fetchMethod` fails, and there is no stale value available, the + * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are + * suppressed. + * + * Implies `noDeleteOnFetchRejection`. + * + * This may be set in calls to `fetch()`, or defaulted on the constructor, + * or overridden by modifying the options object in the `fetchMethod`. + */ + allowStaleOnFetchRejection?: boolean; + /** + * Set to true to return a stale value from the cache when the + * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches + * an `'abort'` event, whether user-triggered, or due to internal cache + * behavior. + * + * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying + * {@link OptionsBase.fetchMethod} will still be considered canceled, and + * any value it returns will be ignored and not cached. + * + * Caveat: since fetches are aborted when a new value is explicitly + * set in the cache, this can lead to fetch returning a stale value, + * since that was the fallback value _at the moment the `fetch()` was + * initiated_, even though the new updated value is now present in + * the cache. + * + * For example: + * + * ```ts + * const cache = new LRUCache({ + * ttl: 100, + * fetchMethod: async (url, oldValue, { signal }) => { + * const res = await fetch(url, { signal }) + * return await res.json() + * } + * }) + * cache.set('https://example.com/', { some: 'data' }) + * // 100ms go by... + * const result = cache.fetch('https://example.com/') + * cache.set('https://example.com/', { other: 'thing' }) + * console.log(await result) // { some: 'data' } + * console.log(cache.get('https://example.com/')) // { other: 'thing' } + * ``` + */ + allowStaleOnFetchAbort?: boolean; + /** + * Set to true to ignore the `abort` event emitted by the `AbortSignal` + * object passed to {@link OptionsBase.fetchMethod}, and still cache the + * resulting resolution value, as long as it is not `undefined`. + * + * When used on its own, this means aborted {@link LRUCache#fetch} calls + * are not immediately resolved or rejected when they are aborted, and + * instead take the full time to await. + * + * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted + * {@link LRUCache#fetch} calls will resolve immediately to their stale + * cached value or `undefined`, and will continue to process and eventually + * update the cache when they resolve, as long as the resulting value is + * not `undefined`, thus supporting a "return stale on timeout while + * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal. + * + * For example: + * + * ```ts + * const c = new LRUCache({ + * ttl: 100, + * ignoreFetchAbort: true, + * allowStaleOnFetchAbort: true, + * fetchMethod: async (key, oldValue, { signal }) => { + * // note: do NOT pass the signal to fetch()! + * // let's say this fetch can take a long time. + * const res = await fetch(`https://slow-backend-server/${key}`) + * return await res.json() + * }, + * }) + * + * // this will return the stale value after 100ms, while still + * // updating in the background for next time. + * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) }) + * ``` + * + * **Note**: regardless of this setting, an `abort` event _is still + * emitted on the `AbortSignal` object_, so may result in invalid results + * when passed to other underlying APIs that use AbortSignals. + * + * This may be overridden in the {@link OptionsBase.fetchMethod} or the + * call to {@link LRUCache#fetch}. + */ + ignoreFetchAbort?: boolean; + } + interface OptionsMaxLimit extends OptionsBase { + max: Count; + } + interface OptionsTTLLimit extends OptionsBase { + ttl: Milliseconds; + ttlAutopurge: boolean; + } + interface OptionsSizeLimit extends OptionsBase { + maxSize: Size; + } + /** + * The valid safe options for the {@link LRUCache} constructor + */ + type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit; + /** + * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump}, + * and returned by {@link LRUCache#info}. + */ + interface Entry { + value: V; + ttl?: Milliseconds; + size?: Size; + start?: Milliseconds; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export declare class LRUCache { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas: boolean; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale: boolean; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet: boolean; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL: boolean; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize: LRUCache.Size; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation?: LRUCache.SizeCalculator; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort: boolean; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c: LRUCache): { + starts: ZeroArray | undefined; + ttls: ZeroArray | undefined; + sizes: ZeroArray | undefined; + keyMap: Map; + keyList: (K | undefined)[]; + valList: (V | BackgroundFetch | undefined)[]; + next: NumberArray; + prev: NumberArray; + readonly head: Index; + readonly tail: Index; + free: StackLike; + isBackgroundFetch: (p: any) => p is BackgroundFetch; + backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch; + moveToTail: (index: number) => void; + indexes: (options?: { + allowStale: boolean; + }) => Generator; + rindexes: (options?: { + allowStale: boolean; + }) => Generator; + isStale: (index: number | undefined) => boolean; + }; + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize(): LRUCache.Count; + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize(): LRUCache.Size; + /** + * The number of items stored in the cache (read-only) + */ + get size(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod(): LRUCache.Fetcher | undefined; + get memoMethod(): LRUCache.Memoizer | undefined; + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose(): LRUCache.Disposer | undefined; + /** + * {@link LRUCache.OptionsBase.onInsert} (read-only) + */ + get onInsert(): LRUCache.Inserter | undefined; + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter(): LRUCache.Disposer | undefined; + constructor(options: LRUCache.Options | LRUCache); + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key: K): number; + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + entries(): Generator<[K, V], void, unknown>; + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + rentries(): Generator<(K | V)[], void, unknown>; + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + keys(): Generator; + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + rkeys(): Generator; + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + values(): Generator; + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + rvalues(): Generator; + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator](): Generator<[K, V], void, unknown>; + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag]: string; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale(): boolean; + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key: K): LRUCache.Entry | undefined; + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump(): [K, LRUCache.Entry][]; + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr: [K, LRUCache.Entry][]): void; + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this; + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop(): V | undefined; + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k: K, hasOptions?: LRUCache.HasOptions): boolean; + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined; + /** + * Make an asynchronous cached fetch using the + * {@link LRUCache.OptionsBase.fetchMethod} function. + * + * If the value is in the cache and not stale, then the returned + * Promise resolves to the value. + * + * If not in the cache, or beyond its TTL staleness, then + * `fetchMethod(key, staleValue, { options, signal, context })` is + * called, and the value returned will be added to the cache once + * resolved. + * + * If called with `allowStale`, and an asynchronous fetch is + * currently in progress to reload a stale value, then the former + * stale value will be returned. + * + * If called with `forceRefresh`, then the cached item will be + * re-fetched, even if it is not stale. However, if `allowStale` is also + * set, then the old value will still be returned. This is useful + * in cases where you want to force a reload of a cached value. If + * a background fetch is already in progress, then `forceRefresh` + * has no effect. + * + * If multiple fetches for the same key are issued, then they will all be + * coalesced into a single call to fetchMethod. + * + * Note that this means that handling options such as + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}, + * {@link LRUCache.FetchOptions.signal}, + * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be + * determined by the FIRST fetch() call for a given key. + * + * This is a known (fixable) shortcoming which will be addresed on when + * someone complains about it, as the fix would involve added complexity and + * may not be worth the costs for this edge case. + * + * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is + * effectively an alias for `Promise.resolve(cache.get(key))`. + * + * When the fetch method resolves to a value, if the fetch has not + * been aborted due to deletion, eviction, or being overwritten, + * then it is added to the cache using the options provided. + * + * If the key is evicted or deleted before the `fetchMethod` + * resolves, then the AbortSignal passed to the `fetchMethod` will + * receive an `abort` event, and the promise returned by `fetch()` + * will reject with the reason for the abort. + * + * If a `signal` is passed to the `fetch()` call, then aborting the + * signal will abort the fetch and cause the `fetch()` promise to + * reject with the reason provided. + * + * **Setting `context`** + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the {@link LRUCache} constructor, then all + * calls to `cache.fetch()` _must_ provide a `context` option. If + * set to `undefined` or `void`, then calls to fetch _must not_ + * provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that + * might be relevant in the course of fetching the data. It is only + * relevant for the course of a single `fetch()` operation, and + * discarded afterwards. + * + * **Note: `fetch()` calls are inflight-unique** + * + * If you call `fetch()` multiple times with the same key value, + * then every call after the first will resolve on the same + * promise1, + * _even if they have different settings that would otherwise change + * the behavior of the fetch_, such as `noDeleteOnFetchRejection` + * or `ignoreFetchAbort`. + * + * In most cases, this is not a problem (in fact, only fetching + * something once is what you probably want, if you're caching in + * the first place). If you are changing the fetch() options + * dramatically between runs, there's a good chance that you might + * be trying to fit divergent semantics into a single object, and + * would be better off with multiple cache instances. + * + * **1**: Ie, they're not the "same Promise", but they resolve at + * the same time, because they're both waiting on the same + * underlying fetchMethod response. + */ + fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * In some cases, `cache.fetch()` may resolve to `undefined`, either because + * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning + * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or + * because `ignoreFetchAbort` was specified (either to the constructor or + * in the {@link LRUCache.FetchOptions}). Also, the + * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making + * the test even more complicated. + * + * Because inferring the cases where `undefined` might be returned are so + * cumbersome, but testing for `undefined` can also be annoying, this method + * can be used, which will reject if `this.fetch()` resolves to undefined. + */ + forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * If the key is found in the cache, then this is equivalent to + * {@link LRUCache#get}. If not, in the cache, then calculate the value using + * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache. + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the LRUCache constructor, then all calls to `cache.memo()` + * _must_ provide a `context` option. If set to `undefined` or `void`, then + * calls to memo _must not_ provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that might be + * relevant in the course of fetching the data. It is only relevant for the + * course of a single `memo()` operation, and discarded afterwards. + */ + memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V; + memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V; + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k: K, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k: K): boolean; + /** + * Clear the cache entirely, throwing away all values. + */ + clear(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..839cfe8e33e1e90236630f530a6556abce95b6b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAKzD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAC9D,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AAC,GAC9B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,KAAK,GACR,CAAC;IAiBJ;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgFxD;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ff0ec3a35e5ade10d8aaa23f6e2a1f9e538ca2bc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js @@ -0,0 +1,1564 @@ +"use strict"; +/** + * @module LRUCache + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = void 0; +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); +}; +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const TYPE = Symbol('type'); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); + } +} +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +class LRUCache { + // options that cannot be changed without disaster + #max; + #maxSize; + #dispose; + #onInsert; + #disposeAfter; + #fetchMethod; + #memoMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + #hasOnInsert; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { + return { + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), + }; + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + get memoMethod() { + return this.#memoMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.onInsert} (read-only) + */ + get onInsert() { + return this.#onInsert; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (memoMethod !== undefined && + typeof memoMethod !== 'function') { + throw new TypeError('memoMethod must be a function if defined'); + } + this.#memoMethod = memoMethod; + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof onInsert === 'function') { + this.#onInsert = onInsert; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } + else { + this.#disposeAfter = undefined; + this.#disposed = undefined; + } + this.#hasDispose = !!this.#dispose; + this.#hasOnInsert = !!this.#onInsert; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); + } + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); + } + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.#delete(this.#keyList[index], 'expire'); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag] = 'LRUCache'; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.#delete(this.#keyList[i], 'expire'); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.#delete(k, 'set'); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + if (this.#hasOnInsert) { + this.#onInsert?.(v, k, 'add'); + } + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + if (this.#hasOnInsert) { + this.onInsert?.(v, k, v === oldVal ? 'update' : 'replace'); + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, + }); + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; + } + else { + this.#delete(k, 'fetch'); + } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.#delete(k, 'fetch'); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); + } + } + }); + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, + }); + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); + } + else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); + } + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); + } + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); + } + } + async forceFetch(k, fetchOptions = {}) { + const v = await this.fetch(k, fetchOptions); + if (v === undefined) + throw new Error('fetch() returned undefined'); + return v; + } + memo(k, memoOptions = {}) { + const memoMethod = this.#memoMethod; + if (!memoMethod) { + throw new Error('no memoMethod provided to constructor'); + } + const { context, forceRefresh, ...options } = memoOptions; + const v = this.get(k, options); + if (!forceRefresh && v !== undefined) + return v; + const vv = memoMethod(k, v, { + options, + context, + }); + this.set(k, vv, options); + return vv; + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.#delete(k, 'expire'); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; + } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + return this.#delete(k, 'delete'); + } + #delete(k, reason) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.#clear(reason); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + return this.#clear('delete'); + } + #clear(reason) { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} +exports.LRUCache = LRUCache; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c72a3f1e0c66adee3eddd1ed3851ca214244f67e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,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IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QACrB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA1xDD,4BA0xDC","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * The reason why an item was added to the cache, passed\n * to the {@link Inserter} methods.\n *\n * - `add`: the item was not found in the cache, and was added\n * - `update`: the item was in the cache, with the same value provided\n * - `replace`: the item was in the cache, and replaced\n */\n export type InsertReason = 'add' | 'update' | 'replace'\n\n /**\n * A method called upon item insertion, passed as the\n * {@link OptionsBase.insert}\n */\n export type Inserter = (\n value: V,\n key: K,\n reason: InsertReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * Function that is called when new items are inserted into the cache,\n * as `onInsert(value, key, reason)`.\n *\n * This can be useful if you need to perform actions when an item is\n * added, such as logging or tracking insertions.\n *\n * Unlike some other options, this may _not_ be overridden by passing\n * an option to `set()`, for performance and consistency reasons.\n */\n onInsert?: Inserter\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache {\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #onInsert?: LRUCache.Inserter\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n #hasOnInsert: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.onInsert} (read-only)\n */\n get onInsert() {\n return this.#onInsert\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n onInsert,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof onInsert === 'function') {\n this.#onInsert = onInsert\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasOnInsert = !!this.#onInsert\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n if (this.#hasOnInsert) {\n this.#onInsert?.(v as V, k, 'add')\n }\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n\n if (this.#hasOnInsert) {\n this.onInsert?.(v as V, k, v === oldVal ? 'update' : 'replace');\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js new file mode 100644 index 0000000000000000000000000000000000000000..819173122c68b0f073a863c4e047b62e09cc1fa1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js @@ -0,0 +1,2 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var T=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,U=new Set,W=typeof process=="object"&&process?process:{},I=(a,t,e,i)=>{typeof W.emitWarning=="function"?W.emitWarning(a,t,e,i):console.error(`[${e}] ${t}: ${a}`)},C=globalThis.AbortController,x=globalThis.AbortSignal;if(typeof C>"u"){x=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},C=class{constructor(){t()}signal=new x;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let a=W.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{a&&(a=!1,I("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var G=a=>!U.has(a),P=Symbol("type"),y=a=>a&&a===Math.floor(a)&&a>0&&isFinite(a),M=a=>y(a)?a<=Math.pow(2,8)?Uint8Array:a<=Math.pow(2,16)?Uint16Array:a<=Math.pow(2,32)?Uint32Array:a<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0)}},D=class a{heap;length;static#l=!1;static create(t){let e=M(t);if(!e)return[];a.#l=!0;let i=new a(t,e);return a.#l=!1,i}constructor(t,e){if(!a.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},L=class a{#l;#c;#p;#z;#w;#W;#D;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#a;#u;#o;#h;#_;#r;#b;#m;#d;#y;#E;#f;#L;static unsafeExposeInternals(t){return{starts:t.#m,ttls:t.#d,sizes:t.#b,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#a,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#I(e,i,s,n),moveToTail:e=>t.#R(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#g(e)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#W}get memoMethod(){return this.#D}get dispose(){return this.#p}get onInsert(){return this.#z}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:_,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:b,fetchMethod:l,memoMethod:w,noDeleteOnFetchRejection:m,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:z,ignoreFetchAbort:F}=t;if(e!==0&&!y(e))throw new TypeError("max option must be a nonnegative integer");let v=e?M(e):Array;if(!v)throw new Error("invalid max value: "+e);if(this.#l=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=b,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#D=w,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#W=l,this.#E=!!l,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#a=new v(e),this.#u=new v(e),this.#o=0,this.#h=0,this.#_=D.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof _=="function"&&(this.#z=_),typeof f=="function"?(this.#w=f,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#L=!!this.#z,this.#f=!!this.#w,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!m,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!F,this.maxEntrySize!==0){if(this.#c!==0&&!y(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!y(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=y(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!y(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let O="LRU_CACHE_UNBOUNDED";G(O)&&(U.add(O),I("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,a))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#M(){let t=new E(this.#l),e=new E(this.#l);this.#d=t,this.#m=e,this.#G=(n,h,o=T.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#O(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#v=n=>{e[n]=t[n]!==0?T.now():0},this.#T=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=T.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#v=()=>{};#T=()=>{};#G=()=>{};#g=()=>!1;#k(){let t=new E(this.#l);this.#S=0,this.#b=t,this.#C=e=>{this.#S-=t[e],t[e]=0},this.#j=(e,i,s,n)=>{if(this.#e(i))return 0;if(!y(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!y(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#x=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#S>n;)this.#U(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#C=t=>{};#x=(t,e,i)=>{};#j=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#N(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#N(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#a[e]}#N(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#g(e)&&(this.#O(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#m){let h=this.#d[e],o=this.#m[e];if(h&&o){let r=h-(T.now()-o);n.ttl=r,n.start=Date.now()}}return this.#b&&(n.size=this.#b[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#m){h.ttl=this.#d[e];let o=T.now()-this.#m[e];h.start=Math.floor(Date.now()-o)}this.#b&&(h.size=this.#b[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=T.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,_=this.#j(t,e,i.size||0,o);if(this.maxEntrySize&&_>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#l?this.#U(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#a[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#x(f,_,r),r&&(r.set="add"),g=!1,this.#L&&this.#z?.(e,t,"add");else{this.#R(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#y&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]))}else h||(this.#y&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#C(f),this.#x(f,_,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u)}}else r&&(r.set="update");this.#L&&this.onInsert?.(e,t,e===c?"update":"replace")}if(s!==0&&!this.#d&&this.#M(),this.#d&&(g||this.#G(f,s,n),r&&this.#T(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#w?.(...u)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#U(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#U(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#f)&&(this.#y&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#a[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#g(n))s&&(s.has="stale",this.#T(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#T(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#I(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,b=!1)=>{let{aborted:l}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(l&&!b?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!b)return f(h.signal.reason);let m=u;return this.#t[e]===u&&(d===void 0?m.__staleWhileFetching?this.#t[e]=m.__staleWhileFetching:this.#O(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},_=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:b}=h.signal,l=b&&i.allowStaleOnFetchAbort,w=l||i.allowStaleOnFetchRejection,m=w||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!m||p.__staleWhileFetching===void 0?this.#O(t,"fetch"):l||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,b)=>{let l=this.#W?.(t,n,r);l&&l instanceof Promise&&l.then(w=>d(w===void 0?void 0:w),b),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(c).then(g,_),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:_=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:b=!1,status:l,signal:w}=e;if(!this.#E)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let m={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:_,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:l,signal:w},p=this.#s.get(t);if(p===void 0){l&&(l.fetch="miss");let S=this.#I(t,p,m,d);return S.__returned=S}else{let S=this.#t[p];if(this.#e(S)){let R=i&&S.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",R&&(l.returnedStale=!0)),R?S.__staleWhileFetching:S.__returned=S}let z=this.#g(p);if(!b&&!z)return l&&(l.fetch="hit"),this.#R(p),s&&this.#v(p),l&&this.#T(l,p),S;let F=this.#I(t,p,m,d),O=F.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=z?"stale":"refresh",O&&z&&(l.returnedStale=!0)),O?F.__staleWhileFetching:F.__returned=F}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#D;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#T(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#O(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#R(o),s&&this.#v(o),r))}else h&&(h.get="miss")}#P(t,e){this.#u[e]=t,this.#a[t]=e}#R(t){t!==this.#h&&(t===this.#o?this.#o=this.#a[t]:this.#P(this.#u[t],this.#a[t]),this.#P(this.#h,t),this.#h=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#H(e);else{this.#C(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#f)&&(this.#y&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#a[s];else{let h=this.#u[s];this.#a[h]=this.#a[s];let o=this.#a[s];this.#u[o]=this.#u[s]}this.#n--,this.#_.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#H("delete")}#H(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#m&&(this.#d.fill(0),this.#m.fill(0)),this.#b&&this.#b.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};exports.LRUCache=L; +//# sourceMappingURL=index.min.js.map diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9fff39d0cdc983240159f4eb278ae95667060e46 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/index.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * The reason why an item was added to the cache, passed\n * to the {@link Inserter} methods.\n *\n * - `add`: the item was not found in the cache, and was added\n * - `update`: the item was in the cache, with the same value provided\n * - `replace`: the item was in the cache, and replaced\n */\n export type InsertReason = 'add' | 'update' | 'replace'\n\n /**\n * A method called upon item insertion, passed as the\n * {@link OptionsBase.insert}\n */\n export type Inserter = (\n value: V,\n key: K,\n reason: InsertReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * Function that is called when new items are inserted into the cache,\n * as `onInsert(value, key, reason)`.\n *\n * This can be useful if you need to perform actions when an item is\n * added, such as logging or tracking insertions.\n *\n * Unlike some other options, this may _not_ be overridden by passing\n * an option to `set()`, for performance and consistency reasons.\n */\n onInsert?: Inserter\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache {\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #onInsert?: LRUCache.Inserter\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n #hasOnInsert: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.onInsert} (read-only)\n */\n get onInsert() {\n return this.#onInsert\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n onInsert,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof onInsert === 'function') {\n this.#onInsert = onInsert\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasOnInsert = !!this.#onInsert\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n if (this.#hasOnInsert) {\n this.#onInsert?.(v as V, k, 'add')\n }\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n\n if (this.#hasOnInsert) {\n this.onInsert?.(v as V, k, v === oldVal ? 'update' : 'replace');\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"], + "mappings": "4FAMA,IAAMA,EACJ,OAAO,aAAgB,UACvB,aACA,OAAO,YAAY,KAAQ,WACvB,YACA,KAEAC,EAAS,IAAI,IAMbC,EACJ,OAAO,SAAY,UAAc,QAAU,QAAU,CAAA,EAIjDC,EAAc,CAClBC,EACAC,EACAC,EACAC,IACE,CACF,OAAOL,EAAQ,aAAgB,WAC3BA,EAAQ,YAAYE,EAAKC,EAAMC,EAAMC,CAAE,EACvC,QAAQ,MAAM,IAAID,CAAI,KAAKD,CAAI,KAAKD,CAAG,EAAE,CAC/C,EAEII,EAAK,WAAW,gBAChBC,EAAK,WAAW,YAGpB,GAAI,OAAOD,EAAO,IAAa,CAE7BC,EAAK,KAAiB,CACpB,QACA,SAAqC,CAAA,EACrC,OACA,QAAmB,GACnB,iBAAiBC,EAAWH,EAAwB,CAClD,KAAK,SAAS,KAAKA,CAAE,CACvB,GAGFC,EAAK,KAAqB,CACxB,aAAA,CACEG,EAAc,CAChB,CACA,OAAS,IAAIF,EACb,MAAMG,EAAW,CACf,GAAI,MAAK,OAAO,QAEhB,MAAK,OAAO,OAASA,EAErB,KAAK,OAAO,QAAU,GAEtB,QAAWL,KAAM,KAAK,OAAO,SAC3BA,EAAGK,CAAM,EAEX,KAAK,OAAO,UAAUA,CAAM,EAC9B,GAEF,IAAIC,EACFX,EAAQ,KAAK,8BAAgC,IACzCS,EAAiB,IAAK,CACrBE,IACLA,EAAyB,GACzBV,EACE,maAOA,sBACA,UACAQ,CAAc,EAElB,CACF,CAGA,IAAMG,EAA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AK,EACzB,KAAKR,IACP,KAAKnB,KAAW2E,EAAQjD,EAAQ7C,CAAM,EAEpC,KAAKwC,IACP,KAAKN,IAAW,KAAK,CAAC4D,EAAQjD,EAAQ7C,CAAM,CAAC,CAEjD,CACF,CAiBA,GAfA,KAAK0B,GAAQ,MAAK,EAClB,KAAKE,GAAS,KAAK,MAAS,EAC5B,KAAKD,GAAS,KAAK,MAAS,EACxB,KAAKU,IAAS,KAAKD,KACrB,KAAKC,GAAM,KAAK,CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAMgF,EAAK,KAAKhF,GACZiF,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK7F,KAAgB,GAAG8F,CAAI,CAEhC,CACF,GAzxDF,QAAA,SAAApG", + "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "Stack", "_Stack", "#constructing", "HeapCls", "s", "LRUCache", "_LRUCache", "#max", "#maxSize", "#dispose", "#onInsert", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "#hasOnInsert", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "onInsert", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..99b3b05dfaab753814e4aeaef40c4c5e9d06268e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts @@ -0,0 +1,1306 @@ +/** + * @module LRUCache + */ +declare const TYPE: unique symbol; +export type PosInt = number & { + [TYPE]: 'Positive Integer'; +}; +export type Index = number & { + [TYPE]: 'LRUCache Index'; +}; +export type UintArray = Uint8Array | Uint16Array | Uint32Array; +export type NumberArray = UintArray | number[]; +declare class ZeroArray extends Array { + constructor(size: number); +} +export type { ZeroArray }; +export type { Stack }; +export type StackLike = Stack | Index[]; +declare class Stack { + #private; + heap: NumberArray; + length: number; + static create(max: number): StackLike; + constructor(max: number, HeapCls: { + new (n: number): NumberArray; + }); + push(n: Index): void; + pop(): Index; +} +/** + * Promise representing an in-progress {@link LRUCache#fetch} call + */ +export type BackgroundFetch = Promise & { + __returned: BackgroundFetch | undefined; + __abortController: AbortController; + __staleWhileFetching: V | undefined; +}; +export type DisposeTask = [ + value: V, + key: K, + reason: LRUCache.DisposeReason +]; +export declare namespace LRUCache { + /** + * An integer greater than 0, reflecting the calculated size of items + */ + type Size = number; + /** + * Integer greater than 0, representing some number of milliseconds, or the + * time at which a TTL started counting from. + */ + type Milliseconds = number; + /** + * An integer greater than 0, reflecting a number of items + */ + type Count = number; + /** + * The reason why an item was removed from the cache, passed + * to the {@link Disposer} methods. + * + * - `evict`: The item was evicted because it is the least recently used, + * and the cache is full. + * - `set`: A new value was set, overwriting the old value being disposed. + * - `delete`: The item was explicitly deleted, either by calling + * {@link LRUCache#delete}, {@link LRUCache#clear}, or + * {@link LRUCache#set} with an undefined value. + * - `expire`: The item was removed due to exceeding its TTL. + * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned + * `undefined` or was aborted, causing the item to be deleted. + */ + type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch'; + /** + * A method called upon item removal, passed as the + * {@link OptionsBase.dispose} and/or + * {@link OptionsBase.disposeAfter} options. + */ + type Disposer = (value: V, key: K, reason: DisposeReason) => void; + /** + * The reason why an item was added to the cache, passed + * to the {@link Inserter} methods. + * + * - `add`: the item was not found in the cache, and was added + * - `update`: the item was in the cache, with the same value provided + * - `replace`: the item was in the cache, and replaced + */ + type InsertReason = 'add' | 'update' | 'replace'; + /** + * A method called upon item insertion, passed as the + * {@link OptionsBase.insert} + */ + type Inserter = (value: V, key: K, reason: InsertReason) => void; + /** + * A function that returns the effective calculated size + * of an entry in the cache. + */ + type SizeCalculator = (value: V, key: K) => Size; + /** + * Options provided to the + * {@link OptionsBase.fetchMethod} function. + */ + interface FetcherOptions { + signal: AbortSignal; + options: FetcherFetchOptions; + /** + * Object provided in the {@link FetchOptions.context} option to + * {@link LRUCache#fetch} + */ + context: FC; + } + /** + * Occasionally, it may be useful to track the internal behavior of the + * cache, particularly for logging, debugging, or for behavior within the + * `fetchMethod`. To do this, you can pass a `status` object to the + * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set}, + * {@link LRUCache#memo}, and {@link LRUCache#has} methods. + * + * The `status` option should be a plain JavaScript object. The following + * fields will be set on it appropriately, depending on the situation. + */ + interface Status { + /** + * The status of a set() operation. + * + * - add: the item was not found in the cache, and was added + * - update: the item was in the cache, with the same value provided + * - replace: the item was in the cache, and replaced + * - miss: the item was not added to the cache for some reason + */ + set?: 'add' | 'update' | 'replace' | 'miss'; + /** + * the ttl stored for the item, or undefined if ttls are not used. + */ + ttl?: Milliseconds; + /** + * the start time for the item, or undefined if ttls are not used. + */ + start?: Milliseconds; + /** + * The timestamp used for TTL calculation + */ + now?: Milliseconds; + /** + * the remaining ttl for the item, or undefined if ttls are not used. + */ + remainingTTL?: Milliseconds; + /** + * The calculated size for the item, if sizes are used. + */ + entrySize?: Size; + /** + * The total calculated size of the cache, if sizes are used. + */ + totalCalculatedSize?: Size; + /** + * A flag indicating that the item was not stored, due to exceeding the + * {@link OptionsBase.maxEntrySize} + */ + maxEntrySizeExceeded?: true; + /** + * The old value, specified in the case of `set:'update'` or + * `set:'replace'` + */ + oldValue?: V; + /** + * The results of a {@link LRUCache#has} operation + * + * - hit: the item was found in the cache + * - stale: the item was found in the cache, but is stale + * - miss: the item was not found in the cache + */ + has?: 'hit' | 'stale' | 'miss'; + /** + * The status of a {@link LRUCache#fetch} operation. + * Note that this can change as the underlying fetch() moves through + * various states. + * + * - inflight: there is another fetch() for this key which is in process + * - get: there is no {@link OptionsBase.fetchMethod}, so + * {@link LRUCache#get} was called. + * - miss: the item is not in cache, and will be fetched. + * - hit: the item is in the cache, and was resolved immediately. + * - stale: the item is in the cache, but stale. + * - refresh: the item is in the cache, and not stale, but + * {@link FetchOptions.forceRefresh} was specified. + */ + fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'; + /** + * The {@link OptionsBase.fetchMethod} was called + */ + fetchDispatched?: true; + /** + * The cached value was updated after a successful call to + * {@link OptionsBase.fetchMethod} + */ + fetchUpdated?: true; + /** + * The reason for a fetch() rejection. Either the error raised by the + * {@link OptionsBase.fetchMethod}, or the reason for an + * AbortSignal. + */ + fetchError?: Error; + /** + * The fetch received an abort signal + */ + fetchAborted?: true; + /** + * The abort signal received was ignored, and the fetch was allowed to + * continue. + */ + fetchAbortIgnored?: true; + /** + * The fetchMethod promise resolved successfully + */ + fetchResolved?: true; + /** + * The fetchMethod promise was rejected + */ + fetchRejected?: true; + /** + * The status of a {@link LRUCache#get} operation. + * + * - fetching: The item is currently being fetched. If a previous value + * is present and allowed, that will be returned. + * - stale: The item is in the cache, and is stale. + * - hit: the item is in the cache + * - miss: the item is not in the cache + */ + get?: 'stale' | 'hit' | 'miss'; + /** + * A fetch or get operation returned a stale value. + */ + returnedStale?: true; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#fetch}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link OptionsBase.noDeleteOnFetchRejection}, + * {@link OptionsBase.allowStaleOnFetchRejection}, + * {@link FetchOptions.forceRefresh}, and + * {@link FetcherOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.fetchMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the fetchMethod is called. + */ + interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + status?: Status; + size?: Size; + } + /** + * Options that may be passed to the {@link LRUCache#fetch} method. + */ + interface FetchOptions extends FetcherFetchOptions { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.fetchMethod} as + * the {@link FetcherOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + signal?: AbortSignal; + status?: Status; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface FetchOptionsWithContext extends FetchOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is + * `undefined` or `void` + */ + interface FetchOptionsNoContext extends FetchOptions { + context?: undefined; + } + interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.memoMethod} as + * the {@link MemoizerOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + status?: Status; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface MemoOptionsWithContext extends MemoOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is + * `undefined` or `void` + */ + interface MemoOptionsNoContext extends MemoOptions { + context?: undefined; + } + /** + * Options provided to the + * {@link OptionsBase.memoMethod} function. + */ + interface MemoizerOptions { + options: MemoizerMemoOptions; + /** + * Object provided in the {@link MemoOptions.context} option to + * {@link LRUCache#memo} + */ + context: FC; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#memo}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link MemoOptions.forceRefresh}, and + * {@link MemoOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.memoMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the memoMethod is called. + */ + interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + status?: Status; + size?: Size; + start?: Milliseconds; + } + /** + * Options that may be passed to the {@link LRUCache#has} method. + */ + interface HasOptions extends Pick, 'updateAgeOnHas'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#get} method. + */ + interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#peek} method. + */ + interface PeekOptions extends Pick, 'allowStale'> { + } + /** + * Options that may be passed to the {@link LRUCache#set} method. + */ + interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + /** + * If size tracking is enabled, then setting an explicit size + * in the {@link LRUCache#set} call will prevent calling the + * {@link OptionsBase.sizeCalculation} function. + */ + size?: Size; + /** + * If TTL tracking is enabled, then setting an explicit start + * time in the {@link LRUCache#set} call will override the + * default time from `performance.now()` or `Date.now()`. + * + * Note that it must be a valid value for whichever time-tracking + * method is in use. + */ + start?: Milliseconds; + status?: Status; + } + /** + * The type signature for the {@link OptionsBase.fetchMethod} option. + */ + type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void; + /** + * the type signature for the {@link OptionsBase.memoMethod} option. + */ + type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V; + /** + * Options which may be passed to the {@link LRUCache} constructor. + * + * Most of these may be overridden in the various options that use + * them. + * + * Despite all being technically optional, the constructor requires that + * a cache is at minimum limited by one or more of {@link OptionsBase.max}, + * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}. + * + * If {@link OptionsBase.ttl} is used alone, then it is strongly advised + * (and in fact required by the type definitions here) that the cache + * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially + * unbounded storage. + * + * All options are also available on the {@link LRUCache} instance, making + * it safe to pass an LRUCache instance as the options argumemnt to + * make another empty cache of the same type. + * + * Some options are marked as read-only, because changing them after + * instantiation is not safe. Changing any of the other options will of + * course only have an effect on subsequent method calls. + */ + interface OptionsBase { + /** + * The maximum number of items to store in the cache before evicting + * old entries. This is read-only on the {@link LRUCache} instance, + * and may not be overridden. + * + * If set, then storage space will be pre-allocated at construction + * time, and the cache will perform significantly faster. + * + * Note that significantly fewer items may be stored, if + * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also + * set. + * + * **It is strongly recommended to set a `max` to prevent unbounded growth + * of the cache.** + */ + max?: Count; + /** + * Max time in milliseconds for items to live in cache before they are + * considered stale. Note that stale items are NOT preemptively removed by + * default, and MAY live in the cache, contributing to its LRU max, long + * after they have expired, unless {@link OptionsBase.ttlAutopurge} is + * set. + * + * If set to `0` (the default value), then that means "do not track + * TTL", not "expire immediately". + * + * Also, as this cache is optimized for LRU/MRU operations, some of + * the staleness/TTL checks will reduce performance, as they will incur + * overhead by deleting items. + * + * This is not primarily a TTL cache, and does not make strong TTL + * guarantees. There is no pre-emptive pruning of expired items, but you + * _may_ set a TTL on the cache, and it will treat expired items as missing + * when they are fetched, and delete them. + * + * Optional, but must be a non-negative integer in ms if specified. + * + * This may be overridden by passing an options object to `cache.set()`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if ttl tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * If ttl tracking is enabled, and `max` and `maxSize` are not set, + * and `ttlAutopurge` is not set, then a warning will be emitted + * cautioning about the potential for unbounded memory consumption. + * (The TypeScript definitions will also discourage this.) + */ + ttl?: Milliseconds; + /** + * Minimum amount of time in ms in which to check for staleness. + * Defaults to 1, which means that the current time is checked + * at most once per millisecond. + * + * Set to 0 to check the current time every time staleness is tested. + * (This reduces performance, and is theoretically unnecessary.) + * + * Setting this to a higher value will improve performance somewhat + * while using ttl tracking, albeit at the expense of keeping stale + * items around a bit longer than their TTLs would indicate. + * + * @default 1 + */ + ttlResolution?: Milliseconds; + /** + * Preemptively remove stale items from the cache. + * + * Note that this may *significantly* degrade performance, especially if + * the cache is storing a large number of items. It is almost always best + * to just leave the stale items in the cache, and let them fall out as new + * items are added. + * + * Note that this means that {@link OptionsBase.allowStale} is a bit + * pointless, as stale items will be deleted almost as soon as they + * expire. + * + * Use with caution! + */ + ttlAutopurge?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever it is retrieved from cache with + * {@link LRUCache#get}, causing it to not expire. (It can still fall out + * of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + * + * This may be overridden by passing an options object to `cache.get()`. + */ + updateAgeOnGet?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever its presence in the cache is + * checked with {@link LRUCache#has}, causing it to not expire. (It can + * still fall out of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + */ + updateAgeOnHas?: boolean; + /** + * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return + * stale data, if available. + * + * By default, if you set `ttl`, stale items will only be deleted from the + * cache when you `get(key)`. That is, it's not preemptively pruning items, + * unless {@link OptionsBase.ttlAutopurge} is set. + * + * If you set `allowStale:true`, it'll return the stale value *as well as* + * deleting it. If you don't set this, then it'll return `undefined` when + * you try to get a stale entry. + * + * Note that when a stale entry is fetched, _even if it is returned due to + * `allowStale` being set_, it is removed from the cache immediately. You + * can suppress this behavior by setting + * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in + * the options provided to {@link LRUCache#get}. + * + * This may be overridden by passing an options object to `cache.get()`. + * The `cache.has()` method will always return `false` for stale items. + * + * Only relevant if a ttl is set. + */ + allowStale?: boolean; + /** + * Function that is called on items when they are dropped from the + * cache, as `dispose(value, key, reason)`. + * + * This can be handy if you want to close file descriptors or do + * other cleanup tasks when items are no longer stored in the cache. + * + * **NOTE**: It is called _before_ the item has been fully removed + * from the cache, so if you want to put it right back in, you need + * to wait until the next tick. If you try to add it back in during + * the `dispose()` function call, it will break things in subtle and + * weird ways. + * + * Unlike several other options, this may _not_ be overridden by + * passing an option to `set()`, for performance reasons. + * + * The `reason` will be one of the following strings, corresponding + * to the reason for the item's deletion: + * + * - `evict` Item was evicted to make space for a new addition + * - `set` Item was overwritten by a new value + * - `expire` Item expired its TTL + * - `fetch` Item was deleted due to a failed or aborted fetch, or a + * fetchMethod returning `undefined. + * - `delete` Item was removed by explicit `cache.delete(key)`, + * `cache.clear()`, or `cache.set(key, undefined)`. + */ + dispose?: Disposer; + /** + * Function that is called when new items are inserted into the cache, + * as `onInsert(value, key, reason)`. + * + * This can be useful if you need to perform actions when an item is + * added, such as logging or tracking insertions. + * + * Unlike some other options, this may _not_ be overridden by passing + * an option to `set()`, for performance and consistency reasons. + */ + onInsert?: Inserter; + /** + * The same as {@link OptionsBase.dispose}, but called *after* the entry + * is completely removed and the cache is once again in a clean state. + * + * It is safe to add an item right back into the cache at this point. + * However, note that it is *very* easy to inadvertently create infinite + * recursion this way. + */ + disposeAfter?: Disposer; + /** + * Set to true to suppress calling the + * {@link OptionsBase.dispose} function if the entry key is + * still accessible within the cache. + * + * This may be overridden by passing an options object to + * {@link LRUCache#set}. + * + * Only relevant if `dispose` or `disposeAfter` are set. + */ + noDisposeOnSet?: boolean; + /** + * Boolean flag to tell the cache to not update the TTL when setting a new + * value for an existing key (ie, when updating a value rather than + * inserting a new value). Note that the TTL value is _always_ set (if + * provided) when adding a new entry into the cache. + * + * Has no effect if a {@link OptionsBase.ttl} is not set. + * + * May be passed as an option to {@link LRUCache#set}. + */ + noUpdateTTL?: boolean; + /** + * Set to a positive integer to track the sizes of items added to the + * cache, and automatically evict items in order to stay below this size. + * Note that this may result in fewer than `max` items being stored. + * + * Attempting to add an item to the cache whose calculated size is greater + * that this amount will be a no-op. The item will not be cached, and no + * other items will be evicted. + * + * Optional, must be a positive integer if provided. + * + * Sets `maxEntrySize` to the same value, unless a different value is + * provided for `maxEntrySize`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if size tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * Note also that size tracking can negatively impact performance, + * though for most cases, only minimally. + */ + maxSize?: Size; + /** + * The maximum allowed size for any single item in the cache. + * + * If a larger item is passed to {@link LRUCache#set} or returned by a + * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then + * it will not be stored in the cache. + * + * Attempting to add an item whose calculated size is greater than + * this amount will not cache the item or evict any old items, but + * WILL delete an existing value if one is already present. + * + * Optional, must be a positive integer if provided. Defaults to + * the value of `maxSize` if provided. + */ + maxEntrySize?: Size; + /** + * A function that returns a number indicating the item's size. + * + * Requires {@link OptionsBase.maxSize} to be set. + * + * If not provided, and {@link OptionsBase.maxSize} or + * {@link OptionsBase.maxEntrySize} are set, then all + * {@link LRUCache#set} calls **must** provide an explicit + * {@link SetOptions.size} or sizeCalculation param. + */ + sizeCalculation?: SizeCalculator; + /** + * Method that provides the implementation for {@link LRUCache#fetch} + * + * ```ts + * fetchMethod(key, staleValue, { signal, options, context }) + * ``` + * + * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent + * to `Promise.resolve(cache.get(key))`. + * + * If at any time, `signal.aborted` is set to `true`, or if the + * `signal.onabort` method is called, or if it emits an `'abort'` event + * which you can listen to with `addEventListener`, then that means that + * the fetch should be abandoned. This may be passed along to async + * functions aware of AbortController/AbortSignal behavior. + * + * The `fetchMethod` should **only** return `undefined` or a Promise + * resolving to `undefined` if the AbortController signaled an `abort` + * event. In all other cases, it should return or resolve to a value + * suitable for adding to the cache. + * + * The `options` object is a union of the options that may be provided to + * `set()` and `get()`. If they are modified, then that will result in + * modifying the settings to `cache.set()` when the value is resolved, and + * in the case of + * {@link OptionsBase.noDeleteOnFetchRejection} and + * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of + * `fetchMethod` failures. + * + * For example, a DNS cache may update the TTL based on the value returned + * from a remote DNS server by changing `options.ttl` in the `fetchMethod`. + */ + fetchMethod?: Fetcher; + /** + * Method that provides the implementation for {@link LRUCache#memo} + */ + memoMethod?: Memoizer; + /** + * Set to true to suppress the deletion of stale data when a + * {@link OptionsBase.fetchMethod} returns a rejected promise. + */ + noDeleteOnFetchRejection?: boolean; + /** + * Do not delete stale items when they are retrieved with + * {@link LRUCache#get}. + * + * Note that the `get` return value will still be `undefined` + * unless {@link OptionsBase.allowStale} is true. + * + * When using time-expiring entries with `ttl`, by default stale + * items will be removed from the cache when the key is accessed + * with `cache.get()`. + * + * Setting this option will cause stale items to remain in the cache, until + * they are explicitly deleted with `cache.delete(key)`, or retrieved with + * `noDeleteOnStaleGet` set to `false`. + * + * This may be overridden by passing an options object to `cache.get()`. + * + * Only relevant if a ttl is used. + */ + noDeleteOnStaleGet?: boolean; + /** + * Set to true to allow returning stale data when a + * {@link OptionsBase.fetchMethod} throws an error or returns a rejected + * promise. + * + * This differs from using {@link OptionsBase.allowStale} in that stale + * data will ONLY be returned in the case that the {@link LRUCache#fetch} + * fails, not any other times. + * + * If a `fetchMethod` fails, and there is no stale value available, the + * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are + * suppressed. + * + * Implies `noDeleteOnFetchRejection`. + * + * This may be set in calls to `fetch()`, or defaulted on the constructor, + * or overridden by modifying the options object in the `fetchMethod`. + */ + allowStaleOnFetchRejection?: boolean; + /** + * Set to true to return a stale value from the cache when the + * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches + * an `'abort'` event, whether user-triggered, or due to internal cache + * behavior. + * + * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying + * {@link OptionsBase.fetchMethod} will still be considered canceled, and + * any value it returns will be ignored and not cached. + * + * Caveat: since fetches are aborted when a new value is explicitly + * set in the cache, this can lead to fetch returning a stale value, + * since that was the fallback value _at the moment the `fetch()` was + * initiated_, even though the new updated value is now present in + * the cache. + * + * For example: + * + * ```ts + * const cache = new LRUCache({ + * ttl: 100, + * fetchMethod: async (url, oldValue, { signal }) => { + * const res = await fetch(url, { signal }) + * return await res.json() + * } + * }) + * cache.set('https://example.com/', { some: 'data' }) + * // 100ms go by... + * const result = cache.fetch('https://example.com/') + * cache.set('https://example.com/', { other: 'thing' }) + * console.log(await result) // { some: 'data' } + * console.log(cache.get('https://example.com/')) // { other: 'thing' } + * ``` + */ + allowStaleOnFetchAbort?: boolean; + /** + * Set to true to ignore the `abort` event emitted by the `AbortSignal` + * object passed to {@link OptionsBase.fetchMethod}, and still cache the + * resulting resolution value, as long as it is not `undefined`. + * + * When used on its own, this means aborted {@link LRUCache#fetch} calls + * are not immediately resolved or rejected when they are aborted, and + * instead take the full time to await. + * + * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted + * {@link LRUCache#fetch} calls will resolve immediately to their stale + * cached value or `undefined`, and will continue to process and eventually + * update the cache when they resolve, as long as the resulting value is + * not `undefined`, thus supporting a "return stale on timeout while + * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal. + * + * For example: + * + * ```ts + * const c = new LRUCache({ + * ttl: 100, + * ignoreFetchAbort: true, + * allowStaleOnFetchAbort: true, + * fetchMethod: async (key, oldValue, { signal }) => { + * // note: do NOT pass the signal to fetch()! + * // let's say this fetch can take a long time. + * const res = await fetch(`https://slow-backend-server/${key}`) + * return await res.json() + * }, + * }) + * + * // this will return the stale value after 100ms, while still + * // updating in the background for next time. + * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) }) + * ``` + * + * **Note**: regardless of this setting, an `abort` event _is still + * emitted on the `AbortSignal` object_, so may result in invalid results + * when passed to other underlying APIs that use AbortSignals. + * + * This may be overridden in the {@link OptionsBase.fetchMethod} or the + * call to {@link LRUCache#fetch}. + */ + ignoreFetchAbort?: boolean; + } + interface OptionsMaxLimit extends OptionsBase { + max: Count; + } + interface OptionsTTLLimit extends OptionsBase { + ttl: Milliseconds; + ttlAutopurge: boolean; + } + interface OptionsSizeLimit extends OptionsBase { + maxSize: Size; + } + /** + * The valid safe options for the {@link LRUCache} constructor + */ + type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit; + /** + * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump}, + * and returned by {@link LRUCache#info}. + */ + interface Entry { + value: V; + ttl?: Milliseconds; + size?: Size; + start?: Milliseconds; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export declare class LRUCache { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas: boolean; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale: boolean; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet: boolean; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL: boolean; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize: LRUCache.Size; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation?: LRUCache.SizeCalculator; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort: boolean; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c: LRUCache): { + starts: ZeroArray | undefined; + ttls: ZeroArray | undefined; + sizes: ZeroArray | undefined; + keyMap: Map; + keyList: (K | undefined)[]; + valList: (V | BackgroundFetch | undefined)[]; + next: NumberArray; + prev: NumberArray; + readonly head: Index; + readonly tail: Index; + free: StackLike; + isBackgroundFetch: (p: any) => p is BackgroundFetch; + backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch; + moveToTail: (index: number) => void; + indexes: (options?: { + allowStale: boolean; + }) => Generator; + rindexes: (options?: { + allowStale: boolean; + }) => Generator; + isStale: (index: number | undefined) => boolean; + }; + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize(): LRUCache.Count; + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize(): LRUCache.Size; + /** + * The number of items stored in the cache (read-only) + */ + get size(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod(): LRUCache.Fetcher | undefined; + get memoMethod(): LRUCache.Memoizer | undefined; + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose(): LRUCache.Disposer | undefined; + /** + * {@link LRUCache.OptionsBase.onInsert} (read-only) + */ + get onInsert(): LRUCache.Inserter | undefined; + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter(): LRUCache.Disposer | undefined; + constructor(options: LRUCache.Options | LRUCache); + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key: K): number; + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + entries(): Generator<[K, V], void, unknown>; + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + rentries(): Generator<(K | V)[], void, unknown>; + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + keys(): Generator; + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + rkeys(): Generator; + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + values(): Generator; + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + rvalues(): Generator; + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator](): Generator<[K, V], void, unknown>; + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag]: string; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale(): boolean; + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key: K): LRUCache.Entry | undefined; + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump(): [K, LRUCache.Entry][]; + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr: [K, LRUCache.Entry][]): void; + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this; + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop(): V | undefined; + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k: K, hasOptions?: LRUCache.HasOptions): boolean; + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined; + /** + * Make an asynchronous cached fetch using the + * {@link LRUCache.OptionsBase.fetchMethod} function. + * + * If the value is in the cache and not stale, then the returned + * Promise resolves to the value. + * + * If not in the cache, or beyond its TTL staleness, then + * `fetchMethod(key, staleValue, { options, signal, context })` is + * called, and the value returned will be added to the cache once + * resolved. + * + * If called with `allowStale`, and an asynchronous fetch is + * currently in progress to reload a stale value, then the former + * stale value will be returned. + * + * If called with `forceRefresh`, then the cached item will be + * re-fetched, even if it is not stale. However, if `allowStale` is also + * set, then the old value will still be returned. This is useful + * in cases where you want to force a reload of a cached value. If + * a background fetch is already in progress, then `forceRefresh` + * has no effect. + * + * If multiple fetches for the same key are issued, then they will all be + * coalesced into a single call to fetchMethod. + * + * Note that this means that handling options such as + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}, + * {@link LRUCache.FetchOptions.signal}, + * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be + * determined by the FIRST fetch() call for a given key. + * + * This is a known (fixable) shortcoming which will be addresed on when + * someone complains about it, as the fix would involve added complexity and + * may not be worth the costs for this edge case. + * + * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is + * effectively an alias for `Promise.resolve(cache.get(key))`. + * + * When the fetch method resolves to a value, if the fetch has not + * been aborted due to deletion, eviction, or being overwritten, + * then it is added to the cache using the options provided. + * + * If the key is evicted or deleted before the `fetchMethod` + * resolves, then the AbortSignal passed to the `fetchMethod` will + * receive an `abort` event, and the promise returned by `fetch()` + * will reject with the reason for the abort. + * + * If a `signal` is passed to the `fetch()` call, then aborting the + * signal will abort the fetch and cause the `fetch()` promise to + * reject with the reason provided. + * + * **Setting `context`** + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the {@link LRUCache} constructor, then all + * calls to `cache.fetch()` _must_ provide a `context` option. If + * set to `undefined` or `void`, then calls to fetch _must not_ + * provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that + * might be relevant in the course of fetching the data. It is only + * relevant for the course of a single `fetch()` operation, and + * discarded afterwards. + * + * **Note: `fetch()` calls are inflight-unique** + * + * If you call `fetch()` multiple times with the same key value, + * then every call after the first will resolve on the same + * promise1, + * _even if they have different settings that would otherwise change + * the behavior of the fetch_, such as `noDeleteOnFetchRejection` + * or `ignoreFetchAbort`. + * + * In most cases, this is not a problem (in fact, only fetching + * something once is what you probably want, if you're caching in + * the first place). If you are changing the fetch() options + * dramatically between runs, there's a good chance that you might + * be trying to fit divergent semantics into a single object, and + * would be better off with multiple cache instances. + * + * **1**: Ie, they're not the "same Promise", but they resolve at + * the same time, because they're both waiting on the same + * underlying fetchMethod response. + */ + fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * In some cases, `cache.fetch()` may resolve to `undefined`, either because + * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning + * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or + * because `ignoreFetchAbort` was specified (either to the constructor or + * in the {@link LRUCache.FetchOptions}). Also, the + * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making + * the test even more complicated. + * + * Because inferring the cases where `undefined` might be returned are so + * cumbersome, but testing for `undefined` can also be annoying, this method + * can be used, which will reject if `this.fetch()` resolves to undefined. + */ + forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * If the key is found in the cache, then this is equivalent to + * {@link LRUCache#get}. If not, in the cache, then calculate the value using + * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache. + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the LRUCache constructor, then all calls to `cache.memo()` + * _must_ provide a `context` option. If set to `undefined` or `void`, then + * calls to memo _must not_ provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that might be + * relevant in the course of fetching the data. It is only relevant for the + * course of a single `memo()` operation, and discarded afterwards. + */ + memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V; + memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V; + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k: K, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k: K): boolean; + /** + * Clear the cache entirely, throwing away all values. + */ + clear(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..839cfe8e33e1e90236630f530a6556abce95b6b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAKzD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,EAAE,CAAA;AAyB9C,cAAM,SAAU,SAAQ,KAAK,CAAC,MAAM,CAAC;gBACvB,IAAI,EAA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;IAiBJ;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgFxD;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7116ad2d3dd7ffad61893ed070240fb7408686be --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js @@ -0,0 +1,1560 @@ +/** + * @module LRUCache + */ +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); +}; +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const TYPE = Symbol('type'); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); + } +} +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export class LRUCache { + // options that cannot be changed without disaster + #max; + #maxSize; + #dispose; + #onInsert; + #disposeAfter; + #fetchMethod; + #memoMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + #hasOnInsert; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { + return { + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), + }; + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + get memoMethod() { + return this.#memoMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.onInsert} (read-only) + */ + get onInsert() { + return this.#onInsert; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (memoMethod !== undefined && + typeof memoMethod !== 'function') { + throw new TypeError('memoMethod must be a function if defined'); + } + this.#memoMethod = memoMethod; + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof onInsert === 'function') { + this.#onInsert = onInsert; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } + else { + this.#disposeAfter = undefined; + this.#disposed = undefined; + } + this.#hasDispose = !!this.#dispose; + this.#hasOnInsert = !!this.#onInsert; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); + } + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); + } + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.#delete(this.#keyList[index], 'expire'); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag] = 'LRUCache'; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.#delete(this.#keyList[i], 'expire'); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.#delete(k, 'set'); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + if (this.#hasOnInsert) { + this.#onInsert?.(v, k, 'add'); + } + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + if (this.#hasOnInsert) { + this.onInsert?.(v, k, v === oldVal ? 'update' : 'replace'); + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, + }); + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; + } + else { + this.#delete(k, 'fetch'); + } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.#delete(k, 'fetch'); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); + } + } + }); + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, + }); + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); + } + else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); + } + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); + } + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); + } + } + async forceFetch(k, fetchOptions = {}) { + const v = await this.fetch(k, fetchOptions); + if (v === undefined) + throw new Error('fetch() returned undefined'); + return v; + } + memo(k, memoOptions = {}) { + const memoMethod = this.#memoMethod; + if (!memoMethod) { + throw new Error('no memoMethod provided to constructor'); + } + const { context, forceRefresh, ...options } = memoOptions; + const v = this.get(k, options); + if (!forceRefresh && v !== undefined) + return v; + const vv = memoMethod(k, v, { + options, + context, + }); + this.set(k, vv, options); + return vv; + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.#delete(k, 'expire'); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; + } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + return this.#delete(k, 'delete'); + } + #delete(k, reason) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.#clear(reason); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + return this.#clear('delete'); + } + #clear(reason) { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ddc49d66785d1580444b2b10590bffb2a72f85cb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,CACd,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAChC,CAAA;AACzB,qBAAqB;AAErB,MAAM,WAAW,GAAG,CAClB,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,EAAQ,EACR,EAAE;IACF,OAAO,OAA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;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QACrB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * The reason why an item was added to the cache, passed\n * to the {@link Inserter} methods.\n *\n * - `add`: the item was not found in the cache, and was added\n * - `update`: the item was in the cache, with the same value provided\n * - `replace`: the item was in the cache, and replaced\n */\n export type InsertReason = 'add' | 'update' | 'replace'\n\n /**\n * A method called upon item insertion, passed as the\n * {@link OptionsBase.insert}\n */\n export type Inserter = (\n value: V,\n key: K,\n reason: InsertReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * Function that is called when new items are inserted into the cache,\n * as `onInsert(value, key, reason)`.\n *\n * This can be useful if you need to perform actions when an item is\n * added, such as logging or tracking insertions.\n *\n * Unlike some other options, this may _not_ be overridden by passing\n * an option to `set()`, for performance and consistency reasons.\n */\n onInsert?: Inserter\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache {\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #onInsert?: LRUCache.Inserter\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n #hasOnInsert: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.onInsert} (read-only)\n */\n get onInsert() {\n return this.#onInsert\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n onInsert,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof onInsert === 'function') {\n this.#onInsert = onInsert\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasOnInsert = !!this.#onInsert\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n if (this.#hasOnInsert) {\n this.#onInsert?.(v as V, k, 'add')\n }\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n\n if (this.#hasOnInsert) {\n this.onInsert?.(v as V, k, v === oldVal ? 'update' : 'replace');\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js new file mode 100644 index 0000000000000000000000000000000000000000..7277e4e5d9979b23b0d59f3c4970adeb8597b71d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js @@ -0,0 +1,2 @@ +var O=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,I=new Set,W=typeof process=="object"&&process?process:{},U=(a,t,e,i)=>{typeof W.emitWarning=="function"?W.emitWarning(a,t,e,i):console.error(`[${e}] ${t}: ${a}`)},C=globalThis.AbortController,L=globalThis.AbortSignal;if(typeof C>"u"){L=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},C=class{constructor(){t()}signal=new L;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let a=W.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{a&&(a=!1,U("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var G=a=>!I.has(a),P=Symbol("type"),y=a=>a&&a===Math.floor(a)&&a>0&&isFinite(a),M=a=>y(a)?a<=Math.pow(2,8)?Uint8Array:a<=Math.pow(2,16)?Uint16Array:a<=Math.pow(2,32)?Uint32Array:a<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0)}},D=class a{heap;length;static#l=!1;static create(t){let e=M(t);if(!e)return[];a.#l=!0;let i=new a(t,e);return a.#l=!1,i}constructor(t,e){if(!a.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},x=class a{#l;#c;#p;#z;#w;#W;#D;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#a;#u;#o;#h;#_;#r;#m;#b;#d;#y;#E;#f;#L;static unsafeExposeInternals(t){return{starts:t.#b,ttls:t.#d,sizes:t.#m,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#a,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#U(e,i,s,n),moveToTail:e=>t.#R(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#g(e)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#W}get memoMethod(){return this.#D}get dispose(){return this.#p}get onInsert(){return this.#z}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:_,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:m,fetchMethod:l,memoMethod:w,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:z,ignoreFetchAbort:F}=t;if(e!==0&&!y(e))throw new TypeError("max option must be a nonnegative integer");let v=e?M(e):Array;if(!v)throw new Error("invalid max value: "+e);if(this.#l=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=m,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#D=w,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#W=l,this.#E=!!l,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#a=new v(e),this.#u=new v(e),this.#o=0,this.#h=0,this.#_=D.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof _=="function"&&(this.#z=_),typeof f=="function"?(this.#w=f,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#L=!!this.#z,this.#f=!!this.#w,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!F,this.maxEntrySize!==0){if(this.#c!==0&&!y(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!y(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=y(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!y(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let T="LRU_CACHE_UNBOUNDED";G(T)&&(I.add(T),U("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",T,a))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#M(){let t=new E(this.#l),e=new E(this.#l);this.#d=t,this.#b=e,this.#G=(n,h,o=O.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#T(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#v=n=>{e[n]=t[n]!==0?O.now():0},this.#O=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=O.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#v=()=>{};#O=()=>{};#G=()=>{};#g=()=>!1;#k(){let t=new E(this.#l);this.#S=0,this.#m=t,this.#C=e=>{this.#S-=t[e],t[e]=0},this.#j=(e,i,s,n)=>{if(this.#e(i))return 0;if(!y(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!y(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#x=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#S>n;)this.#I(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#C=t=>{};#x=(t,e,i)=>{};#j=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#N(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#N(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#a[e]}#N(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#g(e)&&(this.#T(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#b){let h=this.#d[e],o=this.#b[e];if(h&&o){let r=h-(O.now()-o);n.ttl=r,n.start=Date.now()}}return this.#m&&(n.size=this.#m[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#b){h.ttl=this.#d[e];let o=O.now()-this.#b[e];h.start=Math.floor(Date.now()-o)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=O.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,_=this.#j(t,e,i.size||0,o);if(this.maxEntrySize&&_>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#l?this.#I(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#a[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#x(f,_,r),r&&(r.set="add"),g=!1,this.#L&&this.#z?.(e,t,"add");else{this.#R(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#y&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]))}else h||(this.#y&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#C(f),this.#x(f,_,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u)}}else r&&(r.set="update");this.#L&&this.onInsert?.(e,t,e===c?"update":"replace")}if(s!==0&&!this.#d&&this.#M(),this.#d&&(g||this.#G(f,s,n),r&&this.#O(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#w?.(...u)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#I(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#I(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#f)&&(this.#y&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#a[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#g(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#U(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,m=!1)=>{let{aborted:l}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(l&&!m?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!m)return f(h.signal.reason);let b=u;return this.#t[e]===u&&(d===void 0?b.__staleWhileFetching?this.#t[e]=b.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},_=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:m}=h.signal,l=m&&i.allowStaleOnFetchAbort,w=l||i.allowStaleOnFetchRejection,b=w||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!b||p.__staleWhileFetching===void 0?this.#T(t,"fetch"):l||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,m)=>{let l=this.#W?.(t,n,r);l&&l instanceof Promise&&l.then(w=>d(w===void 0?void 0:w),m),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(c).then(g,_),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:_=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:m=!1,status:l,signal:w}=e;if(!this.#E)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let b={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:_,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:l,signal:w},p=this.#s.get(t);if(p===void 0){l&&(l.fetch="miss");let S=this.#U(t,p,b,d);return S.__returned=S}else{let S=this.#t[p];if(this.#e(S)){let R=i&&S.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",R&&(l.returnedStale=!0)),R?S.__staleWhileFetching:S.__returned=S}let z=this.#g(p);if(!m&&!z)return l&&(l.fetch="hit"),this.#R(p),s&&this.#v(p),l&&this.#O(l,p),S;let F=this.#U(t,p,b,d),T=F.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=z?"stale":"refresh",T&&z&&(l.returnedStale=!0)),T?F.__staleWhileFetching:F.__returned=F}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#D;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#O(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#T(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#R(o),s&&this.#v(o),r))}else h&&(h.get="miss")}#P(t,e){this.#u[e]=t,this.#a[t]=e}#R(t){t!==this.#h&&(t===this.#o?this.#o=this.#a[t]:this.#P(this.#u[t],this.#a[t]),this.#P(this.#h,t),this.#h=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#H(e);else{this.#C(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#f)&&(this.#y&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#a[s];else{let h=this.#u[s];this.#a[h]=this.#a[s];let o=this.#a[s];this.#u[o]=this.#u[s]}this.#n--,this.#_.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#H("delete")}#H(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#b&&(this.#d.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};export{x as LRUCache}; +//# sourceMappingURL=index.min.js.map diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..21f8d61f3473d44d0317c76052b449f0df174628 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/index.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * The reason why an item was added to the cache, passed\n * to the {@link Inserter} methods.\n *\n * - `add`: the item was not found in the cache, and was added\n * - `update`: the item was in the cache, with the same value provided\n * - `replace`: the item was in the cache, and replaced\n */\n export type InsertReason = 'add' | 'update' | 'replace'\n\n /**\n * A method called upon item insertion, passed as the\n * {@link OptionsBase.insert}\n */\n export type Inserter = (\n value: V,\n key: K,\n reason: InsertReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * Function that is called when new items are inserted into the cache,\n * as `onInsert(value, key, reason)`.\n *\n * This can be useful if you need to perform actions when an item is\n * added, such as logging or tracking insertions.\n *\n * Unlike some other options, this may _not_ be overridden by passing\n * an option to `set()`, for performance and consistency reasons.\n */\n onInsert?: Inserter\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache {\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #onInsert?: LRUCache.Inserter\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n #hasOnInsert: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.onInsert} (read-only)\n */\n get onInsert() {\n return this.#onInsert\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n onInsert,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof onInsert === 'function') {\n this.#onInsert = onInsert\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasOnInsert = !!this.#onInsert\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n if (this.#hasOnInsert) {\n this.#onInsert?.(v as V, k, 'add')\n }\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n\n if (this.#hasOnInsert) {\n this.onInsert?.(v as V, k, v === oldVal ? 'update' : 'replace');\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"], + "mappings": "AAMA,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CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAMgF,EAAK,KAAKhF,GACZiF,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK7F,KAAgB,GAAG8F,CAAI,CAEhC,CACF", + "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "Stack", "_Stack", "#constructing", "HeapCls", "s", "LRUCache", "_LRUCache", "#max", "#maxSize", "#dispose", "#onInsert", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "#hasOnInsert", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "onInsert", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/lru-cache/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/other.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/other.js new file mode 100644 index 0000000000000000000000000000000000000000..bb6a03533836c9943d4a438968316ed733b0a43c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/other.js @@ -0,0 +1 @@ +module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/standard.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/standard.js new file mode 100644 index 0000000000000000000000000000000000000000..5ee9937eb07c761e211ce3e96292f51a6132a3b7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/mime/types/standard.js @@ -0,0 +1 @@ +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8e318b23a033e2de3b3b062809a9be2caa46d410 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts @@ -0,0 +1,2 @@ +export declare const assertValidPattern: (pattern: any) => void; +//# sourceMappingURL=assert-valid-pattern.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c61c0310949955412f07b82da117872ba7f3deb0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js new file mode 100644 index 0000000000000000000000000000000000000000..5fc86bbd0116c9b0e2579cb27de4ad53af938fc6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertValidPattern = void 0; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +exports.assertValidPattern = assertValidPattern; +//# sourceMappingURL=assert-valid-pattern.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7a7b64bd2357fde6260e2e3131ff5785370a604d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b8c1e5448e63922d262f7bfeb7427e71338330d9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts @@ -0,0 +1,20 @@ +import { MinimatchOptions, MMRegExp } from './index.js'; +export type ExtglobType = '!' | '?' | '+' | '*' | '@'; +export declare class AST { + #private; + type: ExtglobType | null; + constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions); + get hasMagic(): boolean | undefined; + toString(): string; + push(...parts: (string | AST)[]): void; + toJSON(): any[]; + isStart(): boolean; + isEnd(): boolean; + copyIn(part: AST | string): void; + clone(parent: AST): AST; + static fromGlob(pattern: string, options?: MinimatchOptions): AST; + toMMPattern(): MMRegExp | string; + get options(): MinimatchOptions; + toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean]; +} +//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9e7bfb9a8b01bc30f8b336fb3799e3d1b3388750 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.js new file mode 100644 index 0000000000000000000000000000000000000000..7b2109625eaeb925c910bbf53cfe61f8c9e416f4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.js @@ -0,0 +1,592 @@ +"use strict"; +// parse a single path portion +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST = void 0; +const brace_expressions_js_1 = require("./brace-expressions.js"); +const unescape_js_1 = require("./unescape.js"); +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); + } + else { + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); + } + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + (0, unescape_js_1.unescape)(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + (0, unescape_js_1.unescape)(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; + } +} +exports.AST = AST; +//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/ast.js.map new file mode 100644 index 0000000000000000000000000000000000000000..77d65632a70724bfe6ee895e13432d1c1a99bef7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/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AI,KAAK,CAAA;oBAC5B,SAAQ;gBACV,CAAC;YACH,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AA/kBD,kBA+kBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {}\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty = this.isStart() && this.isEnd()\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '*') {\n if (noEmpty && glob === '*') re += starNoEmpty\n else re += star\n hasMagic = true\n continue\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1572deb95e2e376474f9fc1e56e4c38a055fbd1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts @@ -0,0 +1,8 @@ +export type ParseClassResult = [ + src: string, + uFlag: boolean, + consumed: number, + hasMagic: boolean +]; +export declare const parseClass: (glob: string, position: number) => ParseClassResult; +//# sourceMappingURL=brace-expressions.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..046b6313560fa44de3ef23311bf62142e834e562 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,KACf,gBA6HF,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js new file mode 100644 index 0000000000000000000000000000000000000000..0e13eefc4cfee2b39459025da2a5f53ba1450dd2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -0,0 +1,152 @@ +"use strict"; +// translate the various posix character classes into unicode properties +// this works across all unicode locales +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseClass = void 0; +// { : [, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; +exports.parseClass = parseClass; +//# sourceMappingURL=brace-expressions.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fd76e8d3fe1c5e46d644467028845941082a77cf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/brace-expressions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,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AAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7391e75225605ac15c27eca32e245dfb445d1bc3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts @@ -0,0 +1,12 @@ +import { MinimatchOptions } from './index.js'; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7bcc19c63ce91a2c59217bef5e252139a1ab798b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js new file mode 100644 index 0000000000000000000000000000000000000000..02a4f8a8e0a588c2b99ea16c14d4ce77786adeb7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escape = void 0; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; +exports.escape = escape; +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js.map new file mode 100644 index 0000000000000000000000000000000000000000..264b2ea51587d80bb5478fcec3671d954c60bfa9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;GAQG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAZY,QAAA,MAAM,UAYlB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick = {}\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..41d16a98ebe793da4033a0bfc7c24d0055bee45d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts @@ -0,0 +1,94 @@ +import { AST } from './ast.js'; +type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; +export interface MinimatchOptions { + nobrace?: boolean; + nocomment?: boolean; + nonegate?: boolean; + debug?: boolean; + noglobstar?: boolean; + noext?: boolean; + nonull?: boolean; + windowsPathsNoEscape?: boolean; + allowWindowsEscape?: boolean; + partial?: boolean; + dot?: boolean; + nocase?: boolean; + nocaseMagicOnly?: boolean; + magicalBraces?: boolean; + matchBase?: boolean; + flipNegate?: boolean; + preserveMultipleSlashes?: boolean; + optimizationLevel?: number; + platform?: Platform; + windowsNoMagicRoot?: boolean; +} +export declare const minimatch: { + (p: string, pattern: string, options?: MinimatchOptions): boolean; + sep: Sep; + GLOBSTAR: typeof GLOBSTAR; + filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; + defaults: (def: MinimatchOptions) => typeof minimatch; + braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; + match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; + AST: typeof AST; + Minimatch: typeof Minimatch; + escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; + unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +}; +type Sep = '\\' | '/'; +export declare const sep: Sep; +export declare const GLOBSTAR: unique symbol; +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; +export declare const defaults: (def: MinimatchOptions) => typeof minimatch; +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; +export type MMRegExp = RegExp & { + _src?: string; + _glob?: string; +}; +export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; +export type ParseReturn = ParseReturnFiltered | false; +export declare class Minimatch { + options: MinimatchOptions; + set: ParseReturnFiltered[][]; + pattern: string; + windowsPathsNoEscape: boolean; + nonegate: boolean; + negate: boolean; + comment: boolean; + empty: boolean; + preserveMultipleSlashes: boolean; + partial: boolean; + globSet: string[]; + globParts: string[][]; + nocase: boolean; + isWindows: boolean; + platform: Platform; + windowsNoMagicRoot: boolean; + regexp: false | null | MMRegExp; + constructor(pattern: string, options?: MinimatchOptions); + hasMagic(): boolean; + debug(..._: any[]): void; + make(): void; + preprocess(globParts: string[][]): string[][]; + adjascentGlobstarOptimize(globParts: string[][]): string[][]; + levelOneOptimize(globParts: string[][]): string[][]; + levelTwoFileOptimize(parts: string | string[]): string[]; + firstPhasePreProcess(globParts: string[][]): string[][]; + secondPhasePreProcess(globParts: string[][]): string[][]; + partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[]; + parseNegate(): void; + matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; + braceExpand(): string[]; + parse(pattern: string): ParseReturn; + makeRe(): false | MMRegExp; + slashSplit(p: string): string[]; + match(f: string, partial?: boolean): boolean; + static defaults(def: MinimatchOptions): typeof Minimatch; +} +export { AST } from './ast.js'; +export { escape } from './escape.js'; +export { unescape } from './unescape.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..6c8efb90820646aea79fc62e66901ade1a7268b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,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K,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f58fb8616aa9abd104a4fb7696d6ba01cd1006f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js @@ -0,0 +1,1014 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +const brace_expansion_1 = require("@isaacs/brace-expansion"); +const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); +const ast_js_1 = require("./ast.js"); +const escape_js_1 = require("./escape.js"); +const unescape_js_1 = require("./unescape.js"); +const minimatch = (p, pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +exports.minimatch = minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +exports.minimatch.sep = exports.sep; +exports.GLOBSTAR = Symbol('globstar **'); +exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); +exports.filter = filter; +exports.minimatch.filter = exports.filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return exports.minimatch; + } + const orig = exports.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports.GLOBSTAR, + }); +}; +exports.defaults = defaults; +exports.minimatch.defaults = exports.defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return (0, brace_expansion_1.expand)(pattern); +}; +exports.braceExpand = braceExpand; +exports.minimatch.braceExpand = exports.braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +exports.makeRe = makeRe; +exports.minimatch.makeRe = exports.makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +exports.match = match; +exports.minimatch.match = exports.match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + // just collapse multiple ** portions into one + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + //

// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (matched) {
+                    globParts[i] = [];
+                    globParts[j] = matched;
+                    break;
+                }
+            }
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
+            }
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
+            }
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
+            }
+            /* c8 ignore stop */
+            if (p === exports.GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
+            }
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
+    }
+    braceExpand() {
+        return (0, exports.braceExpand)(this.pattern, this.options);
+    }
+    parse(pattern) {
+        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return exports.GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot
+                    ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot
+                    ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === 'object') {
+            // Avoids overriding in frozen environments
+            Reflect.defineProperty(re, 'test', { value: fastTest });
+        }
+        return re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? star
+            : options.dot
+                ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? regExpEscape(p)
+                    : p === exports.GLOBSTAR
+                        ? exports.GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== exports.GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== exports.GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = exports.GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== exports.GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
+    }
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
+    }
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
+            return false;
+        }
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
+            return false;
+        }
+        return this.negate;
+    }
+    static defaults(def) {
+        return exports.minimatch.defaults(def).Minimatch;
+    }
+}
+exports.Minimatch = Minimatch;
+/* c8 ignore start */
+var ast_js_2 = require("./ast.js");
+Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
+var escape_js_2 = require("./escape.js");
+Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
+var unescape_js_2 = require("./unescape.js");
+Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
+/* c8 ignore stop */
+exports.minimatch.AST = ast_js_1.AST;
+exports.minimatch.Minimatch = Minimatch;
+exports.minimatch.escape = escape_js_1.escape;
+exports.minimatch.unescape = unescape_js_1.unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..96ae5accf6a889549dba5950fd005695b5b26b69
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAgD;AAChD,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW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and } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "commonjs"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2a36f873e2742bc6dbf7ed36a285adb8b141b85c
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts
@@ -0,0 +1,17 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=unescape.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..e268215b417473af57d3a0f93fbfc8cd0c30b5e2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js
new file mode 100644
index 0000000000000000000000000000000000000000..47c36bcee5a02af522c067a10c3b2167492d6811
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.unescape = void 0;
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    return windowsPathsNoEscape
+        ? s.replace(/\[([^\/\\])\]/g, '$1')
+        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+exports.unescape = unescape;
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..353d3aa029fa52cab063d6f106d055866433a729
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/commonjs/unescape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;GAaG;AACI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8e318b23a033e2de3b3b062809a9be2caa46d410
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
@@ -0,0 +1,2 @@
+export declare const assertValidPattern: (pattern: any) => void;
+//# sourceMappingURL=assert-valid-pattern.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..c61c0310949955412f07b82da117872ba7f3deb0
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js
new file mode 100644
index 0000000000000000000000000000000000000000..7b534fc30200bb8e36fc6f85aebb49a8738f711d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -0,0 +1,10 @@
+const MAX_PATTERN_LENGTH = 1024 * 64;
+export const assertValidPattern = (pattern) => {
+    if (typeof pattern !== 'string') {
+        throw new TypeError('invalid pattern');
+    }
+    if (pattern.length > MAX_PATTERN_LENGTH) {
+        throw new TypeError('pattern is too long');
+    }
+};
+//# sourceMappingURL=assert-valid-pattern.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..4f4bba85881246978c502c9f4dad4e0c55df3d41
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n  pattern: any\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b8c1e5448e63922d262f7bfeb7427e71338330d9
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts
@@ -0,0 +1,20 @@
+import { MinimatchOptions, MMRegExp } from './index.js';
+export type ExtglobType = '!' | '?' | '+' | '*' | '@';
+export declare class AST {
+    #private;
+    type: ExtglobType | null;
+    constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
+    get hasMagic(): boolean | undefined;
+    toString(): string;
+    push(...parts: (string | AST)[]): void;
+    toJSON(): any[];
+    isStart(): boolean;
+    isEnd(): boolean;
+    copyIn(part: AST | string): void;
+    clone(parent: AST): AST;
+    static fromGlob(pattern: string, options?: MinimatchOptions): AST;
+    toMMPattern(): MMRegExp | string;
+    get options(): MinimatchOptions;
+    toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
+}
+//# sourceMappingURL=ast.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..9e7bfb9a8b01bc30f8b336fb3799e3d1b3388750
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js
new file mode 100644
index 0000000000000000000000000000000000000000..2d2bced6533de246d1b13dd2833ee28c6297a0d2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js
@@ -0,0 +1,588 @@
+// parse a single path portion
+import { parseClass } from './brace-expressions.js';
+import { unescape } from './unescape.js';
+const types = new Set(['!', '?', '+', '*', '@']);
+const isExtglobType = (c) => types.has(c);
+// Patterns that get prepended to bind to the start of either the
+// entire string, or just a single path portion, to prevent dots
+// and/or traversal patterns, when needed.
+// Exts don't need the ^ or / bit, because the root binds that already.
+const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
+const startNoDot = '(?!\\.)';
+// characters that indicate a start of pattern needs the "no dots" bit,
+// because a dot *might* be matched. ( is not in the list, because in
+// the case of a child extglob, it will handle the prevention itself.
+const addPatternStart = new Set(['[', '.']);
+// cases where traversal is A-OK, no dot prevention needed
+const justDots = new Set(['..', '.']);
+const reSpecials = new Set('().*{}+?[]^$\\!');
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// any single thing other than /
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// use + when we need to ensure that *something* matches, because the * is
+// the only thing in the path portion.
+const starNoEmpty = qmark + '+?';
+// remove the \ chars that we added if we end up doing a nonmagic compare
+// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
+export class AST {
+    type;
+    #root;
+    #hasMagic;
+    #uflag = false;
+    #parts = [];
+    #parent;
+    #parentIndex;
+    #negs;
+    #filledNegs = false;
+    #options;
+    #toString;
+    // set to true if it's an extglob with no children
+    // (which really means one child of '')
+    #emptyExt = false;
+    constructor(type, parent, options = {}) {
+        this.type = type;
+        // extglobs are inherently magical
+        if (type)
+            this.#hasMagic = true;
+        this.#parent = parent;
+        this.#root = this.#parent ? this.#parent.#root : this;
+        this.#options = this.#root === this ? options : this.#root.#options;
+        this.#negs = this.#root === this ? [] : this.#root.#negs;
+        if (type === '!' && !this.#root.#filledNegs)
+            this.#negs.push(this);
+        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
+    }
+    get hasMagic() {
+        /* c8 ignore start */
+        if (this.#hasMagic !== undefined)
+            return this.#hasMagic;
+        /* c8 ignore stop */
+        for (const p of this.#parts) {
+            if (typeof p === 'string')
+                continue;
+            if (p.type || p.hasMagic)
+                return (this.#hasMagic = true);
+        }
+        // note: will be undefined until we generate the regexp src and find out
+        return this.#hasMagic;
+    }
+    // reconstructs the pattern
+    toString() {
+        if (this.#toString !== undefined)
+            return this.#toString;
+        if (!this.type) {
+            return (this.#toString = this.#parts.map(p => String(p)).join(''));
+        }
+        else {
+            return (this.#toString =
+                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
+        }
+    }
+    #fillNegs() {
+        /* c8 ignore start */
+        if (this !== this.#root)
+            throw new Error('should only call on root');
+        if (this.#filledNegs)
+            return this;
+        /* c8 ignore stop */
+        // call toString() once to fill this out
+        this.toString();
+        this.#filledNegs = true;
+        let n;
+        while ((n = this.#negs.pop())) {
+            if (n.type !== '!')
+                continue;
+            // walk up the tree, appending everthing that comes AFTER parentIndex
+            let p = n;
+            let pp = p.#parent;
+            while (pp) {
+                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
+                    for (const part of n.#parts) {
+                        /* c8 ignore start */
+                        if (typeof part === 'string') {
+                            throw new Error('string part in extglob AST??');
+                        }
+                        /* c8 ignore stop */
+                        part.copyIn(pp.#parts[i]);
+                    }
+                }
+                p = pp;
+                pp = p.#parent;
+            }
+        }
+        return this;
+    }
+    push(...parts) {
+        for (const p of parts) {
+            if (p === '')
+                continue;
+            /* c8 ignore start */
+            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
+                throw new Error('invalid part: ' + p);
+            }
+            /* c8 ignore stop */
+            this.#parts.push(p);
+        }
+    }
+    toJSON() {
+        const ret = this.type === null
+            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
+            : [this.type, ...this.#parts.map(p => p.toJSON())];
+        if (this.isStart() && !this.type)
+            ret.unshift([]);
+        if (this.isEnd() &&
+            (this === this.#root ||
+                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
+            ret.push({});
+        }
+        return ret;
+    }
+    isStart() {
+        if (this.#root === this)
+            return true;
+        // if (this.type) return !!this.#parent?.isStart()
+        if (!this.#parent?.isStart())
+            return false;
+        if (this.#parentIndex === 0)
+            return true;
+        // if everything AHEAD of this is a negation, then it's still the "start"
+        const p = this.#parent;
+        for (let i = 0; i < this.#parentIndex; i++) {
+            const pp = p.#parts[i];
+            if (!(pp instanceof AST && pp.type === '!')) {
+                return false;
+            }
+        }
+        return true;
+    }
+    isEnd() {
+        if (this.#root === this)
+            return true;
+        if (this.#parent?.type === '!')
+            return true;
+        if (!this.#parent?.isEnd())
+            return false;
+        if (!this.type)
+            return this.#parent?.isEnd();
+        // if not root, it'll always have a parent
+        /* c8 ignore start */
+        const pl = this.#parent ? this.#parent.#parts.length : 0;
+        /* c8 ignore stop */
+        return this.#parentIndex === pl - 1;
+    }
+    copyIn(part) {
+        if (typeof part === 'string')
+            this.push(part);
+        else
+            this.push(part.clone(this));
+    }
+    clone(parent) {
+        const c = new AST(this.type, parent);
+        for (const p of this.#parts) {
+            c.copyIn(p);
+        }
+        return c;
+    }
+    static #parseAST(str, ast, pos, opt) {
+        let escaping = false;
+        let inBrace = false;
+        let braceStart = -1;
+        let braceNeg = false;
+        if (ast.type === null) {
+            // outside of a extglob, append until we find a start
+            let i = pos;
+            let acc = '';
+            while (i < str.length) {
+                const c = str.charAt(i++);
+                // still accumulate escapes at this point, but we do ignore
+                // starts that are escaped
+                if (escaping || c === '\\') {
+                    escaping = !escaping;
+                    acc += c;
+                    continue;
+                }
+                if (inBrace) {
+                    if (i === braceStart + 1) {
+                        if (c === '^' || c === '!') {
+                            braceNeg = true;
+                        }
+                    }
+                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                        inBrace = false;
+                    }
+                    acc += c;
+                    continue;
+                }
+                else if (c === '[') {
+                    inBrace = true;
+                    braceStart = i;
+                    braceNeg = false;
+                    acc += c;
+                    continue;
+                }
+                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
+                    ast.push(acc);
+                    acc = '';
+                    const ext = new AST(c, ast);
+                    i = AST.#parseAST(str, ext, i, opt);
+                    ast.push(ext);
+                    continue;
+                }
+                acc += c;
+            }
+            ast.push(acc);
+            return i;
+        }
+        // some kind of extglob, pos is at the (
+        // find the next | or )
+        let i = pos + 1;
+        let part = new AST(null, ast);
+        const parts = [];
+        let acc = '';
+        while (i < str.length) {
+            const c = str.charAt(i++);
+            // still accumulate escapes at this point, but we do ignore
+            // starts that are escaped
+            if (escaping || c === '\\') {
+                escaping = !escaping;
+                acc += c;
+                continue;
+            }
+            if (inBrace) {
+                if (i === braceStart + 1) {
+                    if (c === '^' || c === '!') {
+                        braceNeg = true;
+                    }
+                }
+                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                    inBrace = false;
+                }
+                acc += c;
+                continue;
+            }
+            else if (c === '[') {
+                inBrace = true;
+                braceStart = i;
+                braceNeg = false;
+                acc += c;
+                continue;
+            }
+            if (isExtglobType(c) && str.charAt(i) === '(') {
+                part.push(acc);
+                acc = '';
+                const ext = new AST(c, part);
+                part.push(ext);
+                i = AST.#parseAST(str, ext, i, opt);
+                continue;
+            }
+            if (c === '|') {
+                part.push(acc);
+                acc = '';
+                parts.push(part);
+                part = new AST(null, ast);
+                continue;
+            }
+            if (c === ')') {
+                if (acc === '' && ast.#parts.length === 0) {
+                    ast.#emptyExt = true;
+                }
+                part.push(acc);
+                acc = '';
+                ast.push(...parts, part);
+                return i;
+            }
+            acc += c;
+        }
+        // unfinished extglob
+        // if we got here, it was a malformed extglob! not an extglob, but
+        // maybe something else in there.
+        ast.type = null;
+        ast.#hasMagic = undefined;
+        ast.#parts = [str.substring(pos - 1)];
+        return i;
+    }
+    static fromGlob(pattern, options = {}) {
+        const ast = new AST(null, undefined, options);
+        AST.#parseAST(pattern, ast, 0, options);
+        return ast;
+    }
+    // returns the regular expression if there's magic, or the unescaped
+    // string if not.
+    toMMPattern() {
+        // should only be called on root
+        /* c8 ignore start */
+        if (this !== this.#root)
+            return this.#root.toMMPattern();
+        /* c8 ignore stop */
+        const glob = this.toString();
+        const [re, body, hasMagic, uflag] = this.toRegExpSource();
+        // if we're in nocase mode, and not nocaseMagicOnly, then we do
+        // still need a regular expression if we have to case-insensitively
+        // match capital/lowercase characters.
+        const anyMagic = hasMagic ||
+            this.#hasMagic ||
+            (this.#options.nocase &&
+                !this.#options.nocaseMagicOnly &&
+                glob.toUpperCase() !== glob.toLowerCase());
+        if (!anyMagic) {
+            return body;
+        }
+        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
+        return Object.assign(new RegExp(`^${re}$`, flags), {
+            _src: re,
+            _glob: glob,
+        });
+    }
+    get options() {
+        return this.#options;
+    }
+    // returns the string match, the regexp source, whether there's magic
+    // in the regexp (so a regular expression is required) and whether or
+    // not the uflag is needed for the regular expression (for posix classes)
+    // TODO: instead of injecting the start/end at this point, just return
+    // the BODY of the regexp, along with the start/end portions suitable
+    // for binding the start/end in either a joined full-path makeRe context
+    // (where we bind to (^|/), or a standalone matchPart context (where
+    // we bind to ^, and not /).  Otherwise slashes get duped!
+    //
+    // In part-matching mode, the start is:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: ^(?!\.\.?$)
+    // - if dots allowed or not possible: ^
+    // - if dots possible and not allowed: ^(?!\.)
+    // end is:
+    // - if not isEnd(): nothing
+    // - else: $
+    //
+    // In full-path matching mode, we put the slash at the START of the
+    // pattern, so start is:
+    // - if first pattern: same as part-matching mode
+    // - if not isStart(): nothing
+    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
+    // - if dots allowed or not possible: /
+    // - if dots possible and not allowed: /(?!\.)
+    // end is:
+    // - if last pattern, same as part-matching mode
+    // - else nothing
+    //
+    // Always put the (?:$|/) on negated tails, though, because that has to be
+    // there to bind the end of the negated pattern portion, and it's easier to
+    // just stick it in now rather than try to inject it later in the middle of
+    // the pattern.
+    //
+    // We can just always return the same end, and leave it up to the caller
+    // to know whether it's going to be used joined or in parts.
+    // And, if the start is adjusted slightly, can do the same there:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
+    // - if dots allowed or not possible: (?:/|^)
+    // - if dots possible and not allowed: (?:/|^)(?!\.)
+    //
+    // But it's better to have a simpler binding without a conditional, for
+    // performance, so probably better to return both start options.
+    //
+    // Then the caller just ignores the end if it's not the first pattern,
+    // and the start always gets applied.
+    //
+    // But that's always going to be $ if it's the ending pattern, or nothing,
+    // so the caller can just attach $ at the end of the pattern when building.
+    //
+    // So the todo is:
+    // - better detect what kind of start is needed
+    // - return both flavors of starting pattern
+    // - attach $ at the end of the pattern when creating the actual RegExp
+    //
+    // Ah, but wait, no, that all only applies to the root when the first pattern
+    // is not an extglob. If the first pattern IS an extglob, then we need all
+    // that dot prevention biz to live in the extglob portions, because eg
+    // +(*|.x*) can match .xy but not .yx.
+    //
+    // So, return the two flavors if it's #root and the first child is not an
+    // AST, otherwise leave it to the child AST to handle it, and there,
+    // use the (?:^|/) style of start binding.
+    //
+    // Even simplified further:
+    // - Since the start for a join is eg /(?!\.) and the start for a part
+    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
+    // or start or whatever) and prepend ^ or / at the Regexp construction.
+    toRegExpSource(allowDot) {
+        const dot = allowDot ?? !!this.#options.dot;
+        if (this.#root === this)
+            this.#fillNegs();
+        if (!this.type) {
+            const noEmpty = this.isStart() && this.isEnd();
+            const src = this.#parts
+                .map(p => {
+                const [re, _, hasMagic, uflag] = typeof p === 'string'
+                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
+                    : p.toRegExpSource(allowDot);
+                this.#hasMagic = this.#hasMagic || hasMagic;
+                this.#uflag = this.#uflag || uflag;
+                return re;
+            })
+                .join('');
+            let start = '';
+            if (this.isStart()) {
+                if (typeof this.#parts[0] === 'string') {
+                    // this is the string that will match the start of the pattern,
+                    // so we need to protect against dots and such.
+                    // '.' and '..' cannot match unless the pattern is that exactly,
+                    // even if it starts with . or dot:true is set.
+                    const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
+                    if (!dotTravAllowed) {
+                        const aps = addPatternStart;
+                        // check if we have a possibility of matching . or ..,
+                        // and prevent that.
+                        const needNoTrav = 
+                        // dots are allowed, and the pattern starts with [ or .
+                        (dot && aps.has(src.charAt(0))) ||
+                            // the pattern starts with \., and then [ or .
+                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
+                            // the pattern starts with \.\., and then [ or .
+                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
+                        // no need to prevent dots if it can't match a dot, or if a
+                        // sub-pattern will be preventing it anyway.
+                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
+                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
+                    }
+                }
+            }
+            // append the "end of path portion" pattern to negation tails
+            let end = '';
+            if (this.isEnd() &&
+                this.#root.#filledNegs &&
+                this.#parent?.type === '!') {
+                end = '(?:$|\\/)';
+            }
+            const final = start + src + end;
+            return [
+                final,
+                unescape(src),
+                (this.#hasMagic = !!this.#hasMagic),
+                this.#uflag,
+            ];
+        }
+        // We need to calculate the body *twice* if it's a repeat pattern
+        // at the start, once in nodot mode, then again in dot mode, so a
+        // pattern like *(?) can match 'x.y'
+        const repeated = this.type === '*' || this.type === '+';
+        // some kind of extglob
+        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
+        let body = this.#partsToRegExp(dot);
+        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
+            // invalid extglob, has to at least be *something* present, if it's
+            // the entire path portion.
+            const s = this.toString();
+            this.#parts = [s];
+            this.type = null;
+            this.#hasMagic = undefined;
+            return [s, unescape(this.toString()), false, false];
+        }
+        // XXX abstract out this map method
+        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
+            ? ''
+            : this.#partsToRegExp(true);
+        if (bodyDotAllowed === body) {
+            bodyDotAllowed = '';
+        }
+        if (bodyDotAllowed) {
+            body = `(?:${body})(?:${bodyDotAllowed})*?`;
+        }
+        // an empty !() is exactly equivalent to a starNoEmpty
+        let final = '';
+        if (this.type === '!' && this.#emptyExt) {
+            final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
+        }
+        else {
+            const close = this.type === '!'
+                ? // !() must match something,but !(x) can match ''
+                    '))' +
+                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
+                        star +
+                        ')'
+                : this.type === '@'
+                    ? ')'
+                    : this.type === '?'
+                        ? ')?'
+                        : this.type === '+' && bodyDotAllowed
+                            ? ')'
+                            : this.type === '*' && bodyDotAllowed
+                                ? `)?`
+                                : `)${this.type}`;
+            final = start + body + close;
+        }
+        return [
+            final,
+            unescape(body),
+            (this.#hasMagic = !!this.#hasMagic),
+            this.#uflag,
+        ];
+    }
+    #partsToRegExp(dot) {
+        return this.#parts
+            .map(p => {
+            // extglob ASTs should only contain parent ASTs
+            /* c8 ignore start */
+            if (typeof p === 'string') {
+                throw new Error('string type in extglob ast??');
+            }
+            /* c8 ignore stop */
+            // can ignore hasMagic, because extglobs are already always magic
+            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
+            this.#uflag = this.#uflag || uflag;
+            return re;
+        })
+            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
+            .join('|');
+    }
+    static #parseGlob(glob, hasMagic, noEmpty = false) {
+        let escaping = false;
+        let re = '';
+        let uflag = false;
+        for (let i = 0; i < glob.length; i++) {
+            const c = glob.charAt(i);
+            if (escaping) {
+                escaping = false;
+                re += (reSpecials.has(c) ? '\\' : '') + c;
+                continue;
+            }
+            if (c === '\\') {
+                if (i === glob.length - 1) {
+                    re += '\\\\';
+                }
+                else {
+                    escaping = true;
+                }
+                continue;
+            }
+            if (c === '[') {
+                const [src, needUflag, consumed, magic] = parseClass(glob, i);
+                if (consumed) {
+                    re += src;
+                    uflag = uflag || needUflag;
+                    i += consumed - 1;
+                    hasMagic = hasMagic || magic;
+                    continue;
+                }
+            }
+            if (c === '*') {
+                if (noEmpty && glob === '*')
+                    re += starNoEmpty;
+                else
+                    re += star;
+                hasMagic = true;
+                continue;
+            }
+            if (c === '?') {
+                re += qmark;
+                hasMagic = true;
+                continue;
+            }
+            re += regExpEscape(c);
+        }
+        return [re, unescape(glob), !!hasMagic, uflag];
+    }
+}
+//# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..d37c8c4616db156825b6fe6e4b8651692833e194
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/ast.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACpD,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAE7B,iEAAiE;AACjE,gEAAgE;AAChE,0CAA0C;AAC1C,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,2BAA2B,CAAA;AACpD,MAAM,UAAU,GAAG,SAAS,CAAA;AAE5B,uEAAuE;AACvE,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC3C,0DAA0D;AAC1D,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;AACrC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAA;AAC7C,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CACjC,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAA;AAE/C,gCAAgC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,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBAC7D,IAAI,QAAQ,EAAE,CAAC;oBACb,EAAE,IAAI,GAAG,CAAA;oBACT,KAAK,GAAG,KAAK,IAAI,SAAS,CAAA;oBAC1B,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAA;oBACjB,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAA;oBAC5B,SAAQ;gBACV,CAAC;YACH,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n  types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  readonly #parent?: AST\n  readonly #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {}\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    if (this.#toString !== undefined) return this.#toString\n    if (!this.type) {\n      return (this.#toString = this.#parts.map(p => String(p)).join(''))\n    } else {\n      return (this.#toString =\n        this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n    }\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: any[] =\n      this.type === null\n        ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n        : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions\n  ): number {\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      if (isExtglobType(c) && str.charAt(i) === '(') {\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) this.#fillNegs()\n    if (!this.type) {\n      const noEmpty = this.isStart() && this.isEnd()\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string'\n              ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n              : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = this.#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      this.#parts = [s]\n      this.type = null\n      this.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    // XXX abstract out this map method\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot\n        ? ''\n        : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!'\n          ? // !() must match something,but !(x) can match ''\n            '))' +\n            (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n            star +\n            ')'\n          : this.type === '@'\n          ? ')'\n          : this.type === '?'\n          ? ')?'\n          : this.type === '+' && bodyDotAllowed\n          ? ')'\n          : this.type === '*' && bodyDotAllowed\n          ? `)?`\n          : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #partsToRegExp(dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '*') {\n        if (noEmpty && glob === '*') re += starNoEmpty\n        else re += star\n        hasMagic = true\n        continue\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b1572deb95e2e376474f9fc1e56e4c38a055fbd1
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts
@@ -0,0 +1,8 @@
+export type ParseClassResult = [
+    src: string,
+    uFlag: boolean,
+    consumed: number,
+    hasMagic: boolean
+];
+export declare const parseClass: (glob: string, position: number) => ParseClassResult;
+//# sourceMappingURL=brace-expressions.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..046b6313560fa44de3ef23311bf62142e834e562
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,KACf,gBA6HF,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js
new file mode 100644
index 0000000000000000000000000000000000000000..c629d6ae816e27fdcbbaaef272ac352bfd77a27b
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js
@@ -0,0 +1,148 @@
+// translate the various posix character classes into unicode properties
+// this works across all unicode locales
+// { : [, /u flag required, negated]
+const posixClasses = {
+    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
+    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
+    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
+    '[:blank:]': ['\\p{Zs}\\t', true],
+    '[:cntrl:]': ['\\p{Cc}', true],
+    '[:digit:]': ['\\p{Nd}', true],
+    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
+    '[:lower:]': ['\\p{Ll}', true],
+    '[:print:]': ['\\p{C}', true],
+    '[:punct:]': ['\\p{P}', true],
+    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
+    '[:upper:]': ['\\p{Lu}', true],
+    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
+    '[:xdigit:]': ['A-Fa-f0-9', false],
+};
+// only need to escape a few things inside of brace expressions
+// escapes: [ \ ] -
+const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
+// escape all regexp magic characters
+const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// everything has already been escaped, we just have to join
+const rangesToString = (ranges) => ranges.join('');
+// takes a glob string at a posix brace expression, and returns
+// an equivalent regular expression source, and boolean indicating
+// whether the /u flag needs to be applied, and the number of chars
+// consumed to parse the character class.
+// This also removes out of order ranges, and returns ($.) if the
+// entire class just no good.
+export const parseClass = (glob, position) => {
+    const pos = position;
+    /* c8 ignore start */
+    if (glob.charAt(pos) !== '[') {
+        throw new Error('not in a brace expression');
+    }
+    /* c8 ignore stop */
+    const ranges = [];
+    const negs = [];
+    let i = pos + 1;
+    let sawStart = false;
+    let uflag = false;
+    let escaping = false;
+    let negate = false;
+    let endPos = pos;
+    let rangeStart = '';
+    WHILE: while (i < glob.length) {
+        const c = glob.charAt(i);
+        if ((c === '!' || c === '^') && i === pos + 1) {
+            negate = true;
+            i++;
+            continue;
+        }
+        if (c === ']' && sawStart && !escaping) {
+            endPos = i + 1;
+            break;
+        }
+        sawStart = true;
+        if (c === '\\') {
+            if (!escaping) {
+                escaping = true;
+                i++;
+                continue;
+            }
+            // escaped \ char, fall through and treat like normal char
+        }
+        if (c === '[' && !escaping) {
+            // either a posix class, a collation equivalent, or just a [
+            for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
+                if (glob.startsWith(cls, i)) {
+                    // invalid, [a-[] is fine, but not [a-[:alpha]]
+                    if (rangeStart) {
+                        return ['$.', false, glob.length - pos, true];
+                    }
+                    i += cls.length;
+                    if (neg)
+                        negs.push(unip);
+                    else
+                        ranges.push(unip);
+                    uflag = uflag || u;
+                    continue WHILE;
+                }
+            }
+        }
+        // now it's just a normal character, effectively
+        escaping = false;
+        if (rangeStart) {
+            // throw this range away if it's not valid, but others
+            // can still match.
+            if (c > rangeStart) {
+                ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
+            }
+            else if (c === rangeStart) {
+                ranges.push(braceEscape(c));
+            }
+            rangeStart = '';
+            i++;
+            continue;
+        }
+        // now might be the start of a range.
+        // can be either c-d or c-] or c] or c] at this point
+        if (glob.startsWith('-]', i + 1)) {
+            ranges.push(braceEscape(c + '-'));
+            i += 2;
+            continue;
+        }
+        if (glob.startsWith('-', i + 1)) {
+            rangeStart = c;
+            i += 2;
+            continue;
+        }
+        // not the start of a range, just a single character
+        ranges.push(braceEscape(c));
+        i++;
+    }
+    if (endPos < i) {
+        // didn't see the end of the class, not a valid class,
+        // but might still be valid as a literal match.
+        return ['', false, 0, false];
+    }
+    // if we got no ranges and no negates, then we have a range that
+    // cannot possibly match anything, and that poisons the whole glob
+    if (!ranges.length && !negs.length) {
+        return ['$.', false, glob.length - pos, true];
+    }
+    // if we got one positive range, and it's a single character, then that's
+    // not actually a magic pattern, it's just that one literal character.
+    // we should not treat that as "magic", we should just return the literal
+    // character. [_] is a perfectly valid way to escape glob magic chars.
+    if (negs.length === 0 &&
+        ranges.length === 1 &&
+        /^\\?.$/.test(ranges[0]) &&
+        !negate) {
+        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
+        return [regexpEscape(r), false, endPos - pos, false];
+    }
+    const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
+    const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
+    const comb = ranges.length && negs.length
+        ? '(' + sranges + '|' + snegs + ')'
+        : ranges.length
+            ? sranges
+            : snegs;
+    return [comb, uflag, endPos - pos, true];
+};
+//# sourceMappingURL=brace-expressions.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..5c1e6e61c6c5c9215dedce8ddb370e03cf30712a
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/brace-expressions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7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,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n  '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n  '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n  '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n  '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n  '[:cntrl:]': ['\\\\p{Cc}', true],\n  '[:digit:]': ['\\\\p{Nd}', true],\n  '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n  '[:lower:]': ['\\\\p{Ll}', true],\n  '[:print:]': ['\\\\p{C}', true],\n  '[:punct:]': ['\\\\p{P}', true],\n  '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n  '[:upper:]': ['\\\\p{Lu}', true],\n  '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n  '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length\n      ? '(' + sranges + '|' + snegs + ')'\n      : ranges.length\n      ? sranges\n      : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7391e75225605ac15c27eca32e245dfb445d1bc3
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts
@@ -0,0 +1,12 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character.  In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=escape.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..7bcc19c63ce91a2c59217bef5e252139a1ab798b
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js
new file mode 100644
index 0000000000000000000000000000000000000000..16f7c8c7bdc64645a201065cb264cb561eac851c
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js
@@ -0,0 +1,18 @@
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character.  In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    // don't need to escape +@! because we escape the parens
+    // that make those magic, and escaping ! as [!] isn't valid,
+    // because [!]] is a valid glob class meaning not ']'.
+    return windowsPathsNoEscape
+        ? s.replace(/[?*()[\]]/g, '[$&]')
+        : s.replace(/[?*()[\]\\]/g, '\\$&');
+};
+//# sourceMappingURL=escape.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..170fd1ad52520f2ea381836419fde096063531a3
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/escape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  return windowsPathsNoEscape\n    ? s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..41d16a98ebe793da4033a0bfc7c24d0055bee45d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts
@@ -0,0 +1,94 @@
+import { AST } from './ast.js';
+type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+export interface MinimatchOptions {
+    nobrace?: boolean;
+    nocomment?: boolean;
+    nonegate?: boolean;
+    debug?: boolean;
+    noglobstar?: boolean;
+    noext?: boolean;
+    nonull?: boolean;
+    windowsPathsNoEscape?: boolean;
+    allowWindowsEscape?: boolean;
+    partial?: boolean;
+    dot?: boolean;
+    nocase?: boolean;
+    nocaseMagicOnly?: boolean;
+    magicalBraces?: boolean;
+    matchBase?: boolean;
+    flipNegate?: boolean;
+    preserveMultipleSlashes?: boolean;
+    optimizationLevel?: number;
+    platform?: Platform;
+    windowsNoMagicRoot?: boolean;
+}
+export declare const minimatch: {
+    (p: string, pattern: string, options?: MinimatchOptions): boolean;
+    sep: Sep;
+    GLOBSTAR: typeof GLOBSTAR;
+    filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
+    defaults: (def: MinimatchOptions) => typeof minimatch;
+    braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
+    makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
+    match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
+    AST: typeof AST;
+    Minimatch: typeof Minimatch;
+    escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+    unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+};
+type Sep = '\\' | '/';
+export declare const sep: Sep;
+export declare const GLOBSTAR: unique symbol;
+export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
+export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
+export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
+export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
+export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
+export type MMRegExp = RegExp & {
+    _src?: string;
+    _glob?: string;
+};
+export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
+export type ParseReturn = ParseReturnFiltered | false;
+export declare class Minimatch {
+    options: MinimatchOptions;
+    set: ParseReturnFiltered[][];
+    pattern: string;
+    windowsPathsNoEscape: boolean;
+    nonegate: boolean;
+    negate: boolean;
+    comment: boolean;
+    empty: boolean;
+    preserveMultipleSlashes: boolean;
+    partial: boolean;
+    globSet: string[];
+    globParts: string[][];
+    nocase: boolean;
+    isWindows: boolean;
+    platform: Platform;
+    windowsNoMagicRoot: boolean;
+    regexp: false | null | MMRegExp;
+    constructor(pattern: string, options?: MinimatchOptions);
+    hasMagic(): boolean;
+    debug(..._: any[]): void;
+    make(): void;
+    preprocess(globParts: string[][]): string[][];
+    adjascentGlobstarOptimize(globParts: string[][]): string[][];
+    levelOneOptimize(globParts: string[][]): string[][];
+    levelTwoFileOptimize(parts: string | string[]): string[];
+    firstPhasePreProcess(globParts: string[][]): string[][];
+    secondPhasePreProcess(globParts: string[][]): string[][];
+    partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
+    parseNegate(): void;
+    matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
+    braceExpand(): string[];
+    parse(pattern: string): ParseReturn;
+    makeRe(): false | MMRegExp;
+    slashSplit(p: string): string[];
+    match(f: string, partial?: boolean): boolean;
+    static defaults(def: MinimatchOptions): typeof Minimatch;
+}
+export { AST } from './ast.js';
+export { escape } from './escape.js';
+export { unescape } from './unescape.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..6c8efb90820646aea79fc62e66901ade1a7268b5
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAA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AAE;IAkBxD,UAAU,CACR,CAAC,EAAE,MAAM,EAAE,EACX,CAAC,EAAE,MAAM,EAAE,EACX,YAAY,GAAE,OAAe,GAC5B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..790d6c02a2f22e96cf10aeacc346c716de2f6644
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js
@@ -0,0 +1,1001 @@
+import { expand } from '@isaacs/brace-expansion';
+import { assertValidPattern } from './assert-valid-pattern.js';
+import { AST } from './ast.js';
+import { escape } from './escape.js';
+import { unescape } from './unescape.js';
+export const minimatch = (p, pattern, options = {}) => {
+    assertValidPattern(pattern);
+    // shortcut: comments match nothing.
+    if (!options.nocomment && pattern.charAt(0) === '#') {
+        return false;
+    }
+    return new Minimatch(pattern, options).match(p);
+};
+// Optimized checking for the most common glob patterns.
+const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
+const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
+const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
+const starDotExtTestNocase = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
+};
+const starDotExtTestNocaseDot = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => f.toLowerCase().endsWith(ext);
+};
+const starDotStarRE = /^\*+\.\*+$/;
+const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
+const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
+const dotStarRE = /^\.\*+$/;
+const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
+const starRE = /^\*+$/;
+const starTest = (f) => f.length !== 0 && !f.startsWith('.');
+const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
+const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
+const qmarksTestNocase = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExt([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestNocaseDot = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExtDot([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestDot = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExtDot([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTest = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExt([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTestNoExt = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && !f.startsWith('.');
+};
+const qmarksTestNoExtDot = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && f !== '.' && f !== '..';
+};
+/* c8 ignore start */
+const defaultPlatform = (typeof process === 'object' && process
+    ? (typeof process.env === 'object' &&
+        process.env &&
+        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
+        process.platform
+    : 'posix');
+const path = {
+    win32: { sep: '\\' },
+    posix: { sep: '/' },
+};
+/* c8 ignore stop */
+export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
+minimatch.sep = sep;
+export const GLOBSTAR = Symbol('globstar **');
+minimatch.GLOBSTAR = GLOBSTAR;
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// ** when dots are allowed.  Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
+export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
+minimatch.filter = filter;
+const ext = (a, b = {}) => Object.assign({}, a, b);
+export const defaults = (def) => {
+    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+        return minimatch;
+    }
+    const orig = minimatch;
+    const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
+    return Object.assign(m, {
+        Minimatch: class Minimatch extends orig.Minimatch {
+            constructor(pattern, options = {}) {
+                super(pattern, ext(def, options));
+            }
+            static defaults(options) {
+                return orig.defaults(ext(def, options)).Minimatch;
+            }
+        },
+        AST: class AST extends orig.AST {
+            /* c8 ignore start */
+            constructor(type, parent, options = {}) {
+                super(type, parent, ext(def, options));
+            }
+            /* c8 ignore stop */
+            static fromGlob(pattern, options = {}) {
+                return orig.AST.fromGlob(pattern, ext(def, options));
+            }
+        },
+        unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
+        escape: (s, options = {}) => orig.escape(s, ext(def, options)),
+        filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
+        defaults: (options) => orig.defaults(ext(def, options)),
+        makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
+        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
+        match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
+        sep: orig.sep,
+        GLOBSTAR: GLOBSTAR,
+    });
+};
+minimatch.defaults = defaults;
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+export const braceExpand = (pattern, options = {}) => {
+    assertValidPattern(pattern);
+    // Thanks to Yeting Li  for
+    // improving this regexp to avoid a ReDOS vulnerability.
+    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+        // shortcut. no need to expand.
+        return [pattern];
+    }
+    return expand(pattern);
+};
+minimatch.braceExpand = braceExpand;
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion.  Otherwise, any series
+// of * is equivalent to a single *.  Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
+minimatch.makeRe = makeRe;
+export const match = (list, pattern, options = {}) => {
+    const mm = new Minimatch(pattern, options);
+    list = list.filter(f => mm.match(f));
+    if (mm.options.nonull && !list.length) {
+        list.push(pattern);
+    }
+    return list;
+};
+minimatch.match = match;
+// replace stuff like \* with *
+const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+export class Minimatch {
+    options;
+    set;
+    pattern;
+    windowsPathsNoEscape;
+    nonegate;
+    negate;
+    comment;
+    empty;
+    preserveMultipleSlashes;
+    partial;
+    globSet;
+    globParts;
+    nocase;
+    isWindows;
+    platform;
+    windowsNoMagicRoot;
+    regexp;
+    constructor(pattern, options = {}) {
+        assertValidPattern(pattern);
+        options = options || {};
+        this.options = options;
+        this.pattern = pattern;
+        this.platform = options.platform || defaultPlatform;
+        this.isWindows = this.platform === 'win32';
+        this.windowsPathsNoEscape =
+            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
+        if (this.windowsPathsNoEscape) {
+            this.pattern = this.pattern.replace(/\\/g, '/');
+        }
+        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
+        this.regexp = null;
+        this.negate = false;
+        this.nonegate = !!options.nonegate;
+        this.comment = false;
+        this.empty = false;
+        this.partial = !!options.partial;
+        this.nocase = !!this.options.nocase;
+        this.windowsNoMagicRoot =
+            options.windowsNoMagicRoot !== undefined
+                ? options.windowsNoMagicRoot
+                : !!(this.isWindows && this.nocase);
+        this.globSet = [];
+        this.globParts = [];
+        this.set = [];
+        // make the set of regexps etc.
+        this.make();
+    }
+    hasMagic() {
+        if (this.options.magicalBraces && this.set.length > 1) {
+            return true;
+        }
+        for (const pattern of this.set) {
+            for (const part of pattern) {
+                if (typeof part !== 'string')
+                    return true;
+            }
+        }
+        return false;
+    }
+    debug(..._) { }
+    make() {
+        const pattern = this.pattern;
+        const options = this.options;
+        // empty patterns and comments match nothing.
+        if (!options.nocomment && pattern.charAt(0) === '#') {
+            this.comment = true;
+            return;
+        }
+        if (!pattern) {
+            this.empty = true;
+            return;
+        }
+        // step 1: figure out negation, etc.
+        this.parseNegate();
+        // step 2: expand braces
+        this.globSet = [...new Set(this.braceExpand())];
+        if (options.debug) {
+            this.debug = (...args) => console.error(...args);
+        }
+        this.debug(this.pattern, this.globSet);
+        // step 3: now we have a set, so turn each one into a series of
+        // path-portion matching patterns.
+        // These will be regexps, except in the case of "**", which is
+        // set to the GLOBSTAR object for globstar behavior,
+        // and will not contain any / characters
+        //
+        // First, we preprocess to make the glob pattern sets a bit simpler
+        // and deduped.  There are some perf-killing patterns that can cause
+        // problems with a glob walk, but we can simplify them down a bit.
+        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
+        this.globParts = this.preprocess(rawGlobParts);
+        this.debug(this.pattern, this.globParts);
+        // glob --> regexps
+        let set = this.globParts.map((s, _, __) => {
+            if (this.isWindows && this.windowsNoMagicRoot) {
+                // check if it's a drive or unc path.
+                const isUNC = s[0] === '' &&
+                    s[1] === '' &&
+                    (s[2] === '?' || !globMagic.test(s[2])) &&
+                    !globMagic.test(s[3]);
+                const isDrive = /^[a-z]:/i.test(s[0]);
+                if (isUNC) {
+                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
+                }
+                else if (isDrive) {
+                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
+                }
+            }
+            return s.map(ss => this.parse(ss));
+        });
+        this.debug(this.pattern, set);
+        // filter out everything that didn't compile properly.
+        this.set = set.filter(s => s.indexOf(false) === -1);
+        // do not treat the ? in UNC paths as magic
+        if (this.isWindows) {
+            for (let i = 0; i < this.set.length; i++) {
+                const p = this.set[i];
+                if (p[0] === '' &&
+                    p[1] === '' &&
+                    this.globParts[i][2] === '?' &&
+                    typeof p[3] === 'string' &&
+                    /^[a-z]:$/i.test(p[3])) {
+                    p[2] = '?';
+                }
+            }
+        }
+        this.debug(this.pattern, this.set);
+    }
+    // various transforms to equivalent pattern sets that are
+    // faster to process in a filesystem walk.  The goal is to
+    // eliminate what we can, and push all ** patterns as far
+    // to the right as possible, even if it increases the number
+    // of patterns that we have to process.
+    preprocess(globParts) {
+        // if we're not in globstar mode, then turn all ** into *
+        if (this.options.noglobstar) {
+            for (let i = 0; i < globParts.length; i++) {
+                for (let j = 0; j < globParts[i].length; j++) {
+                    if (globParts[i][j] === '**') {
+                        globParts[i][j] = '*';
+                    }
+                }
+            }
+        }
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            // aggressive optimization for the purpose of fs walking
+            globParts = this.firstPhasePreProcess(globParts);
+            globParts = this.secondPhasePreProcess(globParts);
+        }
+        else if (optimizationLevel >= 1) {
+            // just basic optimizations to remove some .. parts
+            globParts = this.levelOneOptimize(globParts);
+        }
+        else {
+            // just collapse multiple ** portions into one
+            globParts = this.adjascentGlobstarOptimize(globParts);
+        }
+        return globParts;
+    }
+    // just get rid of adjascent ** portions
+    adjascentGlobstarOptimize(globParts) {
+        return globParts.map(parts => {
+            let gs = -1;
+            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+                let i = gs;
+                while (parts[i + 1] === '**') {
+                    i++;
+                }
+                if (i !== gs) {
+                    parts.splice(gs, i - gs);
+                }
+            }
+            return parts;
+        });
+    }
+    // get rid of adjascent ** and resolve .. portions
+    levelOneOptimize(globParts) {
+        return globParts.map(parts => {
+            parts = parts.reduce((set, part) => {
+                const prev = set[set.length - 1];
+                if (part === '**' && prev === '**') {
+                    return set;
+                }
+                if (part === '..') {
+                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
+                        set.pop();
+                        return set;
+                    }
+                }
+                set.push(part);
+                return set;
+            }, []);
+            return parts.length === 0 ? [''] : parts;
+        });
+    }
+    levelTwoFileOptimize(parts) {
+        if (!Array.isArray(parts)) {
+            parts = this.slashSplit(parts);
+        }
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (matched) {
+                    globParts[i] = [];
+                    globParts[j] = matched;
+                    break;
+                }
+            }
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
+            }
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
+            }
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
+            }
+            /* c8 ignore stop */
+            if (p === GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
+            }
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
+    }
+    braceExpand() {
+        return braceExpand(this.pattern, this.options);
+    }
+    parse(pattern) {
+        assertValidPattern(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot
+                    ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot
+                    ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === 'object') {
+            // Avoids overriding in frozen environments
+            Reflect.defineProperty(re, 'test', { value: fastTest });
+        }
+        return re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? star
+            : options.dot
+                ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? regExpEscape(p)
+                    : p === GLOBSTAR
+                        ? GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== GLOBSTAR || prev === GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
+    }
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
+    }
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
+            return false;
+        }
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
+            return false;
+        }
+        return this.negate;
+    }
+    static defaults(def) {
+        return minimatch.defaults(def).Minimatch;
+    }
+}
+/* c8 ignore start */
+export { AST } from './ast.js';
+export { escape } from './escape.js';
+export { unescape } from './unescape.js';
+/* c8 ignore stop */
+minimatch.AST = AST;
+minimatch.Minimatch = Minimatch;
+minimatch.escape = escape;
+minimatch.unescape = unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..42173930f3ef10303294ec2be179962f984d3b39
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,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,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,oBAAoB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import { expand } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3dbc1ca591c0557e35b6004aeba250e6a70b56e3
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "module"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2a36f873e2742bc6dbf7ed36a285adb8b141b85c
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts
@@ -0,0 +1,17 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=unescape.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..e268215b417473af57d3a0f93fbfc8cd0c30b5e2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js
new file mode 100644
index 0000000000000000000000000000000000000000..0faf9a2b7306f7ad4ea2ce560d6806999cbba546
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js
@@ -0,0 +1,20 @@
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    return windowsPathsNoEscape
+        ? s.replace(/\[([^\/\\])\]/g, '$1')
+        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..eb146c20d1e2d686b40c263676f5b38f00023794
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimatch/dist/esm/unescape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/.github/FUNDING.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/.github/FUNDING.yml
new file mode 100644
index 0000000000000000000000000000000000000000..a9366222e92a9f9a7a2a4c4cf7cf0f011510924d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/minimist
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/example/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/example/parse.js
new file mode 100644
index 0000000000000000000000000000000000000000..9d90ffb2642b4caddde1ec6fb0cff2e78192bb09
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/example/parse.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var argv = require('../')(process.argv.slice(2));
+console.log(argv);
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/all_bool.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/all_bool.js
new file mode 100644
index 0000000000000000000000000000000000000000..befa0c99769080972260dac9e4a77630857000f2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/all_bool.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean true (default all --args to boolean)', function (t) {
+	var argv = parse(['moo', '--honk', 'cow'], {
+		boolean: true,
+	});
+
+	t.deepEqual(argv, {
+		honk: true,
+		_: ['moo', 'cow'],
+	});
+
+	t.deepEqual(typeof argv.honk, 'boolean');
+	t.end();
+});
+
+test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
+	var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
+		boolean: true,
+	});
+
+	t.deepEqual(argv, {
+		honk: true,
+		tacos: 'good',
+		p: 55,
+		_: ['moo', 'cow'],
+	});
+
+	t.deepEqual(typeof argv.honk, 'boolean');
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/bool.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/bool.js
new file mode 100644
index 0000000000000000000000000000000000000000..e58d47e442ce127bfe5703b6b64d14c3e4511223
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/bool.js
@@ -0,0 +1,177 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean default false', function (t) {
+	var argv = parse(['moo'], {
+		boolean: ['t', 'verbose'],
+		default: { verbose: false, t: false },
+	});
+
+	t.deepEqual(argv, {
+		verbose: false,
+		t: false,
+		_: ['moo'],
+	});
+
+	t.deepEqual(typeof argv.verbose, 'boolean');
+	t.deepEqual(typeof argv.t, 'boolean');
+	t.end();
+
+});
+
+test('boolean groups', function (t) {
+	var argv = parse(['-x', '-z', 'one', 'two', 'three'], {
+		boolean: ['x', 'y', 'z'],
+	});
+
+	t.deepEqual(argv, {
+		x: true,
+		y: false,
+		z: true,
+		_: ['one', 'two', 'three'],
+	});
+
+	t.deepEqual(typeof argv.x, 'boolean');
+	t.deepEqual(typeof argv.y, 'boolean');
+	t.deepEqual(typeof argv.z, 'boolean');
+	t.end();
+});
+test('boolean and alias with chainable api', function (t) {
+	var aliased = ['-h', 'derp'];
+	var regular = ['--herp', 'derp'];
+	var aliasedArgv = parse(aliased, {
+		boolean: 'herp',
+		alias: { h: 'herp' },
+	});
+	var propertyArgv = parse(regular, {
+		boolean: 'herp',
+		alias: { h: 'herp' },
+	});
+	var expected = {
+		herp: true,
+		h: true,
+		_: ['derp'],
+	};
+
+	t.same(aliasedArgv, expected);
+	t.same(propertyArgv, expected);
+	t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+	var aliased = ['-h', 'derp'];
+	var regular = ['--herp', 'derp'];
+	var opts = {
+		alias: { h: 'herp' },
+		boolean: 'herp',
+	};
+	var aliasedArgv = parse(aliased, opts);
+	var propertyArgv = parse(regular, opts);
+	var expected = {
+		herp: true,
+		h: true,
+		_: ['derp'],
+	};
+	t.same(aliasedArgv, expected);
+	t.same(propertyArgv, expected);
+	t.end();
+});
+
+test('boolean and alias array with options hash', function (t) {
+	var aliased = ['-h', 'derp'];
+	var regular = ['--herp', 'derp'];
+	var alt = ['--harp', 'derp'];
+	var opts = {
+		alias: { h: ['herp', 'harp'] },
+		boolean: 'h',
+	};
+	var aliasedArgv = parse(aliased, opts);
+	var propertyArgv = parse(regular, opts);
+	var altPropertyArgv = parse(alt, opts);
+	var expected = {
+		harp: true,
+		herp: true,
+		h: true,
+		_: ['derp'],
+	};
+	t.same(aliasedArgv, expected);
+	t.same(propertyArgv, expected);
+	t.same(altPropertyArgv, expected);
+	t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+	var aliased = ['-h', 'true'];
+	var regular = ['--herp', 'true'];
+	var opts = {
+		alias: { h: 'herp' },
+		boolean: 'h',
+	};
+	var aliasedArgv = parse(aliased, opts);
+	var propertyArgv = parse(regular, opts);
+	var expected = {
+		herp: true,
+		h: true,
+		_: [],
+	};
+
+	t.same(aliasedArgv, expected);
+	t.same(propertyArgv, expected);
+	t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function (t) {
+	var parsed = parse(['--boool', '--other=true'], {
+		boolean: 'boool',
+	});
+
+	t.same(parsed.boool, true);
+	t.same(parsed.other, 'true');
+
+	parsed = parse(['--boool', '--other=false'], {
+		boolean: 'boool',
+	});
+
+	t.same(parsed.boool, true);
+	t.same(parsed.other, 'false');
+	t.end();
+});
+
+test('boolean --boool=true', function (t) {
+	var parsed = parse(['--boool=true'], {
+		default: {
+			boool: false,
+		},
+		boolean: ['boool'],
+	});
+
+	t.same(parsed.boool, true);
+	t.end();
+});
+
+test('boolean --boool=false', function (t) {
+	var parsed = parse(['--boool=false'], {
+		default: {
+			boool: true,
+		},
+		boolean: ['boool'],
+	});
+
+	t.same(parsed.boool, false);
+	t.end();
+});
+
+test('boolean using something similar to true', function (t) {
+	var opts = { boolean: 'h' };
+	var result = parse(['-h', 'true.txt'], opts);
+	var expected = {
+		h: true,
+		_: ['true.txt'],
+	};
+
+	t.same(result, expected);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dash.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dash.js
new file mode 100644
index 0000000000000000000000000000000000000000..707881771e275240a0e0d6d4d2fb8d31a564d74f
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dash.js
@@ -0,0 +1,43 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('-', function (t) {
+	t.plan(6);
+	t.deepEqual(parse(['-n', '-']), { n: '-', _: [] });
+	t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] });
+	t.deepEqual(parse(['-']), { _: ['-'] });
+	t.deepEqual(parse(['-f-']), { f: '-', _: [] });
+	t.deepEqual(
+		parse(['-b', '-'], { boolean: 'b' }),
+		{ b: true, _: ['-'] }
+	);
+	t.deepEqual(
+		parse(['-s', '-'], { string: 's' }),
+		{ s: '-', _: [] }
+	);
+});
+
+test('-a -- b', function (t) {
+	t.plan(2);
+	t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] });
+	t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] });
+});
+
+test('move arguments after the -- into their own `--` array', function (t) {
+	t.plan(1);
+	t.deepEqual(
+		parse(['--name', 'John', 'before', '--', 'after'], { '--': true }),
+		{ name: 'John', _: ['before'], '--': ['after'] }
+	);
+});
+
+test('--- option value', function (t) {
+	// A multi-dash value is largely an edge case, but check the behaviour is as expected,
+	// and in particular the same for short option and long option (as made consistent in Jan 2023).
+	t.plan(2);
+	t.deepEqual(parse(['-n', '---']), { n: '---', _: [] });
+	t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] });
+});
+
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/default_bool.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/default_bool.js
new file mode 100644
index 0000000000000000000000000000000000000000..4e9f6250f08ea8e005b66729630660a3db195566
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/default_bool.js
@@ -0,0 +1,37 @@
+'use strict';
+
+var test = require('tape');
+var parse = require('../');
+
+test('boolean default true', function (t) {
+	var argv = parse([], {
+		boolean: 'sometrue',
+		default: { sometrue: true },
+	});
+	t.equal(argv.sometrue, true);
+	t.end();
+});
+
+test('boolean default false', function (t) {
+	var argv = parse([], {
+		boolean: 'somefalse',
+		default: { somefalse: false },
+	});
+	t.equal(argv.somefalse, false);
+	t.end();
+});
+
+test('boolean default to null', function (t) {
+	var argv = parse([], {
+		boolean: 'maybe',
+		default: { maybe: null },
+	});
+	t.equal(argv.maybe, null);
+
+	var argvLong = parse(['--maybe'], {
+		boolean: 'maybe',
+		default: { maybe: null },
+	});
+	t.equal(argvLong.maybe, true);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dotted.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dotted.js
new file mode 100644
index 0000000000000000000000000000000000000000..126ff033b4237334be18dafed9f2b4636f684d2d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/dotted.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('dotted alias', function (t) {
+	var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } });
+	t.equal(argv.a.b, 22);
+	t.equal(argv.aa.bb, 22);
+	t.end();
+});
+
+test('dotted default', function (t) {
+	var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } });
+	t.equal(argv.a.b, 11);
+	t.equal(argv.aa.bb, 11);
+	t.end();
+});
+
+test('dotted default with no alias', function (t) {
+	var argv = parse('', { default: { 'a.b': 11 } });
+	t.equal(argv.a.b, 11);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/kv_short.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/kv_short.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d1b53a7a7ee1fcbeb9b12c9804f83ff90f46ccd
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/kv_short.js
@@ -0,0 +1,32 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('short -k=v', function (t) {
+	t.plan(1);
+
+	var argv = parse(['-b=123']);
+	t.deepEqual(argv, { b: 123, _: [] });
+});
+
+test('multi short -k=v', function (t) {
+	t.plan(1);
+
+	var argv = parse(['-a=whatever', '-b=robots']);
+	t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
+});
+
+test('short with embedded equals -k=a=b', function (t) {
+	t.plan(1);
+
+	var argv = parse(['-k=a=b']);
+	t.deepEqual(argv, { k: 'a=b', _: [] });
+});
+
+test('short with later equals like -ab=c', function (t) {
+	t.plan(1);
+
+	var argv = parse(['-ab=c']);
+	t.deepEqual(argv, { a: true, b: 'c', _: [] });
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/long.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/long.js
new file mode 100644
index 0000000000000000000000000000000000000000..9fef51f1fa8d9bf8ef9e92ad2ce5742f009ab941
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/long.js
@@ -0,0 +1,33 @@
+'use strict';
+
+var test = require('tape');
+var parse = require('../');
+
+test('long opts', function (t) {
+	t.deepEqual(
+		parse(['--bool']),
+		{ bool: true, _: [] },
+		'long boolean'
+	);
+	t.deepEqual(
+		parse(['--pow', 'xixxle']),
+		{ pow: 'xixxle', _: [] },
+		'long capture sp'
+	);
+	t.deepEqual(
+		parse(['--pow=xixxle']),
+		{ pow: 'xixxle', _: [] },
+		'long capture eq'
+	);
+	t.deepEqual(
+		parse(['--host', 'localhost', '--port', '555']),
+		{ host: 'localhost', port: 555, _: [] },
+		'long captures sp'
+	);
+	t.deepEqual(
+		parse(['--host=localhost', '--port=555']),
+		{ host: 'localhost', port: 555, _: [] },
+		'long captures eq'
+	);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/num.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/num.js
new file mode 100644
index 0000000000000000000000000000000000000000..074393ecaf1705b9a6170c35ad23d55df943f306
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/num.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('nums', function (t) {
+	var argv = parse([
+		'-x', '1234',
+		'-y', '5.67',
+		'-z', '1e7',
+		'-w', '10f',
+		'--hex', '0xdeadbeef',
+		'789',
+	]);
+	t.deepEqual(argv, {
+		x: 1234,
+		y: 5.67,
+		z: 1e7,
+		w: '10f',
+		hex: 0xdeadbeef,
+		_: [789],
+	});
+	t.deepEqual(typeof argv.x, 'number');
+	t.deepEqual(typeof argv.y, 'number');
+	t.deepEqual(typeof argv.z, 'number');
+	t.deepEqual(typeof argv.w, 'string');
+	t.deepEqual(typeof argv.hex, 'number');
+	t.deepEqual(typeof argv._[0], 'number');
+	t.end();
+});
+
+test('already a number', function (t) {
+	var argv = parse(['-x', 1234, 789]);
+	t.deepEqual(argv, { x: 1234, _: [789] });
+	t.deepEqual(typeof argv.x, 'number');
+	t.deepEqual(typeof argv._[0], 'number');
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse.js
new file mode 100644
index 0000000000000000000000000000000000000000..65d9d90927b91baa152a32e1485479307f1acf44
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse.js
@@ -0,0 +1,209 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('parse args', function (t) {
+	t.deepEqual(
+		parse(['--no-moo']),
+		{ moo: false, _: [] },
+		'no'
+	);
+	t.deepEqual(
+		parse(['-v', 'a', '-v', 'b', '-v', 'c']),
+		{ v: ['a', 'b', 'c'], _: [] },
+		'multi'
+	);
+	t.end();
+});
+
+test('comprehensive', function (t) {
+	t.deepEqual(
+		parse([
+			'--name=meowmers', 'bare', '-cats', 'woo',
+			'-h', 'awesome', '--multi=quux',
+			'--key', 'value',
+			'-b', '--bool', '--no-meep', '--multi=baz',
+			'--', '--not-a-flag', 'eek',
+		]),
+		{
+			c: true,
+			a: true,
+			t: true,
+			s: 'woo',
+			h: 'awesome',
+			b: true,
+			bool: true,
+			key: 'value',
+			multi: ['quux', 'baz'],
+			meep: false,
+			name: 'meowmers',
+			_: ['bare', '--not-a-flag', 'eek'],
+		}
+	);
+	t.end();
+});
+
+test('flag boolean', function (t) {
+	var argv = parse(['-t', 'moo'], { boolean: 't' });
+	t.deepEqual(argv, { t: true, _: ['moo'] });
+	t.deepEqual(typeof argv.t, 'boolean');
+	t.end();
+});
+
+test('flag boolean value', function (t) {
+	var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
+		boolean: ['t', 'verbose'],
+		default: { verbose: true },
+	});
+
+	t.deepEqual(argv, {
+		verbose: false,
+		t: true,
+		_: ['moo'],
+	});
+
+	t.deepEqual(typeof argv.verbose, 'boolean');
+	t.deepEqual(typeof argv.t, 'boolean');
+	t.end();
+});
+
+test('newlines in params', function (t) {
+	var args = parse(['-s', 'X\nX']);
+	t.deepEqual(args, { _: [], s: 'X\nX' });
+
+	// reproduce in bash:
+	// VALUE="new
+	// line"
+	// node program.js --s="$VALUE"
+	args = parse(['--s=X\nX']);
+	t.deepEqual(args, { _: [], s: 'X\nX' });
+	t.end();
+});
+
+test('strings', function (t) {
+	var s = parse(['-s', '0001234'], { string: 's' }).s;
+	t.equal(s, '0001234');
+	t.equal(typeof s, 'string');
+
+	var x = parse(['-x', '56'], { string: 'x' }).x;
+	t.equal(x, '56');
+	t.equal(typeof x, 'string');
+	t.end();
+});
+
+test('stringArgs', function (t) {
+	var s = parse(['  ', '  '], { string: '_' })._;
+	t.same(s.length, 2);
+	t.same(typeof s[0], 'string');
+	t.same(s[0], '  ');
+	t.same(typeof s[1], 'string');
+	t.same(s[1], '  ');
+	t.end();
+});
+
+test('empty strings', function (t) {
+	var s = parse(['-s'], { string: 's' }).s;
+	t.equal(s, '');
+	t.equal(typeof s, 'string');
+
+	var str = parse(['--str'], { string: 'str' }).str;
+	t.equal(str, '');
+	t.equal(typeof str, 'string');
+
+	var letters = parse(['-art'], {
+		string: ['a', 't'],
+	});
+
+	t.equal(letters.a, '');
+	t.equal(letters.r, true);
+	t.equal(letters.t, '');
+
+	t.end();
+});
+
+test('string and alias', function (t) {
+	var x = parse(['--str', '000123'], {
+		string: 's',
+		alias: { s: 'str' },
+	});
+
+	t.equal(x.str, '000123');
+	t.equal(typeof x.str, 'string');
+	t.equal(x.s, '000123');
+	t.equal(typeof x.s, 'string');
+
+	var y = parse(['-s', '000123'], {
+		string: 'str',
+		alias: { str: 's' },
+	});
+
+	t.equal(y.str, '000123');
+	t.equal(typeof y.str, 'string');
+	t.equal(y.s, '000123');
+	t.equal(typeof y.s, 'string');
+
+	var z = parse(['-s123'], {
+		alias: { str: ['s', 'S'] },
+		string: ['str'],
+	});
+
+	t.deepEqual(
+		z,
+		{ _: [], s: '123', S: '123', str: '123' },
+		'opt.string works with multiple aliases'
+	);
+	t.end();
+});
+
+test('slashBreak', function (t) {
+	t.same(
+		parse(['-I/foo/bar/baz']),
+		{ I: '/foo/bar/baz', _: [] }
+	);
+	t.same(
+		parse(['-xyz/foo/bar/baz']),
+		{ x: true, y: true, z: '/foo/bar/baz', _: [] }
+	);
+	t.end();
+});
+
+test('alias', function (t) {
+	var argv = parse(['-f', '11', '--zoom', '55'], {
+		alias: { z: 'zoom' },
+	});
+	t.equal(argv.zoom, 55);
+	t.equal(argv.z, argv.zoom);
+	t.equal(argv.f, 11);
+	t.end();
+});
+
+test('multiAlias', function (t) {
+	var argv = parse(['-f', '11', '--zoom', '55'], {
+		alias: { z: ['zm', 'zoom'] },
+	});
+	t.equal(argv.zoom, 55);
+	t.equal(argv.z, argv.zoom);
+	t.equal(argv.z, argv.zm);
+	t.equal(argv.f, 11);
+	t.end();
+});
+
+test('nested dotted objects', function (t) {
+	var argv = parse([
+		'--foo.bar', '3', '--foo.baz', '4',
+		'--foo.quux.quibble', '5', '--foo.quux.o_O',
+		'--beep.boop',
+	]);
+
+	t.same(argv.foo, {
+		bar: 3,
+		baz: 4,
+		quux: {
+			quibble: 5,
+			o_O: true,
+		},
+	});
+	t.same(argv.beep, { boop: true });
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse_modified.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse_modified.js
new file mode 100644
index 0000000000000000000000000000000000000000..32965d130fbd4f59b9a6e12488cf18901004d1f8
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/parse_modified.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('parse with modifier functions', function (t) {
+	t.plan(1);
+
+	var argv = parse(['-b', '123'], { boolean: 'b' });
+	t.deepEqual(argv, { b: true, _: [123] });
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/proto.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/proto.js
new file mode 100644
index 0000000000000000000000000000000000000000..6e629dd34ef0942c19c4d124542f5f030c228ae4
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/proto.js
@@ -0,0 +1,64 @@
+'use strict';
+
+/* eslint no-proto: 0 */
+
+var parse = require('../');
+var test = require('tape');
+
+test('proto pollution', function (t) {
+	var argv = parse(['--__proto__.x', '123']);
+	t.equal({}.x, undefined);
+	t.equal(argv.__proto__.x, undefined);
+	t.equal(argv.x, undefined);
+	t.end();
+});
+
+test('proto pollution (array)', function (t) {
+	var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']);
+	t.equal({}.z, undefined);
+	t.deepEqual(argv.x, [4, 5]);
+	t.equal(argv.x.z, undefined);
+	t.equal(argv.x.__proto__.z, undefined);
+	t.end();
+});
+
+test('proto pollution (number)', function (t) {
+	var argv = parse(['--x', '5', '--x.__proto__.z', '100']);
+	t.equal({}.z, undefined);
+	t.equal((4).z, undefined);
+	t.equal(argv.x, 5);
+	t.equal(argv.x.z, undefined);
+	t.end();
+});
+
+test('proto pollution (string)', function (t) {
+	var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']);
+	t.equal({}.z, undefined);
+	t.equal('...'.z, undefined);
+	t.equal(argv.x, 'abc');
+	t.equal(argv.x.z, undefined);
+	t.end();
+});
+
+test('proto pollution (constructor)', function (t) {
+	var argv = parse(['--constructor.prototype.y', '123']);
+	t.equal({}.y, undefined);
+	t.equal(argv.y, undefined);
+	t.end();
+});
+
+test('proto pollution (constructor function)', function (t) {
+	var argv = parse(['--_.concat.constructor.prototype.y', '123']);
+	function fnToBeTested() {}
+	t.equal(fnToBeTested.y, undefined);
+	t.equal(argv.y, undefined);
+	t.end();
+});
+
+// powered by snyk - https://github.com/backstage/backstage/issues/10343
+test('proto pollution (constructor function) snyk', function (t) {
+	var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' '));
+	t.equal(function () {}.foo, undefined);
+	t.equal(argv.y, undefined);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/short.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/short.js
new file mode 100644
index 0000000000000000000000000000000000000000..4a7b84385bbfdc74314f5e8f7cc4c36afd52b8bd
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/short.js
@@ -0,0 +1,69 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('numeric short args', function (t) {
+	t.plan(2);
+	t.deepEqual(parse(['-n123']), { n: 123, _: [] });
+	t.deepEqual(
+		parse(['-123', '456']),
+		{ 1: true, 2: true, 3: 456, _: [] }
+	);
+});
+
+test('short', function (t) {
+	t.deepEqual(
+		parse(['-b']),
+		{ b: true, _: [] },
+		'short boolean'
+	);
+	t.deepEqual(
+		parse(['foo', 'bar', 'baz']),
+		{ _: ['foo', 'bar', 'baz'] },
+		'bare'
+	);
+	t.deepEqual(
+		parse(['-cats']),
+		{ c: true, a: true, t: true, s: true, _: [] },
+		'group'
+	);
+	t.deepEqual(
+		parse(['-cats', 'meow']),
+		{ c: true, a: true, t: true, s: 'meow', _: [] },
+		'short group next'
+	);
+	t.deepEqual(
+		parse(['-h', 'localhost']),
+		{ h: 'localhost', _: [] },
+		'short capture'
+	);
+	t.deepEqual(
+		parse(['-h', 'localhost', '-p', '555']),
+		{ h: 'localhost', p: 555, _: [] },
+		'short captures'
+	);
+	t.end();
+});
+
+test('mixed short bool and capture', function (t) {
+	t.same(
+		parse(['-h', 'localhost', '-fp', '555', 'script.js']),
+		{
+			f: true, p: 555, h: 'localhost',
+			_: ['script.js'],
+		}
+	);
+	t.end();
+});
+
+test('short and long', function (t) {
+	t.deepEqual(
+		parse(['-h', 'localhost', '-fp', '555', 'script.js']),
+		{
+			f: true, p: 555, h: 'localhost',
+			_: ['script.js'],
+		}
+	);
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/stop_early.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/stop_early.js
new file mode 100644
index 0000000000000000000000000000000000000000..52a6a91903028d5230729df63afcdb80d79b0c68
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/stop_early.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('stops parsing on the first non-option when stopEarly is set', function (t) {
+	var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
+		stopEarly: true,
+	});
+
+	t.deepEqual(argv, {
+		aaa: 'bbb',
+		_: ['ccc', '--ddd'],
+	});
+
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/unknown.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/unknown.js
new file mode 100644
index 0000000000000000000000000000000000000000..4f2e0ca447f4ccc2fb7ba4df3876bf45d3f0423a
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/unknown.js
@@ -0,0 +1,104 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('boolean and alias is not unknown', function (t) {
+	var unknown = [];
+	function unknownFn(arg) {
+		unknown.push(arg);
+		return false;
+	}
+	var aliased = ['-h', 'true', '--derp', 'true'];
+	var regular = ['--herp', 'true', '-d', 'true'];
+	var opts = {
+		alias: { h: 'herp' },
+		boolean: 'h',
+		unknown: unknownFn,
+	};
+	parse(aliased, opts);
+	parse(regular, opts);
+
+	t.same(unknown, ['--derp', '-d']);
+	t.end();
+});
+
+test('flag boolean true any double hyphen argument is not unknown', function (t) {
+	var unknown = [];
+	function unknownFn(arg) {
+		unknown.push(arg);
+		return false;
+	}
+	var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
+		boolean: true,
+		unknown: unknownFn,
+	});
+	t.same(unknown, ['--tacos=good', 'cow', '-p']);
+	t.same(argv, {
+		honk: true,
+		_: [],
+	});
+	t.end();
+});
+
+test('string and alias is not unknown', function (t) {
+	var unknown = [];
+	function unknownFn(arg) {
+		unknown.push(arg);
+		return false;
+	}
+	var aliased = ['-h', 'hello', '--derp', 'goodbye'];
+	var regular = ['--herp', 'hello', '-d', 'moon'];
+	var opts = {
+		alias: { h: 'herp' },
+		string: 'h',
+		unknown: unknownFn,
+	};
+	parse(aliased, opts);
+	parse(regular, opts);
+
+	t.same(unknown, ['--derp', '-d']);
+	t.end();
+});
+
+test('default and alias is not unknown', function (t) {
+	var unknown = [];
+	function unknownFn(arg) {
+		unknown.push(arg);
+		return false;
+	}
+	var aliased = ['-h', 'hello'];
+	var regular = ['--herp', 'hello'];
+	var opts = {
+		default: { h: 'bar' },
+		alias: { h: 'herp' },
+		unknown: unknownFn,
+	};
+	parse(aliased, opts);
+	parse(regular, opts);
+
+	t.same(unknown, []);
+	t.end();
+	unknownFn(); // exercise fn for 100% coverage
+});
+
+test('value following -- is not unknown', function (t) {
+	var unknown = [];
+	function unknownFn(arg) {
+		unknown.push(arg);
+		return false;
+	}
+	var aliased = ['--bad', '--', 'good', 'arg'];
+	var opts = {
+		'--': true,
+		unknown: unknownFn,
+	};
+	var argv = parse(aliased, opts);
+
+	t.same(unknown, ['--bad']);
+	t.same(argv, {
+		'--': ['good', 'arg'],
+		_: [],
+	});
+	t.end();
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/whitespace.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/whitespace.js
new file mode 100644
index 0000000000000000000000000000000000000000..4fdaf1d3943f5a16b9d76af9cd7bbc82f2f54b54
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minimist/test/whitespace.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var parse = require('../');
+var test = require('tape');
+
+test('whitespace should be whitespace', function (t) {
+	t.plan(1);
+	var x = parse(['-x', '\t']).x;
+	t.equal(x, '\t');
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..031e61a8f90a3ff8c0b8bd656bd4c52c8be1a2ac
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts
@@ -0,0 +1,549 @@
+/// 
+/// 
+/// 
+/// 
+import { EventEmitter } from 'node:events';
+import { StringDecoder } from 'node:string_decoder';
+/**
+ * Same as StringDecoder, but exposing the `lastNeed` flag on the type
+ */
+type SD = StringDecoder & {
+    lastNeed: boolean;
+};
+export type { SD, Pipe, PipeProxyErrors };
+/**
+ * Return true if the argument is a Minipass stream, Node stream, or something
+ * else that Minipass can interact with.
+ */
+export declare const isStream: (s: any) => s is NodeJS.WriteStream | NodeJS.ReadStream | Minipass | (NodeJS.ReadStream & {
+    fd: number;
+}) | (EventEmitter & {
+    pause(): any;
+    resume(): any;
+    pipe(...destArgs: any[]): any;
+}) | (NodeJS.WriteStream & {
+    fd: number;
+}) | (EventEmitter & {
+    end(): any;
+    write(chunk: any, ...args: any[]): any;
+});
+/**
+ * Return true if the argument is a valid {@link Minipass.Readable}
+ */
+export declare const isReadable: (s: any) => s is Minipass.Readable;
+/**
+ * Return true if the argument is a valid {@link Minipass.Writable}
+ */
+export declare const isWritable: (s: any) => s is Minipass.Readable;
+declare const EOF: unique symbol;
+declare const MAYBE_EMIT_END: unique symbol;
+declare const EMITTED_END: unique symbol;
+declare const EMITTING_END: unique symbol;
+declare const EMITTED_ERROR: unique symbol;
+declare const CLOSED: unique symbol;
+declare const READ: unique symbol;
+declare const FLUSH: unique symbol;
+declare const FLUSHCHUNK: unique symbol;
+declare const ENCODING: unique symbol;
+declare const DECODER: unique symbol;
+declare const FLOWING: unique symbol;
+declare const PAUSED: unique symbol;
+declare const RESUME: unique symbol;
+declare const BUFFER: unique symbol;
+declare const PIPES: unique symbol;
+declare const BUFFERLENGTH: unique symbol;
+declare const BUFFERPUSH: unique symbol;
+declare const BUFFERSHIFT: unique symbol;
+declare const OBJECTMODE: unique symbol;
+declare const DESTROYED: unique symbol;
+declare const ERROR: unique symbol;
+declare const EMITDATA: unique symbol;
+declare const EMITEND: unique symbol;
+declare const EMITEND2: unique symbol;
+declare const ASYNC: unique symbol;
+declare const ABORT: unique symbol;
+declare const ABORTED: unique symbol;
+declare const SIGNAL: unique symbol;
+declare const DATALISTENERS: unique symbol;
+declare const DISCARDED: unique symbol;
+/**
+ * Options that may be passed to stream.pipe()
+ */
+export interface PipeOptions {
+    /**
+     * end the destination stream when the source stream ends
+     */
+    end?: boolean;
+    /**
+     * proxy errors from the source stream to the destination stream
+     */
+    proxyErrors?: boolean;
+}
+/**
+ * Internal class representing a pipe to a destination stream.
+ *
+ * @internal
+ */
+declare class Pipe {
+    src: Minipass;
+    dest: Minipass;
+    opts: PipeOptions;
+    ondrain: () => any;
+    constructor(src: Minipass, dest: Minipass.Writable, opts: PipeOptions);
+    unpipe(): void;
+    proxyErrors(_er: any): void;
+    end(): void;
+}
+/**
+ * Internal class representing a pipe to a destination stream where
+ * errors are proxied.
+ *
+ * @internal
+ */
+declare class PipeProxyErrors extends Pipe {
+    unpipe(): void;
+    constructor(src: Minipass, dest: Minipass.Writable, opts: PipeOptions);
+}
+export declare namespace Minipass {
+    /**
+     * Encoding used to create a stream that outputs strings rather than
+     * Buffer objects.
+     */
+    export type Encoding = BufferEncoding | 'buffer' | null;
+    /**
+     * Any stream that Minipass can pipe into
+     */
+    export type Writable = Minipass | NodeJS.WriteStream | (NodeJS.WriteStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        end(): any;
+        write(chunk: any, ...args: any[]): any;
+    });
+    /**
+     * Any stream that can be read from
+     */
+    export type Readable = Minipass | NodeJS.ReadStream | (NodeJS.ReadStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        pause(): any;
+        resume(): any;
+        pipe(...destArgs: any[]): any;
+    });
+    /**
+     * Utility type that can be iterated sync or async
+     */
+    export type DualIterable = Iterable & AsyncIterable;
+    type EventArguments = Record;
+    /**
+     * The listing of events that a Minipass class can emit.
+     * Extend this when extending the Minipass class, and pass as
+     * the third template argument.  The key is the name of the event,
+     * and the value is the argument list.
+     *
+     * Any undeclared events will still be allowed, but the handler will get
+     * arguments as `unknown[]`.
+     */
+    export interface Events extends EventArguments {
+        readable: [];
+        data: [chunk: RType];
+        error: [er: unknown];
+        abort: [reason: unknown];
+        drain: [];
+        resume: [];
+        end: [];
+        finish: [];
+        prefinish: [];
+        close: [];
+        [DESTROYED]: [er?: unknown];
+        [ERROR]: [er: unknown];
+    }
+    /**
+     * String or buffer-like data that can be joined and sliced
+     */
+    export type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string;
+    export type BufferOrString = Buffer | string;
+    /**
+     * Options passed to the Minipass constructor.
+     */
+    export type SharedOptions = {
+        /**
+         * Defer all data emission and other events until the end of the
+         * current tick, similar to Node core streams
+         */
+        async?: boolean;
+        /**
+         * A signal which will abort the stream
+         */
+        signal?: AbortSignal;
+        /**
+         * Output string encoding. Set to `null` or `'buffer'` (or omit) to
+         * emit Buffer objects rather than strings.
+         *
+         * Conflicts with `objectMode`
+         */
+        encoding?: BufferEncoding | null | 'buffer';
+        /**
+         * Output data exactly as it was written, supporting non-buffer/string
+         * data (such as arbitrary objects, falsey values, etc.)
+         *
+         * Conflicts with `encoding`
+         */
+        objectMode?: boolean;
+    };
+    /**
+     * Options for a string encoded output
+     */
+    export type EncodingOptions = SharedOptions & {
+        encoding: BufferEncoding;
+        objectMode?: false;
+    };
+    /**
+     * Options for contiguous data buffer output
+     */
+    export type BufferOptions = SharedOptions & {
+        encoding?: null | 'buffer';
+        objectMode?: false;
+    };
+    /**
+     * Options for objectMode arbitrary output
+     */
+    export type ObjectModeOptions = SharedOptions & {
+        objectMode: true;
+        encoding?: null;
+    };
+    /**
+     * Utility type to determine allowed options based on read type
+     */
+    export type Options = ObjectModeOptions | (T extends string ? EncodingOptions : T extends Buffer ? BufferOptions : SharedOptions);
+    export {};
+}
+/**
+ * Main export, the Minipass class
+ *
+ * `RType` is the type of data emitted, defaults to Buffer
+ *
+ * `WType` is the type of data to be written, if RType is buffer or string,
+ * then any {@link Minipass.ContiguousData} is allowed.
+ *
+ * `Events` is the set of event handler signatures that this object
+ * will emit, see {@link Minipass.Events}
+ */
+export declare class Minipass = Minipass.Events> extends EventEmitter implements Minipass.DualIterable {
+    [FLOWING]: boolean;
+    [PAUSED]: boolean;
+    [PIPES]: Pipe[];
+    [BUFFER]: RType[];
+    [OBJECTMODE]: boolean;
+    [ENCODING]: BufferEncoding | null;
+    [ASYNC]: boolean;
+    [DECODER]: SD | null;
+    [EOF]: boolean;
+    [EMITTED_END]: boolean;
+    [EMITTING_END]: boolean;
+    [CLOSED]: boolean;
+    [EMITTED_ERROR]: unknown;
+    [BUFFERLENGTH]: number;
+    [DESTROYED]: boolean;
+    [SIGNAL]?: AbortSignal;
+    [ABORTED]: boolean;
+    [DATALISTENERS]: number;
+    [DISCARDED]: boolean;
+    /**
+     * true if the stream can be written
+     */
+    writable: boolean;
+    /**
+     * true if the stream can be read
+     */
+    readable: boolean;
+    /**
+     * If `RType` is Buffer, then options do not need to be provided.
+     * Otherwise, an options object must be provided to specify either
+     * {@link Minipass.SharedOptions.objectMode} or
+     * {@link Minipass.SharedOptions.encoding}, as appropriate.
+     */
+    constructor(...args: [Minipass.ObjectModeOptions] | (RType extends Buffer ? [] | [Minipass.Options] : [Minipass.Options]));
+    /**
+     * The amount of data stored in the buffer waiting to be read.
+     *
+     * For Buffer strings, this will be the total byte length.
+     * For string encoding streams, this will be the string character length,
+     * according to JavaScript's `string.length` logic.
+     * For objectMode streams, this is a count of the items waiting to be
+     * emitted.
+     */
+    get bufferLength(): number;
+    /**
+     * The `BufferEncoding` currently in use, or `null`
+     */
+    get encoding(): BufferEncoding | null;
+    /**
+     * @deprecated - This is a read only property
+     */
+    set encoding(_enc: BufferEncoding | null);
+    /**
+     * @deprecated - Encoding may only be set at instantiation time
+     */
+    setEncoding(_enc: Minipass.Encoding): void;
+    /**
+     * True if this is an objectMode stream
+     */
+    get objectMode(): boolean;
+    /**
+     * @deprecated - This is a read-only property
+     */
+    set objectMode(_om: boolean);
+    /**
+     * true if this is an async stream
+     */
+    get ['async'](): boolean;
+    /**
+     * Set to true to make this stream async.
+     *
+     * Once set, it cannot be unset, as this would potentially cause incorrect
+     * behavior.  Ie, a sync stream can be made async, but an async stream
+     * cannot be safely made sync.
+     */
+    set ['async'](a: boolean);
+    [ABORT](): void;
+    /**
+     * True if the stream has been aborted.
+     */
+    get aborted(): boolean;
+    /**
+     * No-op setter. Stream aborted status is set via the AbortSignal provided
+     * in the constructor options.
+     */
+    set aborted(_: boolean);
+    /**
+     * Write data into the stream
+     *
+     * If the chunk written is a string, and encoding is not specified, then
+     * `utf8` will be assumed. If the stream encoding matches the encoding of
+     * a written string, and the state of the string decoder allows it, then
+     * the string will be passed through to either the output or the internal
+     * buffer without any processing. Otherwise, it will be turned into a
+     * Buffer object for processing into the desired encoding.
+     *
+     * If provided, `cb` function is called immediately before return for
+     * sync streams, or on next tick for async streams, because for this
+     * base class, a chunk is considered "processed" once it is accepted
+     * and either emitted or buffered. That is, the callback does not indicate
+     * that the chunk has been eventually emitted, though of course child
+     * classes can override this function to do whatever processing is required
+     * and call `super.write(...)` only once processing is completed.
+     */
+    write(chunk: WType, cb?: () => void): boolean;
+    write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean;
+    /**
+     * Low-level explicit read method.
+     *
+     * In objectMode, the argument is ignored, and one item is returned if
+     * available.
+     *
+     * `n` is the number of bytes (or in the case of encoding streams,
+     * characters) to consume. If `n` is not provided, then the entire buffer
+     * is returned, or `null` is returned if no data is available.
+     *
+     * If `n` is greater that the amount of data in the internal buffer,
+     * then `null` is returned.
+     */
+    read(n?: number | null): RType | null;
+    [READ](n: number | null, chunk: RType): RType;
+    /**
+     * End the stream, optionally providing a final write.
+     *
+     * See {@link Minipass#write} for argument descriptions
+     */
+    end(cb?: () => void): this;
+    end(chunk: WType, cb?: () => void): this;
+    end(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): this;
+    [RESUME](): void;
+    /**
+     * Resume the stream if it is currently in a paused state
+     *
+     * If called when there are no pipe destinations or `data` event listeners,
+     * this will place the stream in a "discarded" state, where all data will
+     * be thrown away. The discarded state is removed if a pipe destination or
+     * data handler is added, if pause() is called, or if any synchronous or
+     * asynchronous iteration is started.
+     */
+    resume(): void;
+    /**
+     * Pause the stream
+     */
+    pause(): void;
+    /**
+     * true if the stream has been forcibly destroyed
+     */
+    get destroyed(): boolean;
+    /**
+     * true if the stream is currently in a flowing state, meaning that
+     * any writes will be immediately emitted.
+     */
+    get flowing(): boolean;
+    /**
+     * true if the stream is currently in a paused state
+     */
+    get paused(): boolean;
+    [BUFFERPUSH](chunk: RType): void;
+    [BUFFERSHIFT](): RType;
+    [FLUSH](noDrain?: boolean): void;
+    [FLUSHCHUNK](chunk: RType): boolean;
+    /**
+     * Pipe all data emitted by this stream into the destination provided.
+     *
+     * Triggers the flow of data.
+     */
+    pipe(dest: W, opts?: PipeOptions): W;
+    /**
+     * Fully unhook a piped destination stream.
+     *
+     * If the destination stream was the only consumer of this stream (ie,
+     * there are no other piped destinations or `'data'` event listeners)
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    unpipe(dest: W): void;
+    /**
+     * Alias for {@link Minipass#on}
+     */
+    addListener(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.on`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * - Adding a 'data' event handler will trigger the flow of data
+     *
+     * - Adding a 'readable' event handler when there is data waiting to be read
+     *   will cause 'readable' to be emitted immediately.
+     *
+     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
+     *   already passed will cause the event to be emitted immediately and all
+     *   handlers removed.
+     *
+     * - Adding an 'error' event handler after an error has been emitted will
+     *   cause the event to be re-emitted immediately with the error previously
+     *   raised.
+     */
+    on(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Alias for {@link Minipass#off}
+     */
+    removeListener(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.off`
+     *
+     * If a 'data' event handler is removed, and it was the last consumer
+     * (ie, there are no pipe destinations or other 'data' event listeners),
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    off(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.removeAllListeners`
+     *
+     * If all 'data' event handlers are removed, and they were the last consumer
+     * (ie, there are no pipe destinations), then the flow of data will stop
+     * until there is another consumer or {@link Minipass#resume} is explicitly
+     * called.
+     */
+    removeAllListeners(ev?: Event): this;
+    /**
+     * true if the 'end' event has been emitted
+     */
+    get emittedEnd(): boolean;
+    [MAYBE_EMIT_END](): void;
+    /**
+     * Mostly identical to `EventEmitter.emit`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * If the stream has been destroyed, and the event is something other
+     * than 'close' or 'error', then `false` is returned and no handlers
+     * are called.
+     *
+     * If the event is 'end', and has already been emitted, then the event
+     * is ignored. If the stream is in a paused or non-flowing state, then
+     * the event will be deferred until data flow resumes. If the stream is
+     * async, then handlers will be called on the next tick rather than
+     * immediately.
+     *
+     * If the event is 'close', and 'end' has not yet been emitted, then
+     * the event will be deferred until after 'end' is emitted.
+     *
+     * If the event is 'error', and an AbortSignal was provided for the stream,
+     * and there are no listeners, then the event is ignored, matching the
+     * behavior of node core streams in the presense of an AbortSignal.
+     *
+     * If the event is 'finish' or 'prefinish', then all listeners will be
+     * removed after emitting the event, to prevent double-firing.
+     */
+    emit(ev: Event, ...args: Events[Event]): boolean;
+    [EMITDATA](data: RType): boolean;
+    [EMITEND](): boolean;
+    [EMITEND2](): boolean;
+    /**
+     * Return a Promise that resolves to an array of all emitted data once
+     * the stream ends.
+     */
+    collect(): Promise;
+    /**
+     * Return a Promise that resolves to the concatenation of all emitted data
+     * once the stream ends.
+     *
+     * Not allowed on objectMode streams.
+     */
+    concat(): Promise;
+    /**
+     * Return a void Promise that resolves once the stream ends.
+     */
+    promise(): Promise;
+    /**
+     * Asynchronous `for await of` iteration.
+     *
+     * This will continue emitting all chunks until the stream terminates.
+     */
+    [Symbol.asyncIterator](): AsyncGenerator;
+    /**
+     * Synchronous `for of` iteration.
+     *
+     * The iteration will terminate when the internal buffer runs out, even
+     * if the stream has not yet terminated.
+     */
+    [Symbol.iterator](): Generator;
+    /**
+     * Destroy a stream, preventing it from being used for any further purpose.
+     *
+     * If the stream has a `close()` method, then it will be called on
+     * destruction.
+     *
+     * After destruction, any attempt to write data, read data, or emit most
+     * events will be ignored.
+     *
+     * If an error argument is provided, then it will be emitted in an
+     * 'error' event.
+     */
+    destroy(er?: unknown): this;
+    /**
+     * Alias for {@link isStream}
+     *
+     * Former export location, maintained for backwards compatibility.
+     *
+     * @deprecated
+     */
+    static get isStream(): (s: any) => s is NodeJS.WriteStream | NodeJS.ReadStream | Minipass | (NodeJS.ReadStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        pause(): any;
+        resume(): any;
+        pipe(...destArgs: any[]): any;
+    }) | (NodeJS.WriteStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        end(): any;
+        write(chunk: any, ...args: any[]): any;
+    });
+}
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..cac7e00a773090d5258ac8958ef3fc3d5339a078
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;GAEG;AACH,KAAK,EAAE,GAAG,aAAa,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/C,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,QAAQ,MAChB,GAAG;QAoLyB,MAAM;;aAEtB,GAAG;cACF,GAAG;sBACK,GAAG,EAAE,GAAG,GAAG;;QAhBH,MAAM;;WAEzB,GAAG;iBACG,GAAG,WAAW,GAAG,EAAE,GAAG,GAAG;EApK5B,CAAA;AAElB;;GAEG;AACH,eAAO,MAAM,UAAU,MAAO,GAAG,2BAMiC,CAAA;AAEl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,MAAM,EAC5B,EAAE,EAAE,KAAK,EACT,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG;IAsB1C;;;;;;;OAOG;IACH,kBAAkB,CAAC,KAAK,SAAS,MAAM,MAAM,EAAE,EAAE,CAAC,EAAE,KAAK;IAWzD;;OAEG;IACH,IAAI,UAAU,YAEb;IAED,CAAC,cAAc,CAAC;IAiBhB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,MAAM,EAC7B,EAAE,EAAE,KAAK,EACT,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,GACrB,OAAO;IAkDV,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,KAAK;IAStB,CAAC,OAAO,CAAC;IAUT,CAAC,QAAQ,CAAC;IAmBV;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAiB1D;;;;;OAKG;IACG,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC;IAY9B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B;;;;OAIG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;IA6D3D;;;;;OAKG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;IAkCjD;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,OAAO;IA0BpB;;;;;;OAMG;IACH,MAAM,KAAK,QAAQ;;;;;;;;;;;OAElB;CACF"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..068c095b697932d3bebf12d60a852e3603d1494c
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js
@@ -0,0 +1,1028 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Minipass = exports.isWritable = exports.isReadable = exports.isStream = void 0;
+const proc = typeof process === 'object' && process
+    ? process
+    : {
+        stdout: null,
+        stderr: null,
+    };
+const node_events_1 = require("node:events");
+const node_stream_1 = __importDefault(require("node:stream"));
+const node_string_decoder_1 = require("node:string_decoder");
+/**
+ * Return true if the argument is a Minipass stream, Node stream, or something
+ * else that Minipass can interact with.
+ */
+const isStream = (s) => !!s &&
+    typeof s === 'object' &&
+    (s instanceof Minipass ||
+        s instanceof node_stream_1.default ||
+        (0, exports.isReadable)(s) ||
+        (0, exports.isWritable)(s));
+exports.isStream = isStream;
+/**
+ * Return true if the argument is a valid {@link Minipass.Readable}
+ */
+const isReadable = (s) => !!s &&
+    typeof s === 'object' &&
+    s instanceof node_events_1.EventEmitter &&
+    typeof s.pipe === 'function' &&
+    // node core Writable streams have a pipe() method, but it throws
+    s.pipe !== node_stream_1.default.Writable.prototype.pipe;
+exports.isReadable = isReadable;
+/**
+ * Return true if the argument is a valid {@link Minipass.Writable}
+ */
+const isWritable = (s) => !!s &&
+    typeof s === 'object' &&
+    s instanceof node_events_1.EventEmitter &&
+    typeof s.write === 'function' &&
+    typeof s.end === 'function';
+exports.isWritable = isWritable;
+const EOF = Symbol('EOF');
+const MAYBE_EMIT_END = Symbol('maybeEmitEnd');
+const EMITTED_END = Symbol('emittedEnd');
+const EMITTING_END = Symbol('emittingEnd');
+const EMITTED_ERROR = Symbol('emittedError');
+const CLOSED = Symbol('closed');
+const READ = Symbol('read');
+const FLUSH = Symbol('flush');
+const FLUSHCHUNK = Symbol('flushChunk');
+const ENCODING = Symbol('encoding');
+const DECODER = Symbol('decoder');
+const FLOWING = Symbol('flowing');
+const PAUSED = Symbol('paused');
+const RESUME = Symbol('resume');
+const BUFFER = Symbol('buffer');
+const PIPES = Symbol('pipes');
+const BUFFERLENGTH = Symbol('bufferLength');
+const BUFFERPUSH = Symbol('bufferPush');
+const BUFFERSHIFT = Symbol('bufferShift');
+const OBJECTMODE = Symbol('objectMode');
+// internal event when stream is destroyed
+const DESTROYED = Symbol('destroyed');
+// internal event when stream has an error
+const ERROR = Symbol('error');
+const EMITDATA = Symbol('emitData');
+const EMITEND = Symbol('emitEnd');
+const EMITEND2 = Symbol('emitEnd2');
+const ASYNC = Symbol('async');
+const ABORT = Symbol('abort');
+const ABORTED = Symbol('aborted');
+const SIGNAL = Symbol('signal');
+const DATALISTENERS = Symbol('dataListeners');
+const DISCARDED = Symbol('discarded');
+const defer = (fn) => Promise.resolve().then(fn);
+const nodefer = (fn) => fn();
+const isEndish = (ev) => ev === 'end' || ev === 'finish' || ev === 'prefinish';
+const isArrayBufferLike = (b) => b instanceof ArrayBuffer ||
+    (!!b &&
+        typeof b === 'object' &&
+        b.constructor &&
+        b.constructor.name === 'ArrayBuffer' &&
+        b.byteLength >= 0);
+const isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
+/**
+ * Internal class representing a pipe to a destination stream.
+ *
+ * @internal
+ */
+class Pipe {
+    src;
+    dest;
+    opts;
+    ondrain;
+    constructor(src, dest, opts) {
+        this.src = src;
+        this.dest = dest;
+        this.opts = opts;
+        this.ondrain = () => src[RESUME]();
+        this.dest.on('drain', this.ondrain);
+    }
+    unpipe() {
+        this.dest.removeListener('drain', this.ondrain);
+    }
+    // only here for the prototype
+    /* c8 ignore start */
+    proxyErrors(_er) { }
+    /* c8 ignore stop */
+    end() {
+        this.unpipe();
+        if (this.opts.end)
+            this.dest.end();
+    }
+}
+/**
+ * Internal class representing a pipe to a destination stream where
+ * errors are proxied.
+ *
+ * @internal
+ */
+class PipeProxyErrors extends Pipe {
+    unpipe() {
+        this.src.removeListener('error', this.proxyErrors);
+        super.unpipe();
+    }
+    constructor(src, dest, opts) {
+        super(src, dest, opts);
+        this.proxyErrors = er => dest.emit('error', er);
+        src.on('error', this.proxyErrors);
+    }
+}
+const isObjectModeOptions = (o) => !!o.objectMode;
+const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== 'buffer';
+/**
+ * Main export, the Minipass class
+ *
+ * `RType` is the type of data emitted, defaults to Buffer
+ *
+ * `WType` is the type of data to be written, if RType is buffer or string,
+ * then any {@link Minipass.ContiguousData} is allowed.
+ *
+ * `Events` is the set of event handler signatures that this object
+ * will emit, see {@link Minipass.Events}
+ */
+class Minipass extends node_events_1.EventEmitter {
+    [FLOWING] = false;
+    [PAUSED] = false;
+    [PIPES] = [];
+    [BUFFER] = [];
+    [OBJECTMODE];
+    [ENCODING];
+    [ASYNC];
+    [DECODER];
+    [EOF] = false;
+    [EMITTED_END] = false;
+    [EMITTING_END] = false;
+    [CLOSED] = false;
+    [EMITTED_ERROR] = null;
+    [BUFFERLENGTH] = 0;
+    [DESTROYED] = false;
+    [SIGNAL];
+    [ABORTED] = false;
+    [DATALISTENERS] = 0;
+    [DISCARDED] = false;
+    /**
+     * true if the stream can be written
+     */
+    writable = true;
+    /**
+     * true if the stream can be read
+     */
+    readable = true;
+    /**
+     * If `RType` is Buffer, then options do not need to be provided.
+     * Otherwise, an options object must be provided to specify either
+     * {@link Minipass.SharedOptions.objectMode} or
+     * {@link Minipass.SharedOptions.encoding}, as appropriate.
+     */
+    constructor(...args) {
+        const options = (args[0] ||
+            {});
+        super();
+        if (options.objectMode && typeof options.encoding === 'string') {
+            throw new TypeError('Encoding and objectMode may not be used together');
+        }
+        if (isObjectModeOptions(options)) {
+            this[OBJECTMODE] = true;
+            this[ENCODING] = null;
+        }
+        else if (isEncodingOptions(options)) {
+            this[ENCODING] = options.encoding;
+            this[OBJECTMODE] = false;
+        }
+        else {
+            this[OBJECTMODE] = false;
+            this[ENCODING] = null;
+        }
+        this[ASYNC] = !!options.async;
+        this[DECODER] = this[ENCODING]
+            ? new node_string_decoder_1.StringDecoder(this[ENCODING])
+            : null;
+        //@ts-ignore - private option for debugging and testing
+        if (options && options.debugExposeBuffer === true) {
+            Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] });
+        }
+        //@ts-ignore - private option for debugging and testing
+        if (options && options.debugExposePipes === true) {
+            Object.defineProperty(this, 'pipes', { get: () => this[PIPES] });
+        }
+        const { signal } = options;
+        if (signal) {
+            this[SIGNAL] = signal;
+            if (signal.aborted) {
+                this[ABORT]();
+            }
+            else {
+                signal.addEventListener('abort', () => this[ABORT]());
+            }
+        }
+    }
+    /**
+     * The amount of data stored in the buffer waiting to be read.
+     *
+     * For Buffer strings, this will be the total byte length.
+     * For string encoding streams, this will be the string character length,
+     * according to JavaScript's `string.length` logic.
+     * For objectMode streams, this is a count of the items waiting to be
+     * emitted.
+     */
+    get bufferLength() {
+        return this[BUFFERLENGTH];
+    }
+    /**
+     * The `BufferEncoding` currently in use, or `null`
+     */
+    get encoding() {
+        return this[ENCODING];
+    }
+    /**
+     * @deprecated - This is a read only property
+     */
+    set encoding(_enc) {
+        throw new Error('Encoding must be set at instantiation time');
+    }
+    /**
+     * @deprecated - Encoding may only be set at instantiation time
+     */
+    setEncoding(_enc) {
+        throw new Error('Encoding must be set at instantiation time');
+    }
+    /**
+     * True if this is an objectMode stream
+     */
+    get objectMode() {
+        return this[OBJECTMODE];
+    }
+    /**
+     * @deprecated - This is a read-only property
+     */
+    set objectMode(_om) {
+        throw new Error('objectMode must be set at instantiation time');
+    }
+    /**
+     * true if this is an async stream
+     */
+    get ['async']() {
+        return this[ASYNC];
+    }
+    /**
+     * Set to true to make this stream async.
+     *
+     * Once set, it cannot be unset, as this would potentially cause incorrect
+     * behavior.  Ie, a sync stream can be made async, but an async stream
+     * cannot be safely made sync.
+     */
+    set ['async'](a) {
+        this[ASYNC] = this[ASYNC] || !!a;
+    }
+    // drop everything and get out of the flow completely
+    [ABORT]() {
+        this[ABORTED] = true;
+        this.emit('abort', this[SIGNAL]?.reason);
+        this.destroy(this[SIGNAL]?.reason);
+    }
+    /**
+     * True if the stream has been aborted.
+     */
+    get aborted() {
+        return this[ABORTED];
+    }
+    /**
+     * No-op setter. Stream aborted status is set via the AbortSignal provided
+     * in the constructor options.
+     */
+    set aborted(_) { }
+    write(chunk, encoding, cb) {
+        if (this[ABORTED])
+            return false;
+        if (this[EOF])
+            throw new Error('write after end');
+        if (this[DESTROYED]) {
+            this.emit('error', Object.assign(new Error('Cannot call write after a stream was destroyed'), { code: 'ERR_STREAM_DESTROYED' }));
+            return true;
+        }
+        if (typeof encoding === 'function') {
+            cb = encoding;
+            encoding = 'utf8';
+        }
+        if (!encoding)
+            encoding = 'utf8';
+        const fn = this[ASYNC] ? defer : nodefer;
+        // convert array buffers and typed array views into buffers
+        // at some point in the future, we may want to do the opposite!
+        // leave strings and buffers as-is
+        // anything is only allowed if in object mode, so throw
+        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
+            if (isArrayBufferView(chunk)) {
+                //@ts-ignore - sinful unsafe type changing
+                chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
+            }
+            else if (isArrayBufferLike(chunk)) {
+                //@ts-ignore - sinful unsafe type changing
+                chunk = Buffer.from(chunk);
+            }
+            else if (typeof chunk !== 'string') {
+                throw new Error('Non-contiguous data written to non-objectMode stream');
+            }
+        }
+        // handle object mode up front, since it's simpler
+        // this yields better performance, fewer checks later.
+        if (this[OBJECTMODE]) {
+            // maybe impossible?
+            /* c8 ignore start */
+            if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+                this[FLUSH](true);
+            /* c8 ignore stop */
+            if (this[FLOWING])
+                this.emit('data', chunk);
+            else
+                this[BUFFERPUSH](chunk);
+            if (this[BUFFERLENGTH] !== 0)
+                this.emit('readable');
+            if (cb)
+                fn(cb);
+            return this[FLOWING];
+        }
+        // at this point the chunk is a buffer or string
+        // don't buffer it up or send it to the decoder
+        if (!chunk.length) {
+            if (this[BUFFERLENGTH] !== 0)
+                this.emit('readable');
+            if (cb)
+                fn(cb);
+            return this[FLOWING];
+        }
+        // fast-path writing strings of same encoding to a stream with
+        // an empty buffer, skipping the buffer/decoder dance
+        if (typeof chunk === 'string' &&
+            // unless it is a string already ready for us to use
+            !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
+            //@ts-ignore - sinful unsafe type change
+            chunk = Buffer.from(chunk, encoding);
+        }
+        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
+            //@ts-ignore - sinful unsafe type change
+            chunk = this[DECODER].write(chunk);
+        }
+        // Note: flushing CAN potentially switch us into not-flowing mode
+        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+            this[FLUSH](true);
+        if (this[FLOWING])
+            this.emit('data', chunk);
+        else
+            this[BUFFERPUSH](chunk);
+        if (this[BUFFERLENGTH] !== 0)
+            this.emit('readable');
+        if (cb)
+            fn(cb);
+        return this[FLOWING];
+    }
+    /**
+     * Low-level explicit read method.
+     *
+     * In objectMode, the argument is ignored, and one item is returned if
+     * available.
+     *
+     * `n` is the number of bytes (or in the case of encoding streams,
+     * characters) to consume. If `n` is not provided, then the entire buffer
+     * is returned, or `null` is returned if no data is available.
+     *
+     * If `n` is greater that the amount of data in the internal buffer,
+     * then `null` is returned.
+     */
+    read(n) {
+        if (this[DESTROYED])
+            return null;
+        this[DISCARDED] = false;
+        if (this[BUFFERLENGTH] === 0 ||
+            n === 0 ||
+            (n && n > this[BUFFERLENGTH])) {
+            this[MAYBE_EMIT_END]();
+            return null;
+        }
+        if (this[OBJECTMODE])
+            n = null;
+        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
+            // not object mode, so if we have an encoding, then RType is string
+            // otherwise, must be Buffer
+            this[BUFFER] = [
+                (this[ENCODING]
+                    ? this[BUFFER].join('')
+                    : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])),
+            ];
+        }
+        const ret = this[READ](n || null, this[BUFFER][0]);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [READ](n, chunk) {
+        if (this[OBJECTMODE])
+            this[BUFFERSHIFT]();
+        else {
+            const c = chunk;
+            if (n === c.length || n === null)
+                this[BUFFERSHIFT]();
+            else if (typeof c === 'string') {
+                this[BUFFER][0] = c.slice(n);
+                chunk = c.slice(0, n);
+                this[BUFFERLENGTH] -= n;
+            }
+            else {
+                this[BUFFER][0] = c.subarray(n);
+                chunk = c.subarray(0, n);
+                this[BUFFERLENGTH] -= n;
+            }
+        }
+        this.emit('data', chunk);
+        if (!this[BUFFER].length && !this[EOF])
+            this.emit('drain');
+        return chunk;
+    }
+    end(chunk, encoding, cb) {
+        if (typeof chunk === 'function') {
+            cb = chunk;
+            chunk = undefined;
+        }
+        if (typeof encoding === 'function') {
+            cb = encoding;
+            encoding = 'utf8';
+        }
+        if (chunk !== undefined)
+            this.write(chunk, encoding);
+        if (cb)
+            this.once('end', cb);
+        this[EOF] = true;
+        this.writable = false;
+        // if we haven't written anything, then go ahead and emit,
+        // even if we're not reading.
+        // we'll re-emit if a new 'end' listener is added anyway.
+        // This makes MP more suitable to write-only use cases.
+        if (this[FLOWING] || !this[PAUSED])
+            this[MAYBE_EMIT_END]();
+        return this;
+    }
+    // don't let the internal resume be overwritten
+    [RESUME]() {
+        if (this[DESTROYED])
+            return;
+        if (!this[DATALISTENERS] && !this[PIPES].length) {
+            this[DISCARDED] = true;
+        }
+        this[PAUSED] = false;
+        this[FLOWING] = true;
+        this.emit('resume');
+        if (this[BUFFER].length)
+            this[FLUSH]();
+        else if (this[EOF])
+            this[MAYBE_EMIT_END]();
+        else
+            this.emit('drain');
+    }
+    /**
+     * Resume the stream if it is currently in a paused state
+     *
+     * If called when there are no pipe destinations or `data` event listeners,
+     * this will place the stream in a "discarded" state, where all data will
+     * be thrown away. The discarded state is removed if a pipe destination or
+     * data handler is added, if pause() is called, or if any synchronous or
+     * asynchronous iteration is started.
+     */
+    resume() {
+        return this[RESUME]();
+    }
+    /**
+     * Pause the stream
+     */
+    pause() {
+        this[FLOWING] = false;
+        this[PAUSED] = true;
+        this[DISCARDED] = false;
+    }
+    /**
+     * true if the stream has been forcibly destroyed
+     */
+    get destroyed() {
+        return this[DESTROYED];
+    }
+    /**
+     * true if the stream is currently in a flowing state, meaning that
+     * any writes will be immediately emitted.
+     */
+    get flowing() {
+        return this[FLOWING];
+    }
+    /**
+     * true if the stream is currently in a paused state
+     */
+    get paused() {
+        return this[PAUSED];
+    }
+    [BUFFERPUSH](chunk) {
+        if (this[OBJECTMODE])
+            this[BUFFERLENGTH] += 1;
+        else
+            this[BUFFERLENGTH] += chunk.length;
+        this[BUFFER].push(chunk);
+    }
+    [BUFFERSHIFT]() {
+        if (this[OBJECTMODE])
+            this[BUFFERLENGTH] -= 1;
+        else
+            this[BUFFERLENGTH] -= this[BUFFER][0].length;
+        return this[BUFFER].shift();
+    }
+    [FLUSH](noDrain = false) {
+        do { } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&
+            this[BUFFER].length);
+        if (!noDrain && !this[BUFFER].length && !this[EOF])
+            this.emit('drain');
+    }
+    [FLUSHCHUNK](chunk) {
+        this.emit('data', chunk);
+        return this[FLOWING];
+    }
+    /**
+     * Pipe all data emitted by this stream into the destination provided.
+     *
+     * Triggers the flow of data.
+     */
+    pipe(dest, opts) {
+        if (this[DESTROYED])
+            return dest;
+        this[DISCARDED] = false;
+        const ended = this[EMITTED_END];
+        opts = opts || {};
+        if (dest === proc.stdout || dest === proc.stderr)
+            opts.end = false;
+        else
+            opts.end = opts.end !== false;
+        opts.proxyErrors = !!opts.proxyErrors;
+        // piping an ended stream ends immediately
+        if (ended) {
+            if (opts.end)
+                dest.end();
+        }
+        else {
+            // "as" here just ignores the WType, which pipes don't care about,
+            // since they're only consuming from us, and writing to the dest
+            this[PIPES].push(!opts.proxyErrors
+                ? new Pipe(this, dest, opts)
+                : new PipeProxyErrors(this, dest, opts));
+            if (this[ASYNC])
+                defer(() => this[RESUME]());
+            else
+                this[RESUME]();
+        }
+        return dest;
+    }
+    /**
+     * Fully unhook a piped destination stream.
+     *
+     * If the destination stream was the only consumer of this stream (ie,
+     * there are no other piped destinations or `'data'` event listeners)
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    unpipe(dest) {
+        const p = this[PIPES].find(p => p.dest === dest);
+        if (p) {
+            if (this[PIPES].length === 1) {
+                if (this[FLOWING] && this[DATALISTENERS] === 0) {
+                    this[FLOWING] = false;
+                }
+                this[PIPES] = [];
+            }
+            else
+                this[PIPES].splice(this[PIPES].indexOf(p), 1);
+            p.unpipe();
+        }
+    }
+    /**
+     * Alias for {@link Minipass#on}
+     */
+    addListener(ev, handler) {
+        return this.on(ev, handler);
+    }
+    /**
+     * Mostly identical to `EventEmitter.on`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * - Adding a 'data' event handler will trigger the flow of data
+     *
+     * - Adding a 'readable' event handler when there is data waiting to be read
+     *   will cause 'readable' to be emitted immediately.
+     *
+     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
+     *   already passed will cause the event to be emitted immediately and all
+     *   handlers removed.
+     *
+     * - Adding an 'error' event handler after an error has been emitted will
+     *   cause the event to be re-emitted immediately with the error previously
+     *   raised.
+     */
+    on(ev, handler) {
+        const ret = super.on(ev, handler);
+        if (ev === 'data') {
+            this[DISCARDED] = false;
+            this[DATALISTENERS]++;
+            if (!this[PIPES].length && !this[FLOWING]) {
+                this[RESUME]();
+            }
+        }
+        else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {
+            super.emit('readable');
+        }
+        else if (isEndish(ev) && this[EMITTED_END]) {
+            super.emit(ev);
+            this.removeAllListeners(ev);
+        }
+        else if (ev === 'error' && this[EMITTED_ERROR]) {
+            const h = handler;
+            if (this[ASYNC])
+                defer(() => h.call(this, this[EMITTED_ERROR]));
+            else
+                h.call(this, this[EMITTED_ERROR]);
+        }
+        return ret;
+    }
+    /**
+     * Alias for {@link Minipass#off}
+     */
+    removeListener(ev, handler) {
+        return this.off(ev, handler);
+    }
+    /**
+     * Mostly identical to `EventEmitter.off`
+     *
+     * If a 'data' event handler is removed, and it was the last consumer
+     * (ie, there are no pipe destinations or other 'data' event listeners),
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    off(ev, handler) {
+        const ret = super.off(ev, handler);
+        // if we previously had listeners, and now we don't, and we don't
+        // have any pipes, then stop the flow, unless it's been explicitly
+        // put in a discarded flowing state via stream.resume().
+        if (ev === 'data') {
+            this[DATALISTENERS] = this.listeners('data').length;
+            if (this[DATALISTENERS] === 0 &&
+                !this[DISCARDED] &&
+                !this[PIPES].length) {
+                this[FLOWING] = false;
+            }
+        }
+        return ret;
+    }
+    /**
+     * Mostly identical to `EventEmitter.removeAllListeners`
+     *
+     * If all 'data' event handlers are removed, and they were the last consumer
+     * (ie, there are no pipe destinations), then the flow of data will stop
+     * until there is another consumer or {@link Minipass#resume} is explicitly
+     * called.
+     */
+    removeAllListeners(ev) {
+        const ret = super.removeAllListeners(ev);
+        if (ev === 'data' || ev === undefined) {
+            this[DATALISTENERS] = 0;
+            if (!this[DISCARDED] && !this[PIPES].length) {
+                this[FLOWING] = false;
+            }
+        }
+        return ret;
+    }
+    /**
+     * true if the 'end' event has been emitted
+     */
+    get emittedEnd() {
+        return this[EMITTED_END];
+    }
+    [MAYBE_EMIT_END]() {
+        if (!this[EMITTING_END] &&
+            !this[EMITTED_END] &&
+            !this[DESTROYED] &&
+            this[BUFFER].length === 0 &&
+            this[EOF]) {
+            this[EMITTING_END] = true;
+            this.emit('end');
+            this.emit('prefinish');
+            this.emit('finish');
+            if (this[CLOSED])
+                this.emit('close');
+            this[EMITTING_END] = false;
+        }
+    }
+    /**
+     * Mostly identical to `EventEmitter.emit`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * If the stream has been destroyed, and the event is something other
+     * than 'close' or 'error', then `false` is returned and no handlers
+     * are called.
+     *
+     * If the event is 'end', and has already been emitted, then the event
+     * is ignored. If the stream is in a paused or non-flowing state, then
+     * the event will be deferred until data flow resumes. If the stream is
+     * async, then handlers will be called on the next tick rather than
+     * immediately.
+     *
+     * If the event is 'close', and 'end' has not yet been emitted, then
+     * the event will be deferred until after 'end' is emitted.
+     *
+     * If the event is 'error', and an AbortSignal was provided for the stream,
+     * and there are no listeners, then the event is ignored, matching the
+     * behavior of node core streams in the presense of an AbortSignal.
+     *
+     * If the event is 'finish' or 'prefinish', then all listeners will be
+     * removed after emitting the event, to prevent double-firing.
+     */
+    emit(ev, ...args) {
+        const data = args[0];
+        // error and close are only events allowed after calling destroy()
+        if (ev !== 'error' &&
+            ev !== 'close' &&
+            ev !== DESTROYED &&
+            this[DESTROYED]) {
+            return false;
+        }
+        else if (ev === 'data') {
+            return !this[OBJECTMODE] && !data
+                ? false
+                : this[ASYNC]
+                    ? (defer(() => this[EMITDATA](data)), true)
+                    : this[EMITDATA](data);
+        }
+        else if (ev === 'end') {
+            return this[EMITEND]();
+        }
+        else if (ev === 'close') {
+            this[CLOSED] = true;
+            // don't emit close before 'end' and 'finish'
+            if (!this[EMITTED_END] && !this[DESTROYED])
+                return false;
+            const ret = super.emit('close');
+            this.removeAllListeners('close');
+            return ret;
+        }
+        else if (ev === 'error') {
+            this[EMITTED_ERROR] = data;
+            super.emit(ERROR, data);
+            const ret = !this[SIGNAL] || this.listeners('error').length
+                ? super.emit('error', data)
+                : false;
+            this[MAYBE_EMIT_END]();
+            return ret;
+        }
+        else if (ev === 'resume') {
+            const ret = super.emit('resume');
+            this[MAYBE_EMIT_END]();
+            return ret;
+        }
+        else if (ev === 'finish' || ev === 'prefinish') {
+            const ret = super.emit(ev);
+            this.removeAllListeners(ev);
+            return ret;
+        }
+        // Some other unknown event
+        const ret = super.emit(ev, ...args);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [EMITDATA](data) {
+        for (const p of this[PIPES]) {
+            if (p.dest.write(data) === false)
+                this.pause();
+        }
+        const ret = this[DISCARDED] ? false : super.emit('data', data);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [EMITEND]() {
+        if (this[EMITTED_END])
+            return false;
+        this[EMITTED_END] = true;
+        this.readable = false;
+        return this[ASYNC]
+            ? (defer(() => this[EMITEND2]()), true)
+            : this[EMITEND2]();
+    }
+    [EMITEND2]() {
+        if (this[DECODER]) {
+            const data = this[DECODER].end();
+            if (data) {
+                for (const p of this[PIPES]) {
+                    p.dest.write(data);
+                }
+                if (!this[DISCARDED])
+                    super.emit('data', data);
+            }
+        }
+        for (const p of this[PIPES]) {
+            p.end();
+        }
+        const ret = super.emit('end');
+        this.removeAllListeners('end');
+        return ret;
+    }
+    /**
+     * Return a Promise that resolves to an array of all emitted data once
+     * the stream ends.
+     */
+    async collect() {
+        const buf = Object.assign([], {
+            dataLength: 0,
+        });
+        if (!this[OBJECTMODE])
+            buf.dataLength = 0;
+        // set the promise first, in case an error is raised
+        // by triggering the flow here.
+        const p = this.promise();
+        this.on('data', c => {
+            buf.push(c);
+            if (!this[OBJECTMODE])
+                buf.dataLength += c.length;
+        });
+        await p;
+        return buf;
+    }
+    /**
+     * Return a Promise that resolves to the concatenation of all emitted data
+     * once the stream ends.
+     *
+     * Not allowed on objectMode streams.
+     */
+    async concat() {
+        if (this[OBJECTMODE]) {
+            throw new Error('cannot concat in objectMode');
+        }
+        const buf = await this.collect();
+        return (this[ENCODING]
+            ? buf.join('')
+            : Buffer.concat(buf, buf.dataLength));
+    }
+    /**
+     * Return a void Promise that resolves once the stream ends.
+     */
+    async promise() {
+        return new Promise((resolve, reject) => {
+            this.on(DESTROYED, () => reject(new Error('stream destroyed')));
+            this.on('error', er => reject(er));
+            this.on('end', () => resolve());
+        });
+    }
+    /**
+     * Asynchronous `for await of` iteration.
+     *
+     * This will continue emitting all chunks until the stream terminates.
+     */
+    [Symbol.asyncIterator]() {
+        // set this up front, in case the consumer doesn't call next()
+        // right away.
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = async () => {
+            this.pause();
+            stopped = true;
+            return { value: undefined, done: true };
+        };
+        const next = () => {
+            if (stopped)
+                return stop();
+            const res = this.read();
+            if (res !== null)
+                return Promise.resolve({ done: false, value: res });
+            if (this[EOF])
+                return stop();
+            let resolve;
+            let reject;
+            const onerr = (er) => {
+                this.off('data', ondata);
+                this.off('end', onend);
+                this.off(DESTROYED, ondestroy);
+                stop();
+                reject(er);
+            };
+            const ondata = (value) => {
+                this.off('error', onerr);
+                this.off('end', onend);
+                this.off(DESTROYED, ondestroy);
+                this.pause();
+                resolve({ value, done: !!this[EOF] });
+            };
+            const onend = () => {
+                this.off('error', onerr);
+                this.off('data', ondata);
+                this.off(DESTROYED, ondestroy);
+                stop();
+                resolve({ done: true, value: undefined });
+            };
+            const ondestroy = () => onerr(new Error('stream destroyed'));
+            return new Promise((res, rej) => {
+                reject = rej;
+                resolve = res;
+                this.once(DESTROYED, ondestroy);
+                this.once('error', onerr);
+                this.once('end', onend);
+                this.once('data', ondata);
+            });
+        };
+        return {
+            next,
+            throw: stop,
+            return: stop,
+            [Symbol.asyncIterator]() {
+                return this;
+            },
+        };
+    }
+    /**
+     * Synchronous `for of` iteration.
+     *
+     * The iteration will terminate when the internal buffer runs out, even
+     * if the stream has not yet terminated.
+     */
+    [Symbol.iterator]() {
+        // set this up front, in case the consumer doesn't call next()
+        // right away.
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = () => {
+            this.pause();
+            this.off(ERROR, stop);
+            this.off(DESTROYED, stop);
+            this.off('end', stop);
+            stopped = true;
+            return { done: true, value: undefined };
+        };
+        const next = () => {
+            if (stopped)
+                return stop();
+            const value = this.read();
+            return value === null ? stop() : { done: false, value };
+        };
+        this.once('end', stop);
+        this.once(ERROR, stop);
+        this.once(DESTROYED, stop);
+        return {
+            next,
+            throw: stop,
+            return: stop,
+            [Symbol.iterator]() {
+                return this;
+            },
+        };
+    }
+    /**
+     * Destroy a stream, preventing it from being used for any further purpose.
+     *
+     * If the stream has a `close()` method, then it will be called on
+     * destruction.
+     *
+     * After destruction, any attempt to write data, read data, or emit most
+     * events will be ignored.
+     *
+     * If an error argument is provided, then it will be emitted in an
+     * 'error' event.
+     */
+    destroy(er) {
+        if (this[DESTROYED]) {
+            if (er)
+                this.emit('error', er);
+            else
+                this.emit(DESTROYED);
+            return this;
+        }
+        this[DESTROYED] = true;
+        this[DISCARDED] = true;
+        // throw away all buffered data, it's never coming out
+        this[BUFFER].length = 0;
+        this[BUFFERLENGTH] = 0;
+        const wc = this;
+        if (typeof wc.close === 'function' && !this[CLOSED])
+            wc.close();
+        if (er)
+            this.emit('error', er);
+        // if no error to emit, still reject pending promises
+        else
+            this.emit(DESTROYED);
+        return this;
+    }
+    /**
+     * Alias for {@link isStream}
+     *
+     * Former export location, maintained for backwards compatibility.
+     *
+     * @deprecated
+     */
+    static get isStream() {
+        return exports.isStream;
+    }
+}
+exports.Minipass = Minipass;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..9f3ef4b786cb4046eb8a929a3652bdc572d674d1
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO;IACpC,CAAC,CAAC,OAAO;IACT,CAAC,CAAC;QACE,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACb,CAAA;AACP,6CAA0C;AAC1C,8DAAgC;AAChC,6DAAmD;AASnD;;;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A;YACb,CAAC;SACF,CAAA;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAY;QAClB,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACpB,IAAI,EAAE;gBAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;;gBACzB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACzB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;QAEtB,sDAAsD;QACtD,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAEtB,MAAM,EAAE,GAAG,IAEV,CAAA;QACD,IAAI,OAAO,EAAE,CAAC,KAAK,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,EAAE,CAAC,KAAK,EAAE,CAAA;QAE/D,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;QAC9B,qDAAqD;;YAChD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAEzB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;OAMG;IACH,MAAM,KAAK,QAAQ;QACjB,OAAO,gBAAQ,CAAA;IACjB,CAAC;CACF;AAn/BD,4BAm/BC","sourcesContent":["const proc =\n  typeof process === 'object' && process\n    ? process\n    : {\n        stdout: null,\n        stderr: null,\n      }\nimport { EventEmitter } from 'node:events'\nimport Stream from 'node:stream'\nimport { StringDecoder } from 'node:string_decoder'\n\n/**\n * Same as StringDecoder, but exposing the `lastNeed` flag on the type\n */\ntype SD = StringDecoder & { lastNeed: boolean }\n\nexport type { SD, Pipe, PipeProxyErrors }\n\n/**\n * Return true if the argument is a Minipass stream, Node stream, or something\n * else that Minipass can interact with.\n */\nexport const isStream = (\n  s: any\n): s is Minipass.Readable | Minipass.Writable =>\n  !!s &&\n  typeof s === 'object' &&\n  (s instanceof Minipass ||\n    s instanceof Stream ||\n    isReadable(s) ||\n    isWritable(s))\n\n/**\n * Return true if the argument is a valid {@link Minipass.Readable}\n */\nexport const isReadable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Readable).pipe === 'function' &&\n  // node core Writable streams have a pipe() method, but it throws\n  (s as Minipass.Readable).pipe !== Stream.Writable.prototype.pipe\n\n/**\n * Return true if the argument is a valid {@link Minipass.Writable}\n */\nexport const isWritable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Writable).write === 'function' &&\n  typeof (s as Minipass.Writable).end === 'function'\n\nconst EOF = Symbol('EOF')\nconst MAYBE_EMIT_END = Symbol('maybeEmitEnd')\nconst EMITTED_END = Symbol('emittedEnd')\nconst EMITTING_END = Symbol('emittingEnd')\nconst EMITTED_ERROR = Symbol('emittedError')\nconst CLOSED = Symbol('closed')\nconst READ = Symbol('read')\nconst FLUSH = Symbol('flush')\nconst FLUSHCHUNK = Symbol('flushChunk')\nconst ENCODING = Symbol('encoding')\nconst DECODER = Symbol('decoder')\nconst FLOWING = Symbol('flowing')\nconst PAUSED = Symbol('paused')\nconst RESUME = Symbol('resume')\nconst BUFFER = Symbol('buffer')\nconst PIPES = Symbol('pipes')\nconst BUFFERLENGTH = Symbol('bufferLength')\nconst BUFFERPUSH = Symbol('bufferPush')\nconst BUFFERSHIFT = Symbol('bufferShift')\nconst OBJECTMODE = Symbol('objectMode')\n// internal event when stream is destroyed\nconst DESTROYED = Symbol('destroyed')\n// internal event when stream has an error\nconst ERROR = Symbol('error')\nconst EMITDATA = Symbol('emitData')\nconst EMITEND = Symbol('emitEnd')\nconst EMITEND2 = Symbol('emitEnd2')\nconst ASYNC = Symbol('async')\nconst ABORT = Symbol('abort')\nconst ABORTED = Symbol('aborted')\nconst SIGNAL = Symbol('signal')\nconst DATALISTENERS = Symbol('dataListeners')\nconst DISCARDED = Symbol('discarded')\n\nconst defer = (fn: (...a: any[]) => any) => Promise.resolve().then(fn)\nconst nodefer = (fn: (...a: any[]) => any) => fn()\n\n// events that mean 'the stream is over'\n// these are treated specially, and re-emitted\n// if they are listened for after emitting.\ntype EndishEvent = 'end' | 'finish' | 'prefinish'\nconst isEndish = (ev: any): ev is EndishEvent =>\n  ev === 'end' || ev === 'finish' || ev === 'prefinish'\n\nconst isArrayBufferLike = (b: any): b is ArrayBufferLike =>\n  b instanceof ArrayBuffer ||\n  (!!b &&\n    typeof b === 'object' &&\n    b.constructor &&\n    b.constructor.name === 'ArrayBuffer' &&\n    b.byteLength >= 0)\n\nconst isArrayBufferView = (b: any): b is ArrayBufferView =>\n  !Buffer.isBuffer(b) && ArrayBuffer.isView(b)\n\n/**\n * Options that may be passed to stream.pipe()\n */\nexport interface PipeOptions {\n  /**\n   * end the destination stream when the source stream ends\n   */\n  end?: boolean\n  /**\n   * proxy errors from the source stream to the destination stream\n   */\n  proxyErrors?: boolean\n}\n\n/**\n * Internal class representing a pipe to a destination stream.\n *\n * @internal\n */\nclass Pipe {\n  src: Minipass\n  dest: Minipass\n  opts: PipeOptions\n  ondrain: () => any\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    this.src = src\n    this.dest = dest as Minipass\n    this.opts = opts\n    this.ondrain = () => src[RESUME]()\n    this.dest.on('drain', this.ondrain)\n  }\n  unpipe() {\n    this.dest.removeListener('drain', this.ondrain)\n  }\n  // only here for the prototype\n  /* c8 ignore start */\n  proxyErrors(_er: any) {}\n  /* c8 ignore stop */\n  end() {\n    this.unpipe()\n    if (this.opts.end) this.dest.end()\n  }\n}\n\n/**\n * Internal class representing a pipe to a destination stream where\n * errors are proxied.\n *\n * @internal\n */\nclass PipeProxyErrors extends Pipe {\n  unpipe() {\n    this.src.removeListener('error', this.proxyErrors)\n    super.unpipe()\n  }\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    super(src, dest, opts)\n    this.proxyErrors = er => dest.emit('error', er)\n    src.on('error', this.proxyErrors)\n  }\n}\n\nexport namespace Minipass {\n  /**\n   * Encoding used to create a stream that outputs strings rather than\n   * Buffer objects.\n   */\n  export type Encoding = BufferEncoding | 'buffer' | null\n\n  /**\n   * Any stream that Minipass can pipe into\n   */\n  export type Writable =\n    | Minipass\n    | NodeJS.WriteStream\n    | (NodeJS.WriteStream & { fd: number })\n    | (EventEmitter & {\n        end(): any\n        write(chunk: any, ...args: any[]): any\n      })\n\n  /**\n   * Any stream that can be read from\n   */\n  export type Readable =\n    | Minipass\n    | NodeJS.ReadStream\n    | (NodeJS.ReadStream & { fd: number })\n    | (EventEmitter & {\n        pause(): any\n        resume(): any\n        pipe(...destArgs: any[]): any\n      })\n\n  /**\n   * Utility type that can be iterated sync or async\n   */\n  export type DualIterable = Iterable & AsyncIterable\n\n  type EventArguments = Record\n\n  /**\n   * The listing of events that a Minipass class can emit.\n   * Extend this when extending the Minipass class, and pass as\n   * the third template argument.  The key is the name of the event,\n   * and the value is the argument list.\n   *\n   * Any undeclared events will still be allowed, but the handler will get\n   * arguments as `unknown[]`.\n   */\n  export interface Events\n    extends EventArguments {\n    readable: []\n    data: [chunk: RType]\n    error: [er: unknown]\n    abort: [reason: unknown]\n    drain: []\n    resume: []\n    end: []\n    finish: []\n    prefinish: []\n    close: []\n    [DESTROYED]: [er?: unknown]\n    [ERROR]: [er: unknown]\n  }\n\n  /**\n   * String or buffer-like data that can be joined and sliced\n   */\n  export type ContiguousData =\n    | Buffer\n    | ArrayBufferLike\n    | ArrayBufferView\n    | string\n  export type BufferOrString = Buffer | string\n\n  /**\n   * Options passed to the Minipass constructor.\n   */\n  export type SharedOptions = {\n    /**\n     * Defer all data emission and other events until the end of the\n     * current tick, similar to Node core streams\n     */\n    async?: boolean\n    /**\n     * A signal which will abort the stream\n     */\n    signal?: AbortSignal\n    /**\n     * Output string encoding. Set to `null` or `'buffer'` (or omit) to\n     * emit Buffer objects rather than strings.\n     *\n     * Conflicts with `objectMode`\n     */\n    encoding?: BufferEncoding | null | 'buffer'\n    /**\n     * Output data exactly as it was written, supporting non-buffer/string\n     * data (such as arbitrary objects, falsey values, etc.)\n     *\n     * Conflicts with `encoding`\n     */\n    objectMode?: boolean\n  }\n\n  /**\n   * Options for a string encoded output\n   */\n  export type EncodingOptions = SharedOptions & {\n    encoding: BufferEncoding\n    objectMode?: false\n  }\n\n  /**\n   * Options for contiguous data buffer output\n   */\n  export type BufferOptions = SharedOptions & {\n    encoding?: null | 'buffer'\n    objectMode?: false\n  }\n\n  /**\n   * Options for objectMode arbitrary output\n   */\n  export type ObjectModeOptions = SharedOptions & {\n    objectMode: true\n    encoding?: null\n  }\n\n  /**\n   * Utility type to determine allowed options based on read type\n   */\n  export type Options =\n    | ObjectModeOptions\n    | (T extends string\n        ? EncodingOptions\n        : T extends Buffer\n        ? BufferOptions\n        : SharedOptions)\n}\n\nconst isObjectModeOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.ObjectModeOptions => !!o.objectMode\n\nconst isEncodingOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.EncodingOptions =>\n  !o.objectMode && !!o.encoding && o.encoding !== 'buffer'\n\n/**\n * Main export, the Minipass class\n *\n * `RType` is the type of data emitted, defaults to Buffer\n *\n * `WType` is the type of data to be written, if RType is buffer or string,\n * then any {@link Minipass.ContiguousData} is allowed.\n *\n * `Events` is the set of event handler signatures that this object\n * will emit, see {@link Minipass.Events}\n */\nexport class Minipass<\n    RType extends unknown = Buffer,\n    WType extends unknown = RType extends Minipass.BufferOrString\n      ? Minipass.ContiguousData\n      : RType,\n    Events extends Minipass.Events = Minipass.Events\n  >\n  extends EventEmitter\n  implements Minipass.DualIterable\n{\n  [FLOWING]: boolean = false;\n  [PAUSED]: boolean = false;\n  [PIPES]: Pipe[] = [];\n  [BUFFER]: RType[] = [];\n  [OBJECTMODE]: boolean;\n  [ENCODING]: BufferEncoding | null;\n  [ASYNC]: boolean;\n  [DECODER]: SD | null;\n  [EOF]: boolean = false;\n  [EMITTED_END]: boolean = false;\n  [EMITTING_END]: boolean = false;\n  [CLOSED]: boolean = false;\n  [EMITTED_ERROR]: unknown = null;\n  [BUFFERLENGTH]: number = 0;\n  [DESTROYED]: boolean = false;\n  [SIGNAL]?: AbortSignal;\n  [ABORTED]: boolean = false;\n  [DATALISTENERS]: number = 0;\n  [DISCARDED]: boolean = false\n\n  /**\n   * true if the stream can be written\n   */\n  writable: boolean = true\n  /**\n   * true if the stream can be read\n   */\n  readable: boolean = true\n\n  /**\n   * If `RType` is Buffer, then options do not need to be provided.\n   * Otherwise, an options object must be provided to specify either\n   * {@link Minipass.SharedOptions.objectMode} or\n   * {@link Minipass.SharedOptions.encoding}, as appropriate.\n   */\n  constructor(\n    ...args:\n      | [Minipass.ObjectModeOptions]\n      | (RType extends Buffer\n          ? [] | [Minipass.Options]\n          : [Minipass.Options])\n  ) {\n    const options: Minipass.Options = (args[0] ||\n      {}) as Minipass.Options\n    super()\n    if (options.objectMode && typeof options.encoding === 'string') {\n      throw new TypeError(\n        'Encoding and objectMode may not be used together'\n      )\n    }\n    if (isObjectModeOptions(options)) {\n      this[OBJECTMODE] = true\n      this[ENCODING] = null\n    } else if (isEncodingOptions(options)) {\n      this[ENCODING] = options.encoding\n      this[OBJECTMODE] = false\n    } else {\n      this[OBJECTMODE] = false\n      this[ENCODING] = null\n    }\n    this[ASYNC] = !!options.async\n    this[DECODER] = this[ENCODING]\n      ? (new StringDecoder(this[ENCODING]) as SD)\n      : null\n\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposeBuffer === true) {\n      Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] })\n    }\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposePipes === true) {\n      Object.defineProperty(this, 'pipes', { get: () => this[PIPES] })\n    }\n\n    const { signal } = options\n    if (signal) {\n      this[SIGNAL] = signal\n      if (signal.aborted) {\n        this[ABORT]()\n      } else {\n        signal.addEventListener('abort', () => this[ABORT]())\n      }\n    }\n  }\n\n  /**\n   * The amount of data stored in the buffer waiting to be read.\n   *\n   * For Buffer strings, this will be the total byte length.\n   * For string encoding streams, this will be the string character length,\n   * according to JavaScript's `string.length` logic.\n   * For objectMode streams, this is a count of the items waiting to be\n   * emitted.\n   */\n  get bufferLength() {\n    return this[BUFFERLENGTH]\n  }\n\n  /**\n   * The `BufferEncoding` currently in use, or `null`\n   */\n  get encoding() {\n    return this[ENCODING]\n  }\n\n  /**\n   * @deprecated - This is a read only property\n   */\n  set encoding(_enc) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * @deprecated - Encoding may only be set at instantiation time\n   */\n  setEncoding(_enc: Minipass.Encoding) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * True if this is an objectMode stream\n   */\n  get objectMode() {\n    return this[OBJECTMODE]\n  }\n\n  /**\n   * @deprecated - This is a read-only property\n   */\n  set objectMode(_om) {\n    throw new Error('objectMode must be set at instantiation time')\n  }\n\n  /**\n   * true if this is an async stream\n   */\n  get ['async'](): boolean {\n    return this[ASYNC]\n  }\n  /**\n   * Set to true to make this stream async.\n   *\n   * Once set, it cannot be unset, as this would potentially cause incorrect\n   * behavior.  Ie, a sync stream can be made async, but an async stream\n   * cannot be safely made sync.\n   */\n  set ['async'](a: boolean) {\n    this[ASYNC] = this[ASYNC] || !!a\n  }\n\n  // drop everything and get out of the flow completely\n  [ABORT]() {\n    this[ABORTED] = true\n    this.emit('abort', this[SIGNAL]?.reason)\n    this.destroy(this[SIGNAL]?.reason)\n  }\n\n  /**\n   * True if the stream has been aborted.\n   */\n  get aborted() {\n    return this[ABORTED]\n  }\n  /**\n   * No-op setter. Stream aborted status is set via the AbortSignal provided\n   * in the constructor options.\n   */\n  set aborted(_) {}\n\n  /**\n   * Write data into the stream\n   *\n   * If the chunk written is a string, and encoding is not specified, then\n   * `utf8` will be assumed. If the stream encoding matches the encoding of\n   * a written string, and the state of the string decoder allows it, then\n   * the string will be passed through to either the output or the internal\n   * buffer without any processing. Otherwise, it will be turned into a\n   * Buffer object for processing into the desired encoding.\n   *\n   * If provided, `cb` function is called immediately before return for\n   * sync streams, or on next tick for async streams, because for this\n   * base class, a chunk is considered \"processed\" once it is accepted\n   * and either emitted or buffered. That is, the callback does not indicate\n   * that the chunk has been eventually emitted, though of course child\n   * classes can override this function to do whatever processing is required\n   * and call `super.write(...)` only once processing is completed.\n   */\n  write(chunk: WType, cb?: () => void): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding,\n    cb?: () => void\n  ): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): boolean {\n    if (this[ABORTED]) return false\n    if (this[EOF]) throw new Error('write after end')\n\n    if (this[DESTROYED]) {\n      this.emit(\n        'error',\n        Object.assign(\n          new Error('Cannot call write after a stream was destroyed'),\n          { code: 'ERR_STREAM_DESTROYED' }\n        )\n      )\n      return true\n    }\n\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n\n    if (!encoding) encoding = 'utf8'\n\n    const fn = this[ASYNC] ? defer : nodefer\n\n    // convert array buffers and typed array views into buffers\n    // at some point in the future, we may want to do the opposite!\n    // leave strings and buffers as-is\n    // anything is only allowed if in object mode, so throw\n    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {\n      if (isArrayBufferView(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(\n          chunk.buffer,\n          chunk.byteOffset,\n          chunk.byteLength\n        )\n      } else if (isArrayBufferLike(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(chunk)\n      } else if (typeof chunk !== 'string') {\n        throw new Error(\n          'Non-contiguous data written to non-objectMode stream'\n        )\n      }\n    }\n\n    // handle object mode up front, since it's simpler\n    // this yields better performance, fewer checks later.\n    if (this[OBJECTMODE]) {\n      // maybe impossible?\n      /* c8 ignore start */\n      if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n      /* c8 ignore stop */\n\n      if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n      else this[BUFFERPUSH](chunk as unknown as RType)\n\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n      if (cb) fn(cb)\n\n      return this[FLOWING]\n    }\n\n    // at this point the chunk is a buffer or string\n    // don't buffer it up or send it to the decoder\n    if (!(chunk as Minipass.BufferOrString).length) {\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n      if (cb) fn(cb)\n      return this[FLOWING]\n    }\n\n    // fast-path writing strings of same encoding to a stream with\n    // an empty buffer, skipping the buffer/decoder dance\n    if (\n      typeof chunk === 'string' &&\n      // unless it is a string already ready for us to use\n      !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)\n    ) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = Buffer.from(chunk, encoding)\n    }\n\n    if (Buffer.isBuffer(chunk) && this[ENCODING]) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = this[DECODER].write(chunk)\n    }\n\n    // Note: flushing CAN potentially switch us into not-flowing mode\n    if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n\n    if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n    else this[BUFFERPUSH](chunk as unknown as RType)\n\n    if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n    if (cb) fn(cb)\n\n    return this[FLOWING]\n  }\n\n  /**\n   * Low-level explicit read method.\n   *\n   * In objectMode, the argument is ignored, and one item is returned if\n   * available.\n   *\n   * `n` is the number of bytes (or in the case of encoding streams,\n   * characters) to consume. If `n` is not provided, then the entire buffer\n   * is returned, or `null` is returned if no data is available.\n   *\n   * If `n` is greater that the amount of data in the internal buffer,\n   * then `null` is returned.\n   */\n  read(n?: number | null): RType | null {\n    if (this[DESTROYED]) return null\n    this[DISCARDED] = false\n\n    if (\n      this[BUFFERLENGTH] === 0 ||\n      n === 0 ||\n      (n && n > this[BUFFERLENGTH])\n    ) {\n      this[MAYBE_EMIT_END]()\n      return null\n    }\n\n    if (this[OBJECTMODE]) n = null\n\n    if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {\n      // not object mode, so if we have an encoding, then RType is string\n      // otherwise, must be Buffer\n      this[BUFFER] = [\n        (this[ENCODING]\n          ? this[BUFFER].join('')\n          : Buffer.concat(\n              this[BUFFER] as Buffer[],\n              this[BUFFERLENGTH]\n            )) as RType,\n      ]\n    }\n\n    const ret = this[READ](n || null, this[BUFFER][0] as RType)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [READ](n: number | null, chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERSHIFT]()\n    else {\n      const c = chunk as Minipass.BufferOrString\n      if (n === c.length || n === null) this[BUFFERSHIFT]()\n      else if (typeof c === 'string') {\n        this[BUFFER][0] = c.slice(n) as RType\n        chunk = c.slice(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      } else {\n        this[BUFFER][0] = c.subarray(n) as RType\n        chunk = c.subarray(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      }\n    }\n\n    this.emit('data', chunk)\n\n    if (!this[BUFFER].length && !this[EOF]) this.emit('drain')\n\n    return chunk\n  }\n\n  /**\n   * End the stream, optionally providing a final write.\n   *\n   * See {@link Minipass#write} for argument descriptions\n   */\n  end(cb?: () => void): this\n  end(chunk: WType, cb?: () => void): this\n  end(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): this\n  end(\n    chunk?: WType | (() => void),\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): this {\n    if (typeof chunk === 'function') {\n      cb = chunk as () => void\n      chunk = undefined\n    }\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n    if (chunk !== undefined) this.write(chunk, encoding)\n    if (cb) this.once('end', cb)\n    this[EOF] = true\n    this.writable = false\n\n    // if we haven't written anything, then go ahead and emit,\n    // even if we're not reading.\n    // we'll re-emit if a new 'end' listener is added anyway.\n    // This makes MP more suitable to write-only use cases.\n    if (this[FLOWING] || !this[PAUSED]) this[MAYBE_EMIT_END]()\n    return this\n  }\n\n  // don't let the internal resume be overwritten\n  [RESUME]() {\n    if (this[DESTROYED]) return\n\n    if (!this[DATALISTENERS] && !this[PIPES].length) {\n      this[DISCARDED] = true\n    }\n    this[PAUSED] = false\n    this[FLOWING] = true\n    this.emit('resume')\n    if (this[BUFFER].length) this[FLUSH]()\n    else if (this[EOF]) this[MAYBE_EMIT_END]()\n    else this.emit('drain')\n  }\n\n  /**\n   * Resume the stream if it is currently in a paused state\n   *\n   * If called when there are no pipe destinations or `data` event listeners,\n   * this will place the stream in a \"discarded\" state, where all data will\n   * be thrown away. The discarded state is removed if a pipe destination or\n   * data handler is added, if pause() is called, or if any synchronous or\n   * asynchronous iteration is started.\n   */\n  resume() {\n    return this[RESUME]()\n  }\n\n  /**\n   * Pause the stream\n   */\n  pause() {\n    this[FLOWING] = false\n    this[PAUSED] = true\n    this[DISCARDED] = false\n  }\n\n  /**\n   * true if the stream has been forcibly destroyed\n   */\n  get destroyed() {\n    return this[DESTROYED]\n  }\n\n  /**\n   * true if the stream is currently in a flowing state, meaning that\n   * any writes will be immediately emitted.\n   */\n  get flowing() {\n    return this[FLOWING]\n  }\n\n  /**\n   * true if the stream is currently in a paused state\n   */\n  get paused() {\n    return this[PAUSED]\n  }\n\n  [BUFFERPUSH](chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1\n    else this[BUFFERLENGTH] += (chunk as Minipass.BufferOrString).length\n    this[BUFFER].push(chunk)\n  }\n\n  [BUFFERSHIFT](): RType {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1\n    else\n      this[BUFFERLENGTH] -= (\n        this[BUFFER][0] as Minipass.BufferOrString\n      ).length\n    return this[BUFFER].shift() as RType\n  }\n\n  [FLUSH](noDrain: boolean = false) {\n    do {} while (\n      this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&\n      this[BUFFER].length\n    )\n\n    if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain')\n  }\n\n  [FLUSHCHUNK](chunk: RType) {\n    this.emit('data', chunk)\n    return this[FLOWING]\n  }\n\n  /**\n   * Pipe all data emitted by this stream into the destination provided.\n   *\n   * Triggers the flow of data.\n   */\n  pipe(dest: W, opts?: PipeOptions): W {\n    if (this[DESTROYED]) return dest\n    this[DISCARDED] = false\n\n    const ended = this[EMITTED_END]\n    opts = opts || {}\n    if (dest === proc.stdout || dest === proc.stderr) opts.end = false\n    else opts.end = opts.end !== false\n    opts.proxyErrors = !!opts.proxyErrors\n\n    // piping an ended stream ends immediately\n    if (ended) {\n      if (opts.end) dest.end()\n    } else {\n      // \"as\" here just ignores the WType, which pipes don't care about,\n      // since they're only consuming from us, and writing to the dest\n      this[PIPES].push(\n        !opts.proxyErrors\n          ? new Pipe(this as Minipass, dest, opts)\n          : new PipeProxyErrors(this as Minipass, dest, opts)\n      )\n      if (this[ASYNC]) defer(() => this[RESUME]())\n      else this[RESUME]()\n    }\n\n    return dest\n  }\n\n  /**\n   * Fully unhook a piped destination stream.\n   *\n   * If the destination stream was the only consumer of this stream (ie,\n   * there are no other piped destinations or `'data'` event listeners)\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  unpipe(dest: W) {\n    const p = this[PIPES].find(p => p.dest === dest)\n    if (p) {\n      if (this[PIPES].length === 1) {\n        if (this[FLOWING] && this[DATALISTENERS] === 0) {\n          this[FLOWING] = false\n        }\n        this[PIPES] = []\n      } else this[PIPES].splice(this[PIPES].indexOf(p), 1)\n      p.unpipe()\n    }\n  }\n\n  /**\n   * Alias for {@link Minipass#on}\n   */\n  addListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    return this.on(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.on`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * - Adding a 'data' event handler will trigger the flow of data\n   *\n   * - Adding a 'readable' event handler when there is data waiting to be read\n   *   will cause 'readable' to be emitted immediately.\n   *\n   * - Adding an 'endish' event handler ('end', 'finish', etc.) which has\n   *   already passed will cause the event to be emitted immediately and all\n   *   handlers removed.\n   *\n   * - Adding an 'error' event handler after an error has been emitted will\n   *   cause the event to be re-emitted immediately with the error previously\n   *   raised.\n   */\n  on(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    const ret = super.on(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    if (ev === 'data') {\n      this[DISCARDED] = false\n      this[DATALISTENERS]++\n      if (!this[PIPES].length && !this[FLOWING]) {\n        this[RESUME]()\n      }\n    } else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {\n      super.emit('readable')\n    } else if (isEndish(ev) && this[EMITTED_END]) {\n      super.emit(ev)\n      this.removeAllListeners(ev)\n    } else if (ev === 'error' && this[EMITTED_ERROR]) {\n      const h = handler as (...a: Events['error']) => any\n      if (this[ASYNC]) defer(() => h.call(this, this[EMITTED_ERROR]))\n      else h.call(this, this[EMITTED_ERROR])\n    }\n    return ret\n  }\n\n  /**\n   * Alias for {@link Minipass#off}\n   */\n  removeListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    return this.off(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.off`\n   *\n   * If a 'data' event handler is removed, and it was the last consumer\n   * (ie, there are no pipe destinations or other 'data' event listeners),\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  off(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    const ret = super.off(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    // if we previously had listeners, and now we don't, and we don't\n    // have any pipes, then stop the flow, unless it's been explicitly\n    // put in a discarded flowing state via stream.resume().\n    if (ev === 'data') {\n      this[DATALISTENERS] = this.listeners('data').length\n      if (\n        this[DATALISTENERS] === 0 &&\n        !this[DISCARDED] &&\n        !this[PIPES].length\n      ) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.removeAllListeners`\n   *\n   * If all 'data' event handlers are removed, and they were the last consumer\n   * (ie, there are no pipe destinations), then the flow of data will stop\n   * until there is another consumer or {@link Minipass#resume} is explicitly\n   * called.\n   */\n  removeAllListeners(ev?: Event) {\n    const ret = super.removeAllListeners(ev as string | symbol | undefined)\n    if (ev === 'data' || ev === undefined) {\n      this[DATALISTENERS] = 0\n      if (!this[DISCARDED] && !this[PIPES].length) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * true if the 'end' event has been emitted\n   */\n  get emittedEnd() {\n    return this[EMITTED_END]\n  }\n\n  [MAYBE_EMIT_END]() {\n    if (\n      !this[EMITTING_END] &&\n      !this[EMITTED_END] &&\n      !this[DESTROYED] &&\n      this[BUFFER].length === 0 &&\n      this[EOF]\n    ) {\n      this[EMITTING_END] = true\n      this.emit('end')\n      this.emit('prefinish')\n      this.emit('finish')\n      if (this[CLOSED]) this.emit('close')\n      this[EMITTING_END] = false\n    }\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.emit`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * If the stream has been destroyed, and the event is something other\n   * than 'close' or 'error', then `false` is returned and no handlers\n   * are called.\n   *\n   * If the event is 'end', and has already been emitted, then the event\n   * is ignored. If the stream is in a paused or non-flowing state, then\n   * the event will be deferred until data flow resumes. If the stream is\n   * async, then handlers will be called on the next tick rather than\n   * immediately.\n   *\n   * If the event is 'close', and 'end' has not yet been emitted, then\n   * the event will be deferred until after 'end' is emitted.\n   *\n   * If the event is 'error', and an AbortSignal was provided for the stream,\n   * and there are no listeners, then the event is ignored, matching the\n   * behavior of node core streams in the presense of an AbortSignal.\n   *\n   * If the event is 'finish' or 'prefinish', then all listeners will be\n   * removed after emitting the event, to prevent double-firing.\n   */\n  emit(\n    ev: Event,\n    ...args: Events[Event]\n  ): boolean {\n    const data = args[0]\n    // error and close are only events allowed after calling destroy()\n    if (\n      ev !== 'error' &&\n      ev !== 'close' &&\n      ev !== DESTROYED &&\n      this[DESTROYED]\n    ) {\n      return false\n    } else if (ev === 'data') {\n      return !this[OBJECTMODE] && !data\n        ? false\n        : this[ASYNC]\n        ? (defer(() => this[EMITDATA](data as RType)), true)\n        : this[EMITDATA](data as RType)\n    } else if (ev === 'end') {\n      return this[EMITEND]()\n    } else if (ev === 'close') {\n      this[CLOSED] = true\n      // don't emit close before 'end' and 'finish'\n      if (!this[EMITTED_END] && !this[DESTROYED]) return false\n      const ret = super.emit('close')\n      this.removeAllListeners('close')\n      return ret\n    } else if (ev === 'error') {\n      this[EMITTED_ERROR] = data\n      super.emit(ERROR, data)\n      const ret =\n        !this[SIGNAL] || this.listeners('error').length\n          ? super.emit('error', data)\n          : false\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'resume') {\n      const ret = super.emit('resume')\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'finish' || ev === 'prefinish') {\n      const ret = super.emit(ev)\n      this.removeAllListeners(ev)\n      return ret\n    }\n\n    // Some other unknown event\n    const ret = super.emit(ev as string, ...args)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITDATA](data: RType) {\n    for (const p of this[PIPES]) {\n      if (p.dest.write(data as RType) === false) this.pause()\n    }\n    const ret = this[DISCARDED] ? false : super.emit('data', data)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITEND]() {\n    if (this[EMITTED_END]) return false\n\n    this[EMITTED_END] = true\n    this.readable = false\n    return this[ASYNC]\n      ? (defer(() => this[EMITEND2]()), true)\n      : this[EMITEND2]()\n  }\n\n  [EMITEND2]() {\n    if (this[DECODER]) {\n      const data = this[DECODER].end()\n      if (data) {\n        for (const p of this[PIPES]) {\n          p.dest.write(data as RType)\n        }\n        if (!this[DISCARDED]) super.emit('data', data)\n      }\n    }\n\n    for (const p of this[PIPES]) {\n      p.end()\n    }\n    const ret = super.emit('end')\n    this.removeAllListeners('end')\n    return ret\n  }\n\n  /**\n   * Return a Promise that resolves to an array of all emitted data once\n   * the stream ends.\n   */\n  async collect(): Promise {\n    const buf: RType[] & { dataLength: number } = Object.assign([], {\n      dataLength: 0,\n    })\n    if (!this[OBJECTMODE]) buf.dataLength = 0\n    // set the promise first, in case an error is raised\n    // by triggering the flow here.\n    const p = this.promise()\n    this.on('data', c => {\n      buf.push(c)\n      if (!this[OBJECTMODE])\n        buf.dataLength += (c as Minipass.BufferOrString).length\n    })\n    await p\n    return buf\n  }\n\n  /**\n   * Return a Promise that resolves to the concatenation of all emitted data\n   * once the stream ends.\n   *\n   * Not allowed on objectMode streams.\n   */\n  async concat(): Promise {\n    if (this[OBJECTMODE]) {\n      throw new Error('cannot concat in objectMode')\n    }\n    const buf = await this.collect()\n    return (\n      this[ENCODING]\n        ? buf.join('')\n        : Buffer.concat(buf as Buffer[], buf.dataLength)\n    ) as RType\n  }\n\n  /**\n   * Return a void Promise that resolves once the stream ends.\n   */\n  async promise(): Promise {\n    return new Promise((resolve, reject) => {\n      this.on(DESTROYED, () => reject(new Error('stream destroyed')))\n      this.on('error', er => reject(er))\n      this.on('end', () => resolve())\n    })\n  }\n\n  /**\n   * Asynchronous `for await of` iteration.\n   *\n   * This will continue emitting all chunks until the stream terminates.\n   */\n  [Symbol.asyncIterator](): AsyncGenerator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = async (): Promise> => {\n      this.pause()\n      stopped = true\n      return { value: undefined, done: true }\n    }\n    const next = (): Promise> => {\n      if (stopped) return stop()\n      const res = this.read()\n      if (res !== null) return Promise.resolve({ done: false, value: res })\n\n      if (this[EOF]) return stop()\n\n      let resolve!: (res: IteratorResult) => void\n      let reject!: (er: unknown) => void\n      const onerr = (er: unknown) => {\n        this.off('data', ondata)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        reject(er)\n      }\n      const ondata = (value: RType) => {\n        this.off('error', onerr)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        this.pause()\n        resolve({ value, done: !!this[EOF] })\n      }\n      const onend = () => {\n        this.off('error', onerr)\n        this.off('data', ondata)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        resolve({ done: true, value: undefined })\n      }\n      const ondestroy = () => onerr(new Error('stream destroyed'))\n      return new Promise>((res, rej) => {\n        reject = rej\n        resolve = res\n        this.once(DESTROYED, ondestroy)\n        this.once('error', onerr)\n        this.once('end', onend)\n        this.once('data', ondata)\n      })\n    }\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.asyncIterator]() {\n        return this\n      },\n    }\n  }\n\n  /**\n   * Synchronous `for of` iteration.\n   *\n   * The iteration will terminate when the internal buffer runs out, even\n   * if the stream has not yet terminated.\n   */\n  [Symbol.iterator](): Generator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = (): IteratorReturnResult => {\n      this.pause()\n      this.off(ERROR, stop)\n      this.off(DESTROYED, stop)\n      this.off('end', stop)\n      stopped = true\n      return { done: true, value: undefined }\n    }\n\n    const next = (): IteratorResult => {\n      if (stopped) return stop()\n      const value = this.read()\n      return value === null ? stop() : { done: false, value }\n    }\n\n    this.once('end', stop)\n    this.once(ERROR, stop)\n    this.once(DESTROYED, stop)\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.iterator]() {\n        return this\n      },\n    }\n  }\n\n  /**\n   * Destroy a stream, preventing it from being used for any further purpose.\n   *\n   * If the stream has a `close()` method, then it will be called on\n   * destruction.\n   *\n   * After destruction, any attempt to write data, read data, or emit most\n   * events will be ignored.\n   *\n   * If an error argument is provided, then it will be emitted in an\n   * 'error' event.\n   */\n  destroy(er?: unknown) {\n    if (this[DESTROYED]) {\n      if (er) this.emit('error', er)\n      else this.emit(DESTROYED)\n      return this\n    }\n\n    this[DESTROYED] = true\n    this[DISCARDED] = true\n\n    // throw away all buffered data, it's never coming out\n    this[BUFFER].length = 0\n    this[BUFFERLENGTH] = 0\n\n    const wc = this as Minipass & {\n      close?: () => void\n    }\n    if (typeof wc.close === 'function' && !this[CLOSED]) wc.close()\n\n    if (er) this.emit('error', er)\n    // if no error to emit, still reject pending promises\n    else this.emit(DESTROYED)\n\n    return this\n  }\n\n  /**\n   * Alias for {@link isStream}\n   *\n   * Former export location, maintained for backwards compatibility.\n   *\n   * @deprecated\n   */\n  static get isStream() {\n    return isStream\n  }\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..5bbefffbabee392d1855491b84dc0a716b6a3bf2
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/commonjs/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "commonjs"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6dbfbcf99c5495c67791e32e62cd151c4170b573
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts
@@ -0,0 +1,549 @@
+/// 
+/// 
+/// 
+/// 
+import { EventEmitter } from 'node:events';
+import { StringDecoder } from 'node:string_decoder';
+/**
+ * Same as StringDecoder, but exposing the `lastNeed` flag on the type
+ */
+type SD = StringDecoder & {
+    lastNeed: boolean;
+};
+export type { SD, Pipe, PipeProxyErrors };
+/**
+ * Return true if the argument is a Minipass stream, Node stream, or something
+ * else that Minipass can interact with.
+ */
+export declare const isStream: (s: any) => s is NodeJS.WriteStream | NodeJS.ReadStream | Minipass | (NodeJS.ReadStream & {
+    fd: number;
+}) | (EventEmitter & {
+    pause(): any;
+    resume(): any;
+    pipe(...destArgs: any[]): any;
+}) | (NodeJS.WriteStream & {
+    fd: number;
+}) | (EventEmitter & {
+    end(): any;
+    write(chunk: any, ...args: any[]): any;
+});
+/**
+ * Return true if the argument is a valid {@link Minipass.Readable}
+ */
+export declare const isReadable: (s: any) => s is Minipass.Readable;
+/**
+ * Return true if the argument is a valid {@link Minipass.Writable}
+ */
+export declare const isWritable: (s: any) => s is Minipass.Readable;
+declare const EOF: unique symbol;
+declare const MAYBE_EMIT_END: unique symbol;
+declare const EMITTED_END: unique symbol;
+declare const EMITTING_END: unique symbol;
+declare const EMITTED_ERROR: unique symbol;
+declare const CLOSED: unique symbol;
+declare const READ: unique symbol;
+declare const FLUSH: unique symbol;
+declare const FLUSHCHUNK: unique symbol;
+declare const ENCODING: unique symbol;
+declare const DECODER: unique symbol;
+declare const FLOWING: unique symbol;
+declare const PAUSED: unique symbol;
+declare const RESUME: unique symbol;
+declare const BUFFER: unique symbol;
+declare const PIPES: unique symbol;
+declare const BUFFERLENGTH: unique symbol;
+declare const BUFFERPUSH: unique symbol;
+declare const BUFFERSHIFT: unique symbol;
+declare const OBJECTMODE: unique symbol;
+declare const DESTROYED: unique symbol;
+declare const ERROR: unique symbol;
+declare const EMITDATA: unique symbol;
+declare const EMITEND: unique symbol;
+declare const EMITEND2: unique symbol;
+declare const ASYNC: unique symbol;
+declare const ABORT: unique symbol;
+declare const ABORTED: unique symbol;
+declare const SIGNAL: unique symbol;
+declare const DATALISTENERS: unique symbol;
+declare const DISCARDED: unique symbol;
+/**
+ * Options that may be passed to stream.pipe()
+ */
+export interface PipeOptions {
+    /**
+     * end the destination stream when the source stream ends
+     */
+    end?: boolean;
+    /**
+     * proxy errors from the source stream to the destination stream
+     */
+    proxyErrors?: boolean;
+}
+/**
+ * Internal class representing a pipe to a destination stream.
+ *
+ * @internal
+ */
+declare class Pipe {
+    src: Minipass;
+    dest: Minipass;
+    opts: PipeOptions;
+    ondrain: () => any;
+    constructor(src: Minipass, dest: Minipass.Writable, opts: PipeOptions);
+    unpipe(): void;
+    proxyErrors(_er: any): void;
+    end(): void;
+}
+/**
+ * Internal class representing a pipe to a destination stream where
+ * errors are proxied.
+ *
+ * @internal
+ */
+declare class PipeProxyErrors extends Pipe {
+    unpipe(): void;
+    constructor(src: Minipass, dest: Minipass.Writable, opts: PipeOptions);
+}
+export declare namespace Minipass {
+    /**
+     * Encoding used to create a stream that outputs strings rather than
+     * Buffer objects.
+     */
+    export type Encoding = BufferEncoding | 'buffer' | null;
+    /**
+     * Any stream that Minipass can pipe into
+     */
+    export type Writable = Minipass | NodeJS.WriteStream | (NodeJS.WriteStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        end(): any;
+        write(chunk: any, ...args: any[]): any;
+    });
+    /**
+     * Any stream that can be read from
+     */
+    export type Readable = Minipass | NodeJS.ReadStream | (NodeJS.ReadStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        pause(): any;
+        resume(): any;
+        pipe(...destArgs: any[]): any;
+    });
+    /**
+     * Utility type that can be iterated sync or async
+     */
+    export type DualIterable = Iterable & AsyncIterable;
+    type EventArguments = Record;
+    /**
+     * The listing of events that a Minipass class can emit.
+     * Extend this when extending the Minipass class, and pass as
+     * the third template argument.  The key is the name of the event,
+     * and the value is the argument list.
+     *
+     * Any undeclared events will still be allowed, but the handler will get
+     * arguments as `unknown[]`.
+     */
+    export interface Events extends EventArguments {
+        readable: [];
+        data: [chunk: RType];
+        error: [er: unknown];
+        abort: [reason: unknown];
+        drain: [];
+        resume: [];
+        end: [];
+        finish: [];
+        prefinish: [];
+        close: [];
+        [DESTROYED]: [er?: unknown];
+        [ERROR]: [er: unknown];
+    }
+    /**
+     * String or buffer-like data that can be joined and sliced
+     */
+    export type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string;
+    export type BufferOrString = Buffer | string;
+    /**
+     * Options passed to the Minipass constructor.
+     */
+    export type SharedOptions = {
+        /**
+         * Defer all data emission and other events until the end of the
+         * current tick, similar to Node core streams
+         */
+        async?: boolean;
+        /**
+         * A signal which will abort the stream
+         */
+        signal?: AbortSignal;
+        /**
+         * Output string encoding. Set to `null` or `'buffer'` (or omit) to
+         * emit Buffer objects rather than strings.
+         *
+         * Conflicts with `objectMode`
+         */
+        encoding?: BufferEncoding | null | 'buffer';
+        /**
+         * Output data exactly as it was written, supporting non-buffer/string
+         * data (such as arbitrary objects, falsey values, etc.)
+         *
+         * Conflicts with `encoding`
+         */
+        objectMode?: boolean;
+    };
+    /**
+     * Options for a string encoded output
+     */
+    export type EncodingOptions = SharedOptions & {
+        encoding: BufferEncoding;
+        objectMode?: false;
+    };
+    /**
+     * Options for contiguous data buffer output
+     */
+    export type BufferOptions = SharedOptions & {
+        encoding?: null | 'buffer';
+        objectMode?: false;
+    };
+    /**
+     * Options for objectMode arbitrary output
+     */
+    export type ObjectModeOptions = SharedOptions & {
+        objectMode: true;
+        encoding?: null;
+    };
+    /**
+     * Utility type to determine allowed options based on read type
+     */
+    export type Options = ObjectModeOptions | (T extends string ? EncodingOptions : T extends Buffer ? BufferOptions : SharedOptions);
+    export {};
+}
+/**
+ * Main export, the Minipass class
+ *
+ * `RType` is the type of data emitted, defaults to Buffer
+ *
+ * `WType` is the type of data to be written, if RType is buffer or string,
+ * then any {@link Minipass.ContiguousData} is allowed.
+ *
+ * `Events` is the set of event handler signatures that this object
+ * will emit, see {@link Minipass.Events}
+ */
+export declare class Minipass = Minipass.Events> extends EventEmitter implements Minipass.DualIterable {
+    [FLOWING]: boolean;
+    [PAUSED]: boolean;
+    [PIPES]: Pipe[];
+    [BUFFER]: RType[];
+    [OBJECTMODE]: boolean;
+    [ENCODING]: BufferEncoding | null;
+    [ASYNC]: boolean;
+    [DECODER]: SD | null;
+    [EOF]: boolean;
+    [EMITTED_END]: boolean;
+    [EMITTING_END]: boolean;
+    [CLOSED]: boolean;
+    [EMITTED_ERROR]: unknown;
+    [BUFFERLENGTH]: number;
+    [DESTROYED]: boolean;
+    [SIGNAL]?: AbortSignal;
+    [ABORTED]: boolean;
+    [DATALISTENERS]: number;
+    [DISCARDED]: boolean;
+    /**
+     * true if the stream can be written
+     */
+    writable: boolean;
+    /**
+     * true if the stream can be read
+     */
+    readable: boolean;
+    /**
+     * If `RType` is Buffer, then options do not need to be provided.
+     * Otherwise, an options object must be provided to specify either
+     * {@link Minipass.SharedOptions.objectMode} or
+     * {@link Minipass.SharedOptions.encoding}, as appropriate.
+     */
+    constructor(...args: [Minipass.ObjectModeOptions] | (RType extends Buffer ? [] | [Minipass.Options] : [Minipass.Options]));
+    /**
+     * The amount of data stored in the buffer waiting to be read.
+     *
+     * For Buffer strings, this will be the total byte length.
+     * For string encoding streams, this will be the string character length,
+     * according to JavaScript's `string.length` logic.
+     * For objectMode streams, this is a count of the items waiting to be
+     * emitted.
+     */
+    get bufferLength(): number;
+    /**
+     * The `BufferEncoding` currently in use, or `null`
+     */
+    get encoding(): BufferEncoding | null;
+    /**
+     * @deprecated - This is a read only property
+     */
+    set encoding(_enc: BufferEncoding | null);
+    /**
+     * @deprecated - Encoding may only be set at instantiation time
+     */
+    setEncoding(_enc: Minipass.Encoding): void;
+    /**
+     * True if this is an objectMode stream
+     */
+    get objectMode(): boolean;
+    /**
+     * @deprecated - This is a read-only property
+     */
+    set objectMode(_om: boolean);
+    /**
+     * true if this is an async stream
+     */
+    get ['async'](): boolean;
+    /**
+     * Set to true to make this stream async.
+     *
+     * Once set, it cannot be unset, as this would potentially cause incorrect
+     * behavior.  Ie, a sync stream can be made async, but an async stream
+     * cannot be safely made sync.
+     */
+    set ['async'](a: boolean);
+    [ABORT](): void;
+    /**
+     * True if the stream has been aborted.
+     */
+    get aborted(): boolean;
+    /**
+     * No-op setter. Stream aborted status is set via the AbortSignal provided
+     * in the constructor options.
+     */
+    set aborted(_: boolean);
+    /**
+     * Write data into the stream
+     *
+     * If the chunk written is a string, and encoding is not specified, then
+     * `utf8` will be assumed. If the stream encoding matches the encoding of
+     * a written string, and the state of the string decoder allows it, then
+     * the string will be passed through to either the output or the internal
+     * buffer without any processing. Otherwise, it will be turned into a
+     * Buffer object for processing into the desired encoding.
+     *
+     * If provided, `cb` function is called immediately before return for
+     * sync streams, or on next tick for async streams, because for this
+     * base class, a chunk is considered "processed" once it is accepted
+     * and either emitted or buffered. That is, the callback does not indicate
+     * that the chunk has been eventually emitted, though of course child
+     * classes can override this function to do whatever processing is required
+     * and call `super.write(...)` only once processing is completed.
+     */
+    write(chunk: WType, cb?: () => void): boolean;
+    write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean;
+    /**
+     * Low-level explicit read method.
+     *
+     * In objectMode, the argument is ignored, and one item is returned if
+     * available.
+     *
+     * `n` is the number of bytes (or in the case of encoding streams,
+     * characters) to consume. If `n` is not provided, then the entire buffer
+     * is returned, or `null` is returned if no data is available.
+     *
+     * If `n` is greater that the amount of data in the internal buffer,
+     * then `null` is returned.
+     */
+    read(n?: number | null): RType | null;
+    [READ](n: number | null, chunk: RType): RType;
+    /**
+     * End the stream, optionally providing a final write.
+     *
+     * See {@link Minipass#write} for argument descriptions
+     */
+    end(cb?: () => void): this;
+    end(chunk: WType, cb?: () => void): this;
+    end(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): this;
+    [RESUME](): void;
+    /**
+     * Resume the stream if it is currently in a paused state
+     *
+     * If called when there are no pipe destinations or `data` event listeners,
+     * this will place the stream in a "discarded" state, where all data will
+     * be thrown away. The discarded state is removed if a pipe destination or
+     * data handler is added, if pause() is called, or if any synchronous or
+     * asynchronous iteration is started.
+     */
+    resume(): void;
+    /**
+     * Pause the stream
+     */
+    pause(): void;
+    /**
+     * true if the stream has been forcibly destroyed
+     */
+    get destroyed(): boolean;
+    /**
+     * true if the stream is currently in a flowing state, meaning that
+     * any writes will be immediately emitted.
+     */
+    get flowing(): boolean;
+    /**
+     * true if the stream is currently in a paused state
+     */
+    get paused(): boolean;
+    [BUFFERPUSH](chunk: RType): void;
+    [BUFFERSHIFT](): RType;
+    [FLUSH](noDrain?: boolean): void;
+    [FLUSHCHUNK](chunk: RType): boolean;
+    /**
+     * Pipe all data emitted by this stream into the destination provided.
+     *
+     * Triggers the flow of data.
+     */
+    pipe(dest: W, opts?: PipeOptions): W;
+    /**
+     * Fully unhook a piped destination stream.
+     *
+     * If the destination stream was the only consumer of this stream (ie,
+     * there are no other piped destinations or `'data'` event listeners)
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    unpipe(dest: W): void;
+    /**
+     * Alias for {@link Minipass#on}
+     */
+    addListener(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.on`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * - Adding a 'data' event handler will trigger the flow of data
+     *
+     * - Adding a 'readable' event handler when there is data waiting to be read
+     *   will cause 'readable' to be emitted immediately.
+     *
+     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
+     *   already passed will cause the event to be emitted immediately and all
+     *   handlers removed.
+     *
+     * - Adding an 'error' event handler after an error has been emitted will
+     *   cause the event to be re-emitted immediately with the error previously
+     *   raised.
+     */
+    on(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Alias for {@link Minipass#off}
+     */
+    removeListener(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.off`
+     *
+     * If a 'data' event handler is removed, and it was the last consumer
+     * (ie, there are no pipe destinations or other 'data' event listeners),
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    off(ev: Event, handler: (...args: Events[Event]) => any): this;
+    /**
+     * Mostly identical to `EventEmitter.removeAllListeners`
+     *
+     * If all 'data' event handlers are removed, and they were the last consumer
+     * (ie, there are no pipe destinations), then the flow of data will stop
+     * until there is another consumer or {@link Minipass#resume} is explicitly
+     * called.
+     */
+    removeAllListeners(ev?: Event): this;
+    /**
+     * true if the 'end' event has been emitted
+     */
+    get emittedEnd(): boolean;
+    [MAYBE_EMIT_END](): void;
+    /**
+     * Mostly identical to `EventEmitter.emit`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * If the stream has been destroyed, and the event is something other
+     * than 'close' or 'error', then `false` is returned and no handlers
+     * are called.
+     *
+     * If the event is 'end', and has already been emitted, then the event
+     * is ignored. If the stream is in a paused or non-flowing state, then
+     * the event will be deferred until data flow resumes. If the stream is
+     * async, then handlers will be called on the next tick rather than
+     * immediately.
+     *
+     * If the event is 'close', and 'end' has not yet been emitted, then
+     * the event will be deferred until after 'end' is emitted.
+     *
+     * If the event is 'error', and an AbortSignal was provided for the stream,
+     * and there are no listeners, then the event is ignored, matching the
+     * behavior of node core streams in the presense of an AbortSignal.
+     *
+     * If the event is 'finish' or 'prefinish', then all listeners will be
+     * removed after emitting the event, to prevent double-firing.
+     */
+    emit(ev: Event, ...args: Events[Event]): boolean;
+    [EMITDATA](data: RType): boolean;
+    [EMITEND](): boolean;
+    [EMITEND2](): boolean;
+    /**
+     * Return a Promise that resolves to an array of all emitted data once
+     * the stream ends.
+     */
+    collect(): Promise;
+    /**
+     * Return a Promise that resolves to the concatenation of all emitted data
+     * once the stream ends.
+     *
+     * Not allowed on objectMode streams.
+     */
+    concat(): Promise;
+    /**
+     * Return a void Promise that resolves once the stream ends.
+     */
+    promise(): Promise;
+    /**
+     * Asynchronous `for await of` iteration.
+     *
+     * This will continue emitting all chunks until the stream terminates.
+     */
+    [Symbol.asyncIterator](): AsyncGenerator;
+    /**
+     * Synchronous `for of` iteration.
+     *
+     * The iteration will terminate when the internal buffer runs out, even
+     * if the stream has not yet terminated.
+     */
+    [Symbol.iterator](): Generator;
+    /**
+     * Destroy a stream, preventing it from being used for any further purpose.
+     *
+     * If the stream has a `close()` method, then it will be called on
+     * destruction.
+     *
+     * After destruction, any attempt to write data, read data, or emit most
+     * events will be ignored.
+     *
+     * If an error argument is provided, then it will be emitted in an
+     * 'error' event.
+     */
+    destroy(er?: unknown): this;
+    /**
+     * Alias for {@link isStream}
+     *
+     * Former export location, maintained for backwards compatibility.
+     *
+     * @deprecated
+     */
+    static get isStream(): (s: any) => s is NodeJS.WriteStream | NodeJS.ReadStream | Minipass | (NodeJS.ReadStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        pause(): any;
+        resume(): any;
+        pipe(...destArgs: any[]): any;
+    }) | (NodeJS.WriteStream & {
+        fd: number;
+    }) | (EventEmitter & {
+        end(): any;
+        write(chunk: any, ...args: any[]): any;
+    });
+}
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts.map
new file mode 100644
index 0000000000000000000000000000000000000000..cac7e00a773090d5258ac8958ef3fc3d5339a078
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;GAEG;AACH,KAAK,EAAE,GAAG,aAAa,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/C,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,QAAQ,MAChB,GAAG;QAoLyB,M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C,EAAE,OAAO;IA0BpB;;;;;;OAMG;IACH,MAAM,KAAK,QAAQ;;;;;;;;;;;OAElB;CACF"}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..b5fa4513c90838699f7138207183d99ef000f926
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js
@@ -0,0 +1,1018 @@
+const proc = typeof process === 'object' && process
+    ? process
+    : {
+        stdout: null,
+        stderr: null,
+    };
+import { EventEmitter } from 'node:events';
+import Stream from 'node:stream';
+import { StringDecoder } from 'node:string_decoder';
+/**
+ * Return true if the argument is a Minipass stream, Node stream, or something
+ * else that Minipass can interact with.
+ */
+export const isStream = (s) => !!s &&
+    typeof s === 'object' &&
+    (s instanceof Minipass ||
+        s instanceof Stream ||
+        isReadable(s) ||
+        isWritable(s));
+/**
+ * Return true if the argument is a valid {@link Minipass.Readable}
+ */
+export const isReadable = (s) => !!s &&
+    typeof s === 'object' &&
+    s instanceof EventEmitter &&
+    typeof s.pipe === 'function' &&
+    // node core Writable streams have a pipe() method, but it throws
+    s.pipe !== Stream.Writable.prototype.pipe;
+/**
+ * Return true if the argument is a valid {@link Minipass.Writable}
+ */
+export const isWritable = (s) => !!s &&
+    typeof s === 'object' &&
+    s instanceof EventEmitter &&
+    typeof s.write === 'function' &&
+    typeof s.end === 'function';
+const EOF = Symbol('EOF');
+const MAYBE_EMIT_END = Symbol('maybeEmitEnd');
+const EMITTED_END = Symbol('emittedEnd');
+const EMITTING_END = Symbol('emittingEnd');
+const EMITTED_ERROR = Symbol('emittedError');
+const CLOSED = Symbol('closed');
+const READ = Symbol('read');
+const FLUSH = Symbol('flush');
+const FLUSHCHUNK = Symbol('flushChunk');
+const ENCODING = Symbol('encoding');
+const DECODER = Symbol('decoder');
+const FLOWING = Symbol('flowing');
+const PAUSED = Symbol('paused');
+const RESUME = Symbol('resume');
+const BUFFER = Symbol('buffer');
+const PIPES = Symbol('pipes');
+const BUFFERLENGTH = Symbol('bufferLength');
+const BUFFERPUSH = Symbol('bufferPush');
+const BUFFERSHIFT = Symbol('bufferShift');
+const OBJECTMODE = Symbol('objectMode');
+// internal event when stream is destroyed
+const DESTROYED = Symbol('destroyed');
+// internal event when stream has an error
+const ERROR = Symbol('error');
+const EMITDATA = Symbol('emitData');
+const EMITEND = Symbol('emitEnd');
+const EMITEND2 = Symbol('emitEnd2');
+const ASYNC = Symbol('async');
+const ABORT = Symbol('abort');
+const ABORTED = Symbol('aborted');
+const SIGNAL = Symbol('signal');
+const DATALISTENERS = Symbol('dataListeners');
+const DISCARDED = Symbol('discarded');
+const defer = (fn) => Promise.resolve().then(fn);
+const nodefer = (fn) => fn();
+const isEndish = (ev) => ev === 'end' || ev === 'finish' || ev === 'prefinish';
+const isArrayBufferLike = (b) => b instanceof ArrayBuffer ||
+    (!!b &&
+        typeof b === 'object' &&
+        b.constructor &&
+        b.constructor.name === 'ArrayBuffer' &&
+        b.byteLength >= 0);
+const isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
+/**
+ * Internal class representing a pipe to a destination stream.
+ *
+ * @internal
+ */
+class Pipe {
+    src;
+    dest;
+    opts;
+    ondrain;
+    constructor(src, dest, opts) {
+        this.src = src;
+        this.dest = dest;
+        this.opts = opts;
+        this.ondrain = () => src[RESUME]();
+        this.dest.on('drain', this.ondrain);
+    }
+    unpipe() {
+        this.dest.removeListener('drain', this.ondrain);
+    }
+    // only here for the prototype
+    /* c8 ignore start */
+    proxyErrors(_er) { }
+    /* c8 ignore stop */
+    end() {
+        this.unpipe();
+        if (this.opts.end)
+            this.dest.end();
+    }
+}
+/**
+ * Internal class representing a pipe to a destination stream where
+ * errors are proxied.
+ *
+ * @internal
+ */
+class PipeProxyErrors extends Pipe {
+    unpipe() {
+        this.src.removeListener('error', this.proxyErrors);
+        super.unpipe();
+    }
+    constructor(src, dest, opts) {
+        super(src, dest, opts);
+        this.proxyErrors = er => dest.emit('error', er);
+        src.on('error', this.proxyErrors);
+    }
+}
+const isObjectModeOptions = (o) => !!o.objectMode;
+const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== 'buffer';
+/**
+ * Main export, the Minipass class
+ *
+ * `RType` is the type of data emitted, defaults to Buffer
+ *
+ * `WType` is the type of data to be written, if RType is buffer or string,
+ * then any {@link Minipass.ContiguousData} is allowed.
+ *
+ * `Events` is the set of event handler signatures that this object
+ * will emit, see {@link Minipass.Events}
+ */
+export class Minipass extends EventEmitter {
+    [FLOWING] = false;
+    [PAUSED] = false;
+    [PIPES] = [];
+    [BUFFER] = [];
+    [OBJECTMODE];
+    [ENCODING];
+    [ASYNC];
+    [DECODER];
+    [EOF] = false;
+    [EMITTED_END] = false;
+    [EMITTING_END] = false;
+    [CLOSED] = false;
+    [EMITTED_ERROR] = null;
+    [BUFFERLENGTH] = 0;
+    [DESTROYED] = false;
+    [SIGNAL];
+    [ABORTED] = false;
+    [DATALISTENERS] = 0;
+    [DISCARDED] = false;
+    /**
+     * true if the stream can be written
+     */
+    writable = true;
+    /**
+     * true if the stream can be read
+     */
+    readable = true;
+    /**
+     * If `RType` is Buffer, then options do not need to be provided.
+     * Otherwise, an options object must be provided to specify either
+     * {@link Minipass.SharedOptions.objectMode} or
+     * {@link Minipass.SharedOptions.encoding}, as appropriate.
+     */
+    constructor(...args) {
+        const options = (args[0] ||
+            {});
+        super();
+        if (options.objectMode && typeof options.encoding === 'string') {
+            throw new TypeError('Encoding and objectMode may not be used together');
+        }
+        if (isObjectModeOptions(options)) {
+            this[OBJECTMODE] = true;
+            this[ENCODING] = null;
+        }
+        else if (isEncodingOptions(options)) {
+            this[ENCODING] = options.encoding;
+            this[OBJECTMODE] = false;
+        }
+        else {
+            this[OBJECTMODE] = false;
+            this[ENCODING] = null;
+        }
+        this[ASYNC] = !!options.async;
+        this[DECODER] = this[ENCODING]
+            ? new StringDecoder(this[ENCODING])
+            : null;
+        //@ts-ignore - private option for debugging and testing
+        if (options && options.debugExposeBuffer === true) {
+            Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] });
+        }
+        //@ts-ignore - private option for debugging and testing
+        if (options && options.debugExposePipes === true) {
+            Object.defineProperty(this, 'pipes', { get: () => this[PIPES] });
+        }
+        const { signal } = options;
+        if (signal) {
+            this[SIGNAL] = signal;
+            if (signal.aborted) {
+                this[ABORT]();
+            }
+            else {
+                signal.addEventListener('abort', () => this[ABORT]());
+            }
+        }
+    }
+    /**
+     * The amount of data stored in the buffer waiting to be read.
+     *
+     * For Buffer strings, this will be the total byte length.
+     * For string encoding streams, this will be the string character length,
+     * according to JavaScript's `string.length` logic.
+     * For objectMode streams, this is a count of the items waiting to be
+     * emitted.
+     */
+    get bufferLength() {
+        return this[BUFFERLENGTH];
+    }
+    /**
+     * The `BufferEncoding` currently in use, or `null`
+     */
+    get encoding() {
+        return this[ENCODING];
+    }
+    /**
+     * @deprecated - This is a read only property
+     */
+    set encoding(_enc) {
+        throw new Error('Encoding must be set at instantiation time');
+    }
+    /**
+     * @deprecated - Encoding may only be set at instantiation time
+     */
+    setEncoding(_enc) {
+        throw new Error('Encoding must be set at instantiation time');
+    }
+    /**
+     * True if this is an objectMode stream
+     */
+    get objectMode() {
+        return this[OBJECTMODE];
+    }
+    /**
+     * @deprecated - This is a read-only property
+     */
+    set objectMode(_om) {
+        throw new Error('objectMode must be set at instantiation time');
+    }
+    /**
+     * true if this is an async stream
+     */
+    get ['async']() {
+        return this[ASYNC];
+    }
+    /**
+     * Set to true to make this stream async.
+     *
+     * Once set, it cannot be unset, as this would potentially cause incorrect
+     * behavior.  Ie, a sync stream can be made async, but an async stream
+     * cannot be safely made sync.
+     */
+    set ['async'](a) {
+        this[ASYNC] = this[ASYNC] || !!a;
+    }
+    // drop everything and get out of the flow completely
+    [ABORT]() {
+        this[ABORTED] = true;
+        this.emit('abort', this[SIGNAL]?.reason);
+        this.destroy(this[SIGNAL]?.reason);
+    }
+    /**
+     * True if the stream has been aborted.
+     */
+    get aborted() {
+        return this[ABORTED];
+    }
+    /**
+     * No-op setter. Stream aborted status is set via the AbortSignal provided
+     * in the constructor options.
+     */
+    set aborted(_) { }
+    write(chunk, encoding, cb) {
+        if (this[ABORTED])
+            return false;
+        if (this[EOF])
+            throw new Error('write after end');
+        if (this[DESTROYED]) {
+            this.emit('error', Object.assign(new Error('Cannot call write after a stream was destroyed'), { code: 'ERR_STREAM_DESTROYED' }));
+            return true;
+        }
+        if (typeof encoding === 'function') {
+            cb = encoding;
+            encoding = 'utf8';
+        }
+        if (!encoding)
+            encoding = 'utf8';
+        const fn = this[ASYNC] ? defer : nodefer;
+        // convert array buffers and typed array views into buffers
+        // at some point in the future, we may want to do the opposite!
+        // leave strings and buffers as-is
+        // anything is only allowed if in object mode, so throw
+        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
+            if (isArrayBufferView(chunk)) {
+                //@ts-ignore - sinful unsafe type changing
+                chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
+            }
+            else if (isArrayBufferLike(chunk)) {
+                //@ts-ignore - sinful unsafe type changing
+                chunk = Buffer.from(chunk);
+            }
+            else if (typeof chunk !== 'string') {
+                throw new Error('Non-contiguous data written to non-objectMode stream');
+            }
+        }
+        // handle object mode up front, since it's simpler
+        // this yields better performance, fewer checks later.
+        if (this[OBJECTMODE]) {
+            // maybe impossible?
+            /* c8 ignore start */
+            if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+                this[FLUSH](true);
+            /* c8 ignore stop */
+            if (this[FLOWING])
+                this.emit('data', chunk);
+            else
+                this[BUFFERPUSH](chunk);
+            if (this[BUFFERLENGTH] !== 0)
+                this.emit('readable');
+            if (cb)
+                fn(cb);
+            return this[FLOWING];
+        }
+        // at this point the chunk is a buffer or string
+        // don't buffer it up or send it to the decoder
+        if (!chunk.length) {
+            if (this[BUFFERLENGTH] !== 0)
+                this.emit('readable');
+            if (cb)
+                fn(cb);
+            return this[FLOWING];
+        }
+        // fast-path writing strings of same encoding to a stream with
+        // an empty buffer, skipping the buffer/decoder dance
+        if (typeof chunk === 'string' &&
+            // unless it is a string already ready for us to use
+            !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
+            //@ts-ignore - sinful unsafe type change
+            chunk = Buffer.from(chunk, encoding);
+        }
+        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
+            //@ts-ignore - sinful unsafe type change
+            chunk = this[DECODER].write(chunk);
+        }
+        // Note: flushing CAN potentially switch us into not-flowing mode
+        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+            this[FLUSH](true);
+        if (this[FLOWING])
+            this.emit('data', chunk);
+        else
+            this[BUFFERPUSH](chunk);
+        if (this[BUFFERLENGTH] !== 0)
+            this.emit('readable');
+        if (cb)
+            fn(cb);
+        return this[FLOWING];
+    }
+    /**
+     * Low-level explicit read method.
+     *
+     * In objectMode, the argument is ignored, and one item is returned if
+     * available.
+     *
+     * `n` is the number of bytes (or in the case of encoding streams,
+     * characters) to consume. If `n` is not provided, then the entire buffer
+     * is returned, or `null` is returned if no data is available.
+     *
+     * If `n` is greater that the amount of data in the internal buffer,
+     * then `null` is returned.
+     */
+    read(n) {
+        if (this[DESTROYED])
+            return null;
+        this[DISCARDED] = false;
+        if (this[BUFFERLENGTH] === 0 ||
+            n === 0 ||
+            (n && n > this[BUFFERLENGTH])) {
+            this[MAYBE_EMIT_END]();
+            return null;
+        }
+        if (this[OBJECTMODE])
+            n = null;
+        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
+            // not object mode, so if we have an encoding, then RType is string
+            // otherwise, must be Buffer
+            this[BUFFER] = [
+                (this[ENCODING]
+                    ? this[BUFFER].join('')
+                    : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])),
+            ];
+        }
+        const ret = this[READ](n || null, this[BUFFER][0]);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [READ](n, chunk) {
+        if (this[OBJECTMODE])
+            this[BUFFERSHIFT]();
+        else {
+            const c = chunk;
+            if (n === c.length || n === null)
+                this[BUFFERSHIFT]();
+            else if (typeof c === 'string') {
+                this[BUFFER][0] = c.slice(n);
+                chunk = c.slice(0, n);
+                this[BUFFERLENGTH] -= n;
+            }
+            else {
+                this[BUFFER][0] = c.subarray(n);
+                chunk = c.subarray(0, n);
+                this[BUFFERLENGTH] -= n;
+            }
+        }
+        this.emit('data', chunk);
+        if (!this[BUFFER].length && !this[EOF])
+            this.emit('drain');
+        return chunk;
+    }
+    end(chunk, encoding, cb) {
+        if (typeof chunk === 'function') {
+            cb = chunk;
+            chunk = undefined;
+        }
+        if (typeof encoding === 'function') {
+            cb = encoding;
+            encoding = 'utf8';
+        }
+        if (chunk !== undefined)
+            this.write(chunk, encoding);
+        if (cb)
+            this.once('end', cb);
+        this[EOF] = true;
+        this.writable = false;
+        // if we haven't written anything, then go ahead and emit,
+        // even if we're not reading.
+        // we'll re-emit if a new 'end' listener is added anyway.
+        // This makes MP more suitable to write-only use cases.
+        if (this[FLOWING] || !this[PAUSED])
+            this[MAYBE_EMIT_END]();
+        return this;
+    }
+    // don't let the internal resume be overwritten
+    [RESUME]() {
+        if (this[DESTROYED])
+            return;
+        if (!this[DATALISTENERS] && !this[PIPES].length) {
+            this[DISCARDED] = true;
+        }
+        this[PAUSED] = false;
+        this[FLOWING] = true;
+        this.emit('resume');
+        if (this[BUFFER].length)
+            this[FLUSH]();
+        else if (this[EOF])
+            this[MAYBE_EMIT_END]();
+        else
+            this.emit('drain');
+    }
+    /**
+     * Resume the stream if it is currently in a paused state
+     *
+     * If called when there are no pipe destinations or `data` event listeners,
+     * this will place the stream in a "discarded" state, where all data will
+     * be thrown away. The discarded state is removed if a pipe destination or
+     * data handler is added, if pause() is called, or if any synchronous or
+     * asynchronous iteration is started.
+     */
+    resume() {
+        return this[RESUME]();
+    }
+    /**
+     * Pause the stream
+     */
+    pause() {
+        this[FLOWING] = false;
+        this[PAUSED] = true;
+        this[DISCARDED] = false;
+    }
+    /**
+     * true if the stream has been forcibly destroyed
+     */
+    get destroyed() {
+        return this[DESTROYED];
+    }
+    /**
+     * true if the stream is currently in a flowing state, meaning that
+     * any writes will be immediately emitted.
+     */
+    get flowing() {
+        return this[FLOWING];
+    }
+    /**
+     * true if the stream is currently in a paused state
+     */
+    get paused() {
+        return this[PAUSED];
+    }
+    [BUFFERPUSH](chunk) {
+        if (this[OBJECTMODE])
+            this[BUFFERLENGTH] += 1;
+        else
+            this[BUFFERLENGTH] += chunk.length;
+        this[BUFFER].push(chunk);
+    }
+    [BUFFERSHIFT]() {
+        if (this[OBJECTMODE])
+            this[BUFFERLENGTH] -= 1;
+        else
+            this[BUFFERLENGTH] -= this[BUFFER][0].length;
+        return this[BUFFER].shift();
+    }
+    [FLUSH](noDrain = false) {
+        do { } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&
+            this[BUFFER].length);
+        if (!noDrain && !this[BUFFER].length && !this[EOF])
+            this.emit('drain');
+    }
+    [FLUSHCHUNK](chunk) {
+        this.emit('data', chunk);
+        return this[FLOWING];
+    }
+    /**
+     * Pipe all data emitted by this stream into the destination provided.
+     *
+     * Triggers the flow of data.
+     */
+    pipe(dest, opts) {
+        if (this[DESTROYED])
+            return dest;
+        this[DISCARDED] = false;
+        const ended = this[EMITTED_END];
+        opts = opts || {};
+        if (dest === proc.stdout || dest === proc.stderr)
+            opts.end = false;
+        else
+            opts.end = opts.end !== false;
+        opts.proxyErrors = !!opts.proxyErrors;
+        // piping an ended stream ends immediately
+        if (ended) {
+            if (opts.end)
+                dest.end();
+        }
+        else {
+            // "as" here just ignores the WType, which pipes don't care about,
+            // since they're only consuming from us, and writing to the dest
+            this[PIPES].push(!opts.proxyErrors
+                ? new Pipe(this, dest, opts)
+                : new PipeProxyErrors(this, dest, opts));
+            if (this[ASYNC])
+                defer(() => this[RESUME]());
+            else
+                this[RESUME]();
+        }
+        return dest;
+    }
+    /**
+     * Fully unhook a piped destination stream.
+     *
+     * If the destination stream was the only consumer of this stream (ie,
+     * there are no other piped destinations or `'data'` event listeners)
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    unpipe(dest) {
+        const p = this[PIPES].find(p => p.dest === dest);
+        if (p) {
+            if (this[PIPES].length === 1) {
+                if (this[FLOWING] && this[DATALISTENERS] === 0) {
+                    this[FLOWING] = false;
+                }
+                this[PIPES] = [];
+            }
+            else
+                this[PIPES].splice(this[PIPES].indexOf(p), 1);
+            p.unpipe();
+        }
+    }
+    /**
+     * Alias for {@link Minipass#on}
+     */
+    addListener(ev, handler) {
+        return this.on(ev, handler);
+    }
+    /**
+     * Mostly identical to `EventEmitter.on`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * - Adding a 'data' event handler will trigger the flow of data
+     *
+     * - Adding a 'readable' event handler when there is data waiting to be read
+     *   will cause 'readable' to be emitted immediately.
+     *
+     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
+     *   already passed will cause the event to be emitted immediately and all
+     *   handlers removed.
+     *
+     * - Adding an 'error' event handler after an error has been emitted will
+     *   cause the event to be re-emitted immediately with the error previously
+     *   raised.
+     */
+    on(ev, handler) {
+        const ret = super.on(ev, handler);
+        if (ev === 'data') {
+            this[DISCARDED] = false;
+            this[DATALISTENERS]++;
+            if (!this[PIPES].length && !this[FLOWING]) {
+                this[RESUME]();
+            }
+        }
+        else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {
+            super.emit('readable');
+        }
+        else if (isEndish(ev) && this[EMITTED_END]) {
+            super.emit(ev);
+            this.removeAllListeners(ev);
+        }
+        else if (ev === 'error' && this[EMITTED_ERROR]) {
+            const h = handler;
+            if (this[ASYNC])
+                defer(() => h.call(this, this[EMITTED_ERROR]));
+            else
+                h.call(this, this[EMITTED_ERROR]);
+        }
+        return ret;
+    }
+    /**
+     * Alias for {@link Minipass#off}
+     */
+    removeListener(ev, handler) {
+        return this.off(ev, handler);
+    }
+    /**
+     * Mostly identical to `EventEmitter.off`
+     *
+     * If a 'data' event handler is removed, and it was the last consumer
+     * (ie, there are no pipe destinations or other 'data' event listeners),
+     * then the flow of data will stop until there is another consumer or
+     * {@link Minipass#resume} is explicitly called.
+     */
+    off(ev, handler) {
+        const ret = super.off(ev, handler);
+        // if we previously had listeners, and now we don't, and we don't
+        // have any pipes, then stop the flow, unless it's been explicitly
+        // put in a discarded flowing state via stream.resume().
+        if (ev === 'data') {
+            this[DATALISTENERS] = this.listeners('data').length;
+            if (this[DATALISTENERS] === 0 &&
+                !this[DISCARDED] &&
+                !this[PIPES].length) {
+                this[FLOWING] = false;
+            }
+        }
+        return ret;
+    }
+    /**
+     * Mostly identical to `EventEmitter.removeAllListeners`
+     *
+     * If all 'data' event handlers are removed, and they were the last consumer
+     * (ie, there are no pipe destinations), then the flow of data will stop
+     * until there is another consumer or {@link Minipass#resume} is explicitly
+     * called.
+     */
+    removeAllListeners(ev) {
+        const ret = super.removeAllListeners(ev);
+        if (ev === 'data' || ev === undefined) {
+            this[DATALISTENERS] = 0;
+            if (!this[DISCARDED] && !this[PIPES].length) {
+                this[FLOWING] = false;
+            }
+        }
+        return ret;
+    }
+    /**
+     * true if the 'end' event has been emitted
+     */
+    get emittedEnd() {
+        return this[EMITTED_END];
+    }
+    [MAYBE_EMIT_END]() {
+        if (!this[EMITTING_END] &&
+            !this[EMITTED_END] &&
+            !this[DESTROYED] &&
+            this[BUFFER].length === 0 &&
+            this[EOF]) {
+            this[EMITTING_END] = true;
+            this.emit('end');
+            this.emit('prefinish');
+            this.emit('finish');
+            if (this[CLOSED])
+                this.emit('close');
+            this[EMITTING_END] = false;
+        }
+    }
+    /**
+     * Mostly identical to `EventEmitter.emit`, with the following
+     * behavior differences to prevent data loss and unnecessary hangs:
+     *
+     * If the stream has been destroyed, and the event is something other
+     * than 'close' or 'error', then `false` is returned and no handlers
+     * are called.
+     *
+     * If the event is 'end', and has already been emitted, then the event
+     * is ignored. If the stream is in a paused or non-flowing state, then
+     * the event will be deferred until data flow resumes. If the stream is
+     * async, then handlers will be called on the next tick rather than
+     * immediately.
+     *
+     * If the event is 'close', and 'end' has not yet been emitted, then
+     * the event will be deferred until after 'end' is emitted.
+     *
+     * If the event is 'error', and an AbortSignal was provided for the stream,
+     * and there are no listeners, then the event is ignored, matching the
+     * behavior of node core streams in the presense of an AbortSignal.
+     *
+     * If the event is 'finish' or 'prefinish', then all listeners will be
+     * removed after emitting the event, to prevent double-firing.
+     */
+    emit(ev, ...args) {
+        const data = args[0];
+        // error and close are only events allowed after calling destroy()
+        if (ev !== 'error' &&
+            ev !== 'close' &&
+            ev !== DESTROYED &&
+            this[DESTROYED]) {
+            return false;
+        }
+        else if (ev === 'data') {
+            return !this[OBJECTMODE] && !data
+                ? false
+                : this[ASYNC]
+                    ? (defer(() => this[EMITDATA](data)), true)
+                    : this[EMITDATA](data);
+        }
+        else if (ev === 'end') {
+            return this[EMITEND]();
+        }
+        else if (ev === 'close') {
+            this[CLOSED] = true;
+            // don't emit close before 'end' and 'finish'
+            if (!this[EMITTED_END] && !this[DESTROYED])
+                return false;
+            const ret = super.emit('close');
+            this.removeAllListeners('close');
+            return ret;
+        }
+        else if (ev === 'error') {
+            this[EMITTED_ERROR] = data;
+            super.emit(ERROR, data);
+            const ret = !this[SIGNAL] || this.listeners('error').length
+                ? super.emit('error', data)
+                : false;
+            this[MAYBE_EMIT_END]();
+            return ret;
+        }
+        else if (ev === 'resume') {
+            const ret = super.emit('resume');
+            this[MAYBE_EMIT_END]();
+            return ret;
+        }
+        else if (ev === 'finish' || ev === 'prefinish') {
+            const ret = super.emit(ev);
+            this.removeAllListeners(ev);
+            return ret;
+        }
+        // Some other unknown event
+        const ret = super.emit(ev, ...args);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [EMITDATA](data) {
+        for (const p of this[PIPES]) {
+            if (p.dest.write(data) === false)
+                this.pause();
+        }
+        const ret = this[DISCARDED] ? false : super.emit('data', data);
+        this[MAYBE_EMIT_END]();
+        return ret;
+    }
+    [EMITEND]() {
+        if (this[EMITTED_END])
+            return false;
+        this[EMITTED_END] = true;
+        this.readable = false;
+        return this[ASYNC]
+            ? (defer(() => this[EMITEND2]()), true)
+            : this[EMITEND2]();
+    }
+    [EMITEND2]() {
+        if (this[DECODER]) {
+            const data = this[DECODER].end();
+            if (data) {
+                for (const p of this[PIPES]) {
+                    p.dest.write(data);
+                }
+                if (!this[DISCARDED])
+                    super.emit('data', data);
+            }
+        }
+        for (const p of this[PIPES]) {
+            p.end();
+        }
+        const ret = super.emit('end');
+        this.removeAllListeners('end');
+        return ret;
+    }
+    /**
+     * Return a Promise that resolves to an array of all emitted data once
+     * the stream ends.
+     */
+    async collect() {
+        const buf = Object.assign([], {
+            dataLength: 0,
+        });
+        if (!this[OBJECTMODE])
+            buf.dataLength = 0;
+        // set the promise first, in case an error is raised
+        // by triggering the flow here.
+        const p = this.promise();
+        this.on('data', c => {
+            buf.push(c);
+            if (!this[OBJECTMODE])
+                buf.dataLength += c.length;
+        });
+        await p;
+        return buf;
+    }
+    /**
+     * Return a Promise that resolves to the concatenation of all emitted data
+     * once the stream ends.
+     *
+     * Not allowed on objectMode streams.
+     */
+    async concat() {
+        if (this[OBJECTMODE]) {
+            throw new Error('cannot concat in objectMode');
+        }
+        const buf = await this.collect();
+        return (this[ENCODING]
+            ? buf.join('')
+            : Buffer.concat(buf, buf.dataLength));
+    }
+    /**
+     * Return a void Promise that resolves once the stream ends.
+     */
+    async promise() {
+        return new Promise((resolve, reject) => {
+            this.on(DESTROYED, () => reject(new Error('stream destroyed')));
+            this.on('error', er => reject(er));
+            this.on('end', () => resolve());
+        });
+    }
+    /**
+     * Asynchronous `for await of` iteration.
+     *
+     * This will continue emitting all chunks until the stream terminates.
+     */
+    [Symbol.asyncIterator]() {
+        // set this up front, in case the consumer doesn't call next()
+        // right away.
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = async () => {
+            this.pause();
+            stopped = true;
+            return { value: undefined, done: true };
+        };
+        const next = () => {
+            if (stopped)
+                return stop();
+            const res = this.read();
+            if (res !== null)
+                return Promise.resolve({ done: false, value: res });
+            if (this[EOF])
+                return stop();
+            let resolve;
+            let reject;
+            const onerr = (er) => {
+                this.off('data', ondata);
+                this.off('end', onend);
+                this.off(DESTROYED, ondestroy);
+                stop();
+                reject(er);
+            };
+            const ondata = (value) => {
+                this.off('error', onerr);
+                this.off('end', onend);
+                this.off(DESTROYED, ondestroy);
+                this.pause();
+                resolve({ value, done: !!this[EOF] });
+            };
+            const onend = () => {
+                this.off('error', onerr);
+                this.off('data', ondata);
+                this.off(DESTROYED, ondestroy);
+                stop();
+                resolve({ done: true, value: undefined });
+            };
+            const ondestroy = () => onerr(new Error('stream destroyed'));
+            return new Promise((res, rej) => {
+                reject = rej;
+                resolve = res;
+                this.once(DESTROYED, ondestroy);
+                this.once('error', onerr);
+                this.once('end', onend);
+                this.once('data', ondata);
+            });
+        };
+        return {
+            next,
+            throw: stop,
+            return: stop,
+            [Symbol.asyncIterator]() {
+                return this;
+            },
+        };
+    }
+    /**
+     * Synchronous `for of` iteration.
+     *
+     * The iteration will terminate when the internal buffer runs out, even
+     * if the stream has not yet terminated.
+     */
+    [Symbol.iterator]() {
+        // set this up front, in case the consumer doesn't call next()
+        // right away.
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = () => {
+            this.pause();
+            this.off(ERROR, stop);
+            this.off(DESTROYED, stop);
+            this.off('end', stop);
+            stopped = true;
+            return { done: true, value: undefined };
+        };
+        const next = () => {
+            if (stopped)
+                return stop();
+            const value = this.read();
+            return value === null ? stop() : { done: false, value };
+        };
+        this.once('end', stop);
+        this.once(ERROR, stop);
+        this.once(DESTROYED, stop);
+        return {
+            next,
+            throw: stop,
+            return: stop,
+            [Symbol.iterator]() {
+                return this;
+            },
+        };
+    }
+    /**
+     * Destroy a stream, preventing it from being used for any further purpose.
+     *
+     * If the stream has a `close()` method, then it will be called on
+     * destruction.
+     *
+     * After destruction, any attempt to write data, read data, or emit most
+     * events will be ignored.
+     *
+     * If an error argument is provided, then it will be emitted in an
+     * 'error' event.
+     */
+    destroy(er) {
+        if (this[DESTROYED]) {
+            if (er)
+                this.emit('error', er);
+            else
+                this.emit(DESTROYED);
+            return this;
+        }
+        this[DESTROYED] = true;
+        this[DISCARDED] = true;
+        // throw away all buffered data, it's never coming out
+        this[BUFFER].length = 0;
+        this[BUFFERLENGTH] = 0;
+        const wc = this;
+        if (typeof wc.close === 'function' && !this[CLOSED])
+            wc.close();
+        if (er)
+            this.emit('error', er);
+        // if no error to emit, still reject pending promises
+        else
+            this.emit(DESTROYED);
+        return this;
+    }
+    /**
+     * Alias for {@link isStream}
+     *
+     * Former export location, maintained for backwards compatibility.
+     *
+     * @deprecated
+     */
+    static get isStream() {
+        return isStream;
+    }
+}
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..741425ae158cf905f9de9cea9c4894e5f049724d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO;IACpC,CAAC,CAAC,OAAO;IACT,CAAC,CAAC;QACE,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACb,CAAA;AACP,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AASnD;;;GAGG;AACH,MAAM,CAAC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AAY;QAClB,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACpB,IAAI,EAAE;gBAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;;gBACzB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACzB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;QAEtB,sDAAsD;QACtD,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAEtB,MAAM,EAAE,GAAG,IAEV,CAAA;QACD,IAAI,OAAO,EAAE,CAAC,KAAK,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,EAAE,CAAC,KAAK,EAAE,CAAA;QAE/D,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;QAC9B,qDAAqD;;YAChD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAEzB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;OAMG;IACH,MAAM,KAAK,QAAQ;QACjB,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["const proc =\n  typeof process === 'object' && process\n    ? process\n    : {\n        stdout: null,\n        stderr: null,\n      }\nimport { EventEmitter } from 'node:events'\nimport Stream from 'node:stream'\nimport { StringDecoder } from 'node:string_decoder'\n\n/**\n * Same as StringDecoder, but exposing the `lastNeed` flag on the type\n */\ntype SD = StringDecoder & { lastNeed: boolean }\n\nexport type { SD, Pipe, PipeProxyErrors }\n\n/**\n * Return true if the argument is a Minipass stream, Node stream, or something\n * else that Minipass can interact with.\n */\nexport const isStream = (\n  s: any\n): s is Minipass.Readable | Minipass.Writable =>\n  !!s &&\n  typeof s === 'object' &&\n  (s instanceof Minipass ||\n    s instanceof Stream ||\n    isReadable(s) ||\n    isWritable(s))\n\n/**\n * Return true if the argument is a valid {@link Minipass.Readable}\n */\nexport const isReadable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Readable).pipe === 'function' &&\n  // node core Writable streams have a pipe() method, but it throws\n  (s as Minipass.Readable).pipe !== Stream.Writable.prototype.pipe\n\n/**\n * Return true if the argument is a valid {@link Minipass.Writable}\n */\nexport const isWritable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Writable).write === 'function' &&\n  typeof (s as Minipass.Writable).end === 'function'\n\nconst EOF = Symbol('EOF')\nconst MAYBE_EMIT_END = Symbol('maybeEmitEnd')\nconst EMITTED_END = Symbol('emittedEnd')\nconst EMITTING_END = Symbol('emittingEnd')\nconst EMITTED_ERROR = Symbol('emittedError')\nconst CLOSED = Symbol('closed')\nconst READ = Symbol('read')\nconst FLUSH = Symbol('flush')\nconst FLUSHCHUNK = Symbol('flushChunk')\nconst ENCODING = Symbol('encoding')\nconst DECODER = Symbol('decoder')\nconst FLOWING = Symbol('flowing')\nconst PAUSED = Symbol('paused')\nconst RESUME = Symbol('resume')\nconst BUFFER = Symbol('buffer')\nconst PIPES = Symbol('pipes')\nconst BUFFERLENGTH = Symbol('bufferLength')\nconst BUFFERPUSH = Symbol('bufferPush')\nconst BUFFERSHIFT = Symbol('bufferShift')\nconst OBJECTMODE = Symbol('objectMode')\n// internal event when stream is destroyed\nconst DESTROYED = Symbol('destroyed')\n// internal event when stream has an error\nconst ERROR = Symbol('error')\nconst EMITDATA = Symbol('emitData')\nconst EMITEND = Symbol('emitEnd')\nconst EMITEND2 = Symbol('emitEnd2')\nconst ASYNC = Symbol('async')\nconst ABORT = Symbol('abort')\nconst ABORTED = Symbol('aborted')\nconst SIGNAL = Symbol('signal')\nconst DATALISTENERS = Symbol('dataListeners')\nconst DISCARDED = Symbol('discarded')\n\nconst defer = (fn: (...a: any[]) => any) => Promise.resolve().then(fn)\nconst nodefer = (fn: (...a: any[]) => any) => fn()\n\n// events that mean 'the stream is over'\n// these are treated specially, and re-emitted\n// if they are listened for after emitting.\ntype EndishEvent = 'end' | 'finish' | 'prefinish'\nconst isEndish = (ev: any): ev is EndishEvent =>\n  ev === 'end' || ev === 'finish' || ev === 'prefinish'\n\nconst isArrayBufferLike = (b: any): b is ArrayBufferLike =>\n  b instanceof ArrayBuffer ||\n  (!!b &&\n    typeof b === 'object' &&\n    b.constructor &&\n    b.constructor.name === 'ArrayBuffer' &&\n    b.byteLength >= 0)\n\nconst isArrayBufferView = (b: any): b is ArrayBufferView =>\n  !Buffer.isBuffer(b) && ArrayBuffer.isView(b)\n\n/**\n * Options that may be passed to stream.pipe()\n */\nexport interface PipeOptions {\n  /**\n   * end the destination stream when the source stream ends\n   */\n  end?: boolean\n  /**\n   * proxy errors from the source stream to the destination stream\n   */\n  proxyErrors?: boolean\n}\n\n/**\n * Internal class representing a pipe to a destination stream.\n *\n * @internal\n */\nclass Pipe {\n  src: Minipass\n  dest: Minipass\n  opts: PipeOptions\n  ondrain: () => any\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    this.src = src\n    this.dest = dest as Minipass\n    this.opts = opts\n    this.ondrain = () => src[RESUME]()\n    this.dest.on('drain', this.ondrain)\n  }\n  unpipe() {\n    this.dest.removeListener('drain', this.ondrain)\n  }\n  // only here for the prototype\n  /* c8 ignore start */\n  proxyErrors(_er: any) {}\n  /* c8 ignore stop */\n  end() {\n    this.unpipe()\n    if (this.opts.end) this.dest.end()\n  }\n}\n\n/**\n * Internal class representing a pipe to a destination stream where\n * errors are proxied.\n *\n * @internal\n */\nclass PipeProxyErrors extends Pipe {\n  unpipe() {\n    this.src.removeListener('error', this.proxyErrors)\n    super.unpipe()\n  }\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    super(src, dest, opts)\n    this.proxyErrors = er => dest.emit('error', er)\n    src.on('error', this.proxyErrors)\n  }\n}\n\nexport namespace Minipass {\n  /**\n   * Encoding used to create a stream that outputs strings rather than\n   * Buffer objects.\n   */\n  export type Encoding = BufferEncoding | 'buffer' | null\n\n  /**\n   * Any stream that Minipass can pipe into\n   */\n  export type Writable =\n    | Minipass\n    | NodeJS.WriteStream\n    | (NodeJS.WriteStream & { fd: number })\n    | (EventEmitter & {\n        end(): any\n        write(chunk: any, ...args: any[]): any\n      })\n\n  /**\n   * Any stream that can be read from\n   */\n  export type Readable =\n    | Minipass\n    | NodeJS.ReadStream\n    | (NodeJS.ReadStream & { fd: number })\n    | (EventEmitter & {\n        pause(): any\n        resume(): any\n        pipe(...destArgs: any[]): any\n      })\n\n  /**\n   * Utility type that can be iterated sync or async\n   */\n  export type DualIterable = Iterable & AsyncIterable\n\n  type EventArguments = Record\n\n  /**\n   * The listing of events that a Minipass class can emit.\n   * Extend this when extending the Minipass class, and pass as\n   * the third template argument.  The key is the name of the event,\n   * and the value is the argument list.\n   *\n   * Any undeclared events will still be allowed, but the handler will get\n   * arguments as `unknown[]`.\n   */\n  export interface Events\n    extends EventArguments {\n    readable: []\n    data: [chunk: RType]\n    error: [er: unknown]\n    abort: [reason: unknown]\n    drain: []\n    resume: []\n    end: []\n    finish: []\n    prefinish: []\n    close: []\n    [DESTROYED]: [er?: unknown]\n    [ERROR]: [er: unknown]\n  }\n\n  /**\n   * String or buffer-like data that can be joined and sliced\n   */\n  export type ContiguousData =\n    | Buffer\n    | ArrayBufferLike\n    | ArrayBufferView\n    | string\n  export type BufferOrString = Buffer | string\n\n  /**\n   * Options passed to the Minipass constructor.\n   */\n  export type SharedOptions = {\n    /**\n     * Defer all data emission and other events until the end of the\n     * current tick, similar to Node core streams\n     */\n    async?: boolean\n    /**\n     * A signal which will abort the stream\n     */\n    signal?: AbortSignal\n    /**\n     * Output string encoding. Set to `null` or `'buffer'` (or omit) to\n     * emit Buffer objects rather than strings.\n     *\n     * Conflicts with `objectMode`\n     */\n    encoding?: BufferEncoding | null | 'buffer'\n    /**\n     * Output data exactly as it was written, supporting non-buffer/string\n     * data (such as arbitrary objects, falsey values, etc.)\n     *\n     * Conflicts with `encoding`\n     */\n    objectMode?: boolean\n  }\n\n  /**\n   * Options for a string encoded output\n   */\n  export type EncodingOptions = SharedOptions & {\n    encoding: BufferEncoding\n    objectMode?: false\n  }\n\n  /**\n   * Options for contiguous data buffer output\n   */\n  export type BufferOptions = SharedOptions & {\n    encoding?: null | 'buffer'\n    objectMode?: false\n  }\n\n  /**\n   * Options for objectMode arbitrary output\n   */\n  export type ObjectModeOptions = SharedOptions & {\n    objectMode: true\n    encoding?: null\n  }\n\n  /**\n   * Utility type to determine allowed options based on read type\n   */\n  export type Options =\n    | ObjectModeOptions\n    | (T extends string\n        ? EncodingOptions\n        : T extends Buffer\n        ? BufferOptions\n        : SharedOptions)\n}\n\nconst isObjectModeOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.ObjectModeOptions => !!o.objectMode\n\nconst isEncodingOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.EncodingOptions =>\n  !o.objectMode && !!o.encoding && o.encoding !== 'buffer'\n\n/**\n * Main export, the Minipass class\n *\n * `RType` is the type of data emitted, defaults to Buffer\n *\n * `WType` is the type of data to be written, if RType is buffer or string,\n * then any {@link Minipass.ContiguousData} is allowed.\n *\n * `Events` is the set of event handler signatures that this object\n * will emit, see {@link Minipass.Events}\n */\nexport class Minipass<\n    RType extends unknown = Buffer,\n    WType extends unknown = RType extends Minipass.BufferOrString\n      ? Minipass.ContiguousData\n      : RType,\n    Events extends Minipass.Events = Minipass.Events\n  >\n  extends EventEmitter\n  implements Minipass.DualIterable\n{\n  [FLOWING]: boolean = false;\n  [PAUSED]: boolean = false;\n  [PIPES]: Pipe[] = [];\n  [BUFFER]: RType[] = [];\n  [OBJECTMODE]: boolean;\n  [ENCODING]: BufferEncoding | null;\n  [ASYNC]: boolean;\n  [DECODER]: SD | null;\n  [EOF]: boolean = false;\n  [EMITTED_END]: boolean = false;\n  [EMITTING_END]: boolean = false;\n  [CLOSED]: boolean = false;\n  [EMITTED_ERROR]: unknown = null;\n  [BUFFERLENGTH]: number = 0;\n  [DESTROYED]: boolean = false;\n  [SIGNAL]?: AbortSignal;\n  [ABORTED]: boolean = false;\n  [DATALISTENERS]: number = 0;\n  [DISCARDED]: boolean = false\n\n  /**\n   * true if the stream can be written\n   */\n  writable: boolean = true\n  /**\n   * true if the stream can be read\n   */\n  readable: boolean = true\n\n  /**\n   * If `RType` is Buffer, then options do not need to be provided.\n   * Otherwise, an options object must be provided to specify either\n   * {@link Minipass.SharedOptions.objectMode} or\n   * {@link Minipass.SharedOptions.encoding}, as appropriate.\n   */\n  constructor(\n    ...args:\n      | [Minipass.ObjectModeOptions]\n      | (RType extends Buffer\n          ? [] | [Minipass.Options]\n          : [Minipass.Options])\n  ) {\n    const options: Minipass.Options = (args[0] ||\n      {}) as Minipass.Options\n    super()\n    if (options.objectMode && typeof options.encoding === 'string') {\n      throw new TypeError(\n        'Encoding and objectMode may not be used together'\n      )\n    }\n    if (isObjectModeOptions(options)) {\n      this[OBJECTMODE] = true\n      this[ENCODING] = null\n    } else if (isEncodingOptions(options)) {\n      this[ENCODING] = options.encoding\n      this[OBJECTMODE] = false\n    } else {\n      this[OBJECTMODE] = false\n      this[ENCODING] = null\n    }\n    this[ASYNC] = !!options.async\n    this[DECODER] = this[ENCODING]\n      ? (new StringDecoder(this[ENCODING]) as SD)\n      : null\n\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposeBuffer === true) {\n      Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] })\n    }\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposePipes === true) {\n      Object.defineProperty(this, 'pipes', { get: () => this[PIPES] })\n    }\n\n    const { signal } = options\n    if (signal) {\n      this[SIGNAL] = signal\n      if (signal.aborted) {\n        this[ABORT]()\n      } else {\n        signal.addEventListener('abort', () => this[ABORT]())\n      }\n    }\n  }\n\n  /**\n   * The amount of data stored in the buffer waiting to be read.\n   *\n   * For Buffer strings, this will be the total byte length.\n   * For string encoding streams, this will be the string character length,\n   * according to JavaScript's `string.length` logic.\n   * For objectMode streams, this is a count of the items waiting to be\n   * emitted.\n   */\n  get bufferLength() {\n    return this[BUFFERLENGTH]\n  }\n\n  /**\n   * The `BufferEncoding` currently in use, or `null`\n   */\n  get encoding() {\n    return this[ENCODING]\n  }\n\n  /**\n   * @deprecated - This is a read only property\n   */\n  set encoding(_enc) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * @deprecated - Encoding may only be set at instantiation time\n   */\n  setEncoding(_enc: Minipass.Encoding) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * True if this is an objectMode stream\n   */\n  get objectMode() {\n    return this[OBJECTMODE]\n  }\n\n  /**\n   * @deprecated - This is a read-only property\n   */\n  set objectMode(_om) {\n    throw new Error('objectMode must be set at instantiation time')\n  }\n\n  /**\n   * true if this is an async stream\n   */\n  get ['async'](): boolean {\n    return this[ASYNC]\n  }\n  /**\n   * Set to true to make this stream async.\n   *\n   * Once set, it cannot be unset, as this would potentially cause incorrect\n   * behavior.  Ie, a sync stream can be made async, but an async stream\n   * cannot be safely made sync.\n   */\n  set ['async'](a: boolean) {\n    this[ASYNC] = this[ASYNC] || !!a\n  }\n\n  // drop everything and get out of the flow completely\n  [ABORT]() {\n    this[ABORTED] = true\n    this.emit('abort', this[SIGNAL]?.reason)\n    this.destroy(this[SIGNAL]?.reason)\n  }\n\n  /**\n   * True if the stream has been aborted.\n   */\n  get aborted() {\n    return this[ABORTED]\n  }\n  /**\n   * No-op setter. Stream aborted status is set via the AbortSignal provided\n   * in the constructor options.\n   */\n  set aborted(_) {}\n\n  /**\n   * Write data into the stream\n   *\n   * If the chunk written is a string, and encoding is not specified, then\n   * `utf8` will be assumed. If the stream encoding matches the encoding of\n   * a written string, and the state of the string decoder allows it, then\n   * the string will be passed through to either the output or the internal\n   * buffer without any processing. Otherwise, it will be turned into a\n   * Buffer object for processing into the desired encoding.\n   *\n   * If provided, `cb` function is called immediately before return for\n   * sync streams, or on next tick for async streams, because for this\n   * base class, a chunk is considered \"processed\" once it is accepted\n   * and either emitted or buffered. That is, the callback does not indicate\n   * that the chunk has been eventually emitted, though of course child\n   * classes can override this function to do whatever processing is required\n   * and call `super.write(...)` only once processing is completed.\n   */\n  write(chunk: WType, cb?: () => void): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding,\n    cb?: () => void\n  ): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): boolean {\n    if (this[ABORTED]) return false\n    if (this[EOF]) throw new Error('write after end')\n\n    if (this[DESTROYED]) {\n      this.emit(\n        'error',\n        Object.assign(\n          new Error('Cannot call write after a stream was destroyed'),\n          { code: 'ERR_STREAM_DESTROYED' }\n        )\n      )\n      return true\n    }\n\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n\n    if (!encoding) encoding = 'utf8'\n\n    const fn = this[ASYNC] ? defer : nodefer\n\n    // convert array buffers and typed array views into buffers\n    // at some point in the future, we may want to do the opposite!\n    // leave strings and buffers as-is\n    // anything is only allowed if in object mode, so throw\n    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {\n      if (isArrayBufferView(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(\n          chunk.buffer,\n          chunk.byteOffset,\n          chunk.byteLength\n        )\n      } else if (isArrayBufferLike(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(chunk)\n      } else if (typeof chunk !== 'string') {\n        throw new Error(\n          'Non-contiguous data written to non-objectMode stream'\n        )\n      }\n    }\n\n    // handle object mode up front, since it's simpler\n    // this yields better performance, fewer checks later.\n    if (this[OBJECTMODE]) {\n      // maybe impossible?\n      /* c8 ignore start */\n      if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n      /* c8 ignore stop */\n\n      if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n      else this[BUFFERPUSH](chunk as unknown as RType)\n\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n      if (cb) fn(cb)\n\n      return this[FLOWING]\n    }\n\n    // at this point the chunk is a buffer or string\n    // don't buffer it up or send it to the decoder\n    if (!(chunk as Minipass.BufferOrString).length) {\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n      if (cb) fn(cb)\n      return this[FLOWING]\n    }\n\n    // fast-path writing strings of same encoding to a stream with\n    // an empty buffer, skipping the buffer/decoder dance\n    if (\n      typeof chunk === 'string' &&\n      // unless it is a string already ready for us to use\n      !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)\n    ) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = Buffer.from(chunk, encoding)\n    }\n\n    if (Buffer.isBuffer(chunk) && this[ENCODING]) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = this[DECODER].write(chunk)\n    }\n\n    // Note: flushing CAN potentially switch us into not-flowing mode\n    if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n\n    if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n    else this[BUFFERPUSH](chunk as unknown as RType)\n\n    if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n    if (cb) fn(cb)\n\n    return this[FLOWING]\n  }\n\n  /**\n   * Low-level explicit read method.\n   *\n   * In objectMode, the argument is ignored, and one item is returned if\n   * available.\n   *\n   * `n` is the number of bytes (or in the case of encoding streams,\n   * characters) to consume. If `n` is not provided, then the entire buffer\n   * is returned, or `null` is returned if no data is available.\n   *\n   * If `n` is greater that the amount of data in the internal buffer,\n   * then `null` is returned.\n   */\n  read(n?: number | null): RType | null {\n    if (this[DESTROYED]) return null\n    this[DISCARDED] = false\n\n    if (\n      this[BUFFERLENGTH] === 0 ||\n      n === 0 ||\n      (n && n > this[BUFFERLENGTH])\n    ) {\n      this[MAYBE_EMIT_END]()\n      return null\n    }\n\n    if (this[OBJECTMODE]) n = null\n\n    if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {\n      // not object mode, so if we have an encoding, then RType is string\n      // otherwise, must be Buffer\n      this[BUFFER] = [\n        (this[ENCODING]\n          ? this[BUFFER].join('')\n          : Buffer.concat(\n              this[BUFFER] as Buffer[],\n              this[BUFFERLENGTH]\n            )) as RType,\n      ]\n    }\n\n    const ret = this[READ](n || null, this[BUFFER][0] as RType)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [READ](n: number | null, chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERSHIFT]()\n    else {\n      const c = chunk as Minipass.BufferOrString\n      if (n === c.length || n === null) this[BUFFERSHIFT]()\n      else if (typeof c === 'string') {\n        this[BUFFER][0] = c.slice(n) as RType\n        chunk = c.slice(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      } else {\n        this[BUFFER][0] = c.subarray(n) as RType\n        chunk = c.subarray(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      }\n    }\n\n    this.emit('data', chunk)\n\n    if (!this[BUFFER].length && !this[EOF]) this.emit('drain')\n\n    return chunk\n  }\n\n  /**\n   * End the stream, optionally providing a final write.\n   *\n   * See {@link Minipass#write} for argument descriptions\n   */\n  end(cb?: () => void): this\n  end(chunk: WType, cb?: () => void): this\n  end(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): this\n  end(\n    chunk?: WType | (() => void),\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): this {\n    if (typeof chunk === 'function') {\n      cb = chunk as () => void\n      chunk = undefined\n    }\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n    if (chunk !== undefined) this.write(chunk, encoding)\n    if (cb) this.once('end', cb)\n    this[EOF] = true\n    this.writable = false\n\n    // if we haven't written anything, then go ahead and emit,\n    // even if we're not reading.\n    // we'll re-emit if a new 'end' listener is added anyway.\n    // This makes MP more suitable to write-only use cases.\n    if (this[FLOWING] || !this[PAUSED]) this[MAYBE_EMIT_END]()\n    return this\n  }\n\n  // don't let the internal resume be overwritten\n  [RESUME]() {\n    if (this[DESTROYED]) return\n\n    if (!this[DATALISTENERS] && !this[PIPES].length) {\n      this[DISCARDED] = true\n    }\n    this[PAUSED] = false\n    this[FLOWING] = true\n    this.emit('resume')\n    if (this[BUFFER].length) this[FLUSH]()\n    else if (this[EOF]) this[MAYBE_EMIT_END]()\n    else this.emit('drain')\n  }\n\n  /**\n   * Resume the stream if it is currently in a paused state\n   *\n   * If called when there are no pipe destinations or `data` event listeners,\n   * this will place the stream in a \"discarded\" state, where all data will\n   * be thrown away. The discarded state is removed if a pipe destination or\n   * data handler is added, if pause() is called, or if any synchronous or\n   * asynchronous iteration is started.\n   */\n  resume() {\n    return this[RESUME]()\n  }\n\n  /**\n   * Pause the stream\n   */\n  pause() {\n    this[FLOWING] = false\n    this[PAUSED] = true\n    this[DISCARDED] = false\n  }\n\n  /**\n   * true if the stream has been forcibly destroyed\n   */\n  get destroyed() {\n    return this[DESTROYED]\n  }\n\n  /**\n   * true if the stream is currently in a flowing state, meaning that\n   * any writes will be immediately emitted.\n   */\n  get flowing() {\n    return this[FLOWING]\n  }\n\n  /**\n   * true if the stream is currently in a paused state\n   */\n  get paused() {\n    return this[PAUSED]\n  }\n\n  [BUFFERPUSH](chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1\n    else this[BUFFERLENGTH] += (chunk as Minipass.BufferOrString).length\n    this[BUFFER].push(chunk)\n  }\n\n  [BUFFERSHIFT](): RType {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1\n    else\n      this[BUFFERLENGTH] -= (\n        this[BUFFER][0] as Minipass.BufferOrString\n      ).length\n    return this[BUFFER].shift() as RType\n  }\n\n  [FLUSH](noDrain: boolean = false) {\n    do {} while (\n      this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&\n      this[BUFFER].length\n    )\n\n    if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain')\n  }\n\n  [FLUSHCHUNK](chunk: RType) {\n    this.emit('data', chunk)\n    return this[FLOWING]\n  }\n\n  /**\n   * Pipe all data emitted by this stream into the destination provided.\n   *\n   * Triggers the flow of data.\n   */\n  pipe(dest: W, opts?: PipeOptions): W {\n    if (this[DESTROYED]) return dest\n    this[DISCARDED] = false\n\n    const ended = this[EMITTED_END]\n    opts = opts || {}\n    if (dest === proc.stdout || dest === proc.stderr) opts.end = false\n    else opts.end = opts.end !== false\n    opts.proxyErrors = !!opts.proxyErrors\n\n    // piping an ended stream ends immediately\n    if (ended) {\n      if (opts.end) dest.end()\n    } else {\n      // \"as\" here just ignores the WType, which pipes don't care about,\n      // since they're only consuming from us, and writing to the dest\n      this[PIPES].push(\n        !opts.proxyErrors\n          ? new Pipe(this as Minipass, dest, opts)\n          : new PipeProxyErrors(this as Minipass, dest, opts)\n      )\n      if (this[ASYNC]) defer(() => this[RESUME]())\n      else this[RESUME]()\n    }\n\n    return dest\n  }\n\n  /**\n   * Fully unhook a piped destination stream.\n   *\n   * If the destination stream was the only consumer of this stream (ie,\n   * there are no other piped destinations or `'data'` event listeners)\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  unpipe(dest: W) {\n    const p = this[PIPES].find(p => p.dest === dest)\n    if (p) {\n      if (this[PIPES].length === 1) {\n        if (this[FLOWING] && this[DATALISTENERS] === 0) {\n          this[FLOWING] = false\n        }\n        this[PIPES] = []\n      } else this[PIPES].splice(this[PIPES].indexOf(p), 1)\n      p.unpipe()\n    }\n  }\n\n  /**\n   * Alias for {@link Minipass#on}\n   */\n  addListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    return this.on(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.on`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * - Adding a 'data' event handler will trigger the flow of data\n   *\n   * - Adding a 'readable' event handler when there is data waiting to be read\n   *   will cause 'readable' to be emitted immediately.\n   *\n   * - Adding an 'endish' event handler ('end', 'finish', etc.) which has\n   *   already passed will cause the event to be emitted immediately and all\n   *   handlers removed.\n   *\n   * - Adding an 'error' event handler after an error has been emitted will\n   *   cause the event to be re-emitted immediately with the error previously\n   *   raised.\n   */\n  on(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    const ret = super.on(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    if (ev === 'data') {\n      this[DISCARDED] = false\n      this[DATALISTENERS]++\n      if (!this[PIPES].length && !this[FLOWING]) {\n        this[RESUME]()\n      }\n    } else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {\n      super.emit('readable')\n    } else if (isEndish(ev) && this[EMITTED_END]) {\n      super.emit(ev)\n      this.removeAllListeners(ev)\n    } else if (ev === 'error' && this[EMITTED_ERROR]) {\n      const h = handler as (...a: Events['error']) => any\n      if (this[ASYNC]) defer(() => h.call(this, this[EMITTED_ERROR]))\n      else h.call(this, this[EMITTED_ERROR])\n    }\n    return ret\n  }\n\n  /**\n   * Alias for {@link Minipass#off}\n   */\n  removeListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    return this.off(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.off`\n   *\n   * If a 'data' event handler is removed, and it was the last consumer\n   * (ie, there are no pipe destinations or other 'data' event listeners),\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  off(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    const ret = super.off(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    // if we previously had listeners, and now we don't, and we don't\n    // have any pipes, then stop the flow, unless it's been explicitly\n    // put in a discarded flowing state via stream.resume().\n    if (ev === 'data') {\n      this[DATALISTENERS] = this.listeners('data').length\n      if (\n        this[DATALISTENERS] === 0 &&\n        !this[DISCARDED] &&\n        !this[PIPES].length\n      ) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.removeAllListeners`\n   *\n   * If all 'data' event handlers are removed, and they were the last consumer\n   * (ie, there are no pipe destinations), then the flow of data will stop\n   * until there is another consumer or {@link Minipass#resume} is explicitly\n   * called.\n   */\n  removeAllListeners(ev?: Event) {\n    const ret = super.removeAllListeners(ev as string | symbol | undefined)\n    if (ev === 'data' || ev === undefined) {\n      this[DATALISTENERS] = 0\n      if (!this[DISCARDED] && !this[PIPES].length) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * true if the 'end' event has been emitted\n   */\n  get emittedEnd() {\n    return this[EMITTED_END]\n  }\n\n  [MAYBE_EMIT_END]() {\n    if (\n      !this[EMITTING_END] &&\n      !this[EMITTED_END] &&\n      !this[DESTROYED] &&\n      this[BUFFER].length === 0 &&\n      this[EOF]\n    ) {\n      this[EMITTING_END] = true\n      this.emit('end')\n      this.emit('prefinish')\n      this.emit('finish')\n      if (this[CLOSED]) this.emit('close')\n      this[EMITTING_END] = false\n    }\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.emit`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * If the stream has been destroyed, and the event is something other\n   * than 'close' or 'error', then `false` is returned and no handlers\n   * are called.\n   *\n   * If the event is 'end', and has already been emitted, then the event\n   * is ignored. If the stream is in a paused or non-flowing state, then\n   * the event will be deferred until data flow resumes. If the stream is\n   * async, then handlers will be called on the next tick rather than\n   * immediately.\n   *\n   * If the event is 'close', and 'end' has not yet been emitted, then\n   * the event will be deferred until after 'end' is emitted.\n   *\n   * If the event is 'error', and an AbortSignal was provided for the stream,\n   * and there are no listeners, then the event is ignored, matching the\n   * behavior of node core streams in the presense of an AbortSignal.\n   *\n   * If the event is 'finish' or 'prefinish', then all listeners will be\n   * removed after emitting the event, to prevent double-firing.\n   */\n  emit(\n    ev: Event,\n    ...args: Events[Event]\n  ): boolean {\n    const data = args[0]\n    // error and close are only events allowed after calling destroy()\n    if (\n      ev !== 'error' &&\n      ev !== 'close' &&\n      ev !== DESTROYED &&\n      this[DESTROYED]\n    ) {\n      return false\n    } else if (ev === 'data') {\n      return !this[OBJECTMODE] && !data\n        ? false\n        : this[ASYNC]\n        ? (defer(() => this[EMITDATA](data as RType)), true)\n        : this[EMITDATA](data as RType)\n    } else if (ev === 'end') {\n      return this[EMITEND]()\n    } else if (ev === 'close') {\n      this[CLOSED] = true\n      // don't emit close before 'end' and 'finish'\n      if (!this[EMITTED_END] && !this[DESTROYED]) return false\n      const ret = super.emit('close')\n      this.removeAllListeners('close')\n      return ret\n    } else if (ev === 'error') {\n      this[EMITTED_ERROR] = data\n      super.emit(ERROR, data)\n      const ret =\n        !this[SIGNAL] || this.listeners('error').length\n          ? super.emit('error', data)\n          : false\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'resume') {\n      const ret = super.emit('resume')\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'finish' || ev === 'prefinish') {\n      const ret = super.emit(ev)\n      this.removeAllListeners(ev)\n      return ret\n    }\n\n    // Some other unknown event\n    const ret = super.emit(ev as string, ...args)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITDATA](data: RType) {\n    for (const p of this[PIPES]) {\n      if (p.dest.write(data as RType) === false) this.pause()\n    }\n    const ret = this[DISCARDED] ? false : super.emit('data', data)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITEND]() {\n    if (this[EMITTED_END]) return false\n\n    this[EMITTED_END] = true\n    this.readable = false\n    return this[ASYNC]\n      ? (defer(() => this[EMITEND2]()), true)\n      : this[EMITEND2]()\n  }\n\n  [EMITEND2]() {\n    if (this[DECODER]) {\n      const data = this[DECODER].end()\n      if (data) {\n        for (const p of this[PIPES]) {\n          p.dest.write(data as RType)\n        }\n        if (!this[DISCARDED]) super.emit('data', data)\n      }\n    }\n\n    for (const p of this[PIPES]) {\n      p.end()\n    }\n    const ret = super.emit('end')\n    this.removeAllListeners('end')\n    return ret\n  }\n\n  /**\n   * Return a Promise that resolves to an array of all emitted data once\n   * the stream ends.\n   */\n  async collect(): Promise {\n    const buf: RType[] & { dataLength: number } = Object.assign([], {\n      dataLength: 0,\n    })\n    if (!this[OBJECTMODE]) buf.dataLength = 0\n    // set the promise first, in case an error is raised\n    // by triggering the flow here.\n    const p = this.promise()\n    this.on('data', c => {\n      buf.push(c)\n      if (!this[OBJECTMODE])\n        buf.dataLength += (c as Minipass.BufferOrString).length\n    })\n    await p\n    return buf\n  }\n\n  /**\n   * Return a Promise that resolves to the concatenation of all emitted data\n   * once the stream ends.\n   *\n   * Not allowed on objectMode streams.\n   */\n  async concat(): Promise {\n    if (this[OBJECTMODE]) {\n      throw new Error('cannot concat in objectMode')\n    }\n    const buf = await this.collect()\n    return (\n      this[ENCODING]\n        ? buf.join('')\n        : Buffer.concat(buf as Buffer[], buf.dataLength)\n    ) as RType\n  }\n\n  /**\n   * Return a void Promise that resolves once the stream ends.\n   */\n  async promise(): Promise {\n    return new Promise((resolve, reject) => {\n      this.on(DESTROYED, () => reject(new Error('stream destroyed')))\n      this.on('error', er => reject(er))\n      this.on('end', () => resolve())\n    })\n  }\n\n  /**\n   * Asynchronous `for await of` iteration.\n   *\n   * This will continue emitting all chunks until the stream terminates.\n   */\n  [Symbol.asyncIterator](): AsyncGenerator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = async (): Promise> => {\n      this.pause()\n      stopped = true\n      return { value: undefined, done: true }\n    }\n    const next = (): Promise> => {\n      if (stopped) return stop()\n      const res = this.read()\n      if (res !== null) return Promise.resolve({ done: false, value: res })\n\n      if (this[EOF]) return stop()\n\n      let resolve!: (res: IteratorResult) => void\n      let reject!: (er: unknown) => void\n      const onerr = (er: unknown) => {\n        this.off('data', ondata)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        reject(er)\n      }\n      const ondata = (value: RType) => {\n        this.off('error', onerr)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        this.pause()\n        resolve({ value, done: !!this[EOF] })\n      }\n      const onend = () => {\n        this.off('error', onerr)\n        this.off('data', ondata)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        resolve({ done: true, value: undefined })\n      }\n      const ondestroy = () => onerr(new Error('stream destroyed'))\n      return new Promise>((res, rej) => {\n        reject = rej\n        resolve = res\n        this.once(DESTROYED, ondestroy)\n        this.once('error', onerr)\n        this.once('end', onend)\n        this.once('data', ondata)\n      })\n    }\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.asyncIterator]() {\n        return this\n      },\n    }\n  }\n\n  /**\n   * Synchronous `for of` iteration.\n   *\n   * The iteration will terminate when the internal buffer runs out, even\n   * if the stream has not yet terminated.\n   */\n  [Symbol.iterator](): Generator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = (): IteratorReturnResult => {\n      this.pause()\n      this.off(ERROR, stop)\n      this.off(DESTROYED, stop)\n      this.off('end', stop)\n      stopped = true\n      return { done: true, value: undefined }\n    }\n\n    const next = (): IteratorResult => {\n      if (stopped) return stop()\n      const value = this.read()\n      return value === null ? stop() : { done: false, value }\n    }\n\n    this.once('end', stop)\n    this.once(ERROR, stop)\n    this.once(DESTROYED, stop)\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.iterator]() {\n        return this\n      },\n    }\n  }\n\n  /**\n   * Destroy a stream, preventing it from being used for any further purpose.\n   *\n   * If the stream has a `close()` method, then it will be called on\n   * destruction.\n   *\n   * After destruction, any attempt to write data, read data, or emit most\n   * events will be ignored.\n   *\n   * If an error argument is provided, then it will be emitted in an\n   * 'error' event.\n   */\n  destroy(er?: unknown) {\n    if (this[DESTROYED]) {\n      if (er) this.emit('error', er)\n      else this.emit(DESTROYED)\n      return this\n    }\n\n    this[DESTROYED] = true\n    this[DISCARDED] = true\n\n    // throw away all buffered data, it's never coming out\n    this[BUFFER].length = 0\n    this[BUFFERLENGTH] = 0\n\n    const wc = this as Minipass & {\n      close?: () => void\n    }\n    if (typeof wc.close === 'function' && !this[CLOSED]) wc.close()\n\n    if (er) this.emit('error', er)\n    // if no error to emit, still reject pending promises\n    else this.emit(DESTROYED)\n\n    return this\n  }\n\n  /**\n   * Alias for {@link isStream}\n   *\n   * Former export location, maintained for backwards compatibility.\n   *\n   * @deprecated\n   */\n  static get isStream() {\n    return isStream\n  }\n}\n"]}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3dbc1ca591c0557e35b6004aeba250e6a70b56e3
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/minipass/dist/esm/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "module"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/nice-try/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/nice-try/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..837506f2cc2db3718ebf774992e68d3dafa77c61
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/nice-try/src/index.js
@@ -0,0 +1,12 @@
+'use strict'
+
+/**
+ * Tries to execute a function and discards any error that occurs.
+ * @param {Function} fn - Function that might or might not throw an error.
+ * @returns {?*} Return-value of the function when no error occurred.
+ */
+module.exports = function(fn) {
+
+	try { return fn() } catch (e) {}
+
+}
\ No newline at end of file
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527203617.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527203617.md
new file mode 100644
index 0000000000000000000000000000000000000000..38d8f85613989fa44d37fb74e7cf37319de66c2e
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527203617.md
@@ -0,0 +1,2 @@
+# node-domexception
+An implementation of the DOMException class from NodeJS
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527212714.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527212714.md
new file mode 100644
index 0000000000000000000000000000000000000000..eed1d13bedf96b2fe4cb33d7896b482f968db30d
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527212714.md
@@ -0,0 +1,41 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class, from NodeJS itself.
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMexception provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+
+hello().catch(err => {
+  if (err instanceof DOMException) {
+    ...
+  }
+})
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 7);
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10);
+```
+
+## APIs
+
+This package exposes two flavors of the `DOMException` interface depending on the imported module.
+
+### `domexception` module
+
+This module default-exports the `DOMException` interface constructor.
+
+### `domexception/webidl2js-wrapper` module
+
+This module exports the `DOMException` [interface wrapper API](https://github.com/jsdom/webidl2js#for-interfaces) generated by [webidl2js](https://github.com/jsdom/webidl2js).
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213345.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213345.md
new file mode 100644
index 0000000000000000000000000000000000000000..582541679b782bf3958fca1a47159addb78d177a
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213345.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class, from NodeJS itself. (including the legacy codes)
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213411.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213411.md
new file mode 100644
index 0000000000000000000000000000000000000000..4c21ec8fda5c5fb82ba15d47d55a58405ac5a44e
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213411.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including the legacy codes)
+NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213803.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213803.md
new file mode 100644
index 0000000000000000000000000000000000000000..4cb85717f9560c558c407456d065789d85ca30a7
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527213803.md
@@ -0,0 +1,36 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214323.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214323.md
new file mode 100644
index 0000000000000000000000000000000000000000..a32a91b167dbbedfdf34e456cd067ce0ef382752
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214323.md
@@ -0,0 +1,38 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+(plz don't depend on this package in any other environment other than node >=10.5)
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214408.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214408.md
new file mode 100644
index 0000000000000000000000000000000000000000..a32a91b167dbbedfdf34e456cd067ce0ef382752
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/README_20210527214408.md
@@ -0,0 +1,38 @@
+# DOMException
+An implementation of the DOMException class from NodeJS
+
+This package exposes the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including all of the deprecated legacy codes)
+NodeJS has it built in, but it's not globally available, and you can't require/import it from somewhere.
+
+The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
+This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
+The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size since it has to re-construct the hole class from the ground up.
+
+(plz don't depend on this package in any other environment other than node >=10.5)
+
+```js
+import DOMException from 'node-domexception'
+import { MessageChannel } from 'worker_threads'
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
+```
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527203842.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527203842.js
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527203947.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527203947.js
new file mode 100644
index 0000000000000000000000000000000000000000..b9a8b76546b41219c619e9c0bff9cedface179a1
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527203947.js
@@ -0,0 +1,8 @@
+const { MessageChannel } = require('worker_threads')
+
+if (!globalThis.DOMException) {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) { globalThis.DOMException = err.constructor }
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204259.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204259.js
new file mode 100644
index 0000000000000000000000000000000000000000..e9332a8d0f3f6ef2993c5330a7f29654b0d1df12
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204259.js
@@ -0,0 +1,9 @@
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads')
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204418.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204418.js
new file mode 100644
index 0000000000000000000000000000000000000000..cb362cc78a5692c309dd3f8f25a14b1b15356889
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204418.js
@@ -0,0 +1,9 @@
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads')
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204756.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204756.js
new file mode 100644
index 0000000000000000000000000000000000000000..87d26554fc7b990d796fabbe89fa004a776dfed7
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204756.js
@@ -0,0 +1,11 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads')
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204833.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204833.js
new file mode 100644
index 0000000000000000000000000000000000000000..837ebdad0b596caea502a4562725e147d5dd4165
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527204833.js
@@ -0,0 +1,11 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads')
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) { globalThis.DOMException = err.constructor }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211208.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211208.js
new file mode 100644
index 0000000000000000000000000000000000000000..ba215ce862287f4deeddcc3dcb4dde287e24af21
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211208.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  var { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211248.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211248.js
new file mode 100644
index 0000000000000000000000000000000000000000..f5c434eec0df083379e14b16bd4550af0dc81352
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527211248.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212722.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212722.js
new file mode 100644
index 0000000000000000000000000000000000000000..91b3b526aa6ca35d8d5a66fefbc0cace4e161e05
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212722.js
@@ -0,0 +1,23 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 7);
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212731.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212731.js
new file mode 100644
index 0000000000000000000000000000000000000000..cf2886438492c636eed949b44d31c48a5d441840
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212731.js
@@ -0,0 +1,23 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
+
+const e1 = new DOMException("Something went wrong", "BadThingsError");
+console.assert(e1.name === "BadThingsError");
+console.assert(e1.code === 0);
+
+const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
+console.assert(e2.name === "NoModificationAllowedError");
+console.assert(e2.code === 2);
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212746.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212746.js
new file mode 100644
index 0000000000000000000000000000000000000000..f5c434eec0df083379e14b16bd4550af0dc81352
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212746.js
@@ -0,0 +1,15 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212900.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212900.js
new file mode 100644
index 0000000000000000000000000000000000000000..efa2442c0d2d89ad42afb8f36a1072ed8fc18aaf
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527212900.js
@@ -0,0 +1,16 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    console.log(err.code)
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213022.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213022.js
new file mode 100644
index 0000000000000000000000000000000000000000..e59f047bd461a4c0d7a221cfd16ac662c11cffb5
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213022.js
@@ -0,0 +1,16 @@
+/*! blob-to-buffer. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    console.log(err.code, err.name, err.message)
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213822.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213822.js
new file mode 100644
index 0000000000000000000000000000000000000000..7f4e13dcc5d41a85052a6d46ce989adcc8ec074f
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213822.js
@@ -0,0 +1,16 @@
+/*! node-DOMException. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  const { MessageChannel } = require('worker_threads'),
+  port = new MessageChannel().port1,
+  ab = new ArrayBuffer()
+  try { port.postMessage(ab, [ab, ab]) }
+  catch (err) {
+    console.log(err.code, err.name, err.message)
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213843.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213843.js
new file mode 100644
index 0000000000000000000000000000000000000000..ee75b730d0afe7e77474fae0ac178ba533297d21
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213843.js
@@ -0,0 +1,17 @@
+/*! node-DOMException. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  catch (err) {
+    console.log(err.code, err.name, err.message)
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213852.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213852.js
new file mode 100644
index 0000000000000000000000000000000000000000..a82bee3a339925a2db2a39d26399e0c0decc07b8
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213852.js
@@ -0,0 +1,17 @@
+/*! node-DOMException. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    console.log(err.code, err.name, err.message)
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213910.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213910.js
new file mode 100644
index 0000000000000000000000000000000000000000..1e1ca29b1cf39eea3b0e2e9a179220679d5664fc
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527213910.js
@@ -0,0 +1,16 @@
+/*! node-DOMException. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214034.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214034.js
new file mode 100644
index 0000000000000000000000000000000000000000..b7bbe951938adfde643d88ea8da70c414c0b362e
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214034.js
@@ -0,0 +1,16 @@
+/*! node-domexception. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214643.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214643.js
new file mode 100644
index 0000000000000000000000000000000000000000..92ed8477b307bbd541f3fb2c7588de5d37d54537
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214643.js
@@ -0,0 +1,41 @@
+/*! node-domexception. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
+
+
+const  { MessageChannel } = require('worker_threads')
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 25)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214654.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214654.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d5cb8e5b477c205fcb17ef5d91639e311873fcf
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214654.js
@@ -0,0 +1,41 @@
+/*! node-domexception. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
+
+
+const  { MessageChannel } = require('worker_threads')
+
+async function hello() {
+  const port = new MessageChannel().port1
+  const ab = new ArrayBuffer()
+  port.postMessage(ab, [ab, ab])
+}
+
+hello().catch(err => {
+  console.assert(err.name === 'DataCloneError')
+  console.assert(err.code === 21)
+  console.assert(err instanceof DOMException)
+})
+
+const e1 = new DOMException('Something went wrong', 'BadThingsError')
+console.assert(e1.name === 'BadThingsError')
+console.assert(e1.code === 0)
+
+const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
+console.assert(e2.name === 'NoModificationAllowedError')
+console.assert(e2.code === 7)
+
+console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214700.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214700.js
new file mode 100644
index 0000000000000000000000000000000000000000..b7bbe951938adfde643d88ea8da70c414c0b362e
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/index_20210527214700.js
@@ -0,0 +1,16 @@
+/*! node-domexception. MIT License. Jimmy Wärting  */
+
+if (!globalThis.DOMException) {
+  try {
+    const { MessageChannel } = require('worker_threads'),
+    port = new MessageChannel().port1,
+    ab = new ArrayBuffer()
+    port.postMessage(ab, [ab, ab])
+  } catch (err) {
+    err.constructor.name === 'DOMException' && (
+      globalThis.DOMException = err.constructor
+    )
+  }
+}
+
+module.exports = globalThis.DOMException
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203733.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203733.json
new file mode 100644
index 0000000000000000000000000000000000000000..5eeb306d2a21ce5854a78ac329ab422b0c2b7524
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203733.json
@@ -0,0 +1,19 @@
+{
+  "name": "domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "author": "",
+  "license": "ISC",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203825.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203825.json
new file mode 100644
index 0000000000000000000000000000000000000000..4ca171350a4aebc837955c0a7e18bfc9c39bf9c5
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527203825.json
@@ -0,0 +1,16 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204621.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204621.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c414e93c3201ff6a786005d7538dab80ed53beb
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204621.json
@@ -0,0 +1,19 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "engines": {
+    "node": ">=10.5.0"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme"
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204913.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204913.json
new file mode 100644
index 0000000000000000000000000000000000000000..dbbb5d2429ff41c42178bb3fb2c5a5b3eee1d5b7
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204913.json
@@ -0,0 +1,25 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "engines": {
+    "node": ">=10.5.0"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+  "funding": [
+    {
+      "type": "github",
+      "url": "https://github.com/sponsors/jimmywarting"
+    }
+  ]
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204925.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204925.json
new file mode 100644
index 0000000000000000000000000000000000000000..dbbb5d2429ff41c42178bb3fb2c5a5b3eee1d5b7
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527204925.json
@@ -0,0 +1,25 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "engines": {
+    "node": ">=10.5.0"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+  "funding": [
+    {
+      "type": "github",
+      "url": "https://github.com/sponsors/jimmywarting"
+    }
+  ]
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205145.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205145.json
new file mode 100644
index 0000000000000000000000000000000000000000..cd08e704ea2957b835964f467ad62b59d6f5c158
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205145.json
@@ -0,0 +1,29 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "engines": {
+    "node": ">=10.5.0"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+  "funding": [
+    {
+      "type": "github",
+      "url": "https://github.com/sponsors/jimmywarting"
+    },
+    {
+      "type": "github",
+      "url": "https://paypal.me/jimmywarting"
+    }
+  ]
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205156.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205156.json
new file mode 100644
index 0000000000000000000000000000000000000000..cd08e704ea2957b835964f467ad62b59d6f5c158
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/package_20210527205156.json
@@ -0,0 +1,29 @@
+{
+  "name": "node-domexception",
+  "version": "1.0.0",
+  "description": "An implementation of the DOMException class from NodeJS",
+  "main": "index.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jimmywarting/node-domexception.git"
+  },
+  "engines": {
+    "node": ">=10.5.0"
+  },
+  "author": "Jimmy Wärting",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/jimmywarting/node-domexception/issues"
+  },
+  "homepage": "https://github.com/jimmywarting/node-domexception#readme",
+  "funding": [
+    {
+      "type": "github",
+      "url": "https://github.com/sponsors/jimmywarting"
+    },
+    {
+      "type": "github",
+      "url": "https://paypal.me/jimmywarting"
+    }
+  ]
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527205603.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527205603.js
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527205957.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527205957.js
new file mode 100644
index 0000000000000000000000000000000000000000..73feac5f1113f35fe45d7a74bdaa02dd8b9e99a1
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527205957.js
@@ -0,0 +1,3 @@
+require('./index.js')
+
+console.log(DOMException.INDEX_SIZE_ERR)
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527210021.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527210021.js
new file mode 100644
index 0000000000000000000000000000000000000000..be47491600fba68a1e18514413905569fbd7a960
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-domexception/.history/test_20210527210021.js
@@ -0,0 +1,3 @@
+const e = require('./index.js')
+
+console.log(e.INDEX_SIZE_ERR)
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/@types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/@types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..274ca03a837fbbf88f6be7d59dfdd4b67c2c1bca
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/@types/index.d.ts
@@ -0,0 +1,219 @@
+/// 
+
+import {RequestOptions} from 'http';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+import {
+	Blob,
+	blobFrom,
+	blobFromSync,
+	File,
+	fileFrom,
+	fileFromSync
+} from 'fetch-blob/from.js';
+
+type AbortSignal = {
+	readonly aborted: boolean;
+
+	addEventListener: (type: 'abort', listener: (this: AbortSignal) => void) => void;
+	removeEventListener: (type: 'abort', listener: (this: AbortSignal) => void) => void;
+};
+
+export type HeadersInit = Headers | Record | Iterable | Iterable>;
+
+export {
+	FormData,
+	Blob,
+	blobFrom,
+	blobFromSync,
+	File,
+	fileFrom,
+	fileFromSync
+};
+
+/**
+ * This Fetch API interface allows you to perform various actions on HTTP request and response headers.
+ * These actions include retrieving, setting, adding to, and removing.
+ * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
+ * You can add to this using methods like append() (see Examples.)
+ * In all methods of this interface, header names are matched by case-insensitive byte sequence.
+ * */
+export class Headers {
+	constructor(init?: HeadersInit);
+
+	append(name: string, value: string): void;
+	delete(name: string): void;
+	get(name: string): string | null;
+	has(name: string): boolean;
+	set(name: string, value: string): void;
+	forEach(
+		callbackfn: (value: string, key: string, parent: Headers) => void,
+		thisArg?: any
+	): void;
+
+	[Symbol.iterator](): IterableIterator<[string, string]>;
+	/**
+	 * Returns an iterator allowing to go through all key/value pairs contained in this object.
+	 */
+	entries(): IterableIterator<[string, string]>;
+	/**
+	 * Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
+	 */
+	keys(): IterableIterator;
+	/**
+	 * Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
+	 */
+	values(): IterableIterator;
+
+	/** Node-fetch extension */
+	raw(): Record;
+}
+
+export interface RequestInit {
+	/**
+	 * A BodyInit object or null to set request's body.
+	 */
+	body?: BodyInit | null;
+	/**
+	 * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
+	 */
+	headers?: HeadersInit;
+	/**
+	 * A string to set request's method.
+	 */
+	method?: string;
+	/**
+	 * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
+	 */
+	redirect?: RequestRedirect;
+	/**
+	 * An AbortSignal to set request's signal.
+	 */
+	signal?: AbortSignal | null;
+	/**
+	 * A string whose value is a same-origin URL, "about:client", or the empty string, to set request’s referrer.
+	 */
+	referrer?: string;
+	/**
+	 * A referrer policy to set request’s referrerPolicy.
+	 */
+	referrerPolicy?: ReferrerPolicy;
+
+	// Node-fetch extensions to the whatwg/fetch spec
+	agent?: RequestOptions['agent'] | ((parsedUrl: URL) => RequestOptions['agent']);
+	compress?: boolean;
+	counter?: number;
+	follow?: number;
+	hostname?: string;
+	port?: number;
+	protocol?: string;
+	size?: number;
+	highWaterMark?: number;
+	insecureHTTPParser?: boolean;
+}
+
+export interface ResponseInit {
+	headers?: HeadersInit;
+	status?: number;
+	statusText?: string;
+}
+
+export type BodyInit =
+	| Blob
+	| Buffer
+	| URLSearchParams
+	| FormData
+	| NodeJS.ReadableStream
+	| string;
+declare class BodyMixin {
+	constructor(body?: BodyInit, options?: {size?: number});
+
+	readonly body: NodeJS.ReadableStream | null;
+	readonly bodyUsed: boolean;
+	readonly size: number;
+
+	/** @deprecated Use `body.arrayBuffer()` instead. */
+	buffer(): Promise;
+	arrayBuffer(): Promise;
+	formData(): Promise;
+	blob(): Promise;
+	json(): Promise;
+	text(): Promise;
+}
+
+// `Body` must not be exported as a class since it's not exported from the JavaScript code.
+export interface Body extends Pick {}
+
+export type RequestRedirect = 'error' | 'follow' | 'manual';
+export type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
+export type RequestInfo = string | Request;
+export class Request extends BodyMixin {
+	constructor(input: URL | RequestInfo, init?: RequestInit);
+
+	/**
+	 * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
+	 */
+	readonly headers: Headers;
+	/**
+	 * Returns request's HTTP method, which is "GET" by default.
+	 */
+	readonly method: string;
+	/**
+	 * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
+	 */
+	readonly redirect: RequestRedirect;
+	/**
+	 * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
+	 */
+	readonly signal: AbortSignal;
+	/**
+	 * Returns the URL of request as a string.
+	 */
+	readonly url: string;
+	/**
+	 * A string whose value is a same-origin URL, "about:client", or the empty string, to set request’s referrer.
+	 */
+	readonly referrer: string;
+	/**
+	 * A referrer policy to set request’s referrerPolicy.
+	 */
+	readonly referrerPolicy: ReferrerPolicy;
+	clone(): Request;
+}
+
+type ResponseType = 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect';
+
+export class Response extends BodyMixin {
+	constructor(body?: BodyInit | null, init?: ResponseInit);
+
+	readonly headers: Headers;
+	readonly ok: boolean;
+	readonly redirected: boolean;
+	readonly status: number;
+	readonly statusText: string;
+	readonly type: ResponseType;
+	readonly url: string;
+	clone(): Response;
+
+	static error(): Response;
+	static redirect(url: string, status?: number): Response;
+	static json(data: any, init?: ResponseInit): Response;
+}
+
+export class FetchError extends Error {
+	constructor(message: string, type: string, systemError?: Record);
+
+	name: 'FetchError';
+	[Symbol.toStringTag]: 'FetchError';
+	type: string;
+	code?: string;
+	errno?: string;
+}
+
+export class AbortError extends Error {
+	type: string;
+	name: 'AbortError';
+	[Symbol.toStringTag]: 'AbortError';
+}
+
+export function isRedirect(code: number): boolean;
+export default function fetch(url: URL | RequestInfo, init?: RequestInit): Promise;
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/body.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/body.js
new file mode 100644
index 0000000000000000000000000000000000000000..714e27ec4aa74103a246480cf2bbcd9ae2103823
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/body.js
@@ -0,0 +1,397 @@
+
+/**
+ * Body.js
+ *
+ * Body interface provides common methods for Request and Response
+ */
+
+import Stream, {PassThrough} from 'node:stream';
+import {types, deprecate, promisify} from 'node:util';
+import {Buffer} from 'node:buffer';
+
+import Blob from 'fetch-blob';
+import {FormData, formDataToBlob} from 'formdata-polyfill/esm.min.js';
+
+import {FetchError} from './errors/fetch-error.js';
+import {FetchBaseError} from './errors/base.js';
+import {isBlob, isURLSearchParameters} from './utils/is.js';
+
+const pipeline = promisify(Stream.pipeline);
+const INTERNALS = Symbol('Body internals');
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+export default class Body {
+	constructor(body, {
+		size = 0
+	} = {}) {
+		let boundary = null;
+
+		if (body === null) {
+			// Body is undefined or null
+			body = null;
+		} else if (isURLSearchParameters(body)) {
+			// Body is a URLSearchParams
+			body = Buffer.from(body.toString());
+		} else if (isBlob(body)) {
+			// Body is blob
+		} else if (Buffer.isBuffer(body)) {
+			// Body is Buffer
+		} else if (types.isAnyArrayBuffer(body)) {
+			// Body is ArrayBuffer
+			body = Buffer.from(body);
+		} else if (ArrayBuffer.isView(body)) {
+			// Body is ArrayBufferView
+			body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+		} else if (body instanceof Stream) {
+			// Body is stream
+		} else if (body instanceof FormData) {
+			// Body is FormData
+			body = formDataToBlob(body);
+			boundary = body.type.split('=')[1];
+		} else {
+			// None of the above
+			// coerce to string then buffer
+			body = Buffer.from(String(body));
+		}
+
+		let stream = body;
+
+		if (Buffer.isBuffer(body)) {
+			stream = Stream.Readable.from(body);
+		} else if (isBlob(body)) {
+			stream = Stream.Readable.from(body.stream());
+		}
+
+		this[INTERNALS] = {
+			body,
+			stream,
+			boundary,
+			disturbed: false,
+			error: null
+		};
+		this.size = size;
+
+		if (body instanceof Stream) {
+			body.on('error', error_ => {
+				const error = error_ instanceof FetchBaseError ?
+					error_ :
+					new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, 'system', error_);
+				this[INTERNALS].error = error;
+			});
+		}
+	}
+
+	get body() {
+		return this[INTERNALS].stream;
+	}
+
+	get bodyUsed() {
+		return this[INTERNALS].disturbed;
+	}
+
+	/**
+	 * Decode response as ArrayBuffer
+	 *
+	 * @return  Promise
+	 */
+	async arrayBuffer() {
+		const {buffer, byteOffset, byteLength} = await consumeBody(this);
+		return buffer.slice(byteOffset, byteOffset + byteLength);
+	}
+
+	async formData() {
+		const ct = this.headers.get('content-type');
+
+		if (ct.startsWith('application/x-www-form-urlencoded')) {
+			const formData = new FormData();
+			const parameters = new URLSearchParams(await this.text());
+
+			for (const [name, value] of parameters) {
+				formData.append(name, value);
+			}
+
+			return formData;
+		}
+
+		const {toFormData} = await import('./utils/multipart-parser.js');
+		return toFormData(this.body, ct);
+	}
+
+	/**
+	 * Return raw response as Blob
+	 *
+	 * @return Promise
+	 */
+	async blob() {
+		const ct = (this.headers && this.headers.get('content-type')) || (this[INTERNALS].body && this[INTERNALS].body.type) || '';
+		const buf = await this.arrayBuffer();
+
+		return new Blob([buf], {
+			type: ct
+		});
+	}
+
+	/**
+	 * Decode response as json
+	 *
+	 * @return  Promise
+	 */
+	async json() {
+		const text = await this.text();
+		return JSON.parse(text);
+	}
+
+	/**
+	 * Decode response as text
+	 *
+	 * @return  Promise
+	 */
+	async text() {
+		const buffer = await consumeBody(this);
+		return new TextDecoder().decode(buffer);
+	}
+
+	/**
+	 * Decode response as buffer (non-spec api)
+	 *
+	 * @return  Promise
+	 */
+	buffer() {
+		return consumeBody(this);
+	}
+}
+
+Body.prototype.buffer = deprecate(Body.prototype.buffer, 'Please use \'response.arrayBuffer()\' instead of \'response.buffer()\'', 'node-fetch#buffer');
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+	body: {enumerable: true},
+	bodyUsed: {enumerable: true},
+	arrayBuffer: {enumerable: true},
+	blob: {enumerable: true},
+	json: {enumerable: true},
+	text: {enumerable: true},
+	data: {get: deprecate(() => {},
+		'data doesn\'t exist, use json(), text(), arrayBuffer(), or body instead',
+		'https://github.com/node-fetch/node-fetch/issues/1000 (response)')}
+});
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+async function consumeBody(data) {
+	if (data[INTERNALS].disturbed) {
+		throw new TypeError(`body used already for: ${data.url}`);
+	}
+
+	data[INTERNALS].disturbed = true;
+
+	if (data[INTERNALS].error) {
+		throw data[INTERNALS].error;
+	}
+
+	const {body} = data;
+
+	// Body is null
+	if (body === null) {
+		return Buffer.alloc(0);
+	}
+
+	/* c8 ignore next 3 */
+	if (!(body instanceof Stream)) {
+		return Buffer.alloc(0);
+	}
+
+	// Body is stream
+	// get ready to actually consume the body
+	const accum = [];
+	let accumBytes = 0;
+
+	try {
+		for await (const chunk of body) {
+			if (data.size > 0 && accumBytes + chunk.length > data.size) {
+				const error = new FetchError(`content size at ${data.url} over limit: ${data.size}`, 'max-size');
+				body.destroy(error);
+				throw error;
+			}
+
+			accumBytes += chunk.length;
+			accum.push(chunk);
+		}
+	} catch (error) {
+		const error_ = error instanceof FetchBaseError ? error : new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, 'system', error);
+		throw error_;
+	}
+
+	if (body.readableEnded === true || body._readableState.ended === true) {
+		try {
+			if (accum.every(c => typeof c === 'string')) {
+				return Buffer.from(accum.join(''));
+			}
+
+			return Buffer.concat(accum, accumBytes);
+		} catch (error) {
+			throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, 'system', error);
+		}
+	} else {
+		throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`);
+	}
+}
+
+/**
+ * Clone body given Res/Req instance
+ *
+ * @param   Mixed   instance       Response or Request instance
+ * @param   String  highWaterMark  highWaterMark for both PassThrough body streams
+ * @return  Mixed
+ */
+export const clone = (instance, highWaterMark) => {
+	let p1;
+	let p2;
+	let {body} = instance[INTERNALS];
+
+	// Don't allow cloning a used body
+	if (instance.bodyUsed) {
+		throw new Error('cannot clone body after it is used');
+	}
+
+	// Check that body is a stream and not form-data object
+	// note: we can't clone the form-data object without having it as a dependency
+	if ((body instanceof Stream) && (typeof body.getBoundary !== 'function')) {
+		// Tee instance body
+		p1 = new PassThrough({highWaterMark});
+		p2 = new PassThrough({highWaterMark});
+		body.pipe(p1);
+		body.pipe(p2);
+		// Set instance body to teed body and return the other teed body
+		instance[INTERNALS].stream = p1;
+		body = p2;
+	}
+
+	return body;
+};
+
+const getNonSpecFormDataBoundary = deprecate(
+	body => body.getBoundary(),
+	'form-data doesn\'t follow the spec and requires special treatment. Use alternative package',
+	'https://github.com/node-fetch/node-fetch/issues/1167'
+);
+
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param {any} body Any options.body input
+ * @returns {string | null}
+ */
+export const extractContentType = (body, request) => {
+	// Body is null or undefined
+	if (body === null) {
+		return null;
+	}
+
+	// Body is string
+	if (typeof body === 'string') {
+		return 'text/plain;charset=UTF-8';
+	}
+
+	// Body is a URLSearchParams
+	if (isURLSearchParameters(body)) {
+		return 'application/x-www-form-urlencoded;charset=UTF-8';
+	}
+
+	// Body is blob
+	if (isBlob(body)) {
+		return body.type || null;
+	}
+
+	// Body is a Buffer (Buffer, ArrayBuffer or ArrayBufferView)
+	if (Buffer.isBuffer(body) || types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
+		return null;
+	}
+
+	if (body instanceof FormData) {
+		return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
+	}
+
+	// Detect form data input from form-data module
+	if (body && typeof body.getBoundary === 'function') {
+		return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
+	}
+
+	// Body is stream - can't really do much about this
+	if (body instanceof Stream) {
+		return null;
+	}
+
+	// Body constructor defaults other things to string
+	return 'text/plain;charset=UTF-8';
+};
+
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param {any} obj.body Body object from the Body instance.
+ * @returns {number | null}
+ */
+export const getTotalBytes = request => {
+	const {body} = request[INTERNALS];
+
+	// Body is null or undefined
+	if (body === null) {
+		return 0;
+	}
+
+	// Body is Blob
+	if (isBlob(body)) {
+		return body.size;
+	}
+
+	// Body is Buffer
+	if (Buffer.isBuffer(body)) {
+		return body.length;
+	}
+
+	// Detect form data input from form-data module
+	if (body && typeof body.getLengthSync === 'function') {
+		return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null;
+	}
+
+	// Body is stream
+	return null;
+};
+
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param {Stream.Writable} dest The stream to write to.
+ * @param obj.body Body object from the Body instance.
+ * @returns {Promise}
+ */
+export const writeToStream = async (dest, {body}) => {
+	if (body === null) {
+		// Body is null
+		dest.end();
+	} else {
+		// Body is stream
+		await pipeline(body, dest);
+	}
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/abort-error.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/abort-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..0b62f1cd32672eb043ae64b85d134b647db2de20
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/abort-error.js
@@ -0,0 +1,10 @@
+import {FetchBaseError} from './base.js';
+
+/**
+ * AbortError interface for cancelled requests
+ */
+export class AbortError extends FetchBaseError {
+	constructor(message, type = 'aborted') {
+		super(message, type);
+	}
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/base.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/base.js
new file mode 100644
index 0000000000000000000000000000000000000000..4e66e1bfbdd348c41acefdc42052e7954d5595cd
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/base.js
@@ -0,0 +1,17 @@
+export class FetchBaseError extends Error {
+	constructor(message, type) {
+		super(message);
+		// Hide custom error implementation details from end-users
+		Error.captureStackTrace(this, this.constructor);
+
+		this.type = type;
+	}
+
+	get name() {
+		return this.constructor.name;
+	}
+
+	get [Symbol.toStringTag]() {
+		return this.constructor.name;
+	}
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/fetch-error.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/fetch-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..f7ae5cc4a9c293659b562d1fa572c08ad5c983a8
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/errors/fetch-error.js
@@ -0,0 +1,26 @@
+
+import {FetchBaseError} from './base.js';
+
+/**
+ * @typedef {{ address?: string, code: string, dest?: string, errno: number, info?: object, message: string, path?: string, port?: number, syscall: string}} SystemError
+*/
+
+/**
+ * FetchError interface for operational errors
+ */
+export class FetchError extends FetchBaseError {
+	/**
+	 * @param  {string} message -      Error message for human
+	 * @param  {string} [type] -        Error type for machine
+	 * @param  {SystemError} [systemError] - For Node.js system error
+	 */
+	constructor(message, type, systemError) {
+		super(message, type);
+		// When err.type is `system`, err.erroredSysCall contains system error and err.code contains system error code
+		if (systemError) {
+			// eslint-disable-next-line no-multi-assign
+			this.code = this.errno = systemError.code;
+			this.erroredSysCall = systemError.syscall;
+		}
+	}
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/headers.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/headers.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd694558048ef1682b4beb9f1bcdc32de26a8b01
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/headers.js
@@ -0,0 +1,267 @@
+/**
+ * Headers.js
+ *
+ * Headers class offers convenient helpers
+ */
+
+import {types} from 'node:util';
+import http from 'node:http';
+
+/* c8 ignore next 9 */
+const validateHeaderName = typeof http.validateHeaderName === 'function' ?
+	http.validateHeaderName :
+	name => {
+		if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
+			const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
+			Object.defineProperty(error, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'});
+			throw error;
+		}
+	};
+
+/* c8 ignore next 9 */
+const validateHeaderValue = typeof http.validateHeaderValue === 'function' ?
+	http.validateHeaderValue :
+	(name, value) => {
+		if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
+			const error = new TypeError(`Invalid character in header content ["${name}"]`);
+			Object.defineProperty(error, 'code', {value: 'ERR_INVALID_CHAR'});
+			throw error;
+		}
+	};
+
+/**
+ * @typedef {Headers | Record | Iterable | Iterable>} HeadersInit
+ */
+
+/**
+ * This Fetch API interface allows you to perform various actions on HTTP request and response headers.
+ * These actions include retrieving, setting, adding to, and removing.
+ * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
+ * You can add to this using methods like append() (see Examples.)
+ * In all methods of this interface, header names are matched by case-insensitive byte sequence.
+ *
+ */
+export default class Headers extends URLSearchParams {
+	/**
+	 * Headers class
+	 *
+	 * @constructor
+	 * @param {HeadersInit} [init] - Response headers
+	 */
+	constructor(init) {
+		// Validate and normalize init object in [name, value(s)][]
+		/** @type {string[][]} */
+		let result = [];
+		if (init instanceof Headers) {
+			const raw = init.raw();
+			for (const [name, values] of Object.entries(raw)) {
+				result.push(...values.map(value => [name, value]));
+			}
+		} else if (init == null) { // eslint-disable-line no-eq-null, eqeqeq
+			// No op
+		} else if (typeof init === 'object' && !types.isBoxedPrimitive(init)) {
+			const method = init[Symbol.iterator];
+			// eslint-disable-next-line no-eq-null, eqeqeq
+			if (method == null) {
+				// Record
+				result.push(...Object.entries(init));
+			} else {
+				if (typeof method !== 'function') {
+					throw new TypeError('Header pairs must be iterable');
+				}
+
+				// Sequence>
+				// Note: per spec we have to first exhaust the lists then process them
+				result = [...init]
+					.map(pair => {
+						if (
+							typeof pair !== 'object' || types.isBoxedPrimitive(pair)
+						) {
+							throw new TypeError('Each header pair must be an iterable object');
+						}
+
+						return [...pair];
+					}).map(pair => {
+						if (pair.length !== 2) {
+							throw new TypeError('Each header pair must be a name/value tuple');
+						}
+
+						return [...pair];
+					});
+			}
+		} else {
+			throw new TypeError('Failed to construct \'Headers\': The provided value is not of type \'(sequence> or record)');
+		}
+
+		// Validate and lowercase
+		result =
+			result.length > 0 ?
+				result.map(([name, value]) => {
+					validateHeaderName(name);
+					validateHeaderValue(name, String(value));
+					return [String(name).toLowerCase(), String(value)];
+				}) :
+				undefined;
+
+		super(result);
+
+		// Returning a Proxy that will lowercase key names, validate parameters and sort keys
+		// eslint-disable-next-line no-constructor-return
+		return new Proxy(this, {
+			get(target, p, receiver) {
+				switch (p) {
+					case 'append':
+					case 'set':
+						return (name, value) => {
+							validateHeaderName(name);
+							validateHeaderValue(name, String(value));
+							return URLSearchParams.prototype[p].call(
+								target,
+								String(name).toLowerCase(),
+								String(value)
+							);
+						};
+
+					case 'delete':
+					case 'has':
+					case 'getAll':
+						return name => {
+							validateHeaderName(name);
+							return URLSearchParams.prototype[p].call(
+								target,
+								String(name).toLowerCase()
+							);
+						};
+
+					case 'keys':
+						return () => {
+							target.sort();
+							return new Set(URLSearchParams.prototype.keys.call(target)).keys();
+						};
+
+					default:
+						return Reflect.get(target, p, receiver);
+				}
+			}
+		});
+		/* c8 ignore next */
+	}
+
+	get [Symbol.toStringTag]() {
+		return this.constructor.name;
+	}
+
+	toString() {
+		return Object.prototype.toString.call(this);
+	}
+
+	get(name) {
+		const values = this.getAll(name);
+		if (values.length === 0) {
+			return null;
+		}
+
+		let value = values.join(', ');
+		if (/^content-encoding$/i.test(name)) {
+			value = value.toLowerCase();
+		}
+
+		return value;
+	}
+
+	forEach(callback, thisArg = undefined) {
+		for (const name of this.keys()) {
+			Reflect.apply(callback, thisArg, [this.get(name), name, this]);
+		}
+	}
+
+	* values() {
+		for (const name of this.keys()) {
+			yield this.get(name);
+		}
+	}
+
+	/**
+	 * @type {() => IterableIterator<[string, string]>}
+	 */
+	* entries() {
+		for (const name of this.keys()) {
+			yield [name, this.get(name)];
+		}
+	}
+
+	[Symbol.iterator]() {
+		return this.entries();
+	}
+
+	/**
+	 * Node-fetch non-spec method
+	 * returning all headers and their values as array
+	 * @returns {Record}
+	 */
+	raw() {
+		return [...this.keys()].reduce((result, key) => {
+			result[key] = this.getAll(key);
+			return result;
+		}, {});
+	}
+
+	/**
+	 * For better console.log(headers) and also to convert Headers into Node.js Request compatible format
+	 */
+	[Symbol.for('nodejs.util.inspect.custom')]() {
+		return [...this.keys()].reduce((result, key) => {
+			const values = this.getAll(key);
+			// Http.request() only supports string as Host header.
+			// This hack makes specifying custom Host header possible.
+			if (key === 'host') {
+				result[key] = values[0];
+			} else {
+				result[key] = values.length > 1 ? values : values[0];
+			}
+
+			return result;
+		}, {});
+	}
+}
+
+/**
+ * Re-shaping object for Web IDL tests
+ * Only need to do it for overridden methods
+ */
+Object.defineProperties(
+	Headers.prototype,
+	['get', 'entries', 'forEach', 'values'].reduce((result, property) => {
+		result[property] = {enumerable: true};
+		return result;
+	}, {})
+);
+
+/**
+ * Create a Headers object from an http.IncomingMessage.rawHeaders, ignoring those that do
+ * not conform to HTTP grammar productions.
+ * @param {import('http').IncomingMessage['rawHeaders']} headers
+ */
+export function fromRawHeaders(headers = []) {
+	return new Headers(
+		headers
+			// Split into pairs
+			.reduce((result, value, index, array) => {
+				if (index % 2 === 0) {
+					result.push(array.slice(index, index + 2));
+				}
+
+				return result;
+			}, [])
+			.filter(([name, value]) => {
+				try {
+					validateHeaderName(name);
+					validateHeaderValue(name, String(value));
+					return true;
+				} catch {
+					return false;
+				}
+			})
+
+	);
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..7c4aee87b68f7b3613ce7dad4a570c17ec3630b9
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/index.js
@@ -0,0 +1,417 @@
+/**
+ * Index.js
+ *
+ * a request API compatible with window.fetch
+ *
+ * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
+ */
+
+import http from 'node:http';
+import https from 'node:https';
+import zlib from 'node:zlib';
+import Stream, {PassThrough, pipeline as pump} from 'node:stream';
+import {Buffer} from 'node:buffer';
+
+import dataUriToBuffer from 'data-uri-to-buffer';
+
+import {writeToStream, clone} from './body.js';
+import Response from './response.js';
+import Headers, {fromRawHeaders} from './headers.js';
+import Request, {getNodeRequestOptions} from './request.js';
+import {FetchError} from './errors/fetch-error.js';
+import {AbortError} from './errors/abort-error.js';
+import {isRedirect} from './utils/is-redirect.js';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+import {isDomainOrSubdomain, isSameProtocol} from './utils/is.js';
+import {parseReferrerPolicyFromHeader} from './utils/referrer.js';
+import {
+	Blob,
+	File,
+	fileFromSync,
+	fileFrom,
+	blobFromSync,
+	blobFrom
+} from 'fetch-blob/from.js';
+
+export {FormData, Headers, Request, Response, FetchError, AbortError, isRedirect};
+export {Blob, File, fileFromSync, fileFrom, blobFromSync, blobFrom};
+
+const supportedSchemas = new Set(['data:', 'http:', 'https:']);
+
+/**
+ * Fetch function
+ *
+ * @param   {string | URL | import('./request').default} url - Absolute url or Request instance
+ * @param   {*} [options_] - Fetch options
+ * @return  {Promise}
+ */
+export default async function fetch(url, options_) {
+	return new Promise((resolve, reject) => {
+		// Build request object
+		const request = new Request(url, options_);
+		const {parsedURL, options} = getNodeRequestOptions(request);
+		if (!supportedSchemas.has(parsedURL.protocol)) {
+			throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, '')}" is not supported.`);
+		}
+
+		if (parsedURL.protocol === 'data:') {
+			const data = dataUriToBuffer(request.url);
+			const response = new Response(data, {headers: {'Content-Type': data.typeFull}});
+			resolve(response);
+			return;
+		}
+
+		// Wrap http.request into fetch
+		const send = (parsedURL.protocol === 'https:' ? https : http).request;
+		const {signal} = request;
+		let response = null;
+
+		const abort = () => {
+			const error = new AbortError('The operation was aborted.');
+			reject(error);
+			if (request.body && request.body instanceof Stream.Readable) {
+				request.body.destroy(error);
+			}
+
+			if (!response || !response.body) {
+				return;
+			}
+
+			response.body.emit('error', error);
+		};
+
+		if (signal && signal.aborted) {
+			abort();
+			return;
+		}
+
+		const abortAndFinalize = () => {
+			abort();
+			finalize();
+		};
+
+		// Send request
+		const request_ = send(parsedURL.toString(), options);
+
+		if (signal) {
+			signal.addEventListener('abort', abortAndFinalize);
+		}
+
+		const finalize = () => {
+			request_.abort();
+			if (signal) {
+				signal.removeEventListener('abort', abortAndFinalize);
+			}
+		};
+
+		request_.on('error', error => {
+			reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));
+			finalize();
+		});
+
+		fixResponseChunkedTransferBadEnding(request_, error => {
+			if (response && response.body) {
+				response.body.destroy(error);
+			}
+		});
+
+		/* c8 ignore next 18 */
+		if (process.version < 'v14') {
+			// Before Node.js 14, pipeline() does not fully support async iterators and does not always
+			// properly handle when the socket close/end events are out of order.
+			request_.on('socket', s => {
+				let endedWithEventsCount;
+				s.prependListener('end', () => {
+					endedWithEventsCount = s._eventsCount;
+				});
+				s.prependListener('close', hadError => {
+					// if end happened before close but the socket didn't emit an error, do it now
+					if (response && endedWithEventsCount < s._eventsCount && !hadError) {
+						const error = new Error('Premature close');
+						error.code = 'ERR_STREAM_PREMATURE_CLOSE';
+						response.body.emit('error', error);
+					}
+				});
+			});
+		}
+
+		request_.on('response', response_ => {
+			request_.setTimeout(0);
+			const headers = fromRawHeaders(response_.rawHeaders);
+
+			// HTTP fetch step 5
+			if (isRedirect(response_.statusCode)) {
+				// HTTP fetch step 5.2
+				const location = headers.get('Location');
+
+				// HTTP fetch step 5.3
+				let locationURL = null;
+				try {
+					locationURL = location === null ? null : new URL(location, request.url);
+				} catch {
+					// error here can only be invalid URL in Location: header
+					// do not throw when options.redirect == manual
+					// let the user extract the errorneous redirect URL
+					if (request.redirect !== 'manual') {
+						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+						finalize();
+						return;
+					}
+				}
+
+				// HTTP fetch step 5.5
+				switch (request.redirect) {
+					case 'error':
+						reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+						finalize();
+						return;
+					case 'manual':
+						// Nothing to do
+						break;
+					case 'follow': {
+						// HTTP-redirect fetch step 2
+						if (locationURL === null) {
+							break;
+						}
+
+						// HTTP-redirect fetch step 5
+						if (request.counter >= request.follow) {
+							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 6 (counter increment)
+						// Create a new Request object.
+						const requestOptions = {
+							headers: new Headers(request.headers),
+							follow: request.follow,
+							counter: request.counter + 1,
+							agent: request.agent,
+							compress: request.compress,
+							method: request.method,
+							body: clone(request),
+							signal: request.signal,
+							size: request.size,
+							referrer: request.referrer,
+							referrerPolicy: request.referrerPolicy
+						};
+
+						// when forwarding sensitive headers like "Authorization",
+						// "WWW-Authenticate", and "Cookie" to untrusted targets,
+						// headers will be ignored when following a redirect to a domain
+						// that is not a subdomain match or exact match of the initial domain.
+						// For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
+						// will forward the sensitive headers, but a redirect to "bar.com" will not.
+						// headers will also be ignored when following a redirect to a domain using
+						// a different protocol. For example, a redirect from "https://foo.com" to "http://foo.com"
+						// will not forward the sensitive headers
+						if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+								requestOptions.headers.delete(name);
+							}
+						}
+
+						// HTTP-redirect fetch step 9
+						if (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) {
+							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 11
+						if (response_.statusCode === 303 || ((response_.statusCode === 301 || response_.statusCode === 302) && request.method === 'POST')) {
+							requestOptions.method = 'GET';
+							requestOptions.body = undefined;
+							requestOptions.headers.delete('content-length');
+						}
+
+						// HTTP-redirect fetch step 14
+						const responseReferrerPolicy = parseReferrerPolicyFromHeader(headers);
+						if (responseReferrerPolicy) {
+							requestOptions.referrerPolicy = responseReferrerPolicy;
+						}
+
+						// HTTP-redirect fetch step 15
+						resolve(fetch(new Request(locationURL, requestOptions)));
+						finalize();
+						return;
+					}
+
+					default:
+						return reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`));
+				}
+			}
+
+			// Prepare response
+			if (signal) {
+				response_.once('end', () => {
+					signal.removeEventListener('abort', abortAndFinalize);
+				});
+			}
+
+			let body = pump(response_, new PassThrough(), error => {
+				if (error) {
+					reject(error);
+				}
+			});
+			// see https://github.com/nodejs/node/pull/29376
+			/* c8 ignore next 3 */
+			if (process.version < 'v12.10') {
+				response_.on('aborted', abortAndFinalize);
+			}
+
+			const responseOptions = {
+				url: request.url,
+				status: response_.statusCode,
+				statusText: response_.statusMessage,
+				headers,
+				size: request.size,
+				counter: request.counter,
+				highWaterMark: request.highWaterMark
+			};
+
+			// HTTP-network fetch step 12.1.1.3
+			const codings = headers.get('Content-Encoding');
+
+			// HTTP-network fetch step 12.1.1.4: handle content codings
+
+			// in following scenarios we ignore compression support
+			// 1. compression support is disabled
+			// 2. HEAD request
+			// 3. no Content-Encoding header
+			// 4. no content response (204)
+			// 5. content not modified response (304)
+			if (!request.compress || request.method === 'HEAD' || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
+				response = new Response(body, responseOptions);
+				resolve(response);
+				return;
+			}
+
+			// For Node v6+
+			// Be less strict when decoding compressed responses, since sometimes
+			// servers send slightly invalid responses that are still accepted
+			// by common browsers.
+			// Always using Z_SYNC_FLUSH is what cURL does.
+			const zlibOptions = {
+				flush: zlib.Z_SYNC_FLUSH,
+				finishFlush: zlib.Z_SYNC_FLUSH
+			};
+
+			// For gzip
+			if (codings === 'gzip' || codings === 'x-gzip') {
+				body = pump(body, zlib.createGunzip(zlibOptions), error => {
+					if (error) {
+						reject(error);
+					}
+				});
+				response = new Response(body, responseOptions);
+				resolve(response);
+				return;
+			}
+
+			// For deflate
+			if (codings === 'deflate' || codings === 'x-deflate') {
+				// Handle the infamous raw deflate response from old servers
+				// a hack for old IIS and Apache servers
+				const raw = pump(response_, new PassThrough(), error => {
+					if (error) {
+						reject(error);
+					}
+				});
+				raw.once('data', chunk => {
+					// See http://stackoverflow.com/questions/37519828
+					if ((chunk[0] & 0x0F) === 0x08) {
+						body = pump(body, zlib.createInflate(), error => {
+							if (error) {
+								reject(error);
+							}
+						});
+					} else {
+						body = pump(body, zlib.createInflateRaw(), error => {
+							if (error) {
+								reject(error);
+							}
+						});
+					}
+
+					response = new Response(body, responseOptions);
+					resolve(response);
+				});
+				raw.once('end', () => {
+					// Some old IIS servers return zero-length OK deflate responses, so
+					// 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903
+					if (!response) {
+						response = new Response(body, responseOptions);
+						resolve(response);
+					}
+				});
+				return;
+			}
+
+			// For br
+			if (codings === 'br') {
+				body = pump(body, zlib.createBrotliDecompress(), error => {
+					if (error) {
+						reject(error);
+					}
+				});
+				response = new Response(body, responseOptions);
+				resolve(response);
+				return;
+			}
+
+			// Otherwise, use response as-is
+			response = new Response(body, responseOptions);
+			resolve(response);
+		});
+
+		// eslint-disable-next-line promise/prefer-await-to-then
+		writeToStream(request_, request).catch(reject);
+	});
+}
+
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+	const LAST_CHUNK = Buffer.from('0\r\n\r\n');
+
+	let isChunkedTransfer = false;
+	let properLastChunkReceived = false;
+	let previousChunk;
+
+	request.on('response', response => {
+		const {headers} = response;
+		isChunkedTransfer = headers['transfer-encoding'] === 'chunked' && !headers['content-length'];
+	});
+
+	request.on('socket', socket => {
+		const onSocketClose = () => {
+			if (isChunkedTransfer && !properLastChunkReceived) {
+				const error = new Error('Premature close');
+				error.code = 'ERR_STREAM_PREMATURE_CLOSE';
+				errorCallback(error);
+			}
+		};
+
+		const onData = buf => {
+			properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
+
+			// Sometimes final 0-length chunk and end of message code are in separate packets
+			if (!properLastChunkReceived && previousChunk) {
+				properLastChunkReceived = (
+					Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 &&
+					Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0
+				);
+			}
+
+			previousChunk = buf;
+		};
+
+		socket.prependListener('close', onSocketClose);
+		socket.on('data', onData);
+
+		request.on('close', () => {
+			socket.removeListener('close', onSocketClose);
+			socket.removeListener('data', onData);
+		});
+	});
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/request.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/request.js
new file mode 100644
index 0000000000000000000000000000000000000000..af2ebc8e9b6f11783435d3c951eaef500fabbfdc
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/request.js
@@ -0,0 +1,313 @@
+/**
+ * Request.js
+ *
+ * Request class contains server only options
+ *
+ * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
+ */
+
+import {format as formatUrl} from 'node:url';
+import {deprecate} from 'node:util';
+import Headers from './headers.js';
+import Body, {clone, extractContentType, getTotalBytes} from './body.js';
+import {isAbortSignal} from './utils/is.js';
+import {getSearch} from './utils/get-search.js';
+import {
+	validateReferrerPolicy, determineRequestsReferrer, DEFAULT_REFERRER_POLICY
+} from './utils/referrer.js';
+
+const INTERNALS = Symbol('Request internals');
+
+/**
+ * Check if `obj` is an instance of Request.
+ *
+ * @param  {*} object
+ * @return {boolean}
+ */
+const isRequest = object => {
+	return (
+		typeof object === 'object' &&
+		typeof object[INTERNALS] === 'object'
+	);
+};
+
+const doBadDataWarn = deprecate(() => {},
+	'.data is not a valid RequestInit property, use .body instead',
+	'https://github.com/node-fetch/node-fetch/issues/1000 (request)');
+
+/**
+ * Request class
+ *
+ * Ref: https://fetch.spec.whatwg.org/#request-class
+ *
+ * @param   Mixed   input  Url or Request instance
+ * @param   Object  init   Custom options
+ * @return  Void
+ */
+export default class Request extends Body {
+	constructor(input, init = {}) {
+		let parsedURL;
+
+		// Normalize input and force URL to be encoded as UTF-8 (https://github.com/node-fetch/node-fetch/issues/245)
+		if (isRequest(input)) {
+			parsedURL = new URL(input.url);
+		} else {
+			parsedURL = new URL(input);
+			input = {};
+		}
+
+		if (parsedURL.username !== '' || parsedURL.password !== '') {
+			throw new TypeError(`${parsedURL} is an url with embedded credentials.`);
+		}
+
+		let method = init.method || input.method || 'GET';
+		if (/^(delete|get|head|options|post|put)$/i.test(method)) {
+			method = method.toUpperCase();
+		}
+
+		if (!isRequest(init) && 'data' in init) {
+			doBadDataWarn();
+		}
+
+		// eslint-disable-next-line no-eq-null, eqeqeq
+		if ((init.body != null || (isRequest(input) && input.body !== null)) &&
+			(method === 'GET' || method === 'HEAD')) {
+			throw new TypeError('Request with GET/HEAD method cannot have body');
+		}
+
+		const inputBody = init.body ?
+			init.body :
+			(isRequest(input) && input.body !== null ?
+				clone(input) :
+				null);
+
+		super(inputBody, {
+			size: init.size || input.size || 0
+		});
+
+		const headers = new Headers(init.headers || input.headers || {});
+
+		if (inputBody !== null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(inputBody, this);
+			if (contentType) {
+				headers.set('Content-Type', contentType);
+			}
+		}
+
+		let signal = isRequest(input) ?
+			input.signal :
+			null;
+		if ('signal' in init) {
+			signal = init.signal;
+		}
+
+		// eslint-disable-next-line no-eq-null, eqeqeq
+		if (signal != null && !isAbortSignal(signal)) {
+			throw new TypeError('Expected signal to be an instanceof AbortSignal or EventTarget');
+		}
+
+		// §5.4, Request constructor steps, step 15.1
+		// eslint-disable-next-line no-eq-null, eqeqeq
+		let referrer = init.referrer == null ? input.referrer : init.referrer;
+		if (referrer === '') {
+			// §5.4, Request constructor steps, step 15.2
+			referrer = 'no-referrer';
+		} else if (referrer) {
+			// §5.4, Request constructor steps, step 15.3.1, 15.3.2
+			const parsedReferrer = new URL(referrer);
+			// §5.4, Request constructor steps, step 15.3.3, 15.3.4
+			referrer = /^about:(\/\/)?client$/.test(parsedReferrer) ? 'client' : parsedReferrer;
+		} else {
+			referrer = undefined;
+		}
+
+		this[INTERNALS] = {
+			method,
+			redirect: init.redirect || input.redirect || 'follow',
+			headers,
+			parsedURL,
+			signal,
+			referrer
+		};
+
+		// Node-fetch-only options
+		this.follow = init.follow === undefined ? (input.follow === undefined ? 20 : input.follow) : init.follow;
+		this.compress = init.compress === undefined ? (input.compress === undefined ? true : input.compress) : init.compress;
+		this.counter = init.counter || input.counter || 0;
+		this.agent = init.agent || input.agent;
+		this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384;
+		this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false;
+
+		// §5.4, Request constructor steps, step 16.
+		// Default is empty string per https://fetch.spec.whatwg.org/#concept-request-referrer-policy
+		this.referrerPolicy = init.referrerPolicy || input.referrerPolicy || '';
+	}
+
+	/** @returns {string} */
+	get method() {
+		return this[INTERNALS].method;
+	}
+
+	/** @returns {string} */
+	get url() {
+		return formatUrl(this[INTERNALS].parsedURL);
+	}
+
+	/** @returns {Headers} */
+	get headers() {
+		return this[INTERNALS].headers;
+	}
+
+	get redirect() {
+		return this[INTERNALS].redirect;
+	}
+
+	/** @returns {AbortSignal} */
+	get signal() {
+		return this[INTERNALS].signal;
+	}
+
+	// https://fetch.spec.whatwg.org/#dom-request-referrer
+	get referrer() {
+		if (this[INTERNALS].referrer === 'no-referrer') {
+			return '';
+		}
+
+		if (this[INTERNALS].referrer === 'client') {
+			return 'about:client';
+		}
+
+		if (this[INTERNALS].referrer) {
+			return this[INTERNALS].referrer.toString();
+		}
+
+		return undefined;
+	}
+
+	get referrerPolicy() {
+		return this[INTERNALS].referrerPolicy;
+	}
+
+	set referrerPolicy(referrerPolicy) {
+		this[INTERNALS].referrerPolicy = validateReferrerPolicy(referrerPolicy);
+	}
+
+	/**
+	 * Clone this request
+	 *
+	 * @return  Request
+	 */
+	clone() {
+		return new Request(this);
+	}
+
+	get [Symbol.toStringTag]() {
+		return 'Request';
+	}
+}
+
+Object.defineProperties(Request.prototype, {
+	method: {enumerable: true},
+	url: {enumerable: true},
+	headers: {enumerable: true},
+	redirect: {enumerable: true},
+	clone: {enumerable: true},
+	signal: {enumerable: true},
+	referrer: {enumerable: true},
+	referrerPolicy: {enumerable: true}
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param {Request} request - A Request instance
+ * @return The options object to be passed to http.request
+ */
+export const getNodeRequestOptions = request => {
+	const {parsedURL} = request[INTERNALS];
+	const headers = new Headers(request[INTERNALS].headers);
+
+	// Fetch step 1.3
+	if (!headers.has('Accept')) {
+		headers.set('Accept', '*/*');
+	}
+
+	// HTTP-network-or-cache fetch steps 2.4-2.7
+	let contentLengthValue = null;
+	if (request.body === null && /^(post|put)$/i.test(request.method)) {
+		contentLengthValue = '0';
+	}
+
+	if (request.body !== null) {
+		const totalBytes = getTotalBytes(request);
+		// Set Content-Length if totalBytes is a number (that is not NaN)
+		if (typeof totalBytes === 'number' && !Number.isNaN(totalBytes)) {
+			contentLengthValue = String(totalBytes);
+		}
+	}
+
+	if (contentLengthValue) {
+		headers.set('Content-Length', contentLengthValue);
+	}
+
+	// 4.1. Main fetch, step 2.6
+	// > If request's referrer policy is the empty string, then set request's referrer policy to the
+	// > default referrer policy.
+	if (request.referrerPolicy === '') {
+		request.referrerPolicy = DEFAULT_REFERRER_POLICY;
+	}
+
+	// 4.1. Main fetch, step 2.7
+	// > If request's referrer is not "no-referrer", set request's referrer to the result of invoking
+	// > determine request's referrer.
+	if (request.referrer && request.referrer !== 'no-referrer') {
+		request[INTERNALS].referrer = determineRequestsReferrer(request);
+	} else {
+		request[INTERNALS].referrer = 'no-referrer';
+	}
+
+	// 4.5. HTTP-network-or-cache fetch, step 6.9
+	// > If httpRequest's referrer is a URL, then append `Referer`/httpRequest's referrer, serialized
+	// >  and isomorphic encoded, to httpRequest's header list.
+	if (request[INTERNALS].referrer instanceof URL) {
+		headers.set('Referer', request.referrer);
+	}
+
+	// HTTP-network-or-cache fetch step 2.11
+	if (!headers.has('User-Agent')) {
+		headers.set('User-Agent', 'node-fetch');
+	}
+
+	// HTTP-network-or-cache fetch step 2.15
+	if (request.compress && !headers.has('Accept-Encoding')) {
+		headers.set('Accept-Encoding', 'gzip, deflate, br');
+	}
+
+	let {agent} = request;
+	if (typeof agent === 'function') {
+		agent = agent(parsedURL);
+	}
+
+	// HTTP-network fetch step 4.2
+	// chunked encoding is handled by Node.js
+
+	const search = getSearch(parsedURL);
+
+	// Pass the full URL directly to request(), but overwrite the following
+	// options:
+	const options = {
+		// Overwrite search to retain trailing ? (issue #776)
+		path: parsedURL.pathname + search,
+		// The following options are not expressed in the URL
+		method: request.method,
+		headers: headers[Symbol.for('nodejs.util.inspect.custom')](),
+		insecureHTTPParser: request.insecureHTTPParser,
+		agent
+	};
+
+	return {
+		/** @type {URL} */
+		parsedURL,
+		options
+	};
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/response.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/response.js
new file mode 100644
index 0000000000000000000000000000000000000000..9806c0cbabfb75817112360fbd4b5d67d570e417
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/response.js
@@ -0,0 +1,160 @@
+/**
+ * Response.js
+ *
+ * Response class provides content decoding
+ */
+
+import Headers from './headers.js';
+import Body, {clone, extractContentType} from './body.js';
+import {isRedirect} from './utils/is-redirect.js';
+
+const INTERNALS = Symbol('Response internals');
+
+/**
+ * Response class
+ *
+ * Ref: https://fetch.spec.whatwg.org/#response-class
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+export default class Response extends Body {
+	constructor(body = null, options = {}) {
+		super(body, options);
+
+		// eslint-disable-next-line no-eq-null, eqeqeq, no-negated-condition
+		const status = options.status != null ? options.status : 200;
+
+		const headers = new Headers(options.headers);
+
+		if (body !== null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(body, this);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		this[INTERNALS] = {
+			type: 'default',
+			url: options.url,
+			status,
+			statusText: options.statusText || '',
+			headers,
+			counter: options.counter,
+			highWaterMark: options.highWaterMark
+		};
+	}
+
+	get type() {
+		return this[INTERNALS].type;
+	}
+
+	get url() {
+		return this[INTERNALS].url || '';
+	}
+
+	get status() {
+		return this[INTERNALS].status;
+	}
+
+	/**
+	 * Convenience property representing if the request ended normally
+	 */
+	get ok() {
+		return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300;
+	}
+
+	get redirected() {
+		return this[INTERNALS].counter > 0;
+	}
+
+	get statusText() {
+		return this[INTERNALS].statusText;
+	}
+
+	get headers() {
+		return this[INTERNALS].headers;
+	}
+
+	get highWaterMark() {
+		return this[INTERNALS].highWaterMark;
+	}
+
+	/**
+	 * Clone this response
+	 *
+	 * @return  Response
+	 */
+	clone() {
+		return new Response(clone(this, this.highWaterMark), {
+			type: this.type,
+			url: this.url,
+			status: this.status,
+			statusText: this.statusText,
+			headers: this.headers,
+			ok: this.ok,
+			redirected: this.redirected,
+			size: this.size,
+			highWaterMark: this.highWaterMark
+		});
+	}
+
+	/**
+	 * @param {string} url    The URL that the new response is to originate from.
+	 * @param {number} status An optional status code for the response (e.g., 302.)
+	 * @returns {Response}    A Response object.
+	 */
+	static redirect(url, status = 302) {
+		if (!isRedirect(status)) {
+			throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
+		}
+
+		return new Response(null, {
+			headers: {
+				location: new URL(url).toString()
+			},
+			status
+		});
+	}
+
+	static error() {
+		const response = new Response(null, {status: 0, statusText: ''});
+		response[INTERNALS].type = 'error';
+		return response;
+	}
+
+	static json(data = undefined, init = {}) {
+		const body = JSON.stringify(data);
+
+		if (body === undefined) {
+			throw new TypeError('data is not JSON serializable');
+		}
+
+		const headers = new Headers(init && init.headers);
+
+		if (!headers.has('content-type')) {
+			headers.set('content-type', 'application/json');
+		}
+
+		return new Response(body, {
+			...init,
+			headers
+		});
+	}
+
+	get [Symbol.toStringTag]() {
+		return 'Response';
+	}
+}
+
+Object.defineProperties(Response.prototype, {
+	type: {enumerable: true},
+	url: {enumerable: true},
+	status: {enumerable: true},
+	ok: {enumerable: true},
+	redirected: {enumerable: true},
+	statusText: {enumerable: true},
+	headers: {enumerable: true},
+	clone: {enumerable: true}
+});
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/get-search.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/get-search.js
new file mode 100644
index 0000000000000000000000000000000000000000..d067e7c7f7f809034da527ec5de477d2c16e48c7
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/get-search.js
@@ -0,0 +1,9 @@
+export const getSearch = parsedURL => {
+	if (parsedURL.search) {
+		return parsedURL.search;
+	}
+
+	const lastOffset = parsedURL.href.length - 1;
+	const hash = parsedURL.hash || (parsedURL.href[lastOffset] === '#' ? '#' : '');
+	return parsedURL.href[lastOffset - hash.length] === '?' ? '?' : '';
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is-redirect.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is-redirect.js
new file mode 100644
index 0000000000000000000000000000000000000000..d1347f005bd804100e6bbb956b19adb31b93661a
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is-redirect.js
@@ -0,0 +1,11 @@
+const redirectStatus = new Set([301, 302, 303, 307, 308]);
+
+/**
+ * Redirect code matching
+ *
+ * @param {number} code - Status code
+ * @return {boolean}
+ */
+export const isRedirect = code => {
+	return redirectStatus.has(code);
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is.js
new file mode 100644
index 0000000000000000000000000000000000000000..f9e467e45fe7f214725f49f2bed3f137ddc06e20
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/is.js
@@ -0,0 +1,87 @@
+/**
+ * Is.js
+ *
+ * Object type checks.
+ */
+
+const NAME = Symbol.toStringTag;
+
+/**
+ * Check if `obj` is a URLSearchParams object
+ * ref: https://github.com/node-fetch/node-fetch/issues/296#issuecomment-307598143
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isURLSearchParameters = object => {
+	return (
+		typeof object === 'object' &&
+		typeof object.append === 'function' &&
+		typeof object.delete === 'function' &&
+		typeof object.get === 'function' &&
+		typeof object.getAll === 'function' &&
+		typeof object.has === 'function' &&
+		typeof object.set === 'function' &&
+		typeof object.sort === 'function' &&
+		object[NAME] === 'URLSearchParams'
+	);
+};
+
+/**
+ * Check if `object` is a W3C `Blob` object (which `File` inherits from)
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isBlob = object => {
+	return (
+		object &&
+		typeof object === 'object' &&
+		typeof object.arrayBuffer === 'function' &&
+		typeof object.type === 'string' &&
+		typeof object.stream === 'function' &&
+		typeof object.constructor === 'function' &&
+		/^(Blob|File)$/.test(object[NAME])
+	);
+};
+
+/**
+ * Check if `obj` is an instance of AbortSignal.
+ * @param {*} object - Object to check for
+ * @return {boolean}
+ */
+export const isAbortSignal = object => {
+	return (
+		typeof object === 'object' && (
+			object[NAME] === 'AbortSignal' ||
+			object[NAME] === 'EventTarget'
+		)
+	);
+};
+
+/**
+ * isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of
+ * the parent domain.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+export const isDomainOrSubdomain = (destination, original) => {
+	const orig = new URL(original).hostname;
+	const dest = new URL(destination).hostname;
+
+	return orig === dest || orig.endsWith(`.${dest}`);
+};
+
+/**
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+export const isSameProtocol = (destination, original) => {
+	const orig = new URL(original).protocol;
+	const dest = new URL(destination).protocol;
+
+	return orig === dest;
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/multipart-parser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/multipart-parser.js
new file mode 100644
index 0000000000000000000000000000000000000000..5ad06f98e105dc96878720a6c4fe2044c89da297
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/multipart-parser.js
@@ -0,0 +1,432 @@
+import {File} from 'fetch-blob/from.js';
+import {FormData} from 'formdata-polyfill/esm.min.js';
+
+let s = 0;
+const S = {
+	START_BOUNDARY: s++,
+	HEADER_FIELD_START: s++,
+	HEADER_FIELD: s++,
+	HEADER_VALUE_START: s++,
+	HEADER_VALUE: s++,
+	HEADER_VALUE_ALMOST_DONE: s++,
+	HEADERS_ALMOST_DONE: s++,
+	PART_DATA_START: s++,
+	PART_DATA: s++,
+	END: s++
+};
+
+let f = 1;
+const F = {
+	PART_BOUNDARY: f,
+	LAST_BOUNDARY: f *= 2
+};
+
+const LF = 10;
+const CR = 13;
+const SPACE = 32;
+const HYPHEN = 45;
+const COLON = 58;
+const A = 97;
+const Z = 122;
+
+const lower = c => c | 0x20;
+
+const noop = () => {};
+
+class MultipartParser {
+	/**
+	 * @param {string} boundary
+	 */
+	constructor(boundary) {
+		this.index = 0;
+		this.flags = 0;
+
+		this.onHeaderEnd = noop;
+		this.onHeaderField = noop;
+		this.onHeadersEnd = noop;
+		this.onHeaderValue = noop;
+		this.onPartBegin = noop;
+		this.onPartData = noop;
+		this.onPartEnd = noop;
+
+		this.boundaryChars = {};
+
+		boundary = '\r\n--' + boundary;
+		const ui8a = new Uint8Array(boundary.length);
+		for (let i = 0; i < boundary.length; i++) {
+			ui8a[i] = boundary.charCodeAt(i);
+			this.boundaryChars[ui8a[i]] = true;
+		}
+
+		this.boundary = ui8a;
+		this.lookbehind = new Uint8Array(this.boundary.length + 8);
+		this.state = S.START_BOUNDARY;
+	}
+
+	/**
+	 * @param {Uint8Array} data
+	 */
+	write(data) {
+		let i = 0;
+		const length_ = data.length;
+		let previousIndex = this.index;
+		let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
+		const boundaryLength = this.boundary.length;
+		const boundaryEnd = boundaryLength - 1;
+		const bufferLength = data.length;
+		let c;
+		let cl;
+
+		const mark = name => {
+			this[name + 'Mark'] = i;
+		};
+
+		const clear = name => {
+			delete this[name + 'Mark'];
+		};
+
+		const callback = (callbackSymbol, start, end, ui8a) => {
+			if (start === undefined || start !== end) {
+				this[callbackSymbol](ui8a && ui8a.subarray(start, end));
+			}
+		};
+
+		const dataCallback = (name, clear) => {
+			const markSymbol = name + 'Mark';
+			if (!(markSymbol in this)) {
+				return;
+			}
+
+			if (clear) {
+				callback(name, this[markSymbol], i, data);
+				delete this[markSymbol];
+			} else {
+				callback(name, this[markSymbol], data.length, data);
+				this[markSymbol] = 0;
+			}
+		};
+
+		for (i = 0; i < length_; i++) {
+			c = data[i];
+
+			switch (state) {
+				case S.START_BOUNDARY:
+					if (index === boundary.length - 2) {
+						if (c === HYPHEN) {
+							flags |= F.LAST_BOUNDARY;
+						} else if (c !== CR) {
+							return;
+						}
+
+						index++;
+						break;
+					} else if (index - 1 === boundary.length - 2) {
+						if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
+							state = S.END;
+							flags = 0;
+						} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
+							index = 0;
+							callback('onPartBegin');
+							state = S.HEADER_FIELD_START;
+						} else {
+							return;
+						}
+
+						break;
+					}
+
+					if (c !== boundary[index + 2]) {
+						index = -2;
+					}
+
+					if (c === boundary[index + 2]) {
+						index++;
+					}
+
+					break;
+				case S.HEADER_FIELD_START:
+					state = S.HEADER_FIELD;
+					mark('onHeaderField');
+					index = 0;
+					// falls through
+				case S.HEADER_FIELD:
+					if (c === CR) {
+						clear('onHeaderField');
+						state = S.HEADERS_ALMOST_DONE;
+						break;
+					}
+
+					index++;
+					if (c === HYPHEN) {
+						break;
+					}
+
+					if (c === COLON) {
+						if (index === 1) {
+							// empty header field
+							return;
+						}
+
+						dataCallback('onHeaderField', true);
+						state = S.HEADER_VALUE_START;
+						break;
+					}
+
+					cl = lower(c);
+					if (cl < A || cl > Z) {
+						return;
+					}
+
+					break;
+				case S.HEADER_VALUE_START:
+					if (c === SPACE) {
+						break;
+					}
+
+					mark('onHeaderValue');
+					state = S.HEADER_VALUE;
+					// falls through
+				case S.HEADER_VALUE:
+					if (c === CR) {
+						dataCallback('onHeaderValue', true);
+						callback('onHeaderEnd');
+						state = S.HEADER_VALUE_ALMOST_DONE;
+					}
+
+					break;
+				case S.HEADER_VALUE_ALMOST_DONE:
+					if (c !== LF) {
+						return;
+					}
+
+					state = S.HEADER_FIELD_START;
+					break;
+				case S.HEADERS_ALMOST_DONE:
+					if (c !== LF) {
+						return;
+					}
+
+					callback('onHeadersEnd');
+					state = S.PART_DATA_START;
+					break;
+				case S.PART_DATA_START:
+					state = S.PART_DATA;
+					mark('onPartData');
+					// falls through
+				case S.PART_DATA:
+					previousIndex = index;
+
+					if (index === 0) {
+						// boyer-moore derrived algorithm to safely skip non-boundary data
+						i += boundaryEnd;
+						while (i < bufferLength && !(data[i] in boundaryChars)) {
+							i += boundaryLength;
+						}
+
+						i -= boundaryEnd;
+						c = data[i];
+					}
+
+					if (index < boundary.length) {
+						if (boundary[index] === c) {
+							if (index === 0) {
+								dataCallback('onPartData', true);
+							}
+
+							index++;
+						} else {
+							index = 0;
+						}
+					} else if (index === boundary.length) {
+						index++;
+						if (c === CR) {
+							// CR = part boundary
+							flags |= F.PART_BOUNDARY;
+						} else if (c === HYPHEN) {
+							// HYPHEN = end boundary
+							flags |= F.LAST_BOUNDARY;
+						} else {
+							index = 0;
+						}
+					} else if (index - 1 === boundary.length) {
+						if (flags & F.PART_BOUNDARY) {
+							index = 0;
+							if (c === LF) {
+								// unset the PART_BOUNDARY flag
+								flags &= ~F.PART_BOUNDARY;
+								callback('onPartEnd');
+								callback('onPartBegin');
+								state = S.HEADER_FIELD_START;
+								break;
+							}
+						} else if (flags & F.LAST_BOUNDARY) {
+							if (c === HYPHEN) {
+								callback('onPartEnd');
+								state = S.END;
+								flags = 0;
+							} else {
+								index = 0;
+							}
+						} else {
+							index = 0;
+						}
+					}
+
+					if (index > 0) {
+						// when matching a possible boundary, keep a lookbehind reference
+						// in case it turns out to be a false lead
+						lookbehind[index - 1] = c;
+					} else if (previousIndex > 0) {
+						// if our boundary turned out to be rubbish, the captured lookbehind
+						// belongs to partData
+						const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
+						callback('onPartData', 0, previousIndex, _lookbehind);
+						previousIndex = 0;
+						mark('onPartData');
+
+						// reconsider the current character even so it interrupted the sequence
+						// it could be the beginning of a new sequence
+						i--;
+					}
+
+					break;
+				case S.END:
+					break;
+				default:
+					throw new Error(`Unexpected state entered: ${state}`);
+			}
+		}
+
+		dataCallback('onHeaderField');
+		dataCallback('onHeaderValue');
+		dataCallback('onPartData');
+
+		// Update properties for the next call
+		this.index = index;
+		this.state = state;
+		this.flags = flags;
+	}
+
+	end() {
+		if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
+			(this.state === S.PART_DATA && this.index === this.boundary.length)) {
+			this.onPartEnd();
+		} else if (this.state !== S.END) {
+			throw new Error('MultipartParser.end(): stream ended unexpectedly');
+		}
+	}
+}
+
+function _fileName(headerValue) {
+	// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+	const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
+	if (!m) {
+		return;
+	}
+
+	const match = m[2] || m[3] || '';
+	let filename = match.slice(match.lastIndexOf('\\') + 1);
+	filename = filename.replace(/%22/g, '"');
+	filename = filename.replace(/&#(\d{4});/g, (m, code) => {
+		return String.fromCharCode(code);
+	});
+	return filename;
+}
+
+export async function toFormData(Body, ct) {
+	if (!/multipart/i.test(ct)) {
+		throw new TypeError('Failed to fetch');
+	}
+
+	const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
+
+	if (!m) {
+		throw new TypeError('no or bad content-type header, no multipart boundary');
+	}
+
+	const parser = new MultipartParser(m[1] || m[2]);
+
+	let headerField;
+	let headerValue;
+	let entryValue;
+	let entryName;
+	let contentType;
+	let filename;
+	const entryChunks = [];
+	const formData = new FormData();
+
+	const onPartData = ui8a => {
+		entryValue += decoder.decode(ui8a, {stream: true});
+	};
+
+	const appendToFile = ui8a => {
+		entryChunks.push(ui8a);
+	};
+
+	const appendFileToFormData = () => {
+		const file = new File(entryChunks, filename, {type: contentType});
+		formData.append(entryName, file);
+	};
+
+	const appendEntryToFormData = () => {
+		formData.append(entryName, entryValue);
+	};
+
+	const decoder = new TextDecoder('utf-8');
+	decoder.decode();
+
+	parser.onPartBegin = function () {
+		parser.onPartData = onPartData;
+		parser.onPartEnd = appendEntryToFormData;
+
+		headerField = '';
+		headerValue = '';
+		entryValue = '';
+		entryName = '';
+		contentType = '';
+		filename = null;
+		entryChunks.length = 0;
+	};
+
+	parser.onHeaderField = function (ui8a) {
+		headerField += decoder.decode(ui8a, {stream: true});
+	};
+
+	parser.onHeaderValue = function (ui8a) {
+		headerValue += decoder.decode(ui8a, {stream: true});
+	};
+
+	parser.onHeaderEnd = function () {
+		headerValue += decoder.decode();
+		headerField = headerField.toLowerCase();
+
+		if (headerField === 'content-disposition') {
+			// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+			const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
+
+			if (m) {
+				entryName = m[2] || m[3] || '';
+			}
+
+			filename = _fileName(headerValue);
+
+			if (filename) {
+				parser.onPartData = appendToFile;
+				parser.onPartEnd = appendFileToFormData;
+			}
+		} else if (headerField === 'content-type') {
+			contentType = headerValue;
+		}
+
+		headerValue = '';
+		headerField = '';
+	};
+
+	for await (const chunk of Body) {
+		parser.write(chunk);
+	}
+
+	parser.end();
+
+	return formData;
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/referrer.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/referrer.js
new file mode 100644
index 0000000000000000000000000000000000000000..6741f2fcc3b483b744d88e16bb3d418120045664
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/node-fetch/src/utils/referrer.js
@@ -0,0 +1,340 @@
+import {isIP} from 'node:net';
+
+/**
+ * @external URL
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}
+ */
+
+/**
+ * @module utils/referrer
+ * @private
+ */
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}
+ * @param {string} URL
+ * @param {boolean} [originOnly=false]
+ */
+export function stripURLForUseAsAReferrer(url, originOnly = false) {
+	// 1. If url is null, return no referrer.
+	if (url == null) { // eslint-disable-line no-eq-null, eqeqeq
+		return 'no-referrer';
+	}
+
+	url = new URL(url);
+
+	// 2. If url's scheme is a local scheme, then return no referrer.
+	if (/^(about|blob|data):$/.test(url.protocol)) {
+		return 'no-referrer';
+	}
+
+	// 3. Set url's username to the empty string.
+	url.username = '';
+
+	// 4. Set url's password to null.
+	// Note: `null` appears to be a mistake as this actually results in the password being `"null"`.
+	url.password = '';
+
+	// 5. Set url's fragment to null.
+	// Note: `null` appears to be a mistake as this actually results in the fragment being `"#null"`.
+	url.hash = '';
+
+	// 6. If the origin-only flag is true, then:
+	if (originOnly) {
+		// 6.1. Set url's path to null.
+		// Note: `null` appears to be a mistake as this actually results in the path being `"/null"`.
+		url.pathname = '';
+
+		// 6.2. Set url's query to null.
+		// Note: `null` appears to be a mistake as this actually results in the query being `"?null"`.
+		url.search = '';
+	}
+
+	// 7. Return url.
+	return url;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}
+ */
+export const ReferrerPolicy = new Set([
+	'',
+	'no-referrer',
+	'no-referrer-when-downgrade',
+	'same-origin',
+	'origin',
+	'strict-origin',
+	'origin-when-cross-origin',
+	'strict-origin-when-cross-origin',
+	'unsafe-url'
+]);
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}
+ */
+export const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}
+ * @param {string} referrerPolicy
+ * @returns {string} referrerPolicy
+ */
+export function validateReferrerPolicy(referrerPolicy) {
+	if (!ReferrerPolicy.has(referrerPolicy)) {
+		throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);
+	}
+
+	return referrerPolicy;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}
+ * @param {external:URL} url
+ * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
+ */
+export function isOriginPotentiallyTrustworthy(url) {
+	// 1. If origin is an opaque origin, return "Not Trustworthy".
+	// Not applicable
+
+	// 2. Assert: origin is a tuple origin.
+	// Not for implementations
+
+	// 3. If origin's scheme is either "https" or "wss", return "Potentially Trustworthy".
+	if (/^(http|ws)s:$/.test(url.protocol)) {
+		return true;
+	}
+
+	// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy".
+	const hostIp = url.host.replace(/(^\[)|(]$)/g, '');
+	const hostIPVersion = isIP(hostIp);
+
+	if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
+		return true;
+	}
+
+	if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {
+		return true;
+	}
+
+	// 5. If origin's host component is "localhost" or falls within ".localhost", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return "Potentially Trustworthy".
+	// We are returning FALSE here because we cannot ensure conformance to
+	// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)
+	if (url.host === 'localhost' || url.host.endsWith('.localhost')) {
+		return false;
+	}
+
+	// 6. If origin's scheme component is file, return "Potentially Trustworthy".
+	if (url.protocol === 'file:') {
+		return true;
+	}
+
+	// 7. If origin's scheme component is one which the user agent considers to be authenticated, return "Potentially Trustworthy".
+	// Not supported
+
+	// 8. If origin has been configured as a trustworthy origin, return "Potentially Trustworthy".
+	// Not supported
+
+	// 9. Return "Not Trustworthy".
+	return false;
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}
+ * @param {external:URL} url
+ * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
+ */
+export function isUrlPotentiallyTrustworthy(url) {
+	// 1. If url is "about:blank" or "about:srcdoc", return "Potentially Trustworthy".
+	if (/^about:(blank|srcdoc)$/.test(url)) {
+		return true;
+	}
+
+	// 2. If url's scheme is "data", return "Potentially Trustworthy".
+	if (url.protocol === 'data:') {
+		return true;
+	}
+
+	// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were
+	// created. Therefore, blobs created in a trustworthy origin will themselves be potentially
+	// trustworthy.
+	if (/^(blob|filesystem):$/.test(url.protocol)) {
+		return true;
+	}
+
+	// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.
+	return isOriginPotentiallyTrustworthy(url);
+}
+
+/**
+ * Modifies the referrerURL to enforce any extra security policy considerations.
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
+ * @callback module:utils/referrer~referrerURLCallback
+ * @param {external:URL} referrerURL
+ * @returns {external:URL} modified referrerURL
+ */
+
+/**
+ * Modifies the referrerOrigin to enforce any extra security policy considerations.
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
+ * @callback module:utils/referrer~referrerOriginCallback
+ * @param {external:URL} referrerOrigin
+ * @returns {external:URL} modified referrerOrigin
+ */
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}
+ * @param {Request} request
+ * @param {object} o
+ * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback
+ * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback
+ * @returns {external:URL} Request's referrer
+ */
+export function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {
+	// There are 2 notes in the specification about invalid pre-conditions.  We return null, here, for
+	// these cases:
+	// > Note: If request's referrer is "no-referrer", Fetch will not call into this algorithm.
+	// > Note: If request's referrer policy is the empty string, Fetch will not call into this
+	// > algorithm.
+	if (request.referrer === 'no-referrer' || request.referrerPolicy === '') {
+		return null;
+	}
+
+	// 1. Let policy be request's associated referrer policy.
+	const policy = request.referrerPolicy;
+
+	// 2. Let environment be request's client.
+	// not applicable to node.js
+
+	// 3. Switch on request's referrer:
+	if (request.referrer === 'about:client') {
+		return 'no-referrer';
+	}
+
+	// "a URL": Let referrerSource be request's referrer.
+	const referrerSource = request.referrer;
+
+	// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.
+	let referrerURL = stripURLForUseAsAReferrer(referrerSource);
+
+	// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the
+	//    origin-only flag set to true.
+	let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);
+
+	// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set
+	//    referrerURL to referrerOrigin.
+	if (referrerURL.toString().length > 4096) {
+		referrerURL = referrerOrigin;
+	}
+
+	// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary
+	//    policy considerations in the interests of minimizing data leakage. For example, the user
+	//    agent could strip the URL down to an origin, modify its host, replace it with an empty
+	//    string, etc.
+	if (referrerURLCallback) {
+		referrerURL = referrerURLCallback(referrerURL);
+	}
+
+	if (referrerOriginCallback) {
+		referrerOrigin = referrerOriginCallback(referrerOrigin);
+	}
+
+	// 8.Execute the statements corresponding to the value of policy:
+	const currentURL = new URL(request.url);
+
+	switch (policy) {
+		case 'no-referrer':
+			return 'no-referrer';
+
+		case 'origin':
+			return referrerOrigin;
+
+		case 'unsafe-url':
+			return referrerURL;
+
+		case 'strict-origin':
+			// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+			//    potentially trustworthy URL, then return no referrer.
+			if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+				return 'no-referrer';
+			}
+
+			// 2. Return referrerOrigin.
+			return referrerOrigin.toString();
+
+		case 'strict-origin-when-cross-origin':
+			// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+			//    return referrerURL.
+			if (referrerURL.origin === currentURL.origin) {
+				return referrerURL;
+			}
+
+			// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+			//    potentially trustworthy URL, then return no referrer.
+			if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+				return 'no-referrer';
+			}
+
+			// 3. Return referrerOrigin.
+			return referrerOrigin;
+
+		case 'same-origin':
+			// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+			//    return referrerURL.
+			if (referrerURL.origin === currentURL.origin) {
+				return referrerURL;
+			}
+
+			// 2. Return no referrer.
+			return 'no-referrer';
+
+		case 'origin-when-cross-origin':
+			// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
+			//    return referrerURL.
+			if (referrerURL.origin === currentURL.origin) {
+				return referrerURL;
+			}
+
+			// Return referrerOrigin.
+			return referrerOrigin;
+
+		case 'no-referrer-when-downgrade':
+			// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
+			//    potentially trustworthy URL, then return no referrer.
+			if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+				return 'no-referrer';
+			}
+
+			// 2. Return referrerURL.
+			return referrerURL;
+
+		default:
+			throw new TypeError(`Invalid referrerPolicy: ${policy}`);
+	}
+}
+
+/**
+ * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}
+ * @param {Headers} headers Response headers
+ * @returns {string} policy
+ */
+export function parseReferrerPolicyFromHeader(headers) {
+	// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`
+	//    and response’s header list.
+	const policyTokens = (headers.get('referrer-policy') || '').split(/[,\s]+/);
+
+	// 2. Let policy be the empty string.
+	let policy = '';
+
+	// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty
+	//    string, then set policy to token.
+	// Note: This algorithm loops over multiple policy values to allow deployment of new policy
+	// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.
+	for (const token of policyTokens) {
+		if (token && ReferrerPolicy.has(token)) {
+			policy = token;
+		}
+	}
+
+	// 4. Return policy.
+	return policy;
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..62c8250ab4e3ed1118f8cb208b3a45cfc7c43686
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = opts => {
+	opts = opts || {};
+
+	const env = opts.env || process.env;
+	const platform = opts.platform || process.platform;
+
+	if (platform !== 'win32') {
+		return 'PATH';
+	}
+
+	return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path';
+};
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/license
new file mode 100644
index 0000000000000000000000000000000000000000..654d0bfe943437d43242325b1fbcff5f400d84ee
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus  (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..81e0e8bed260677511523fbf87c98435d044d2cf
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/package.json
@@ -0,0 +1,39 @@
+{
+  "name": "path-key",
+  "version": "2.0.1",
+  "description": "Get the PATH environment variable key cross-platform",
+  "license": "MIT",
+  "repository": "sindresorhus/path-key",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "engines": {
+    "node": ">=4"
+  },
+  "scripts": {
+    "test": "xo && ava"
+  },
+  "files": [
+    "index.js"
+  ],
+  "keywords": [
+    "path",
+    "key",
+    "environment",
+    "env",
+    "variable",
+    "var",
+    "get",
+    "cross-platform",
+    "windows"
+  ],
+  "devDependencies": {
+    "ava": "*",
+    "xo": "*"
+  },
+  "xo": {
+    "esnext": true
+  }
+}
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/readme.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..cb5710aace72d26d9e2e6931bbaa507c79e9be25
--- /dev/null
+++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/npm-run-path/node_modules/path-key/readme.md
@@ -0,0 +1,51 @@
+# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
+
+> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
+
+It's usually `PATH`, but on Windows it can be any casing like `Path`...
+
+
+## Install
+
+```
+$ npm install --save path-key
+```
+
+
+## Usage
+
+```js
+const pathKey = require('path-key');
+
+const key = pathKey();
+//=> 'PATH'
+
+const PATH = process.env[key];
+//=> '/usr/local/bin:/usr/bin:/bin'
+```
+
+
+## API
+
+### pathKey([options])
+
+#### options
+
+##### env
+
+Type: `Object`
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) + +Use a custom environment variables object. + +#### platform + +Type: `string`
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) + +Get the PATH key for a specific platform. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/dependabot.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..47a54f3575c06ebba4a64e2e75254c081592e8b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 +- package-ecosystem: npm + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/workflows/ci.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ff416167c10dfbd7a2ebe43ec2979824808ad95f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI +on: + push: + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [14, 16, 18, 20] + os: [macos-latest, ubuntu-latest, windows-latest] + exclude: + - node-version: 14 + os: windows-latest + + steps: + + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install + run: | + npm install --ignore-scripts + + - name: Run tests + run: | + npm run test + + automerge: + needs: test + runs-on: ubuntu-latest + steps: + - uses: fastify/github-action-merge-dependabot@v3.9 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/base.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/base.test.js new file mode 100644 index 0000000000000000000000000000000000000000..d81a030ad0210149a3b11820f179bcfe13e8f429 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/base.test.js @@ -0,0 +1,30 @@ +'use strict' + +const { test } = require('tap') +const { fork } = require('child_process') +const { join } = require('path') +const { once } = require('events') +const { register } = require('..') + +const files = [ + 'close.js', + 'beforeExit', + 'gc-not-close.js', + 'unregister.js' +] + +for (const file of files) { + test(file, async ({ equal }) => { + const child = fork(join(__dirname, 'fixtures', file), [], { + execArgv: ['--expose-gc'] + }) + + const [code] = await once(child, 'close') + + equal(code, 0) + }) +} + +test('undefined', async ({ throws }) => { + throws(() => register(undefined)) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js new file mode 100644 index 0000000000000000000000000000000000000000..26ce2ffccab8b7e0904904c9bc1c12976ba40e9e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js @@ -0,0 +1,23 @@ +'use strict' + +const t = require('tap') +const { register, unregister } = require('..') + +process.on('warning', () => { + t.fail('warning emitted') +}) + +const objs = [] +for (let i = 0; i < 20; i++) { + const obj = { i } + objs.push(obj) + register(obj, shutdown) +} + +for (const obj of objs) { + unregister(obj) +} + +t.pass('completed') + +function shutdown () {} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js new file mode 100644 index 0000000000000000000000000000000000000000..512cfa355873f025d62d2674cdcae90c9ac8f53f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js @@ -0,0 +1,33 @@ +'use strict' + +const { unregister, registerBeforeExit } = require('../..') +const assert = require('assert') + +function setup () { + const obj = { foo: 'bar' } + registerBeforeExit(obj, shutdown) +} + +let shutdownCalled = false +let timeoutFinished = false +function shutdown (obj, event) { + shutdownCalled = true + if (event === 'beforeExit') { + setTimeout(function () { + timeoutFinished = true + assert.strictEqual(obj.foo, 'bar') + unregister(obj) + }, 100) + process.on('beforeExit', function () { + assert.strictEqual(timeoutFinished, true) + }) + } else { + throw new Error('different event') + } +} + +setup() + +process.on('exit', function () { + assert.strictEqual(shutdownCalled, true) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/close.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/close.js new file mode 100644 index 0000000000000000000000000000000000000000..3ddf9837f519f3e4fee8555e13b533847bc6f363 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/close.js @@ -0,0 +1,21 @@ +'use strict' + +const { register } = require('../..') +const assert = require('assert') + +function setup () { + const obj = { foo: 'bar' } + register(obj, shutdown) +} + +let shutdownCalled = false +function shutdown (obj) { + shutdownCalled = true + assert.strictEqual(obj.foo, 'bar') +} + +setup() + +process.on('exit', function () { + assert.strictEqual(shutdownCalled, true) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js new file mode 100644 index 0000000000000000000000000000000000000000..f23c301920c6c1e0fbcb5e4e23b5e1ad8877739d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js @@ -0,0 +1,24 @@ +'use strict' + +const { register } = require('../..') +const assert = require('assert') + +function setup () { + let obj = { foo: 'bar' } + register(obj, shutdown) + setImmediate(function () { + obj = undefined + gc() // eslint-disable-line + }) +} + +let shutdownCalled = false +function shutdown (obj) { + shutdownCalled = true +} + +setup() + +process.on('exit', function () { + assert.strictEqual(shutdownCalled, false) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/unregister.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/unregister.js new file mode 100644 index 0000000000000000000000000000000000000000..5fe245f195658734d52dac7d33e8ab6e8800469c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/on-exit-leak-free/test/fixtures/unregister.js @@ -0,0 +1,24 @@ +'use strict' + +const { register, unregister } = require('../..') +const assert = require('assert') + +function setup () { + const obj = { foo: 'bar' } + register(obj, shutdown) + setImmediate(function () { + unregister(obj) + unregister(obj) // twice, this should not throw + }) +} + +let shutdownCalled = false +function shutdown (obj) { + shutdownCalled = true +} + +setup() + +process.on('exit', function () { + assert.strictEqual(shutdownCalled, false) +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f0b5da67156ef4b1c1eb70cd9f7d300452644c86 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts @@ -0,0 +1,7 @@ +declare class PartialJSON extends Error { +} +declare class MalformedJSON extends Error { +} +declare const partialParse: (input: string) => any; +export { partialParse, PartialJSON, MalformedJSON }; +//# sourceMappingURL=parser.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1f7a0be65e7b47e344a93d71231c34a98198c6e7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.mts","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":"AAkCA,cAAM,WAAY,SAAQ,KAAK;CAAG;AAElC,cAAM,aAAc,SAAQ,KAAK;CAAG;AAgNpC,QAAA,MAAM,YAAY,GAAI,OAAO,MAAM,QAA4C,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5ef5c37d99f9e6f7dad42ec1cf85c274772a758a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts @@ -0,0 +1,7 @@ +declare class PartialJSON extends Error { +} +declare class MalformedJSON extends Error { +} +declare const partialParse: (input: string) => any; +export { partialParse, PartialJSON, MalformedJSON }; +//# sourceMappingURL=parser.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..764954adcfc40f2f897bf29db144334f6b9cb41e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":"AAkCA,cAAM,WAAY,SAAQ,KAAK;CAAG;AAElC,cAAM,aAAc,SAAQ,KAAK;CAAG;AAgNpC,QAAA,MAAM,YAAY,GAAI,OAAO,MAAM,QAA4C,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js new file mode 100644 index 0000000000000000000000000000000000000000..83126bcf33f1e0f5110f36d27d4a00844b436d44 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js @@ -0,0 +1,246 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MalformedJSON = exports.PartialJSON = exports.partialParse = void 0; +const STR = 0b000000001; +const NUM = 0b000000010; +const ARR = 0b000000100; +const OBJ = 0b000001000; +const NULL = 0b000010000; +const BOOL = 0b000100000; +const NAN = 0b001000000; +const INFINITY = 0b010000000; +const MINUS_INFINITY = 0b100000000; +const INF = INFINITY | MINUS_INFINITY; +const SPECIAL = NULL | BOOL | INF | NAN; +const ATOM = STR | NUM | SPECIAL; +const COLLECTION = ARR | OBJ; +const ALL = ATOM | COLLECTION; +const Allow = { + STR, + NUM, + ARR, + OBJ, + NULL, + BOOL, + NAN, + INFINITY, + MINUS_INFINITY, + INF, + SPECIAL, + ATOM, + COLLECTION, + ALL, +}; +// The JSON string segment was unable to be parsed completely +class PartialJSON extends Error { +} +exports.PartialJSON = PartialJSON; +class MalformedJSON extends Error { +} +exports.MalformedJSON = MalformedJSON; +/** + * Parse incomplete JSON + * @param {string} jsonString Partial JSON to be parsed + * @param {number} allowPartial Specify what types are allowed to be partial, see {@link Allow} for details + * @returns The parsed JSON + * @throws {PartialJSON} If the JSON is incomplete (related to the `allow` parameter) + * @throws {MalformedJSON} If the JSON is malformed + */ +function parseJSON(jsonString, allowPartial = Allow.ALL) { + if (typeof jsonString !== 'string') { + throw new TypeError(`expecting str, got ${typeof jsonString}`); + } + if (!jsonString.trim()) { + throw new Error(`${jsonString} is empty`); + } + return _parseJSON(jsonString.trim(), allowPartial); +} +const _parseJSON = (jsonString, allow) => { + const length = jsonString.length; + let index = 0; + const markPartialJSON = (msg) => { + throw new PartialJSON(`${msg} at position ${index}`); + }; + const throwMalformedError = (msg) => { + throw new MalformedJSON(`${msg} at position ${index}`); + }; + const parseAny = () => { + skipBlank(); + if (index >= length) + markPartialJSON('Unexpected end of input'); + if (jsonString[index] === '"') + return parseStr(); + if (jsonString[index] === '{') + return parseObj(); + if (jsonString[index] === '[') + return parseArr(); + if (jsonString.substring(index, index + 4) === 'null' || + (Allow.NULL & allow && length - index < 4 && 'null'.startsWith(jsonString.substring(index)))) { + index += 4; + return null; + } + if (jsonString.substring(index, index + 4) === 'true' || + (Allow.BOOL & allow && length - index < 4 && 'true'.startsWith(jsonString.substring(index)))) { + index += 4; + return true; + } + if (jsonString.substring(index, index + 5) === 'false' || + (Allow.BOOL & allow && length - index < 5 && 'false'.startsWith(jsonString.substring(index)))) { + index += 5; + return false; + } + if (jsonString.substring(index, index + 8) === 'Infinity' || + (Allow.INFINITY & allow && length - index < 8 && 'Infinity'.startsWith(jsonString.substring(index)))) { + index += 8; + return Infinity; + } + if (jsonString.substring(index, index + 9) === '-Infinity' || + (Allow.MINUS_INFINITY & allow && + 1 < length - index && + length - index < 9 && + '-Infinity'.startsWith(jsonString.substring(index)))) { + index += 9; + return -Infinity; + } + if (jsonString.substring(index, index + 3) === 'NaN' || + (Allow.NAN & allow && length - index < 3 && 'NaN'.startsWith(jsonString.substring(index)))) { + index += 3; + return NaN; + } + return parseNum(); + }; + const parseStr = () => { + const start = index; + let escape = false; + index++; // skip initial quote + while (index < length && (jsonString[index] !== '"' || (escape && jsonString[index - 1] === '\\'))) { + escape = jsonString[index] === '\\' ? !escape : false; + index++; + } + if (jsonString.charAt(index) == '"') { + try { + return JSON.parse(jsonString.substring(start, ++index - Number(escape))); + } + catch (e) { + throwMalformedError(String(e)); + } + } + else if (Allow.STR & allow) { + try { + return JSON.parse(jsonString.substring(start, index - Number(escape)) + '"'); + } + catch (e) { + // SyntaxError: Invalid escape sequence + return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf('\\')) + '"'); + } + } + markPartialJSON('Unterminated string literal'); + }; + const parseObj = () => { + index++; // skip initial brace + skipBlank(); + const obj = {}; + try { + while (jsonString[index] !== '}') { + skipBlank(); + if (index >= length && Allow.OBJ & allow) + return obj; + const key = parseStr(); + skipBlank(); + index++; // skip colon + try { + const value = parseAny(); + Object.defineProperty(obj, key, { value, writable: true, enumerable: true, configurable: true }); + } + catch (e) { + if (Allow.OBJ & allow) + return obj; + else + throw e; + } + skipBlank(); + if (jsonString[index] === ',') + index++; // skip comma + } + } + catch (e) { + if (Allow.OBJ & allow) + return obj; + else + markPartialJSON("Expected '}' at end of object"); + } + index++; // skip final brace + return obj; + }; + const parseArr = () => { + index++; // skip initial bracket + const arr = []; + try { + while (jsonString[index] !== ']') { + arr.push(parseAny()); + skipBlank(); + if (jsonString[index] === ',') { + index++; // skip comma + } + } + } + catch (e) { + if (Allow.ARR & allow) { + return arr; + } + markPartialJSON("Expected ']' at end of array"); + } + index++; // skip final bracket + return arr; + }; + const parseNum = () => { + if (index === 0) { + if (jsonString === '-' && Allow.NUM & allow) + markPartialJSON("Not sure what '-' is"); + try { + return JSON.parse(jsonString); + } + catch (e) { + if (Allow.NUM & allow) { + try { + if ('.' === jsonString[jsonString.length - 1]) + return JSON.parse(jsonString.substring(0, jsonString.lastIndexOf('.'))); + return JSON.parse(jsonString.substring(0, jsonString.lastIndexOf('e'))); + } + catch (e) { } + } + throwMalformedError(String(e)); + } + } + const start = index; + if (jsonString[index] === '-') + index++; + while (jsonString[index] && !',]}'.includes(jsonString[index])) + index++; + if (index == length && !(Allow.NUM & allow)) + markPartialJSON('Unterminated number literal'); + try { + return JSON.parse(jsonString.substring(start, index)); + } + catch (e) { + if (jsonString.substring(start, index) === '-' && Allow.NUM & allow) + markPartialJSON("Not sure what '-' is"); + try { + return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf('e'))); + } + catch (e) { + throwMalformedError(String(e)); + } + } + }; + const skipBlank = () => { + while (index < length && ' \n\r\t'.includes(jsonString[index])) { + index++; + } + }; + return parseAny(); +}; +// using this function with malformed JSON is undefined behavior +const partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM); +exports.partialParse = partialParse; +//# sourceMappingURL=parser.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c643703dd5aa4f528efa6f970da29061f297f4ca --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":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O,CAAC,EAAE,CAAC;YACX,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK;gBACjE,eAAe,CAAC,sBAAsB,CAAC,CAAC;YAC1C,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9E,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,OAAO,KAAK,GAAG,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAE,CAAC,EAAE,CAAC;YAChE,KAAK,EAAE,CAAC;QACV,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,EAAE,CAAC;AACpB,CAAC,CAAC;AAEF,gEAAgE;AAChE,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAEvE,oCAAY"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f8954e13a244cc24509ef00300e00d4888d10974 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.mjs @@ -0,0 +1,241 @@ +const STR = 0b000000001; +const NUM = 0b000000010; +const ARR = 0b000000100; +const OBJ = 0b000001000; +const NULL = 0b000010000; +const BOOL = 0b000100000; +const NAN = 0b001000000; +const INFINITY = 0b010000000; +const MINUS_INFINITY = 0b100000000; +const INF = INFINITY | MINUS_INFINITY; +const SPECIAL = NULL | BOOL | INF | NAN; +const ATOM = STR | NUM | SPECIAL; +const COLLECTION = ARR | OBJ; +const ALL = ATOM | COLLECTION; +const Allow = { + STR, + NUM, + ARR, + OBJ, + NULL, + BOOL, + NAN, + INFINITY, + MINUS_INFINITY, + INF, + SPECIAL, + ATOM, + COLLECTION, + ALL, +}; +// The JSON string segment was unable to be parsed completely +class PartialJSON extends Error { +} +class MalformedJSON extends Error { +} +/** + * Parse incomplete JSON + * @param {string} jsonString Partial JSON to be parsed + * @param {number} allowPartial Specify what types are allowed to be partial, see {@link Allow} for details + * @returns The parsed JSON + * @throws {PartialJSON} If the JSON is incomplete (related to the `allow` parameter) + * @throws {MalformedJSON} If the JSON is malformed + */ +function parseJSON(jsonString, allowPartial = Allow.ALL) { + if (typeof jsonString !== 'string') { + throw new TypeError(`expecting str, got ${typeof jsonString}`); + } + if (!jsonString.trim()) { + throw new Error(`${jsonString} is empty`); + } + return _parseJSON(jsonString.trim(), allowPartial); +} +const _parseJSON = (jsonString, allow) => { + const length = jsonString.length; + let index = 0; + const markPartialJSON = (msg) => { + throw new PartialJSON(`${msg} at position ${index}`); + }; + const throwMalformedError = (msg) => { + throw new MalformedJSON(`${msg} at position ${index}`); + }; + const parseAny = () => { + skipBlank(); + if (index >= length) + markPartialJSON('Unexpected end of input'); + if (jsonString[index] === '"') + return parseStr(); + if (jsonString[index] === '{') + return parseObj(); + if (jsonString[index] === '[') + return parseArr(); + if (jsonString.substring(index, index + 4) === 'null' || + (Allow.NULL & allow && length - index < 4 && 'null'.startsWith(jsonString.substring(index)))) { + index += 4; + return null; + } + if (jsonString.substring(index, index + 4) === 'true' || + (Allow.BOOL & allow && length - index < 4 && 'true'.startsWith(jsonString.substring(index)))) { + index += 4; + return true; + } + if (jsonString.substring(index, index + 5) === 'false' || + (Allow.BOOL & allow && length - index < 5 && 'false'.startsWith(jsonString.substring(index)))) { + index += 5; + return false; + } + if (jsonString.substring(index, index + 8) === 'Infinity' || + (Allow.INFINITY & allow && length - index < 8 && 'Infinity'.startsWith(jsonString.substring(index)))) { + index += 8; + return Infinity; + } + if (jsonString.substring(index, index + 9) === '-Infinity' || + (Allow.MINUS_INFINITY & allow && + 1 < length - index && + length - index < 9 && + '-Infinity'.startsWith(jsonString.substring(index)))) { + index += 9; + return -Infinity; + } + if (jsonString.substring(index, index + 3) === 'NaN' || + (Allow.NAN & allow && length - index < 3 && 'NaN'.startsWith(jsonString.substring(index)))) { + index += 3; + return NaN; + } + return parseNum(); + }; + const parseStr = () => { + const start = index; + let escape = false; + index++; // skip initial quote + while (index < length && (jsonString[index] !== '"' || (escape && jsonString[index - 1] === '\\'))) { + escape = jsonString[index] === '\\' ? !escape : false; + index++; + } + if (jsonString.charAt(index) == '"') { + try { + return JSON.parse(jsonString.substring(start, ++index - Number(escape))); + } + catch (e) { + throwMalformedError(String(e)); + } + } + else if (Allow.STR & allow) { + try { + return JSON.parse(jsonString.substring(start, index - Number(escape)) + '"'); + } + catch (e) { + // SyntaxError: Invalid escape sequence + return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf('\\')) + '"'); + } + } + markPartialJSON('Unterminated string literal'); + }; + const parseObj = () => { + index++; // skip initial brace + skipBlank(); + const obj = {}; + try { + while (jsonString[index] !== '}') { + skipBlank(); + if (index >= length && Allow.OBJ & allow) + return obj; + const key = parseStr(); + skipBlank(); + index++; // skip colon + try { + const value = parseAny(); + Object.defineProperty(obj, key, { value, writable: true, enumerable: true, configurable: true }); + } + catch (e) { + if (Allow.OBJ & allow) + return obj; + else + throw e; + } + skipBlank(); + if (jsonString[index] === ',') + index++; // skip comma + } + } + catch (e) { + if (Allow.OBJ & allow) + return obj; + else + markPartialJSON("Expected '}' at end of object"); + } + index++; // skip final brace + return obj; + }; + const parseArr = () => { + index++; // skip initial bracket + const arr = []; + try { + while (jsonString[index] !== ']') { + arr.push(parseAny()); + skipBlank(); + if (jsonString[index] === ',') { + index++; // skip comma + } + } + } + catch (e) { + if (Allow.ARR & allow) { + return arr; + } + markPartialJSON("Expected ']' at end of array"); + } + index++; // skip final bracket + return arr; + }; + const parseNum = () => { + if (index === 0) { + if (jsonString === '-' && Allow.NUM & allow) + markPartialJSON("Not sure what '-' is"); + try { + return JSON.parse(jsonString); + } + catch (e) { + if (Allow.NUM & allow) { + try { + if ('.' === jsonString[jsonString.length - 1]) + return JSON.parse(jsonString.substring(0, jsonString.lastIndexOf('.'))); + return JSON.parse(jsonString.substring(0, jsonString.lastIndexOf('e'))); + } + catch (e) { } + } + throwMalformedError(String(e)); + } + } + const start = index; + if (jsonString[index] === '-') + index++; + while (jsonString[index] && !',]}'.includes(jsonString[index])) + index++; + if (index == length && !(Allow.NUM & allow)) + markPartialJSON('Unterminated number literal'); + try { + return JSON.parse(jsonString.substring(start, index)); + } + catch (e) { + if (jsonString.substring(start, index) === '-' && Allow.NUM & allow) + markPartialJSON("Not sure what '-' is"); + try { + return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf('e'))); + } + catch (e) { + throwMalformedError(String(e)); + } + } + }; + const skipBlank = () => { + while (index < length && ' \n\r\t'.includes(jsonString[index])) { + index++; + } + }; + return parseAny(); +}; +// using this function with malformed JSON is undefined behavior +const partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM); +export { partialParse, PartialJSON, MalformedJSON }; +//# sourceMappingURL=parser.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-parser/parser.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0af222828c8e44e5c9c053d6a257df0cb1652ea2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/partial-json-par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CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK;gBACjE,eAAe,CAAC,sBAAsB,CAAC,CAAC;YAC1C,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9E,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,OAAO,KAAK,GAAG,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAE,CAAC,EAAE,CAAC;YAChE,KAAK,EAAE,CAAC;QACV,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,EAAE,CAAC;AACpB,CAAC,CAAC;AAEF,gEAAgE;AAChE,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7c4fab4a3e857ab5730ab788ca5436d0d44a32f3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts @@ -0,0 +1,32 @@ +import { ZodSchema, ZodTypeDef } from 'zod'; +import { Refs, Seen } from "./Refs.mjs"; +import { JsonSchema7Type } from "./parseDef.mjs"; +export type Targets = 'jsonSchema7' | 'jsonSchema2019-09' | 'openApi3'; +export type DateStrategy = 'format:date-time' | 'format:date' | 'string' | 'integer'; +export declare const ignoreOverride: unique symbol; +export type Options = { + name: string | undefined; + $refStrategy: 'root' | 'relative' | 'none' | 'seen' | 'extract-to-root'; + basePath: string[]; + effectStrategy: 'input' | 'any'; + pipeStrategy: 'input' | 'output' | 'all'; + dateStrategy: DateStrategy | DateStrategy[]; + mapStrategy: 'entries' | 'record'; + removeAdditionalStrategy: 'passthrough' | 'strict'; + nullableStrategy: 'from-target' | 'property'; + target: Target; + strictUnions: boolean; + definitionPath: string; + definitions: Record; + errorMessages: boolean; + markdownDescription: boolean; + patternStrategy: 'escape' | 'preserve'; + applyRegexFlags: boolean; + emailStrategy: 'format:email' | 'format:idn-email' | 'pattern:zod'; + base64Strategy: 'format:binary' | 'contentEncoding:base64' | 'pattern:zod'; + nameStrategy: 'ref' | 'duplicate-ref' | 'title'; + override?: (def: ZodTypeDef, refs: Refs, seen: Seen | undefined, forceResolution?: boolean) => JsonSchema7Type | undefined | typeof ignoreOverride; + openaiStrictMode?: boolean; +}; +export declare const getDefaultOptions: (options: Partial> | string | undefined) => Options; +//# sourceMappingURL=Options.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b17456febdf50de26ee817e448c0b70760dd7e21 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts.map @@ -0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AAkB,GAAG,aAAa,CAAC;IACnE,cAAc,EAAE,eAAe,GAAG,wBAAwB,GAAG,aAAa,CAAC;IAC3E,YAAY,EAAE,KAAK,GAAG,eAAe,GAAG,OAAO,CAAC;IAChD,QAAQ,CAAC,EAAE,CACT,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,eAAe,CAAC,EAAE,OAAO,KACtB,eAAe,GAAG,SAAS,GAAG,OAAO,cAAc,CAAC;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAuBF,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,OAAO,EACtD,SAAS,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS,KAgB5C,OAAO,CAAC,MAAM,CACzB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3486d1a85edd7eaa3a2962582e6420ef3b145931 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts @@ -0,0 +1,32 @@ +import { ZodSchema, ZodTypeDef } from 'zod'; +import { Refs, Seen } from "./Refs.js"; +import { JsonSchema7Type } from "./parseDef.js"; +export type Targets = 'jsonSchema7' | 'jsonSchema2019-09' | 'openApi3'; +export type DateStrategy = 'format:date-time' | 'format:date' | 'string' | 'integer'; +export declare const ignoreOverride: unique symbol; +export type Options = { + name: string | undefined; + $refStrategy: 'root' | 'relative' | 'none' | 'seen' | 'extract-to-root'; + basePath: string[]; + effectStrategy: 'input' | 'any'; + pipeStrategy: 'input' | 'output' | 'all'; + dateStrategy: DateStrategy | DateStrategy[]; + mapStrategy: 'entries' | 'record'; + removeAdditionalStrategy: 'passthrough' | 'strict'; + nullableStrategy: 'from-target' | 'property'; + target: Target; + strictUnions: boolean; + definitionPath: string; + definitions: Record; + errorMessages: boolean; + markdownDescription: boolean; + patternStrategy: 'escape' | 'preserve'; + applyRegexFlags: boolean; + emailStrategy: 'format:email' | 'format:idn-email' | 'pattern:zod'; + base64Strategy: 'format:binary' | 'contentEncoding:base64' | 'pattern:zod'; + nameStrategy: 'ref' | 'duplicate-ref' | 'title'; + override?: (def: ZodTypeDef, refs: Refs, seen: Seen | undefined, forceResolution?: boolean) => JsonSchema7Type | undefined | typeof ignoreOverride; + openaiStrictMode?: boolean; +}; +export declare const getDefaultOptions: (options: Partial> | string | undefined) => Options; +//# sourceMappingURL=Options.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9bb7e7114b87f31b1ce2eda51c01d1186f7fe527 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Options.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK;OACpC,EAAE,IAAI,EAAE,IAAI,EAAE;OACd,EAAE,eAAe,EAAE;AAE1B,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,mBAAmB,GAAG,UAAU,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErF,eAAO,MAAM,cAAc,eAA8D,CAAC;AAE1F,MAAM,MAAM,OAAO,CAAC,MAAM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D,SAAS,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS,KAgB5C,OAAO,CAAC,MAAM,CACzB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js new file mode 100644 index 0000000000000000000000000000000000000000..ce8822c3dcb9ffa71f13b8ffcbd649a1214890f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDefaultOptions = exports.ignoreOverride = void 0; +exports.ignoreOverride = Symbol('Let zodToJsonSchema decide on which parser to use'); +const defaultOptions = { + name: undefined, + $refStrategy: 'root', + effectStrategy: 'input', + pipeStrategy: 'all', + dateStrategy: 'format:date-time', + mapStrategy: 'entries', + nullableStrategy: 'from-target', + removeAdditionalStrategy: 'passthrough', + definitionPath: 'definitions', + target: 'jsonSchema7', + strictUnions: false, + errorMessages: false, + markdownDescription: false, + patternStrategy: 'escape', + applyRegexFlags: false, + emailStrategy: 'format:email', + base64Strategy: 'contentEncoding:base64', + nameStrategy: 'ref', +}; +const getDefaultOptions = (options) => { + // We need to add `definitions` here as we may mutate it + return (typeof options === 'string' ? + { + ...defaultOptions, + basePath: ['#'], + definitions: {}, + name: options, + } + : { + ...defaultOptions, + basePath: ['#'], + definitions: {}, + ...options, + }); +}; +exports.getDefaultOptions = getDefaultOptions; +//# sourceMappingURL=Options.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b35ca3887b9aba36a02cea788cb94ac2a13839c3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Options.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Options.ts"],"names":[],"mappings":";;;AAQa,QAAA,cAAc,GAAG,MAAM,CAAC,mDAAmD,CAAC,CAAC;AAgC1F,MAAM,cAAc,GAA8C;IAChE,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,OAAO;IACvB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,kBAAkB;IAChC,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE,aAAa;IAC/B,wBAAwB,EAAE,aAAa;IACvC,cAAc,EAAE,aAAa;IAC7B,MAAM,EAAE,aAAa;IACrB,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,cAAc;IAC7B,cAAc,EAAE,wBAAwB;IACxC,YAAY,EAAE,KAAK;CACpB,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAC/B,OAAsD,EACtD,EAAE;IACF,wDAAwD;IACxD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC;QAC3B;YACE,GAAG,cAAc;YACjB,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,OAAO;SACd;QACH,CAAC,CAAC;YACE,GAAG,cAAc;YACjB,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,WAAW,EAAE,EAAE;YACf,GAAG,OAAO;SACX,CAAoB,CAAC;AAC5B,CAAC,CAAC;AAlBW,QAAA,iBAAiB,qBAkB5B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8e199f8dcfb8488d353a3e41dc576cd952eed441 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs @@ -0,0 +1,38 @@ +export const ignoreOverride = Symbol('Let zodToJsonSchema decide on which parser to use'); +const defaultOptions = { + name: undefined, + $refStrategy: 'root', + effectStrategy: 'input', + pipeStrategy: 'all', + dateStrategy: 'format:date-time', + mapStrategy: 'entries', + nullableStrategy: 'from-target', + removeAdditionalStrategy: 'passthrough', + definitionPath: 'definitions', + target: 'jsonSchema7', + strictUnions: false, + errorMessages: false, + markdownDescription: false, + patternStrategy: 'escape', + applyRegexFlags: false, + emailStrategy: 'format:email', + base64Strategy: 'contentEncoding:base64', + nameStrategy: 'ref', +}; +export const getDefaultOptions = (options) => { + // We need to add `definitions` here as we may mutate it + return (typeof options === 'string' ? + { + ...defaultOptions, + basePath: ['#'], + definitions: {}, + name: options, + } + : { + ...defaultOptions, + basePath: ['#'], + definitions: {}, + ...options, + }); +}; +//# sourceMappingURL=Options.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..10a07a62ca8ce791e77b16e5bde12c5d3165022d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"Options.mjs","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Options.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,mDAAmD,CAAC,CAAC;AAgC1F,MAAM,cAAc,GAA8C;IAChE,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,OAAO;IACvB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,kBAAkB;IAChC,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE,aAAa;IAC/B,wBAAwB,EAAE,aAAa;IACvC,cAAc,EAAE,aAAa;IAC7B,MAAM,EAAE,aAAa;IACrB,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,cAAc;IAC7B,cAAc,EAAE,wBAAwB;IACxC,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,OAAsD,EACtD,EAAE;IACF,wDAAwD;IACxD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC;QAC3B;YACE,GAAG,cAAc;YACjB,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,OAAO;SACd;QACH,CAAC,CAAC;YACE,GAAG,cAAc;YACjB,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,WAAW,EAAE,EAAE;YACf,GAAG,OAAO;SACX,CAAoB,CAAC;AAC5B,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..972c78c81179244c9109d3a28f839f18b58e2537 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts @@ -0,0 +1,21 @@ +import type { ZodTypeDef } from 'zod'; +import { Options, Targets } from "./Options.mjs"; +import { JsonSchema7Type } from "./parseDef.mjs"; +export type Refs = { + seen: Map; + /** + * Set of all the `$ref`s we created, e.g. `Set(['#/$defs/ui'])` + * this notable does not include any `definitions` that were + * explicitly given as an option. + */ + seenRefs: Set; + currentPath: string[]; + propertyPath: string[] | undefined; +} & Options; +export type Seen = { + def: ZodTypeDef; + path: string[]; + jsonSchema: JsonSchema7Type | undefined; +}; +export declare const getRefs: (options?: string | Partial>) => Refs; +//# sourceMappingURL=Refs.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b355f82de157d27c42322d08a7959ef926454b41 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"Refs.d.mts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Refs.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK;OAC9B,EAAqB,OAAO,EAAE,OAAO,EAAE;OACvC,EAAE,eAAe,EAAE;AAG1B,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACpC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAErB,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAG,IAuBtE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..39db1f72c33f82b0dc675a6cae3c4653c5584bec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts @@ -0,0 +1,21 @@ +import type { ZodTypeDef } from 'zod'; +import { Options, Targets } from "./Options.js"; +import { JsonSchema7Type } from "./parseDef.js"; +export type Refs = { + seen: Map; + /** + * Set of all the `$ref`s we created, e.g. `Set(['#/$defs/ui'])` + * this notable does not include any `definitions` that were + * explicitly given as an option. + */ + seenRefs: Set; + currentPath: string[]; + propertyPath: string[] | undefined; +} & Options; +export type Seen = { + def: ZodTypeDef; + path: string[]; + jsonSchema: JsonSchema7Type | undefined; +}; +export declare const getRefs: (options?: string | Partial>) => Refs; +//# sourceMappingURL=Refs.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e1b5216c78cccde5dcd312981041a29a01284a31 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Refs.d.ts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Refs.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK;OAC9B,EAAqB,OAAO,EAAE,OAAO,EAAE;OACvC,EAAE,eAAe,EAAE;AAG1B,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACpC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAErB,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAG,IAuBtE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js new file mode 100644 index 0000000000000000000000000000000000000000..e89ba020abb141f5dbb561cb9a34304ef97c4a0a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRefs = void 0; +const Options_1 = require("./Options.js"); +const util_1 = require("./util.js"); +const getRefs = (options) => { + const _options = (0, Options_1.getDefaultOptions)(options); + const currentPath = _options.name !== undefined ? + [..._options.basePath, _options.definitionPath, _options.name] + : _options.basePath; + return { + ..._options, + currentPath: currentPath, + propertyPath: undefined, + seenRefs: new Set(), + seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ + (0, util_1.zodDef)(def), + { + def: (0, util_1.zodDef)(def), + path: [..._options.basePath, _options.definitionPath, name], + // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. + jsonSchema: undefined, + }, + ])), + }; +}; +exports.getRefs = getRefs; +//# sourceMappingURL=Refs.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f48077cb4139d57d51f7e6552fc6e7c0f77b9d5d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Refs.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Refs.ts"],"names":[],"mappings":";;;AACA,0CAAgE;AAEhE,oCAAgC;AAoBzB,MAAM,OAAO,GAAG,CAAC,OAA4C,EAAQ,EAAE;IAC5E,MAAM,QAAQ,GAAG,IAAA,2BAAiB,EAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,WAAW,GACf,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QAC3B,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC;QAChE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACtB,OAAO;QACL,GAAG,QAAQ;QACX,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,SAAS;QACvB,QAAQ,EAAE,IAAI,GAAG,EAAE;QACnB,IAAI,EAAE,IAAI,GAAG,CACX,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;YACxD,IAAA,aAAM,EAAC,GAAG,CAAC;YACX;gBACE,GAAG,EAAE,IAAA,aAAM,EAAC,GAAG,CAAC;gBAChB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC;gBAC3D,kHAAkH;gBAClH,UAAU,EAAE,SAAS;aACtB;SACF,CAAC,CACH;KACF,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,OAAO,WAuBlB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7269765c734c69408f8bb8beec1f05b31225c8f2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs @@ -0,0 +1,24 @@ +import { getDefaultOptions } from "./Options.mjs"; +import { zodDef } from "./util.mjs"; +export const getRefs = (options) => { + const _options = getDefaultOptions(options); + const currentPath = _options.name !== undefined ? + [..._options.basePath, _options.definitionPath, _options.name] + : _options.basePath; + return { + ..._options, + currentPath: currentPath, + propertyPath: undefined, + seenRefs: new Set(), + seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ + zodDef(def), + { + def: zodDef(def), + path: [..._options.basePath, _options.definitionPath, name], + // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. + jsonSchema: undefined, + }, + ])), + }; +}; +//# sourceMappingURL=Refs.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f73333d325f9eb7fe35108022615339926b646ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"Refs.mjs","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/Refs.ts"],"names":[],"mappings":"OACO,EAAE,iBAAiB,EAAoB;OAEvC,EAAE,MAAM,EAAE;AAoBjB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,OAA4C,EAAQ,EAAE;IAC5E,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,WAAW,GACf,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QAC3B,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC;QAChE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACtB,OAAO;QACL,GAAG,QAAQ;QACX,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,SAAS;QACvB,QAAQ,EAAE,IAAI,GAAG,EAAE;QACnB,IAAI,EAAE,IAAI,GAAG,CACX,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;YACxD,MAAM,CAAC,GAAG,CAAC;YACX;gBACE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC;gBAChB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC;gBAC3D,kHAAkH;gBAClH,UAAU,EAAE,SAAS;aACtB;SACF,CAAC,CACH;KACF,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5b045c7aebceb324f8d003e3ec0e40924ac2fd52 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts @@ -0,0 +1,12 @@ +import { JsonSchema7TypeUnion } from "./parseDef.mjs"; +import { Refs } from "./Refs.mjs"; +export type ErrorMessages = Partial>; +export declare function addErrorMessage; +}>(res: T, key: keyof T, errorMessage: string | undefined, refs: Refs): void; +export declare function setResponseValueAndErrors; +}, Key extends keyof Omit>(res: Json7Type, key: Key, value: Json7Type[Key], errorMessage: string | undefined, refs: Refs): void; +//# sourceMappingURL=errorMessages.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6e57dfea66bd54cf9f6d8302d34e89476b8ca0f6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"errorMessages.d.mts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/errorMessages.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE;OACxB,EAAE,IAAI,EAAE;AAEf,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,oBAAoB,EAAE,cAAc,SAAS,MAAM,GAAG,EAAE,IAAI,OAAO,CACrG,IAAI,CAAC;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM;CAAE,EAAE,cAAc,GAAG,MAAM,GAAG,eAAe,CAAC,CAC9E,CAAC;AAEF,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,YAAY,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,EAC7E,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,MAAM,CAAC,EACZ,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,EAAE,IAAI,QASX;AAED,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,oBAAoB,GAAG;IACvC,YAAY,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACzC,EACD,GAAG,SAAS,MAAM,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,EACjD,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,QAG9F"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6d61f11ae20e569b560e5d1914f2449c5ed11da8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts @@ -0,0 +1,12 @@ +import { JsonSchema7TypeUnion } from "./parseDef.js"; +import { Refs } from "./Refs.js"; +export type ErrorMessages = Partial>; +export declare function addErrorMessage; +}>(res: T, key: keyof T, errorMessage: string | undefined, refs: Refs): void; +export declare function setResponseValueAndErrors; +}, Key extends keyof Omit>(res: Json7Type, key: Key, value: Json7Type[Key], errorMessage: string | undefined, refs: Refs): void; +//# sourceMappingURL=errorMessages.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9f16bd1dac576a19e73ceaabed041e38f0b18006 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errorMessages.d.ts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/errorMessages.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE;OACxB,EAAE,IAAI,EAAE;AAEf,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,oBAAoB,EAAE,cAAc,SAAS,MAAM,GAAG,EAAE,IAAI,OAAO,CACrG,IAAI,CAAC;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM;CAAE,EAAE,cAAc,GAAG,MAAM,GAAG,eAAe,CAAC,CAC9E,CAAC;AAEF,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,YAAY,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,EAC7E,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,MAAM,CAAC,EACZ,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,EAAE,IAAI,QASX;AAED,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,oBAAoB,GAAG;IACvC,YAAY,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACzC,EACD,GAAG,SAAS,MAAM,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,EACjD,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,QAG9F"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js new file mode 100644 index 0000000000000000000000000000000000000000..c3fd33fee9bda4e09c12e4ea4aa9e40fad3ae6df --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addErrorMessage = addErrorMessage; +exports.setResponseValueAndErrors = setResponseValueAndErrors; +function addErrorMessage(res, key, errorMessage, refs) { + if (!refs?.errorMessages) + return; + if (errorMessage) { + res.errorMessage = { + ...res.errorMessage, + [key]: errorMessage, + }; + } +} +function setResponseValueAndErrors(res, key, value, errorMessage, refs) { + res[key] = value; + addErrorMessage(res, key, errorMessage, refs); +} +//# sourceMappingURL=errorMessages.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1d5acee808e892a8198e4a40b212db2e8d17bfe3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errorMessages.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/errorMessages.ts"],"names":[],"mappings":";;AAOA,0CAaC;AAED,8DAQC;AAvBD,SAAgB,eAAe,CAC7B,GAAM,EACN,GAAY,EACZ,YAAgC,EAChC,IAAU;IAEV,IAAI,CAAC,IAAI,EAAE,aAAa;QAAE,OAAO;IACjC,IAAI,YAAY,EAAE,CAAC;QACjB,GAAG,CAAC,YAAY,GAAG;YACjB,GAAG,GAAG,CAAC,YAAY;YACnB,CAAC,GAAG,CAAC,EAAE,YAAY;SACpB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,yBAAyB,CAKvC,GAAc,EAAE,GAAQ,EAAE,KAAqB,EAAE,YAAgC,EAAE,IAAU;IAC7F,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACjB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..750f0c9ad36b025e8a57f679608b9294f7fa52e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs @@ -0,0 +1,15 @@ +export function addErrorMessage(res, key, errorMessage, refs) { + if (!refs?.errorMessages) + return; + if (errorMessage) { + res.errorMessage = { + ...res.errorMessage, + [key]: errorMessage, + }; + } +} +export function setResponseValueAndErrors(res, key, value, errorMessage, refs) { + res[key] = value; + addErrorMessage(res, key, errorMessage, refs); +} +//# sourceMappingURL=errorMessages.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a15c574c9144f2a31b146320404161e09ad3ce3b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"errorMessages.mjs","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/errorMessages.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,eAAe,CAC7B,GAAM,EACN,GAAY,EACZ,YAAgC,EAChC,IAAU;IAEV,IAAI,CAAC,IAAI,EAAE,aAAa;QAAE,OAAO;IACjC,IAAI,YAAY,EAAE,CAAC;QACjB,GAAG,CAAC,YAAY,GAAG;YACjB,GAAG,GAAG,CAAC,YAAY;YACnB,CAAC,GAAG,CAAC,EAAE,YAAY;SACpB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB,CAKvC,GAAc,EAAE,GAAQ,EAAE,KAAqB,EAAE,YAAgC,EAAE,IAAU;IAC7F,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACjB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bae9e3ead8e7424e79c93e71e1d1b602f9be8de1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts @@ -0,0 +1,38 @@ +export * from "./Options.mjs"; +export * from "./Refs.mjs"; +export * from "./errorMessages.mjs"; +export * from "./parseDef.mjs"; +export * from "./parsers/any.mjs"; +export * from "./parsers/array.mjs"; +export * from "./parsers/bigint.mjs"; +export * from "./parsers/boolean.mjs"; +export * from "./parsers/branded.mjs"; +export * from "./parsers/catch.mjs"; +export * from "./parsers/date.mjs"; +export * from "./parsers/default.mjs"; +export * from "./parsers/effects.mjs"; +export * from "./parsers/enum.mjs"; +export * from "./parsers/intersection.mjs"; +export * from "./parsers/literal.mjs"; +export * from "./parsers/map.mjs"; +export * from "./parsers/nativeEnum.mjs"; +export * from "./parsers/never.mjs"; +export * from "./parsers/null.mjs"; +export * from "./parsers/nullable.mjs"; +export * from "./parsers/number.mjs"; +export * from "./parsers/object.mjs"; +export * from "./parsers/optional.mjs"; +export * from "./parsers/pipeline.mjs"; +export * from "./parsers/promise.mjs"; +export * from "./parsers/readonly.mjs"; +export * from "./parsers/record.mjs"; +export * from "./parsers/set.mjs"; +export * from "./parsers/string.mjs"; +export * from "./parsers/tuple.mjs"; +export * from "./parsers/undefined.mjs"; +export * from "./parsers/union.mjs"; +export * from "./parsers/unknown.mjs"; +export * from "./zodToJsonSchema.mjs"; +import { zodToJsonSchema } from "./zodToJsonSchema.mjs"; +export default zodToJsonSchema; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..bbbee9537351b5cff865bab8662ffccabad3e288 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCO,EAAE,eAAe,EAAE;AAC1B,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..479fb21cc3fb4776e229c879870bda3a8b048b8c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts @@ -0,0 +1,38 @@ +export * from "./Options.js"; +export * from "./Refs.js"; +export * from "./errorMessages.js"; +export * from "./parseDef.js"; +export * from "./parsers/any.js"; +export * from "./parsers/array.js"; +export * from "./parsers/bigint.js"; +export * from "./parsers/boolean.js"; +export * from "./parsers/branded.js"; +export * from "./parsers/catch.js"; +export * from "./parsers/date.js"; +export * from "./parsers/default.js"; +export * from "./parsers/effects.js"; +export * from "./parsers/enum.js"; +export * from "./parsers/intersection.js"; +export * from "./parsers/literal.js"; +export * from "./parsers/map.js"; +export * from "./parsers/nativeEnum.js"; +export * from "./parsers/never.js"; +export * from "./parsers/null.js"; +export * from "./parsers/nullable.js"; +export * from "./parsers/number.js"; +export * from "./parsers/object.js"; +export * from "./parsers/optional.js"; +export * from "./parsers/pipeline.js"; +export * from "./parsers/promise.js"; +export * from "./parsers/readonly.js"; +export * from "./parsers/record.js"; +export * from "./parsers/set.js"; +export * from "./parsers/string.js"; +export * from "./parsers/tuple.js"; +export * from "./parsers/undefined.js"; +export * from "./parsers/union.js"; +export * from "./parsers/unknown.js"; +export * from "./zodToJsonSchema.js"; +import { zodToJsonSchema } from "./zodToJsonSchema.js"; +export default zodToJsonSchema; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7bac21c3afd25f10a83e33a513ca44bbe2f0e286 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCO,EAAE,eAAe,EAAE;AAC1B,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b63d9e1ae606a1cb521215ce5fbebd12f0d49ceb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../../internal/tslib.js"); +tslib_1.__exportStar(require("./Options.js"), exports); +tslib_1.__exportStar(require("./Refs.js"), exports); +tslib_1.__exportStar(require("./errorMessages.js"), exports); +tslib_1.__exportStar(require("./parseDef.js"), exports); +tslib_1.__exportStar(require("./parsers/any.js"), exports); +tslib_1.__exportStar(require("./parsers/array.js"), exports); +tslib_1.__exportStar(require("./parsers/bigint.js"), exports); +tslib_1.__exportStar(require("./parsers/boolean.js"), exports); +tslib_1.__exportStar(require("./parsers/branded.js"), exports); +tslib_1.__exportStar(require("./parsers/catch.js"), exports); +tslib_1.__exportStar(require("./parsers/date.js"), exports); +tslib_1.__exportStar(require("./parsers/default.js"), exports); +tslib_1.__exportStar(require("./parsers/effects.js"), exports); +tslib_1.__exportStar(require("./parsers/enum.js"), exports); +tslib_1.__exportStar(require("./parsers/intersection.js"), exports); +tslib_1.__exportStar(require("./parsers/literal.js"), exports); +tslib_1.__exportStar(require("./parsers/map.js"), exports); +tslib_1.__exportStar(require("./parsers/nativeEnum.js"), exports); +tslib_1.__exportStar(require("./parsers/never.js"), exports); +tslib_1.__exportStar(require("./parsers/null.js"), exports); +tslib_1.__exportStar(require("./parsers/nullable.js"), exports); +tslib_1.__exportStar(require("./parsers/number.js"), exports); +tslib_1.__exportStar(require("./parsers/object.js"), exports); +tslib_1.__exportStar(require("./parsers/optional.js"), exports); +tslib_1.__exportStar(require("./parsers/pipeline.js"), exports); +tslib_1.__exportStar(require("./parsers/promise.js"), exports); +tslib_1.__exportStar(require("./parsers/readonly.js"), exports); +tslib_1.__exportStar(require("./parsers/record.js"), exports); +tslib_1.__exportStar(require("./parsers/set.js"), exports); +tslib_1.__exportStar(require("./parsers/string.js"), exports); +tslib_1.__exportStar(require("./parsers/tuple.js"), exports); +tslib_1.__exportStar(require("./parsers/undefined.js"), exports); +tslib_1.__exportStar(require("./parsers/union.js"), exports); +tslib_1.__exportStar(require("./parsers/unknown.js"), exports); +tslib_1.__exportStar(require("./zodToJsonSchema.js"), exports); +const zodToJsonSchema_1 = require("./zodToJsonSchema.js"); +exports.default = zodToJsonSchema_1.zodToJsonSchema; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4fbb9bcab0e2aff7b0d34679860f8578a83170c6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/index.ts"],"names":[],"mappings":";;;AAAA,uDAA0B;AAC1B,oDAAuB;AACvB,6DAAgC;AAChC,wDAA2B;AAC3B,2DAA8B;AAC9B,6DAAgC;AAChC,8DAAiC;AACjC,+DAAkC;AAClC,+DAAkC;AAClC,6DAAgC;AAChC,4DAA+B;AAC/B,+DAAkC;AAClC,+DAAkC;AAClC,4DAA+B;AAC/B,oEAAuC;AACvC,+DAAkC;AAClC,2DAA8B;AAC9B,kEAAqC;AACrC,6DAAgC;AAChC,4DAA+B;AAC/B,gEAAmC;AACnC,8DAAiC;AACjC,8DAAiC;AACjC,gEAAmC;AACnC,gEAAmC;AACnC,+DAAkC;AAClC,gEAAmC;AACnC,8DAAiC;AACjC,2DAA8B;AAC9B,8DAAiC;AACjC,6DAAgC;AAChC,iEAAoC;AACpC,6DAAgC;AAChC,+DAAkC;AAClC,+DAAkC;AAClC,0DAAoD;AACpD,kBAAe,iCAAe,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6e444377a62dea65b741060347aabec50ea66003 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs @@ -0,0 +1,38 @@ +export * from "./Options.mjs"; +export * from "./Refs.mjs"; +export * from "./errorMessages.mjs"; +export * from "./parseDef.mjs"; +export * from "./parsers/any.mjs"; +export * from "./parsers/array.mjs"; +export * from "./parsers/bigint.mjs"; +export * from "./parsers/boolean.mjs"; +export * from "./parsers/branded.mjs"; +export * from "./parsers/catch.mjs"; +export * from "./parsers/date.mjs"; +export * from "./parsers/default.mjs"; +export * from "./parsers/effects.mjs"; +export * from "./parsers/enum.mjs"; +export * from "./parsers/intersection.mjs"; +export * from "./parsers/literal.mjs"; +export * from "./parsers/map.mjs"; +export * from "./parsers/nativeEnum.mjs"; +export * from "./parsers/never.mjs"; +export * from "./parsers/null.mjs"; +export * from "./parsers/nullable.mjs"; +export * from "./parsers/number.mjs"; +export * from "./parsers/object.mjs"; +export * from "./parsers/optional.mjs"; +export * from "./parsers/pipeline.mjs"; +export * from "./parsers/promise.mjs"; +export * from "./parsers/readonly.mjs"; +export * from "./parsers/record.mjs"; +export * from "./parsers/set.mjs"; +export * from "./parsers/string.mjs"; +export * from "./parsers/tuple.mjs"; +export * from "./parsers/undefined.mjs"; +export * from "./parsers/union.mjs"; +export * from "./parsers/unknown.mjs"; +export * from "./zodToJsonSchema.mjs"; +import { zodToJsonSchema } from "./zodToJsonSchema.mjs"; +export default zodToJsonSchema; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..5862a5b8fd9aa980de52b77dbbea7abe3c2539ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCO,EAAE,eAAe,EAAE;AAC1B,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..85df1b1264591a8c2eabce166d99dcbd07e76d2b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts @@ -0,0 +1,38 @@ +import { ZodTypeDef } from 'zod'; +import { JsonSchema7AnyType } from "./parsers/any.mjs"; +import { JsonSchema7ArrayType } from "./parsers/array.mjs"; +import { JsonSchema7BigintType } from "./parsers/bigint.mjs"; +import { JsonSchema7BooleanType } from "./parsers/boolean.mjs"; +import { JsonSchema7DateType } from "./parsers/date.mjs"; +import { JsonSchema7EnumType } from "./parsers/enum.mjs"; +import { JsonSchema7AllOfType } from "./parsers/intersection.mjs"; +import { JsonSchema7LiteralType } from "./parsers/literal.mjs"; +import { JsonSchema7MapType } from "./parsers/map.mjs"; +import { JsonSchema7NativeEnumType } from "./parsers/nativeEnum.mjs"; +import { JsonSchema7NeverType } from "./parsers/never.mjs"; +import { JsonSchema7NullType } from "./parsers/null.mjs"; +import { JsonSchema7NullableType } from "./parsers/nullable.mjs"; +import { JsonSchema7NumberType } from "./parsers/number.mjs"; +import { JsonSchema7ObjectType } from "./parsers/object.mjs"; +import { JsonSchema7RecordType } from "./parsers/record.mjs"; +import { JsonSchema7SetType } from "./parsers/set.mjs"; +import { JsonSchema7StringType } from "./parsers/string.mjs"; +import { JsonSchema7TupleType } from "./parsers/tuple.mjs"; +import { JsonSchema7UndefinedType } from "./parsers/undefined.mjs"; +import { JsonSchema7UnionType } from "./parsers/union.mjs"; +import { JsonSchema7UnknownType } from "./parsers/unknown.mjs"; +import { Refs } from "./Refs.mjs"; +type JsonSchema7RefType = { + $ref: string; +}; +type JsonSchema7Meta = { + title?: string; + default?: any; + description?: string; + markdownDescription?: string; +}; +export type JsonSchema7TypeUnion = JsonSchema7StringType | JsonSchema7ArrayType | JsonSchema7NumberType | JsonSchema7BigintType | JsonSchema7BooleanType | JsonSchema7DateType | JsonSchema7EnumType | JsonSchema7LiteralType | JsonSchema7NativeEnumType | JsonSchema7NullType | JsonSchema7NumberType | JsonSchema7ObjectType | JsonSchema7RecordType | JsonSchema7TupleType | JsonSchema7UnionType | JsonSchema7UndefinedType | JsonSchema7RefType | JsonSchema7NeverType | JsonSchema7MapType | JsonSchema7AnyType | JsonSchema7NullableType | JsonSchema7AllOfType | JsonSchema7UnknownType | JsonSchema7SetType; +export type JsonSchema7Type = JsonSchema7TypeUnion & JsonSchema7Meta; +export declare function parseDef(def: ZodTypeDef, refs: Refs, forceResolution?: boolean): JsonSchema7Type | undefined; +export {}; +//# sourceMappingURL=parseDef.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..cc204941f13dbbc20d55eea338ce7692606ae8eb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"parseDef.d.mts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/parseDef.ts"],"names":[],"mappings":"OAAO,EAAyB,UAAU,EAAE,MAAM,KAAK;OAChD,EAAE,kBAAkB,EAAe;OACnC,EAAE,oBAAoB,EAAiB;OACvC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,sBAAsB,EAAmB;OAG3C,EAAE,mBAAmB,EAAgB;OAGrC,EAAE,mBAAmB,EAAgB;OACrC,EAAE,oBAAoB,EAAwB;OAC9C,EAAE,sBAAsB,EAAmB;OAC3C,EAAE,kBAAkB,EAAe;OACnC,EAAE,yBAAyB,EAAsB;OACjD,EAAE,oBAAoB,EAAiB;OACvC,EAAE,mBAAmB,EAAgB;OACrC,EAAE,uBAAuB,EAAoB;OAC7C,EAAE,qBAAqB,EAAkB;OACzC,EAAE,qBAAqB,EAAkB;OAIzC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,kBAAkB,EAAe;OACnC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,oBAAoB,EAAiB;OACvC,EAAE,wBAAwB,EAAqB;OAC/C,EAAE,oBAAoB,EAAiB;OACvC,EAAE,sBAAsB,EAAmB;OAC3C,EAAE,IAAI,EAAQ;AAIrB,KAAK,kBAAkB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3C,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,yBAAyB,GACzB,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,kBAAkB,GAClB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAErE,wBAAgB,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,IAAI,EACV,eAAe,UAAQ,GACtB,eAAe,GAAG,SAAS,CAoC7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..24da4864e9e706c4f9ffd08d7a39392e0f18f5c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts @@ -0,0 +1,38 @@ +import { ZodTypeDef } from 'zod'; +import { JsonSchema7AnyType } from "./parsers/any.js"; +import { JsonSchema7ArrayType } from "./parsers/array.js"; +import { JsonSchema7BigintType } from "./parsers/bigint.js"; +import { JsonSchema7BooleanType } from "./parsers/boolean.js"; +import { JsonSchema7DateType } from "./parsers/date.js"; +import { JsonSchema7EnumType } from "./parsers/enum.js"; +import { JsonSchema7AllOfType } from "./parsers/intersection.js"; +import { JsonSchema7LiteralType } from "./parsers/literal.js"; +import { JsonSchema7MapType } from "./parsers/map.js"; +import { JsonSchema7NativeEnumType } from "./parsers/nativeEnum.js"; +import { JsonSchema7NeverType } from "./parsers/never.js"; +import { JsonSchema7NullType } from "./parsers/null.js"; +import { JsonSchema7NullableType } from "./parsers/nullable.js"; +import { JsonSchema7NumberType } from "./parsers/number.js"; +import { JsonSchema7ObjectType } from "./parsers/object.js"; +import { JsonSchema7RecordType } from "./parsers/record.js"; +import { JsonSchema7SetType } from "./parsers/set.js"; +import { JsonSchema7StringType } from "./parsers/string.js"; +import { JsonSchema7TupleType } from "./parsers/tuple.js"; +import { JsonSchema7UndefinedType } from "./parsers/undefined.js"; +import { JsonSchema7UnionType } from "./parsers/union.js"; +import { JsonSchema7UnknownType } from "./parsers/unknown.js"; +import { Refs } from "./Refs.js"; +type JsonSchema7RefType = { + $ref: string; +}; +type JsonSchema7Meta = { + title?: string; + default?: any; + description?: string; + markdownDescription?: string; +}; +export type JsonSchema7TypeUnion = JsonSchema7StringType | JsonSchema7ArrayType | JsonSchema7NumberType | JsonSchema7BigintType | JsonSchema7BooleanType | JsonSchema7DateType | JsonSchema7EnumType | JsonSchema7LiteralType | JsonSchema7NativeEnumType | JsonSchema7NullType | JsonSchema7NumberType | JsonSchema7ObjectType | JsonSchema7RecordType | JsonSchema7TupleType | JsonSchema7UnionType | JsonSchema7UndefinedType | JsonSchema7RefType | JsonSchema7NeverType | JsonSchema7MapType | JsonSchema7AnyType | JsonSchema7NullableType | JsonSchema7AllOfType | JsonSchema7UnknownType | JsonSchema7SetType; +export type JsonSchema7Type = JsonSchema7TypeUnion & JsonSchema7Meta; +export declare function parseDef(def: ZodTypeDef, refs: Refs, forceResolution?: boolean): JsonSchema7Type | undefined; +export {}; +//# sourceMappingURL=parseDef.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..640b95886f2b3d4f35da4b8d37356c59bb7f74bb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parseDef.d.ts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/parseDef.ts"],"names":[],"mappings":"OAAO,EAAyB,UAAU,EAAE,MAAM,KAAK;OAChD,EAAE,kBAAkB,EAAe;OACnC,EAAE,oBAAoB,EAAiB;OACvC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,sBAAsB,EAAmB;OAG3C,EAAE,mBAAmB,EAAgB;OAGrC,EAAE,mBAAmB,EAAgB;OACrC,EAAE,oBAAoB,EAAwB;OAC9C,EAAE,sBAAsB,EAAmB;OAC3C,EAAE,kBAAkB,EAAe;OACnC,EAAE,yBAAyB,EAAsB;OACjD,EAAE,oBAAoB,EAAiB;OACvC,EAAE,mBAAmB,EAAgB;OACrC,EAAE,uBAAuB,EAAoB;OAC7C,EAAE,qBAAqB,EAAkB;OACzC,EAAE,qBAAqB,EAAkB;OAIzC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,kBAAkB,EAAe;OACnC,EAAE,qBAAqB,EAAkB;OACzC,EAAE,oBAAoB,EAAiB;OACvC,EAAE,wBAAwB,EAAqB;OAC/C,EAAE,oBAAoB,EAAiB;OACvC,EAAE,sBAAsB,EAAmB;OAC3C,EAAE,IAAI,EAAQ;AAIrB,KAAK,kBAAkB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3C,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,yBAAyB,GACzB,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,kBAAkB,GAClB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAErE,wBAAgB,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,IAAI,EACV,eAAe,UAAQ,GACtB,eAAe,GAAG,SAAS,CAoC7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js new file mode 100644 index 0000000000000000000000000000000000000000..84a82e781f070d21f1fc5f808fb8b718d71a43e8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js @@ -0,0 +1,186 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseDef = parseDef; +const zod_1 = require("zod"); +const any_1 = require("./parsers/any.js"); +const array_1 = require("./parsers/array.js"); +const bigint_1 = require("./parsers/bigint.js"); +const boolean_1 = require("./parsers/boolean.js"); +const branded_1 = require("./parsers/branded.js"); +const catch_1 = require("./parsers/catch.js"); +const date_1 = require("./parsers/date.js"); +const default_1 = require("./parsers/default.js"); +const effects_1 = require("./parsers/effects.js"); +const enum_1 = require("./parsers/enum.js"); +const intersection_1 = require("./parsers/intersection.js"); +const literal_1 = require("./parsers/literal.js"); +const map_1 = require("./parsers/map.js"); +const nativeEnum_1 = require("./parsers/nativeEnum.js"); +const never_1 = require("./parsers/never.js"); +const null_1 = require("./parsers/null.js"); +const nullable_1 = require("./parsers/nullable.js"); +const number_1 = require("./parsers/number.js"); +const object_1 = require("./parsers/object.js"); +const optional_1 = require("./parsers/optional.js"); +const pipeline_1 = require("./parsers/pipeline.js"); +const promise_1 = require("./parsers/promise.js"); +const record_1 = require("./parsers/record.js"); +const set_1 = require("./parsers/set.js"); +const string_1 = require("./parsers/string.js"); +const tuple_1 = require("./parsers/tuple.js"); +const undefined_1 = require("./parsers/undefined.js"); +const union_1 = require("./parsers/union.js"); +const unknown_1 = require("./parsers/unknown.js"); +const readonly_1 = require("./parsers/readonly.js"); +const Options_1 = require("./Options.js"); +function parseDef(def, refs, forceResolution = false) { + const seenItem = refs.seen.get(def); + if (refs.override) { + const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); + if (overrideResult !== Options_1.ignoreOverride) { + return overrideResult; + } + } + if (seenItem && !forceResolution) { + const seenSchema = get$ref(seenItem, refs); + if (seenSchema !== undefined) { + if ('$ref' in seenSchema) { + refs.seenRefs.add(seenSchema.$ref); + } + return seenSchema; + } + } + const newItem = { def, path: refs.currentPath, jsonSchema: undefined }; + refs.seen.set(def, newItem); + const jsonSchema = selectParser(def, def.typeName, refs, forceResolution); + if (jsonSchema) { + addMeta(def, refs, jsonSchema); + } + newItem.jsonSchema = jsonSchema; + return jsonSchema; +} +const get$ref = (item, refs) => { + switch (refs.$refStrategy) { + case 'root': + return { $ref: item.path.join('/') }; + // this case is needed as OpenAI strict mode doesn't support top-level `$ref`s, i.e. + // the top-level schema *must* be `{"type": "object", "properties": {...}}` but if we ever + // need to define a `$ref`, relative `$ref`s aren't supported, so we need to extract + // the schema to `#/definitions/` and reference that. + // + // e.g. if we need to reference a schema at + // `["#","definitions","contactPerson","properties","person1","properties","name"]` + // then we'll extract it out to `contactPerson_properties_person1_properties_name` + case 'extract-to-root': + const name = item.path.slice(refs.basePath.length + 1).join('_'); + // we don't need to extract the root schema in this case, as it's already + // been added to the definitions + if (name !== refs.name && refs.nameStrategy === 'duplicate-ref') { + refs.definitions[name] = item.def; + } + return { $ref: [...refs.basePath, refs.definitionPath, name].join('/') }; + case 'relative': + return { $ref: getRelativePath(refs.currentPath, item.path) }; + case 'none': + case 'seen': { + if (item.path.length < refs.currentPath.length && + item.path.every((value, index) => refs.currentPath[index] === value)) { + console.warn(`Recursive reference detected at ${refs.currentPath.join('/')}! Defaulting to any`); + return {}; + } + return refs.$refStrategy === 'seen' ? {} : undefined; + } + } +}; +const getRelativePath = (pathA, pathB) => { + let i = 0; + for (; i < pathA.length && i < pathB.length; i++) { + if (pathA[i] !== pathB[i]) + break; + } + return [(pathA.length - i).toString(), ...pathB.slice(i)].join('/'); +}; +const selectParser = (def, typeName, refs, forceResolution) => { + switch (typeName) { + case zod_1.ZodFirstPartyTypeKind.ZodString: + return (0, string_1.parseStringDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodNumber: + return (0, number_1.parseNumberDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodObject: + return (0, object_1.parseObjectDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodBigInt: + return (0, bigint_1.parseBigintDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodBoolean: + return (0, boolean_1.parseBooleanDef)(); + case zod_1.ZodFirstPartyTypeKind.ZodDate: + return (0, date_1.parseDateDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodUndefined: + return (0, undefined_1.parseUndefinedDef)(); + case zod_1.ZodFirstPartyTypeKind.ZodNull: + return (0, null_1.parseNullDef)(refs); + case zod_1.ZodFirstPartyTypeKind.ZodArray: + return (0, array_1.parseArrayDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodUnion: + case zod_1.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: + return (0, union_1.parseUnionDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodIntersection: + return (0, intersection_1.parseIntersectionDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodTuple: + return (0, tuple_1.parseTupleDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodRecord: + return (0, record_1.parseRecordDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodLiteral: + return (0, literal_1.parseLiteralDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodEnum: + return (0, enum_1.parseEnumDef)(def); + case zod_1.ZodFirstPartyTypeKind.ZodNativeEnum: + return (0, nativeEnum_1.parseNativeEnumDef)(def); + case zod_1.ZodFirstPartyTypeKind.ZodNullable: + return (0, nullable_1.parseNullableDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodOptional: + return (0, optional_1.parseOptionalDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodMap: + return (0, map_1.parseMapDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodSet: + return (0, set_1.parseSetDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodLazy: + return parseDef(def.getter()._def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodPromise: + return (0, promise_1.parsePromiseDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodNaN: + case zod_1.ZodFirstPartyTypeKind.ZodNever: + return (0, never_1.parseNeverDef)(); + case zod_1.ZodFirstPartyTypeKind.ZodEffects: + return (0, effects_1.parseEffectsDef)(def, refs, forceResolution); + case zod_1.ZodFirstPartyTypeKind.ZodAny: + return (0, any_1.parseAnyDef)(); + case zod_1.ZodFirstPartyTypeKind.ZodUnknown: + return (0, unknown_1.parseUnknownDef)(); + case zod_1.ZodFirstPartyTypeKind.ZodDefault: + return (0, default_1.parseDefaultDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodBranded: + return (0, branded_1.parseBrandedDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodReadonly: + return (0, readonly_1.parseReadonlyDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodCatch: + return (0, catch_1.parseCatchDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodPipeline: + return (0, pipeline_1.parsePipelineDef)(def, refs); + case zod_1.ZodFirstPartyTypeKind.ZodFunction: + case zod_1.ZodFirstPartyTypeKind.ZodVoid: + case zod_1.ZodFirstPartyTypeKind.ZodSymbol: + return undefined; + default: + return ((_) => undefined)(typeName); + } +}; +const addMeta = (def, refs, jsonSchema) => { + if (def.description) { + jsonSchema.description = def.description; + if (refs.markdownDescription) { + jsonSchema.markdownDescription = def.description; + } + } + return jsonSchema; +}; +//# sourceMappingURL=parseDef.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cf7f9fc1ac8a7e2cdc59c7f071bf565c762ef0df --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parseDef.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/parseDef.ts"],"names":[],"mappings":";;AAsEA,4BAwCC;AA9GD,6BAAwD;AACxD,0CAAgE;AAChE,8CAAsE;AACtE,gDAAyE;AACzE,kDAA4E;AAC5E,kDAAoD;AACpD,8CAAgD;AAChD,4CAAmE;AACnE,kDAAoD;AACpD,kDAAoD;AACpD,4CAAmE;AACnE,4DAAoF;AACpF,kDAA4E;AAC5E,0CAAgE;AAChE,wDAAqF;AACrF,8CAAsE;AACtE,4CAAmE;AACnE,oDAA+E;AAC/E,gDAAyE;AACzE,gDAAyE;AACzE,oDAAsD;AACtD,oDAAsD;AACtD,kDAAoD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QACrC,KAAK,2BAAqB,CAAC,QAAQ;YACjC,OAAO,IAAA,qBAAa,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,KAAK,2BAAqB,CAAC,WAAW;YACpC,OAAO,IAAA,2BAAgB,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrC,KAAK,2BAAqB,CAAC,WAAW,CAAC;QACvC,KAAK,2BAAqB,CAAC,OAAO,CAAC;QACnC,KAAK,2BAAqB,CAAC,SAAS;YAClC,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,GAAe,EAAE,IAAU,EAAE,UAA2B,EAAmB,EAAE;IAC5F,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACpB,UAAU,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;QAEzC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,UAAU,CAAC,mBAAmB,GAAG,GAAG,CAAC,WAAW,CAAC;QACnD,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs new file mode 100644 index 0000000000000000000000000000000000000000..380eaeae18e0c988459c7db39a3f7ca0c4ab0699 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs @@ -0,0 +1,183 @@ +import { ZodFirstPartyTypeKind } from 'zod'; +import { parseAnyDef } from "./parsers/any.mjs"; +import { parseArrayDef } from "./parsers/array.mjs"; +import { parseBigintDef } from "./parsers/bigint.mjs"; +import { parseBooleanDef } from "./parsers/boolean.mjs"; +import { parseBrandedDef } from "./parsers/branded.mjs"; +import { parseCatchDef } from "./parsers/catch.mjs"; +import { parseDateDef } from "./parsers/date.mjs"; +import { parseDefaultDef } from "./parsers/default.mjs"; +import { parseEffectsDef } from "./parsers/effects.mjs"; +import { parseEnumDef } from "./parsers/enum.mjs"; +import { parseIntersectionDef } from "./parsers/intersection.mjs"; +import { parseLiteralDef } from "./parsers/literal.mjs"; +import { parseMapDef } from "./parsers/map.mjs"; +import { parseNativeEnumDef } from "./parsers/nativeEnum.mjs"; +import { parseNeverDef } from "./parsers/never.mjs"; +import { parseNullDef } from "./parsers/null.mjs"; +import { parseNullableDef } from "./parsers/nullable.mjs"; +import { parseNumberDef } from "./parsers/number.mjs"; +import { parseObjectDef } from "./parsers/object.mjs"; +import { parseOptionalDef } from "./parsers/optional.mjs"; +import { parsePipelineDef } from "./parsers/pipeline.mjs"; +import { parsePromiseDef } from "./parsers/promise.mjs"; +import { parseRecordDef } from "./parsers/record.mjs"; +import { parseSetDef } from "./parsers/set.mjs"; +import { parseStringDef } from "./parsers/string.mjs"; +import { parseTupleDef } from "./parsers/tuple.mjs"; +import { parseUndefinedDef } from "./parsers/undefined.mjs"; +import { parseUnionDef } from "./parsers/union.mjs"; +import { parseUnknownDef } from "./parsers/unknown.mjs"; +import { parseReadonlyDef } from "./parsers/readonly.mjs"; +import { ignoreOverride } from "./Options.mjs"; +export function parseDef(def, refs, forceResolution = false) { + const seenItem = refs.seen.get(def); + if (refs.override) { + const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); + if (overrideResult !== ignoreOverride) { + return overrideResult; + } + } + if (seenItem && !forceResolution) { + const seenSchema = get$ref(seenItem, refs); + if (seenSchema !== undefined) { + if ('$ref' in seenSchema) { + refs.seenRefs.add(seenSchema.$ref); + } + return seenSchema; + } + } + const newItem = { def, path: refs.currentPath, jsonSchema: undefined }; + refs.seen.set(def, newItem); + const jsonSchema = selectParser(def, def.typeName, refs, forceResolution); + if (jsonSchema) { + addMeta(def, refs, jsonSchema); + } + newItem.jsonSchema = jsonSchema; + return jsonSchema; +} +const get$ref = (item, refs) => { + switch (refs.$refStrategy) { + case 'root': + return { $ref: item.path.join('/') }; + // this case is needed as OpenAI strict mode doesn't support top-level `$ref`s, i.e. + // the top-level schema *must* be `{"type": "object", "properties": {...}}` but if we ever + // need to define a `$ref`, relative `$ref`s aren't supported, so we need to extract + // the schema to `#/definitions/` and reference that. + // + // e.g. if we need to reference a schema at + // `["#","definitions","contactPerson","properties","person1","properties","name"]` + // then we'll extract it out to `contactPerson_properties_person1_properties_name` + case 'extract-to-root': + const name = item.path.slice(refs.basePath.length + 1).join('_'); + // we don't need to extract the root schema in this case, as it's already + // been added to the definitions + if (name !== refs.name && refs.nameStrategy === 'duplicate-ref') { + refs.definitions[name] = item.def; + } + return { $ref: [...refs.basePath, refs.definitionPath, name].join('/') }; + case 'relative': + return { $ref: getRelativePath(refs.currentPath, item.path) }; + case 'none': + case 'seen': { + if (item.path.length < refs.currentPath.length && + item.path.every((value, index) => refs.currentPath[index] === value)) { + console.warn(`Recursive reference detected at ${refs.currentPath.join('/')}! Defaulting to any`); + return {}; + } + return refs.$refStrategy === 'seen' ? {} : undefined; + } + } +}; +const getRelativePath = (pathA, pathB) => { + let i = 0; + for (; i < pathA.length && i < pathB.length; i++) { + if (pathA[i] !== pathB[i]) + break; + } + return [(pathA.length - i).toString(), ...pathB.slice(i)].join('/'); +}; +const selectParser = (def, typeName, refs, forceResolution) => { + switch (typeName) { + case ZodFirstPartyTypeKind.ZodString: + return parseStringDef(def, refs); + case ZodFirstPartyTypeKind.ZodNumber: + return parseNumberDef(def, refs); + case ZodFirstPartyTypeKind.ZodObject: + return parseObjectDef(def, refs); + case ZodFirstPartyTypeKind.ZodBigInt: + return parseBigintDef(def, refs); + case ZodFirstPartyTypeKind.ZodBoolean: + return parseBooleanDef(); + case ZodFirstPartyTypeKind.ZodDate: + return parseDateDef(def, refs); + case ZodFirstPartyTypeKind.ZodUndefined: + return parseUndefinedDef(); + case ZodFirstPartyTypeKind.ZodNull: + return parseNullDef(refs); + case ZodFirstPartyTypeKind.ZodArray: + return parseArrayDef(def, refs); + case ZodFirstPartyTypeKind.ZodUnion: + case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: + return parseUnionDef(def, refs); + case ZodFirstPartyTypeKind.ZodIntersection: + return parseIntersectionDef(def, refs); + case ZodFirstPartyTypeKind.ZodTuple: + return parseTupleDef(def, refs); + case ZodFirstPartyTypeKind.ZodRecord: + return parseRecordDef(def, refs); + case ZodFirstPartyTypeKind.ZodLiteral: + return parseLiteralDef(def, refs); + case ZodFirstPartyTypeKind.ZodEnum: + return parseEnumDef(def); + case ZodFirstPartyTypeKind.ZodNativeEnum: + return parseNativeEnumDef(def); + case ZodFirstPartyTypeKind.ZodNullable: + return parseNullableDef(def, refs); + case ZodFirstPartyTypeKind.ZodOptional: + return parseOptionalDef(def, refs); + case ZodFirstPartyTypeKind.ZodMap: + return parseMapDef(def, refs); + case ZodFirstPartyTypeKind.ZodSet: + return parseSetDef(def, refs); + case ZodFirstPartyTypeKind.ZodLazy: + return parseDef(def.getter()._def, refs); + case ZodFirstPartyTypeKind.ZodPromise: + return parsePromiseDef(def, refs); + case ZodFirstPartyTypeKind.ZodNaN: + case ZodFirstPartyTypeKind.ZodNever: + return parseNeverDef(); + case ZodFirstPartyTypeKind.ZodEffects: + return parseEffectsDef(def, refs, forceResolution); + case ZodFirstPartyTypeKind.ZodAny: + return parseAnyDef(); + case ZodFirstPartyTypeKind.ZodUnknown: + return parseUnknownDef(); + case ZodFirstPartyTypeKind.ZodDefault: + return parseDefaultDef(def, refs); + case ZodFirstPartyTypeKind.ZodBranded: + return parseBrandedDef(def, refs); + case ZodFirstPartyTypeKind.ZodReadonly: + return parseReadonlyDef(def, refs); + case ZodFirstPartyTypeKind.ZodCatch: + return parseCatchDef(def, refs); + case ZodFirstPartyTypeKind.ZodPipeline: + return parsePipelineDef(def, refs); + case ZodFirstPartyTypeKind.ZodFunction: + case ZodFirstPartyTypeKind.ZodVoid: + case ZodFirstPartyTypeKind.ZodSymbol: + return undefined; + default: + return ((_) => undefined)(typeName); + } +}; +const addMeta = (def, refs, jsonSchema) => { + if (def.description) { + jsonSchema.description = def.description; + if (refs.markdownDescription) { + jsonSchema.markdownDescription = def.description; + } + } + return jsonSchema; +}; +//# sourceMappingURL=parseDef.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a06d7cafc801b08b40de35ec0b7bee1ffaffa1fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"parseDef.mjs","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/parseDef.ts"],"names":[],"mappings":"OAAO,EAAE,qBAAqB,EAAc,MAAM,KAAK;OAChD,EAAsB,WAAW,EAAE;OACnC,EAAwB,aAAa,EAAE;OACvC,EAAyB,cAAc,EAAE;OACzC,EAA0B,eAAe,EAAE;OAC3C,EAAE,eAAe,EAAE;OACnB,EAAE,aAAa,EAAE;OACjB,EAAuB,YAAY,EAAE;OACrC,EAAE,eAAe,EAAE;OACnB,EAAE,eAAe,EAAE;OACnB,EAAuB,YAAY,EAAE;OACrC,EAAwB,oBAAoB,EAAE;OAC9C,EAA0B,eAAe,EAAE;OAC3C,EAAsB,WAAW,EAAE;OACnC,EAA6B,kBAAkB,EAAE;OACjD,EAAwB,aAAa,EAAE;OACvC,EAAuB,YAAY,EAAE;OACrC,EAA2B,gBAAgB,EAAE;OAC7C,EAAyB,cAAc,EAAE;OACzC,EAAyB,cAAc,EAAE;OACzC,EAAE,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QAAQ;YACjC,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,KAAK,qBAAqB,CAAC,WAAW;YACpC,OAAO,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrC,KAAK,qBAAqB,CAAC,WAAW,CAAC;QACvC,KAAK,qBAAqB,CAAC,OAAO,CAAC;QACnC,KAAK,qBAAqB,CAAC,SAAS;YAClC,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,GAAe,EAAE,IAAU,EAAE,UAA2B,EAAmB,EAAE;IAC5F,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACpB,UAAU,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;QAEzC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,UAAU,CAAC,mBAAmB,GAAG,GAAG,CAAC,WAAW,CAAC;QACnD,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1612242d34478113128945a537de90cf90c4c4e9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"util.d.mts","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/util.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK;AAEhD,eAAO,MAAM,MAAM,GAAI,WAAW,SAAS,GAAG,UAAU,KAAG,UAE1D,CAAC;AAEF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIlE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e144363904abe9ae0a472323cf8a6afb06a7bec1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/util.d.ts @@ -0,0 +1,4 @@ +import type { ZodSchema, ZodTypeDef } from 'zod'; +export declare const zodDef: (zodSchema: ZodSchema | ZodTypeDef) => ZodTypeDef; +export declare function isEmptyObj(obj: Object | null | undefined): boolean; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js new file mode 100644 index 0000000000000000000000000000000000000000..bda18e8523f8b9dd025fbac2334415c6101420f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js @@ -0,0 +1,82 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zodToJsonSchema = void 0; +const parseDef_1 = require("./parseDef.js"); +const Refs_1 = require("./Refs.js"); +const util_1 = require("./util.js"); +const zodToJsonSchema = (schema, options) => { + const refs = (0, Refs_1.getRefs)(options); + const name = typeof options === 'string' ? options + : options?.nameStrategy === 'title' ? undefined + : options?.name; + const main = (0, parseDef_1.parseDef)(schema._def, name === undefined ? refs : ({ + ...refs, + currentPath: [...refs.basePath, refs.definitionPath, name], + }), false) ?? {}; + const title = typeof options === 'object' && options.name !== undefined && options.nameStrategy === 'title' ? + options.name + : undefined; + if (title !== undefined) { + main.title = title; + } + const definitions = (() => { + if ((0, util_1.isEmptyObj)(refs.definitions)) { + return undefined; + } + const definitions = {}; + const processedDefinitions = new Set(); + // the call to `parseDef()` here might itself add more entries to `.definitions` + // so we need to continually evaluate definitions until we've resolved all of them + // + // we have a generous iteration limit here to avoid blowing up the stack if there + // are any bugs that would otherwise result in us iterating indefinitely + for (let i = 0; i < 500; i++) { + const newDefinitions = Object.entries(refs.definitions).filter(([key]) => !processedDefinitions.has(key)); + if (newDefinitions.length === 0) + break; + for (const [key, schema] of newDefinitions) { + definitions[key] = + (0, parseDef_1.parseDef)((0, util_1.zodDef)(schema), { ...refs, currentPath: [...refs.basePath, refs.definitionPath, key] }, true) ?? {}; + processedDefinitions.add(key); + } + } + return definitions; + })(); + const combined = name === undefined ? + definitions ? + { + ...main, + [refs.definitionPath]: definitions, + } + : main + : refs.nameStrategy === 'duplicate-ref' ? + { + ...main, + ...(definitions || refs.seenRefs.size ? + { + [refs.definitionPath]: { + ...definitions, + // only actually duplicate the schema definition if it was ever referenced + // otherwise the duplication is completely pointless + ...(refs.seenRefs.size ? { [name]: main } : undefined), + }, + } + : undefined), + } + : { + $ref: [...(refs.$refStrategy === 'relative' ? [] : refs.basePath), refs.definitionPath, name].join('/'), + [refs.definitionPath]: { + ...definitions, + [name]: main, + }, + }; + if (refs.target === 'jsonSchema7') { + combined.$schema = 'http://json-schema.org/draft-07/schema#'; + } + else if (refs.target === 'jsonSchema2019-09') { + combined.$schema = 'https://json-schema.org/draft/2019-09/schema#'; + } + return combined; +}; +exports.zodToJsonSchema = zodToJsonSchema; +//# sourceMappingURL=zodToJsonSchema.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..05bf09d48127603369aeb47301f3cb19f3e097f9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zodToJsonSchema.js","sourceRoot":"","sources":["../../src/_vendor/zod-to-json-schema/zodToJsonSchema.ts"],"names":[],"mappings":";;;AAEA,4CAAuD;AACvD,oCAAiC;AACjC,oCAA4C;AAE5C,MAAM,eAAe,GAAG,CACtB,MAAsB,EACtB,OAA2C,EAQ3C,EAAE;IACF,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAC;IAE9B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO;QACrC,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS;YAC/C,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;IAElB,MAAM,IAAI,GACR,IAAA,mBAAQ,EACN,MAAM,CAAC,IAAI,EACX,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC1B;QACE,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC;KAC3D,CACF,EACD,KAAK,CACN,IAAI,EAAE,CAAC;IAEV,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,YAAY,KAAK,OAAO,CAAC,CAAC;QAC7F,OAAO,CAAC,IAAI;QACd,CAAC,CAAC,SAAS,CAAC;IAEd,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,KAAK,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CAAC,EAAE,WAAW;aACnC;YACH,CAAC,CAAC,IAAI;QACR,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,eAAe,CAAC,CAAC;YACvC;gBACE,GAAG,IAAI;gBACP,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACrC;wBACE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;4BACrB,GAAG,WAAW;4BACd,0EAA0E;4BAC1E,oDAAoD;4BACpD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;yBACvD;qBACF;oBACH,CAAC,CAAC,SAAS,CAAC;aACb;YACH,CAAC,CAAC;gBACE,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,IAAI,CAChG,GAAG,CACJ;gBACD,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;oBACrB,GAAG,WAAW;oBACd,CAAC,IAAI,CAAC,EAAE,IAAI;iBACb;aACF,CAAC;IAEN,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QAClC,QAAQ,CAAC,OAAO,GAAG,yCAAyC,CAAC;IAC/D,CAAC;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,mBAAmB,EAAE,CAAC;QAC/C,QAAQ,CAAC,OAAO,GAAG,+CAA+C,CAAC;IACrE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEO,0CAAe"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bc5b1606055e517ac242db28fbe62425922911b9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.mjs @@ -0,0 +1,79 @@ +import { parseDef } from "./parseDef.mjs"; +import { getRefs } from "./Refs.mjs"; +import { zodDef, isEmptyObj } from "./util.mjs"; +const zodToJsonSchema = (schema, options) => { + const refs = getRefs(options); + const name = typeof options === 'string' ? options + : options?.nameStrategy === 'title' ? undefined + : options?.name; + const main = parseDef(schema._def, name === undefined ? refs : ({ + ...refs, + currentPath: [...refs.basePath, refs.definitionPath, name], + }), false) ?? {}; + const title = typeof options === 'object' && options.name !== undefined && options.nameStrategy === 'title' ? + options.name + : undefined; + if (title !== undefined) { + main.title = title; + } + const definitions = (() => { + if (isEmptyObj(refs.definitions)) { + return undefined; + } + const definitions = {}; + const processedDefinitions = new Set(); + // the call to `parseDef()` here might itself add more entries to `.definitions` + // so we need to continually evaluate definitions until we've resolved all of them + // + // we have a generous iteration limit here to avoid blowing up the stack if there + // are any bugs that would otherwise result in us iterating indefinitely + for (let i = 0; i < 500; i++) { + const newDefinitions = Object.entries(refs.definitions).filter(([key]) => !processedDefinitions.has(key)); + if (newDefinitions.length === 0) + break; + for (const [key, schema] of newDefinitions) { + definitions[key] = + parseDef(zodDef(schema), { ...refs, currentPath: [...refs.basePath, refs.definitionPath, key] }, true) ?? {}; + processedDefinitions.add(key); + } + } + return definitions; + })(); + const combined = name === undefined ? + definitions ? + { + ...main, + [refs.definitionPath]: definitions, + } + : main + : refs.nameStrategy === 'duplicate-ref' ? + { + ...main, + ...(definitions || refs.seenRefs.size ? + { + [refs.definitionPath]: { + ...definitions, + // only actually duplicate the schema definition if it was ever referenced + // otherwise the duplication is completely pointless + ...(refs.seenRefs.size ? { [name]: main } : undefined), + }, + } + : undefined), + } + : { + $ref: [...(refs.$refStrategy === 'relative' ? [] : refs.basePath), refs.definitionPath, name].join('/'), + [refs.definitionPath]: { + ...definitions, + [name]: main, + }, + }; + if (refs.target === 'jsonSchema7') { + combined.$schema = 'http://json-schema.org/draft-07/schema#'; + } + else if (refs.target === 'jsonSchema2019-09') { + combined.$schema = 'https://json-schema.org/draft/2019-09/schema#'; + } + return combined; +}; +export { zodToJsonSchema }; +//# sourceMappingURL=zodToJsonSchema.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/cli b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/cli new file mode 100644 index 0000000000000000000000000000000000000000..0bbffe6ba2d0ad0fbbf85c0c274d12ba432fc340 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/cli @@ -0,0 +1,52 @@ +#!/usr/bin/env node + +const { spawnSync } = require('child_process'); + +const commands = { + migrate: { + description: 'Run migrations to update to the latest major SDK version', + fn: () => { + const result = spawnSync( + 'npx', + [ + '-y', + 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.3/stainless-api-migrate-0.0.3.tgz', + '--migrationConfig', + require.resolve('./migration-config.json'), + ...process.argv.slice(3), + ], + { stdio: 'inherit' }, + ); + if (result.status !== 0) { + process.exit(result.status); + } + }, + }, +}; + +function exitWithHelp() { + console.log(`Usage: openai `); + console.log(); + console.log('Subcommands:'); + + for (const [name, info] of Object.entries(commands)) { + console.log(` ${name} ${info.description}`); + } + + console.log(); + process.exit(1); +} + +if (process.argv.length < 3) { + exitWithHelp(); +} + +const commandName = process.argv[2]; + +const command = commands[commandName]; +if (!command) { + console.log(`Unknown subcommand ${commandName}.`); + exitWithHelp(); +} + +command.fn(); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/migration-config.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/migration-config.json new file mode 100644 index 0000000000000000000000000000000000000000..7e23911ce538346eda9c3e44ffe063e1f1df9ad7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/bin/migration-config.json @@ -0,0 +1,939 @@ +{ + "pkg": "openai", + "githubRepo": "https://github.com/openai/openai-node", + "clientClass": "OpenAI", + "methods": [ + { + "base": "chat.completions", + "name": "delete", + "oldName": "del" + }, + { + "base": "chat.completions", + "name": "stream", + "oldBase": "beta.chat.completions" + }, + { + "base": "chat.completions", + "name": "parse", + "oldBase": "beta.chat.completions" + }, + { + "base": "chat.completions", + "name": "runTools", + "oldBase": "beta.chat.completions" + }, + { + "base": "files", + "name": "delete", + "oldName": "del" + }, + { + "base": "models", + "name": "delete", + "oldName": "del" + }, + { + "base": "fineTuning.checkpoints.permissions", + "name": "delete", + "params": [ + { + "type": "param", + "key": "permission_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldName": "del", + "oldParams": [ + { + "type": "param", + "key": "fine_tuned_model_checkpoint", + "location": "path" + }, + { + "type": "param", + "key": "permission_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores", + "name": "delete", + "oldName": "del" + }, + { + "base": "vectorStores.files", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.files", + "name": "update", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.files", + "name": "delete", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldName": "del", + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.files", + "name": "content", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.fileBatches", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.fileBatches", + "name": "cancel", + "params": [ + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "vectorStores.fileBatches", + "name": "listFiles", + "params": [ + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "vector_store_id", + "location": "path" + }, + { + "type": "param", + "key": "batch_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": true + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.assistants", + "name": "delete", + "oldName": "del" + }, + { + "base": "beta.threads", + "name": "delete", + "oldName": "del" + }, + { + "base": "beta.threads.runs", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.runs", + "name": "update", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.runs", + "name": "cancel", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.runs", + "name": "submitToolOutputs", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.runs.steps", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "step_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "param", + "key": "step_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": true + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.runs.steps", + "name": "list", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": true + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.messages", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.messages", + "name": "update", + "params": [ + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ] + }, + { + "base": "beta.threads.messages", + "name": "delete", + "params": [ + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldName": "del", + "oldParams": [ + { + "type": "param", + "key": "thread_id", + "location": "path" + }, + { + "type": "param", + "key": "message_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "responses", + "name": "delete", + "oldName": "del" + }, + { + "base": "evals", + "name": "delete", + "oldName": "del" + }, + { + "base": "evals.runs", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "eval_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "evals.runs", + "name": "delete", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldName": "del", + "oldParams": [ + { + "type": "param", + "key": "eval_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "evals.runs", + "name": "cancel", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "eval_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "evals.runs.outputItems", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "output_item_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "eval_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "param", + "key": "output_item_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "evals.runs.outputItems", + "name": "list", + "params": [ + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "eval_id", + "location": "path" + }, + { + "type": "param", + "key": "run_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": true + }, + { + "type": "options" + } + ] + }, + { + "base": "containers", + "name": "delete", + "oldName": "del" + }, + { + "base": "containers.files", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "container_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "containers.files", + "name": "delete", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldName": "del", + "oldParams": [ + { + "type": "param", + "key": "container_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + }, + { + "base": "containers.files.content", + "name": "retrieve", + "params": [ + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "params", + "maybeOverload": false + }, + { + "type": "options" + } + ], + "oldParams": [ + { + "type": "param", + "key": "container_id", + "location": "path" + }, + { + "type": "param", + "key": "file_id", + "location": "path" + }, + { + "type": "options" + } + ] + } + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..df54978a3d50732dc249d5ad93d53d884df6b548 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts @@ -0,0 +1,49 @@ +import { type OpenAI } from "../client.mjs"; +import { type PromiseOrValue } from "../internal/types.mjs"; +import { type APIResponseProps, type WithRequestID } from "../internal/parse.mjs"; +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +export declare class APIPromise extends Promise> { + #private; + private responsePromise; + private parseResponse; + private parsedPromise; + constructor(client: OpenAI, responsePromise: Promise, parseResponse?: (client: OpenAI, props: APIResponseProps) => PromiseOrValue>); + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise; + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse(): Promise; + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the X-Request-ID header which is useful for debugging requests and reporting + * issues to OpenAI. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + withResponse(): Promise<{ + data: T; + response: Response; + request_id: string | null; + }>; + private parse; + then, TResult2 = never>(onfulfilled?: ((value: WithRequestID) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise | TResult>; + finally(onfinally?: (() => void) | undefined | null): Promise>; +} +//# sourceMappingURL=api-promise.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..480daa6dc9ec25e325defeebfd47618b728d6612 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,MAAM,EAAE;OAEf,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAEnB;AAED;;;GAGG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;;IAMxD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,aAAa;IANvB,OAAO,CAAC,aAAa,CAAwC;gBAI3D,MAAM,EAAE,MAAM,EACN,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAC1C,aAAa,GAAE,CACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,KACpB,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAwB;IAW9D,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAMjF;;;;;;;;;;OAUG;IACH,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI/B;;;;;;;;;;;OAWG;IACG,YAAY,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAKzF,OAAO,CAAC,KAAK;IASJ,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,KAAK,EACzD,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,EAChG,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAClF,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAItB,KAAK,CAAC,OAAO,GAAG,KAAK,EAC5B,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAChF,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;IAI7B,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAGzF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b446b16f62ed05bd59ec7231baef384b98bcaeee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts @@ -0,0 +1,49 @@ +import { type OpenAI } from "../client.js"; +import { type PromiseOrValue } from "../internal/types.js"; +import { type APIResponseProps, type WithRequestID } from "../internal/parse.js"; +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +export declare class APIPromise extends Promise> { + #private; + private responsePromise; + private parseResponse; + private parsedPromise; + constructor(client: OpenAI, responsePromise: Promise, parseResponse?: (client: OpenAI, props: APIResponseProps) => PromiseOrValue>); + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise; + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse(): Promise; + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the X-Request-ID header which is useful for debugging requests and reporting + * issues to OpenAI. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + withResponse(): Promise<{ + data: T; + response: Response; + request_id: string | null; + }>; + private parse; + then, TResult2 = never>(onfulfilled?: ((value: WithRequestID) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise | TResult>; + finally(onfinally?: (() => void) | undefined | null): Promise>; +} +//# sourceMappingURL=api-promise.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9122d93afc761205c149f97ac6021039c5ac6540 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,MAAM,EAAE;OAEf,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAEnB;AAED;;;GAGG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;;IAMxD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,aAAa;IANvB,OAAO,CAAC,aAAa,CAAwC;gBAI3D,MAAM,EAAE,MAAM,EACN,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAC1C,aAAa,GAAE,CACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,KACpB,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAwB;IAW9D,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAMjF;;;;;;;;;;OAUG;IACH,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI/B;;;;;;;;;;;OAWG;IACG,YAAY,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAKzF,OAAO,CAAC,KAAK;IASJ,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,KAAK,EACzD,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,EAChG,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAClF,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAItB,KAAK,CAAC,OAAO,GAAG,KAAK,EAC5B,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAChF,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;IAI7B,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAGzF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js new file mode 100644 index 0000000000000000000000000000000000000000..6b7b9f1b1d54f1a5ece1dc4e68e52cf6696097a2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js @@ -0,0 +1,76 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _APIPromise_client; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.APIPromise = void 0; +const tslib_1 = require("../internal/tslib.js"); +const parse_1 = require("../internal/parse.js"); +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +class APIPromise extends Promise { + constructor(client, responsePromise, parseResponse = parse_1.defaultParseResponse) { + super((resolve) => { + // this is maybe a bit weird but this has to be a no-op to not implicitly + // parse the response body; instead .then, .catch, .finally are overridden + // to parse the response + resolve(null); + }); + this.responsePromise = responsePromise; + this.parseResponse = parseResponse; + _APIPromise_client.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _APIPromise_client, client, "f"); + } + _thenUnwrap(transform) { + return new APIPromise(tslib_1.__classPrivateFieldGet(this, _APIPromise_client, "f"), this.responsePromise, async (client, props) => (0, parse_1.addRequestID)(transform(await this.parseResponse(client, props), props), props.response)); + } + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse() { + return this.responsePromise.then((p) => p.response); + } + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the X-Request-ID header which is useful for debugging requests and reporting + * issues to OpenAI. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + async withResponse() { + const [data, response] = await Promise.all([this.parse(), this.asResponse()]); + return { data, response, request_id: response.headers.get('x-request-id') }; + } + parse() { + if (!this.parsedPromise) { + this.parsedPromise = this.responsePromise.then((data) => this.parseResponse(tslib_1.__classPrivateFieldGet(this, _APIPromise_client, "f"), data)); + } + return this.parsedPromise; + } + then(onfulfilled, onrejected) { + return this.parse().then(onfulfilled, onrejected); + } + catch(onrejected) { + return this.parse().catch(onrejected); + } + finally(onfinally) { + return this.parse().finally(onfinally); + } +} +exports.APIPromise = APIPromise; +_APIPromise_client = new WeakMap(); +//# sourceMappingURL=api-promise.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c402f33591a677a8ca432e960881a208cad0e21d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.js","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAKtF,gDAK2B;AAE3B;;;GAGG;AACH,MAAa,UAAc,SAAQ,OAAyB;IAI1D,YACE,MAAc,EACN,eAA0C,EAC1C,gBAGgC,4BAAoB;QAE5D,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,yEAAyE;YACzE,0EAA0E;YAC1E,wBAAwB;YACxB,OAAO,CAAC,IAAW,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAXK,oBAAe,GAAf,eAAe,CAA2B;QAC1C,kBAAa,GAAb,aAAa,CAGuC;QAR9D,qCAAgB;QAgBd,+BAAA,IAAI,sBAAW,MAAM,MAAA,CAAC;IACxB,CAAC;IAED,WAAW,CAAI,SAAkD;QAC/D,OAAO,IAAI,UAAU,CAAC,+BAAA,IAAI,0BAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAChF,IAAA,oBAAY,EAAC,SAAS,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CACxF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,YAAY;QAChB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC9E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IAC9E,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACtD,IAAI,CAAC,aAAa,CAAC,+BAAA,IAAI,0BAAQ,EAAE,IAAI,CAAC,CACH,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAEQ,IAAI,CACX,WAAgG,EAChG,UAAmF;QAEnF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IAEQ,KAAK,CACZ,UAAiF;QAEjF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAEQ,OAAO,CAAC,SAA2C;QAC1D,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF;AApFD,gCAoFC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs new file mode 100644 index 0000000000000000000000000000000000000000..20700baee5d621aac4611e9d196c39365b2b9f7c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs @@ -0,0 +1,72 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _APIPromise_client; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { defaultParseResponse, addRequestID, } from "../internal/parse.mjs"; +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +export class APIPromise extends Promise { + constructor(client, responsePromise, parseResponse = defaultParseResponse) { + super((resolve) => { + // this is maybe a bit weird but this has to be a no-op to not implicitly + // parse the response body; instead .then, .catch, .finally are overridden + // to parse the response + resolve(null); + }); + this.responsePromise = responsePromise; + this.parseResponse = parseResponse; + _APIPromise_client.set(this, void 0); + __classPrivateFieldSet(this, _APIPromise_client, client, "f"); + } + _thenUnwrap(transform) { + return new APIPromise(__classPrivateFieldGet(this, _APIPromise_client, "f"), this.responsePromise, async (client, props) => addRequestID(transform(await this.parseResponse(client, props), props), props.response)); + } + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse() { + return this.responsePromise.then((p) => p.response); + } + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the X-Request-ID header which is useful for debugging requests and reporting + * issues to OpenAI. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + async withResponse() { + const [data, response] = await Promise.all([this.parse(), this.asResponse()]); + return { data, response, request_id: response.headers.get('x-request-id') }; + } + parse() { + if (!this.parsedPromise) { + this.parsedPromise = this.responsePromise.then((data) => this.parseResponse(__classPrivateFieldGet(this, _APIPromise_client, "f"), data)); + } + return this.parsedPromise; + } + then(onfulfilled, onrejected) { + return this.parse().then(onfulfilled, onrejected); + } + catch(onrejected) { + return this.parse().catch(onrejected); + } + finally(onfinally) { + return this.parse().finally(onfinally); + } +} +_APIPromise_client = new WeakMap(); +//# sourceMappingURL=api-promise.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a3e5509246e863a0f13f8bbbd21df1aa086a8ad3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/api-promise.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAK/E,EAEL,oBAAoB,EAEpB,YAAY,GACb;AAED;;;GAGG;AACH,MAAM,OAAO,UAAc,SAAQ,OAAyB;IAI1D,YACE,MAAc,EACN,eAA0C,EAC1C,gBAGgC,oBAAoB;QAE5D,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,yEAAyE;YACzE,0EAA0E;YAC1E,wBAAwB;YACxB,OAAO,CAAC,IAAW,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAXK,oBAAe,GAAf,eAAe,CAA2B;QAC1C,kBAAa,GAAb,aAAa,CAGuC;QAR9D,qCAAgB;QAgBd,uBAAA,IAAI,sBAAW,MAAM,MAAA,CAAC;IACxB,CAAC;IAED,WAAW,CAAI,SAAkD;QAC/D,OAAO,IAAI,UAAU,CAAC,uBAAA,IAAI,0BAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAChF,YAAY,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CACxF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,YAAY;QAChB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC9E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IAC9E,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACtD,IAAI,CAAC,aAAa,CAAC,uBAAA,IAAI,0BAAQ,EAAE,IAAI,CAAC,CACH,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAEQ,IAAI,CACX,WAAgG,EAChG,UAAmF;QAEnF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IAEQ,KAAK,CACZ,UAAiF;QAEjF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAEQ,OAAO,CAAC,SAA2C;QAC1D,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..86b672bddaafd66cdf16e9799ee4ad307d0c8c58 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.mts @@ -0,0 +1,59 @@ +export declare class OpenAIError extends Error { +} +export declare class APIError extends OpenAIError { + /** HTTP status for the response that caused the error */ + readonly status: TStatus; + /** HTTP headers for the response that caused the error */ + readonly headers: THeaders; + /** JSON body of the response that caused the error */ + readonly error: TError; + readonly code: string | null | undefined; + readonly param: string | null | undefined; + readonly type: string | undefined; + readonly requestID: string | null | undefined; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders); + private static makeMessage; + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError; +} +export declare class APIUserAbortError extends APIError { + constructor({ message }?: { + message?: string; + }); +} +export declare class APIConnectionError extends APIError { + constructor({ message, cause }: { + message?: string | undefined; + cause?: Error | undefined; + }); +} +export declare class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message }?: { + message?: string; + }); +} +export declare class BadRequestError extends APIError<400, Headers> { +} +export declare class AuthenticationError extends APIError<401, Headers> { +} +export declare class PermissionDeniedError extends APIError<403, Headers> { +} +export declare class NotFoundError extends APIError<404, Headers> { +} +export declare class ConflictError extends APIError<409, Headers> { +} +export declare class UnprocessableEntityError extends APIError<422, Headers> { +} +export declare class RateLimitError extends APIError<429, Headers> { +} +export declare class InternalServerError extends APIError { +} +export declare class LengthFinishReasonError extends OpenAIError { + constructor(); +} +export declare class ContentFilterFinishReasonError extends OpenAIError { + constructor(); +} +export declare class InvalidWebhookSignatureError extends Error { + constructor(message: string); +} +//# sourceMappingURL=error.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..52292992ed614189eed500a64868bc3e1fb74b56 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error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ude-code-router/node_modules/openai/core/error.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0aa60fdc5039e0451b11399587a90a69fa16451e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.ts @@ -0,0 +1,59 @@ +export declare class OpenAIError extends Error { +} +export declare class APIError extends OpenAIError { + /** HTTP status for the response that caused the error */ + readonly status: TStatus; + /** HTTP headers for the response that caused the error */ + readonly headers: THeaders; + /** JSON body of the response that caused the error */ + readonly error: TError; + readonly code: string | null | undefined; + readonly param: string | null | undefined; + readonly type: string | undefined; + readonly requestID: string | null | undefined; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders); + private static makeMessage; + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError; +} +export declare class APIUserAbortError extends APIError { + constructor({ message }?: { + message?: string; + }); +} +export declare class APIConnectionError extends APIError { + constructor({ message, cause }: { + message?: string | undefined; + cause?: Error | undefined; + }); +} +export declare class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message }?: { + message?: string; + }); +} +export declare class BadRequestError extends APIError<400, Headers> { +} +export declare class AuthenticationError extends APIError<401, Headers> { +} +export declare class PermissionDeniedError extends APIError<403, Headers> { +} +export declare class NotFoundError extends APIError<404, Headers> { +} +export declare class ConflictError extends APIError<409, Headers> { +} +export declare class UnprocessableEntityError extends APIError<422, Headers> { +} +export declare class RateLimitError extends APIError<429, Headers> { +} +export declare class InternalServerError extends APIError { +} +export declare class LengthFinishReasonError extends OpenAIError { + constructor(); +} +export declare class ContentFilterFinishReasonError extends OpenAIError { + constructor(); +} +export declare class InvalidWebhookSignatureError extends Error { + constructor(message: string); +} +//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..13dae541dee5c6f1396629cf80b1fd2ab969713e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":"AAIA,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAEzC,qBAAa,QAAQ,CACnB,OAAO,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EACvD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAC1D,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACtD,SAAQ,WAAW;IACnB,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;gBAElC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,QAAQ;IAa1F,OAAO,CAAC,MAAM,CAAC,WAAW;IAqB1B,MAAM,CAAC,QAAQ,CACb,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,GAC3B,QAAQ;CAyCZ;AAED,q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at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js new file mode 100644 index 0000000000000000000000000000000000000000..c302cc356f0f24b50c3f5a0aa3ea0b79ae1e9a8d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js @@ -0,0 +1,136 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InvalidWebhookSignatureError = exports.ContentFilterFinishReasonError = exports.LengthFinishReasonError = exports.InternalServerError = exports.RateLimitError = exports.UnprocessableEntityError = exports.ConflictError = exports.NotFoundError = exports.PermissionDeniedError = exports.AuthenticationError = exports.BadRequestError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIUserAbortError = exports.APIError = exports.OpenAIError = void 0; +const errors_1 = require("../internal/errors.js"); +class OpenAIError extends Error { +} +exports.OpenAIError = OpenAIError; +class APIError extends OpenAIError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('x-request-id'); + this.error = error; + const data = error; + this.code = data?.['code']; + this.param = data?.['param']; + this.type = data?.['type']; + } + static makeMessage(status, error, message) { + const msg = error?.message ? + typeof error.message === 'string' ? + error.message + : JSON.stringify(error.message) + : error ? JSON.stringify(error) + : message; + if (status && msg) { + return `${status} ${msg}`; + } + if (status) { + return `${status} status code (no body)`; + } + if (msg) { + return msg; + } + return '(no status code or body)'; + } + static generate(status, errorResponse, message, headers) { + if (!status || !headers) { + return new APIConnectionError({ message, cause: (0, errors_1.castToError)(errorResponse) }); + } + const error = errorResponse?.['error']; + if (status === 400) { + return new BadRequestError(status, error, message, headers); + } + if (status === 401) { + return new AuthenticationError(status, error, message, headers); + } + if (status === 403) { + return new PermissionDeniedError(status, error, message, headers); + } + if (status === 404) { + return new NotFoundError(status, error, message, headers); + } + if (status === 409) { + return new ConflictError(status, error, message, headers); + } + if (status === 422) { + return new UnprocessableEntityError(status, error, message, headers); + } + if (status === 429) { + return new RateLimitError(status, error, message, headers); + } + if (status >= 500) { + return new InternalServerError(status, error, message, headers); + } + return new APIError(status, error, message, headers); + } +} +exports.APIError = APIError; +class APIUserAbortError extends APIError { + constructor({ message } = {}) { + super(undefined, undefined, message || 'Request was aborted.', undefined); + } +} +exports.APIUserAbortError = APIUserAbortError; +class APIConnectionError extends APIError { + constructor({ message, cause }) { + super(undefined, undefined, message || 'Connection error.', undefined); + // in some environments the 'cause' property is already declared + // @ts-ignore + if (cause) + this.cause = cause; + } +} +exports.APIConnectionError = APIConnectionError; +class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message } = {}) { + super({ message: message ?? 'Request timed out.' }); + } +} +exports.APIConnectionTimeoutError = APIConnectionTimeoutError; +class BadRequestError extends APIError { +} +exports.BadRequestError = BadRequestError; +class AuthenticationError extends APIError { +} +exports.AuthenticationError = AuthenticationError; +class PermissionDeniedError extends APIError { +} +exports.PermissionDeniedError = PermissionDeniedError; +class NotFoundError extends APIError { +} +exports.NotFoundError = NotFoundError; +class ConflictError extends APIError { +} +exports.ConflictError = ConflictError; +class UnprocessableEntityError extends APIError { +} +exports.UnprocessableEntityError = UnprocessableEntityError; +class RateLimitError extends APIError { +} +exports.RateLimitError = RateLimitError; +class InternalServerError extends APIError { +} +exports.InternalServerError = InternalServerError; +class LengthFinishReasonError extends OpenAIError { + constructor() { + super(`Could not parse response content as the length limit was reached`); + } +} +exports.LengthFinishReasonError = LengthFinishReasonError; +class ContentFilterFinishReasonError extends OpenAIError { + constructor() { + super(`Could not parse response content as the request was rejected by the content filter`); + } +} +exports.ContentFilterFinishReasonError = ContentFilterFinishReasonError; +class InvalidWebhookSignatureError extends Error { + constructor(message) { + super(message); + } +} +exports.InvalidWebhookSignatureError = InvalidWebhookSignatureError; +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fefeab0b0fa758f17e4e6cb6cf0e5a7293bb4e77 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAAiD;AAEjD,MAAa,WAAY,SAAQ,KAAK;CAAG;AAAzC,kCAAyC;AAEzC,MAAa,QAIX,SAAQ,WAAW;IAcnB,YAAY,MAAe,EAAE,KAAa,EAAE,OAA2B,EAAE,OAAiB;QACxF,KAAK,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,MAAM,IAAI,GAAG,KAA4B,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAEO,MAAM,CAAC,WAAW,CAAC,MAA0B,EAAE,KAAU,EAAE,OAA2B;QAC5F,MAAM,GAAG,GACP,KAAK,EAAE,OAAO,CAAC,CAAC;YACd,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC;gBACjC,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AC;IAChC,CAAC;CACF;AAPD,gDAOC;AAED,MAAa,yBAA0B,SAAQ,kBAAkB;IAC/D,YAAY,EAAE,OAAO,KAA2B,EAAE;QAChD,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,CAAC,CAAC;IACtD,CAAC;CACF;AAJD,8DAIC;AAED,MAAa,eAAgB,SAAQ,QAAsB;CAAG;AAA9D,0CAA8D;AAE9D,MAAa,mBAAoB,SAAQ,QAAsB;CAAG;AAAlE,kDAAkE;AAElE,MAAa,qBAAsB,SAAQ,QAAsB;CAAG;AAApE,sDAAoE;AAEpE,MAAa,aAAc,SAAQ,QAAsB;CAAG;AAA5D,sCAA4D;AAE5D,MAAa,aAAc,SAAQ,QAAsB;CAAG;AAA5D,sCAA4D;AAE5D,MAAa,wBAAyB,SAAQ,QAAsB;CAAG;AAAvE,4DAAuE;AAEvE,MAAa,cAAe,SAAQ,QAAsB;CAAG;AAA7D,wCAA6D;AAE7D,MAAa,mBAAoB,SAAQ,QAAyB;CAAG;AAArE,kDAAqE;AAErE,MAAa,uBAAwB,SAAQ,WAAW;IACtD;QACE,KAAK,CAAC,kEAAkE,CAAC,CAAC;IAC5E,CAAC;CACF;AAJD,0DAIC;AAED,MAAa,8BAA+B,SAAQ,WAAW;IAC7D;QACE,KAAK,CAAC,oFAAoF,CAAC,CAAC;IAC9F,CAAC;CACF;AAJD,wEAIC;AAED,MAAa,4BAA6B,SAAQ,KAAK;IACrD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,oEAIC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..75f5b0c328cc4894478f3490a00dbf6abd96fc12 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs @@ -0,0 +1,117 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { castToError } from "../internal/errors.mjs"; +export class OpenAIError extends Error { +} +export class APIError extends OpenAIError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('x-request-id'); + this.error = error; + const data = error; + this.code = data?.['code']; + this.param = data?.['param']; + this.type = data?.['type']; + } + static makeMessage(status, error, message) { + const msg = error?.message ? + typeof error.message === 'string' ? + error.message + : JSON.stringify(error.message) + : error ? JSON.stringify(error) + : message; + if (status && msg) { + return `${status} ${msg}`; + } + if (status) { + return `${status} status code (no body)`; + } + if (msg) { + return msg; + } + return '(no status code or body)'; + } + static generate(status, errorResponse, message, headers) { + if (!status || !headers) { + return new APIConnectionError({ message, cause: castToError(errorResponse) }); + } + const error = errorResponse?.['error']; + if (status === 400) { + return new BadRequestError(status, error, message, headers); + } + if (status === 401) { + return new AuthenticationError(status, error, message, headers); + } + if (status === 403) { + return new PermissionDeniedError(status, error, message, headers); + } + if (status === 404) { + return new NotFoundError(status, error, message, headers); + } + if (status === 409) { + return new ConflictError(status, error, message, headers); + } + if (status === 422) { + return new UnprocessableEntityError(status, error, message, headers); + } + if (status === 429) { + return new RateLimitError(status, error, message, headers); + } + if (status >= 500) { + return new InternalServerError(status, error, message, headers); + } + return new APIError(status, error, message, headers); + } +} +export class APIUserAbortError extends APIError { + constructor({ message } = {}) { + super(undefined, undefined, message || 'Request was aborted.', undefined); + } +} +export class APIConnectionError extends APIError { + constructor({ message, cause }) { + super(undefined, undefined, message || 'Connection error.', undefined); + // in some environments the 'cause' property is already declared + // @ts-ignore + if (cause) + this.cause = cause; + } +} +export class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message } = {}) { + super({ message: message ?? 'Request timed out.' }); + } +} +export class BadRequestError extends APIError { +} +export class AuthenticationError extends APIError { +} +export class PermissionDeniedError extends APIError { +} +export class NotFoundError extends APIError { +} +export class ConflictError extends APIError { +} +export class UnprocessableEntityError extends APIError { +} +export class RateLimitError extends APIError { +} +export class InternalServerError extends APIError { +} +export class LengthFinishReasonError extends OpenAIError { + constructor() { + super(`Could not parse response content as the length limit was reached`); + } +} +export class ContentFilterFinishReasonError extends OpenAIError { + constructor() { + super(`Could not parse response content as the request was rejected by the content filter`); + } +} +export class InvalidWebhookSignatureError extends Error { + constructor(message) { + super(message); + } +} +//# sourceMappingURL=error.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b05c4b8d59b432bf489d2f79512c12fba77c716c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/error.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"error.mjs","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,WAAY,SAAQ,KAAK;CAAG;AAEzC,MAAM,OAAO,QAIX,SAAQ,WAAW;IAcnB,YAAY,MAAe,EAAE,KAAa,EAAE,OAA2B,EAAE,OAAiB;QACxF,KAAK,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,MAAM,IAAI,GAAG,KAA4B,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;QAC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/openai/core/pagination.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..18445321dc33974dc9a16f678cc068fd6832019e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.mts @@ -0,0 +1,89 @@ +import { FinalRequestOptions } from "../internal/request-options.mjs"; +import { APIPromise } from "./api-promise.mjs"; +import { type OpenAI } from "../client.mjs"; +import { type APIResponseProps } from "../internal/parse.mjs"; +export type PageRequestOptions = Pick; +export declare abstract class AbstractPage implements AsyncIterable { + #private; + protected options: FinalRequestOptions; + protected response: Response; + protected body: unknown; + constructor(client: OpenAI, response: Response, body: unknown, options: FinalRequestOptions); + abstract nextPageRequestOptions(): PageRequestOptions | null; + abstract getPaginatedItems(): Item[]; + hasNextPage(): boolean; + getNextPage(): Promise; + iterPages(): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; +} +/** + * This subclass of Promise will resolve to an instantiated Page once the request completes. + * + * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ +export declare class PagePromise, Item = ReturnType[number]> extends APIPromise implements AsyncIterable { + constructor(client: OpenAI, request: Promise, Page: new (...args: ConstructorParameters) => PageClass); + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + [Symbol.asyncIterator](): AsyncGenerator; +} +export interface PageResponse { + data: Array; + object: string; +} +/** + * Note: no pagination actually occurs yet, this is for forwards-compatibility. + */ +export declare class Page extends AbstractPage implements PageResponse { + data: Array; + object: string; + constructor(client: OpenAI, response: Response, body: PageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + nextPageRequestOptions(): PageRequestOptions | null; +} +export interface CursorPageResponse { + data: Array; + has_more: boolean; +} +export interface CursorPageParams { + after?: string; + limit?: number; +} +export declare class CursorPage extends AbstractPage implements CursorPageResponse { + data: Array; + has_more: boolean; + constructor(client: OpenAI, response: Response, body: CursorPageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + hasNextPage(): boolean; + nextPageRequestOptions(): PageRequestOptions | null; +} +export interface ConversationCursorPageResponse { + data: Array; + has_more: boolean; + last_id: string; +} +export interface ConversationCursorPageParams { + after?: string; + limit?: number; +} +export declare class ConversationCursorPage extends AbstractPage implements ConversationCursorPageResponse { + data: Array; + has_more: boolean; + last_id: string; + constructor(client: OpenAI, response: Response, body: ConversationCursorPageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + hasNextPage(): boolean; + nextPageRequestOptions(): PageRequestOptions | null; +} +//# sourceMappingURL=pagination.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1418e03912297f7b815ee5d1d447d2df62dec765 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.mts","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"OAGO,EAAE,mBAAmB,EAAE;OAEvB,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,EAAE;OACf,EAAE,KAAK,gBAAgB,EAAE;AAGhC,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE7G,8BAAsB,YAAY,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;;IAErE,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;IAEvC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,IAAI,EA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CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;gBAGd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,8BAA8B,CAAC,IAAI,CAAC,EAC1C,OAAO,EAAE,mBAAmB;IAS9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CAcpD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8188b507acc6384dc60b75d6555a8a8285284b85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts @@ -0,0 +1,89 @@ +import { FinalRequestOptions } from "../internal/request-options.js"; +import { APIPromise } from "./api-promise.js"; +import { type OpenAI } from "../client.js"; +import { type APIResponseProps } from "../internal/parse.js"; +export type PageRequestOptions = Pick; +export declare abstract class AbstractPage implements AsyncIterable { + #private; + protected options: FinalRequestOptions; + protected response: Response; + protected body: unknown; + constructor(client: OpenAI, response: Response, body: unknown, options: FinalRequestOptions); + abstract nextPageRequestOptions(): PageRequestOptions | null; + abstract getPaginatedItems(): Item[]; + hasNextPage(): boolean; + getNextPage(): Promise; + iterPages(): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; +} +/** + * This subclass of Promise will resolve to an instantiated Page once the request completes. + * + * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ +export declare class PagePromise, Item = ReturnType[number]> extends APIPromise implements AsyncIterable { + constructor(client: OpenAI, request: Promise, Page: new (...args: ConstructorParameters) => PageClass); + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + [Symbol.asyncIterator](): AsyncGenerator; +} +export interface PageResponse { + data: Array; + object: string; +} +/** + * Note: no pagination actually occurs yet, this is for forwards-compatibility. + */ +export declare class Page extends AbstractPage implements PageResponse { + data: Array; + object: string; + constructor(client: OpenAI, response: Response, body: PageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + nextPageRequestOptions(): PageRequestOptions | null; +} +export interface CursorPageResponse { + data: Array; + has_more: boolean; +} +export interface CursorPageParams { + after?: string; + limit?: number; +} +export declare class CursorPage extends AbstractPage implements CursorPageResponse { + data: Array; + has_more: boolean; + constructor(client: OpenAI, response: Response, body: CursorPageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + hasNextPage(): boolean; + nextPageRequestOptions(): PageRequestOptions | null; +} +export interface ConversationCursorPageResponse { + data: Array; + has_more: boolean; + last_id: string; +} +export interface ConversationCursorPageParams { + after?: string; + limit?: number; +} +export declare class ConversationCursorPage extends AbstractPage implements ConversationCursorPageResponse { + data: Array; + has_more: boolean; + last_id: string; + constructor(client: OpenAI, response: Response, body: ConversationCursorPageResponse, options: FinalRequestOptions); + getPaginatedItems(): Item[]; + hasNextPage(): boolean; + nextPageRequestOptions(): PageRequestOptions | null; +} +//# sourceMappingURL=pagination.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8c10c11a7cb9e97fa284f2aaf3dcb4f8467a73a2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"OAGO,EAAE,mBAAmB,EAAE;OAEvB,EAAE,UAAU,EAAE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AM,WAAW,8BAA8B,CAAC,IAAI;IAClD,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,sBAAsB,CAAC,IAAI,CACtC,SAAQ,YAAY,CAAC,IAAI,CACzB,YAAW,8BAA8B,CAAC,IAAI,CAAC;IAE/C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;gBAGd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,8BAA8B,CAAC,IAAI,CAAC,EAC1C,OAAO,EAAE,mBAAmB;IAS9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CAcpD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js new file mode 100644 index 0000000000000000000000000000000000000000..2c21f5e3c7e9d41929fea3f86d7fbe22ae780415 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js @@ -0,0 +1,156 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _AbstractPage_client; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConversationCursorPage = exports.CursorPage = exports.Page = exports.PagePromise = exports.AbstractPage = void 0; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("./error.js"); +const parse_1 = require("../internal/parse.js"); +const api_promise_1 = require("./api-promise.js"); +const values_1 = require("../internal/utils/values.js"); +class AbstractPage { + constructor(client, response, body, options) { + _AbstractPage_client.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _AbstractPage_client, client, "f"); + this.options = options; + this.response = response; + this.body = body; + } + hasNextPage() { + const items = this.getPaginatedItems(); + if (!items.length) + return false; + return this.nextPageRequestOptions() != null; + } + async getNextPage() { + const nextOptions = this.nextPageRequestOptions(); + if (!nextOptions) { + throw new error_1.OpenAIError('No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.'); + } + return await tslib_1.__classPrivateFieldGet(this, _AbstractPage_client, "f").requestAPIList(this.constructor, nextOptions); + } + async *iterPages() { + let page = this; + yield page; + while (page.hasNextPage()) { + page = await page.getNextPage(); + yield page; + } + } + async *[(_AbstractPage_client = new WeakMap(), Symbol.asyncIterator)]() { + for await (const page of this.iterPages()) { + for (const item of page.getPaginatedItems()) { + yield item; + } + } + } +} +exports.AbstractPage = AbstractPage; +/** + * This subclass of Promise will resolve to an instantiated Page once the request completes. + * + * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ +class PagePromise extends api_promise_1.APIPromise { + constructor(client, request, Page) { + super(client, request, async (client, props) => new Page(client, props.response, await (0, parse_1.defaultParseResponse)(client, props), props.options)); + } + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + async *[Symbol.asyncIterator]() { + const page = await this; + for await (const item of page) { + yield item; + } + } +} +exports.PagePromise = PagePromise; +/** + * Note: no pagination actually occurs yet, this is for forwards-compatibility. + */ +class Page extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.object = body.object; + } + getPaginatedItems() { + return this.data ?? []; + } + nextPageRequestOptions() { + return null; + } +} +exports.Page = Page; +class CursorPage extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + const data = this.getPaginatedItems(); + const id = data[data.length - 1]?.id; + if (!id) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + after: id, + }, + }; + } +} +exports.CursorPage = CursorPage; +class ConversationCursorPage extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + this.last_id = body.last_id || ''; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + const cursor = this.last_id; + if (!cursor) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + after: cursor, + }, + }; + } +} +exports.ConversationCursorPage = ConversationCursorPage; +//# sourceMappingURL=pagination.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js.map new file mode 100644 index 0000000000000000000000000000000000000000..552719d7c5cf5f6c818c16b1f0e70173c6bb5b29 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAEtF,sCAAsC;AAEtC,gDAAwE;AACxE,kDAA2C;AAG3C,wDAAoD;AAIpD,MAAsB,YAAY;IAOhC,YAAY,MAAc,EAAE,QAAkB,EAAE,IAAa,EAAE,OAA4B;QAN3F,uCAAgB;QAOd,+BAAA,IAAI,wBAAW,MAAM,MAAA,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,C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GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,KAAK,EAAE;gBACL,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC/B,KAAK,EAAE,MAAM;aACd;SACF,CAAC;IACJ,CAAC;CACF;AAjDD,wDAiDC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2761637e607bf43a74199b592f30265b41e1142c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs @@ -0,0 +1,148 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _AbstractPage_client; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { OpenAIError } from "./error.mjs"; +import { defaultParseResponse } from "../internal/parse.mjs"; +import { APIPromise } from "./api-promise.mjs"; +import { maybeObj } from "../internal/utils/values.mjs"; +export class AbstractPage { + constructor(client, response, body, options) { + _AbstractPage_client.set(this, void 0); + __classPrivateFieldSet(this, _AbstractPage_client, client, "f"); + this.options = options; + this.response = response; + this.body = body; + } + hasNextPage() { + const items = this.getPaginatedItems(); + if (!items.length) + return false; + return this.nextPageRequestOptions() != null; + } + async getNextPage() { + const nextOptions = this.nextPageRequestOptions(); + if (!nextOptions) { + throw new OpenAIError('No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.'); + } + return await __classPrivateFieldGet(this, _AbstractPage_client, "f").requestAPIList(this.constructor, nextOptions); + } + async *iterPages() { + let page = this; + yield page; + while (page.hasNextPage()) { + page = await page.getNextPage(); + yield page; + } + } + async *[(_AbstractPage_client = new WeakMap(), Symbol.asyncIterator)]() { + for await (const page of this.iterPages()) { + for (const item of page.getPaginatedItems()) { + yield item; + } + } + } +} +/** + * This subclass of Promise will resolve to an instantiated Page once the request completes. + * + * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ +export class PagePromise extends APIPromise { + constructor(client, request, Page) { + super(client, request, async (client, props) => new Page(client, props.response, await defaultParseResponse(client, props), props.options)); + } + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + async *[Symbol.asyncIterator]() { + const page = await this; + for await (const item of page) { + yield item; + } + } +} +/** + * Note: no pagination actually occurs yet, this is for forwards-compatibility. + */ +export class Page extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.object = body.object; + } + getPaginatedItems() { + return this.data ?? []; + } + nextPageRequestOptions() { + return null; + } +} +export class CursorPage extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + const data = this.getPaginatedItems(); + const id = data[data.length - 1]?.id; + if (!id) { + return null; + } + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + after: id, + }, + }; + } +} +export class ConversationCursorPage extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + this.last_id = body.last_id || ''; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + const cursor = this.last_id; + if (!cursor) { + return null; + } + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + after: cursor, + }, + }; + } +} +//# sourceMappingURL=pagination.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..5a17ce3ca1a18c903b1fb0539261b46649952160 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/pagination.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.mjs","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,oBAAoB,EAAiB;OACvC,EAAE,UAAU,EAAE;OAGd,EAAE,QAAQ,EAAE;AAInB,MAAM,OAAgB,YAAY;IAOhC,YAAY,MAAc,EAAE,QAAkB,EAAE,IAAa,EAAE,OAA4B;QAN3F,uCAAgB;QAOd,uBAAA,IAAI,wBAAW,MAAM,MAAA,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAMD,WAAW;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAChC,OAAO,IAAI,CAAC,sBAAsB,EAAE,IAAI,IAAI,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,WAAW,CACnB,uFAAuF,CACxF,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,uBAAA,IAAI,4BAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,WAAkB,EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,CAAC,SAAS;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AQ,YAAkB;IAS1B,YACE,MAAc,EACd,QAAkB,EAClB,IAA0C,EAC1C,OAA4B;QAE5B,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;IACpC,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IACzB,CAAC;IAEQ,WAAW;QAClB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;IAED,sBAAsB;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,KAAK,EAAE;gBACL,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC/B,KAAK,EAAE,MAAM;aACd;SACF,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e69c9f9a60ee525f323727cd0a878967e49ba6ac --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts @@ -0,0 +1,6 @@ +import type { OpenAI } from "../client.mjs"; +export declare abstract class APIResource { + protected _client: OpenAI; + constructor(client: OpenAI); +} +//# sourceMappingURL=resource.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..19778795b40088443bf43a21c506106c95c48dbe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.mts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,MAAM,EAAE;AAEtB,8BAAsB,WAAW;IAC/B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEd,MAAM,EAAE,MAAM;CAG3B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..208d0a4b8b24d520e0d030a42dfa7023f9ee4496 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts @@ -0,0 +1,6 @@ +import type { OpenAI } from "../client.js"; +export declare abstract class APIResource { + protected _client: OpenAI; + constructor(client: OpenAI); +} +//# sourceMappingURL=resource.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5d7475396c567990e80321fd73a69bc1565727e6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,MAAM,EAAE;AAEtB,8BAAsB,WAAW;IAC/B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEd,MAAM,EAAE,MAAM;CAG3B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js new file mode 100644 index 0000000000000000000000000000000000000000..edccb482a6fd3bebc374ba12133cef050cf02704 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js @@ -0,0 +1,11 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.APIResource = void 0; +class APIResource { + constructor(client) { + this._client = client; + } +} +exports.APIResource = APIResource; +//# sourceMappingURL=resource.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d8960b86a86c337fc8d04d09e9fe1f51748b2b75 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.js","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAsB,WAAW;IAG/B,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF;AAND,kCAMC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs new file mode 100644 index 0000000000000000000000000000000000000000..98ee0dc70a7b08c430bbc459f342952753844668 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export class APIResource { + constructor(client) { + this._client = client; + } +} +//# sourceMappingURL=resource.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..dabb489421f9ae0d755fee43b93eb79040c69a99 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/resource.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,MAAM,OAAgB,WAAW;IAG/B,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f5187f7968dd0fe914e71b906497499b075bd5aa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts @@ -0,0 +1,33 @@ +import { type ReadableStream } from "../internal/shim-types.mjs"; +import type { OpenAI } from "../client.mjs"; +export type ServerSentEvent = { + event: string | null; + data: string; + raw: string[]; +}; +export declare class Stream implements AsyncIterable { + #private; + private iterator; + controller: AbortController; + constructor(iterator: () => AsyncIterator, controller: AbortController, client?: OpenAI); + static fromSSEResponse(response: Response, controller: AbortController, client?: OpenAI): Stream; + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream: ReadableStream, controller: AbortController, client?: OpenAI): Stream; + [Symbol.asyncIterator](): AsyncIterator; + /** + * Splits the stream into two streams which can be + * independently read from at different speeds. + */ + tee(): [Stream, Stream]; + /** + * Converts this stream to a newline-separated ReadableStream of + * JSON stringified values in the stream + * which can be turned back into a Stream with `Stream.fromReadableStream()`. + */ + toReadableStream(): ReadableStream; +} +export declare function _iterSSEMessages(response: Response, controller: AbortController): AsyncGenerator; +//# sourceMappingURL=streaming.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..033edaee78899c83703266d7649f42fbe52a3e6c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.mts","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":"OACO,EAAE,KAAK,cAAc,EAAE;OAOvB,KAAK,EAAE,MAAM,EAAE;AAMtB,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,qBAAa,MAAM,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;;IAKpD,OAAO,CAAC,QAAQ;IAJlB,UAAU,EAAE,eAAe,CAAC;gBAIlB,QAAQ,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM;IAMjB,MAAM,CAAC,eAAe,CAAC,IAAI,EACzB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,IAAI,CAAC;IAiEf;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,IAAI,CAAC;IA2Cf,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC;IAI7C;;;OAGG;IACH,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAwBnC;;;;OAIG;IACH,gBAAgB,IAAI,cAAc;CAyBnC;AAED,wBAAuB,gBAAgB,CACrC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,eAAe,GAC1B,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CA6BhD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fffc5e7ea1232b1a91605357f815d5391e692a5a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts @@ -0,0 +1,33 @@ +import { type ReadableStream } from "../internal/shim-types.js"; +import type { OpenAI } from "../client.js"; +export type ServerSentEvent = { + event: string | null; + data: string; + raw: string[]; +}; +export declare class Stream implements AsyncIterable { + #private; + private iterator; + controller: AbortController; + constructor(iterator: () => AsyncIterator, controller: AbortController, client?: OpenAI); + static fromSSEResponse(response: Response, controller: AbortController, client?: OpenAI): Stream; + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream: ReadableStream, controller: AbortController, client?: OpenAI): Stream; + [Symbol.asyncIterator](): AsyncIterator; + /** + * Splits the stream into two streams which can be + * independently read from at different speeds. + */ + tee(): [Stream, Stream]; + /** + * Converts this stream to a newline-separated ReadableStream of + * JSON stringified values in the stream + * which can be turned back into a Stream with `Stream.fromReadableStream()`. + */ + toReadableStream(): ReadableStream; +} +export declare function _iterSSEMessages(response: Response, controller: AbortController): AsyncGenerator; +//# sourceMappingURL=streaming.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..db63f42362d3370ec4098da92425117bda55de7e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":"OACO,EAAE,KAAK,cAAc,EAAE;OAOvB,KAAK,EAAE,MAAM,EAAE;AAMtB,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,qBAAa,MAAM,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;;IAKpD,OAAO,CAAC,QAAQ;IAJlB,UAAU,EAAE,eAAe,CAAC;gBAIlB,QAAQ,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM;IAMjB,MAAM,CAAC,eAAe,CAAC,IAAI,EACzB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,IAAI,CAAC;IAiEf;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,IAAI,CAAC;IA2Cf,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC;IAI7C;;;OAGG;IACH,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAwBnC;;;;OAIG;IACH,gBAAgB,IAAI,cAAc;CAyBnC;AAED,wBAAuB,gBAAgB,CACrC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,eAAe,GAC1B,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CA6BhD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js new file mode 100644 index 0000000000000000000000000000000000000000..1a340176300c5e30d933df781e0165c848bd8ca2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js @@ -0,0 +1,293 @@ +"use strict"; +var _Stream_client; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Stream = void 0; +exports._iterSSEMessages = _iterSSEMessages; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("./error.js"); +const shims_1 = require("../internal/shims.js"); +const line_1 = require("../internal/decoders/line.js"); +const shims_2 = require("../internal/shims.js"); +const errors_1 = require("../internal/errors.js"); +const bytes_1 = require("../internal/utils/bytes.js"); +const log_1 = require("../internal/utils/log.js"); +const error_2 = require("./error.js"); +class Stream { + constructor(iterator, controller, client) { + this.iterator = iterator; + _Stream_client.set(this, void 0); + this.controller = controller; + tslib_1.__classPrivateFieldSet(this, _Stream_client, client, "f"); + } + static fromSSEResponse(response, controller, client) { + let consumed = false; + const logger = client ? (0, log_1.loggerFor)(client) : console; + async function* iterator() { + if (consumed) { + throw new error_1.OpenAIError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + } + consumed = true; + let done = false; + try { + for await (const sse of _iterSSEMessages(response, controller)) { + if (done) + continue; + if (sse.data.startsWith('[DONE]')) { + done = true; + continue; + } + if (sse.event === null || !sse.event.startsWith('thread.')) { + let data; + try { + data = JSON.parse(sse.data); + } + catch (e) { + logger.error(`Could not parse message into JSON:`, sse.data); + logger.error(`From chunk:`, sse.raw); + throw e; + } + if (data && data.error) { + throw new error_2.APIError(undefined, data.error, undefined, response.headers); + } + yield data; + } + else { + let data; + try { + data = JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + // TODO: Is this where the error should be thrown? + if (sse.event == 'error') { + throw new error_2.APIError(undefined, data.error, data.message, undefined); + } + yield { event: sse.event, data: data }; + } + } + done = true; + } + catch (e) { + // If the user calls `stream.controller.abort()`, we should exit without throwing. + if ((0, errors_1.isAbortError)(e)) + return; + throw e; + } + finally { + // If the user `break`s, abort the ongoing request. + if (!done) + controller.abort(); + } + } + return new Stream(iterator, controller, client); + } + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream, controller, client) { + let consumed = false; + async function* iterLines() { + const lineDecoder = new line_1.LineDecoder(); + const iter = (0, shims_2.ReadableStreamToAsyncIterable)(readableStream); + for await (const chunk of iter) { + for (const line of lineDecoder.decode(chunk)) { + yield line; + } + } + for (const line of lineDecoder.flush()) { + yield line; + } + } + async function* iterator() { + if (consumed) { + throw new error_1.OpenAIError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + } + consumed = true; + let done = false; + try { + for await (const line of iterLines()) { + if (done) + continue; + if (line) + yield JSON.parse(line); + } + done = true; + } + catch (e) { + // If the user calls `stream.controller.abort()`, we should exit without throwing. + if ((0, errors_1.isAbortError)(e)) + return; + throw e; + } + finally { + // If the user `break`s, abort the ongoing request. + if (!done) + controller.abort(); + } + } + return new Stream(iterator, controller, client); + } + [(_Stream_client = new WeakMap(), Symbol.asyncIterator)]() { + return this.iterator(); + } + /** + * Splits the stream into two streams which can be + * independently read from at different speeds. + */ + tee() { + const left = []; + const right = []; + const iterator = this.iterator(); + const teeIterator = (queue) => { + return { + next: () => { + if (queue.length === 0) { + const result = iterator.next(); + left.push(result); + right.push(result); + } + return queue.shift(); + }, + }; + }; + return [ + new Stream(() => teeIterator(left), this.controller, tslib_1.__classPrivateFieldGet(this, _Stream_client, "f")), + new Stream(() => teeIterator(right), this.controller, tslib_1.__classPrivateFieldGet(this, _Stream_client, "f")), + ]; + } + /** + * Converts this stream to a newline-separated ReadableStream of + * JSON stringified values in the stream + * which can be turned back into a Stream with `Stream.fromReadableStream()`. + */ + toReadableStream() { + const self = this; + let iter; + return (0, shims_1.makeReadableStream)({ + async start() { + iter = self[Symbol.asyncIterator](); + }, + async pull(ctrl) { + try { + const { value, done } = await iter.next(); + if (done) + return ctrl.close(); + const bytes = (0, bytes_1.encodeUTF8)(JSON.stringify(value) + '\n'); + ctrl.enqueue(bytes); + } + catch (err) { + ctrl.error(err); + } + }, + async cancel() { + await iter.return?.(); + }, + }); + } +} +exports.Stream = Stream; +async function* _iterSSEMessages(response, controller) { + if (!response.body) { + controller.abort(); + if (typeof globalThis.navigator !== 'undefined' && + globalThis.navigator.product === 'ReactNative') { + throw new error_1.OpenAIError(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`); + } + throw new error_1.OpenAIError(`Attempted to iterate over a response with no body`); + } + const sseDecoder = new SSEDecoder(); + const lineDecoder = new line_1.LineDecoder(); + const iter = (0, shims_2.ReadableStreamToAsyncIterable)(response.body); + for await (const sseChunk of iterSSEChunks(iter)) { + for (const line of lineDecoder.decode(sseChunk)) { + const sse = sseDecoder.decode(line); + if (sse) + yield sse; + } + } + for (const line of lineDecoder.flush()) { + const sse = sseDecoder.decode(line); + if (sse) + yield sse; + } +} +/** + * Given an async iterable iterator, iterates over it and yields full + * SSE chunks, i.e. yields when a double new-line is encountered. + */ +async function* iterSSEChunks(iterator) { + let data = new Uint8Array(); + for await (const chunk of iterator) { + if (chunk == null) { + continue; + } + const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) + : typeof chunk === 'string' ? (0, bytes_1.encodeUTF8)(chunk) + : chunk; + let newData = new Uint8Array(data.length + binaryChunk.length); + newData.set(data); + newData.set(binaryChunk, data.length); + data = newData; + let patternIndex; + while ((patternIndex = (0, line_1.findDoubleNewlineIndex)(data)) !== -1) { + yield data.slice(0, patternIndex); + data = data.slice(patternIndex); + } + } + if (data.length > 0) { + yield data; + } +} +class SSEDecoder { + constructor() { + this.event = null; + this.data = []; + this.chunks = []; + } + decode(line) { + if (line.endsWith('\r')) { + line = line.substring(0, line.length - 1); + } + if (!line) { + // empty line and we didn't previously encounter any messages + if (!this.event && !this.data.length) + return null; + const sse = { + event: this.event, + data: this.data.join('\n'), + raw: this.chunks, + }; + this.event = null; + this.data = []; + this.chunks = []; + return sse; + } + this.chunks.push(line); + if (line.startsWith(':')) { + return null; + } + let [fieldname, _, value] = partition(line, ':'); + if (value.startsWith(' ')) { + value = value.substring(1); + } + if (fieldname === 'event') { + this.event = value; + } + else if (fieldname === 'data') { + this.data.push(value); + } + return null; + } +} +function partition(str, delimiter) { + const index = str.indexOf(delimiter); + if (index !== -1) { + return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)]; + } + return [str, '', '']; +} +//# sourceMappingURL=streaming.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js.map new file mode 100644 index 0000000000000000000000000000000000000000..53c9d2dc309d7880b99a6e235ed8387c2b019b33 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.js.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.js","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":";;;;AAyNA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;AACvB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5f9d6659c6e2f767f65d62f090b18572b4a6c2f9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs @@ -0,0 +1,288 @@ +var _Stream_client; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { OpenAIError } from "./error.mjs"; +import { makeReadableStream } from "../internal/shims.mjs"; +import { findDoubleNewlineIndex, LineDecoder } from "../internal/decoders/line.mjs"; +import { ReadableStreamToAsyncIterable } from "../internal/shims.mjs"; +import { isAbortError } from "../internal/errors.mjs"; +import { encodeUTF8 } from "../internal/utils/bytes.mjs"; +import { loggerFor } from "../internal/utils/log.mjs"; +import { APIError } from "./error.mjs"; +export class Stream { + constructor(iterator, controller, client) { + this.iterator = iterator; + _Stream_client.set(this, void 0); + this.controller = controller; + __classPrivateFieldSet(this, _Stream_client, client, "f"); + } + static fromSSEResponse(response, controller, client) { + let consumed = false; + const logger = client ? loggerFor(client) : console; + async function* iterator() { + if (consumed) { + throw new OpenAIError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + } + consumed = true; + let done = false; + try { + for await (const sse of _iterSSEMessages(response, controller)) { + if (done) + continue; + if (sse.data.startsWith('[DONE]')) { + done = true; + continue; + } + if (sse.event === null || !sse.event.startsWith('thread.')) { + let data; + try { + data = JSON.parse(sse.data); + } + catch (e) { + logger.error(`Could not parse message into JSON:`, sse.data); + logger.error(`From chunk:`, sse.raw); + throw e; + } + if (data && data.error) { + throw new APIError(undefined, data.error, undefined, response.headers); + } + yield data; + } + else { + let data; + try { + data = JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + // TODO: Is this where the error should be thrown? + if (sse.event == 'error') { + throw new APIError(undefined, data.error, data.message, undefined); + } + yield { event: sse.event, data: data }; + } + } + done = true; + } + catch (e) { + // If the user calls `stream.controller.abort()`, we should exit without throwing. + if (isAbortError(e)) + return; + throw e; + } + finally { + // If the user `break`s, abort the ongoing request. + if (!done) + controller.abort(); + } + } + return new Stream(iterator, controller, client); + } + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream, controller, client) { + let consumed = false; + async function* iterLines() { + const lineDecoder = new LineDecoder(); + const iter = ReadableStreamToAsyncIterable(readableStream); + for await (const chunk of iter) { + for (const line of lineDecoder.decode(chunk)) { + yield line; + } + } + for (const line of lineDecoder.flush()) { + yield line; + } + } + async function* iterator() { + if (consumed) { + throw new OpenAIError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + } + consumed = true; + let done = false; + try { + for await (const line of iterLines()) { + if (done) + continue; + if (line) + yield JSON.parse(line); + } + done = true; + } + catch (e) { + // If the user calls `stream.controller.abort()`, we should exit without throwing. + if (isAbortError(e)) + return; + throw e; + } + finally { + // If the user `break`s, abort the ongoing request. + if (!done) + controller.abort(); + } + } + return new Stream(iterator, controller, client); + } + [(_Stream_client = new WeakMap(), Symbol.asyncIterator)]() { + return this.iterator(); + } + /** + * Splits the stream into two streams which can be + * independently read from at different speeds. + */ + tee() { + const left = []; + const right = []; + const iterator = this.iterator(); + const teeIterator = (queue) => { + return { + next: () => { + if (queue.length === 0) { + const result = iterator.next(); + left.push(result); + right.push(result); + } + return queue.shift(); + }, + }; + }; + return [ + new Stream(() => teeIterator(left), this.controller, __classPrivateFieldGet(this, _Stream_client, "f")), + new Stream(() => teeIterator(right), this.controller, __classPrivateFieldGet(this, _Stream_client, "f")), + ]; + } + /** + * Converts this stream to a newline-separated ReadableStream of + * JSON stringified values in the stream + * which can be turned back into a Stream with `Stream.fromReadableStream()`. + */ + toReadableStream() { + const self = this; + let iter; + return makeReadableStream({ + async start() { + iter = self[Symbol.asyncIterator](); + }, + async pull(ctrl) { + try { + const { value, done } = await iter.next(); + if (done) + return ctrl.close(); + const bytes = encodeUTF8(JSON.stringify(value) + '\n'); + ctrl.enqueue(bytes); + } + catch (err) { + ctrl.error(err); + } + }, + async cancel() { + await iter.return?.(); + }, + }); + } +} +export async function* _iterSSEMessages(response, controller) { + if (!response.body) { + controller.abort(); + if (typeof globalThis.navigator !== 'undefined' && + globalThis.navigator.product === 'ReactNative') { + throw new OpenAIError(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`); + } + throw new OpenAIError(`Attempted to iterate over a response with no body`); + } + const sseDecoder = new SSEDecoder(); + const lineDecoder = new LineDecoder(); + const iter = ReadableStreamToAsyncIterable(response.body); + for await (const sseChunk of iterSSEChunks(iter)) { + for (const line of lineDecoder.decode(sseChunk)) { + const sse = sseDecoder.decode(line); + if (sse) + yield sse; + } + } + for (const line of lineDecoder.flush()) { + const sse = sseDecoder.decode(line); + if (sse) + yield sse; + } +} +/** + * Given an async iterable iterator, iterates over it and yields full + * SSE chunks, i.e. yields when a double new-line is encountered. + */ +async function* iterSSEChunks(iterator) { + let data = new Uint8Array(); + for await (const chunk of iterator) { + if (chunk == null) { + continue; + } + const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) + : typeof chunk === 'string' ? encodeUTF8(chunk) + : chunk; + let newData = new Uint8Array(data.length + binaryChunk.length); + newData.set(data); + newData.set(binaryChunk, data.length); + data = newData; + let patternIndex; + while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) { + yield data.slice(0, patternIndex); + data = data.slice(patternIndex); + } + } + if (data.length > 0) { + yield data; + } +} +class SSEDecoder { + constructor() { + this.event = null; + this.data = []; + this.chunks = []; + } + decode(line) { + if (line.endsWith('\r')) { + line = line.substring(0, line.length - 1); + } + if (!line) { + // empty line and we didn't previously encounter any messages + if (!this.event && !this.data.length) + return null; + const sse = { + event: this.event, + data: this.data.join('\n'), + raw: this.chunks, + }; + this.event = null; + this.data = []; + this.chunks = []; + return sse; + } + this.chunks.push(line); + if (line.startsWith(':')) { + return null; + } + let [fieldname, _, value] = partition(line, ':'); + if (value.startsWith(' ')) { + value = value.substring(1); + } + if (fieldname === 'event') { + this.event = value; + } + else if (fieldname === 'data') { + this.data.push(value); + } + return null; + } +} +function partition(str, delimiter) { + const index = str.indexOf(delimiter); + if (index !== -1) { + return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)]; + } + return [str, '', '']; +} +//# sourceMappingURL=streaming.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..80c5e0a28d96c6351d38932843990011568e3521 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/streaming.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":";;OAAO,EAAE,WAAW,EAAE;OAEf,EAAE,kBAAkB,EAAE;OACtB,EAAE,sBAAsB,EAAE,WAAW,EAAE;OACvC,EAAE,6BAA6B,EAAE;OACjC,EAAE,YAAY,EAAE;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,SAAS,EAAE;OAGb,EAAE,QAAQ,EAAE;AAUnB,MAAM,OAAO,MAAM;IAIjB,YACU,QAAmC,EAC3C,UAA2B,EAC3B,MAAe;QAFP,aAAQ,GAAR,QAAQ,CAA2B;QAH7C,iCAA4B;QAO1B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,uBAAA,IAAI,kBAAW,MAAM,MAAA,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,eAAe,CACpB,QAAkB,EAClB,UAA2B,EAC3B,MAAe;QAEf,IAAI,QAAQ,GAAG,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AAC,EAAE,CAAC;YAC1B,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;aAAM,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,SAAS,SAAS,CAAC,GAAW,EAAE,SAAiB;IAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..df2209db2a363aa9e7624bc6d3accf7fc120a7bf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts @@ -0,0 +1,3 @@ +export { type Uploadable } from "../internal/uploads.mjs"; +export { toFile, type ToFileInput } from "../internal/to-file.mjs"; +//# sourceMappingURL=uploads.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..cfe0bb2c1fefd5f383d0bc058ba0971dbf9678fd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd629a8c12c8e06574b1666abfab0565b82a5691 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts @@ -0,0 +1,3 @@ +export { type Uploadable } from "../internal/uploads.js"; +export { toFile, type ToFileInput } from "../internal/to-file.js"; +//# sourceMappingURL=uploads.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ddc45f08ba335717d5f1451329f8bf8463e375ba --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js new file mode 100644 index 0000000000000000000000000000000000000000..61cf9206fc794fd7d0aa5efc395677317ed883b4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toFile = void 0; +var to_file_1 = require("../internal/to-file.js"); +Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return to_file_1.toFile; } }); +//# sourceMappingURL=uploads.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cba2e776947d658c976711b870809b3072c0dd69 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":";;;AACA,kDAA+D;AAAtD,iGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..40d3593e5244f4400c0305e48f97c7a3f70b2132 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs @@ -0,0 +1,2 @@ +export { toFile } from "../internal/to-file.mjs"; +//# sourceMappingURL=uploads.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..31969af769d45251d1b2e7a7d2d68b7ff2c86ea2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/core/uploads.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":"OACO,EAAE,MAAM,EAAoB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..647e9c6029d7baf2bbfaefa02e8ef4268ccfb242 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts @@ -0,0 +1,9 @@ +export declare function playAudio(input: NodeJS.ReadableStream | Response | File): Promise; +type RecordAudioOptions = { + signal?: AbortSignal; + device?: number; + timeout?: number; +}; +export declare function recordAudio(options?: RecordAudioOptions): Promise; +export {}; +//# sourceMappingURL=audio.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..830de1a80e5a4efef01a37bc6b5a5ac21f0a4d4e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.d.mts","sourceRoot":"","sources":["../src/helpers/audio.ts"],"names":[],"mappings":"AA0DA,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ7F;AAED,KAAK,kBAAkB,GAAG;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAiEF,wBAAsB,WAAW,CAAC,OAAO,GAAE,kBAAuB,iBAQjE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7b13f373cb636bce255533f60a7076c2e6ecb38d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts @@ -0,0 +1,9 @@ +export declare function playAudio(input: NodeJS.ReadableStream | Response | File): Promise; +type RecordAudioOptions = { + signal?: AbortSignal; + device?: number; + timeout?: number; +}; +export declare function recordAudio(options?: RecordAudioOptions): Promise; +export {}; +//# sourceMappingURL=audio.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2a33c091519beaf7ad9ae4bb3ca37e37e825637c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../src/helpers/audio.ts"],"names":[],"mappings":"AA0DA,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ7F;AAED,KAAK,kBAAkB,GAAG;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAiEF,wBAAsB,WAAW,CAAC,OAAO,GAAE,kBAAuB,iBAQjE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js new file mode 100644 index 0000000000000000000000000000000000000000..5cd710a3947a64e42c87cef9b9a448afced07282 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.playAudio = playAudio; +exports.recordAudio = recordAudio; +const node_child_process_1 = require("node:child_process"); +const node_stream_1 = require("node:stream"); +const node_process_1 = require("node:process"); +const uploads_1 = require("../internal/uploads.js"); +const DEFAULT_SAMPLE_RATE = 24000; +const DEFAULT_CHANNELS = 1; +const isNode = Boolean(node_process_1.versions?.node); +const recordingProviders = { + win32: 'dshow', + darwin: 'avfoundation', + linux: 'alsa', + aix: 'alsa', + android: 'alsa', + freebsd: 'alsa', + haiku: 'alsa', + sunos: 'alsa', + netbsd: 'alsa', + openbsd: 'alsa', + cygwin: 'dshow', +}; +function isResponse(stream) { + return typeof stream.body !== 'undefined'; +} +function isFile(stream) { + (0, uploads_1.checkFileSupport)(); + return stream instanceof File; +} +async function nodejsPlayAudio(stream) { + return new Promise((resolve, reject) => { + try { + const ffplay = (0, node_child_process_1.spawn)('ffplay', ['-autoexit', '-nodisp', '-i', 'pipe:0']); + if (isResponse(stream)) { + stream.body.pipe(ffplay.stdin); + } + else if (isFile(stream)) { + node_stream_1.Readable.from(stream.stream()).pipe(ffplay.stdin); + } + else { + stream.pipe(ffplay.stdin); + } + ffplay.on('close', (code) => { + if (code !== 0) { + reject(new Error(`ffplay process exited with code ${code}`)); + } + resolve(); + }); + } + catch (error) { + reject(error); + } + }); +} +async function playAudio(input) { + if (isNode) { + return nodejsPlayAudio(input); + } + throw new Error('Play audio is not supported in the browser yet. Check out https://npm.im/wavtools as an alternative.'); +} +function nodejsRecordAudio({ signal, device, timeout } = {}) { + (0, uploads_1.checkFileSupport)(); + return new Promise((resolve, reject) => { + const data = []; + const provider = recordingProviders[node_process_1.platform]; + try { + const ffmpeg = (0, node_child_process_1.spawn)('ffmpeg', [ + '-f', + provider, + '-i', + `:${device ?? 0}`, // default audio input device; adjust as needed + '-ar', + DEFAULT_SAMPLE_RATE.toString(), + '-ac', + DEFAULT_CHANNELS.toString(), + '-f', + 'wav', + 'pipe:1', + ], { + stdio: ['ignore', 'pipe', 'pipe'], + }); + ffmpeg.stdout.on('data', (chunk) => { + data.push(chunk); + }); + ffmpeg.on('error', (error) => { + console.error(error); + reject(error); + }); + ffmpeg.on('close', (code) => { + returnData(); + }); + function returnData() { + const audioBuffer = Buffer.concat(data); + const audioFile = new File([audioBuffer], 'audio.wav', { type: 'audio/wav' }); + resolve(audioFile); + } + if (typeof timeout === 'number' && timeout > 0) { + const internalSignal = AbortSignal.timeout(timeout); + internalSignal.addEventListener('abort', () => { + ffmpeg.kill('SIGTERM'); + }); + } + if (signal) { + signal.addEventListener('abort', () => { + ffmpeg.kill('SIGTERM'); + }); + } + } + catch (error) { + reject(error); + } + }); +} +async function recordAudio(options = {}) { + if (isNode) { + return nodejsRecordAudio(options); + } + throw new Error('Record audio is not supported in the browser. Check out https://npm.im/wavtools as an alternative.'); +} +//# sourceMappingURL=audio.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7326c4978efbb2bfe6885471bea5b50bb2b448ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.js","sourceRoot":"","sources":["../src/helpers/audio.ts"],"names":[],"mappings":";;AA0DA,8BAQC;AAuED,kCAQC;AAjJD,2DAA2C;AAC3C,6CAAuC;AACvC,+CAAkD;AAClD,oDAAuD;AAEvD,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YACf,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,WAAW,CAAC,UAA8B,EAAE;IAChE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1a1d713ef586ec5a3beb0eb15c3a043c57e5cb89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs @@ -0,0 +1,118 @@ +import { spawn } from 'node:child_process'; +import { Readable } from 'node:stream'; +import { platform, versions } from 'node:process'; +import { checkFileSupport } from "../internal/uploads.mjs"; +const DEFAULT_SAMPLE_RATE = 24000; +const DEFAULT_CHANNELS = 1; +const isNode = Boolean(versions?.node); +const recordingProviders = { + win32: 'dshow', + darwin: 'avfoundation', + linux: 'alsa', + aix: 'alsa', + android: 'alsa', + freebsd: 'alsa', + haiku: 'alsa', + sunos: 'alsa', + netbsd: 'alsa', + openbsd: 'alsa', + cygwin: 'dshow', +}; +function isResponse(stream) { + return typeof stream.body !== 'undefined'; +} +function isFile(stream) { + checkFileSupport(); + return stream instanceof File; +} +async function nodejsPlayAudio(stream) { + return new Promise((resolve, reject) => { + try { + const ffplay = spawn('ffplay', ['-autoexit', '-nodisp', '-i', 'pipe:0']); + if (isResponse(stream)) { + stream.body.pipe(ffplay.stdin); + } + else if (isFile(stream)) { + Readable.from(stream.stream()).pipe(ffplay.stdin); + } + else { + stream.pipe(ffplay.stdin); + } + ffplay.on('close', (code) => { + if (code !== 0) { + reject(new Error(`ffplay process exited with code ${code}`)); + } + resolve(); + }); + } + catch (error) { + reject(error); + } + }); +} +export async function playAudio(input) { + if (isNode) { + return nodejsPlayAudio(input); + } + throw new Error('Play audio is not supported in the browser yet. Check out https://npm.im/wavtools as an alternative.'); +} +function nodejsRecordAudio({ signal, device, timeout } = {}) { + checkFileSupport(); + return new Promise((resolve, reject) => { + const data = []; + const provider = recordingProviders[platform]; + try { + const ffmpeg = spawn('ffmpeg', [ + '-f', + provider, + '-i', + `:${device ?? 0}`, // default audio input device; adjust as needed + '-ar', + DEFAULT_SAMPLE_RATE.toString(), + '-ac', + DEFAULT_CHANNELS.toString(), + '-f', + 'wav', + 'pipe:1', + ], { + stdio: ['ignore', 'pipe', 'pipe'], + }); + ffmpeg.stdout.on('data', (chunk) => { + data.push(chunk); + }); + ffmpeg.on('error', (error) => { + console.error(error); + reject(error); + }); + ffmpeg.on('close', (code) => { + returnData(); + }); + function returnData() { + const audioBuffer = Buffer.concat(data); + const audioFile = new File([audioBuffer], 'audio.wav', { type: 'audio/wav' }); + resolve(audioFile); + } + if (typeof timeout === 'number' && timeout > 0) { + const internalSignal = AbortSignal.timeout(timeout); + internalSignal.addEventListener('abort', () => { + ffmpeg.kill('SIGTERM'); + }); + } + if (signal) { + signal.addEventListener('abort', () => { + ffmpeg.kill('SIGTERM'); + }); + } + } + catch (error) { + reject(error); + } + }); +} +export async function recordAudio(options = {}) { + if (isNode) { + return nodejsRecordAudio(options); + } + throw new Error('Record audio is not supported in the browser. Check out https://npm.im/wavtools as an alternative.'); +} +//# sourceMappingURL=audio.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..542aa31b9a6ec2e3118c4969e305745ceda17477 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/audio.mjs.map @@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C;YACL,CAAC;YAED,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;oBACpC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,UAA8B,EAAE;IAChE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..39902f4e2d55989c5c199f9c9e8429fff5e64619 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts @@ -0,0 +1,70 @@ +import { ResponseFormatJSONSchema } from "../resources/index.mjs"; +import type { infer as zodInfer, ZodType } from 'zod'; +import { AutoParseableResponseFormat, AutoParseableTextFormat, AutoParseableTool } from "../lib/parser.mjs"; +import { AutoParseableResponseTool } from "../lib/ResponsesParser.mjs"; +import { type ResponseFormatTextJSONSchemaConfig } from "../resources/responses/responses.mjs"; +/** + * Creates a chat completion `JSONSchema` response format object from + * the given Zod schema. + * + * If this is passed to the `.parse()`, `.stream()` or `.runTools()` + * chat completion methods then the response message will contain a + * `.parsed` property that is the result of parsing the content with + * the given Zod object. + * + * ```ts + * const completion = await client.chat.completions.parse({ + * model: 'gpt-4o-2024-08-06', + * messages: [ + * { role: 'system', content: 'You are a helpful math tutor.' }, + * { role: 'user', content: 'solve 8x + 31 = 2' }, + * ], + * response_format: zodResponseFormat( + * z.object({ + * steps: z.array(z.object({ + * explanation: z.string(), + * answer: z.string(), + * })), + * final_answer: z.string(), + * }), + * 'math_answer', + * ), + * }); + * const message = completion.choices[0]?.message; + * if (message?.parsed) { + * console.log(message.parsed); + * console.log(message.parsed.final_answer); + * } + * ``` + * + * This can be passed directly to the `.create()` method but will not + * result in any automatic parsing, you'll have to parse the response yourself. + */ +export declare function zodResponseFormat(zodObject: ZodInput, name: string, props?: Omit): AutoParseableResponseFormat>; +export declare function zodTextFormat(zodObject: ZodInput, name: string, props?: Omit): AutoParseableTextFormat>; +/** + * Creates a chat completion `function` tool that can be invoked + * automatically by the chat completion `.runTools()` method or automatically + * parsed by `.parse()` / `.stream()`. + */ +export declare function zodFunction(options: { + name: string; + parameters: Parameters; + function?: ((args: zodInfer) => unknown | Promise) | undefined; + description?: string | undefined; +}): AutoParseableTool<{ + arguments: Parameters; + name: string; + function: (args: zodInfer) => unknown; +}>; +export declare function zodResponsesFunction(options: { + name: string; + parameters: Parameters; + function?: ((args: zodInfer) => unknown | Promise) | undefined; + description?: string | undefined; +}): AutoParseableResponseTool<{ + arguments: Parameters; + name: string; + function: (args: zodInfer) => unknown; +}>; +//# sourceMappingURL=zod.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..4dc5400c0b0e162808147fae37eefff1261b9fb1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"zod.d.mts","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":"OAAO,EAAE,wBAAwB,EAAE;OAC5B,KAAK,EAAE,KAAK,I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CAiBD;AAED,wBAAgB,oBAAoB,CAAC,UAAU,SAAS,OAAO,EAAE,OAAO,EAAE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACpF,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,GAAG,yBAAyB,CAAC;IAC5B,SAAS,EAAE,UAAU,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;CACnD,CAAC,CAcD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9fc6b44dfaea695f5058832dacf6195302597484 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts @@ -0,0 +1,70 @@ +import { ResponseFormatJSONSchema } from "../resources/index.js"; +import type { infer as zodInfer, ZodType } from 'zod'; +import { AutoParseableResponseFormat, AutoParseableTextFormat, AutoParseableTool } from "../lib/parser.js"; +import { AutoParseableResponseTool } from "../lib/ResponsesParser.js"; +import { type ResponseFormatTextJSONSchemaConfig } from "../resources/responses/responses.js"; +/** + * Creates a chat completion `JSONSchema` response format object from + * the given Zod schema. + * + * If this is passed to the `.parse()`, `.stream()` or `.runTools()` + * chat completion methods then the response message will contain a + * `.parsed` property that is the result of parsing the content with + * the given Zod object. + * + * ```ts + * const completion = await client.chat.completions.parse({ + * model: 'gpt-4o-2024-08-06', + * messages: [ + * { role: 'system', content: 'You are a helpful math tutor.' }, + * { role: 'user', content: 'solve 8x + 31 = 2' }, + * ], + * response_format: zodResponseFormat( + * z.object({ + * steps: z.array(z.object({ + * explanation: z.string(), + * answer: z.string(), + * })), + * final_answer: z.string(), + * }), + * 'math_answer', + * ), + * }); + * const message = completion.choices[0]?.message; + * if (message?.parsed) { + * console.log(message.parsed); + * console.log(message.parsed.final_answer); + * } + * ``` + * + * This can be passed directly to the `.create()` method but will not + * result in any automatic parsing, you'll have to parse the response yourself. + */ +export declare function zodResponseFormat(zodObject: ZodInput, name: string, props?: Omit): AutoParseableResponseFormat>; +export declare function zodTextFormat(zodObject: ZodInput, name: string, props?: Omit): AutoParseableTextFormat>; +/** + * Creates a chat completion `function` tool that can be invoked + * automatically by the chat completion `.runTools()` method or automatically + * parsed by `.parse()` / `.stream()`. + */ +export declare function zodFunction(options: { + name: string; + parameters: Parameters; + function?: ((args: zodInfer) => unknown | Promise) | undefined; + description?: string | undefined; +}): AutoParseableTool<{ + arguments: Parameters; + name: string; + function: (args: zodInfer) => unknown; +}>; +export declare function zodResponsesFunction(options: { + name: string; + parameters: Parameters; + function?: ((args: zodInfer) => unknown | Promise) | undefined; + description?: string | undefined; +}): AutoParseableResponseTool<{ + arguments: Parameters; + name: string; + function: (args: zodInfer) => unknown; +}>; +//# sourceMappingURL=zod.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..408ce41956eeb0e37d66e13320ae6842cbf02cb8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":"OAAO,EAAE,wBAAwB,EAAE;OAC5B,KAAK,EAAE,KAAK,IAAI,QAAQ,E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BAAgB,oBAAoB,CAAC,UAAU,SAAS,OAAO,EAAE,OAAO,EAAE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACpF,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,GAAG,yBAAyB,CAAC;IAC5B,SAAS,EAAE,UAAU,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;CACnD,CAAC,CAcD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js new file mode 100644 index 0000000000000000000000000000000000000000..398aff88ef4d8c432e5c34888e5df4db8eab7a36 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zodResponseFormat = zodResponseFormat; +exports.zodTextFormat = zodTextFormat; +exports.zodFunction = zodFunction; +exports.zodResponsesFunction = zodResponsesFunction; +const parser_1 = require("../lib/parser.js"); +const zod_to_json_schema_1 = require("../_vendor/zod-to-json-schema/index.js"); +const ResponsesParser_1 = require("../lib/ResponsesParser.js"); +function zodToJsonSchema(schema, options) { + return (0, zod_to_json_schema_1.zodToJsonSchema)(schema, { + openaiStrictMode: true, + name: options.name, + nameStrategy: 'duplicate-ref', + $refStrategy: 'extract-to-root', + nullableStrategy: 'property', + }); +} +/** + * Creates a chat completion `JSONSchema` response format object from + * the given Zod schema. + * + * If this is passed to the `.parse()`, `.stream()` or `.runTools()` + * chat completion methods then the response message will contain a + * `.parsed` property that is the result of parsing the content with + * the given Zod object. + * + * ```ts + * const completion = await client.chat.completions.parse({ + * model: 'gpt-4o-2024-08-06', + * messages: [ + * { role: 'system', content: 'You are a helpful math tutor.' }, + * { role: 'user', content: 'solve 8x + 31 = 2' }, + * ], + * response_format: zodResponseFormat( + * z.object({ + * steps: z.array(z.object({ + * explanation: z.string(), + * answer: z.string(), + * })), + * final_answer: z.string(), + * }), + * 'math_answer', + * ), + * }); + * const message = completion.choices[0]?.message; + * if (message?.parsed) { + * console.log(message.parsed); + * console.log(message.parsed.final_answer); + * } + * ``` + * + * This can be passed directly to the `.create()` method but will not + * result in any automatic parsing, you'll have to parse the response yourself. + */ +function zodResponseFormat(zodObject, name, props) { + return (0, parser_1.makeParseableResponseFormat)({ + type: 'json_schema', + json_schema: { + ...props, + name, + strict: true, + schema: zodToJsonSchema(zodObject, { name }), + }, + }, (content) => zodObject.parse(JSON.parse(content))); +} +function zodTextFormat(zodObject, name, props) { + return (0, parser_1.makeParseableTextFormat)({ + type: 'json_schema', + ...props, + name, + strict: true, + schema: zodToJsonSchema(zodObject, { name }), + }, (content) => zodObject.parse(JSON.parse(content))); +} +/** + * Creates a chat completion `function` tool that can be invoked + * automatically by the chat completion `.runTools()` method or automatically + * parsed by `.parse()` / `.stream()`. + */ +function zodFunction(options) { + // @ts-expect-error TODO + return (0, parser_1.makeParseableTool)({ + type: 'function', + function: { + name: options.name, + parameters: zodToJsonSchema(options.parameters, { name: options.name }), + strict: true, + ...(options.description ? { description: options.description } : undefined), + }, + }, { + callback: options.function, + parser: (args) => options.parameters.parse(JSON.parse(args)), + }); +} +function zodResponsesFunction(options) { + return (0, ResponsesParser_1.makeParseableResponseTool)({ + type: 'function', + name: options.name, + parameters: zodToJsonSchema(options.parameters, { name: options.name }), + strict: true, + ...(options.description ? { description: options.description } : undefined), + }, { + callback: options.function, + parser: (args) => options.parameters.parse(JSON.parse(args)), + }); +} +//# sourceMappingURL=zod.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e0026f618794ee62a1f89cb6056c64e9ba51c3d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zod.js","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":";;AA6DA,8CAiBC;AAED,sCAeC;AAOD,kCA0BC;AAED,oDAuBC;AAvJD,6CAOuB;AACvB,+EAAoF;AACpF,+DAA8F;AAG9F,SAAS,eAAe,CAAC,MAAe,EAAE,OAAyB;IACjE,OAAO,IAAA,oCAAgB,EAAC,MAAM,EAAE;QAC9B,gBAAgB,EAAE,IAAI;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,YAAY,EAAE,eAAe;QAC7B,YAAY,EAAE,iBAAiB;QAC/B,gBAAgB,EAAE,UAAU;KAC7B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,SAAgB,iBAAiB,CAC/B,SAAmB,EACnB,IAAY,EACZ,KAA+E;IAE/E,OAAO,IAAA,oCAA2B,EAChC;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE;YACX,GAAG,KAAK;YACR,IAAI;YACJ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,eAAe,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC;SAC7C;KACF,EACD,CAAC,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAClD,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,SAAmB,EACnB,IAAY,EACZ,KAAuF;IAEvF,OAAO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C,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC5E,EACD;QACE,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC7D,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs new file mode 100644 index 0000000000000000000000000000000000000000..45d5e41a4b86576cf351eebf273b878c5d9931ab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs @@ -0,0 +1,102 @@ +import { makeParseableResponseFormat, makeParseableTextFormat, makeParseableTool, } from "../lib/parser.mjs"; +import { zodToJsonSchema as _zodToJsonSchema } from "../_vendor/zod-to-json-schema/index.mjs"; +import { makeParseableResponseTool } from "../lib/ResponsesParser.mjs"; +function zodToJsonSchema(schema, options) { + return _zodToJsonSchema(schema, { + openaiStrictMode: true, + name: options.name, + nameStrategy: 'duplicate-ref', + $refStrategy: 'extract-to-root', + nullableStrategy: 'property', + }); +} +/** + * Creates a chat completion `JSONSchema` response format object from + * the given Zod schema. + * + * If this is passed to the `.parse()`, `.stream()` or `.runTools()` + * chat completion methods then the response message will contain a + * `.parsed` property that is the result of parsing the content with + * the given Zod object. + * + * ```ts + * const completion = await client.chat.completions.parse({ + * model: 'gpt-4o-2024-08-06', + * messages: [ + * { role: 'system', content: 'You are a helpful math tutor.' }, + * { role: 'user', content: 'solve 8x + 31 = 2' }, + * ], + * response_format: zodResponseFormat( + * z.object({ + * steps: z.array(z.object({ + * explanation: z.string(), + * answer: z.string(), + * })), + * final_answer: z.string(), + * }), + * 'math_answer', + * ), + * }); + * const message = completion.choices[0]?.message; + * if (message?.parsed) { + * console.log(message.parsed); + * console.log(message.parsed.final_answer); + * } + * ``` + * + * This can be passed directly to the `.create()` method but will not + * result in any automatic parsing, you'll have to parse the response yourself. + */ +export function zodResponseFormat(zodObject, name, props) { + return makeParseableResponseFormat({ + type: 'json_schema', + json_schema: { + ...props, + name, + strict: true, + schema: zodToJsonSchema(zodObject, { name }), + }, + }, (content) => zodObject.parse(JSON.parse(content))); +} +export function zodTextFormat(zodObject, name, props) { + return makeParseableTextFormat({ + type: 'json_schema', + ...props, + name, + strict: true, + schema: zodToJsonSchema(zodObject, { name }), + }, (content) => zodObject.parse(JSON.parse(content))); +} +/** + * Creates a chat completion `function` tool that can be invoked + * automatically by the chat completion `.runTools()` method or automatically + * parsed by `.parse()` / `.stream()`. + */ +export function zodFunction(options) { + // @ts-expect-error TODO + return makeParseableTool({ + type: 'function', + function: { + name: options.name, + parameters: zodToJsonSchema(options.parameters, { name: options.name }), + strict: true, + ...(options.description ? { description: options.description } : undefined), + }, + }, { + callback: options.function, + parser: (args) => options.parameters.parse(JSON.parse(args)), + }); +} +export function zodResponsesFunction(options) { + return makeParseableResponseTool({ + type: 'function', + name: options.name, + parameters: zodToJsonSchema(options.parameters, { name: options.name }), + strict: true, + ...(options.description ? { description: options.description } : undefined), + }, { + callback: options.function, + parser: (args) => options.parameters.parse(JSON.parse(args)), + }); +} +//# sourceMappingURL=zod.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d007050a3c2c284b83884da7a632f22b88ea23dd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/helpers/zod.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"zod.mjs","sourceRoot":"","sources":["../src/helpers/zod.ts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session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8231c03730e98a1be46600ce36532668ef3d6ff9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts @@ -0,0 +1,73 @@ +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +/** + * An alias to the builtin `RequestInit` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit + */ +type _RequestInit = RequestInit; +/** + * An alias to the builtin `Response` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/Response + */ +type _Response = Response; +/** + * The type for the first argument to `fetch`. + * + * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource + */ +type _RequestInfo = Request | URL | string; +/** + * The type for constructing `RequestInit` Headers. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers + */ +type _HeadersInit = RequestInit['headers']; +/** + * The type for constructing `RequestInit` body. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#body + */ +type _BodyInit = RequestInit['body']; +/** + * An alias to the builtin `Array` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Array = Array; +/** + * An alias to the builtin `Record` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Record = Record; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, }; +/** + * A copy of the builtin `EndingType` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941 + */ +type EndingType = 'native' | 'transparent'; +/** + * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154 + * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options + */ +export interface BlobPropertyBag { + endings?: EndingType; + type?: string; +} +/** + * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503 + * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options + */ +export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; +} +//# sourceMappingURL=builtin-types.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..9b71e28d5d2316d4286a11cd46e7ac6ea762615a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"builtin-types.d.mts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6c30e73eec3cc9048298929c8dcfe70bf7fda3b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts @@ -0,0 +1,73 @@ +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +/** + * An alias to the builtin `RequestInit` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit + */ +type _RequestInit = RequestInit; +/** + * An alias to the builtin `Response` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/Response + */ +type _Response = Response; +/** + * The type for the first argument to `fetch`. + * + * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource + */ +type _RequestInfo = Request | URL | string; +/** + * The type for constructing `RequestInit` Headers. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers + */ +type _HeadersInit = RequestInit['headers']; +/** + * The type for constructing `RequestInit` body. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#body + */ +type _BodyInit = RequestInit['body']; +/** + * An alias to the builtin `Array` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Array = Array; +/** + * An alias to the builtin `Record` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Record = Record; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, }; +/** + * A copy of the builtin `EndingType` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941 + */ +type EndingType = 'native' | 'transparent'; +/** + * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154 + * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options + */ +export interface BlobPropertyBag { + endings?: EndingType; + type?: string; +} +/** + * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503 + * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options + */ +export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; +} +//# sourceMappingURL=builtin-types.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8a2570ed69c35d2aae831a4d10466b82015ffd42 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js new file mode 100644 index 0000000000000000000000000000000000000000..0e601d42465a0b013efb568bd7786dcaa8db781c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=builtin-types.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d42cfb6ef7d88a46d1fa15920790f3bb081f6183 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"builtin-types.js","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs new file mode 100644 index 0000000000000000000000000000000000000000..08e5c4d4278224baa557243ce8f6f7785267fe90 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=builtin-types.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e470679effd587747ab9570cc3c5c3b54590dc1b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/builtin-types.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"builtin-types.mjs","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bbf4151ae79eeecdfa8703c1d69c0e93c7f7b017 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts @@ -0,0 +1,15 @@ +export declare const isRunningInBrowser: () => boolean; +type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown'; +type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown'; +type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari'; +type PlatformProperties = { + 'X-Stainless-Lang': 'js'; + 'X-Stainless-Package-Version': string; + 'X-Stainless-OS': PlatformName; + 'X-Stainless-Arch': Arch; + 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown'; + 'X-Stainless-Runtime-Version': string; +}; +export declare const getPlatformHeaders: () => PlatformProperties; +export {}; +//# sourceMappingURL=detect-platform.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..53b52c8cc4ff153c93018a01facd8589e2989044 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"detect-platform.d.mts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f7e7cd3aa55331969897cf5ca56d8b4b9618de43 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts @@ -0,0 +1,15 @@ +export declare const isRunningInBrowser: () => boolean; +type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown'; +type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown'; +type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari'; +type PlatformProperties = { + 'X-Stainless-Lang': 'js'; + 'X-Stainless-Package-Version': string; + 'X-Stainless-OS': PlatformName; + 'X-Stainless-Arch': Arch; + 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown'; + 'X-Stainless-Runtime-Version': string; +}; +export declare const getPlatformHeaders: () => PlatformProperties; +export {}; +//# sourceMappingURL=detect-platform.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..cc17923710a979c90fb1c09170e2bb52270c9b4e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"detect-platform.d.ts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js new file mode 100644 index 0000000000000000000000000000000000000000..4b44ddc542e3e48616f192021118261115f28930 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js @@ -0,0 +1,162 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPlatformHeaders = exports.isRunningInBrowser = void 0; +const version_1 = require("../version.js"); +const isRunningInBrowser = () => { + return ( + // @ts-ignore + typeof window !== 'undefined' && + // @ts-ignore + typeof window.document !== 'undefined' && + // @ts-ignore + typeof navigator !== 'undefined'); +}; +exports.isRunningInBrowser = isRunningInBrowser; +/** + * Note this does not detect 'browser'; for that, use getBrowserInfo(). + */ +function getDetectedPlatform() { + if (typeof Deno !== 'undefined' && Deno.build != null) { + return 'deno'; + } + if (typeof EdgeRuntime !== 'undefined') { + return 'edge'; + } + if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') { + return 'node'; + } + return 'unknown'; +} +const getPlatformProperties = () => { + const detectedPlatform = getDetectedPlatform(); + if (detectedPlatform === 'deno') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': version_1.VERSION, + 'X-Stainless-OS': normalizePlatform(Deno.build.os), + 'X-Stainless-Arch': normalizeArch(Deno.build.arch), + 'X-Stainless-Runtime': 'deno', + 'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown', + }; + } + if (typeof EdgeRuntime !== 'undefined') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': version_1.VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': `other:${EdgeRuntime}`, + 'X-Stainless-Runtime': 'edge', + 'X-Stainless-Runtime-Version': globalThis.process.version, + }; + } + // Check if Node.js + if (detectedPlatform === 'node') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': version_1.VERSION, + 'X-Stainless-OS': normalizePlatform(globalThis.process.platform ?? 'unknown'), + 'X-Stainless-Arch': normalizeArch(globalThis.process.arch ?? 'unknown'), + 'X-Stainless-Runtime': 'node', + 'X-Stainless-Runtime-Version': globalThis.process.version ?? 'unknown', + }; + } + const browserInfo = getBrowserInfo(); + if (browserInfo) { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': version_1.VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': `browser:${browserInfo.browser}`, + 'X-Stainless-Runtime-Version': browserInfo.version, + }; + } + // TODO add support for Cloudflare workers, etc. + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': version_1.VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': 'unknown', + 'X-Stainless-Runtime-Version': 'unknown', + }; +}; +// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts +function getBrowserInfo() { + if (typeof navigator === 'undefined' || !navigator) { + return null; + } + // NOTE: The order matters here! + const browserPatterns = [ + { key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ }, + ]; + // Find the FIRST matching browser + for (const { key, pattern } of browserPatterns) { + const match = pattern.exec(navigator.userAgent); + if (match) { + const major = match[1] || 0; + const minor = match[2] || 0; + const patch = match[3] || 0; + return { browser: key, version: `${major}.${minor}.${patch}` }; + } + } + return null; +} +const normalizeArch = (arch) => { + // Node docs: + // - https://nodejs.org/api/process.html#processarch + // Deno docs: + // - https://doc.deno.land/deno/stable/~/Deno.build + if (arch === 'x32') + return 'x32'; + if (arch === 'x86_64' || arch === 'x64') + return 'x64'; + if (arch === 'arm') + return 'arm'; + if (arch === 'aarch64' || arch === 'arm64') + return 'arm64'; + if (arch) + return `other:${arch}`; + return 'unknown'; +}; +const normalizePlatform = (platform) => { + // Node platforms: + // - https://nodejs.org/api/process.html#processplatform + // Deno platforms: + // - https://doc.deno.land/deno/stable/~/Deno.build + // - https://github.com/denoland/deno/issues/14799 + platform = platform.toLowerCase(); + // NOTE: this iOS check is untested and may not work + // Node does not work natively on IOS, there is a fork at + // https://github.com/nodejs-mobile/nodejs-mobile + // however it is unknown at the time of writing how to detect if it is running + if (platform.includes('ios')) + return 'iOS'; + if (platform === 'android') + return 'Android'; + if (platform === 'darwin') + return 'MacOS'; + if (platform === 'win32') + return 'Windows'; + if (platform === 'freebsd') + return 'FreeBSD'; + if (platform === 'openbsd') + return 'OpenBSD'; + if (platform === 'linux') + return 'Linux'; + if (platform) + return `Other:${platform}`; + return 'Unknown'; +}; +let _platformHeaders; +const getPlatformHeaders = () => { + return (_platformHeaders ?? (_platformHeaders = getPlatformProperties())); +}; +exports.getPlatformHeaders = getPlatformHeaders; +//# sourceMappingURL=detect-platform.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js.map new file mode 100644 index 0000000000000000000000000000000000000000..83f71f0459a2e55e68f80b95be9d8dcb367f11de --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"detect-platform.js","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2CAAqC;AAE9B,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO;IACL,aAAa;IACb,OAAO,MAAM,KAAK,WAAW;QAC7B,aAAa;QACb,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;QACtC,aAAa;QACb,OAAO,SAAS,KAAK,WAAW,CACjC,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B;AAIF;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD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AkB;IAClB,mDAAmD;IACnD,kDAAkD;IAElD,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,oDAAoD;IACpD,yDAAyD;IACzD,iDAAiD;IACjD,8EAA8E;IAC9E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,QAAQ;QAAE,OAAO,SAAS,QAAQ,EAAE,CAAC;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,gBAAoC,CAAC;AAClC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CAAC,gBAAgB,KAAhB,gBAAgB,GAAK,qBAAqB,EAAE,EAAC,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7e828ecf98739dfcd1e3527824584a3a16467db3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs @@ -0,0 +1,157 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { VERSION } from "../version.mjs"; +export const isRunningInBrowser = () => { + return ( + // @ts-ignore + typeof window !== 'undefined' && + // @ts-ignore + typeof window.document !== 'undefined' && + // @ts-ignore + typeof navigator !== 'undefined'); +}; +/** + * Note this does not detect 'browser'; for that, use getBrowserInfo(). + */ +function getDetectedPlatform() { + if (typeof Deno !== 'undefined' && Deno.build != null) { + return 'deno'; + } + if (typeof EdgeRuntime !== 'undefined') { + return 'edge'; + } + if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') { + return 'node'; + } + return 'unknown'; +} +const getPlatformProperties = () => { + const detectedPlatform = getDetectedPlatform(); + if (detectedPlatform === 'deno') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': normalizePlatform(Deno.build.os), + 'X-Stainless-Arch': normalizeArch(Deno.build.arch), + 'X-Stainless-Runtime': 'deno', + 'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown', + }; + } + if (typeof EdgeRuntime !== 'undefined') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': `other:${EdgeRuntime}`, + 'X-Stainless-Runtime': 'edge', + 'X-Stainless-Runtime-Version': globalThis.process.version, + }; + } + // Check if Node.js + if (detectedPlatform === 'node') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': normalizePlatform(globalThis.process.platform ?? 'unknown'), + 'X-Stainless-Arch': normalizeArch(globalThis.process.arch ?? 'unknown'), + 'X-Stainless-Runtime': 'node', + 'X-Stainless-Runtime-Version': globalThis.process.version ?? 'unknown', + }; + } + const browserInfo = getBrowserInfo(); + if (browserInfo) { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': `browser:${browserInfo.browser}`, + 'X-Stainless-Runtime-Version': browserInfo.version, + }; + } + // TODO add support for Cloudflare workers, etc. + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': 'unknown', + 'X-Stainless-Runtime-Version': 'unknown', + }; +}; +// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts +function getBrowserInfo() { + if (typeof navigator === 'undefined' || !navigator) { + return null; + } + // NOTE: The order matters here! + const browserPatterns = [ + { key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ }, + ]; + // Find the FIRST matching browser + for (const { key, pattern } of browserPatterns) { + const match = pattern.exec(navigator.userAgent); + if (match) { + const major = match[1] || 0; + const minor = match[2] || 0; + const patch = match[3] || 0; + return { browser: key, version: `${major}.${minor}.${patch}` }; + } + } + return null; +} +const normalizeArch = (arch) => { + // Node docs: + // - https://nodejs.org/api/process.html#processarch + // Deno docs: + // - https://doc.deno.land/deno/stable/~/Deno.build + if (arch === 'x32') + return 'x32'; + if (arch === 'x86_64' || arch === 'x64') + return 'x64'; + if (arch === 'arm') + return 'arm'; + if (arch === 'aarch64' || arch === 'arm64') + return 'arm64'; + if (arch) + return `other:${arch}`; + return 'unknown'; +}; +const normalizePlatform = (platform) => { + // Node platforms: + // - https://nodejs.org/api/process.html#processplatform + // Deno platforms: + // - https://doc.deno.land/deno/stable/~/Deno.build + // - https://github.com/denoland/deno/issues/14799 + platform = platform.toLowerCase(); + // NOTE: this iOS check is untested and may not work + // Node does not work natively on IOS, there is a fork at + // https://github.com/nodejs-mobile/nodejs-mobile + // however it is unknown at the time of writing how to detect if it is running + if (platform.includes('ios')) + return 'iOS'; + if (platform === 'android') + return 'Android'; + if (platform === 'darwin') + return 'MacOS'; + if (platform === 'win32') + return 'Windows'; + if (platform === 'freebsd') + return 'FreeBSD'; + if (platform === 'openbsd') + return 'OpenBSD'; + if (platform === 'linux') + return 'Linux'; + if (platform) + return `Other:${platform}`; + return 'Unknown'; +}; +let _platformHeaders; +export const getPlatformHeaders = () => { + return (_platformHeaders ?? (_platformHeaders = getPlatformProperties())); +}; +//# sourceMappingURL=detect-platform.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a1575c144ca101790c53510ca2aca22ff60552ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/detect-platform.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"detect-platform.mjs","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO;IACL,aAAa;IACb,OAAO,MAAM,KAAK,WAAW;QAC7B,aAAa;QACb,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;QACtC,aAAa;QACb,OAAO,SAAS,KAAK,WAAW,CACjC,CAAC;AACJ,CAAC,CAAC;AAIF;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,I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AAS,IAAI,EAAE,CAAC;IACjC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAgB,EAAE;IAC3D,kBAAkB;IAClB,wDAAwD;IACxD,kBAAkB;IAClB,mDAAmD;IACnD,kDAAkD;IAElD,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,oDAAoD;IACpD,yDAAyD;IACzD,iDAAiD;IACjD,8EAA8E;IAC9E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,QAAQ;QAAE,OAAO,SAAS,QAAQ,EAAE,CAAC;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,gBAAoC,CAAC;AACzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CAAC,gBAAgB,KAAhB,gBAAgB,GAAK,qBAAqB,EAAE,EAAC,CAAC;AACxD,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2e506995a289c68b3ef0c4c2152a607c435dbfc6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts @@ -0,0 +1,3 @@ +export declare function isAbortError(err: unknown): boolean; +export declare const castToError: (err: any) => Error; +//# sourceMappingURL=errors.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1ee8ad5323fa30a23e66ecc7e396ddffc952bb97 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5920d9b7bdbba9d9afc87870600fca0de16a72fb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts @@ -0,0 +1,3 @@ +export declare function isAbortError(err: unknown): boolean; +export declare const castToError: (err: any) => Error; +//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..37dbd7ba0ec782c6dead35eae47b0f19e6014132 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..31d1448933bbb7ded2a3615e137685bde90053ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js @@ -0,0 +1,41 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.castToError = void 0; +exports.isAbortError = isAbortError; +function isAbortError(err) { + return (typeof err === 'object' && + err !== null && + // Spec-compliant fetch implementations + (('name' in err && err.name === 'AbortError') || + // Expo fetch + ('message' in err && String(err.message).includes('FetchRequestCanceledException')))); +} +const castToError = (err) => { + if (err instanceof Error) + return err; + if (typeof err === 'object' && err !== null) { + try { + if (Object.prototype.toString.call(err) === '[object Error]') { + // @ts-ignore - not all envs have native support for cause yet + const error = new Error(err.message, err.cause ? { cause: err.cause } : {}); + if (err.stack) + error.stack = err.stack; + // @ts-ignore - not all envs have native support for cause yet + if (err.cause && !error.cause) + error.cause = err.cause; + if (err.name) + error.name = err.name; + return error; + } + } + catch { } + try { + return new Error(JSON.stringify(err)); + } + catch { } + } + return new Error(err); +}; +exports.castToError = castToError; +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4ab2c71b4519378fba1c42ffc7d64e2440f57bf6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCASC;AATD,SAAgB,YAAY,CAAC,GAAY;IACvC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,uCAAuC;QACvC,CAAC,CAAC,MAAM,IAAI,GAAG,IAAK,GAAW,CAAC,IAAI,KAAK,YAAY,CAAC;YACpD,aAAa;YACb,CAAC,SAAS,IAAI,GAAG,IAAI,MAAM,CAAE,GAAW,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAChG,CAAC;AACJ,CAAC;AAEM,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAS,EAAE;IAC7C,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC;IACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE,CAAC;gBAC7D,8DAA8D;gBAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBAC5E,IAAI,GAAG,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvC,8DAA8D;gBAC9D,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvD,IAAI,GAAG,CAAC,IAAI;oBAAE,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;gBACpC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,IAAI,CAAC;YACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC;AAnBW,QAAA,WAAW,eAmBtB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8b7356eb2500ce728416cdc3a64b47b289196fee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs @@ -0,0 +1,36 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export function isAbortError(err) { + return (typeof err === 'object' && + err !== null && + // Spec-compliant fetch implementations + (('name' in err && err.name === 'AbortError') || + // Expo fetch + ('message' in err && String(err.message).includes('FetchRequestCanceledException')))); +} +export const castToError = (err) => { + if (err instanceof Error) + return err; + if (typeof err === 'object' && err !== null) { + try { + if (Object.prototype.toString.call(err) === '[object Error]') { + // @ts-ignore - not all envs have native support for cause yet + const error = new Error(err.message, err.cause ? { cause: err.cause } : {}); + if (err.stack) + error.stack = err.stack; + // @ts-ignore - not all envs have native support for cause yet + if (err.cause && !error.cause) + error.cause = err.cause; + if (err.name) + error.name = err.name; + return error; + } + } + catch { } + try { + return new Error(JSON.stringify(err)); + } + catch { } + } + return new Error(err); +}; +//# sourceMappingURL=errors.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4ad2a9cda30207e7a2b1bfe5fd9405085706b14b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/errors.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,uCAAuC;QACvC,CAAC,CAAC,MAAM,IAAI,GAAG,IAAK,GAAW,CAAC,IAAI,KAAK,YAAY,CAAC;YACpD,aAAa;YACb,CAAC,SAAS,IAAI,GAAG,IAAI,MAAM,CAAE,GAAW,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAChG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAS,EAAE;IAC7C,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC;IACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE,CAAC;gBAC7D,8DAA8D;gBAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBAC5E,IAAI,GAAG,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvC,8DAA8D;gBAC9D,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvD,IAAI,GAAG,CAAC,IAAI;oBAAE,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;gBACpC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,IAAI,CAAC;YACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..355d3f7b51191c3ed1f9a3d990409b88655010a8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts @@ -0,0 +1,20 @@ +type HeaderValue = string | undefined | null; +export type HeadersLike = Headers | readonly HeaderValue[][] | Record | undefined | null | NullableHeaders; +declare const brand_privateNullableHeaders: unique symbol; +/** + * @internal + * Users can pass explicit nulls to unset default headers. When we parse them + * into a standard headers type we need to preserve that information. + */ +export type NullableHeaders = { + /** Brand check, prevent users from creating a NullableHeaders. */ + [brand_privateNullableHeaders]: true; + /** Parsed headers. */ + values: Headers; + /** Set of lowercase header names explicitly set to null. */ + nulls: Set; +}; +export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders; +export declare const isEmptyHeaders: (headers: HeadersLike) => boolean; +export {}; +//# sourceMappingURL=headers.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..f9796c595bde95a24859c6e8d81bef8988920c31 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,eAAyD,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACrC,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA2CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1a866f1842b27c9f827e0feadab4d491de82e280 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts @@ -0,0 +1,20 @@ +type HeaderValue = string | undefined | null; +export type HeadersLike = Headers | readonly HeaderValue[][] | Record | undefined | null | NullableHeaders; +declare const brand_privateNullableHeaders: unique symbol; +/** + * @internal + * Users can pass explicit nulls to unset default headers. When we parse them + * into a standard headers type we need to preserve that information. + */ +export type NullableHeaders = { + /** Brand check, prevent users from creating a NullableHeaders. */ + [brand_privateNullableHeaders]: true; + /** Parsed headers. */ + values: Headers; + /** Set of lowercase header names explicitly set to null. */ + nulls: Set; +}; +export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders; +export declare const isEmptyHeaders: (headers: HeadersLike) => boolean; +export {}; +//# sourceMappingURL=headers.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..26c22260211da09965dcded874791ddd48556384 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,eAAyD,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACrC,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA2CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js new file mode 100644 index 0000000000000000000000000000000000000000..6726fa2acf7daac48e75e9719dc36c7a2de1189d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js @@ -0,0 +1,79 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmptyHeaders = exports.buildHeaders = void 0; +const values_1 = require("./utils/values.js"); +const brand_privateNullableHeaders = /* @__PURE__ */ Symbol('brand.privateNullableHeaders'); +function* iterateHeaders(headers) { + if (!headers) + return; + if (brand_privateNullableHeaders in headers) { + const { values, nulls } = headers; + yield* values.entries(); + for (const name of nulls) { + yield [name, null]; + } + return; + } + let shouldClear = false; + let iter; + if (headers instanceof Headers) { + iter = headers.entries(); + } + else if ((0, values_1.isReadonlyArray)(headers)) { + iter = headers; + } + else { + shouldClear = true; + iter = Object.entries(headers ?? {}); + } + for (let row of iter) { + const name = row[0]; + if (typeof name !== 'string') + throw new TypeError('expected header name to be a string'); + const values = (0, values_1.isReadonlyArray)(row[1]) ? row[1] : [row[1]]; + let didClear = false; + for (const value of values) { + if (value === undefined) + continue; + // Objects keys always overwrite older headers, they never append. + // Yield a null to clear the header before adding the new values. + if (shouldClear && !didClear) { + didClear = true; + yield [name, null]; + } + yield [name, value]; + } + } +} +const buildHeaders = (newHeaders) => { + const targetHeaders = new Headers(); + const nullHeaders = new Set(); + for (const headers of newHeaders) { + const seenHeaders = new Set(); + for (const [name, value] of iterateHeaders(headers)) { + const lowerName = name.toLowerCase(); + if (!seenHeaders.has(lowerName)) { + targetHeaders.delete(name); + seenHeaders.add(lowerName); + } + if (value === null) { + targetHeaders.delete(name); + nullHeaders.add(lowerName); + } + else { + targetHeaders.append(name, value); + nullHeaders.delete(lowerName); + } + } + } + return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders }; +}; +exports.buildHeaders = buildHeaders; +const isEmptyHeaders = (headers) => { + for (const _ of iterateHeaders(headers)) + return false; + return true; +}; +exports.isEmptyHeaders = isEmptyHeaders; +//# sourceMappingURL=headers.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js.map new file mode 100644 index 0000000000000000000000000000000000000000..37e33ca6164fa6a4c7b7cd6f91aa8d252f1e5123 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAAiD;AAWjD,MAAM,4BAA4B,GAAG,eAAe,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAgB5F,QAAQ,CAAC,CAAC,cAAc,CAAC,OAAoB;IAC3C,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,IAAI,4BAA4B,IAAI,OAAO,EAAE,CAAC;QAC5C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAClC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,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AAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IACtC,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QACtC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACpD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAChC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC3B,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC3B,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAClC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC,4BAA4B,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAC7F,CAAC,CAAC;AArBW,QAAA,YAAY,gBAqBvB;AAEK,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE;IACrD,KAAK,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b7712c93a31ec1636126bcce08706e43084a2ed1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs @@ -0,0 +1,74 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { isReadonlyArray } from "./utils/values.mjs"; +const brand_privateNullableHeaders = /* @__PURE__ */ Symbol('brand.privateNullableHeaders'); +function* iterateHeaders(headers) { + if (!headers) + return; + if (brand_privateNullableHeaders in headers) { + const { values, nulls } = headers; + yield* values.entries(); + for (const name of nulls) { + yield [name, null]; + } + return; + } + let shouldClear = false; + let iter; + if (headers instanceof Headers) { + iter = headers.entries(); + } + else if (isReadonlyArray(headers)) { + iter = headers; + } + else { + shouldClear = true; + iter = Object.entries(headers ?? {}); + } + for (let row of iter) { + const name = row[0]; + if (typeof name !== 'string') + throw new TypeError('expected header name to be a string'); + const values = isReadonlyArray(row[1]) ? row[1] : [row[1]]; + let didClear = false; + for (const value of values) { + if (value === undefined) + continue; + // Objects keys always overwrite older headers, they never append. + // Yield a null to clear the header before adding the new values. + if (shouldClear && !didClear) { + didClear = true; + yield [name, null]; + } + yield [name, value]; + } + } +} +export const buildHeaders = (newHeaders) => { + const targetHeaders = new Headers(); + const nullHeaders = new Set(); + for (const headers of newHeaders) { + const seenHeaders = new Set(); + for (const [name, value] of iterateHeaders(headers)) { + const lowerName = name.toLowerCase(); + if (!seenHeaders.has(lowerName)) { + targetHeaders.delete(name); + seenHeaders.add(lowerName); + } + if (value === null) { + targetHeaders.delete(name); + nullHeaders.add(lowerName); + } + else { + targetHeaders.append(name, value); + nullHeaders.delete(lowerName); + } + } + } + return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders }; +}; +export const isEmptyHeaders = (headers) => { + for (const _ of iterateHeaders(headers)) + return false; + return true; +}; +//# sourceMappingURL=headers.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ca16dbe614baf6889255de3ef704ba26a305cb90 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/headers.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.mjs","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,eAAe,EAAE;AAW1B,MAAM,4BAA4B,GAAG,eAAe,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAgB5F,QAAQ,CAAC,CAAC,cAAc,CAAC,OAAoB;IAC3C,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,IAAI,4BAA4B,IAAI,OAAO,EAAE,CAAC;QAC5C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAClC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,IAAiE,CAAC;IACtE,IAAI,OAAO,YAAY,OAAO,EAAE,CAAC;QAC/B,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;SAAM,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QACpC,IAAI,GAAG,OAAO,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,IAAI,CAAC;QACnB,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;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AG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC3B,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAClC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC,4BAA4B,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAC7F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE;IACrD,KAAK,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..faddf0674e60aa00001dd04c1c8018da65162d71 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts @@ -0,0 +1,17 @@ +import type { FinalRequestOptions } from "./request-options.mjs"; +import { type OpenAI } from "../client.mjs"; +import type { AbstractPage } from "../pagination.mjs"; +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; +export declare function defaultParseResponse(client: OpenAI, props: APIResponseProps): Promise>; +export type WithRequestID = T extends Array | Response | AbstractPage ? T : T extends Record ? T & { + _request_id?: string | null; +} : T; +export declare function addRequestID(value: T, response: Response): WithRequestID; +//# sourceMappingURL=parse.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..521e45a3c9f33505182f2a7dce17e7c16a4f13e6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.mts","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,mBAAmB,EAAE;OAE5B,EAAE,KAAK,MAAM,EAAE;OAEf,KAAK,EAAE,YAAY,EAAE;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CA+C3B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IACzB,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GACrD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACnE,CAAC,CAAC;AAEN,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,CAS9E"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f7413be7ece2699a1608b84f2b923fc0595f2392 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts @@ -0,0 +1,17 @@ +import type { FinalRequestOptions } from "./request-options.js"; +import { type OpenAI } from "../client.js"; +import type { AbstractPage } from "../pagination.js"; +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; +export declare function defaultParseResponse(client: OpenAI, props: APIResponseProps): Promise>; +export type WithRequestID = T extends Array | Response | AbstractPage ? T : T extends Record ? T & { + _request_id?: string | null; +} : T; +export declare function addRequestID(value: T, response: Response): WithRequestID; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..6e64195aa33d1806dcaba721aa502801a48a16c6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,mBAAmB,EAAE;OAE5B,EAAE,KAAK,MAAM,EAAE;OAEf,KAAK,EAAE,YAAY,EAAE;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CA+C3B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IACzB,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GACrD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACnE,CAAC,CAAC;AAEN,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,CAS9E"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..932765c62403298033b65e6269c26e44f4416e6f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js @@ -0,0 +1,55 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultParseResponse = defaultParseResponse; +exports.addRequestID = addRequestID; +const streaming_1 = require("../core/streaming.js"); +const log_1 = require("./utils/log.js"); +async function defaultParseResponse(client, props) { + const { response, requestLogID, retryOfRequestLogID, startTime } = props; + const body = await (async () => { + if (props.options.stream) { + (0, log_1.loggerFor)(client).debug('response', response.status, response.url, response.headers, response.body); + // Note: there is an invariant here that isn't represented in the type system + // that if you set `stream: true` the response type must also be `Stream` + if (props.options.__streamClass) { + return props.options.__streamClass.fromSSEResponse(response, props.controller, client); + } + return streaming_1.Stream.fromSSEResponse(response, props.controller, client); + } + // fetch refuses to read the body when the status code is 204. + if (response.status === 204) { + return null; + } + if (props.options.__binaryResponse) { + return response; + } + const contentType = response.headers.get('content-type'); + const mediaType = contentType?.split(';')[0]?.trim(); + const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); + if (isJSON) { + const json = await response.json(); + return addRequestID(json, response); + } + const text = await response.text(); + return text; + })(); + (0, log_1.loggerFor)(client).debug(`[${requestLogID}] response parsed`, (0, log_1.formatRequestDetails)({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + })); + return body; +} +function addRequestID(value, response) { + if (!value || typeof value !== 'object' || Array.isArray(value)) { + return value; + } + return Object.defineProperty(value, '_request_id', { + value: response.headers.get('x-request-id'), + enumerable: false, + }); +} +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ad93e8fca918a7926ed17dc3a62dabf160b39219 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAiBtF,oDAkDC;AAOD,oCASC;AAhFD,oDAA2C;AAE3C,wCAA8D;AAYvD,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,KAAuB;IAEvB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACzE,MAA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C;QAC3C,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,IAAoB,CAAC;IAC9B,CAAC,CAAC,EAAE,CAAC;IACL,IAAA,eAAS,EAAC,MAAM,CAAC,CAAC,KAAK,CACrB,IAAI,YAAY,mBAAmB,EACnC,IAAA,0BAAoB,EAAC;QACnB,mBAAmB;QACnB,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,IAAI;QACJ,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;KACnC,CAAC,CACH,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AAOD,SAAgB,YAAY,CAAI,KAAQ,EAAE,QAAkB;IAC1D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,KAAyB,CAAC;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE;QACjD,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QAC3C,UAAU,EAAE,KAAK;KAClB,CAAqB,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f441d2a9ff98e283d377522f4de86167f84f8118 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { Stream } from "../core/streaming.mjs"; +import { formatRequestDetails, loggerFor } from "./utils/log.mjs"; +export async function defaultParseResponse(client, props) { + const { response, requestLogID, retryOfRequestLogID, startTime } = props; + const body = await (async () => { + if (props.options.stream) { + loggerFor(client).debug('response', response.status, response.url, response.headers, response.body); + // Note: there is an invariant here that isn't represented in the type system + // that if you set `stream: true` the response type must also be `Stream` + if (props.options.__streamClass) { + return props.options.__streamClass.fromSSEResponse(response, props.controller, client); + } + return Stream.fromSSEResponse(response, props.controller, client); + } + // fetch refuses to read the body when the status code is 204. + if (response.status === 204) { + return null; + } + if (props.options.__binaryResponse) { + return response; + } + const contentType = response.headers.get('content-type'); + const mediaType = contentType?.split(';')[0]?.trim(); + const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); + if (isJSON) { + const json = await response.json(); + return addRequestID(json, response); + } + const text = await response.text(); + return text; + })(); + loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + })); + return body; +} +export function addRequestID(value, response) { + if (!value || typeof value !== 'object' || Array.isArray(value)) { + return value; + } + return Object.defineProperty(value, '_request_id', { + value: response.headers.get('x-request-id'), + enumerable: false, + }); +} +//# sourceMappingURL=parse.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6787df870569038545754471a95647460d3a9cbe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/parse.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.mjs","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,MAAM,EAAE;OAEV,EAAE,oBAAoB,EAAE,SAAS,EAAE;AAY1C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,KAAuB;IAEvB,MAAM,EAAE,QAAQ,EAAE,YAA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C;YACnC,OAAO,YAAY,CAAC,IAAS,EAAE,QAAQ,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,IAAoB,CAAC;IAC9B,CAAC,CAAC,EAAE,CAAC;IACL,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CACrB,IAAI,YAAY,mBAAmB,EACnC,oBAAoB,CAAC;QACnB,mBAAmB;QACnB,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,IAAI;QACJ,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;KACnC,CAAC,CACH,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AAOD,MAAM,UAAU,YAAY,CAAI,KAAQ,EAAE,QAAkB;IAC1D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,KAAyB,CAAC;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE;QACjD,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QAC3C,UAAU,EAAE,KAAK;KAClB,CAAqB,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7a5b2e6380cb9e42020a5b817c8efe1ff6670f8b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts @@ -0,0 +1,78 @@ +import { NullableHeaders } from "./headers.mjs"; +import type { BodyInit } from "./builtin-types.mjs"; +import { Stream } from "../core/streaming.mjs"; +import type { HTTPMethod, MergedRequestInit } from "./types.mjs"; +import { type HeadersLike } from "./headers.mjs"; +export type FinalRequestOptions = RequestOptions & { + method: HTTPMethod; + path: string; +}; +export type RequestOptions = { + /** + * The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete'). + */ + method?: HTTPMethod; + /** + * The URL path for the request. + * + * @example "/v1/foo" + */ + path?: string; + /** + * Query parameters to include in the request URL. + */ + query?: object | undefined | null; + /** + * The request body. Can be a string, JSON object, FormData, or other supported types. + */ + body?: unknown; + /** + * HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples. + */ + headers?: HeadersLike; + /** + * The maximum number of times that the client will retry a request in case of a + * temporary failure, like a network error or a 5XX error from the server. + * + * @default 2 + */ + maxRetries?: number; + stream?: boolean | undefined; + /** + * The maximum amount of time (in milliseconds) that the client should wait for a response + * from the server before timing out a single request. + * + * @unit milliseconds + */ + timeout?: number; + /** + * Additional `RequestInit` options to be passed to the underlying `fetch` call. + * These options will be merged with the client's default fetch options. + */ + fetchOptions?: MergedRequestInit; + /** + * An AbortSignal that can be used to cancel the request. + */ + signal?: AbortSignal | undefined | null; + /** + * A unique key for this request to enable idempotency. + */ + idempotencyKey?: string; + /** + * Override the default base URL for this specific request. + */ + defaultBaseURL?: string | undefined; + __metadata?: Record; + __binaryResponse?: boolean | undefined; + __streamClass?: typeof Stream; +}; +export type EncodedContent = { + bodyHeaders: HeadersLike; + body: BodyInit; +}; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; +export declare const FallbackEncoder: RequestEncoder; +//# sourceMappingURL=request-options.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ff84bf150b259635fe8d4a8d06576dc3eec284dd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"request-options.d.mts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,EAAE,MAAM,EAAE;OACV,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..786ddbb8a9d2ca8055bbb3000a9657d3430e705a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts @@ -0,0 +1,78 @@ +import { NullableHeaders } from "./headers.js"; +import type { BodyInit } from "./builtin-types.js"; +import { Stream } from "../core/streaming.js"; +import type { HTTPMethod, MergedRequestInit } from "./types.js"; +import { type HeadersLike } from "./headers.js"; +export type FinalRequestOptions = RequestOptions & { + method: HTTPMethod; + path: string; +}; +export type RequestOptions = { + /** + * The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete'). + */ + method?: HTTPMethod; + /** + * The URL path for the request. + * + * @example "/v1/foo" + */ + path?: string; + /** + * Query parameters to include in the request URL. + */ + query?: object | undefined | null; + /** + * The request body. Can be a string, JSON object, FormData, or other supported types. + */ + body?: unknown; + /** + * HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples. + */ + headers?: HeadersLike; + /** + * The maximum number of times that the client will retry a request in case of a + * temporary failure, like a network error or a 5XX error from the server. + * + * @default 2 + */ + maxRetries?: number; + stream?: boolean | undefined; + /** + * The maximum amount of time (in milliseconds) that the client should wait for a response + * from the server before timing out a single request. + * + * @unit milliseconds + */ + timeout?: number; + /** + * Additional `RequestInit` options to be passed to the underlying `fetch` call. + * These options will be merged with the client's default fetch options. + */ + fetchOptions?: MergedRequestInit; + /** + * An AbortSignal that can be used to cancel the request. + */ + signal?: AbortSignal | undefined | null; + /** + * A unique key for this request to enable idempotency. + */ + idempotencyKey?: string; + /** + * Override the default base URL for this specific request. + */ + defaultBaseURL?: string | undefined; + __metadata?: Record; + __binaryResponse?: boolean | undefined; + __streamClass?: typeof Stream; +}; +export type EncodedContent = { + bodyHeaders: HeadersLike; + body: BodyInit; +}; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; +export declare const FallbackEncoder: RequestEncoder; +//# sourceMappingURL=request-options.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..62e784f18a441c225b375ba5e5eaa53637b033b0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,EAAE,MAAM,EAAE;OACV,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js new file mode 100644 index 0000000000000000000000000000000000000000..4cf2829ad01649666b5a98a9cee5268d494542a2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js @@ -0,0 +1,14 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FallbackEncoder = void 0; +const FallbackEncoder = ({ headers, body }) => { + return { + bodyHeaders: { + 'content-type': 'application/json', + }, + body: JSON.stringify(body), + }; +}; +exports.FallbackEncoder = FallbackEncoder; +//# sourceMappingURL=request-options.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9160d313b03989bfd93fb05a1f15293a7b8065ef --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"request-options.js","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAsF/E,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs new file mode 100644 index 0000000000000000000000000000000000000000..312df3532b08623fcb6f6de5614347d93440dd89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export const FallbackEncoder = ({ headers, body }) => { + return { + bodyHeaders: { + 'content-type': 'application/json', + }, + body: JSON.stringify(body), + }; +}; +//# sourceMappingURL=request-options.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6dcc6f03046984e63abd42b7625432805916ee80 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/request-options.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"request-options.mjs","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAsFtF,MAAM,CAAC,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..407a6d08814c6966f99c1f8300157fc838e0837a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts @@ -0,0 +1,17 @@ +/** + * Shims for types that we can't always rely on being available globally. + * + * Note: these only exist at the type-level, there is no corresponding runtime + * version for any of these symbols. + */ +type NeverToAny = T extends never ? any : T; +/** @ts-ignore */ +type _DOMReadableStream = globalThis.ReadableStream; +/** @ts-ignore */ +type _NodeReadableStream = import('stream/web').ReadableStream; +type _ConditionalNodeReadableStream = typeof globalThis extends { + ReadableStream: any; +} ? never : _NodeReadableStream; +type _ReadableStream = NeverToAny<([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream)>; +export type { _ReadableStream as ReadableStream }; +//# sourceMappingURL=shim-types.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5ef827c791208be5f66d1832c57ff4942d7321dc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"shim-types.d.mts","sourceRoot":"","sources":["../src/internal/shim-types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;AAE/C,iBAAiB;AACjB,KAAK,kBAAkB,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEhE,iBAAiB;AACjB,KAAK,mBAAmB,CAAC,CAAC,GAAG,GAAG,IAAI,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;AAE3E,KAAK,8BAA8B,CAAC,CAAC,GAAG,GAAG,IACzC,OAAO,UAAU,SAAS;IAAE,cAAc,EAAE,GAAG,CAAA;CAAE,GAAG,KAAK,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAErF,KAAK,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CACtC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GACzE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,CACpG,CAAC;AAEF,YAAY,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2bc2e7da4a7d6b01b8b119ca690757032a298f6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts @@ -0,0 +1,17 @@ +/** + * Shims for types that we can't always rely on being available globally. + * + * Note: these only exist at the type-level, there is no corresponding runtime + * version for any of these symbols. + */ +type NeverToAny = T extends never ? any : T; +/** @ts-ignore */ +type _DOMReadableStream = globalThis.ReadableStream; +/** @ts-ignore */ +type _NodeReadableStream = import('stream/web').ReadableStream; +type _ConditionalNodeReadableStream = typeof globalThis extends { + ReadableStream: any; +} ? never : _NodeReadableStream; +type _ReadableStream = NeverToAny<([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream)>; +export type { _ReadableStream as ReadableStream }; +//# sourceMappingURL=shim-types.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..66ecda1a3a0f5623206be8dd49a154c25e7abd3d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shim-types.d.ts","sourceRoot":"","sources":["../src/internal/shim-types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;AAE/C,iBAAiB;AACjB,KAAK,kBAAkB,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEhE,iBAAiB;AACjB,KAAK,mBAAmB,CAAC,CAAC,GAAG,GAAG,IAAI,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;AAE3E,KAAK,8BAA8B,CAAC,CAAC,GAAG,GAAG,IACzC,OAAO,UAAU,SAAS;IAAE,cAAc,EAAE,GAAG,CAAA;CAAE,GAAG,KAAK,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAErF,KAAK,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CACtC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GACzE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,CACpG,CAAC;AAEF,YAAY,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js new file mode 100644 index 0000000000000000000000000000000000000000..c5e5031ef895d4a6c61288b56b36d093efe0b3cc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=shim-types.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cb30e0459ebfd01538bf234432340958bbbd9f85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shim-types.js","sourceRoot":"","sources":["../src/internal/shim-types.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7f918e27249c018420245c6513cab5346c9f7e4e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=shim-types.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4082696eda469129d62b8617544346c8c46ca6dc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shim-types.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"shim-types.mjs","sourceRoot":"","sources":["../src/internal/shim-types.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..51e47ef174efe30defaa8dc397b745b40110f88d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts @@ -0,0 +1,20 @@ +import type { Fetch } from "./builtin-types.mjs"; +import type { ReadableStream } from "./shim-types.mjs"; +export declare function getDefaultFetch(): Fetch; +type ReadableStreamArgs = ConstructorParameters; +export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream; +export declare function ReadableStreamFrom(iterable: Iterable | AsyncIterable): ReadableStream; +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; +/** + * Cancels a ReadableStream we don't need to consume. + * See https://undici.nodejs.org/#/?id=garbage-collection + */ +export declare function CancelReadableStream(stream: any): Promise; +export {}; +//# sourceMappingURL=shims.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..f207b2e74ff938424aedbb885d4aef06738232fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.d.mts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,KAAK,EAAE,KAAK,EAAE;OACd,KAAK,EAAE,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..814098894e467a8d5b75ce9e918dc513ae0a9bec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts @@ -0,0 +1,20 @@ +import type { Fetch } from "./builtin-types.js"; +import type { ReadableStream } from "./shim-types.js"; +export declare function getDefaultFetch(): Fetch; +type ReadableStreamArgs = ConstructorParameters; +export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream; +export declare function ReadableStreamFrom(iterable: Iterable | AsyncIterable): ReadableStream; +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; +/** + * Cancels a ReadableStream we don't need to consume. + * See https://undici.nodejs.org/#/?id=garbage-collection + */ +export declare function CancelReadableStream(stream: any): Promise; +export {}; +//# sourceMappingURL=shims.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..24e12130f3caac52ee92308c50696b9eb726b9b2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,KAAK,EAAE,KAAK,EAAE;OACd,KAAK,EAAE,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js new file mode 100644 index 0000000000000000000000000000000000000000..6fe68548b47a63066f003325e0dfb67db4e1453a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js @@ -0,0 +1,92 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDefaultFetch = getDefaultFetch; +exports.makeReadableStream = makeReadableStream; +exports.ReadableStreamFrom = ReadableStreamFrom; +exports.ReadableStreamToAsyncIterable = ReadableStreamToAsyncIterable; +exports.CancelReadableStream = CancelReadableStream; +function getDefaultFetch() { + if (typeof fetch !== 'undefined') { + return fetch; + } + throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`'); +} +function makeReadableStream(...args) { + const ReadableStream = globalThis.ReadableStream; + if (typeof ReadableStream === 'undefined') { + // Note: All of the platforms / runtimes we officially support already define + // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. + throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); + } + return new ReadableStream(...args); +} +function ReadableStreamFrom(iterable) { + let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + return makeReadableStream({ + start() { }, + async pull(controller) { + const { done, value } = await iter.next(); + if (done) { + controller.close(); + } + else { + controller.enqueue(value); + } + }, + async cancel() { + await iter.return?.(); + }, + }); +} +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +function ReadableStreamToAsyncIterable(stream) { + if (stream[Symbol.asyncIterator]) + return stream; + const reader = stream.getReader(); + return { + async next() { + try { + const result = await reader.read(); + if (result?.done) + reader.releaseLock(); // release lock when stream becomes closed + return result; + } + catch (e) { + reader.releaseLock(); // release lock when stream becomes errored + throw e; + } + }, + async return() { + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; + return { done: true, value: undefined }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; +} +/** + * Cancels a ReadableStream we don't need to consume. + * See https://undici.nodejs.org/#/?id=garbage-collection + */ +async function CancelReadableStream(stream) { + if (stream === null || typeof stream !== 'object') + return; + if (stream[Symbol.asyncIterator]) { + await stream[Symbol.asyncIterator]().return?.(); + return; + } + const reader = stream.getReader(); + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; +} +//# sourceMappingURL=shims.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b21efe84d813c723a612a18d3211b281288242ff --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.js","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAYtF,0CAQC;AAID,gDAWC;AAED,gDAkBC;AAQD,sEAyBC;AAMD,oDAYC;AA9FD,SAAgB,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,KAAY,CAAC;IACtB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,mJAAmJ,CACpJ,CAAC;AACJ,CAAC;AAID,SAAgB,kBAAkB,CAAC,GAAG,IAAwB;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,cAAc,CAAC;IAC1D,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE,CAAC;QAC1C,6EAA6E;QAC7E,yFAAyF;QACzF,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,kBAAkB,CAAI,QAAwC;IAC5E,IAAI,IAAI,GACN,MAAM,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CA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QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,oBAAoB,CAAC,MAAW;IACpD,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO;IAE1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAChD,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d92f1136ed84693cec622135fd5168375832423d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs @@ -0,0 +1,85 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export function getDefaultFetch() { + if (typeof fetch !== 'undefined') { + return fetch; + } + throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`'); +} +export function makeReadableStream(...args) { + const ReadableStream = globalThis.ReadableStream; + if (typeof ReadableStream === 'undefined') { + // Note: All of the platforms / runtimes we officially support already define + // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. + throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); + } + return new ReadableStream(...args); +} +export function ReadableStreamFrom(iterable) { + let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + return makeReadableStream({ + start() { }, + async pull(controller) { + const { done, value } = await iter.next(); + if (done) { + controller.close(); + } + else { + controller.enqueue(value); + } + }, + async cancel() { + await iter.return?.(); + }, + }); +} +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export function ReadableStreamToAsyncIterable(stream) { + if (stream[Symbol.asyncIterator]) + return stream; + const reader = stream.getReader(); + return { + async next() { + try { + const result = await reader.read(); + if (result?.done) + reader.releaseLock(); // release lock when stream becomes closed + return result; + } + catch (e) { + reader.releaseLock(); // release lock when stream becomes errored + throw e; + } + }, + async return() { + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; + return { done: true, value: undefined }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; +} +/** + * Cancels a ReadableStream we don't need to consume. + * See https://undici.nodejs.org/#/?id=garbage-collection + */ +export async function CancelReadableStream(stream) { + if (stream === null || typeof stream !== 'object') + return; + if (stream[Symbol.asyncIterator]) { + await stream[Symbol.asyncIterator]().return?.(); + return; + } + const reader = stream.getReader(); + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; +} +//# sourceMappingURL=shims.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..28fb4687f9dce586e4a16a72f2f1604d9cb98433 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/shims.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.mjs","sourceRoot":"","sources":["../src/internal/shims.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AW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ca2d41be9cb15904a54589e035c91602b1277ea7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts @@ -0,0 +1,8 @@ +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; +//# sourceMappingURL=stream-utils.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d637a9943cf59f7603f201f009d5c96dcefe0fe9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.d.mts","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fd3c25fe15d5b4fd1a98a8046433bf2ca19702a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts @@ -0,0 +1,8 @@ +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; +//# sourceMappingURL=stream-utils.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9e8ce6e650a811a6b9c747da492622cd65db0f3b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.d.ts","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js new file mode 100644 index 0000000000000000000000000000000000000000..09c759de0b08bb9bf211a201c77416c7ebc9de91 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamToAsyncIterable = ReadableStreamToAsyncIterable; +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +function ReadableStreamToAsyncIterable(stream) { + if (stream[Symbol.asyncIterator]) + return stream; + const reader = stream.getReader(); + return { + async next() { + try { + const result = await reader.read(); + if (result?.done) + reader.releaseLock(); // release lock when stream becomes closed + return result; + } + catch (e) { + reader.releaseLock(); // release lock when stream becomes errored + throw e; + } + }, + async return() { + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; + return { done: true, value: undefined }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; +} +//# sourceMappingURL=stream-utils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..29c13681601ccddb238899b0dc60b9ec4a3b520a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.js","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":";;AAMA,sEAyBC;AA/BD;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAI,MAAW;IAC1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6ff54b822d59bb3355d947659f2f964ce148de9d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs @@ -0,0 +1,35 @@ +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export function ReadableStreamToAsyncIterable(stream) { + if (stream[Symbol.asyncIterator]) + return stream; + const reader = stream.getReader(); + return { + async next() { + try { + const result = await reader.read(); + if (result?.done) + reader.releaseLock(); // release lock when stream becomes closed + return result; + } + catch (e) { + reader.releaseLock(); // release lock when stream becomes errored + throw e; + } + }, + async return() { + const cancelPromise = reader.cancel(); + reader.releaseLock(); + await cancelPromise; + return { done: true, value: undefined }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; +} +//# sourceMappingURL=stream-utils.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1403c59982c79edf860f93fa51b2941beecdb650 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/stream-utils.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.mjs","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAI,MAAW;IAC1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a80cfd574308de514a4a8e9cdc957ded11fe5d94 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts @@ -0,0 +1,45 @@ +import type { FilePropertyBag } from "./builtin-types.mjs"; +type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView; +/** + * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc. + * Don't add arrayBuffer here, node-fetch doesn't have it + */ +interface BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ + readonly size: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ + text(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ + slice(start?: number, end?: number): BlobLike; +} +/** + * Intended to match DOM File, node:buffer File, undici File, etc. + */ +interface FileLike extends BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ + readonly lastModified: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ + readonly name?: string | undefined; +} +/** + * Intended to match DOM Response, node-fetch Response, undici Response, etc. + */ +export interface ResponseLike { + url: string; + blob(): Promise; +} +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export declare function toFile(value: ToFileInput | PromiseLike, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise; +export {}; +//# sourceMappingURL=to-file.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..92749a31405784a8cfbb634a9b985c212c231bf7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.d.mts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAiCf"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7b8b296bf730248128306f9b5558e59f4c86249f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts @@ -0,0 +1,45 @@ +import type { FilePropertyBag } from "./builtin-types.js"; +type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView; +/** + * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc. + * Don't add arrayBuffer here, node-fetch doesn't have it + */ +interface BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ + readonly size: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ + text(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ + slice(start?: number, end?: number): BlobLike; +} +/** + * Intended to match DOM File, node:buffer File, undici File, etc. + */ +interface FileLike extends BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ + readonly lastModified: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ + readonly name?: string | undefined; +} +/** + * Intended to match DOM Response, node-fetch Response, undici Response, etc. + */ +export interface ResponseLike { + url: string; + blob(): Promise; +} +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export declare function toFile(value: ToFileInput | PromiseLike, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise; +export {}; +//# sourceMappingURL=to-file.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5625ee801197534c7a3f043f5b7051a52b2bc692 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.d.ts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAiCf"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js new file mode 100644 index 0000000000000000000000000000000000000000..dd51de8cf151cf78778f5b3680ae0e63d17bc61a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toFile = toFile; +const uploads_1 = require("./uploads.js"); +const uploads_2 = require("./uploads.js"); +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isBlobLike = (value) => value != null && + typeof value === 'object' && + typeof value.size === 'number' && + typeof value.type === 'string' && + typeof value.text === 'function' && + typeof value.slice === 'function' && + typeof value.arrayBuffer === 'function'; +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isFileLike = (value) => value != null && + typeof value === 'object' && + typeof value.name === 'string' && + typeof value.lastModified === 'number' && + isBlobLike(value); +const isResponseLike = (value) => value != null && + typeof value === 'object' && + typeof value.url === 'string' && + typeof value.blob === 'function'; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +async function toFile(value, name, options) { + (0, uploads_2.checkFileSupport)(); + // If it's a promise, resolve it. + value = await value; + // If we've been given a `File` we don't need to do anything + if (isFileLike(value)) { + if (value instanceof File) { + return value; + } + return (0, uploads_1.makeFile)([await value.arrayBuffer()], value.name); + } + if (isResponseLike(value)) { + const blob = await value.blob(); + name || (name = new URL(value.url).pathname.split(/[\\/]/).pop()); + return (0, uploads_1.makeFile)(await getBytes(blob), name, options); + } + const parts = await getBytes(value); + name || (name = (0, uploads_1.getName)(value)); + if (!options?.type) { + const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type); + if (typeof type === 'string') { + options = { ...options, type }; + } + } + return (0, uploads_1.makeFile)(parts, name, options); +} +async function getBytes(value) { + let parts = []; + if (typeof value === 'string' || + ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc. + value instanceof ArrayBuffer) { + parts.push(value); + } + else if (isBlobLike(value)) { + parts.push(value instanceof Blob ? value : await value.arrayBuffer()); + } + else if ((0, uploads_1.isAsyncIterable)(value) // includes Readable, ReadableStream, etc. + ) { + for await (const chunk of value) { + parts.push(...(await getBytes(chunk))); // TODO, consider validating? + } + } + else { + const constructor = value?.constructor?.name; + throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`); + } + return parts; +} +function propsForError(value) { + if (typeof value !== 'object' || value === null) + return ''; + const props = Object.getOwnPropertyNames(value); + return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; +} +//# sourceMappingURL=to-file.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js.map new file mode 100644 index 0000000000000000000000000000000000000000..eef027a5f4bf083c02e334d8df260695b268519f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.js.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.js","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":";;AAkFA,wBAqCC;AAvHD,0CAAyE;AAEzE,0CAA6C;AAmB7C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;IAChC,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;IACjC,OAAO,KAAK,CAAC,WAAW,KAAK,UAAU,CAAC;AAY1C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;IACtC,UAAU,CAAC,KAAK,CAAC,CAAC;AAUpB,MAAM,cAAc,GAAG,CAAC,KAAU,EAAyB,EAAE,CAC3D,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;IAC7B,OAAO,KAAK,CAAC,IAAI,KAAK,U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AI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c476ff118e665054a85602bc27a93ada34a6b986 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs @@ -0,0 +1,88 @@ +import { getName, makeFile, isAsyncIterable } from "./uploads.mjs"; +import { checkFileSupport } from "./uploads.mjs"; +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isBlobLike = (value) => value != null && + typeof value === 'object' && + typeof value.size === 'number' && + typeof value.type === 'string' && + typeof value.text === 'function' && + typeof value.slice === 'function' && + typeof value.arrayBuffer === 'function'; +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isFileLike = (value) => value != null && + typeof value === 'object' && + typeof value.name === 'string' && + typeof value.lastModified === 'number' && + isBlobLike(value); +const isResponseLike = (value) => value != null && + typeof value === 'object' && + typeof value.url === 'string' && + typeof value.blob === 'function'; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export async function toFile(value, name, options) { + checkFileSupport(); + // If it's a promise, resolve it. + value = await value; + // If we've been given a `File` we don't need to do anything + if (isFileLike(value)) { + if (value instanceof File) { + return value; + } + return makeFile([await value.arrayBuffer()], value.name); + } + if (isResponseLike(value)) { + const blob = await value.blob(); + name || (name = new URL(value.url).pathname.split(/[\\/]/).pop()); + return makeFile(await getBytes(blob), name, options); + } + const parts = await getBytes(value); + name || (name = getName(value)); + if (!options?.type) { + const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type); + if (typeof type === 'string') { + options = { ...options, type }; + } + } + return makeFile(parts, name, options); +} +async function getBytes(value) { + let parts = []; + if (typeof value === 'string' || + ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc. + value instanceof ArrayBuffer) { + parts.push(value); + } + else if (isBlobLike(value)) { + parts.push(value instanceof Blob ? value : await value.arrayBuffer()); + } + else if (isAsyncIterable(value) // includes Readable, ReadableStream, etc. + ) { + for await (const chunk of value) { + parts.push(...(await getBytes(chunk))); // TODO, consider validating? + } + } + else { + const constructor = value?.constructor?.name; + throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`); + } + return parts; +} +function propsForError(value) { + if (typeof value !== 'object' || value === null) + return ''; + const props = Object.getOwnPropertyNames(value); + return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; +} +//# sourceMappingURL=to-file.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ad9431304899a7bb40d556cf4a2434fc53482da9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/to-file.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.mjs","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,eAAe,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QAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IACxE,CAAC;SAAM,IACL,eAAe,CAAC,KAAK,CAAC,CAAC,0CAA0C;MACjE,CAAC;QACD,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,KAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B;QACvF,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,GAAG,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,yBAAyB,OAAO,KAAK,GACnC,WAAW,CAAC,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC,CAAC,EAClD,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.js new file mode 100644 index 0000000000000000000000000000000000000000..52fca6cae0fc6adaebdb1e3812894d68d8112a06 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__setModuleDefault = exports.__createBinding = void 0; +exports.__classPrivateFieldSet = __classPrivateFieldSet; +exports.__classPrivateFieldGet = __classPrivateFieldGet; +exports.__exportStar = __exportStar; +exports.__importStar = __importStar; +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +var __createBinding = Object.create + ? function (o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k]; + }, + }; + } + Object.defineProperty(o, k2, desc); + } + : function (o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }; +exports.__createBinding = __createBinding; +function __exportStar(m, o) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) + __createBinding(o, m, p); +} +var __setModuleDefault = Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } + : function (o, v) { + o["default"] = v; + }; +exports.__setModuleDefault = __setModuleDefault; +var ownKeys = function (o) { + ownKeys = + Object.getOwnPropertyNames || + function (o2) { + var ar = []; + for (var k in o2) + if (Object.prototype.hasOwnProperty.call(o2, k)) + ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; +function __importStar(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) + if (k[i] !== "default") + __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a80a132139131ef6ee96359327f51384df6f8b75 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/tslib.mjs @@ -0,0 +1,17 @@ +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +export { __classPrivateFieldSet, __classPrivateFieldGet }; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4c233b8faa8ab7896d2cb24b3135c49a181b057e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts @@ -0,0 +1,69 @@ +export type PromiseOrValue = T | Promise; +export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; +export type KeysEnum = { + [P in keyof Required]: true; +}; +export type FinalizedRequestInit = RequestInit & { + headers: Headers; +}; +type NotAny = [0] extends [1 & T] ? never : T; +/** + * Some environments overload the global fetch function, and Parameters only gets the last signature. + */ +type OverloadedParameters = T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +}) ? A | B | C | D : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; +}) ? A | B | C : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; +}) ? A | B : T extends (...args: infer A) => unknown ? A : never; +/** + * These imports attempt to get types from a parent package's dependencies. + * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which + * would cause typescript to show types not present at runtime. To avoid this, we import + * directly from parent node_modules folders. + * + * We need to check multiple levels because we don't know what directory structure we'll be in. + * For example, pnpm generates directories like this: + * ``` + * node_modules + * ├── .pnpm + * │ └── pkg@1.0.0 + * │ └── node_modules + * │ └── pkg + * │ └── internal + * │ └── types.d.ts + * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg + * └── undici + * ``` + * + * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition + */ +/** @ts-ignore For users with \@types/node */ +type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with undici */ +type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with \@types/bun */ +type BunRequestInit = globalThis.FetchRequestInit; +/** @ts-ignore For users with node-fetch@2 */ +type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users who use Deno */ +type FetchRequestInit = NonNullable[1]>; +type RequestInits = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** + * This type contains `RequestInit` options that may be available on the current runtime, + * including per-platform extensions like `dispatcher`, `agent`, `client`, etc. + */ +export type MergedRequestInit = RequestInits & +/** We don't include these in the types as they'll be overridden for every request. */ +Partial>; +export {}; +//# sourceMappingURL=types.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..92d5ceff952ac55a72f1028161b902866713f512 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtE,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAEjD;;GAEG;AACH,KAAK,oBAAoB,CAAC,CA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file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f7feb0c7010cf50f51339001dbe35a00cc674a1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts @@ -0,0 +1,69 @@ +export type PromiseOrValue = T | Promise; +export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; +export type KeysEnum = { + [P in keyof Required]: true; +}; +export type FinalizedRequestInit = RequestInit & { + headers: Headers; +}; +type NotAny = [0] extends [1 & T] ? never : T; +/** + * Some environments overload the global fetch function, and Parameters only gets the last signature. + */ +type OverloadedParameters = T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +}) ? A | B | C | D : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; +}) ? A | B | C : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; +}) ? A | B : T extends (...args: infer A) => unknown ? A : never; +/** + * These imports attempt to get types from a parent package's dependencies. + * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which + * would cause typescript to show types not present at runtime. To avoid this, we import + * directly from parent node_modules folders. + * + * We need to check multiple levels because we don't know what directory structure we'll be in. + * For example, pnpm generates directories like this: + * ``` + * node_modules + * ├── .pnpm + * │ └── pkg@1.0.0 + * │ └── node_modules + * │ └── pkg + * │ └── internal + * │ └── types.d.ts + * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg + * └── undici + * ``` + * + * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition + */ +/** @ts-ignore For users with \@types/node */ +type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with undici */ +type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with \@types/bun */ +type BunRequestInit = globalThis.FetchRequestInit; +/** @ts-ignore For users with node-fetch@2 */ +type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users who use Deno */ +type FetchRequestInit = NonNullable[1]>; +type RequestInits = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** + * This type contains `RequestInit` options that may be available on the current runtime, + * including per-platform extensions like `dispatcher`, `agent`, `client`, etc. + */ +export type MergedRequestInit = RequestInits & +/** We don't include these in the types as they'll be overridden for every request. */ +Partial>; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8155e04cc6f2867c752d24848913deeed157bbcc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAA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AAqB,CAAC,GAC7B,MAAM,CAAC,WAAW,CAAC,GACnB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY;AAC1C,sFAAsF;AACtF,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js new file mode 100644 index 0000000000000000000000000000000000000000..dcea3286d5b2c834ffea25a4e3cf415744c1ab23 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e32ca0c250afa3098048360198ba9a98d024e04d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bd595dc41b0505b79369048b85d8ba045188d341 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=types.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..57d7587aeb8e477a82170550aac97f10f38a1b40 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/types.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8bd95ea506b38a965ca5fcea0dd809884500c23e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts @@ -0,0 +1,42 @@ +import { type RequestOptions } from "./request-options.mjs"; +import type { FilePropertyBag, Fetch } from "./builtin-types.mjs"; +import type { OpenAI } from "../client.mjs"; +export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView; +type FsReadStream = AsyncIterable & { + path: string | { + toString(): string; + }; +}; +interface BunFile extends Blob { + readonly name?: string | undefined; +} +export declare const checkFileSupport: () => void; +/** + * Typically, this is a native "File" class. + * + * We provide the {@link toFile} utility to convert a variety of objects + * into the File class. + * + * For convenience, you can also pass a fetch Response, or in Node, + * the result of fs.createReadStream(). + */ +export type Uploadable = File | Response | FsReadStream | BunFile; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +export declare function makeFile(fileBits: BlobPart[], fileName: string | undefined, options?: FilePropertyBag): File; +export declare function getName(value: any): string | undefined; +export declare const isAsyncIterable: (value: any) => value is AsyncIterable; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: OpenAI | Fetch) => Promise; +type MultipartFormRequestOptions = Omit & { + body: unknown; +}; +export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: OpenAI | Fetch) => Promise; +export declare const createForm: >(body: T | undefined, fetch: OpenAI | Fetch) => Promise; +export {}; +//# sourceMappingURL=uploads.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d78598a7ad856b53110e744ec29e955debc674e0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,KAAK,EAAE,MAAM,EAAE;AAGtB,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,CAAC;AAChF,KAAK,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAG1F,UAAU,OAAQ,SAAQ,IAAI;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,YAY5B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;AAElE;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,IAAI,CAGN;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CActD;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,aAAa,CAAC,GAAG,CAC0B,CAAC;AAElG;;;GAGG;AACH,eAAO,MAAM,gCAAgC,GAC3C,MAAM,cAAc,EACpB,OAAO,MAAM,GAAG,KAAK,KACpB,OAAO,CAAC,cAAc,CAIxB,CAAC;AAEF,KAAK,2BAA2B,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,eAAO,MAAM,2BAA2B,GACtC,MAAM,2BAA2B,EACjC,OAAO,MAAM,GAAG,KAAK,KACpB,OAAO,CAAC,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,MAAM,GAAG,KAAK,KACpB,OAAO,CAAC,QAAQ,CASlB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..175fd6aa276c2833fe32225d2d065f66297f62a4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts @@ -0,0 +1,42 @@ +import { type RequestOptions } from "./request-options.js"; +import type { FilePropertyBag, Fetch } from "./builtin-types.js"; +import type { OpenAI } from "../client.js"; +export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView; +type FsReadStream = AsyncIterable & { + path: string | { + toString(): string; + }; +}; +interface BunFile extends Blob { + readonly name?: string | undefined; +} +export declare const checkFileSupport: () => void; +/** + * Typically, this is a native "File" class. + * + * We provide the {@link toFile} utility to convert a variety of objects + * into the File class. + * + * For convenience, you can also pass a fetch Response, or in Node, + * the result of fs.createReadStream(). + */ +export type Uploadable = File | Response | FsReadStream | BunFile; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +export declare function makeFile(fileBits: BlobPart[], fileName: string | undefined, options?: FilePropertyBag): File; +export declare function getName(value: any): string | undefined; +export declare const isAsyncIterable: (value: any) => value is AsyncIterable; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: OpenAI | Fetch) => Promise; +type MultipartFormRequestOptions = Omit & { + body: unknown; +}; +export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: OpenAI | Fetch) => Promise; +export declare const createForm: >(body: T | undefined, fetch: OpenAI | Fetch) => Promise; +export {}; +//# sourceMappingURL=uploads.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..615887aee281ad96ab315543713234922b8a34fc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,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,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,MAAM,GAAG,KAAK,KACpB,OAAO,CAAC,QAAQ,CASlB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js new file mode 100644 index 0000000000000000000000000000000000000000..5627e5a3ad37fdc30aa673895e3023d5e4644d39 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js @@ -0,0 +1,141 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createForm = exports.multipartFormRequestOptions = exports.maybeMultipartFormRequestOptions = exports.isAsyncIterable = exports.checkFileSupport = void 0; +exports.makeFile = makeFile; +exports.getName = getName; +const shims_1 = require("./shims.js"); +const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis; + const isOldNode = typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20; + throw new Error('`File` is not defined as a global, which is required for file uploads.' + + (isOldNode ? + " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." + : '')); + } +}; +exports.checkFileSupport = checkFileSupport; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +function makeFile(fileBits, fileName, options) { + (0, exports.checkFileSupport)(); + return new File(fileBits, fileName ?? 'unknown_file', options); +} +function getName(value) { + return (((typeof value === 'object' && + value !== null && + (('name' in value && value.name && String(value.name)) || + ('url' in value && value.url && String(value.url)) || + ('filename' in value && value.filename && String(value.filename)) || + ('path' in value && value.path && String(value.path)))) || + '') + .split(/[\\/]/) + .pop() || undefined); +} +const isAsyncIterable = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; +exports.isAsyncIterable = isAsyncIterable; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +const maybeMultipartFormRequestOptions = async (opts, fetch) => { + if (!hasUploadableValue(opts.body)) + return opts; + return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) }; +}; +exports.maybeMultipartFormRequestOptions = maybeMultipartFormRequestOptions; +const multipartFormRequestOptions = async (opts, fetch) => { + return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) }; +}; +exports.multipartFormRequestOptions = multipartFormRequestOptions; +const supportsFormDataMap = /* @__PURE__ */ new WeakMap(); +/** + * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending + * properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]". + * This function detects if the fetch function provided supports the global FormData object to avoid + * confusing error messages later on. + */ +function supportsFormData(fetchObject) { + const fetch = typeof fetchObject === 'function' ? fetchObject : fetchObject.fetch; + const cached = supportsFormDataMap.get(fetch); + if (cached) + return cached; + const promise = (async () => { + try { + const FetchResponse = ('Response' in fetch ? + fetch.Response + : (await fetch('data:,')).constructor); + const data = new FormData(); + if (data.toString() === (await new FetchResponse(data).text())) { + return false; + } + return true; + } + catch { + // avoid false negatives + return true; + } + })(); + supportsFormDataMap.set(fetch, promise); + return promise; +} +const createForm = async (body, fetch) => { + if (!(await supportsFormData(fetch))) { + throw new TypeError('The provided fetch function does not support file uploads with the current global FormData class.'); + } + const form = new FormData(); + await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); + return form; +}; +exports.createForm = createForm; +// We check for Blob not File because Bun.File doesn't inherit from File, +// but they both inherit from Blob and have a `name` property at runtime. +const isNamedBlob = (value) => value instanceof Blob && 'name' in value; +const isUploadable = (value) => typeof value === 'object' && + value !== null && + (value instanceof Response || (0, exports.isAsyncIterable)(value) || isNamedBlob(value)); +const hasUploadableValue = (value) => { + if (isUploadable(value)) + return true; + if (Array.isArray(value)) + return value.some(hasUploadableValue); + if (value && typeof value === 'object') { + for (const k in value) { + if (hasUploadableValue(value[k])) + return true; + } + } + return false; +}; +const addFormValue = async (form, key, value) => { + if (value === undefined) + return; + if (value == null) { + throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`); + } + // TODO: make nested formats configurable + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + form.append(key, String(value)); + } + else if (value instanceof Response) { + form.append(key, makeFile([await value.blob()], getName(value))); + } + else if ((0, exports.isAsyncIterable)(value)) { + form.append(key, makeFile([await new Response((0, shims_1.ReadableStreamFrom)(value)).blob()], getName(value))); + } + else if (isNamedBlob(value)) { + form.append(key, value, getName(value)); + } + else if (Array.isArray(value)) { + await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); + } + else if (typeof value === 'object') { + await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop))); + } + else { + throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`); + } +}; +//# sourceMappingURL=uploads.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3b1acca555640aecf1a996e8f5aa2bc9d3614d84 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":";;;AA0CA,4BAOC;AAED,0BAcC;AA9DD,sCAA6C;AAUtC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAiB,CAAC;QACtC,MAAM,SAAS,GACb,OAAO,OAAO,EAAE,QAAQ,EAAE,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,I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CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAA,0BAAkB,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;SAAM,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,SAAS,CACjB,wGAAwG,KAAK,UAAU,CACxH,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3f9b5a72ffe191b708c1853485c8e701925baa3f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs @@ -0,0 +1,131 @@ +import { ReadableStreamFrom } from "./shims.mjs"; +export const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis; + const isOldNode = typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20; + throw new Error('`File` is not defined as a global, which is required for file uploads.' + + (isOldNode ? + " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." + : '')); + } +}; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +export function makeFile(fileBits, fileName, options) { + checkFileSupport(); + return new File(fileBits, fileName ?? 'unknown_file', options); +} +export function getName(value) { + return (((typeof value === 'object' && + value !== null && + (('name' in value && value.name && String(value.name)) || + ('url' in value && value.url && String(value.url)) || + ('filename' in value && value.filename && String(value.filename)) || + ('path' in value && value.path && String(value.path)))) || + '') + .split(/[\\/]/) + .pop() || undefined); +} +export const isAsyncIterable = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +export const maybeMultipartFormRequestOptions = async (opts, fetch) => { + if (!hasUploadableValue(opts.body)) + return opts; + return { ...opts, body: await createForm(opts.body, fetch) }; +}; +export const multipartFormRequestOptions = async (opts, fetch) => { + return { ...opts, body: await createForm(opts.body, fetch) }; +}; +const supportsFormDataMap = /* @__PURE__ */ new WeakMap(); +/** + * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending + * properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]". + * This function detects if the fetch function provided supports the global FormData object to avoid + * confusing error messages later on. + */ +function supportsFormData(fetchObject) { + const fetch = typeof fetchObject === 'function' ? fetchObject : fetchObject.fetch; + const cached = supportsFormDataMap.get(fetch); + if (cached) + return cached; + const promise = (async () => { + try { + const FetchResponse = ('Response' in fetch ? + fetch.Response + : (await fetch('data:,')).constructor); + const data = new FormData(); + if (data.toString() === (await new FetchResponse(data).text())) { + return false; + } + return true; + } + catch { + // avoid false negatives + return true; + } + })(); + supportsFormDataMap.set(fetch, promise); + return promise; +} +export const createForm = async (body, fetch) => { + if (!(await supportsFormData(fetch))) { + throw new TypeError('The provided fetch function does not support file uploads with the current global FormData class.'); + } + const form = new FormData(); + await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); + return form; +}; +// We check for Blob not File because Bun.File doesn't inherit from File, +// but they both inherit from Blob and have a `name` property at runtime. +const isNamedBlob = (value) => value instanceof Blob && 'name' in value; +const isUploadable = (value) => typeof value === 'object' && + value !== null && + (value instanceof Response || isAsyncIterable(value) || isNamedBlob(value)); +const hasUploadableValue = (value) => { + if (isUploadable(value)) + return true; + if (Array.isArray(value)) + return value.some(hasUploadableValue); + if (value && typeof value === 'object') { + for (const k in value) { + if (hasUploadableValue(value[k])) + return true; + } + } + return false; +}; +const addFormValue = async (form, key, value) => { + if (value === undefined) + return; + if (value == null) { + throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`); + } + // TODO: make nested formats configurable + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + form.append(key, String(value)); + } + else if (value instanceof Response) { + form.append(key, makeFile([await value.blob()], getName(value))); + } + else if (isAsyncIterable(value)) { + form.append(key, makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value))); + } + else if (isNamedBlob(value)) { + form.append(key, value, getName(value)); + } + else if (Array.isArray(value)) { + await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); + } + else if (typeof value === 'object') { + await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop))); + } + else { + throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`); + } +}; +//# sourceMappingURL=uploads.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b6472f99df16d568634cae625c9b1db2a337e62a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/uploads.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAGO,EAAE,kBAAkB,EAAE;AAU7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAiB,CAAC;QACtC,MAAM,SAAS,GACb,OAAO,OAAO,EAAE,QAAQ,EAAE,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACjG,MAAM,IAAI,KAAK,CACb,wEAAwE;YACtE,CAAC,SAAS,CAAC,CAAC;gBACV,4FAA4F;gBAC9F,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAaF;;;GAGG;AACH,MAAM,UAAU,QAAQ,CACtB,QAAoB,EACpB,QAA4B,EAC5B,OAAyB;IAEzB,gBAAgB,EAAE,CAAC;IACnB,OAAO,IAAI,IAAI,CAAC,QAAe,EAAE,QAAQ,IAAI,cAAc,EAAE,OAAO,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAU;IAChC,OAAO,CACL,CACE,CAAC,OAAO,KAAK,KAAK,QAAQ;QACxB,KAAK,KAAK,IAAI;QACd,CAAC,CAAC,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC,KAAK,IAAI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E,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,SAAS,CACjB,wGAAwG,KAAK,UAAU,CACxH,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1b382453c98c6b13a2b74737895e3b026ff774c7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts @@ -0,0 +1,7 @@ +export * from "./utils/values.mjs"; +export * from "./utils/base64.mjs"; +export * from "./utils/env.mjs"; +export * from "./utils/log.mjs"; +export * from "./utils/uuid.mjs"; +export * from "./utils/sleep.mjs"; +//# sourceMappingURL=utils.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..39794709188e4fd7f3787cdf79cf47a36a7b6014 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b8077481d33a287f4c24aa6d1b3751c0c92fd72 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts @@ -0,0 +1,7 @@ +export * from "./utils/values.js"; +export * from "./utils/base64.js"; +export * from "./utils/env.js"; +export * from "./utils/log.js"; +export * from "./utils/uuid.js"; +export * from "./utils/sleep.js"; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e9f48276450f32dd0746af9e44bb69d3bb070384 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..60fe423cd2960e505626fed8e9bed7ab039999b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js @@ -0,0 +1,11 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("./tslib.js"); +tslib_1.__exportStar(require("./utils/values.js"), exports); +tslib_1.__exportStar(require("./utils/base64.js"), exports); +tslib_1.__exportStar(require("./utils/env.js"), exports); +tslib_1.__exportStar(require("./utils/log.js"), exports); +tslib_1.__exportStar(require("./utils/uuid.js"), exports); +tslib_1.__exportStar(require("./utils/sleep.js"), exports); +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a0d54844404083ca01df9db706262614bfe32c39 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B;AAC/B,4DAA+B;AAC/B,yDAA4B;AAC5B,yDAA4B;AAC5B,0DAA6B;AAC7B,2DAA8B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs new file mode 100644 index 0000000000000000000000000000000000000000..01563e2e2502abeae5d4e3128598a9b406f1a5d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs @@ -0,0 +1,8 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./utils/values.mjs"; +export * from "./utils/base64.mjs"; +export * from "./utils/env.mjs"; +export * from "./utils/log.mjs"; +export * from "./utils/uuid.mjs"; +export * from "./utils/sleep.mjs"; +//# sourceMappingURL=utils.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..be21c422db336480d77350fea0c73ce3999471e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/internal/utils.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..70ab686e28ec3c8f7866c904b1a1446854a2b837 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts @@ -0,0 +1,59 @@ +import type OpenAI from "../index.mjs"; +import type { RequestOptions } from "../internal/request-options.mjs"; +import type { ChatCompletion, ChatCompletionCreateParams, ChatCompletionMessage, ChatCompletionMessageFunctionToolCall, ChatCompletionMessageParam, ParsedChatCompletion } from "../resources/chat/completions.mjs"; +import type { CompletionUsage } from "../resources/completions.mjs"; +import type { ChatCompletionToolRunnerParams } from "./ChatCompletionRunner.mjs"; +import type { ChatCompletionStreamingToolRunnerParams } from "./ChatCompletionStreamingRunner.mjs"; +import { BaseEvents, EventStream } from "./EventStream.mjs"; +import { type BaseFunctionsArgs } from "./RunnableFunction.mjs"; +export interface RunnerOptions extends RequestOptions { + /** How many requests to make before canceling. Default 10. */ + maxChatCompletions?: number; +} +export declare class AbstractChatCompletionRunner extends EventStream { + #private; + protected _chatCompletions: ParsedChatCompletion[]; + messages: ChatCompletionMessageParam[]; + protected _addChatCompletion(this: AbstractChatCompletionRunner, chatCompletion: ParsedChatCompletion): ParsedChatCompletion; + protected _addMessage(this: AbstractChatCompletionRunner, message: ChatCompletionMessageParam, emit?: boolean): void; + /** + * @returns a promise that resolves with the final ChatCompletion, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletion. + */ + finalChatCompletion(): Promise>; + /** + * @returns a promise that resolves with the content of the final ChatCompletionMessage, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalContent(): Promise; + /** + * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, + * or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the content of the final FunctionCall, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalFunctionToolCall(): Promise; + finalFunctionToolCallResult(): Promise; + totalUsage(): Promise; + allChatCompletions(): ChatCompletion[]; + protected _emitFinal(this: AbstractChatCompletionRunner): void; + protected _createChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise>; + protected _runChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise; + protected _runTools(client: OpenAI, params: ChatCompletionToolRunnerParams | ChatCompletionStreamingToolRunnerParams, options?: RunnerOptions): Promise; +} +export interface AbstractChatCompletionRunnerEvents extends BaseEvents { + functionToolCall: (functionCall: ChatCompletionMessageFunctionToolCall.Function) => void; + message: (message: ChatCompletionMessageParam) => void; + chatCompletion: (completion: ChatCompletion) => void; + finalContent: (contentSnapshot: string) => void; + finalMessage: (message: ChatCompletionMessageParam) => void; + finalChatCompletion: (completion: ChatCompletion) => void; + finalFunctionToolCall: (functionCall: ChatCompletionMessageFunctionToolCall.Function) => void; + functionToolCallResult: (content: string) => void; + finalFunctionToolCallResult: (content: string) => void; + totalUsage: (usage: CompletionUsage) => void; +} +//# sourceMappingURL=AbstractChatCompletionRunner.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..eacb7c1d30987d8f43ab2f7dfd122d5eadc6d23a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"AbstractChatCompletionRunner.d.mts","sourceRoot":"","sources":["../src/lib/AbstractChatCompletionRunner.ts"],"names":[],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2B,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..09c0c1e568917c3fb597add428004cec45c112c9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts @@ -0,0 +1,59 @@ +import type OpenAI from "../index.js"; +import type { RequestOptions } from "../internal/request-options.js"; +import type { ChatCompletion, ChatCompletionCreateParams, ChatCompletionMessage, ChatCompletionMessageFunctionToolCall, ChatCompletionMessageParam, ParsedChatCompletion } from "../resources/chat/completions.js"; +import type { CompletionUsage } from "../resources/completions.js"; +import type { ChatCompletionToolRunnerParams } from "./ChatCompletionRunner.js"; +import type { ChatCompletionStreamingToolRunnerParams } from "./ChatCompletionStreamingRunner.js"; +import { BaseEvents, EventStream } from "./EventStream.js"; +import { type BaseFunctionsArgs } from "./RunnableFunction.js"; +export interface RunnerOptions extends RequestOptions { + /** How many requests to make before canceling. Default 10. */ + maxChatCompletions?: number; +} +export declare class AbstractChatCompletionRunner extends EventStream { + #private; + protected _chatCompletions: ParsedChatCompletion[]; + messages: ChatCompletionMessageParam[]; + protected _addChatCompletion(this: AbstractChatCompletionRunner, chatCompletion: ParsedChatCompletion): ParsedChatCompletion; + protected _addMessage(this: AbstractChatCompletionRunner, message: ChatCompletionMessageParam, emit?: boolean): void; + /** + * @returns a promise that resolves with the final ChatCompletion, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletion. + */ + finalChatCompletion(): Promise>; + /** + * @returns a promise that resolves with the content of the final ChatCompletionMessage, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalContent(): Promise; + /** + * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, + * or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the content of the final FunctionCall, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + finalFunctionToolCall(): Promise; + finalFunctionToolCallResult(): Promise; + totalUsage(): Promise; + allChatCompletions(): ChatCompletion[]; + protected _emitFinal(this: AbstractChatCompletionRunner): void; + protected _createChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise>; + protected _runChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise; + protected _runTools(client: OpenAI, params: ChatCompletionToolRunnerParams | ChatCompletionStreamingToolRunnerParams, options?: RunnerOptions): Promise; +} +export interface AbstractChatCompletionRunnerEvents extends BaseEvents { + functionToolCall: (functionCall: ChatCompletionMessageFunctionToolCall.Function) => void; + message: (message: ChatCompletionMessageParam) => void; + chatCompletion: (completion: ChatCompletion) => void; + finalContent: (contentSnapshot: string) => void; + finalMessage: (message: ChatCompletionMessageParam) => void; + finalChatCompletion: (completion: ChatCompletion) => void; + finalFunctionToolCall: (functionCall: ChatCompletionMessageFunctionToolCall.Function) => void; + functionToolCallResult: (content: string) => void; + finalFunctionToolCallResult: (content: string) => void; + totalUsage: (usage: CompletionUsage) => void; +} +//# sourceMappingURL=AbstractChatCompletionRunner.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..6906555964510a5ad74df20cdf1cdd2e4afb2ae9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AbstractChatCompletionRunner.d.ts","sourceRoot":"","sources":["../src/lib/AbstractChatCompletionRunner.ts"],"names":[],"mappings":"OACO,KAAK,MAAM;OACX,KAAK,EAAE,cAAc,EAAE;OAEvB,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,qBAAqB,EACrB,qCAAqC,EACrC,0BAA0B,EAE1B,oBAAoB,EACrB;OACM,KAAK,EAAE,eAAe,EAAE;OACxB,KAAK,EAAE,8BAA8B,EAAE;OACvC,KAAK,EAAE,uCAAuC,EAAE;OAEhD,EAAE,UAAU,EAAE,WAAW,EAAE;OAC3B,EAEL,KAAK,iBAAiB,EAGvB;AAGD,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAAa,4BAA4B,CACvC,UAAU,SAAS,kCAAkC,EACrD,OAAO,CACP,SAAQ,WAAW,CAAC,UAAU,CAAC;;IAC/B,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAM;IACjE,QAAQ,EAAE,0BAA0B,EAAE,CAAM;IAE5C,SAAS,CAAC,kBAAkB,CAC1B,IAAI,EAAE,4BAA4B,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAC/E,cAAc,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAC5C,oBAAoB,CAAC,OAAO,CAAC;IAQhC,SAAS,CAAC,WAAW,CACnB,IAAI,EAAE,4BAA4B,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAC/E,OAAO,EAAE,0BAA0B,EACnC,IAAI,UAAO;IAqBb;;;OAGG;IACG,mBAAmB,IAAI,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAWnE;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAsB5C;;;OAGG;IACG,YAAY,IAAI,OAA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EAAE,qCAAqC,CAAC,QAAQ,KAAK,IAAI,CAAC;IAC9F,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,2BAA2B,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js new file mode 100644 index 0000000000000000000000000000000000000000..4f8bab4ae44a95a8bfc9f37845e56ce17c9e7db7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js @@ -0,0 +1,291 @@ +"use strict"; +var _AbstractChatCompletionRunner_instances, _AbstractChatCompletionRunner_getFinalContent, _AbstractChatCompletionRunner_getFinalMessage, _AbstractChatCompletionRunner_getFinalFunctionToolCall, _AbstractChatCompletionRunner_getFinalFunctionToolCallResult, _AbstractChatCompletionRunner_calculateTotalUsage, _AbstractChatCompletionRunner_validateParams, _AbstractChatCompletionRunner_stringifyFunctionCallResult; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractChatCompletionRunner = void 0; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("../error.js"); +const parser_1 = require("../lib/parser.js"); +const chatCompletionUtils_1 = require("./chatCompletionUtils.js"); +const EventStream_1 = require("./EventStream.js"); +const RunnableFunction_1 = require("./RunnableFunction.js"); +const DEFAULT_MAX_CHAT_COMPLETIONS = 10; +class AbstractChatCompletionRunner extends EventStream_1.EventStream { + constructor() { + super(...arguments); + _AbstractChatCompletionRunner_instances.add(this); + this._chatCompletions = []; + this.messages = []; + } + _addChatCompletion(chatCompletion) { + this._chatCompletions.push(chatCompletion); + this._emit('chatCompletion', chatCompletion); + const message = chatCompletion.choices[0]?.message; + if (message) + this._addMessage(message); + return chatCompletion; + } + _addMessage(message, emit = true) { + if (!('content' in message)) + message.content = null; + this.messages.push(message); + if (emit) { + this._emit('message', message); + if ((0, chatCompletionUtils_1.isToolMessage)(message) && message.content) { + // Note, this assumes that {role: 'tool', content: …} is always the result of a call of tool of type=function. + this._emit('functionToolCallResult', message.content); + } + else if ((0, chatCompletionUtils_1.isAssistantMessage)(message) && message.tool_calls) { + for (const tool_call of message.tool_calls) { + if (tool_call.type === 'function') { + this._emit('functionToolCall', tool_call.function); + } + } + } + } + } + /** + * @returns a promise that resolves with the final ChatCompletion, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletion. + */ + async finalChatCompletion() { + await this.done(); + const completion = this._chatCompletions[this._chatCompletions.length - 1]; + if (!completion) + throw new error_1.OpenAIError('stream ended without producing a ChatCompletion'); + return completion; + } + /** + * @returns a promise that resolves with the content of the final ChatCompletionMessage, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalContent() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + } + /** + * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, + * or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalMessage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the content of the final FunctionCall, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalFunctionToolCall() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCall).call(this); + } + async finalFunctionToolCallResult() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCallResult).call(this); + } + async totalUsage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); + } + allChatCompletions() { + return [...this._chatCompletions]; + } + _emitFinal() { + const completion = this._chatCompletions[this._chatCompletions.length - 1]; + if (completion) + this._emit('finalChatCompletion', completion); + const finalMessage = tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + if (finalMessage) + this._emit('finalMessage', finalMessage); + const finalContent = tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + if (finalContent) + this._emit('finalContent', finalContent); + const finalFunctionCall = tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCall).call(this); + if (finalFunctionCall) + this._emit('finalFunctionToolCall', finalFunctionCall); + const finalFunctionCallResult = tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCallResult).call(this); + if (finalFunctionCallResult != null) + this._emit('finalFunctionToolCallResult', finalFunctionCallResult); + if (this._chatCompletions.some((c) => c.usage)) { + this._emit('totalUsage', tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); + } + } + async _createChatCompletion(client, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); + const chatCompletion = await client.chat.completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal }); + this._connected(); + return this._addChatCompletion((0, parser_1.parseChatCompletion)(chatCompletion, params)); + } + async _runChatCompletion(client, params, options) { + for (const message of params.messages) { + this._addMessage(message, false); + } + return await this._createChatCompletion(client, params, options); + } + async _runTools(client, params, options) { + const role = 'tool'; + const { tool_choice = 'auto', stream, ...restParams } = params; + const singleFunctionToCall = typeof tool_choice !== 'string' && tool_choice.type === 'function' && tool_choice?.function?.name; + const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; + // TODO(someday): clean this logic up + const inputTools = params.tools.map((tool) => { + if ((0, parser_1.isAutoParsableTool)(tool)) { + if (!tool.$callback) { + throw new error_1.OpenAIError('Tool given to `.runTools()` that does not have an associated function'); + } + return { + type: 'function', + function: { + function: tool.$callback, + name: tool.function.name, + description: tool.function.description || '', + parameters: tool.function.parameters, + parse: tool.$parseRaw, + strict: true, + }, + }; + } + return tool; + }); + const functionsByName = {}; + for (const f of inputTools) { + if (f.type === 'function') { + functionsByName[f.function.name || f.function.function.name] = f.function; + } + } + const tools = 'tools' in params ? + inputTools.map((t) => t.type === 'function' ? + { + type: 'function', + function: { + name: t.function.name || t.function.function.name, + parameters: t.function.parameters, + description: t.function.description, + strict: t.function.strict, + }, + } + : t) + : undefined; + for (const message of params.messages) { + this._addMessage(message, false); + } + for (let i = 0; i < maxChatCompletions; ++i) { + const chatCompletion = await this._createChatCompletion(client, { + ...restParams, + tool_choice, + tools, + messages: [...this.messages], + }, options); + const message = chatCompletion.choices[0]?.message; + if (!message) { + throw new error_1.OpenAIError(`missing message in ChatCompletion response`); + } + if (!message.tool_calls?.length) { + return; + } + for (const tool_call of message.tool_calls) { + if (tool_call.type !== 'function') + continue; + const tool_call_id = tool_call.id; + const { name, arguments: args } = tool_call.function; + const fn = functionsByName[name]; + if (!fn) { + const content = `Invalid tool_call: ${JSON.stringify(name)}. Available options are: ${Object.keys(functionsByName) + .map((name) => JSON.stringify(name)) + .join(', ')}. Please try again`; + this._addMessage({ role, tool_call_id, content }); + continue; + } + else if (singleFunctionToCall && singleFunctionToCall !== name) { + const content = `Invalid tool_call: ${JSON.stringify(name)}. ${JSON.stringify(singleFunctionToCall)} requested. Please try again`; + this._addMessage({ role, tool_call_id, content }); + continue; + } + let parsed; + try { + parsed = (0, RunnableFunction_1.isRunnableFunctionWithParse)(fn) ? await fn.parse(args) : args; + } + catch (error) { + const content = error instanceof Error ? error.message : String(error); + this._addMessage({ role, tool_call_id, content }); + continue; + } + // @ts-expect-error it can't rule out `never` type. + const rawContent = await fn.function(parsed, this); + const content = tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent); + this._addMessage({ role, tool_call_id, content }); + if (singleFunctionToCall) { + return; + } + } + } + return; + } +} +exports.AbstractChatCompletionRunner = AbstractChatCompletionRunner; +_AbstractChatCompletionRunner_instances = new WeakSet(), _AbstractChatCompletionRunner_getFinalContent = function _AbstractChatCompletionRunner_getFinalContent() { + return tslib_1.__classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; +}, _AbstractChatCompletionRunner_getFinalMessage = function _AbstractChatCompletionRunner_getFinalMessage() { + let i = this.messages.length; + while (i-- > 0) { + const message = this.messages[i]; + if ((0, chatCompletionUtils_1.isAssistantMessage)(message)) { + // TODO: support audio here + const ret = { + ...message, + content: message.content ?? null, + refusal: message.refusal ?? null, + }; + return ret; + } + } + throw new error_1.OpenAIError('stream ended without producing a ChatCompletionMessage with role=assistant'); +}, _AbstractChatCompletionRunner_getFinalFunctionToolCall = function _AbstractChatCompletionRunner_getFinalFunctionToolCall() { + for (let i = this.messages.length - 1; i >= 0; i--) { + const message = this.messages[i]; + if ((0, chatCompletionUtils_1.isAssistantMessage)(message) && message?.tool_calls?.length) { + return message.tool_calls.filter((x) => x.type === 'function').at(-1)?.function; + } + } + return; +}, _AbstractChatCompletionRunner_getFinalFunctionToolCallResult = function _AbstractChatCompletionRunner_getFinalFunctionToolCallResult() { + for (let i = this.messages.length - 1; i >= 0; i--) { + const message = this.messages[i]; + if ((0, chatCompletionUtils_1.isToolMessage)(message) && + message.content != null && + typeof message.content === 'string' && + this.messages.some((x) => x.role === 'assistant' && + x.tool_calls?.some((y) => y.type === 'function' && y.id === message.tool_call_id))) { + return message.content; + } + } + return; +}, _AbstractChatCompletionRunner_calculateTotalUsage = function _AbstractChatCompletionRunner_calculateTotalUsage() { + const total = { + completion_tokens: 0, + prompt_tokens: 0, + total_tokens: 0, + }; + for (const { usage } of this._chatCompletions) { + if (usage) { + total.completion_tokens += usage.completion_tokens; + total.prompt_tokens += usage.prompt_tokens; + total.total_tokens += usage.total_tokens; + } + } + return total; +}, _AbstractChatCompletionRunner_validateParams = function _AbstractChatCompletionRunner_validateParams(params) { + if (params.n != null && params.n > 1) { + throw new error_1.OpenAIError('ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.'); + } +}, _AbstractChatCompletionRunner_stringifyFunctionCallResult = function _AbstractChatCompletionRunner_stringifyFunctionCallResult(rawContent) { + return (typeof rawContent === 'string' ? rawContent + : rawContent === undefined ? 'undefined' + : JSON.stringify(rawContent)); +}; +//# sourceMappingURL=AbstractChatCompletionRunner.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a074ce86f221109490a35e47ab7a6e408dbcbc87 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbstractChatCompletionRunner.js","sourceRoot":"","sources":["../src/lib/AbstractChatCompletionRunner.ts"],"names":[],"mappings":";;;;;AAAA,uCAAuC;AAGvC,6CAAwE;AAaxE,kEAA0E;AAC1E,kDAAwD;AACxD,4DAK4B;AAE5B,MAAM,4B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AC,iBAAiB,CAAC;YACnD,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,CAAC;YAC3C,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,uGAgCe,MAAkC;IAChD,IAAI,MAAM,CAAC,CAAC,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,mBAAW,CACnB,8HAA8H,CAC/H,CAAC;IACJ,CAAC;AACH,CAAC,iIAmK4B,UAAmB;IAC9C,OAAO,CACL,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3C,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW;YACxC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAC7B,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e310105ed17af4b9bdadf4b965dae47f1eefd5fc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs @@ -0,0 +1,287 @@ +var _AbstractChatCompletionRunner_instances, _AbstractChatCompletionRunner_getFinalContent, _AbstractChatCompletionRunner_getFinalMessage, _AbstractChatCompletionRunner_getFinalFunctionToolCall, _AbstractChatCompletionRunner_getFinalFunctionToolCallResult, _AbstractChatCompletionRunner_calculateTotalUsage, _AbstractChatCompletionRunner_validateParams, _AbstractChatCompletionRunner_stringifyFunctionCallResult; +import { __classPrivateFieldGet } from "../internal/tslib.mjs"; +import { OpenAIError } from "../error.mjs"; +import { isAutoParsableTool, parseChatCompletion } from "../lib/parser.mjs"; +import { isAssistantMessage, isToolMessage } from "./chatCompletionUtils.mjs"; +import { EventStream } from "./EventStream.mjs"; +import { isRunnableFunctionWithParse, } from "./RunnableFunction.mjs"; +const DEFAULT_MAX_CHAT_COMPLETIONS = 10; +export class AbstractChatCompletionRunner extends EventStream { + constructor() { + super(...arguments); + _AbstractChatCompletionRunner_instances.add(this); + this._chatCompletions = []; + this.messages = []; + } + _addChatCompletion(chatCompletion) { + this._chatCompletions.push(chatCompletion); + this._emit('chatCompletion', chatCompletion); + const message = chatCompletion.choices[0]?.message; + if (message) + this._addMessage(message); + return chatCompletion; + } + _addMessage(message, emit = true) { + if (!('content' in message)) + message.content = null; + this.messages.push(message); + if (emit) { + this._emit('message', message); + if (isToolMessage(message) && message.content) { + // Note, this assumes that {role: 'tool', content: …} is always the result of a call of tool of type=function. + this._emit('functionToolCallResult', message.content); + } + else if (isAssistantMessage(message) && message.tool_calls) { + for (const tool_call of message.tool_calls) { + if (tool_call.type === 'function') { + this._emit('functionToolCall', tool_call.function); + } + } + } + } + } + /** + * @returns a promise that resolves with the final ChatCompletion, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletion. + */ + async finalChatCompletion() { + await this.done(); + const completion = this._chatCompletions[this._chatCompletions.length - 1]; + if (!completion) + throw new OpenAIError('stream ended without producing a ChatCompletion'); + return completion; + } + /** + * @returns a promise that resolves with the content of the final ChatCompletionMessage, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalContent() { + await this.done(); + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + } + /** + * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, + * or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalMessage() { + await this.done(); + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the content of the final FunctionCall, or rejects + * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. + */ + async finalFunctionToolCall() { + await this.done(); + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCall).call(this); + } + async finalFunctionToolCallResult() { + await this.done(); + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCallResult).call(this); + } + async totalUsage() { + await this.done(); + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); + } + allChatCompletions() { + return [...this._chatCompletions]; + } + _emitFinal() { + const completion = this._chatCompletions[this._chatCompletions.length - 1]; + if (completion) + this._emit('finalChatCompletion', completion); + const finalMessage = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + if (finalMessage) + this._emit('finalMessage', finalMessage); + const finalContent = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + if (finalContent) + this._emit('finalContent', finalContent); + const finalFunctionCall = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCall).call(this); + if (finalFunctionCall) + this._emit('finalFunctionToolCall', finalFunctionCall); + const finalFunctionCallResult = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionToolCallResult).call(this); + if (finalFunctionCallResult != null) + this._emit('finalFunctionToolCallResult', finalFunctionCallResult); + if (this._chatCompletions.some((c) => c.usage)) { + this._emit('totalUsage', __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); + } + } + async _createChatCompletion(client, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); + const chatCompletion = await client.chat.completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal }); + this._connected(); + return this._addChatCompletion(parseChatCompletion(chatCompletion, params)); + } + async _runChatCompletion(client, params, options) { + for (const message of params.messages) { + this._addMessage(message, false); + } + return await this._createChatCompletion(client, params, options); + } + async _runTools(client, params, options) { + const role = 'tool'; + const { tool_choice = 'auto', stream, ...restParams } = params; + const singleFunctionToCall = typeof tool_choice !== 'string' && tool_choice.type === 'function' && tool_choice?.function?.name; + const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; + // TODO(someday): clean this logic up + const inputTools = params.tools.map((tool) => { + if (isAutoParsableTool(tool)) { + if (!tool.$callback) { + throw new OpenAIError('Tool given to `.runTools()` that does not have an associated function'); + } + return { + type: 'function', + function: { + function: tool.$callback, + name: tool.function.name, + description: tool.function.description || '', + parameters: tool.function.parameters, + parse: tool.$parseRaw, + strict: true, + }, + }; + } + return tool; + }); + const functionsByName = {}; + for (const f of inputTools) { + if (f.type === 'function') { + functionsByName[f.function.name || f.function.function.name] = f.function; + } + } + const tools = 'tools' in params ? + inputTools.map((t) => t.type === 'function' ? + { + type: 'function', + function: { + name: t.function.name || t.function.function.name, + parameters: t.function.parameters, + description: t.function.description, + strict: t.function.strict, + }, + } + : t) + : undefined; + for (const message of params.messages) { + this._addMessage(message, false); + } + for (let i = 0; i < maxChatCompletions; ++i) { + const chatCompletion = await this._createChatCompletion(client, { + ...restParams, + tool_choice, + tools, + messages: [...this.messages], + }, options); + const message = chatCompletion.choices[0]?.message; + if (!message) { + throw new OpenAIError(`missing message in ChatCompletion response`); + } + if (!message.tool_calls?.length) { + return; + } + for (const tool_call of message.tool_calls) { + if (tool_call.type !== 'function') + continue; + const tool_call_id = tool_call.id; + const { name, arguments: args } = tool_call.function; + const fn = functionsByName[name]; + if (!fn) { + const content = `Invalid tool_call: ${JSON.stringify(name)}. Available options are: ${Object.keys(functionsByName) + .map((name) => JSON.stringify(name)) + .join(', ')}. Please try again`; + this._addMessage({ role, tool_call_id, content }); + continue; + } + else if (singleFunctionToCall && singleFunctionToCall !== name) { + const content = `Invalid tool_call: ${JSON.stringify(name)}. ${JSON.stringify(singleFunctionToCall)} requested. Please try again`; + this._addMessage({ role, tool_call_id, content }); + continue; + } + let parsed; + try { + parsed = isRunnableFunctionWithParse(fn) ? await fn.parse(args) : args; + } + catch (error) { + const content = error instanceof Error ? error.message : String(error); + this._addMessage({ role, tool_call_id, content }); + continue; + } + // @ts-expect-error it can't rule out `never` type. + const rawContent = await fn.function(parsed, this); + const content = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent); + this._addMessage({ role, tool_call_id, content }); + if (singleFunctionToCall) { + return; + } + } + } + return; + } +} +_AbstractChatCompletionRunner_instances = new WeakSet(), _AbstractChatCompletionRunner_getFinalContent = function _AbstractChatCompletionRunner_getFinalContent() { + return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; +}, _AbstractChatCompletionRunner_getFinalMessage = function _AbstractChatCompletionRunner_getFinalMessage() { + let i = this.messages.length; + while (i-- > 0) { + const message = this.messages[i]; + if (isAssistantMessage(message)) { + // TODO: support audio here + const ret = { + ...message, + content: message.content ?? null, + refusal: message.refusal ?? null, + }; + return ret; + } + } + throw new OpenAIError('stream ended without producing a ChatCompletionMessage with role=assistant'); +}, _AbstractChatCompletionRunner_getFinalFunctionToolCall = function _AbstractChatCompletionRunner_getFinalFunctionToolCall() { + for (let i = this.messages.length - 1; i >= 0; i--) { + const message = this.messages[i]; + if (isAssistantMessage(message) && message?.tool_calls?.length) { + return message.tool_calls.filter((x) => x.type === 'function').at(-1)?.function; + } + } + return; +}, _AbstractChatCompletionRunner_getFinalFunctionToolCallResult = function _AbstractChatCompletionRunner_getFinalFunctionToolCallResult() { + for (let i = this.messages.length - 1; i >= 0; i--) { + const message = this.messages[i]; + if (isToolMessage(message) && + message.content != null && + typeof message.content === 'string' && + this.messages.some((x) => x.role === 'assistant' && + x.tool_calls?.some((y) => y.type === 'function' && y.id === message.tool_call_id))) { + return message.content; + } + } + return; +}, _AbstractChatCompletionRunner_calculateTotalUsage = function _AbstractChatCompletionRunner_calculateTotalUsage() { + const total = { + completion_tokens: 0, + prompt_tokens: 0, + total_tokens: 0, + }; + for (const { usage } of this._chatCompletions) { + if (usage) { + total.completion_tokens += usage.completion_tokens; + total.prompt_tokens += usage.prompt_tokens; + total.total_tokens += usage.total_tokens; + } + } + return total; +}, _AbstractChatCompletionRunner_validateParams = function _AbstractChatCompletionRunner_validateParams(params) { + if (params.n != null && params.n > 1) { + throw new OpenAIError('ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.'); + } +}, _AbstractChatCompletionRunner_stringifyFunctionCallResult = function _AbstractChatCompletionRunner_stringifyFunctionCallResult(rawContent) { + return (typeof rawContent === 'string' ? rawContent + : rawContent === undefined ? 'undefined' + : JSON.stringify(rawContent)); +}; +//# sourceMappingURL=AbstractChatCompletionRunner.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..66b8b23d85734f90456cbdee65ca87fe9a8888af --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"AbstractChatCompletionRunner.mjs","sourceRoot":"","sources":["../src/lib/AbstractChatCompletionRunner.ts"],"names":[],"mappings":";;OAAO,EAAE,WAAW,EAAE;OAGf,EAAE,kBAA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AAI,KAAK,EAAE,CAAC;YACV,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,iBAAiB,CAAC;YACnD,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,CAAC;YAC3C,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,uGAgCe,MAAkC;IAChD,IAAI,MAAM,CAAC,CAAC,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,WAAW,CACnB,8HAA8H,CAC/H,CAAC;IACJ,CAAC;AACH,CAAC,iIAmK4B,UAAmB;IAC9C,OAAO,CACL,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3C,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW;YACxC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAC7B,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7b24134aade6fe3a77f20e031d654e05b779b4dc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts @@ -0,0 +1,60 @@ +import { Message, Text, ImageFile, TextDelta, MessageDelta } from "../resources/beta/threads/messages.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +import { Run, RunCreateParamsBase, Runs, RunSubmitToolOutputsParamsBase } from "../resources/beta/threads/runs/runs.mjs"; +import { type ReadableStream } from "../internal/shim-types.mjs"; +import { AssistantStreamEvent } from "../resources/beta/assistants.mjs"; +import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from "../resources/beta/threads/runs/steps.mjs"; +import { ThreadCreateAndRunParamsBase, Threads } from "../resources/beta/threads/threads.mjs"; +import { BaseEvents, EventStream } from "./EventStream.mjs"; +export interface AssistantStreamEvents extends BaseEvents { + run: (run: Run) => void; + messageCreated: (message: Message) => void; + messageDelta: (message: MessageDelta, snapshot: Message) => void; + messageDone: (message: Message) => void; + runStepCreated: (runStep: RunStep) => void; + runStepDelta: (delta: RunStepDelta, snapshot: Runs.RunStep) => void; + runStepDone: (runStep: Runs.RunStep, snapshot: Runs.RunStep) => void; + toolCallCreated: (toolCall: ToolCall) => void; + toolCallDelta: (delta: ToolCallDelta, snapshot: ToolCall) => void; + toolCallDone: (toolCall: ToolCall) => void; + textCreated: (content: Text) => void; + textDelta: (delta: TextDelta, snapshot: Text) => void; + textDone: (content: Text, snapshot: Message) => void; + imageFileDone: (content: ImageFile, snapshot: Message) => void; + event: (event: AssistantStreamEvent) => void; +} +export type ThreadCreateAndRunParamsBaseStream = Omit & { + stream?: true; +}; +export type RunCreateParamsBaseStream = Omit & { + stream?: true; +}; +export type RunSubmitToolOutputsParamsStream = Omit & { + stream?: true; +}; +export declare class AssistantStream extends EventStream implements AsyncIterable { + #private; + [Symbol.asyncIterator](): AsyncIterator; + static fromReadableStream(stream: ReadableStream): AssistantStream; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + toReadableStream(): ReadableStream; + static createToolAssistantStream(runId: string, runs: Runs, params: RunSubmitToolOutputsParamsStream, options: RequestOptions | undefined): AssistantStream; + protected _createToolAssistantStream(run: Runs, runId: string, params: RunSubmitToolOutputsParamsStream, options?: RequestOptions): Promise; + static createThreadAssistantStream(params: ThreadCreateAndRunParamsBaseStream, thread: Threads, options?: RequestOptions): AssistantStream; + static createAssistantStream(threadId: string, runs: Runs, params: RunCreateParamsBaseStream, options?: RequestOptions): AssistantStream; + currentEvent(): AssistantStreamEvent | undefined; + currentRun(): Run | undefined; + currentMessageSnapshot(): Message | undefined; + currentRunStepSnapshot(): Runs.RunStep | undefined; + finalRunSteps(): Promise; + finalMessages(): Promise; + finalRun(): Promise; + protected _createThreadAssistantStream(thread: Threads, params: ThreadCreateAndRunParamsBase, options?: RequestOptions): Promise; + protected _createAssistantStream(run: Runs, threadId: string, params: RunCreateParamsBase, options?: RequestOptions): Promise; + static accumulateDelta(acc: Record, delta: Record): Record; + protected _addRun(run: Run): Run; + protected _threadAssistantStream(params: ThreadCreateAndRunParamsBase, thread: Threads, options?: RequestOptions): Promise; + protected _runAssistantStream(threadId: string, runs: Runs, params: RunCreateParamsBase, options?: RequestOptions): Promise; + protected _runToolAssistantStream(runId: string, runs: Runs, params: RunSubmitToolOutputsParamsStream, options?: RequestOptions): Promise; +} +//# sourceMappingURL=AssistantStream.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6be0ef64d7e5fdfe44d04fd5856b664d20f4d2d3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"AssistantStream.d.mts","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":"OAAO,EAGL,OAAO,EAEP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,YAAY,EAEb;OACM,EAAE,cAAc,EAAE;OAClB,EACL,GAAG,EACH,mBAAmB,EAEnB,IAAI,EACJ,8BAA8B,EAE/B;OACM,EAAE,KAAK,cAAc,EAAE;OAGvB,EACL,oBAAoB,EAIrB;OACM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE;OAClD,EAAE,4BAA4B,EAAE,OAAO,EAAE;OACzC,EAAE,UAAU,EAAE,WAAW,EAAE;AAGlC,MAAM,WAAW,qBAAsB,SAA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AAC;CAGhB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a3cb24addb3ace929b929be30cc6ff2e6f5050f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts @@ -0,0 +1,60 @@ +import { Message, Text, ImageFile, TextDelta, MessageDelta } from "../resources/beta/threads/messages.js"; +import { RequestOptions } from "../internal/request-options.js"; +import { Run, RunCreateParamsBase, Runs, RunSubmitToolOutputsParamsBase } from "../resources/beta/threads/runs/runs.js"; +import { type ReadableStream } from "../internal/shim-types.js"; +import { AssistantStreamEvent } from "../resources/beta/assistants.js"; +import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from "../resources/beta/threads/runs/steps.js"; +import { ThreadCreateAndRunParamsBase, Threads } from "../resources/beta/threads/threads.js"; +import { BaseEvents, EventStream } from "./EventStream.js"; +export interface AssistantStreamEvents extends BaseEvents { + run: (run: Run) => void; + messageCreated: (message: Message) => void; + messageDelta: (message: MessageDelta, snapshot: Message) => void; + messageDone: (message: Message) => void; + runStepCreated: (runStep: RunStep) => void; + runStepDelta: (delta: RunStepDelta, snapshot: Runs.RunStep) => void; + runStepDone: (runStep: Runs.RunStep, snapshot: Runs.RunStep) => void; + toolCallCreated: (toolCall: ToolCall) => void; + toolCallDelta: (delta: ToolCallDelta, snapshot: ToolCall) => void; + toolCallDone: (toolCall: ToolCall) => void; + textCreated: (content: Text) => void; + textDelta: (delta: TextDelta, snapshot: Text) => void; + textDone: (content: Text, snapshot: Message) => void; + imageFileDone: (content: ImageFile, snapshot: Message) => void; + event: (event: AssistantStreamEvent) => void; +} +export type ThreadCreateAndRunParamsBaseStream = Omit & { + stream?: true; +}; +export type RunCreateParamsBaseStream = Omit & { + stream?: true; +}; +export type RunSubmitToolOutputsParamsStream = Omit & { + stream?: true; +}; +export declare class AssistantStream extends EventStream implements AsyncIterable { + #private; + [Symbol.asyncIterator](): AsyncIterator; + static fromReadableStream(stream: ReadableStream): AssistantStream; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + toReadableStream(): ReadableStream; + static createToolAssistantStream(runId: string, runs: Runs, params: RunSubmitToolOutputsParamsStream, options: RequestOptions | undefined): AssistantStream; + protected _createToolAssistantStream(run: Runs, runId: string, params: RunSubmitToolOutputsParamsStream, options?: RequestOptions): Promise; + static createThreadAssistantStream(params: ThreadCreateAndRunParamsBaseStream, thread: Threads, options?: RequestOptions): AssistantStream; + static createAssistantStream(threadId: string, runs: Runs, params: RunCreateParamsBaseStream, options?: RequestOptions): AssistantStream; + currentEvent(): AssistantStreamEvent | undefined; + currentRun(): Run | undefined; + currentMessageSnapshot(): Message | undefined; + currentRunStepSnapshot(): Runs.RunStep | undefined; + finalRunSteps(): Promise; + finalMessages(): Promise; + finalRun(): Promise; + protected _createThreadAssistantStream(thread: Threads, params: ThreadCreateAndRunParamsBase, options?: RequestOptions): Promise; + protected _createAssistantStream(run: Runs, threadId: string, params: RunCreateParamsBase, options?: RequestOptions): Promise; + static accumulateDelta(acc: Record, delta: Record): Record; + protected _addRun(run: Run): Run; + protected _threadAssistantStream(params: ThreadCreateAndRunParamsBase, thread: Threads, options?: RequestOptions): Promise; + protected _runAssistantStream(threadId: string, runs: Runs, params: RunCreateParamsBase, options?: RequestOptions): Promise; + protected _runToolAssistantStream(runId: string, runs: Runs, params: RunSubmitToolOutputsParamsStream, options?: RequestOptions): Promise; +} +//# sourceMappingURL=AssistantStream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7cb5f3477b219b5303910428cf21e6742da5c134 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AssistantStream.d.ts","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":"OAAO,EAGL,OAAO,EAEP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,YAAY,EAEb;OACM,EAAE,cAAc,EAAE;OAClB,EACL,GAAG,EACH,mBAAmB,EAEnB,IAAI,EACJ,8BAA8B,EAE/B;OACM,EAAE,KAAK,cAAc,EAAE;OAGvB,EACL,oBAAoB,EAIrB;OACM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE;OAClD,EAAE,4BAA4B,EAAE,OAAO,EAAE;OACzC,EAAE,UAAU,EAAE,WAAW,EAAE;AAGlC,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGxB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IACpE,WAAW,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IAErE,eAAe,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,E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,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA2FjG,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;cAIhB,sBAAsB,CACpC,MAAM,EAAE,4BAA4B,EACpC,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;cAIC,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;cAIC,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;CAGhB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js new file mode 100644 index 0000000000000000000000000000000000000000..6c1e0ccb9ecee69935c821619b22d9f200e085a0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js @@ -0,0 +1,553 @@ +"use strict"; +var _AssistantStream_instances, _a, _AssistantStream_events, _AssistantStream_runStepSnapshots, _AssistantStream_messageSnapshots, _AssistantStream_messageSnapshot, _AssistantStream_finalRun, _AssistantStream_currentContentIndex, _AssistantStream_currentContent, _AssistantStream_currentToolCallIndex, _AssistantStream_currentToolCall, _AssistantStream_currentEvent, _AssistantStream_currentRunSnapshot, _AssistantStream_currentRunStepSnapshot, _AssistantStream_addEvent, _AssistantStream_endRequest, _AssistantStream_handleMessage, _AssistantStream_handleRunStep, _AssistantStream_handleEvent, _AssistantStream_accumulateRunStep, _AssistantStream_accumulateMessage, _AssistantStream_accumulateContent, _AssistantStream_handleRun; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AssistantStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const streaming_1 = require("../streaming.js"); +const error_1 = require("../error.js"); +const EventStream_1 = require("./EventStream.js"); +const utils_1 = require("../internal/utils.js"); +class AssistantStream extends EventStream_1.EventStream { + constructor() { + super(...arguments); + _AssistantStream_instances.add(this); + //Track all events in a single list for reference + _AssistantStream_events.set(this, []); + //Used to accumulate deltas + //We are accumulating many types so the value here is not strict + _AssistantStream_runStepSnapshots.set(this, {}); + _AssistantStream_messageSnapshots.set(this, {}); + _AssistantStream_messageSnapshot.set(this, void 0); + _AssistantStream_finalRun.set(this, void 0); + _AssistantStream_currentContentIndex.set(this, void 0); + _AssistantStream_currentContent.set(this, void 0); + _AssistantStream_currentToolCallIndex.set(this, void 0); + _AssistantStream_currentToolCall.set(this, void 0); + //For current snapshot methods + _AssistantStream_currentEvent.set(this, void 0); + _AssistantStream_currentRunSnapshot.set(this, void 0); + _AssistantStream_currentRunStepSnapshot.set(this, void 0); + } + [(_AssistantStream_events = new WeakMap(), _AssistantStream_runStepSnapshots = new WeakMap(), _AssistantStream_messageSnapshots = new WeakMap(), _AssistantStream_messageSnapshot = new WeakMap(), _AssistantStream_finalRun = new WeakMap(), _AssistantStream_currentContentIndex = new WeakMap(), _AssistantStream_currentContent = new WeakMap(), _AssistantStream_currentToolCallIndex = new WeakMap(), _AssistantStream_currentToolCall = new WeakMap(), _AssistantStream_currentEvent = new WeakMap(), _AssistantStream_currentRunSnapshot = new WeakMap(), _AssistantStream_currentRunStepSnapshot = new WeakMap(), _AssistantStream_instances = new WeakSet(), Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + //Catch all for passing along all events + this.on('event', (event) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(event); + } + else { + pushQueue.push(event); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + static fromReadableStream(stream) { + const runner = new _a(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this._connected(); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addRun(tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } + static createToolAssistantStream(runId, runs, params, options) { + const runner = new _a(); + runner._run(() => runner._runToolAssistantStream(runId, runs, params, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + async _createToolAssistantStream(run, runId, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await run.submitToolOutputs(runId, body, { + ...options, + signal: this.controller.signal, + }); + this._connected(); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addRun(tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + static createThreadAssistantStream(params, thread, options) { + const runner = new _a(); + runner._run(() => runner._threadAssistantStream(params, thread, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + static createAssistantStream(threadId, runs, params, options) { + const runner = new _a(); + runner._run(() => runner._runAssistantStream(threadId, runs, params, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + currentEvent() { + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentEvent, "f"); + } + currentRun() { + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentRunSnapshot, "f"); + } + currentMessageSnapshot() { + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f"); + } + currentRunStepSnapshot() { + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentRunStepSnapshot, "f"); + } + async finalRunSteps() { + await this.done(); + return Object.values(tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")); + } + async finalMessages() { + await this.done(); + return Object.values(tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshots, "f")); + } + async finalRun() { + await this.done(); + if (!tslib_1.__classPrivateFieldGet(this, _AssistantStream_finalRun, "f")) + throw Error('Final run was not received.'); + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_finalRun, "f"); + } + async _createThreadAssistantStream(thread, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await thread.createAndRun(body, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addRun(tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + async _createAssistantStream(run, threadId, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await run.create(threadId, body, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addRun(tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + static accumulateDelta(acc, delta) { + for (const [key, deltaValue] of Object.entries(delta)) { + if (!acc.hasOwnProperty(key)) { + acc[key] = deltaValue; + continue; + } + let accValue = acc[key]; + if (accValue === null || accValue === undefined) { + acc[key] = deltaValue; + continue; + } + // We don't accumulate these special properties + if (key === 'index' || key === 'type') { + acc[key] = deltaValue; + continue; + } + // Type-specific accumulation logic + if (typeof accValue === 'string' && typeof deltaValue === 'string') { + accValue += deltaValue; + } + else if (typeof accValue === 'number' && typeof deltaValue === 'number') { + accValue += deltaValue; + } + else if ((0, utils_1.isObj)(accValue) && (0, utils_1.isObj)(deltaValue)) { + accValue = this.accumulateDelta(accValue, deltaValue); + } + else if (Array.isArray(accValue) && Array.isArray(deltaValue)) { + if (accValue.every((x) => typeof x === 'string' || typeof x === 'number')) { + accValue.push(...deltaValue); // Use spread syntax for efficient addition + continue; + } + for (const deltaEntry of deltaValue) { + if (!(0, utils_1.isObj)(deltaEntry)) { + throw new Error(`Expected array delta entry to be an object but got: ${deltaEntry}`); + } + const index = deltaEntry['index']; + if (index == null) { + console.error(deltaEntry); + throw new Error('Expected array delta entry to have an `index` property'); + } + if (typeof index !== 'number') { + throw new Error(`Expected array delta entry \`index\` property to be a number but got ${index}`); + } + const accEntry = accValue[index]; + if (accEntry == null) { + accValue.push(deltaEntry); + } + else { + accValue[index] = this.accumulateDelta(accEntry, deltaEntry); + } + } + continue; + } + else { + throw Error(`Unhandled record type: ${key}, deltaValue: ${deltaValue}, accValue: ${accValue}`); + } + acc[key] = accValue; + } + return acc; + } + _addRun(run) { + return run; + } + async _threadAssistantStream(params, thread, options) { + return await this._createThreadAssistantStream(thread, params, options); + } + async _runAssistantStream(threadId, runs, params, options) { + return await this._createAssistantStream(runs, threadId, params, options); + } + async _runToolAssistantStream(runId, runs, params, options) { + return await this._createToolAssistantStream(runs, runId, params, options); + } +} +exports.AssistantStream = AssistantStream; +_a = AssistantStream, _AssistantStream_addEvent = function _AssistantStream_addEvent(event) { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentEvent, event, "f"); + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); + switch (event.event) { + case 'thread.created': + //No action on this event. + break; + case 'thread.run.created': + case 'thread.run.queued': + case 'thread.run.in_progress': + case 'thread.run.requires_action': + case 'thread.run.completed': + case 'thread.run.incomplete': + case 'thread.run.failed': + case 'thread.run.cancelling': + case 'thread.run.cancelled': + case 'thread.run.expired': + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); + break; + case 'thread.run.step.created': + case 'thread.run.step.in_progress': + case 'thread.run.step.delta': + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); + break; + case 'thread.message.created': + case 'thread.message.in_progress': + case 'thread.message.delta': + case 'thread.message.completed': + case 'thread.message.incomplete': + tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); + break; + case 'error': + //This is included for completeness, but errors are processed in the SSE event processing so this should not occur + throw new Error('Encountered an error event in event processing - errors should be processed earlier'); + default: + assertNever(event); + } +}, _AssistantStream_endRequest = function _AssistantStream_endRequest() { + if (this.ended) { + throw new error_1.OpenAIError(`stream has ended, this shouldn't happen`); + } + if (!tslib_1.__classPrivateFieldGet(this, _AssistantStream_finalRun, "f")) + throw Error('Final run has not been received'); + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_finalRun, "f"); +}, _AssistantStream_handleMessage = function _AssistantStream_handleMessage(event) { + const [accumulatedMessage, newContent] = tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + tslib_1.__classPrivateFieldSet(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); + tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; + for (const content of newContent) { + const snapshotContent = accumulatedMessage.content[content.index]; + if (snapshotContent?.type == 'text') { + this._emit('textCreated', snapshotContent.text); + } + } + switch (event.event) { + case 'thread.message.created': + this._emit('messageCreated', event.data); + break; + case 'thread.message.in_progress': + break; + case 'thread.message.delta': + this._emit('messageDelta', event.data.delta, accumulatedMessage); + if (event.data.delta.content) { + for (const content of event.data.delta.content) { + //If it is text delta, emit a text delta event + if (content.type == 'text' && content.text) { + let textDelta = content.text; + let snapshot = accumulatedMessage.content[content.index]; + if (snapshot && snapshot.type == 'text') { + this._emit('textDelta', textDelta, snapshot.text); + } + else { + throw Error('The snapshot associated with this text delta is not text or missing'); + } + } + if (content.index != tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f")) { + //See if we have in progress content + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContent, "f")) { + switch (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContent, "f").type) { + case 'text': + this._emit('textDone', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContent, "f").text, tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + case 'image_file': + this._emit('imageFileDone', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContent, "f").image_file, tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + } + } + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentContentIndex, content.index, "f"); + } + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); + } + } + break; + case 'thread.message.completed': + case 'thread.message.incomplete': + //We emit the latest content we were working on on completion (including incomplete) + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f") !== undefined) { + const currentContent = event.data.content[tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f")]; + if (currentContent) { + switch (currentContent.type) { + case 'image_file': + this._emit('imageFileDone', currentContent.image_file, tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + case 'text': + this._emit('textDone', currentContent.text, tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + } + } + } + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")) { + this._emit('messageDone', event.data); + } + tslib_1.__classPrivateFieldSet(this, _AssistantStream_messageSnapshot, undefined, "f"); + } +}, _AssistantStream_handleRunStep = function _AssistantStream_handleRunStep(event) { + const accumulatedRunStep = tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); + switch (event.event) { + case 'thread.run.step.created': + this._emit('runStepCreated', event.data); + break; + case 'thread.run.step.delta': + const delta = event.data.delta; + if (delta.step_details && + delta.step_details.type == 'tool_calls' && + delta.step_details.tool_calls && + accumulatedRunStep.step_details.type == 'tool_calls') { + for (const toolCall of delta.step_details.tool_calls) { + if (toolCall.index == tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCallIndex, "f")) { + this._emit('toolCallDelta', toolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index]); + } + else { + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + } + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) + this._emit('toolCallCreated', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + } + } + } + this._emit('runStepDelta', event.data.delta, accumulatedRunStep); + break; + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentRunStepSnapshot, undefined, "f"); + const details = event.data.step_details; + if (details.type == 'tool_calls') { + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentToolCall, undefined, "f"); + } + } + this._emit('runStepDone', event.data, accumulatedRunStep); + break; + case 'thread.run.step.in_progress': + break; + } +}, _AssistantStream_handleEvent = function _AssistantStream_handleEvent(event) { + tslib_1.__classPrivateFieldGet(this, _AssistantStream_events, "f").push(event); + this._emit('event', event); +}, _AssistantStream_accumulateRunStep = function _AssistantStream_accumulateRunStep(event) { + switch (event.event) { + case 'thread.run.step.created': + tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + return event.data; + case 'thread.run.step.delta': + let snapshot = tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + if (!snapshot) { + throw Error('Received a RunStepDelta before creation of a snapshot'); + } + let data = event.data; + if (data.delta) { + const accumulated = _a.accumulateDelta(snapshot, data.delta); + tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; + } + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + case 'thread.run.step.in_progress': + tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + break; + } + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) + return tslib_1.__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + throw new Error('No snapshot available'); +}, _AssistantStream_accumulateMessage = function _AssistantStream_accumulateMessage(event, snapshot) { + let newContent = []; + switch (event.event) { + case 'thread.message.created': + //On creation the snapshot is just the initial message + return [event.data, newContent]; + case 'thread.message.delta': + if (!snapshot) { + throw Error('Received a delta with no existing snapshot (there should be one from message creation)'); + } + let data = event.data; + //If this delta does not have content, nothing to process + if (data.delta.content) { + for (const contentElement of data.delta.content) { + if (contentElement.index in snapshot.content) { + let currentContent = snapshot.content[contentElement.index]; + snapshot.content[contentElement.index] = tslib_1.__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); + } + else { + snapshot.content[contentElement.index] = contentElement; + // This is a new element + newContent.push(contentElement); + } + } + } + return [snapshot, newContent]; + case 'thread.message.in_progress': + case 'thread.message.completed': + case 'thread.message.incomplete': + //No changes on other thread events + if (snapshot) { + return [snapshot, newContent]; + } + else { + throw Error('Received thread message event with no existing snapshot'); + } + } + throw Error('Tried to accumulate a non-message event'); +}, _AssistantStream_accumulateContent = function _AssistantStream_accumulateContent(contentElement, currentContent) { + return _a.accumulateDelta(currentContent, contentElement); +}, _AssistantStream_handleRun = function _AssistantStream_handleRun(event) { + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentRunSnapshot, event.data, "f"); + switch (event.event) { + case 'thread.run.created': + break; + case 'thread.run.queued': + break; + case 'thread.run.in_progress': + break; + case 'thread.run.requires_action': + case 'thread.run.cancelled': + case 'thread.run.failed': + case 'thread.run.completed': + case 'thread.run.expired': + case 'thread.run.incomplete': + tslib_1.__classPrivateFieldSet(this, _AssistantStream_finalRun, event.data, "f"); + if (tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', tslib_1.__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + tslib_1.__classPrivateFieldSet(this, _AssistantStream_currentToolCall, undefined, "f"); + } + break; + case 'thread.run.cancelling': + break; + } +}; +function assertNever(_x) { } +//# sourceMappingURL=AssistantStream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4edaafaff7cc550b4ab7435c010241015dd596f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AssistantStream.js","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":";;;;;AAqBA,+CAAsC;AACtC,uCAA0D;AAS1D,kDAAwD;AACxD,gDAA0C;AAwC1C,MAAa,eACX,SAAQ,yBAAkC;IAD5C;;;QAIE,iDAAiD;QACjD,kCAAkC,EAAE,EAAC;QAErC,2BAA2B;QAC3B,gEAAgE;QAChE,4CAAoD,EAAE,EAAC;QACvD,4CAA+C,EAAE,EAAC;QAClD,mDAAsC;QACtC,4CAA2B;QAC3B,uDAAyC;QACzC,kDAA4C;QAC5C,wD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AI,MAAA,CAAC;IAEtC,QAAQ,KAAK,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,oBAAoB;YACvB,MAAM;QACR,KAAK,mBAAmB;YACtB,MAAM;QACR,KAAK,wBAAwB;YAC3B,MAAM;QACR,KAAK,4BAA4B,CAAC;QAClC,KAAK,sBAAsB,CAAC;QAC5B,KAAK,mBAAmB,CAAC;QACzB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,oBAAoB,CAAC;QAC1B,KAAK,uBAAuB;YAC1B,+BAAA,IAAI,6BAAa,KAAK,CAAC,IAAI,MAAA,CAAC;YAC5B,IAAI,+BAAA,IAAI,wCAAiB,EAAE,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,+BAAA,IAAI,wCAAiB,CAAC,CAAC;gBAClD,+BAAA,IAAI,oCAAoB,SAAS,MAAA,CAAC;YACpC,CAAC;YACD,MAAM;QACR,KAAK,uBAAuB;YAC1B,MAAM;IACV,CAAC;AACH,CAAC;AAiCH,SAAS,WAAW,CAAC,EAAS,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ad169403cf6c323cc83a753c82b12b213892ab9c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs @@ -0,0 +1,549 @@ +var _AssistantStream_instances, _a, _AssistantStream_events, _AssistantStream_runStepSnapshots, _AssistantStream_messageSnapshots, _AssistantStream_messageSnapshot, _AssistantStream_finalRun, _AssistantStream_currentContentIndex, _AssistantStream_currentContent, _AssistantStream_currentToolCallIndex, _AssistantStream_currentToolCall, _AssistantStream_currentEvent, _AssistantStream_currentRunSnapshot, _AssistantStream_currentRunStepSnapshot, _AssistantStream_addEvent, _AssistantStream_endRequest, _AssistantStream_handleMessage, _AssistantStream_handleRunStep, _AssistantStream_handleEvent, _AssistantStream_accumulateRunStep, _AssistantStream_accumulateMessage, _AssistantStream_accumulateContent, _AssistantStream_handleRun; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { Stream } from "../streaming.mjs"; +import { APIUserAbortError, OpenAIError } from "../error.mjs"; +import { EventStream } from "./EventStream.mjs"; +import { isObj } from "../internal/utils.mjs"; +export class AssistantStream extends EventStream { + constructor() { + super(...arguments); + _AssistantStream_instances.add(this); + //Track all events in a single list for reference + _AssistantStream_events.set(this, []); + //Used to accumulate deltas + //We are accumulating many types so the value here is not strict + _AssistantStream_runStepSnapshots.set(this, {}); + _AssistantStream_messageSnapshots.set(this, {}); + _AssistantStream_messageSnapshot.set(this, void 0); + _AssistantStream_finalRun.set(this, void 0); + _AssistantStream_currentContentIndex.set(this, void 0); + _AssistantStream_currentContent.set(this, void 0); + _AssistantStream_currentToolCallIndex.set(this, void 0); + _AssistantStream_currentToolCall.set(this, void 0); + //For current snapshot methods + _AssistantStream_currentEvent.set(this, void 0); + _AssistantStream_currentRunSnapshot.set(this, void 0); + _AssistantStream_currentRunStepSnapshot.set(this, void 0); + } + [(_AssistantStream_events = new WeakMap(), _AssistantStream_runStepSnapshots = new WeakMap(), _AssistantStream_messageSnapshots = new WeakMap(), _AssistantStream_messageSnapshot = new WeakMap(), _AssistantStream_finalRun = new WeakMap(), _AssistantStream_currentContentIndex = new WeakMap(), _AssistantStream_currentContent = new WeakMap(), _AssistantStream_currentToolCallIndex = new WeakMap(), _AssistantStream_currentToolCall = new WeakMap(), _AssistantStream_currentEvent = new WeakMap(), _AssistantStream_currentRunSnapshot = new WeakMap(), _AssistantStream_currentRunStepSnapshot = new WeakMap(), _AssistantStream_instances = new WeakSet(), Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + //Catch all for passing along all events + this.on('event', (event) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(event); + } + else { + pushQueue.push(event); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + static fromReadableStream(stream) { + const runner = new _a(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this._connected(); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addRun(__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + toReadableStream() { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } + static createToolAssistantStream(runId, runs, params, options) { + const runner = new _a(); + runner._run(() => runner._runToolAssistantStream(runId, runs, params, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + async _createToolAssistantStream(run, runId, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await run.submitToolOutputs(runId, body, { + ...options, + signal: this.controller.signal, + }); + this._connected(); + for await (const event of stream) { + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addRun(__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + static createThreadAssistantStream(params, thread, options) { + const runner = new _a(); + runner._run(() => runner._threadAssistantStream(params, thread, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + static createAssistantStream(threadId, runs, params, options) { + const runner = new _a(); + runner._run(() => runner._runAssistantStream(threadId, runs, params, { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' }, + })); + return runner; + } + currentEvent() { + return __classPrivateFieldGet(this, _AssistantStream_currentEvent, "f"); + } + currentRun() { + return __classPrivateFieldGet(this, _AssistantStream_currentRunSnapshot, "f"); + } + currentMessageSnapshot() { + return __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f"); + } + currentRunStepSnapshot() { + return __classPrivateFieldGet(this, _AssistantStream_currentRunStepSnapshot, "f"); + } + async finalRunSteps() { + await this.done(); + return Object.values(__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")); + } + async finalMessages() { + await this.done(); + return Object.values(__classPrivateFieldGet(this, _AssistantStream_messageSnapshots, "f")); + } + async finalRun() { + await this.done(); + if (!__classPrivateFieldGet(this, _AssistantStream_finalRun, "f")) + throw Error('Final run was not received.'); + return __classPrivateFieldGet(this, _AssistantStream_finalRun, "f"); + } + async _createThreadAssistantStream(thread, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await thread.createAndRun(body, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const event of stream) { + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addRun(__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + async _createAssistantStream(run, threadId, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + const body = { ...params, stream: true }; + const stream = await run.create(threadId, body, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const event of stream) { + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addRun(__classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + } + static accumulateDelta(acc, delta) { + for (const [key, deltaValue] of Object.entries(delta)) { + if (!acc.hasOwnProperty(key)) { + acc[key] = deltaValue; + continue; + } + let accValue = acc[key]; + if (accValue === null || accValue === undefined) { + acc[key] = deltaValue; + continue; + } + // We don't accumulate these special properties + if (key === 'index' || key === 'type') { + acc[key] = deltaValue; + continue; + } + // Type-specific accumulation logic + if (typeof accValue === 'string' && typeof deltaValue === 'string') { + accValue += deltaValue; + } + else if (typeof accValue === 'number' && typeof deltaValue === 'number') { + accValue += deltaValue; + } + else if (isObj(accValue) && isObj(deltaValue)) { + accValue = this.accumulateDelta(accValue, deltaValue); + } + else if (Array.isArray(accValue) && Array.isArray(deltaValue)) { + if (accValue.every((x) => typeof x === 'string' || typeof x === 'number')) { + accValue.push(...deltaValue); // Use spread syntax for efficient addition + continue; + } + for (const deltaEntry of deltaValue) { + if (!isObj(deltaEntry)) { + throw new Error(`Expected array delta entry to be an object but got: ${deltaEntry}`); + } + const index = deltaEntry['index']; + if (index == null) { + console.error(deltaEntry); + throw new Error('Expected array delta entry to have an `index` property'); + } + if (typeof index !== 'number') { + throw new Error(`Expected array delta entry \`index\` property to be a number but got ${index}`); + } + const accEntry = accValue[index]; + if (accEntry == null) { + accValue.push(deltaEntry); + } + else { + accValue[index] = this.accumulateDelta(accEntry, deltaEntry); + } + } + continue; + } + else { + throw Error(`Unhandled record type: ${key}, deltaValue: ${deltaValue}, accValue: ${accValue}`); + } + acc[key] = accValue; + } + return acc; + } + _addRun(run) { + return run; + } + async _threadAssistantStream(params, thread, options) { + return await this._createThreadAssistantStream(thread, params, options); + } + async _runAssistantStream(threadId, runs, params, options) { + return await this._createAssistantStream(runs, threadId, params, options); + } + async _runToolAssistantStream(runId, runs, params, options) { + return await this._createToolAssistantStream(runs, runId, params, options); + } +} +_a = AssistantStream, _AssistantStream_addEvent = function _AssistantStream_addEvent(event) { + if (this.ended) + return; + __classPrivateFieldSet(this, _AssistantStream_currentEvent, event, "f"); + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); + switch (event.event) { + case 'thread.created': + //No action on this event. + break; + case 'thread.run.created': + case 'thread.run.queued': + case 'thread.run.in_progress': + case 'thread.run.requires_action': + case 'thread.run.completed': + case 'thread.run.incomplete': + case 'thread.run.failed': + case 'thread.run.cancelling': + case 'thread.run.cancelled': + case 'thread.run.expired': + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); + break; + case 'thread.run.step.created': + case 'thread.run.step.in_progress': + case 'thread.run.step.delta': + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); + break; + case 'thread.message.created': + case 'thread.message.in_progress': + case 'thread.message.delta': + case 'thread.message.completed': + case 'thread.message.incomplete': + __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); + break; + case 'error': + //This is included for completeness, but errors are processed in the SSE event processing so this should not occur + throw new Error('Encountered an error event in event processing - errors should be processed earlier'); + default: + assertNever(event); + } +}, _AssistantStream_endRequest = function _AssistantStream_endRequest() { + if (this.ended) { + throw new OpenAIError(`stream has ended, this shouldn't happen`); + } + if (!__classPrivateFieldGet(this, _AssistantStream_finalRun, "f")) + throw Error('Final run has not been received'); + return __classPrivateFieldGet(this, _AssistantStream_finalRun, "f"); +}, _AssistantStream_handleMessage = function _AssistantStream_handleMessage(event) { + const [accumulatedMessage, newContent] = __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + __classPrivateFieldSet(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); + __classPrivateFieldGet(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; + for (const content of newContent) { + const snapshotContent = accumulatedMessage.content[content.index]; + if (snapshotContent?.type == 'text') { + this._emit('textCreated', snapshotContent.text); + } + } + switch (event.event) { + case 'thread.message.created': + this._emit('messageCreated', event.data); + break; + case 'thread.message.in_progress': + break; + case 'thread.message.delta': + this._emit('messageDelta', event.data.delta, accumulatedMessage); + if (event.data.delta.content) { + for (const content of event.data.delta.content) { + //If it is text delta, emit a text delta event + if (content.type == 'text' && content.text) { + let textDelta = content.text; + let snapshot = accumulatedMessage.content[content.index]; + if (snapshot && snapshot.type == 'text') { + this._emit('textDelta', textDelta, snapshot.text); + } + else { + throw Error('The snapshot associated with this text delta is not text or missing'); + } + } + if (content.index != __classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f")) { + //See if we have in progress content + if (__classPrivateFieldGet(this, _AssistantStream_currentContent, "f")) { + switch (__classPrivateFieldGet(this, _AssistantStream_currentContent, "f").type) { + case 'text': + this._emit('textDone', __classPrivateFieldGet(this, _AssistantStream_currentContent, "f").text, __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + case 'image_file': + this._emit('imageFileDone', __classPrivateFieldGet(this, _AssistantStream_currentContent, "f").image_file, __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + } + } + __classPrivateFieldSet(this, _AssistantStream_currentContentIndex, content.index, "f"); + } + __classPrivateFieldSet(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); + } + } + break; + case 'thread.message.completed': + case 'thread.message.incomplete': + //We emit the latest content we were working on on completion (including incomplete) + if (__classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f") !== undefined) { + const currentContent = event.data.content[__classPrivateFieldGet(this, _AssistantStream_currentContentIndex, "f")]; + if (currentContent) { + switch (currentContent.type) { + case 'image_file': + this._emit('imageFileDone', currentContent.image_file, __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + case 'text': + this._emit('textDone', currentContent.text, __classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")); + break; + } + } + } + if (__classPrivateFieldGet(this, _AssistantStream_messageSnapshot, "f")) { + this._emit('messageDone', event.data); + } + __classPrivateFieldSet(this, _AssistantStream_messageSnapshot, undefined, "f"); + } +}, _AssistantStream_handleRunStep = function _AssistantStream_handleRunStep(event) { + const accumulatedRunStep = __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); + __classPrivateFieldSet(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); + switch (event.event) { + case 'thread.run.step.created': + this._emit('runStepCreated', event.data); + break; + case 'thread.run.step.delta': + const delta = event.data.delta; + if (delta.step_details && + delta.step_details.type == 'tool_calls' && + delta.step_details.tool_calls && + accumulatedRunStep.step_details.type == 'tool_calls') { + for (const toolCall of delta.step_details.tool_calls) { + if (toolCall.index == __classPrivateFieldGet(this, _AssistantStream_currentToolCallIndex, "f")) { + this._emit('toolCallDelta', toolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index]); + } + else { + if (__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', __classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + } + __classPrivateFieldSet(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); + __classPrivateFieldSet(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); + if (__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) + this._emit('toolCallCreated', __classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + } + } + } + this._emit('runStepDelta', event.data.delta, accumulatedRunStep); + break; + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + __classPrivateFieldSet(this, _AssistantStream_currentRunStepSnapshot, undefined, "f"); + const details = event.data.step_details; + if (details.type == 'tool_calls') { + if (__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', __classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet(this, _AssistantStream_currentToolCall, undefined, "f"); + } + } + this._emit('runStepDone', event.data, accumulatedRunStep); + break; + case 'thread.run.step.in_progress': + break; + } +}, _AssistantStream_handleEvent = function _AssistantStream_handleEvent(event) { + __classPrivateFieldGet(this, _AssistantStream_events, "f").push(event); + this._emit('event', event); +}, _AssistantStream_accumulateRunStep = function _AssistantStream_accumulateRunStep(event) { + switch (event.event) { + case 'thread.run.step.created': + __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + return event.data; + case 'thread.run.step.delta': + let snapshot = __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + if (!snapshot) { + throw Error('Received a RunStepDelta before creation of a snapshot'); + } + let data = event.data; + if (data.delta) { + const accumulated = _a.accumulateDelta(snapshot, data.delta); + __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; + } + return __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + case 'thread.run.step.completed': + case 'thread.run.step.failed': + case 'thread.run.step.cancelled': + case 'thread.run.step.expired': + case 'thread.run.step.in_progress': + __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + break; + } + if (__classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) + return __classPrivateFieldGet(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + throw new Error('No snapshot available'); +}, _AssistantStream_accumulateMessage = function _AssistantStream_accumulateMessage(event, snapshot) { + let newContent = []; + switch (event.event) { + case 'thread.message.created': + //On creation the snapshot is just the initial message + return [event.data, newContent]; + case 'thread.message.delta': + if (!snapshot) { + throw Error('Received a delta with no existing snapshot (there should be one from message creation)'); + } + let data = event.data; + //If this delta does not have content, nothing to process + if (data.delta.content) { + for (const contentElement of data.delta.content) { + if (contentElement.index in snapshot.content) { + let currentContent = snapshot.content[contentElement.index]; + snapshot.content[contentElement.index] = __classPrivateFieldGet(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); + } + else { + snapshot.content[contentElement.index] = contentElement; + // This is a new element + newContent.push(contentElement); + } + } + } + return [snapshot, newContent]; + case 'thread.message.in_progress': + case 'thread.message.completed': + case 'thread.message.incomplete': + //No changes on other thread events + if (snapshot) { + return [snapshot, newContent]; + } + else { + throw Error('Received thread message event with no existing snapshot'); + } + } + throw Error('Tried to accumulate a non-message event'); +}, _AssistantStream_accumulateContent = function _AssistantStream_accumulateContent(contentElement, currentContent) { + return _a.accumulateDelta(currentContent, contentElement); +}, _AssistantStream_handleRun = function _AssistantStream_handleRun(event) { + __classPrivateFieldSet(this, _AssistantStream_currentRunSnapshot, event.data, "f"); + switch (event.event) { + case 'thread.run.created': + break; + case 'thread.run.queued': + break; + case 'thread.run.in_progress': + break; + case 'thread.run.requires_action': + case 'thread.run.cancelled': + case 'thread.run.failed': + case 'thread.run.completed': + case 'thread.run.expired': + case 'thread.run.incomplete': + __classPrivateFieldSet(this, _AssistantStream_finalRun, event.data, "f"); + if (__classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")) { + this._emit('toolCallDone', __classPrivateFieldGet(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet(this, _AssistantStream_currentToolCall, undefined, "f"); + } + break; + case 'thread.run.cancelling': + break; + } +}; +function assertNever(_x) { } +//# sourceMappingURL=AssistantStream.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f37318f4cee0033f83cb00d02bfddae382641f3b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/AssistantStream.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"AssistantStream.mjs","sourceRoot":"","sources":["../src/lib/AssistantStream.ts"],"names":[],"mappings":";;OAqBO,EAAE,MAAM,EAAE;OACV,EAAE,iBAAiB,EAAE,WAAW,EAAE;OASlC,EAAc,WAAW,EAAE;OAC3B,EAAE,KAAK,EAAE;AAwChB,MAAM,OAAO,eACX,SAAQ,WAAkC;IAD5C;;;QAIE,iDAAiD;QACjD,kCAAkC,EAAE,EAAC;QAErC,2BAA2B;QAC3B,gEAAgE;QAChE,4CAAoD,EAAE,EAAC;QACvD,4CAA+C,EAAE,EAAC;QAClD,mDAAsC;QACtC,4CAA2B;QAC3B,uDAAyC;QACzC,kDAA4C;QAC5C,wDAA0C;QAC1C,mDAAuC;QAEvC,8BAA8B;QAC9B,gDAAgD;QAChD,sDAAqC;QACrC,0DAAkD;IA0qBpD,CAAC;IAxqBC,uoBAAC,MAAM,CAAC,aAAa,EAAC;QACpB,MAAM,SAAS,GAA2B,EAAE,CAAC;QAC7C,MAAM,SAAS,GAGT,EAAE,CAAC;QACT,IAAI,IAAI,GAAG,KAAK,CAAC;QAEjB,wCAAwC;QACxC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC;YACjC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;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uBAAA,IAAI,oCAAoB,SAAS,MAAA,CAAC;YACpC,CAAC;YACD,MAAM;QACR,KAAK,uBAAuB;YAC1B,MAAM;IACV,CAAC;AACH,CAAC;AAiCH,SAAS,WAAW,CAAC,EAAS,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5e395aac199bb3eaf1cf49e623dfd8d536221135 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts @@ -0,0 +1,16 @@ +import { type ChatCompletionMessageParam, type ChatCompletionCreateParamsNonStreaming } from "../resources/chat/completions.mjs"; +import { type BaseFunctionsArgs, RunnableTools } from "./RunnableFunction.mjs"; +import { AbstractChatCompletionRunner, AbstractChatCompletionRunnerEvents, RunnerOptions } from "./AbstractChatCompletionRunner.mjs"; +import OpenAI from "../index.mjs"; +import { AutoParseableTool } from "../lib/parser.mjs"; +export interface ChatCompletionRunnerEvents extends AbstractChatCompletionRunnerEvents { + content: (content: string) => void; +} +export type ChatCompletionToolRunnerParams = Omit & { + tools: RunnableTools | AutoParseableTool[]; +}; +export declare class ChatCompletionRunner extends AbstractChatCompletionRunner { + static runTools(client: OpenAI, params: ChatCompletionToolRunnerParams, options?: RunnerOptions): ChatCompletionRunner; + _addMessage(this: ChatCompletionRunner, message: ChatCompletionMessageParam, emit?: boolean): void; +} +//# sourceMappingURL=ChatCompletionRunner.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..80d7e5d45babb56966a546576aba724607f100e4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionRunner.d.mts","sourceRoot":"","sources":["../src/lib/ChatCompletionRunner.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,sCAAsC,EAC5C;OACM,EAAE,KAAK,iBAAiB,EAAE,aAAa,EAAE;OACzC,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,aAAa,EACd;OAEM,MAAM;OACN,EAAE,iBAAiB,EAAE;AAE5B,MAAM,WAAW,0BAA2B,SAAQ,kCAAkC;IACpF,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,CAAC,aAAa,SAAS,iBAAiB,IAAI,IAAI,CACxF,sCAAsC,EACtC,OAAO,CACR,GAAG;IACF,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;CACtE,CAAC;AAEF,qBAAa,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAE,SAAQ,4BAA4B,CACpF,0BAA0B,EAC1B,OAAO,CACR;IACC,MAAM,CAAC,QAAQ,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,8BAA8B,CAAC,GAAG,EAAE,CAAC,EAC7C,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,OAAO,CAAC;IAUvB,WAAW,CAClB,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,0BAA0B,EACnC,IAAI,GAAE,OAAc;CAOvB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea90a5769b56c415cb9edfcd5f84d36fe803537b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts @@ -0,0 +1,16 @@ +import { type ChatCompletionMessageParam, type ChatCompletionCreateParamsNonStreaming } from "../resources/chat/completions.js"; +import { type BaseFunctionsArgs, RunnableTools } from "./RunnableFunction.js"; +import { AbstractChatCompletionRunner, AbstractChatCompletionRunnerEvents, RunnerOptions } from "./AbstractChatCompletionRunner.js"; +import OpenAI from "../index.js"; +import { AutoParseableTool } from "../lib/parser.js"; +export interface ChatCompletionRunnerEvents extends AbstractChatCompletionRunnerEvents { + content: (content: string) => void; +} +export type ChatCompletionToolRunnerParams = Omit & { + tools: RunnableTools | AutoParseableTool[]; +}; +export declare class ChatCompletionRunner extends AbstractChatCompletionRunner { + static runTools(client: OpenAI, params: ChatCompletionToolRunnerParams, options?: RunnerOptions): ChatCompletionRunner; + _addMessage(this: ChatCompletionRunner, message: ChatCompletionMessageParam, emit?: boolean): void; +} +//# sourceMappingURL=ChatCompletionRunner.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9cda00dfbdc244cd10479be7c7a4b1740e777bd4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionRunner.d.ts","sourceRoot":"","sources":["../src/lib/ChatCompletionRunner.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,sCAAsC,EAC5C;OACM,EAAE,KAAK,iBAAiB,EAAE,aAAa,EAAE;OACzC,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,aAAa,EACd;OAEM,MAAM;OACN,EAAE,iBAAiB,EAAE;AAE5B,MAAM,WAAW,0BAA2B,SAAQ,kCAAkC;IACpF,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,CAAC,aAAa,SAAS,iBAAiB,IAAI,IAAI,CACxF,sCAAsC,EACtC,OAAO,CACR,GAAG;IACF,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;CACtE,CAAC;AAEF,qBAAa,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAE,SAAQ,4BAA4B,CACpF,0BAA0B,EAC1B,OAAO,CACR;IACC,MAAM,CAAC,QAAQ,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,8BAA8B,CAAC,GAAG,EAAE,CAAC,EAC7C,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,OAAO,CAAC;IAUvB,WAAW,CAClB,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,0BAA0B,EACnC,IAAI,GAAE,OAAc;CAOvB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js new file mode 100644 index 0000000000000000000000000000000000000000..f0eb2f7ddf8b351c06090f067ec0701bd4dd3268 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionRunner = void 0; +const AbstractChatCompletionRunner_1 = require("./AbstractChatCompletionRunner.js"); +const chatCompletionUtils_1 = require("./chatCompletionUtils.js"); +class ChatCompletionRunner extends AbstractChatCompletionRunner_1.AbstractChatCompletionRunner { + static runTools(client, params, options) { + const runner = new ChatCompletionRunner(); + const opts = { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runTools' }, + }; + runner._run(() => runner._runTools(client, params, opts)); + return runner; + } + _addMessage(message, emit = true) { + super._addMessage(message, emit); + if ((0, chatCompletionUtils_1.isAssistantMessage)(message) && message.content) { + this._emit('content', message.content); + } + } +} +exports.ChatCompletionRunner = ChatCompletionRunner; +//# sourceMappingURL=ChatCompletionRunner.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js.map new file mode 100644 index 0000000000000000000000000000000000000000..62d18f0256de045843d6bd053800bf32f67ddc24 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionRunner.js","sourceRoot":"","sources":["../src/lib/ChatCompletionRunner.ts"],"names":[],"mappings":";;;AAKA,oFAIwC;AACxC,kEAA2D;AAe3D,MAAa,oBAAqC,SAAQ,2DAGzD;IACC,MAAM,CAAC,QAAQ,CACb,MAAc,EACd,MAA6C,EAC7C,OAAuB;QAEvB,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAW,CAAC;QACnD,MAAM,IAAI,GAAG;YACX,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE;SAC1E,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAChB,CAAC;IAEQ,WAAW,CAElB,OAAmC,EACnC,OAAgB,IAAI;QAEpB,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,IAAI,IAAA,wCAAkB,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,OAAiB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AA5BD,oDA4BC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs new file mode 100644 index 0000000000000000000000000000000000000000..029eec57487c4272cc8af8cc2c9dc4f7606b8686 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs @@ -0,0 +1,20 @@ +import { AbstractChatCompletionRunner, } from "./AbstractChatCompletionRunner.mjs"; +import { isAssistantMessage } from "./chatCompletionUtils.mjs"; +export class ChatCompletionRunner extends AbstractChatCompletionRunner { + static runTools(client, params, options) { + const runner = new ChatCompletionRunner(); + const opts = { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runTools' }, + }; + runner._run(() => runner._runTools(client, params, opts)); + return runner; + } + _addMessage(message, emit = true) { + super._addMessage(message, emit); + if (isAssistantMessage(message) && message.content) { + this._emit('content', message.content); + } + } +} +//# sourceMappingURL=ChatCompletionRunner.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a8adc496b30ef79b94a717113ed54058daba9125 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionRunner.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionRunner.mjs","sourceRoot":"","sources":["../src/lib/ChatCompletionRunner.ts"],"names":[],"mappings":"OAKO,EACL,4BAA4B,GAG7B;OACM,EAAE,kBAAkB,EAAE;AAe7B,MAAM,OAAO,oBAAqC,SAAQ,4BAGzD;IACC,MAAM,CAAC,QAAQ,CACb,MAAc,EACd,MAA6C,EAC7C,OAAuB;QAEvB,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAW,CAAC;QACnD,MAAM,IAAI,GAAG;YACX,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE;SAC1E,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAChB,CAAC;IAEQ,WAAW,CAElB,OAAmC,EACnC,OAAgB,IAAI;QAEpB,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,IAAI,kBAAkB,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,OAAiB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..89d2529ee450e2097505cbbae2f41ef503ca87b0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts @@ -0,0 +1,208 @@ +import OpenAI from "../index.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +import { type ReadableStream } from "../internal/shim-types.mjs"; +import { ParsedChatCompletion } from "../resources/chat/completions.mjs"; +import { ChatCompletionTokenLogprob, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionCreateParamsBase, type ChatCompletionRole } from "../resources/chat/completions/completions.mjs"; +import { AbstractChatCompletionRunner, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.mjs"; +export interface ContentDeltaEvent { + delta: string; + snapshot: string; + parsed: unknown | null; +} +export interface ContentDoneEvent { + content: string; + parsed: ParsedT | null; +} +export interface RefusalDeltaEvent { + delta: string; + snapshot: string; +} +export interface RefusalDoneEvent { + refusal: string; +} +export interface FunctionToolCallArgumentsDeltaEvent { + name: string; + index: number; + arguments: string; + parsed_arguments: unknown; + arguments_delta: string; +} +export interface FunctionToolCallArgumentsDoneEvent { + name: string; + index: number; + arguments: string; + parsed_arguments: unknown; +} +export interface LogProbsContentDeltaEvent { + content: Array; + snapshot: Array; +} +export interface LogProbsContentDoneEvent { + content: Array; +} +export interface LogProbsRefusalDeltaEvent { + refusal: Array; + snapshot: Array; +} +export interface LogProbsRefusalDoneEvent { + refusal: Array; +} +export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { + content: (contentDelta: string, contentSnapshot: string) => void; + chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; + 'content.delta': (props: ContentDeltaEvent) => void; + 'content.done': (props: ContentDoneEvent) => void; + 'refusal.delta': (props: RefusalDeltaEvent) => void; + 'refusal.done': (props: RefusalDoneEvent) => void; + 'tool_calls.function.arguments.delta': (props: FunctionToolCallArgumentsDeltaEvent) => void; + 'tool_calls.function.arguments.done': (props: FunctionToolCallArgumentsDoneEvent) => void; + 'logprobs.content.delta': (props: LogProbsContentDeltaEvent) => void; + 'logprobs.content.done': (props: LogProbsContentDoneEvent) => void; + 'logprobs.refusal.delta': (props: LogProbsRefusalDeltaEvent) => void; + 'logprobs.refusal.done': (props: LogProbsRefusalDoneEvent) => void; +} +export type ChatCompletionStreamParams = Omit & { + stream?: true; +}; +export declare class ChatCompletionStream extends AbstractChatCompletionRunner, ParsedT> implements AsyncIterable { + #private; + constructor(params: ChatCompletionCreateParams | null); + get currentChatCompletionSnapshot(): ChatCompletionSnapshot | undefined; + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream: ReadableStream): ChatCompletionStream; + static createChatCompletion(client: OpenAI, params: ChatCompletionStreamParams, options?: RequestOptions): ChatCompletionStream; + protected _createChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise>; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](this: ChatCompletionStream): AsyncIterator; + toReadableStream(): ReadableStream; +} +/** + * Represents a streamed chunk of a chat completion response returned by model, + * based on the provided input. + */ +export interface ChatCompletionSnapshot { + /** + * A unique identifier for the chat completion. + */ + id: string; + /** + * A list of chat completion choices. Can be more than one if `n` is greater + * than 1. + */ + choices: Array; + /** + * The Unix timestamp (in seconds) of when the chat completion was created. + */ + created: number; + /** + * The model to generate the completion. + */ + model: string; + /** + * This fingerprint represents the backend configuration that the model runs with. + * + * Can be used in conjunction with the `seed` request parameter to understand when + * backend changes have been made that might impact determinism. + */ + system_fingerprint?: string; +} +export declare namespace ChatCompletionSnapshot { + interface Choice { + /** + * A chat completion delta generated by streamed model responses. + */ + message: Choice.Message; + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, `content_filter` if + * content was omitted due to a flag from our content filters, or `function_call` + * if the model called a function. + */ + finish_reason: ChatCompletion.Choice['finish_reason'] | null; + /** + * Log probability information for the choice. + */ + logprobs: ChatCompletion.Choice.Logprobs | null; + /** + * The index of the choice in the list of choices. + */ + index: number; + } + namespace Choice { + /** + * A chat completion delta generated by streamed model responses. + */ + interface Message { + /** + * The contents of the chunk message. + */ + content?: string | null; + refusal?: string | null; + parsed?: unknown | null; + /** + * The name and arguments of a function that should be called, as generated by the + * model. + */ + function_call?: Message.FunctionCall; + tool_calls?: Array; + /** + * The role of the author of this message. + */ + role?: ChatCompletionRole; + } + namespace Message { + interface ToolCall { + /** + * The ID of the tool call. + */ + id: string; + function: ToolCall.Function; + /** + * The type of the tool. + */ + type: 'function'; + } + namespace ToolCall { + interface Function { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments: string; + parsed_arguments?: unknown; + /** + * The name of the function to call. + */ + name: string; + } + } + /** + * The name and arguments of a function that should be called, as generated by the + * model. + */ + interface FunctionCall { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments?: string; + /** + * The name of the function to call. + */ + name?: string; + } + } + } +} +//# sourceMappingURL=ChatCompletionStream.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..a2aa15206b8083efeacdcaa5cf00f85fd6b8e883 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStream.d.mts","sourceRoot":"","sources":["../src/lib/ChatCompletionStream.ts"],"names":[],"mappings":"OAOO,MAAM;OACN,EAAE,cAAc,EAAE;OAClB,EAAE,KAAK,cAAc,EAAE;OAUvB,EAA8B,oBAAoB,EAAE;OACpD,EACL,0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lib/ChatCompletionStream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5036e6f31f698865b3054d104eda28dff4796d9b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.ts @@ -0,0 +1,208 @@ +import OpenAI from "../index.js"; +import { RequestOptions } from "../internal/request-options.js"; +import { type ReadableStream } from "../internal/shim-types.js"; +import { ParsedChatCompletion } from "../resources/chat/completions.js"; +import { ChatCompletionTokenLogprob, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionCreateParamsBase, type ChatCompletionRole } from "../resources/chat/completions/completions.js"; +import { AbstractChatCompletionRunner, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.js"; +export interface ContentDeltaEvent { + delta: string; + snapshot: string; + parsed: unknown | null; +} +export interface ContentDoneEvent { + content: string; + parsed: ParsedT | null; +} +export interface RefusalDeltaEvent { + delta: string; + snapshot: string; +} +export interface RefusalDoneEvent { + refusal: string; +} +export interface FunctionToolCallArgumentsDeltaEvent { + name: string; + index: number; + arguments: string; + parsed_arguments: unknown; + arguments_delta: string; +} +export interface FunctionToolCallArgumentsDoneEvent { + name: string; + index: number; + arguments: string; + parsed_arguments: unknown; +} +export interface LogProbsContentDeltaEvent { + content: Array; + snapshot: Array; +} +export interface LogProbsContentDoneEvent { + content: Array; +} +export interface LogProbsRefusalDeltaEvent { + refusal: Array; + snapshot: Array; +} +export interface LogProbsRefusalDoneEvent { + refusal: Array; +} +export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { + content: (contentDelta: string, contentSnapshot: string) => void; + chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; + 'content.delta': (props: ContentDeltaEvent) => void; + 'content.done': (props: ContentDoneEvent) => void; + 'refusal.delta': (props: RefusalDeltaEvent) => void; + 'refusal.done': (props: RefusalDoneEvent) => void; + 'tool_calls.function.arguments.delta': (props: FunctionToolCallArgumentsDeltaEvent) => void; + 'tool_calls.function.arguments.done': (props: FunctionToolCallArgumentsDoneEvent) => void; + 'logprobs.content.delta': (props: LogProbsContentDeltaEvent) => void; + 'logprobs.content.done': (props: LogProbsContentDoneEvent) => void; + 'logprobs.refusal.delta': (props: LogProbsRefusalDeltaEvent) => void; + 'logprobs.refusal.done': (props: LogProbsRefusalDoneEvent) => void; +} +export type ChatCompletionStreamParams = Omit & { + stream?: true; +}; +export declare class ChatCompletionStream extends AbstractChatCompletionRunner, ParsedT> implements AsyncIterable { + #private; + constructor(params: ChatCompletionCreateParams | null); + get currentChatCompletionSnapshot(): ChatCompletionSnapshot | undefined; + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream: ReadableStream): ChatCompletionStream; + static createChatCompletion(client: OpenAI, params: ChatCompletionStreamParams, options?: RequestOptions): ChatCompletionStream; + protected _createChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise>; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](this: ChatCompletionStream): AsyncIterator; + toReadableStream(): ReadableStream; +} +/** + * Represents a streamed chunk of a chat completion response returned by model, + * based on the provided input. + */ +export interface ChatCompletionSnapshot { + /** + * A unique identifier for the chat completion. + */ + id: string; + /** + * A list of chat completion choices. Can be more than one if `n` is greater + * than 1. + */ + choices: Array; + /** + * The Unix timestamp (in seconds) of when the chat completion was created. + */ + created: number; + /** + * The model to generate the completion. + */ + model: string; + /** + * This fingerprint represents the backend configuration that the model runs with. + * + * Can be used in conjunction with the `seed` request parameter to understand when + * backend changes have been made that might impact determinism. + */ + system_fingerprint?: string; +} +export declare namespace ChatCompletionSnapshot { + interface Choice { + /** + * A chat completion delta generated by streamed model responses. + */ + message: Choice.Message; + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, `content_filter` if + * content was omitted due to a flag from our content filters, or `function_call` + * if the model called a function. + */ + finish_reason: ChatCompletion.Choice['finish_reason'] | null; + /** + * Log probability information for the choice. + */ + logprobs: ChatCompletion.Choice.Logprobs | null; + /** + * The index of the choice in the list of choices. + */ + index: number; + } + namespace Choice { + /** + * A chat completion delta generated by streamed model responses. + */ + interface Message { + /** + * The contents of the chunk message. + */ + content?: string | null; + refusal?: string | null; + parsed?: unknown | null; + /** + * The name and arguments of a function that should be called, as generated by the + * model. + */ + function_call?: Message.FunctionCall; + tool_calls?: Array; + /** + * The role of the author of this message. + */ + role?: ChatCompletionRole; + } + namespace Message { + interface ToolCall { + /** + * The ID of the tool call. + */ + id: string; + function: ToolCall.Function; + /** + * The type of the tool. + */ + type: 'function'; + } + namespace ToolCall { + interface Function { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments: string; + parsed_arguments?: unknown; + /** + * The name of the function to call. + */ + name: string; + } + } + /** + * The name and arguments of a function that should be called, as generated by the + * model. + */ + interface FunctionCall { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments?: string; + /** + * The name of the function to call. + */ + name?: string; + } + } + } +} +//# sourceMappingURL=ChatCompletionStream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0ab9ef8a584fb417209d398cea4bac3a9cc3bbdd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStream.d.ts","sourceRoot":"","sources":["../src/lib/ChatCompletionStream.ts"],"names":[],"mappings":"OAOO,MAAM;OACN,EAAE,cAAc,EAAE;OAClB,EAAE,KAAK,cAAc,EAAE;OAUvB,EAA8B,oBAAoB,EAAE;OACpD,EACL,0BAA0B,EAC1B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EAEnC,KAAK,kBAAkB,EACxB;OAEM,EACL,4BAA4B,EAC5B,KAAK,kCAAkC,EACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB,CAAC,OAAO,GAAG,IAAI;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;IAElB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;IAElB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,KAAK,CAAC,0BAA0B,C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,MAAM,CAAC;iBACd;aACF;YAED;;;eAGG;YACH,UAAiB,YAAY;gBAC3B;;;;;mBAKG;gBACH,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEnB;;mBAEG;gBACH,IAAI,CAAC,EAAE,MAAM,CAAC;aACf;SACF;KACF;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js new file mode 100644 index 0000000000000000000000000000000000000000..1b1bc2302944c11dabf3a840efccaa163eba3932 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js @@ -0,0 +1,493 @@ +"use strict"; +var _ChatCompletionStream_instances, _ChatCompletionStream_params, _ChatCompletionStream_choiceEventStates, _ChatCompletionStream_currentChatCompletionSnapshot, _ChatCompletionStream_beginRequest, _ChatCompletionStream_getChoiceEventState, _ChatCompletionStream_addChunk, _ChatCompletionStream_emitToolCallDoneEvent, _ChatCompletionStream_emitContentDoneEvents, _ChatCompletionStream_endRequest, _ChatCompletionStream_getAutoParseableResponseFormat, _ChatCompletionStream_accumulateChatCompletion; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const parser_1 = require("../_vendor/partial-json-parser/parser.js"); +const error_1 = require("../error.js"); +const parser_2 = require("../lib/parser.js"); +const streaming_1 = require("../streaming.js"); +const AbstractChatCompletionRunner_1 = require("./AbstractChatCompletionRunner.js"); +class ChatCompletionStream extends AbstractChatCompletionRunner_1.AbstractChatCompletionRunner { + constructor(params) { + super(); + _ChatCompletionStream_instances.add(this); + _ChatCompletionStream_params.set(this, void 0); + _ChatCompletionStream_choiceEventStates.set(this, void 0); + _ChatCompletionStream_currentChatCompletionSnapshot.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_params, params, "f"); + tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_choiceEventStates, [], "f"); + } + get currentChatCompletionSnapshot() { + return tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + } + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream) { + const runner = new ChatCompletionStream(null); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createChatCompletion(client, params, options) { + const runner = new ChatCompletionStream(params); + runner._run(() => runner._runChatCompletion(client, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + async _createChatCompletion(client, params, options) { + super._createChatCompletion; + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + const stream = await client.chat.completions.create({ ...params, stream: true }, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const chunk of stream) { + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addChatCompletion(tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + this._connected(); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + let chatId; + for await (const chunk of stream) { + if (chatId && chatId !== chunk.id) { + // A new request has been made. + this._addChatCompletion(tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + chatId = chunk.id; + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + return this._addChatCompletion(tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + [(_ChatCompletionStream_params = new WeakMap(), _ChatCompletionStream_choiceEventStates = new WeakMap(), _ChatCompletionStream_currentChatCompletionSnapshot = new WeakMap(), _ChatCompletionStream_instances = new WeakSet(), _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest() { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); + }, _ChatCompletionStream_getChoiceEventState = function _ChatCompletionStream_getChoiceEventState(choice) { + let state = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; + if (state) { + return state; + } + state = { + content_done: false, + refusal_done: false, + logprobs_content_done: false, + logprobs_refusal_done: false, + done_tool_calls: new Set(), + current_tool_call_index: null, + }; + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state; + return state; + }, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk(chunk) { + if (this.ended) + return; + const completion = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); + this._emit('chunk', chunk, completion); + for (const choice of chunk.choices) { + const choiceSnapshot = completion.choices[choice.index]; + if (choice.delta.content != null && + choiceSnapshot.message?.role === 'assistant' && + choiceSnapshot.message?.content) { + this._emit('content', choice.delta.content, choiceSnapshot.message.content); + this._emit('content.delta', { + delta: choice.delta.content, + snapshot: choiceSnapshot.message.content, + parsed: choiceSnapshot.message.parsed, + }); + } + if (choice.delta.refusal != null && + choiceSnapshot.message?.role === 'assistant' && + choiceSnapshot.message?.refusal) { + this._emit('refusal.delta', { + delta: choice.delta.refusal, + snapshot: choiceSnapshot.message.refusal, + }); + } + if (choice.logprobs?.content != null && choiceSnapshot.message?.role === 'assistant') { + this._emit('logprobs.content.delta', { + content: choice.logprobs?.content, + snapshot: choiceSnapshot.logprobs?.content ?? [], + }); + } + if (choice.logprobs?.refusal != null && choiceSnapshot.message?.role === 'assistant') { + this._emit('logprobs.refusal.delta', { + refusal: choice.logprobs?.refusal, + snapshot: choiceSnapshot.logprobs?.refusal ?? [], + }); + } + const state = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.finish_reason) { + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state.current_tool_call_index != null) { + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state.current_tool_call_index); + } + } + for (const toolCall of choice.delta.tool_calls ?? []) { + if (state.current_tool_call_index !== toolCall.index) { + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + // new tool call started, the previous one is done + if (state.current_tool_call_index != null) { + tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state.current_tool_call_index); + } + } + state.current_tool_call_index = toolCall.index; + } + for (const toolCallDelta of choice.delta.tool_calls ?? []) { + const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallDelta.index]; + if (!toolCallSnapshot?.type) { + continue; + } + if (toolCallSnapshot?.type === 'function') { + this._emit('tool_calls.function.arguments.delta', { + name: toolCallSnapshot.function?.name, + index: toolCallDelta.index, + arguments: toolCallSnapshot.function.arguments, + parsed_arguments: toolCallSnapshot.function.parsed_arguments, + arguments_delta: toolCallDelta.function?.arguments ?? '', + }); + } + else { + assertNever(toolCallSnapshot?.type); + } + } + } + }, _ChatCompletionStream_emitToolCallDoneEvent = function _ChatCompletionStream_emitToolCallDoneEvent(choiceSnapshot, toolCallIndex) { + const state = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (state.done_tool_calls.has(toolCallIndex)) { + // we've already fired the done event + return; + } + const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallIndex]; + if (!toolCallSnapshot) { + throw new Error('no tool call snapshot'); + } + if (!toolCallSnapshot.type) { + throw new Error('tool call snapshot missing `type`'); + } + if (toolCallSnapshot.type === 'function') { + const inputTool = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => (0, parser_2.isChatCompletionFunctionTool)(tool) && tool.function.name === toolCallSnapshot.function.name); // TS doesn't narrow based on isChatCompletionTool + this._emit('tool_calls.function.arguments.done', { + name: toolCallSnapshot.function.name, + index: toolCallIndex, + arguments: toolCallSnapshot.function.arguments, + parsed_arguments: (0, parser_2.isAutoParsableTool)(inputTool) ? inputTool.$parseRaw(toolCallSnapshot.function.arguments) + : inputTool?.function.strict ? JSON.parse(toolCallSnapshot.function.arguments) + : null, + }); + } + else { + assertNever(toolCallSnapshot.type); + } + }, _ChatCompletionStream_emitContentDoneEvents = function _ChatCompletionStream_emitContentDoneEvents(choiceSnapshot) { + const state = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.message.content && !state.content_done) { + state.content_done = true; + const responseFormat = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); + this._emit('content.done', { + content: choiceSnapshot.message.content, + parsed: responseFormat ? responseFormat.$parseRaw(choiceSnapshot.message.content) : null, + }); + } + if (choiceSnapshot.message.refusal && !state.refusal_done) { + state.refusal_done = true; + this._emit('refusal.done', { refusal: choiceSnapshot.message.refusal }); + } + if (choiceSnapshot.logprobs?.content && !state.logprobs_content_done) { + state.logprobs_content_done = true; + this._emit('logprobs.content.done', { content: choiceSnapshot.logprobs.content }); + } + if (choiceSnapshot.logprobs?.refusal && !state.logprobs_refusal_done) { + state.logprobs_refusal_done = true; + this._emit('logprobs.refusal.done', { refusal: choiceSnapshot.logprobs.refusal }); + } + }, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest() { + if (this.ended) { + throw new error_1.OpenAIError(`stream has ended, this shouldn't happen`); + } + const snapshot = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + if (!snapshot) { + throw new error_1.OpenAIError(`request ended without sending any chunks`); + } + tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); + tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_choiceEventStates, [], "f"); + return finalizeChatCompletion(snapshot, tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f")); + }, _ChatCompletionStream_getAutoParseableResponseFormat = function _ChatCompletionStream_getAutoParseableResponseFormat() { + const responseFormat = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f")?.response_format; + if ((0, parser_2.isAutoParsableResponseFormat)(responseFormat)) { + return responseFormat; + } + return null; + }, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion(chunk) { + var _a, _b, _c, _d; + let snapshot = tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + const { choices, ...rest } = chunk; + if (!snapshot) { + snapshot = tslib_1.__classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, { + ...rest, + choices: [], + }, "f"); + } + else { + Object.assign(snapshot, rest); + } + for (const { delta, finish_reason, index, logprobs = null, ...other } of chunk.choices) { + let choice = snapshot.choices[index]; + if (!choice) { + choice = snapshot.choices[index] = { finish_reason, index, message: {}, logprobs, ...other }; + } + if (logprobs) { + if (!choice.logprobs) { + choice.logprobs = Object.assign({}, logprobs); + } + else { + const { content, refusal, ...rest } = logprobs; + assertIsEmpty(rest); + Object.assign(choice.logprobs, rest); + if (content) { + (_a = choice.logprobs).content ?? (_a.content = []); + choice.logprobs.content.push(...content); + } + if (refusal) { + (_b = choice.logprobs).refusal ?? (_b.refusal = []); + choice.logprobs.refusal.push(...refusal); + } + } + } + if (finish_reason) { + choice.finish_reason = finish_reason; + if (tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f") && (0, parser_2.hasAutoParseableInput)(tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f"))) { + if (finish_reason === 'length') { + throw new error_1.LengthFinishReasonError(); + } + if (finish_reason === 'content_filter') { + throw new error_1.ContentFilterFinishReasonError(); + } + } + } + Object.assign(choice, other); + if (!delta) + continue; // Shouldn't happen; just in case. + const { content, refusal, function_call, role, tool_calls, ...rest } = delta; + assertIsEmpty(rest); + Object.assign(choice.message, rest); + if (refusal) { + choice.message.refusal = (choice.message.refusal || '') + refusal; + } + if (role) + choice.message.role = role; + if (function_call) { + if (!choice.message.function_call) { + choice.message.function_call = function_call; + } + else { + if (function_call.name) + choice.message.function_call.name = function_call.name; + if (function_call.arguments) { + (_c = choice.message.function_call).arguments ?? (_c.arguments = ''); + choice.message.function_call.arguments += function_call.arguments; + } + } + } + if (content) { + choice.message.content = (choice.message.content || '') + content; + if (!choice.message.refusal && tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { + choice.message.parsed = (0, parser_1.partialParse)(choice.message.content); + } + } + if (tool_calls) { + if (!choice.message.tool_calls) + choice.message.tool_calls = []; + for (const { index, id, type, function: fn, ...rest } of tool_calls) { + const tool_call = ((_d = choice.message.tool_calls)[index] ?? (_d[index] = {})); + Object.assign(tool_call, rest); + if (id) + tool_call.id = id; + if (type) + tool_call.type = type; + if (fn) + tool_call.function ?? (tool_call.function = { name: fn.name ?? '', arguments: '' }); + if (fn?.name) + tool_call.function.name = fn.name; + if (fn?.arguments) { + tool_call.function.arguments += fn.arguments; + if ((0, parser_2.shouldParseToolCall)(tslib_1.__classPrivateFieldGet(this, _ChatCompletionStream_params, "f"), tool_call)) { + tool_call.function.parsed_arguments = (0, parser_1.partialParse)(tool_call.function.arguments); + } + } + } + } + } + return snapshot; + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('chunk', (chunk) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(chunk); + } + else { + pushQueue.push(chunk); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +exports.ChatCompletionStream = ChatCompletionStream; +function finalizeChatCompletion(snapshot, params) { + const { id, choices, created, model, system_fingerprint, ...rest } = snapshot; + const completion = { + ...rest, + id, + choices: choices.map(({ message, finish_reason, index, logprobs, ...choiceRest }) => { + if (!finish_reason) { + throw new error_1.OpenAIError(`missing finish_reason for choice ${index}`); + } + const { content = null, function_call, tool_calls, ...messageRest } = message; + const role = message.role; // this is what we expect; in theory it could be different which would make our types a slight lie but would be fine. + if (!role) { + throw new error_1.OpenAIError(`missing role for choice ${index}`); + } + if (function_call) { + const { arguments: args, name } = function_call; + if (args == null) { + throw new error_1.OpenAIError(`missing function_call.arguments for choice ${index}`); + } + if (!name) { + throw new error_1.OpenAIError(`missing function_call.name for choice ${index}`); + } + return { + ...choiceRest, + message: { + content, + function_call: { arguments: args, name }, + role, + refusal: message.refusal ?? null, + }, + finish_reason, + index, + logprobs, + }; + } + if (tool_calls) { + return { + ...choiceRest, + index, + finish_reason, + logprobs, + message: { + ...messageRest, + role, + content, + refusal: message.refusal ?? null, + tool_calls: tool_calls.map((tool_call, i) => { + const { function: fn, type, id, ...toolRest } = tool_call; + const { arguments: args, name, ...fnRest } = fn || {}; + if (id == null) { + throw new error_1.OpenAIError(`missing choices[${index}].tool_calls[${i}].id\n${str(snapshot)}`); + } + if (type == null) { + throw new error_1.OpenAIError(`missing choices[${index}].tool_calls[${i}].type\n${str(snapshot)}`); + } + if (name == null) { + throw new error_1.OpenAIError(`missing choices[${index}].tool_calls[${i}].function.name\n${str(snapshot)}`); + } + if (args == null) { + throw new error_1.OpenAIError(`missing choices[${index}].tool_calls[${i}].function.arguments\n${str(snapshot)}`); + } + return { ...toolRest, id, type, function: { ...fnRest, name, arguments: args } }; + }), + }, + }; + } + return { + ...choiceRest, + message: { ...messageRest, content, role, refusal: message.refusal ?? null }, + finish_reason, + index, + logprobs, + }; + }), + created, + model, + object: 'chat.completion', + ...(system_fingerprint ? { system_fingerprint } : {}), + }; + return (0, parser_2.maybeParseChatCompletion)(completion, params); +} +function str(x) { + return JSON.stringify(x); +} +/** + * Ensures the given argument is an empty object, useful for + * asserting that all known properties on an object have been + * destructured. + */ +function assertIsEmpty(obj) { + return; +} +function assertNever(_x) { } +//# sourceMappingURL=ChatCompletionStream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f9a4dca91169e6c2d60fa318d713b9cd85aa9135 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStream.js","sourceRoot":"","sources":["../src/lib/ChatCompletionStream.ts"],"names":[],"mappings":";;;;;AAAA,qEAAqE;AACrE,uCAKkB;AAIlB,6CAQuB;AAWvB,+CAAsC;AACtC,oFAGwC;AA+FxC,MAAa,oBACX,SAAQ,2DAA0E;IAOlF,YAAY,MAAyC;QACnD,KAAK,EAAE,CAAC;;QALV,+CAA2C;QAC3C,0DAAuC;QACvC,sEAAmE;QAIjE,+BAAA,IAAI,gCAAW,MAAM,MAAA,CAAC;QACtB,+BAAA,IAAI,2CAAsB,EAAE,MAAA,CAAC;IAC/B,CAAC;IAED,IAAI,6BAA6B;QAC/B,OAAO,+BAAA,IAAI,2DAA+B,CAAC;IAC7C,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAsB;QAC9C,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,oBAAoB,CACzB,MAAc,EACd,MAAkC,EAClC,OAAwB;QAExB,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAU,MAA6C,CAAC,CAAC;QAChG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACf,MAAM,CAAC,kBAAkB,CACvB,MAAM,EACN,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAC3B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,EA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CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;IAEF,OAAO,IAAA,iCAAwB,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AA0JD;;;;GAIG;AACH,SAAS,aAAa,CAAe,GAAqB;IACxD,OAAO;AACT,CAAC;AAED,SAAS,WAAW,CAAC,EAAS,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d9c425823de0cc26f584891d9a4c17f5396b32ae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs @@ -0,0 +1,489 @@ +var _ChatCompletionStream_instances, _ChatCompletionStream_params, _ChatCompletionStream_choiceEventStates, _ChatCompletionStream_currentChatCompletionSnapshot, _ChatCompletionStream_beginRequest, _ChatCompletionStream_getChoiceEventState, _ChatCompletionStream_addChunk, _ChatCompletionStream_emitToolCallDoneEvent, _ChatCompletionStream_emitContentDoneEvents, _ChatCompletionStream_endRequest, _ChatCompletionStream_getAutoParseableResponseFormat, _ChatCompletionStream_accumulateChatCompletion; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { partialParse } from "../_vendor/partial-json-parser/parser.mjs"; +import { APIUserAbortError, ContentFilterFinishReasonError, LengthFinishReasonError, OpenAIError, } from "../error.mjs"; +import { hasAutoParseableInput, isAutoParsableResponseFormat, isAutoParsableTool, isChatCompletionFunctionTool, maybeParseChatCompletion, shouldParseToolCall, } from "../lib/parser.mjs"; +import { Stream } from "../streaming.mjs"; +import { AbstractChatCompletionRunner, } from "./AbstractChatCompletionRunner.mjs"; +export class ChatCompletionStream extends AbstractChatCompletionRunner { + constructor(params) { + super(); + _ChatCompletionStream_instances.add(this); + _ChatCompletionStream_params.set(this, void 0); + _ChatCompletionStream_choiceEventStates.set(this, void 0); + _ChatCompletionStream_currentChatCompletionSnapshot.set(this, void 0); + __classPrivateFieldSet(this, _ChatCompletionStream_params, params, "f"); + __classPrivateFieldSet(this, _ChatCompletionStream_choiceEventStates, [], "f"); + } + get currentChatCompletionSnapshot() { + return __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + } + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream) { + const runner = new ChatCompletionStream(null); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createChatCompletion(client, params, options) { + const runner = new ChatCompletionStream(params); + runner._run(() => runner._runChatCompletion(client, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + async _createChatCompletion(client, params, options) { + super._createChatCompletion; + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + const stream = await client.chat.completions.create({ ...params, stream: true }, { ...options, signal: this.controller.signal }); + this._connected(); + for await (const chunk of stream) { + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + this._connected(); + const stream = Stream.fromReadableStream(readableStream, this.controller); + let chatId; + for await (const chunk of stream) { + if (chatId && chatId !== chunk.id) { + // A new request has been made. + this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + chatId = chunk.id; + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + return this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + } + [(_ChatCompletionStream_params = new WeakMap(), _ChatCompletionStream_choiceEventStates = new WeakMap(), _ChatCompletionStream_currentChatCompletionSnapshot = new WeakMap(), _ChatCompletionStream_instances = new WeakSet(), _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest() { + if (this.ended) + return; + __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); + }, _ChatCompletionStream_getChoiceEventState = function _ChatCompletionStream_getChoiceEventState(choice) { + let state = __classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; + if (state) { + return state; + } + state = { + content_done: false, + refusal_done: false, + logprobs_content_done: false, + logprobs_refusal_done: false, + done_tool_calls: new Set(), + current_tool_call_index: null, + }; + __classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state; + return state; + }, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk(chunk) { + if (this.ended) + return; + const completion = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); + this._emit('chunk', chunk, completion); + for (const choice of chunk.choices) { + const choiceSnapshot = completion.choices[choice.index]; + if (choice.delta.content != null && + choiceSnapshot.message?.role === 'assistant' && + choiceSnapshot.message?.content) { + this._emit('content', choice.delta.content, choiceSnapshot.message.content); + this._emit('content.delta', { + delta: choice.delta.content, + snapshot: choiceSnapshot.message.content, + parsed: choiceSnapshot.message.parsed, + }); + } + if (choice.delta.refusal != null && + choiceSnapshot.message?.role === 'assistant' && + choiceSnapshot.message?.refusal) { + this._emit('refusal.delta', { + delta: choice.delta.refusal, + snapshot: choiceSnapshot.message.refusal, + }); + } + if (choice.logprobs?.content != null && choiceSnapshot.message?.role === 'assistant') { + this._emit('logprobs.content.delta', { + content: choice.logprobs?.content, + snapshot: choiceSnapshot.logprobs?.content ?? [], + }); + } + if (choice.logprobs?.refusal != null && choiceSnapshot.message?.role === 'assistant') { + this._emit('logprobs.refusal.delta', { + refusal: choice.logprobs?.refusal, + snapshot: choiceSnapshot.logprobs?.refusal ?? [], + }); + } + const state = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.finish_reason) { + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state.current_tool_call_index != null) { + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state.current_tool_call_index); + } + } + for (const toolCall of choice.delta.tool_calls ?? []) { + if (state.current_tool_call_index !== toolCall.index) { + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + // new tool call started, the previous one is done + if (state.current_tool_call_index != null) { + __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state.current_tool_call_index); + } + } + state.current_tool_call_index = toolCall.index; + } + for (const toolCallDelta of choice.delta.tool_calls ?? []) { + const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallDelta.index]; + if (!toolCallSnapshot?.type) { + continue; + } + if (toolCallSnapshot?.type === 'function') { + this._emit('tool_calls.function.arguments.delta', { + name: toolCallSnapshot.function?.name, + index: toolCallDelta.index, + arguments: toolCallSnapshot.function.arguments, + parsed_arguments: toolCallSnapshot.function.parsed_arguments, + arguments_delta: toolCallDelta.function?.arguments ?? '', + }); + } + else { + assertNever(toolCallSnapshot?.type); + } + } + } + }, _ChatCompletionStream_emitToolCallDoneEvent = function _ChatCompletionStream_emitToolCallDoneEvent(choiceSnapshot, toolCallIndex) { + const state = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (state.done_tool_calls.has(toolCallIndex)) { + // we've already fired the done event + return; + } + const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallIndex]; + if (!toolCallSnapshot) { + throw new Error('no tool call snapshot'); + } + if (!toolCallSnapshot.type) { + throw new Error('tool call snapshot missing `type`'); + } + if (toolCallSnapshot.type === 'function') { + const inputTool = __classPrivateFieldGet(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => isChatCompletionFunctionTool(tool) && tool.function.name === toolCallSnapshot.function.name); // TS doesn't narrow based on isChatCompletionTool + this._emit('tool_calls.function.arguments.done', { + name: toolCallSnapshot.function.name, + index: toolCallIndex, + arguments: toolCallSnapshot.function.arguments, + parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCallSnapshot.function.arguments) + : inputTool?.function.strict ? JSON.parse(toolCallSnapshot.function.arguments) + : null, + }); + } + else { + assertNever(toolCallSnapshot.type); + } + }, _ChatCompletionStream_emitContentDoneEvents = function _ChatCompletionStream_emitContentDoneEvents(choiceSnapshot) { + const state = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.message.content && !state.content_done) { + state.content_done = true; + const responseFormat = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); + this._emit('content.done', { + content: choiceSnapshot.message.content, + parsed: responseFormat ? responseFormat.$parseRaw(choiceSnapshot.message.content) : null, + }); + } + if (choiceSnapshot.message.refusal && !state.refusal_done) { + state.refusal_done = true; + this._emit('refusal.done', { refusal: choiceSnapshot.message.refusal }); + } + if (choiceSnapshot.logprobs?.content && !state.logprobs_content_done) { + state.logprobs_content_done = true; + this._emit('logprobs.content.done', { content: choiceSnapshot.logprobs.content }); + } + if (choiceSnapshot.logprobs?.refusal && !state.logprobs_refusal_done) { + state.logprobs_refusal_done = true; + this._emit('logprobs.refusal.done', { refusal: choiceSnapshot.logprobs.refusal }); + } + }, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest() { + if (this.ended) { + throw new OpenAIError(`stream has ended, this shouldn't happen`); + } + const snapshot = __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + if (!snapshot) { + throw new OpenAIError(`request ended without sending any chunks`); + } + __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); + __classPrivateFieldSet(this, _ChatCompletionStream_choiceEventStates, [], "f"); + return finalizeChatCompletion(snapshot, __classPrivateFieldGet(this, _ChatCompletionStream_params, "f")); + }, _ChatCompletionStream_getAutoParseableResponseFormat = function _ChatCompletionStream_getAutoParseableResponseFormat() { + const responseFormat = __classPrivateFieldGet(this, _ChatCompletionStream_params, "f")?.response_format; + if (isAutoParsableResponseFormat(responseFormat)) { + return responseFormat; + } + return null; + }, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion(chunk) { + var _a, _b, _c, _d; + let snapshot = __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + const { choices, ...rest } = chunk; + if (!snapshot) { + snapshot = __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, { + ...rest, + choices: [], + }, "f"); + } + else { + Object.assign(snapshot, rest); + } + for (const { delta, finish_reason, index, logprobs = null, ...other } of chunk.choices) { + let choice = snapshot.choices[index]; + if (!choice) { + choice = snapshot.choices[index] = { finish_reason, index, message: {}, logprobs, ...other }; + } + if (logprobs) { + if (!choice.logprobs) { + choice.logprobs = Object.assign({}, logprobs); + } + else { + const { content, refusal, ...rest } = logprobs; + assertIsEmpty(rest); + Object.assign(choice.logprobs, rest); + if (content) { + (_a = choice.logprobs).content ?? (_a.content = []); + choice.logprobs.content.push(...content); + } + if (refusal) { + (_b = choice.logprobs).refusal ?? (_b.refusal = []); + choice.logprobs.refusal.push(...refusal); + } + } + } + if (finish_reason) { + choice.finish_reason = finish_reason; + if (__classPrivateFieldGet(this, _ChatCompletionStream_params, "f") && hasAutoParseableInput(__classPrivateFieldGet(this, _ChatCompletionStream_params, "f"))) { + if (finish_reason === 'length') { + throw new LengthFinishReasonError(); + } + if (finish_reason === 'content_filter') { + throw new ContentFilterFinishReasonError(); + } + } + } + Object.assign(choice, other); + if (!delta) + continue; // Shouldn't happen; just in case. + const { content, refusal, function_call, role, tool_calls, ...rest } = delta; + assertIsEmpty(rest); + Object.assign(choice.message, rest); + if (refusal) { + choice.message.refusal = (choice.message.refusal || '') + refusal; + } + if (role) + choice.message.role = role; + if (function_call) { + if (!choice.message.function_call) { + choice.message.function_call = function_call; + } + else { + if (function_call.name) + choice.message.function_call.name = function_call.name; + if (function_call.arguments) { + (_c = choice.message.function_call).arguments ?? (_c.arguments = ''); + choice.message.function_call.arguments += function_call.arguments; + } + } + } + if (content) { + choice.message.content = (choice.message.content || '') + content; + if (!choice.message.refusal && __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { + choice.message.parsed = partialParse(choice.message.content); + } + } + if (tool_calls) { + if (!choice.message.tool_calls) + choice.message.tool_calls = []; + for (const { index, id, type, function: fn, ...rest } of tool_calls) { + const tool_call = ((_d = choice.message.tool_calls)[index] ?? (_d[index] = {})); + Object.assign(tool_call, rest); + if (id) + tool_call.id = id; + if (type) + tool_call.type = type; + if (fn) + tool_call.function ?? (tool_call.function = { name: fn.name ?? '', arguments: '' }); + if (fn?.name) + tool_call.function.name = fn.name; + if (fn?.arguments) { + tool_call.function.arguments += fn.arguments; + if (shouldParseToolCall(__classPrivateFieldGet(this, _ChatCompletionStream_params, "f"), tool_call)) { + tool_call.function.parsed_arguments = partialParse(tool_call.function.arguments); + } + } + } + } + } + return snapshot; + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('chunk', (chunk) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(chunk); + } + else { + pushQueue.push(chunk); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + toReadableStream() { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +function finalizeChatCompletion(snapshot, params) { + const { id, choices, created, model, system_fingerprint, ...rest } = snapshot; + const completion = { + ...rest, + id, + choices: choices.map(({ message, finish_reason, index, logprobs, ...choiceRest }) => { + if (!finish_reason) { + throw new OpenAIError(`missing finish_reason for choice ${index}`); + } + const { content = null, function_call, tool_calls, ...messageRest } = message; + const role = message.role; // this is what we expect; in theory it could be different which would make our types a slight lie but would be fine. + if (!role) { + throw new OpenAIError(`missing role for choice ${index}`); + } + if (function_call) { + const { arguments: args, name } = function_call; + if (args == null) { + throw new OpenAIError(`missing function_call.arguments for choice ${index}`); + } + if (!name) { + throw new OpenAIError(`missing function_call.name for choice ${index}`); + } + return { + ...choiceRest, + message: { + content, + function_call: { arguments: args, name }, + role, + refusal: message.refusal ?? null, + }, + finish_reason, + index, + logprobs, + }; + } + if (tool_calls) { + return { + ...choiceRest, + index, + finish_reason, + logprobs, + message: { + ...messageRest, + role, + content, + refusal: message.refusal ?? null, + tool_calls: tool_calls.map((tool_call, i) => { + const { function: fn, type, id, ...toolRest } = tool_call; + const { arguments: args, name, ...fnRest } = fn || {}; + if (id == null) { + throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].id\n${str(snapshot)}`); + } + if (type == null) { + throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].type\n${str(snapshot)}`); + } + if (name == null) { + throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].function.name\n${str(snapshot)}`); + } + if (args == null) { + throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].function.arguments\n${str(snapshot)}`); + } + return { ...toolRest, id, type, function: { ...fnRest, name, arguments: args } }; + }), + }, + }; + } + return { + ...choiceRest, + message: { ...messageRest, content, role, refusal: message.refusal ?? null }, + finish_reason, + index, + logprobs, + }; + }), + created, + model, + object: 'chat.completion', + ...(system_fingerprint ? { system_fingerprint } : {}), + }; + return maybeParseChatCompletion(completion, params); +} +function str(x) { + return JSON.stringify(x); +} +/** + * Ensures the given argument is an empty object, useful for + * asserting that all known properties on an object have been + * destructured. + */ +function assertIsEmpty(obj) { + return; +} +function assertNever(_x) { } +//# sourceMappingURL=ChatCompletionStream.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6160421f6b51dcff8e7f90158236ee94339db876 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStream.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStream.mjs","sourceRoot":"","sources":["../src/lib/ChatCompletionStream.ts"],"names":[],"mappings":";;OAAO,EAAE,YAAY,EAAE;OAChB,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,WAAW,GACZ;OAIM,EAEL,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,GACpB;OAWM,EAAE,MAAM,EAAE;OACV,EACL,4BAA4B,GAE7B;AA+FD,MAAM,OAAO,oBACX,SAAQ,4BAA0E;IAOlF,YAAY,MAAyC;QACnD,KAAK,EAAE,CAAC;;QALV,+CAA2C;QAC3C,0DAAuC;QACvC,sEAAmE;QAIjE,uBAAA,IAAI,gCAAW,MAAM,MAAA,CAAC;QACtB,uBAAA,IAAI,2CAAsB,EAAE,MAAA,CAAC;IAC/B,CAAC;IAED,IAAI,6BAA6B;QAC/B,OAAO,uBAAA,IAAI,2DAA+B,CAAC;IAC7C,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAsB;QAC9C,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,oBAAoB,CACzB,MAAc,EACd,MAAkC,EAClC,OAAwB;QAExB,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAU,MAA6C,CAAC,CAAC;QAChG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACf,MAAM,CAAC,kBAAkB,CACvB,MAAM,EACN,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAC3B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,EAAE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AC;IAEF,OAAO,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AA0JD;;;;GAIG;AACH,SAAS,aAAa,CAAe,GAAqB;IACxD,OAAO;AACT,CAAC;AAED,SAAS,WAAW,CAAC,EAAS,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0a874ae8df760e9b4ffd824bdfab38b119d19fb7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts @@ -0,0 +1,19 @@ +import { type ChatCompletionChunk, type ChatCompletionCreateParamsStreaming } from "../resources/chat/completions.mjs"; +import { RunnerOptions, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.mjs"; +import { type ReadableStream } from "../internal/shim-types.mjs"; +import { RunnableTools, type BaseFunctionsArgs } from "./RunnableFunction.mjs"; +import { ChatCompletionSnapshot, ChatCompletionStream } from "./ChatCompletionStream.mjs"; +import OpenAI from "../index.mjs"; +import { AutoParseableTool } from "../lib/parser.mjs"; +export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { + content: (contentDelta: string, contentSnapshot: string) => void; + chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; +} +export type ChatCompletionStreamingToolRunnerParams = Omit & { + tools: RunnableTools | AutoParseableTool[]; +}; +export declare class ChatCompletionStreamingRunner extends ChatCompletionStream implements AsyncIterable { + static fromReadableStream(stream: ReadableStream): ChatCompletionStreamingRunner; + static runTools(client: OpenAI, params: ChatCompletionStreamingToolRunnerParams, options?: RunnerOptions): ChatCompletionStreamingRunner; +} +//# sourceMappingURL=ChatCompletionStreamingRunner.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..25b219e0320b53a8235a4bb99c525eca5734fa24 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStreamingRunner.d.mts","sourceRoot":"","sources":["../src/lib/ChatCompletionStreamingRunner.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mCAAmC,EACzC;OACM,EAAE,aAAa,EAAE,KAAK,kCAAkC,EAAE;OAC1D,EAAE,KAAK,cAAc,EAAE;OACvB,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE;OACzC,EAAE,sBAAsB,EAAE,oBAAoB,EAAE;OAChD,MAAM;OACN,EAAE,iBAAiB,EAAE;AAE5B,MAAM,WAAW,0BAA2B,SAAQ,kCAAkC;IACpF,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,KAAK,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC/E;AAED,MAAM,MAAM,uCAAuC,CAAC,aAAa,SAAS,iBAAiB,IAAI,IAAI,CACjG,mCAAmC,EACnC,OAAO,CACR,GAAG;IACF,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;CACtE,CAAC;AAEF,qBAAa,6BAA6B,CAAC,OAAO,GAAG,IAAI,CACvD,SAAQ,oBAAoB,CAAC,OAAO,CACpC,YAAW,aAAa,CAAC,mBAAmB,CAAC;WAE7B,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,6BAA6B,CAAC,IAAI,CAAC;IAM/F,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,EAC3D,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,uCAAuC,CAAC,CAAC,CAAC,EAClD,OAAO,CAAC,EAAE,aAAa,GACtB,6BAA6B,CAAC,OAAO,CAAC;CAY1C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..13ad5258cf8f1e6f0260657724032d4838bbdb42 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts @@ -0,0 +1,19 @@ +import { type ChatCompletionChunk, type ChatCompletionCreateParamsStreaming } from "../resources/chat/completions.js"; +import { RunnerOptions, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.js"; +import { type ReadableStream } from "../internal/shim-types.js"; +import { RunnableTools, type BaseFunctionsArgs } from "./RunnableFunction.js"; +import { ChatCompletionSnapshot, ChatCompletionStream } from "./ChatCompletionStream.js"; +import OpenAI from "../index.js"; +import { AutoParseableTool } from "../lib/parser.js"; +export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { + content: (contentDelta: string, contentSnapshot: string) => void; + chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; +} +export type ChatCompletionStreamingToolRunnerParams = Omit & { + tools: RunnableTools | AutoParseableTool[]; +}; +export declare class ChatCompletionStreamingRunner extends ChatCompletionStream implements AsyncIterable { + static fromReadableStream(stream: ReadableStream): ChatCompletionStreamingRunner; + static runTools(client: OpenAI, params: ChatCompletionStreamingToolRunnerParams, options?: RunnerOptions): ChatCompletionStreamingRunner; +} +//# sourceMappingURL=ChatCompletionStreamingRunner.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..43e770bc24792255a3a4abc4cff922c62c6a0ac9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStreamingRunner.d.ts","sourceRoot":"","sources":["../src/lib/ChatCompletionStreamingRunner.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mCAAmC,EACzC;OACM,EAAE,aAAa,EAAE,KAAK,kCAAkC,EAAE;OAC1D,EAAE,KAAK,cAAc,EAAE;OACvB,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE;OACzC,EAAE,sBAAsB,EAAE,oBAAoB,EAAE;OAChD,MAAM;OACN,EAAE,iBAAiB,EAAE;AAE5B,MAAM,WAAW,0BAA2B,SAAQ,kCAAkC;IACpF,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,KAAK,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC/E;AAED,MAAM,MAAM,uCAAuC,CAAC,aAAa,SAAS,iBAAiB,IAAI,IAAI,CACjG,mCAAmC,EACnC,OAAO,CACR,GAAG;IACF,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;CACtE,CAAC;AAEF,qBAAa,6BAA6B,CAAC,OAAO,GAAG,IAAI,CACvD,SAAQ,oBAAoB,CAAC,OAAO,CACpC,YAAW,aAAa,CAAC,mBAAmB,CAAC;WAE7B,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,6BAA6B,CAAC,IAAI,CAAC;IAM/F,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,EAC3D,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,uCAAuC,CAAC,CAAC,CAAC,EAClD,OAAO,CAAC,EAAE,aAAa,GACtB,6BAA6B,CAAC,OAAO,CAAC;CAY1C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js new file mode 100644 index 0000000000000000000000000000000000000000..cffb647c9a1416ae92c298737c46a8fcc21b94df --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionStreamingRunner = void 0; +const ChatCompletionStream_1 = require("./ChatCompletionStream.js"); +class ChatCompletionStreamingRunner extends ChatCompletionStream_1.ChatCompletionStream { + static fromReadableStream(stream) { + const runner = new ChatCompletionStreamingRunner(null); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static runTools(client, params, options) { + const runner = new ChatCompletionStreamingRunner( + // @ts-expect-error TODO these types are incompatible + params); + const opts = { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runTools' }, + }; + runner._run(() => runner._runTools(client, params, opts)); + return runner; + } +} +exports.ChatCompletionStreamingRunner = ChatCompletionStreamingRunner; +//# sourceMappingURL=ChatCompletionStreamingRunner.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map new file mode 100644 index 0000000000000000000000000000000000000000..707579d77f4cc0bc08909e10512e8349990ee4dc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStreamingRunner.js","sourceRoot":"","sources":["../src/lib/ChatCompletionStreamingRunner.ts"],"names":[],"mappings":";;;AAOA,oEAAsF;AAgBtF,MAAa,6BACX,SAAQ,2CAA6B;IAGrC,MAAM,CAAU,kBAAkB,CAAC,MAAsB;QACvD,MAAM,MAAM,GAAG,IAAI,6BAA6B,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,QAAQ,CACb,MAAc,EACd,MAAkD,EAClD,OAAuB;QAEvB,MAAM,MAAM,GAAG,IAAI,6BAA6B;QAC9C,qDAAqD;QACrD,MAAM,CACP,CAAC;QACF,MAAM,IAAI,GAAG;YACX,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE;SAC1E,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA1BD,sEA0BC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4a825b815d35a44511f842b44c10f0a0a79ce809 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs @@ -0,0 +1,20 @@ +import { ChatCompletionStream } from "./ChatCompletionStream.mjs"; +export class ChatCompletionStreamingRunner extends ChatCompletionStream { + static fromReadableStream(stream) { + const runner = new ChatCompletionStreamingRunner(null); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static runTools(client, params, options) { + const runner = new ChatCompletionStreamingRunner( + // @ts-expect-error TODO these types are incompatible + params); + const opts = { + ...options, + headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runTools' }, + }; + runner._run(() => runner._runTools(client, params, opts)); + return runner; + } +} +//# sourceMappingURL=ChatCompletionStreamingRunner.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d28c5cb7aa7f6b2ad97d4a0925c1f0bec64d0481 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"ChatCompletionStreamingRunner.mjs","sourceRoot":"","sources":["../src/lib/ChatCompletionStreamingRunner.ts"],"names":[],"mappings":"OAOO,EAA0B,oBAAoB,EAAE;AAgBvD,MAAM,OAAO,6BACX,SAAQ,oBAA6B;IAGrC,MAAM,CAAU,kBAAkB,CAAC,MAAsB;QACvD,MAAM,MAAM,GAAG,IAAI,6BAA6B,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,QAAQ,CACb,MAAc,EACd,MAAkD,EAClD,OAAuB;QAEvB,MAAM,MAAM,GAAG,IAAI,6BAA6B;QAC9C,qDAAqD;QACrD,MAAM,CACP,CAAC;QACF,MAAM,IAAI,GAAG;YACX,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE;SAC1E,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..91bc1b55f7b775cbda7145a35e90727408de8590 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts @@ -0,0 +1,45 @@ +type EventListener = Events[EventType]; +export type EventParameters = { + [Event in EventType]: EventListener extends (...args: infer P) => any ? P : never; +}[EventType]; +export declare class EventEmitter any>> { + #private; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this, so that calls can be chained + */ + on(event: Event, listener: EventListener): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this, so that calls can be chained + */ + off(event: Event, listener: EventListener): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this, so that calls can be chained + */ + once(event: Event, listener: EventListener): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : EventParameters extends [] ? void : EventParameters>; + protected _emit(this: EventEmitter, event: Event, ...args: EventParameters): void; + protected _hasListener(event: keyof EventTypes): boolean; +} +export {}; +//# sourceMappingURL=EventEmitter.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b70396917e9d4d08e69742b18cdc904c58aed5f2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"EventEmitter.d.mts","sourceRoot":"","sources":["../src/lib/EventEmitter.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAO/E,MAAM,MAAM,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI;KACnE,KAAK,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK;CACrG,CAAC,SAAS,CAAC,CAAC;AAEb,qBAAa,YAAY,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;;IAKhF;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOlG;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAQnG;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOpG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,UAAU,EACpC,KAAK,EAAE,KAAK,GACX,OAAO,CACR,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAC9D,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,GACpD,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CACrC;IAOD,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,UAAU,EAC5C,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC;IAS7C,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,UAAU,GAAG,OAAO;CAIzD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9a0530ba5484385b65dfe384d1dc02812b933d37 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts @@ -0,0 +1,45 @@ +type EventListener = Events[EventType]; +export type EventParameters = { + [Event in EventType]: EventListener extends (...args: infer P) => any ? P : never; +}[EventType]; +export declare class EventEmitter any>> { + #private; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this, so that calls can be chained + */ + on(event: Event, listener: EventListener): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this, so that calls can be chained + */ + off(event: Event, listener: EventListener): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this, so that calls can be chained + */ + once(event: Event, listener: EventListener): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : EventParameters extends [] ? void : EventParameters>; + protected _emit(this: EventEmitter, event: Event, ...args: EventParameters): void; + protected _hasListener(event: keyof EventTypes): boolean; +} +export {}; +//# sourceMappingURL=EventEmitter.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a59e2eb52851b1c69af40bfb8b2323c431dc8e02 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../src/lib/EventEmitter.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAO/E,MAAM,MAAM,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI;KACnE,KAAK,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK;CACrG,CAAC,SAAS,CAAC,CAAC;AAEb,qBAAa,YAAY,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;;IAKhF;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOlG;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAQnG;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOpG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,UAAU,EACpC,KAAK,EAAE,KAAK,GACX,OAAO,CACR,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAC9D,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,GACpD,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CACrC;IAOD,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,UAAU,EAC5C,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC;IAS7C,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,UAAU,GAAG,OAAO;CAIzD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd49afa406e5b08329c569a3991000708eb3acc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js @@ -0,0 +1,79 @@ +"use strict"; +var _EventEmitter_listeners; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EventEmitter = void 0; +const tslib_1 = require("../internal/tslib.js"); +class EventEmitter { + constructor() { + _EventEmitter_listeners.set(this, {}); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + // TODO: handle errors + this.once(event, resolve); + }); + } + _emit(event, ...args) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + } + _hasListener(event) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + return listeners && listeners.length > 0; + } +} +exports.EventEmitter = EventEmitter; +_EventEmitter_listeners = new WeakMap(); +//# sourceMappingURL=EventEmitter.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js.map new file mode 100644 index 0000000000000000000000000000000000000000..af6c5578c32f7d4db8642dae506a26ec5128fc3f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EventEmitter.js","sourceRoot":"","sources":["../src/lib/E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,sBAAsB;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,OAAc,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAEb,KAAY,EACZ,GAAG,IAAwC;QAE3C,MAAM,SAAS,GAAkD,+BAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,CAAC;QACxF,IAAI,SAAS,EAAE,CAAC;YACd,+BAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAQ,CAAC;YACjE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAI,IAAY,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAES,YAAY,CAAC,KAAuB;QAC5C,MAAM,SAAS,GAAG,+BAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3C,CAAC;CACF;AAtFD,oCAsFC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c165895aafd12bf7b48efb6a547973b868af5b85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs @@ -0,0 +1,75 @@ +var _EventEmitter_listeners; +import { __classPrivateFieldGet } from "../internal/tslib.mjs"; +export class EventEmitter { + constructor() { + _EventEmitter_listeners.set(this, {}); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this, so that calls can be chained + */ + on(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] || (__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this, so that calls can be chained + */ + off(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this, so that calls can be chained + */ + once(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] || (__classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + // TODO: handle errors + this.once(event, resolve); + }); + } + _emit(event, ...args) { + const listeners = __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + if (listeners) { + __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + } + _hasListener(event) { + const listeners = __classPrivateFieldGet(this, _EventEmitter_listeners, "f")[event]; + return listeners && listeners.length > 0; + } +} +_EventEmitter_listeners = new WeakMap(); +//# sourceMappingURL=EventEmitter.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..325c75adcfd21e07bf227b7c33b463385e67e899 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventEmitter.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"EventEmitter.mjs","sourceRoot":"","sources":["../src/lib/EventEmitter.ts"],"names":[],"mappings":";;AAWA,MAAM,OAAO,YAAY;IAAzB;QACE,kCAEI,EAAE,EAAC;IAmFT,CAAC;IAjFC;;;;;;OAMG;IACH,EAAE,CAAiC,KAAY,EAAE,QAA0C;QACzF,MAAM,SAAS,GACb,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,IAAI,CAAC,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1D,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,GAAG,CAAiC,KAAY,EAAE,QAA0C;QAC1F,MAAM,SAAS,GAAG,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QAClE,IAAI,KAAK,IAAI,CAAC;YAAE,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAiC,KAAY,EAAE,QAA0C;QAC3F,MAAM,SAAS,GACb,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,IAAI,CAAC,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1D,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO,CACL,KAAY;QAMZ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,sBAAsB;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,OAAc,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAEb,KAAY,EACZ,GAAG,IAAwC;QAE3C,MAAM,SAAS,GAAkD,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,CAAC;QACxF,IAAI,SAAS,EAAE,CAAC;YACd,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAQ,CAAC;YACjE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAI,IAAY,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAES,YAAY,CAAC,KAAuB;QAC5C,MAAM,SAAS,GAAG,uBAAA,IAAI,+BAAW,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3C,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..521c102202f4a0910d6361ba9db2e5e92db9167a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts @@ -0,0 +1,62 @@ +import { APIUserAbortError, OpenAIError } from "../error.mjs"; +export declare class EventStream { + #private; + controller: AbortController; + constructor(); + protected _run(this: EventStream, executor: () => Promise): void; + protected _connected(this: EventStream): void; + get ended(): boolean; + get errored(): boolean; + get aborted(): boolean; + abort(): void; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this ChatCompletionStream, so that calls can be chained + */ + on(event: Event, listener: EventListener): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this ChatCompletionStream, so that calls can be chained + */ + off(event: Event, listener: EventListener): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this ChatCompletionStream, so that calls can be chained + */ + once(event: Event, listener: EventListener): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : EventParameters extends [] ? void : EventParameters>; + done(): Promise; + _emit(event: Event, ...args: EventParameters): void; + _emit(event: Event, ...args: EventParameters): void; + protected _emitFinal(): void; +} +type EventListener = Events[EventType]; +export type EventParameters = { + [Event in EventType]: EventListener extends (...args: infer P) => any ? P : never; +}[EventType]; +export interface BaseEvents { + connect: () => void; + error: (error: OpenAIError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export {}; +//# sourceMappingURL=EventStream.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1d29265fb2f8a54d49ac77f169bf961d74bb6182 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"EventStream.d.mts","sourceRoot":"","sources":["../src/lib/EventStream.ts"],"names":[],"mappings":"OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE;AAEzC,qBAAa,WAAW,CAAC,UAAU,SAAS,UAAU;;IACpD,UAAU,EAAE,eAAe,CAAyB;;IAsCpD,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;IAW1E,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC;IAMlD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,KAAK;IAIL;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOlG;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAQnG;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOpG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,UAAU,EACpC,KAAK,EAAE,KAAK,GACX,OAAO,CACR,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAC9D,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,GACpD,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CACrC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B3B,KAAK,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IACtG,KAAK,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAoDtG,SAAS,CAAC,UAAU,IAAI,IAAI;CAC7B;AAED,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAO/E,MAAM,MAAM,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI;KACnE,KAAK,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK;CACrG,CAAC,SAAS,CAAC,CAAC;AAEb,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C,GAAG,EAAE,MAAM,IAAI,CAAC;CACjB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6eccd72225caf8b0ad8bfd55ef13f47e5ee0b74e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts @@ -0,0 +1,62 @@ +import { APIUserAbortError, OpenAIError } from "../error.js"; +export declare class EventStream { + #private; + controller: AbortController; + constructor(); + protected _run(this: EventStream, executor: () => Promise): void; + protected _connected(this: EventStream): void; + get ended(): boolean; + get errored(): boolean; + get aborted(): boolean; + abort(): void; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this ChatCompletionStream, so that calls can be chained + */ + on(event: Event, listener: EventListener): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this ChatCompletionStream, so that calls can be chained + */ + off(event: Event, listener: EventListener): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this ChatCompletionStream, so that calls can be chained + */ + once(event: Event, listener: EventListener): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : EventParameters extends [] ? void : EventParameters>; + done(): Promise; + _emit(event: Event, ...args: EventParameters): void; + _emit(event: Event, ...args: EventParameters): void; + protected _emitFinal(): void; +} +type EventListener = Events[EventType]; +export type EventParameters = { + [Event in EventType]: EventListener extends (...args: infer P) => any ? P : never; +}[EventType]; +export interface BaseEvents { + connect: () => void; + error: (error: OpenAIError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export {}; +//# sourceMappingURL=EventStream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9ad0f5283ba8e6f3ca4d7a582e6488ea975dd2a9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EventStream.d.ts","sourceRoot":"","sources":["../src/lib/EventStream.ts"],"names":[],"mappings":"OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE;AAEzC,qBAAa,WAAW,CAAC,UAAU,SAAS,UAAU;;IACpD,UAAU,EAAE,eAAe,CAAyB;;IAsCpD,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;IAW1E,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC;IAMlD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,KAAK;IAIL;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOlG;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAQnG;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE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AE,MAAM,IAAI,CAAC;CACjB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js new file mode 100644 index 0000000000000000000000000000000000000000..888e5a8f3ee79b6c476f03ae5c5b12670987407c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js @@ -0,0 +1,190 @@ +"use strict"; +var _EventStream_instances, _EventStream_connectedPromise, _EventStream_resolveConnectedPromise, _EventStream_rejectConnectedPromise, _EventStream_endPromise, _EventStream_resolveEndPromise, _EventStream_rejectEndPromise, _EventStream_listeners, _EventStream_ended, _EventStream_errored, _EventStream_aborted, _EventStream_catchingPromiseCreated, _EventStream_handleError; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EventStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("../error.js"); +class EventStream { + constructor() { + _EventStream_instances.add(this); + this.controller = new AbortController(); + _EventStream_connectedPromise.set(this, void 0); + _EventStream_resolveConnectedPromise.set(this, () => { }); + _EventStream_rejectConnectedPromise.set(this, () => { }); + _EventStream_endPromise.set(this, void 0); + _EventStream_resolveEndPromise.set(this, () => { }); + _EventStream_rejectEndPromise.set(this, () => { }); + _EventStream_listeners.set(this, {}); + _EventStream_ended.set(this, false); + _EventStream_errored.set(this, false); + _EventStream_aborted.set(this, false); + _EventStream_catchingPromiseCreated.set(this, false); + tslib_1.__classPrivateFieldSet(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _EventStream_resolveConnectedPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _EventStream_rejectConnectedPromise, reject, "f"); + }), "f"); + tslib_1.__classPrivateFieldSet(this, _EventStream_endPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _EventStream_resolveEndPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _EventStream_rejectEndPromise, reject, "f"); + }), "f"); + // Don't let these promises cause unhandled rejection errors. + // we will manually cause an unhandled rejection error later + // if the user hasn't registered any error listener or called + // any promise-returning method. + tslib_1.__classPrivateFieldGet(this, _EventStream_connectedPromise, "f").catch(() => { }); + tslib_1.__classPrivateFieldGet(this, _EventStream_endPromise, "f").catch(() => { }); + } + _run(executor) { + // Unfortunately if we call `executor()` immediately we get runtime errors about + // references to `this` before the `super()` constructor call returns. + setTimeout(() => { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, tslib_1.__classPrivateFieldGet(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); + }, 0); + } + _connected() { + if (this.ended) + return; + tslib_1.__classPrivateFieldGet(this, _EventStream_resolveConnectedPromise, "f").call(this); + this._emit('connect'); + } + get ended() { + return tslib_1.__classPrivateFieldGet(this, _EventStream_ended, "f"); + } + get errored() { + return tslib_1.__classPrivateFieldGet(this, _EventStream_errored, "f"); + } + get aborted() { + return tslib_1.__classPrivateFieldGet(this, _EventStream_aborted, "f"); + } + abort() { + this.controller.abort(); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this ChatCompletionStream, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this ChatCompletionStream, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this ChatCompletionStream, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _EventStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + tslib_1.__classPrivateFieldSet(this, _EventStream_catchingPromiseCreated, true, "f"); + await tslib_1.__classPrivateFieldGet(this, _EventStream_endPromise, "f"); + } + _emit(event, ...args) { + // make sure we don't emit any events after end + if (tslib_1.__classPrivateFieldGet(this, _EventStream_ended, "f")) { + return; + } + if (event === 'end') { + tslib_1.__classPrivateFieldSet(this, _EventStream_ended, true, "f"); + tslib_1.__classPrivateFieldGet(this, _EventStream_resolveEndPromise, "f").call(this); + } + const listeners = tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _EventStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + return; + } + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + // Trigger an unhandled rejection if the user hasn't registered any error handlers. + // If you are seeing stack traces here, make sure to handle errors via either: + // - runner.on('error', () => ...) + // - await runner.done() + // - await runner.finalChatCompletion() + // - etc. + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _EventStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { } +} +exports.EventStream = EventStream; +_EventStream_connectedPromise = new WeakMap(), _EventStream_resolveConnectedPromise = new WeakMap(), _EventStream_rejectConnectedPromise = new WeakMap(), _EventStream_endPromise = new WeakMap(), _EventStream_resolveEndPromise = new WeakMap(), _EventStream_rejectEndPromise = new WeakMap(), _EventStream_listeners = new WeakMap(), _EventStream_ended = new WeakMap(), _EventStream_errored = new WeakMap(), _EventStream_aborted = new WeakMap(), _EventStream_catchingPromiseCreated = new WeakMap(), _EventStream_instances = new WeakSet(), _EventStream_handleError = function _EventStream_handleError(error) { + tslib_1.__classPrivateFieldSet(this, _EventStream_errored, true, "f"); + if (error instanceof Error && error.name === 'AbortError') { + error = new error_1.APIUserAbortError(); + } + if (error instanceof error_1.APIUserAbortError) { + tslib_1.__classPrivateFieldSet(this, _EventStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof error_1.OpenAIError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const openAIError = new error_1.OpenAIError(error.message); + // @ts-ignore + openAIError.cause = error; + return this._emit('error', openAIError); + } + return this._emit('error', new error_1.OpenAIError(String(error))); +}; +//# sourceMappingURL=EventStream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b9102963b7c2e235a6b06484952bb61d038d2d78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EventStream.js","sourceRoot":"","sources":["../src/lib/EventStream.ts"],"names":[],"mappings":";;;;;AAAA,uCAA0D;AAE1D,MAAa,WAAW;IAoBtB;;QAnBA,eAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;QAEpD,gDAAiC;QACjC,+CAAuC,GAAG,EAAE,GAAE,CAAC,EAAC;QAChD,8CAAwD,GAAG,EAAE,GAAE,CAAC,EAAC;QAEjE,0CAA2B;QAC3B,yCAAiC,GAAG,EAAE,GAAE,CAAC,EAAC;QAC1C,wCAAkD,GAAG,EAAE,GAAE,CAAC,EAAC;QAE3D,iCAEI,EAAE,EAAC;QAEP,6BAAS,KAAK,EAAC;QACf,+BAAW,KAAK,EAAC;QACjB,+BAAW,KAAK,EAAC;QACjB,8CAA0B,KAAK,EAAC;QAG9B,+BAAA,IAAI,iCAAqB,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC7D,+BAAA,IAAI,wCAA4B,OAAO,MAAA,CAAC;YACxC,+BAAA,IAAI,uCAA2B,MAAM,MAAA,CAAC;QACxC,CAAC,CAAC,MAAA,CAAC;QAEH,+BAAA,IAAI,2BAAe,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACvD,+BAAA,IAAI,kCAAsB,OAAO,MAAA,CAAC;YAClC,+BAAA,IAAI,iCAAqB,MAAM,MAAA,CAAC;QAClC,CAAC,CAAC,MAAA,CAAC;QAEH,6DAA6D;QAC7D,4DAA4D;QAC5D,6DAA6D;QAC7D,gCAAgC;QAChC,+BAAA,IAAI,qCAAkB,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACvC,+BAAA,IAAI,+BAAY,CAAC,KAAK,CAAC,GA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s b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..80d6f661e40e0a73f9a8a705499a55307161afd0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.mjs @@ -0,0 +1,186 @@ +var _EventStream_instances, _EventStream_connectedPromise, _EventStream_resolveConnectedPromise, _EventStream_rejectConnectedPromise, _EventStream_endPromise, _EventStream_resolveEndPromise, _EventStream_rejectEndPromise, _EventStream_listeners, _EventStream_ended, _EventStream_errored, _EventStream_aborted, _EventStream_catchingPromiseCreated, _EventStream_handleError; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { APIUserAbortError, OpenAIError } from "../error.mjs"; +export class EventStream { + constructor() { + _EventStream_instances.add(this); + this.controller = new AbortController(); + _EventStream_connectedPromise.set(this, void 0); + _EventStream_resolveConnectedPromise.set(this, () => { }); + _EventStream_rejectConnectedPromise.set(this, () => { }); + _EventStream_endPromise.set(this, void 0); + _EventStream_resolveEndPromise.set(this, () => { }); + _EventStream_rejectEndPromise.set(this, () => { }); + _EventStream_listeners.set(this, {}); + _EventStream_ended.set(this, false); + _EventStream_errored.set(this, false); + _EventStream_aborted.set(this, false); + _EventStream_catchingPromiseCreated.set(this, false); + __classPrivateFieldSet(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _EventStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet(this, _EventStream_rejectConnectedPromise, reject, "f"); + }), "f"); + __classPrivateFieldSet(this, _EventStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _EventStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet(this, _EventStream_rejectEndPromise, reject, "f"); + }), "f"); + // Don't let these promises cause unhandled rejection errors. + // we will manually cause an unhandled rejection error later + // if the user hasn't registered any error listener or called + // any promise-returning method. + __classPrivateFieldGet(this, _EventStream_connectedPromise, "f").catch(() => { }); + __classPrivateFieldGet(this, _EventStream_endPromise, "f").catch(() => { }); + } + _run(executor) { + // Unfortunately if we call `executor()` immediately we get runtime errors about + // references to `this` before the `super()` constructor call returns. + setTimeout(() => { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, __classPrivateFieldGet(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); + }, 0); + } + _connected() { + if (this.ended) + return; + __classPrivateFieldGet(this, _EventStream_resolveConnectedPromise, "f").call(this); + this._emit('connect'); + } + get ended() { + return __classPrivateFieldGet(this, _EventStream_ended, "f"); + } + get errored() { + return __classPrivateFieldGet(this, _EventStream_errored, "f"); + } + get aborted() { + return __classPrivateFieldGet(this, _EventStream_aborted, "f"); + } + abort() { + this.controller.abort(); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this ChatCompletionStream, so that calls can be chained + */ + on(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this ChatCompletionStream, so that calls can be chained + */ + off(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventStream_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this ChatCompletionStream, so that calls can be chained + */ + once(event, listener) { + const listeners = __classPrivateFieldGet(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _EventStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + __classPrivateFieldSet(this, _EventStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet(this, _EventStream_endPromise, "f"); + } + _emit(event, ...args) { + // make sure we don't emit any events after end + if (__classPrivateFieldGet(this, _EventStream_ended, "f")) { + return; + } + if (event === 'end') { + __classPrivateFieldSet(this, _EventStream_ended, true, "f"); + __classPrivateFieldGet(this, _EventStream_resolveEndPromise, "f").call(this); + } + const listeners = __classPrivateFieldGet(this, _EventStream_listeners, "f")[event]; + if (listeners) { + __classPrivateFieldGet(this, _EventStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!__classPrivateFieldGet(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + __classPrivateFieldGet(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _EventStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + return; + } + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + const error = args[0]; + if (!__classPrivateFieldGet(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + // Trigger an unhandled rejection if the user hasn't registered any error handlers. + // If you are seeing stack traces here, make sure to handle errors via either: + // - runner.on('error', () => ...) + // - await runner.done() + // - await runner.finalChatCompletion() + // - etc. + Promise.reject(error); + } + __classPrivateFieldGet(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _EventStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { } +} +_EventStream_connectedPromise = new WeakMap(), _EventStream_resolveConnectedPromise = new WeakMap(), _EventStream_rejectConnectedPromise = new WeakMap(), _EventStream_endPromise = new WeakMap(), _EventStream_resolveEndPromise = new WeakMap(), _EventStream_rejectEndPromise = new WeakMap(), _EventStream_listeners = new WeakMap(), _EventStream_ended = new WeakMap(), _EventStream_errored = new WeakMap(), _EventStream_aborted = new WeakMap(), _EventStream_catchingPromiseCreated = new WeakMap(), _EventStream_instances = new WeakSet(), _EventStream_handleError = function _EventStream_handleError(error) { + __classPrivateFieldSet(this, _EventStream_errored, true, "f"); + if (error instanceof Error && error.name === 'AbortError') { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + __classPrivateFieldSet(this, _EventStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof OpenAIError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const openAIError = new OpenAIError(error.message); + // @ts-ignore + openAIError.cause = error; + return this._emit('error', openAIError); + } + return this._emit('error', new OpenAIError(String(error))); +}; +//# sourceMappingURL=EventStream.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..14b66ca026b921b15e6200b01c53cdc83d64ed42 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/EventStream.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"EventStream.mjs","sourceRoot":"","sources":["../src/lib/EventStream.ts"],"names":[],"mappings":";;OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE;AAEzC,MAAM,OAAO,WAAW;IAoBtB;;QAnBA,eAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;QAEpD,gDAAiC;QACjC,+CAAuC,GAAG,EAAE,GAAE,CAAC,EAAC;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AAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAC1D,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAClC,CAAC;IACD,IAAI,KAAK,YAAY,iBAAiB,EAAE,CAAC;QACvC,uBAAA,IAAI,wBAAY,IAAI,MAAA,CAAC;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IACD,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IACD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAgB,IAAI,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChE,aAAa;QACb,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..892e839b59b7b7e17aabf0b00a7f9a525f5ed57d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts @@ -0,0 +1,36 @@ +import type { ChatCompletionTool } from "../resources/chat/completions.mjs"; +import { ResponseTextConfig, type FunctionTool, type ParsedResponse, type Response, type ResponseCreateParamsBase, type ResponseCreateParamsNonStreaming, type ResponseFunctionToolCall, type Tool } from "../resources/responses/responses.mjs"; +import { type AutoParseableTextFormat } from "../lib/parser.mjs"; +export type ParseableToolsParams = Array | ChatCompletionTool | null; +export type ResponseCreateParamsWithTools = ResponseCreateParamsBase & { + tools?: ParseableToolsParams; +}; +type TextConfigParams = { + text?: ResponseTextConfig; +}; +export type ExtractParsedContentFromParams = NonNullable['format'] extends AutoParseableTextFormat ? P : null; +export declare function maybeParseResponse>>(response: Response, params: Params): ParsedResponse; +export declare function parseResponse>(response: Response, params: Params): ParsedResponse; +export declare function hasAutoParseableInput(params: ResponseCreateParamsWithTools): boolean; +type ToolOptions = { + name: string; + arguments: any; + function?: ((args: any) => any) | undefined; +}; +export type AutoParseableResponseTool = FunctionTool & { + __arguments: OptionsT['arguments']; + __name: OptionsT['name']; + $brand: 'auto-parseable-tool'; + $callback: ((args: OptionsT['arguments']) => any) | undefined; + $parseRaw(args: string): OptionsT['arguments']; +}; +export declare function makeParseableResponseTool(tool: FunctionTool, { parser, callback, }: { + parser: (content: string) => OptionsT['arguments']; + callback: ((args: any) => any) | undefined; +}): AutoParseableResponseTool; +export declare function isAutoParsableTool(tool: any): tool is AutoParseableResponseTool; +export declare function shouldParseToolCall(params: ResponseCreateParamsNonStreaming | null | undefined, toolCall: ResponseFunctionToolCall): boolean; +export declare function validateInputTools(tools: ChatCompletionTool[] | undefined): void; +export declare function addOutputText(rsp: Response): void; +export {}; +//# sourceMappingURL=ResponsesParser.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d9868593d80a06193c41151abf588bc0d763c99e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"ResponsesParser.d.mts","sourceRoot":"","sources":["../src/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C,KAAK,EAAE,kBAAkB,EAAE,GAAG,SAAS,QAczE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAejD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..89488440848fee92efa15758230c9fa586c51656 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts @@ -0,0 +1,36 @@ +import type { ChatCompletionTool } from "../resources/chat/completions.js"; +import { ResponseTextConfig, type FunctionTool, type ParsedResponse, type Response, type ResponseCreateParamsBase, type ResponseCreateParamsNonStreaming, type ResponseFunctionToolCall, type Tool } from "../resources/responses/responses.js"; +import { type AutoParseableTextFormat } from "../lib/parser.js"; +export type ParseableToolsParams = Array | ChatCompletionTool | null; +export type ResponseCreateParamsWithTools = ResponseCreateParamsBase & { + tools?: ParseableToolsParams; +}; +type TextConfigParams = { + text?: ResponseTextConfig; +}; +export type ExtractParsedContentFromParams = NonNullable['format'] extends AutoParseableTextFormat ? P : null; +export declare function maybeParseResponse>>(response: Response, params: Params): ParsedResponse; +export declare function parseResponse>(response: Response, params: Params): ParsedResponse; +export declare function hasAutoParseableInput(params: ResponseCreateParamsWithTools): boolean; +type ToolOptions = { + name: string; + arguments: any; + function?: ((args: any) => any) | undefined; +}; +export type AutoParseableResponseTool = FunctionTool & { + __arguments: OptionsT['arguments']; + __name: OptionsT['name']; + $brand: 'auto-parseable-tool'; + $callback: ((args: OptionsT['arguments']) => any) | undefined; + $parseRaw(args: string): OptionsT['arguments']; +}; +export declare function makeParseableResponseTool(tool: FunctionTool, { parser, callback, }: { + parser: (content: string) => OptionsT['arguments']; + callback: ((args: any) => any) | undefined; +}): AutoParseableResponseTool; +export declare function isAutoParsableTool(tool: any): tool is AutoParseableResponseTool; +export declare function shouldParseToolCall(params: ResponseCreateParamsNonStreaming | null | undefined, toolCall: ResponseFunctionToolCall): boolean; +export declare function validateInputTools(tools: ChatCompletionTool[] | undefined): void; +export declare function addOutputText(rsp: Response): void; +export {}; +//# sourceMappingURL=ResponsesParser.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f50cdfb4a4e9536f507211b7802e6e9c43ca464a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ResponsesParser.d.ts","sourceRoot":"","sources":["../src/lib/ResponsesParser.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,kBAAkB,EAAE;OAC3B,EACL,kBAAkB,EAClB,KAAK,YAAY,EAEjB,KAAK,cAAc,EAGnB,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,wBAAwB,EAC7B,KAAK,IAAI,EACV;OACM,EAAE,KAAK,uBAAuB,EAAgC;AAErE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,GAAG;IACrE,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAAE,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,8BAA8B,CAAC,MAAM,SAAS,gBAAgB,IACxE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,uBAAuB,CAAC,MAAM,CAAC,CAAC,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AS,WAAW,EACpE,IAAI,EAAE,YAAY,EAClB,EACE,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,SAAS,CAAC;CAC5C,GACA,yBAAyB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAmBlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,yBAAyB,CAAC,GAAG,CAAC,CAEpF;AAwBD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gCAAgC,GAAG,IAAI,GAAG,SAAS,EAC3D,QAAQ,EAAE,wBAAwB,GACjC,OAAO,CAOT;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,SAAS,QAczE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAejD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js new file mode 100644 index 0000000000000000000000000000000000000000..a55adfba1b1620f2c178917e457e7cfba331f03b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js @@ -0,0 +1,170 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.maybeParseResponse = maybeParseResponse; +exports.parseResponse = parseResponse; +exports.hasAutoParseableInput = hasAutoParseableInput; +exports.makeParseableResponseTool = makeParseableResponseTool; +exports.isAutoParsableTool = isAutoParsableTool; +exports.shouldParseToolCall = shouldParseToolCall; +exports.validateInputTools = validateInputTools; +exports.addOutputText = addOutputText; +const error_1 = require("../error.js"); +const parser_1 = require("../lib/parser.js"); +function maybeParseResponse(response, params) { + if (!params || !hasAutoParseableInput(params)) { + return { + ...response, + output_parsed: null, + output: response.output.map((item) => { + if (item.type === 'function_call') { + return { + ...item, + parsed_arguments: null, + }; + } + if (item.type === 'message') { + return { + ...item, + content: item.content.map((content) => ({ + ...content, + parsed: null, + })), + }; + } + else { + return item; + } + }), + }; + } + return parseResponse(response, params); +} +function parseResponse(response, params) { + const output = response.output.map((item) => { + if (item.type === 'function_call') { + return { + ...item, + parsed_arguments: parseToolCall(params, item), + }; + } + if (item.type === 'message') { + const content = item.content.map((content) => { + if (content.type === 'output_text') { + return { + ...content, + parsed: parseTextFormat(params, content.text), + }; + } + return content; + }); + return { + ...item, + content, + }; + } + return item; + }); + const parsed = Object.assign({}, response, { output }); + if (!Object.getOwnPropertyDescriptor(response, 'output_text')) { + addOutputText(parsed); + } + Object.defineProperty(parsed, 'output_parsed', { + enumerable: true, + get() { + for (const output of parsed.output) { + if (output.type !== 'message') { + continue; + } + for (const content of output.content) { + if (content.type === 'output_text' && content.parsed !== null) { + return content.parsed; + } + } + } + return null; + }, + }); + return parsed; +} +function parseTextFormat(params, content) { + if (params.text?.format?.type !== 'json_schema') { + return null; + } + if ('$parseRaw' in params.text?.format) { + const text_format = params.text?.format; + return text_format.$parseRaw(content); + } + return JSON.parse(content); +} +function hasAutoParseableInput(params) { + if ((0, parser_1.isAutoParsableResponseFormat)(params.text?.format)) { + return true; + } + return false; +} +function makeParseableResponseTool(tool, { parser, callback, }) { + const obj = { ...tool }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-tool', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + $callback: { + value: callback, + enumerable: false, + }, + }); + return obj; +} +function isAutoParsableTool(tool) { + return tool?.['$brand'] === 'auto-parseable-tool'; +} +function getInputToolByName(input_tools, name) { + return input_tools.find((tool) => tool.type === 'function' && tool.name === name); +} +function parseToolCall(params, toolCall) { + const inputTool = getInputToolByName(params.tools ?? [], toolCall.name); + return { + ...toolCall, + ...toolCall, + parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.arguments) + : inputTool?.strict ? JSON.parse(toolCall.arguments) + : null, + }; +} +function shouldParseToolCall(params, toolCall) { + if (!params) { + return false; + } + const inputTool = getInputToolByName(params.tools ?? [], toolCall.name); + return isAutoParsableTool(inputTool) || inputTool?.strict || false; +} +function validateInputTools(tools) { + for (const tool of tools ?? []) { + if (tool.type !== 'function') { + throw new error_1.OpenAIError(`Currently only \`function\` tool types support auto-parsing; Received \`${tool.type}\``); + } + if (tool.function.strict !== true) { + throw new error_1.OpenAIError(`The \`${tool.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`); + } + } +} +function addOutputText(rsp) { + const texts = []; + for (const output of rsp.output) { + if (output.type !== 'message') { + continue; + } + for (const content of output.content) { + if (content.type === 'output_text') { + texts.push(content.text); + } + } + } + rsp.output_text = texts.join(''); +} +//# sourceMappingURL=ResponsesParser.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6a17da06cc7b92191a4cc625ee93475e92059539 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ResponsesParser.js","sourceRoot":"","sources":["../src/lib/ResponsesParser.ts"],"names":[],"mappings":";;AA4BA,gDAgCC;AAED,sCA2DC;AAkBD,sDAMC;AAoBD,8DA4BC;AAED,gDAEC;AAwBD,kDAUC;AAED,gDAcC;AAED,sCAeC;AAxQD,uCAAuC;AAevC,6CAA2F;AAa3F,SAAgB,kBAAkB,CAGhC,QAAkB,EAAE,MAAc;IAClC,IAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAA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AAE,CAAC;QAChC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,SAAS;QACX,CAAC;QAED,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;gBACnC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAED,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs new file mode 100644 index 0000000000000000000000000000000000000000..874a88e97f620db762009245454b5f017ebab0ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs @@ -0,0 +1,160 @@ +import { OpenAIError } from "../error.mjs"; +import { isAutoParsableResponseFormat } from "../lib/parser.mjs"; +export function maybeParseResponse(response, params) { + if (!params || !hasAutoParseableInput(params)) { + return { + ...response, + output_parsed: null, + output: response.output.map((item) => { + if (item.type === 'function_call') { + return { + ...item, + parsed_arguments: null, + }; + } + if (item.type === 'message') { + return { + ...item, + content: item.content.map((content) => ({ + ...content, + parsed: null, + })), + }; + } + else { + return item; + } + }), + }; + } + return parseResponse(response, params); +} +export function parseResponse(response, params) { + const output = response.output.map((item) => { + if (item.type === 'function_call') { + return { + ...item, + parsed_arguments: parseToolCall(params, item), + }; + } + if (item.type === 'message') { + const content = item.content.map((content) => { + if (content.type === 'output_text') { + return { + ...content, + parsed: parseTextFormat(params, content.text), + }; + } + return content; + }); + return { + ...item, + content, + }; + } + return item; + }); + const parsed = Object.assign({}, response, { output }); + if (!Object.getOwnPropertyDescriptor(response, 'output_text')) { + addOutputText(parsed); + } + Object.defineProperty(parsed, 'output_parsed', { + enumerable: true, + get() { + for (const output of parsed.output) { + if (output.type !== 'message') { + continue; + } + for (const content of output.content) { + if (content.type === 'output_text' && content.parsed !== null) { + return content.parsed; + } + } + } + return null; + }, + }); + return parsed; +} +function parseTextFormat(params, content) { + if (params.text?.format?.type !== 'json_schema') { + return null; + } + if ('$parseRaw' in params.text?.format) { + const text_format = params.text?.format; + return text_format.$parseRaw(content); + } + return JSON.parse(content); +} +export function hasAutoParseableInput(params) { + if (isAutoParsableResponseFormat(params.text?.format)) { + return true; + } + return false; +} +export function makeParseableResponseTool(tool, { parser, callback, }) { + const obj = { ...tool }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-tool', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + $callback: { + value: callback, + enumerable: false, + }, + }); + return obj; +} +export function isAutoParsableTool(tool) { + return tool?.['$brand'] === 'auto-parseable-tool'; +} +function getInputToolByName(input_tools, name) { + return input_tools.find((tool) => tool.type === 'function' && tool.name === name); +} +function parseToolCall(params, toolCall) { + const inputTool = getInputToolByName(params.tools ?? [], toolCall.name); + return { + ...toolCall, + ...toolCall, + parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.arguments) + : inputTool?.strict ? JSON.parse(toolCall.arguments) + : null, + }; +} +export function shouldParseToolCall(params, toolCall) { + if (!params) { + return false; + } + const inputTool = getInputToolByName(params.tools ?? [], toolCall.name); + return isAutoParsableTool(inputTool) || inputTool?.strict || false; +} +export function validateInputTools(tools) { + for (const tool of tools ?? []) { + if (tool.type !== 'function') { + throw new OpenAIError(`Currently only \`function\` tool types support auto-parsing; Received \`${tool.type}\``); + } + if (tool.function.strict !== true) { + throw new OpenAIError(`The \`${tool.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`); + } + } +} +export function addOutputText(rsp) { + const texts = []; + for (const output of rsp.output) { + if (output.type !== 'message') { + continue; + } + for (const content of output.content) { + if (content.type === 'output_text') { + texts.push(content.text); + } + } + } + rsp.output_text = texts.join(''); +} +//# sourceMappingURL=ResponsesParser.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1459be72972e3d47959098048511019a2165656a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/ResponsesParser.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"ResponsesParser.mjs","sourceRoot":"","sources":["../src/lib/ResponsesParser.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;OAef,EAAgC,4BAA4B,EAAE;AAarE,MAAM,UAAU,kBAAkB,CAGhC,QAAkB,EAAE,MAAc;IAClC,IAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,OAAO;YACL,GAAG,QAAQ;YACX,aAAa,EAAE,IAAI;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACnC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;oBAClC,OAAO;wBACL,GAAG,IAAI;wBACP,gBAAgB,EAAE,IAAI;qBACvB,CAAC;gBACJ,CAAC;gBAED,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC5B,OAAO;wBACL,GAAG,IAAI;wBACP,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;4BACtC,GAAG,OAAO;4BACV,MAAM,EAAE,IAAI;yBACb,CAAC,CAAC;qBACJ,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAI,CAAC;gBACd,C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AAC,IAAI,CAAC,CAAC;IACxE,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,SAAS,EAAE,MAAM,IAAI,KAAK,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAuC;IACxE,KAAK,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM,IAAI,WAAW,CACnB,2EAA2E,IAAI,CAAC,IAAI,IAAI,CACzF,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,WAAW,CACnB,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,4FAA4F,CACxH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAa;IACzC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAChC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,SAAS;QACX,CAAC;QAED,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;gBACnC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAED,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8aafaaf8bb69df408088551bbda8444e944513bb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts @@ -0,0 +1,83 @@ +import { type ChatCompletionRunner } from "./ChatCompletionRunner.mjs"; +import { type ChatCompletionStreamingRunner } from "./ChatCompletionStreamingRunner.mjs"; +import { JSONSchema } from "./jsonschema.mjs"; +type PromiseOrValue = T | Promise; +export type RunnableFunctionWithParse = { + /** + * @param args the return value from `parse`. + * @param runner the runner evaluating this callback. + * @returns a string to send back to OpenAI. + */ + function: (args: Args, runner: ChatCompletionRunner | ChatCompletionStreamingRunner) => PromiseOrValue; + /** + * @param input the raw args from the OpenAI function call. + * @returns the parsed arguments to pass to `function` + */ + parse: (input: string) => PromiseOrValue; + /** + * The parameters the function accepts, describes as a JSON Schema object. + */ + parameters: JSONSchema; + /** + * A description of what the function does, used by the model to choose when and how to call the function. + */ + description: string; + /** + * The name of the function to be called. Will default to function.name if omitted. + */ + name?: string | undefined; + strict?: boolean | undefined; +}; +export type RunnableFunctionWithoutParse = { + /** + * @param args the raw args from the OpenAI function call. + * @returns a string to send back to OpenAI + */ + function: (args: string, runner: ChatCompletionRunner | ChatCompletionStreamingRunner) => PromiseOrValue; + /** + * The parameters the function accepts, describes as a JSON Schema object. + */ + parameters: JSONSchema; + /** + * A description of what the function does, used by the model to choose when and how to call the function. + */ + description: string; + /** + * The name of the function to be called. Will default to function.name if omitted. + */ + name?: string | undefined; + strict?: boolean | undefined; +}; +export type RunnableFunction = Args extends string ? RunnableFunctionWithoutParse : Args extends object ? RunnableFunctionWithParse : never; +export type RunnableToolFunction = Args extends string ? RunnableToolFunctionWithoutParse : Args extends object ? RunnableToolFunctionWithParse : never; +export type RunnableToolFunctionWithoutParse = { + type: 'function'; + function: RunnableFunctionWithoutParse; +}; +export type RunnableToolFunctionWithParse = { + type: 'function'; + function: RunnableFunctionWithParse; +}; +export declare function isRunnableFunctionWithParse(fn: any): fn is RunnableFunctionWithParse; +export type BaseFunctionsArgs = readonly (object | string)[]; +export type RunnableFunctions = [ + any[] +] extends [FunctionsArgs] ? readonly RunnableFunction[] : { + [Index in keyof FunctionsArgs]: Index extends number ? RunnableFunction : FunctionsArgs[Index]; +}; +export type RunnableTools = [ + any[] +] extends [FunctionsArgs] ? readonly RunnableToolFunction[] : { + [Index in keyof FunctionsArgs]: Index extends number ? RunnableToolFunction : FunctionsArgs[Index]; +}; +/** + * This is helper class for passing a `function` and `parse` where the `function` + * argument type matches the `parse` return type. + */ +export declare class ParsingToolFunction { + type: 'function'; + function: RunnableFunctionWithParse; + constructor(input: RunnableFunctionWithParse); +} +export {}; +//# sourceMappingURL=RunnableFunction.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..100e090c7171ab87e6515e961be762183ab147be --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"RunnableFunction.d.mts","sourceRoot":"","sources":["../src/lib/RunnableFunction.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,oBAAoB,EAAE;OAC7B,EAAE,KAAK,6BAA6B,EAAE;OACtC,EAAE,UAAU,EAAE;AAErB,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAExC,MAAM,MAAM,yBAAyB,CAAC,IAAI,SAAS,MAAM,IAAI;IAC3D;;;;OAIG;IACH,QAAQ,EAAE,CACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,OAAO,CAAC,KAC3E,cAAc,CAAC,OAAO,CAAC,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,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,QAAQ,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;CAC3C,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,IAAI,SAAS,MAAM,EAC7D,EAAE,EAAE,GAAG,GACN,EAAE,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAEvC;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE7D,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IACnE;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,SAAS,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAChE;KACG,KAAK,IAAI,MAAM,aAAa,GAAG,KAAK,SAAS,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC3F,aAAa,CAAC,KAAK,CAAC;CACvB,CAAC;AAEN,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAC/D;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,SAAS,oBAAoB,CAAC,GAAG,CAAC,EAAE,GACpE;KACG,KAAK,IAAI,MAAM,aAAa,GAAG,KAAK,SAAS,MAAM,GAAG,oBAAoB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC/F,aAAa,CAAC,KAAK,CAAC;CACvB,CAAC;AAEN;;;GAGG;AACH,qBAAa,mBAAmB,CAAC,IAAI,SAAS,MAAM;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;gBAE9B,KAAK,EAAE,yBAAyB,CAAC,IAAI,CAAC;CAInD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d00d58b122837769a8f554298ca2f6f0c1e025a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts @@ -0,0 +1,83 @@ +import { type ChatCompletionRunner } from "./ChatCompletionRunner.js"; +import { type ChatCompletionStreamingRunner } from "./ChatCompletionStreamingRunner.js"; +import { JSONSchema } from "./jsonschema.js"; +type PromiseOrValue = T | Promise; +export type RunnableFunctionWithParse = { + /** + * @param args the return value from `parse`. + * @param runner the runner evaluating this callback. + * @returns a string to send back to OpenAI. + */ + function: (args: Args, runner: ChatCompletionRunner | ChatCompletionStreamingRunner) => PromiseOrValue; + /** + * @param input the raw args from the OpenAI function call. + * @returns the parsed arguments to pass to `function` + */ + parse: (input: string) => PromiseOrValue; + /** + * The parameters the function accepts, describes as a JSON Schema object. + */ + parameters: JSONSchema; + /** + * A description of what the function does, used by the model to choose when and how to call the function. + */ + description: string; + /** + * The name of the function to be called. Will default to function.name if omitted. + */ + name?: string | undefined; + strict?: boolean | undefined; +}; +export type RunnableFunctionWithoutParse = { + /** + * @param args the raw args from the OpenAI function call. + * @returns a string to send back to OpenAI + */ + function: (args: string, runner: ChatCompletionRunner | ChatCompletionStreamingRunner) => PromiseOrValue; + /** + * The parameters the function accepts, describes as a JSON Schema object. + */ + parameters: JSONSchema; + /** + * A description of what the function does, used by the model to choose when and how to call the function. + */ + description: string; + /** + * The name of the function to be called. Will default to function.name if omitted. + */ + name?: string | undefined; + strict?: boolean | undefined; +}; +export type RunnableFunction = Args extends string ? RunnableFunctionWithoutParse : Args extends object ? RunnableFunctionWithParse : never; +export type RunnableToolFunction = Args extends string ? RunnableToolFunctionWithoutParse : Args extends object ? RunnableToolFunctionWithParse : never; +export type RunnableToolFunctionWithoutParse = { + type: 'function'; + function: RunnableFunctionWithoutParse; +}; +export type RunnableToolFunctionWithParse = { + type: 'function'; + function: RunnableFunctionWithParse; +}; +export declare function isRunnableFunctionWithParse(fn: any): fn is RunnableFunctionWithParse; +export type BaseFunctionsArgs = readonly (object | string)[]; +export type RunnableFunctions = [ + any[] +] extends [FunctionsArgs] ? readonly RunnableFunction[] : { + [Index in keyof FunctionsArgs]: Index extends number ? RunnableFunction : FunctionsArgs[Index]; +}; +export type RunnableTools = [ + any[] +] extends [FunctionsArgs] ? readonly RunnableToolFunction[] : { + [Index in keyof FunctionsArgs]: Index extends number ? RunnableToolFunction : FunctionsArgs[Index]; +}; +/** + * This is helper class for passing a `function` and `parse` where the `function` + * argument type matches the `parse` return type. + */ +export declare class ParsingToolFunction { + type: 'function'; + function: RunnableFunctionWithParse; + constructor(input: RunnableFunctionWithParse); +} +export {}; +//# sourceMappingURL=RunnableFunction.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..02cfa15980de707d34e3e50d00d77d99326f9cdd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"RunnableFunction.d.ts","sourceRoot":"","sources":["../src/lib/RunnableFunction.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,oBAAoB,EAAE;OAC7B,EAAE,KAAK,6BAA6B,EAAE;OACtC,EAAE,UAAU,EAAE;AAErB,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAExC,MAAM,MAAM,yBAAyB,CAAC,IAAI,SAAS,MAAM,IAAI;IAC3D;;;;OAIG;IACH,QAAQ,EAAE,CACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,OAAO,CAAC,KAC3E,cAAc,CAAC,OAAO,CAAC,CAAC;IAC7B;;;OAGG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,UAAU,CAAC;IACjB,QAAQ,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;CAC3C,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,IAAI,SAAS,MAAM,EAC7D,EAAE,EAAE,GAAG,GACN,EAAE,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAEvC;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE7D,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IACnE;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,SAAS,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAChE;KACG,KAAK,IAAI,MAAM,aAAa,GAAG,KAAK,SAAS,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC3F,aAAa,CAAC,KAAK,CAAC;CACvB,CAAC;AAEN,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAC/D;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,SAAS,oBAAoB,CAAC,GAAG,CAAC,EAAE,GACpE;KACG,KAAK,IAAI,MAAM,aAAa,GAAG,KAAK,SAAS,MAAM,GAAG,oBAAoB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC/F,aAAa,CAAC,KAAK,CAAC;CACvB,CAAC;AAEN;;;GAGG;AACH,qBAAa,mBAAmB,CAAC,IAAI,SAAS,MAAM;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;gBAE9B,KAAK,EAAE,yBAAyB,CAAC,IAAI,CAAC;CAInD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js new file mode 100644 index 0000000000000000000000000000000000000000..c628bb73124475892f6bb79fb3b83ff8c578f747 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ParsingToolFunction = void 0; +exports.isRunnableFunctionWithParse = isRunnableFunctionWithParse; +function isRunnableFunctionWithParse(fn) { + return typeof fn.parse === 'function'; +} +/** + * This is helper class for passing a `function` and `parse` where the `function` + * argument type matches the `parse` return type. + */ +class ParsingToolFunction { + constructor(input) { + this.type = 'function'; + this.function = input; + } +} +exports.ParsingToolFunction = ParsingToolFunction; +//# sourceMappingURL=RunnableFunction.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f354264dd5b2c1be65463366637d72cc4f4b9517 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RunnableFunction.js","sourceRoot":"","sources":["../src/lib/RunnableFunction.ts"],"names":[],"mappings":";;;AA+EA,kEAIC;AAJD,SAAgB,2BAA2B,CACzC,EAAO;IAEP,OAAO,OAAQ,EAAU,CAAC,KAAK,KAAK,UAAU,CAAC;AACjD,CAAC;AAkBD;;;GAGG;AACH,MAAa,mBAAmB;IAI9B,YAAY,KAAsC;QAChD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;CACF;AARD,kDAQC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs new file mode 100644 index 0000000000000000000000000000000000000000..33a0ba258d20c62a9588a3bd7f8701facd60d22f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs @@ -0,0 +1,14 @@ +export function isRunnableFunctionWithParse(fn) { + return typeof fn.parse === 'function'; +} +/** + * This is helper class for passing a `function` and `parse` where the `function` + * argument type matches the `parse` return type. + */ +export class ParsingToolFunction { + constructor(input) { + this.type = 'function'; + this.function = input; + } +} +//# sourceMappingURL=RunnableFunction.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6da32c23990eff9782bdc4f46f014c5c589ff1ef --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/RunnableFunction.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"RunnableFunction.mjs","sourceRoot":"","sources":["../src/lib/RunnableFunction.ts"],"names":[],"mappings":"AA+EA,MAAM,UAAU,2BAA2B,CACzC,EAAO;IAEP,OAAO,OAAQ,EAAU,CAAC,KAAK,KAAK,UAAU,CAAC;AACjD,CAAC;AAkBD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAI9B,YAAY,KAAsC;QAChD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c36a20ed21473b29aa5e08357d073898235d4918 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts @@ -0,0 +1,5 @@ +/** + * Like `Promise.allSettled()` but throws an error if any promises are rejected. + */ +export declare const allSettledWithThrow: (promises: Promise[]) => Promise; +//# sourceMappingURL=Util.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..42fda6eb9a2e1bc9e548c9b45855ea6f995ac723 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"Util.d.mts","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,UAAU,OAAO,CAAC,CAAC,CAAC,EAAE,KAAG,OAAO,CAAC,CAAC,EAAE,CAmBhF,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e68f2b6895bf38c9d9304bef8e6169b63b23c4c9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts @@ -0,0 +1,5 @@ +/** + * Like `Promise.allSettled()` but throws an error if any promises are rejected. + */ +export declare const allSettledWithThrow: (promises: Promise[]) => Promise; +//# sourceMappingURL=Util.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..01bb37a26ba819ac19722276dd18ff26b4109f6f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,UAAU,OAAO,CAAC,CAAC,CAAC,EAAE,KAAG,OAAO,CAAC,CAAC,EAAE,CAmBhF,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js new file mode 100644 index 0000000000000000000000000000000000000000..cf581f7ba2d812ef6d46b17c7c66e130b1a02117 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.allSettledWithThrow = void 0; +/** + * Like `Promise.allSettled()` but throws an error if any promises are rejected. + */ +const allSettledWithThrow = async (promises) => { + const results = await Promise.allSettled(promises); + const rejected = results.filter((result) => result.status === 'rejected'); + if (rejected.length) { + for (const result of rejected) { + console.error(result.reason); + } + throw new Error(`${rejected.length} promise(s) failed - see the above errors`); + } + // Note: TS was complaining about using `.filter().map()` here for some reason + const values = []; + for (const result of results) { + if (result.status === 'fulfilled') { + values.push(result.value); + } + } + return values; +}; +exports.allSettledWithThrow = allSettledWithThrow; +//# sourceMappingURL=Util.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0f114ff358ca51435a9abe405c7c8a410b24793c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Util.js","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,mBAAmB,GAAG,KAAK,EAAK,QAAsB,EAAgB,EAAE;IACnF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAmC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;IAC3G,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,2CAA2C,CAAC,CAAC;IACjF,CAAC;IAED,8EAA8E;IAC9E,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs new file mode 100644 index 0000000000000000000000000000000000000000..845a138e83a198c3635f5918f38b39d069ee669d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs @@ -0,0 +1,22 @@ +/** + * Like `Promise.allSettled()` but throws an error if any promises are rejected. + */ +export const allSettledWithThrow = async (promises) => { + const results = await Promise.allSettled(promises); + const rejected = results.filter((result) => result.status === 'rejected'); + if (rejected.length) { + for (const result of rejected) { + console.error(result.reason); + } + throw new Error(`${rejected.length} promise(s) failed - see the above errors`); + } + // Note: TS was complaining about using `.filter().map()` here for some reason + const values = []; + for (const result of results) { + if (result.status === 'fulfilled') { + values.push(result.value); + } + } + return values; +}; +//# sourceMappingURL=Util.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c8c2031dc457658dd4b2356fd09c5b79bce0c2fc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/Util.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"Util.mjs","sourceRoot":"","sources":["../src/lib/Util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAK,QAAsB,EAAgB,EAAE;IACnF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAmC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;IAC3G,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,2CAA2C,CAAC,CAAC;IACjF,CAAC;IAED,8EAA8E;IAC9E,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..26d0e0da79c6bf62ff8c9e965ae192622549dd43 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts @@ -0,0 +1,5 @@ +import { type ChatCompletionAssistantMessageParam, type ChatCompletionMessageParam, type ChatCompletionToolMessageParam } from "../resources.mjs"; +export declare const isAssistantMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionAssistantMessageParam; +export declare const isToolMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionToolMessageParam; +export declare function isPresent(obj: T | null | undefined): obj is T; +//# sourceMappingURL=chatCompletionUtils.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..9654352867b95fbac40fa3c1b3832e5ab8ec1d10 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"chatCompletionUtils.d.mts","sourceRoot":"","sources":["../src/lib/chatCompletionUtils.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACpC;AAED,eAAO,MAAM,kBAAkB,GAC7B,SAAS,0BAA0B,GAAG,IAAI,GAAG,SAAS,KACrD,OAAO,IAAI,mCAEb,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,SAAS,0BAA0B,GAAG,IAAI,GAAG,SAAS,KACrD,OAAO,IAAI,8BAEb,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,GAAG,IAAI,CAAC,CAEhE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..19371371ec41f4bd432333c4ec2b99eca1cbd6d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts @@ -0,0 +1,5 @@ +import { type ChatCompletionAssistantMessageParam, type ChatCompletionMessageParam, type ChatCompletionToolMessageParam } from "../resources.js"; +export declare const isAssistantMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionAssistantMessageParam; +export declare const isToolMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionToolMessageParam; +export declare function isPresent(obj: T | null | undefined): obj is T; +//# sourceMappingURL=chatCompletionUtils.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..56d4b5ddf4eaea1a58eb0e4ea302c77212c008ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"chatCompletionUtils.d.ts","sourceRoot":"","sources":["../src/lib/chatCompletionUtils.ts"],"names":[],"mappings":"OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACpC;AAED,eAAO,MAAM,kBAAkB,GAC7B,SAAS,0BAA0B,GAAG,IAAI,GAAG,SAAS,KACrD,OAAO,IAAI,mCAEb,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,SAAS,0BAA0B,GAAG,IAAI,GAAG,SAAS,KACrD,OAAO,IAAI,8BAEb,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,GAAG,IAAI,CAAC,CAEhE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..f554aba3b1da9c321bdda57e80ad432d51bcd0e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isToolMessage = exports.isAssistantMessage = void 0; +exports.isPresent = isPresent; +const isAssistantMessage = (message) => { + return message?.role === 'assistant'; +}; +exports.isAssistantMessage = isAssistantMessage; +const isToolMessage = (message) => { + return message?.role === 'tool'; +}; +exports.isToolMessage = isToolMessage; +function isPresent(obj) { + return obj != null; +} +//# sourceMappingURL=chatCompletionUtils.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1f9874e6e481acd1d26d57856867c0f5dbf4fc3d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chatCompletionUtils.js","sourceRoot":"","sources":["../src/lib/chatCompletionUtils.ts"],"names":[],"mappings":";;;AAkBA,8BAEC;AAdM,MAAM,kBAAkB,GAAG,CAChC,OAAsD,EACN,EAAE;IAClD,OAAO,OAAO,EAAE,IAAI,KAAK,WAAW,CAAC;AACvC,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B;AAEK,MAAM,aAAa,GAAG,CAC3B,OAAsD,EACX,EAAE;IAC7C,OAAO,OAAO,EAAE,IAAI,KAAK,MAAM,CAAC;AAClC,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEF,SAAgB,SAAS,CAAI,GAAyB;IACpD,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs new file mode 100644 index 0000000000000000000000000000000000000000..84be6372014e3f2d8071c62f9cea1a7e6d7727ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs @@ -0,0 +1,10 @@ +export const isAssistantMessage = (message) => { + return message?.role === 'assistant'; +}; +export const isToolMessage = (message) => { + return message?.role === 'tool'; +}; +export function isPresent(obj) { + return obj != null; +} +//# sourceMappingURL=chatCompletionUtils.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6fe97a21b8651c5bf0c413157f4a9cd031cf39dc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/chatCompletionUtils.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"chatCompletionUtils.mjs","sourceRoot":"","sources":["../src/lib/chatCompletionUtils.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAsD,EACN,EAAE;IAClD,OAAO,OAAO,EAAE,IAAI,KAAK,WAAW,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,OAAsD,EACX,EAAE;IAC7C,OAAO,OAAO,EAAE,IAAI,KAAK,MAAM,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,UAAU,SAAS,CAAI,GAAyB;IACpD,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8f27e7718ba79344794733088decf1e16e14a5c9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts @@ -0,0 +1,106 @@ +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchemaTypeName = ({} & string) | 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null'; +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchemaType = string | number | boolean | JSONSchemaObject | JSONSchemaArray | null; +export interface JSONSchemaObject { + [key: string]: JSONSchemaType; +} +export interface JSONSchemaArray extends Array { +} +/** + * Meta schema + * + * Recommended values: + * - 'http://json-schema.org/schema#' + * - 'http://json-schema.org/hyper-schema#' + * - 'http://json-schema.org/draft-07/schema#' + * - 'http://json-schema.org/draft-07/hyper-schema#' + * + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 + */ +export type JSONSchemaVersion = string; +/** + * JSON Schema v7 + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 + */ +export type JSONSchemaDefinition = JSONSchema | boolean; +export interface JSONSchema { + $id?: string | undefined; + $comment?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1 + */ + type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined; + enum?: JSONSchemaType[] | undefined; + const?: JSONSchemaType | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2 + */ + multipleOf?: number | undefined; + maximum?: number | undefined; + exclusiveMaximum?: number | undefined; + minimum?: number | undefined; + exclusiveMinimum?: number | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3 + */ + maxLength?: number | undefined; + minLength?: number | undefined; + pattern?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4 + */ + items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined; + additionalItems?: JSONSchemaDefinition | undefined; + maxItems?: number | undefined; + minItems?: number | undefined; + uniqueItems?: boolean | undefined; + contains?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5 + */ + maxProperties?: number | undefined; + minProperties?: number | undefined; + required?: string[] | undefined; + properties?: { + [key: string]: JSONSchemaDefinition; + } | undefined; + patternProperties?: { + [key: string]: JSONSchemaDefinition; + } | undefined; + additionalProperties?: JSONSchemaDefinition | undefined; + propertyNames?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6 + */ + if?: JSONSchemaDefinition | undefined; + then?: JSONSchemaDefinition | undefined; + else?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7 + */ + allOf?: JSONSchemaDefinition[] | undefined; + anyOf?: JSONSchemaDefinition[] | undefined; + oneOf?: JSONSchemaDefinition[] | undefined; + not?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 + */ + format?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10 + */ + title?: string | undefined; + description?: string | undefined; + default?: JSONSchemaType | undefined; + readOnly?: boolean | undefined; + writeOnly?: boolean | undefined; + examples?: JSONSchemaType | undefined; +} +//# sourceMappingURL=jsonschema.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..f023c8789048513c1e6743011b717d65c8b3ea78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonschema.d.mts","sourceRoot":"","sources":["../src/lib/jsonschema.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,EAAE,GAAG,MAAM,CAAC,GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,IAAI,CAAC;AAGT,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC;CAC/B;AAID,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC;CAAG;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,M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,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EACP;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;KACrC,GACD,SAAS,CAAC;IACd,iBAAiB,CAAC,EACd;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;KACrC,GACD,SAAS,CAAC;IACd,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACxD,aAAa,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAEjD;;OAEG;IACH,EAAE,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACtC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAEvC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACvC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a569e988ccd6a70cf18e659d3410ef0a2160ffc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts @@ -0,0 +1,106 @@ +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchemaTypeName = ({} & string) | 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null'; +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchemaType = string | number | boolean | JSONSchemaObject | JSONSchemaArray | null; +export interface JSONSchemaObject { + [key: string]: JSONSchemaType; +} +export interface JSONSchemaArray extends Array { +} +/** + * Meta schema + * + * Recommended values: + * - 'http://json-schema.org/schema#' + * - 'http://json-schema.org/hyper-schema#' + * - 'http://json-schema.org/draft-07/schema#' + * - 'http://json-schema.org/draft-07/hyper-schema#' + * + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 + */ +export type JSONSchemaVersion = string; +/** + * JSON Schema v7 + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 + */ +export type JSONSchemaDefinition = JSONSchema | boolean; +export interface JSONSchema { + $id?: string | undefined; + $comment?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1 + */ + type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined; + enum?: JSONSchemaType[] | undefined; + const?: JSONSchemaType | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2 + */ + multipleOf?: number | undefined; + maximum?: number | undefined; + exclusiveMaximum?: number | undefined; + minimum?: number | undefined; + exclusiveMinimum?: number | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3 + */ + maxLength?: number | undefined; + minLength?: number | undefined; + pattern?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4 + */ + items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined; + additionalItems?: JSONSchemaDefinition | undefined; + maxItems?: number | undefined; + minItems?: number | undefined; + uniqueItems?: boolean | undefined; + contains?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5 + */ + maxProperties?: number | undefined; + minProperties?: number | undefined; + required?: string[] | undefined; + properties?: { + [key: string]: JSONSchemaDefinition; + } | undefined; + patternProperties?: { + [key: string]: JSONSchemaDefinition; + } | undefined; + additionalProperties?: JSONSchemaDefinition | undefined; + propertyNames?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6 + */ + if?: JSONSchemaDefinition | undefined; + then?: JSONSchemaDefinition | undefined; + else?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7 + */ + allOf?: JSONSchemaDefinition[] | undefined; + anyOf?: JSONSchemaDefinition[] | undefined; + oneOf?: JSONSchemaDefinition[] | undefined; + not?: JSONSchemaDefinition | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 + */ + format?: string | undefined; + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10 + */ + title?: string | undefined; + description?: string | undefined; + default?: JSONSchemaType | undefined; + readOnly?: boolean | undefined; + writeOnly?: boolean | undefined; + examples?: JSONSchemaType | undefined; +} +//# sourceMappingURL=jsonschema.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..6e5c62320e76bfd2bb89d1ac464717d649f69848 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonschema.d.ts","sourceRoot":"","sources":["../src/lib/jsonschema.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,EAAE,GAAG,MAAM,CAAC,GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,IAAI,CAAC;AAGT,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC;CAC/B;AAID,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC;CAAG;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,CAAC;AACxD,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAC7D,IAAI,CAAC,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACpC,KAAK,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC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AC;IAC3C,KAAK,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAEvC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACvC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js new file mode 100644 index 0000000000000000000000000000000000000000..bf2a34ee44823c32fb7b0920d0560672d50b8c21 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js @@ -0,0 +1,11 @@ +"use strict"; +// File mostly copied from @types/json-schema, but stripped down a bit for brevity +// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/817274f3280152ba2929a6067c93df8b34c4c9aa/types/json-schema/index.d.ts +// +// ================================================================================================== +// JSON Schema Draft 07 +// ================================================================================================== +// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 +// -------------------------------------------------------------------------------------------------- +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=jsonschema.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..30d08a7f5061e96fe4bb3ea72ce44e108a419e38 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonschema.js","sourceRoot":"","sources":["../src/lib/jsonschema.ts"],"names":[],"mappings":";AAAA,kFAAkF;AAClF,gIAAgI;AAChI,EAAE;AACF,qGAAqG;AACrG,uBAAuB;AACvB,qGAAqG;AACrG,uEAAuE;AACvE,qGAAqG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs new file mode 100644 index 0000000000000000000000000000000000000000..047481bc9fa71e2139df2d7ea80f0b01268c9428 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs @@ -0,0 +1,10 @@ +// File mostly copied from @types/json-schema, but stripped down a bit for brevity +// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/817274f3280152ba2929a6067c93df8b34c4c9aa/types/json-schema/index.d.ts +// +// ================================================================================================== +// JSON Schema Draft 07 +// ================================================================================================== +// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 +// -------------------------------------------------------------------------------------------------- +export {}; +//# sourceMappingURL=jsonschema.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4603e805e95e94107a60537c2b2f92f8431f732d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/jsonschema.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonschema.mjs","sourceRoot":"","sources":["../src/lib/jsonschema.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gIAAgI;AAChI,EAAE;AACF,qGAAqG;AACrG,uBAAuB;AACvB,qGAAqG;AACrG,uEAAuE;AACvE,qGAAqG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..70146ee0efd648057d60990d388d28f9af44d8e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts @@ -0,0 +1,47 @@ +import { ChatCompletion, ChatCompletionCreateParams, ChatCompletionCreateParamsBase, ChatCompletionFunctionTool, ChatCompletionMessage, ChatCompletionMessageFunctionToolCall, ChatCompletionStreamingToolRunnerParams, ChatCompletionStreamParams, ChatCompletionToolRunnerParams, ParsedChatCompletion } from "../resources/chat/completions.mjs"; +import { type ResponseFormatTextJSONSchemaConfig } from "../resources/responses/responses.mjs"; +import { ResponseFormatJSONSchema } from "../resources/shared.mjs"; +type AnyChatCompletionCreateParams = ChatCompletionCreateParams | ChatCompletionToolRunnerParams | ChatCompletionStreamingToolRunnerParams | ChatCompletionStreamParams; +type Unpacked = T extends (infer U)[] ? U : T; +type ToolCall = Unpacked; +export declare function isChatCompletionFunctionTool(tool: ToolCall): tool is ChatCompletionFunctionTool; +export type ExtractParsedContentFromParams = Params['response_format'] extends AutoParseableResponseFormat ? P : null; +export type AutoParseableResponseFormat = ResponseFormatJSONSchema & { + __output: ParsedT; + $brand: 'auto-parseable-response-format'; + $parseRaw(content: string): ParsedT; +}; +export declare function makeParseableResponseFormat(response_format: ResponseFormatJSONSchema, parser: (content: string) => ParsedT): AutoParseableResponseFormat; +export type AutoParseableTextFormat = ResponseFormatTextJSONSchemaConfig & { + __output: ParsedT; + $brand: 'auto-parseable-response-format'; + $parseRaw(content: string): ParsedT; +}; +export declare function makeParseableTextFormat(response_format: ResponseFormatTextJSONSchemaConfig, parser: (content: string) => ParsedT): AutoParseableTextFormat; +export declare function isAutoParsableResponseFormat(response_format: any): response_format is AutoParseableResponseFormat; +type ToolOptions = { + name: string; + arguments: any; + function?: ((args: any) => any) | undefined; +}; +export type AutoParseableTool = ChatCompletionFunctionTool & { + __arguments: OptionsT['arguments']; + __name: OptionsT['name']; + __hasFunction: HasFunction; + $brand: 'auto-parseable-tool'; + $callback: ((args: OptionsT['arguments']) => any) | undefined; + $parseRaw(args: string): OptionsT['arguments']; +}; +export declare function makeParseableTool(tool: ChatCompletionFunctionTool, { parser, callback, }: { + parser: (content: string) => OptionsT['arguments']; + callback: ((args: any) => any) | undefined; +}): AutoParseableTool; +export declare function isAutoParsableTool(tool: any): tool is AutoParseableTool; +export declare function maybeParseChatCompletion>>(completion: ChatCompletion, params: Params): ParsedChatCompletion; +export declare function parseChatCompletion>(completion: ChatCompletion, params: Params): ParsedChatCompletion; +export declare function shouldParseToolCall(params: ChatCompletionCreateParams | null | undefined, toolCall: ChatCompletionMessageFunctionToolCall): boolean; +export declare function hasAutoParseableInput(params: AnyChatCompletionCreateParams): boolean; +export declare function assertToolCallsAreChatCompletionFunctionToolCalls(toolCalls: ChatCompletionMessage['tool_calls']): asserts toolCalls is ChatCompletionMessageFunctionToolCall[]; +export declare function validateInputTools(tools: ChatCompletionCreateParamsBase['tools']): void; +export {}; +//# sourceMappingURL=parser.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..4b9429867e1970857b93a57d45f6a6ea81098e32 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.mts","sourceRo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,CAAC,WAAW,CAAC,CAAC;IACnD,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,SAAS,CAAC;CAC5C,GACA,iBAAiB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAmB1C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAE5E;AAED,wBAAgB,wBAAwB,CACtC,MAAM,SAAS,0BAA0B,GAAG,IAAI,EAChD,OAAO,GAAG,MAAM,SAAS,IAAI,GAAG,IAAI,GAAG,8BAA8B,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAC1F,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAwB3E;AAED,wBAAgB,mBAAmB,CACjC,MAAM,SAAS,0BAA0B,EACzC,OAAO,GAAG,8BAA8B,CAAC,MAAM,CAAC,EAChD,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CA+B3E;AA2CD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,EACrD,QAAQ,EAAE,qCAAqC,GAC9C,OAAO,CAaT;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAUpF;AAED,wBAAgB,iDAAiD,CAC/D,SAAS,EAAE,qBAAqB,CAAC,YAAY,CAAC,GAC7C,OAAO,CAAC,SAAS,IAAI,qCAAqC,EAAE,CAQ9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,8BAA8B,CAAC,OAAO,CAAC,QAchF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..875464410e835115ab977634f276a4fef8c43239 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts @@ -0,0 +1,47 @@ +import { ChatCompletion, ChatCompletionCreateParams, ChatCompletionCreateParamsBase, ChatCompletionFunctionTool, ChatCompletionMessage, ChatCompletionMessageFunctionToolCall, ChatCompletionStreamingToolRunnerParams, ChatCompletionStreamParams, ChatCompletionToolRunnerParams, ParsedChatCompletion } from "../resources/chat/completions.js"; +import { type ResponseFormatTextJSONSchemaConfig } from "../resources/responses/responses.js"; +import { ResponseFormatJSONSchema } from "../resources/shared.js"; +type AnyChatCompletionCreateParams = ChatCompletionCreateParams | ChatCompletionToolRunnerParams | ChatCompletionStreamingToolRunnerParams | ChatCompletionStreamParams; +type Unpacked = T extends (infer U)[] ? U : T; +type ToolCall = Unpacked; +export declare function isChatCompletionFunctionTool(tool: ToolCall): tool is ChatCompletionFunctionTool; +export type ExtractParsedContentFromParams = Params['response_format'] extends AutoParseableResponseFormat ? P : null; +export type AutoParseableResponseFormat = ResponseFormatJSONSchema & { + __output: ParsedT; + $brand: 'auto-parseable-response-format'; + $parseRaw(content: string): ParsedT; +}; +export declare function makeParseableResponseFormat(response_format: ResponseFormatJSONSchema, parser: (content: string) => ParsedT): AutoParseableResponseFormat; +export type AutoParseableTextFormat = ResponseFormatTextJSONSchemaConfig & { + __output: ParsedT; + $brand: 'auto-parseable-response-format'; + $parseRaw(content: string): ParsedT; +}; +export declare function makeParseableTextFormat(response_format: ResponseFormatTextJSONSchemaConfig, parser: (content: string) => ParsedT): AutoParseableTextFormat; +export declare function isAutoParsableResponseFormat(response_format: any): response_format is AutoParseableResponseFormat; +type ToolOptions = { + name: string; + arguments: any; + function?: ((args: any) => any) | undefined; +}; +export type AutoParseableTool = ChatCompletionFunctionTool & { + __arguments: OptionsT['arguments']; + __name: OptionsT['name']; + __hasFunction: HasFunction; + $brand: 'auto-parseable-tool'; + $callback: ((args: OptionsT['arguments']) => any) | undefined; + $parseRaw(args: string): OptionsT['arguments']; +}; +export declare function makeParseableTool(tool: ChatCompletionFunctionTool, { parser, callback, }: { + parser: (content: string) => OptionsT['arguments']; + callback: ((args: any) => any) | undefined; +}): AutoParseableTool; +export declare function isAutoParsableTool(tool: any): tool is AutoParseableTool; +export declare function maybeParseChatCompletion>>(completion: ChatCompletion, params: Params): ParsedChatCompletion; +export declare function parseChatCompletion>(completion: ChatCompletion, params: Params): ParsedChatCompletion; +export declare function shouldParseToolCall(params: ChatCompletionCreateParams | null | undefined, toolCall: ChatCompletionMessageFunctionToolCall): boolean; +export declare function hasAutoParseableInput(params: AnyChatCompletionCreateParams): boolean; +export declare function assertToolCallsAreChatCompletionFunctionToolCalls(toolCalls: ChatCompletionMessage['tool_calls']): asserts toolCalls is ChatCompletionMessageFunctionToolCall[]; +export declare function validateInputTools(tools: ChatCompletionCreateParamsBase['tools']): void; +export {}; +//# sourceMappingURL=parser.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3213f8c857c7d917e20be1f5dcfed62154d4cab9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/lib/parser.ts"],"names":[],"mappings":"OACO,EACL,cAAc,EACd,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAC1B,qBAAqB,EACrB,qCAAqC,EACrC,uCAAuC,EACvC,0BAA0B,EAC1B,8BAA8B,EAC9B,oBAAoB,EAGrB;OACM,EAAE,KAAK,kCAAkC,EAAE;OAC3C,EAAE,wBAAwB,EAAE;AAEnC,KAAK,6BAA6B,GAC9B,0BAA0B,GAC1B,8BAA8B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M,SAAS,0BAA0B,GAAG,IAAI,EAChD,OAAO,GAAG,MAAM,SAAS,IAAI,GAAG,IAAI,GAAG,8BAA8B,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAC1F,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAwB3E;AAED,wBAAgB,mBAAmB,CACjC,MAAM,SAAS,0BAA0B,EACzC,OAAO,GAAG,8BAA8B,CAAC,MAAM,CAAC,EAChD,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CA+B3E;AA2CD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,EACrD,QAAQ,EAAE,qCAAqC,GAC9C,OAAO,CAaT;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAUpF;AAED,wBAAgB,iDAAiD,CAC/D,SAAS,EAAE,qBAAqB,CAAC,YAAY,CAAC,GAC7C,OAAO,CAAC,SAAS,IAAI,qCAAqC,EAAE,CAQ9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,8BAA8B,CAAC,OAAO,CAAC,QAchF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js new file mode 100644 index 0000000000000000000000000000000000000000..3d517b7ca20bae3d933d12166e35a23c65d89384 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js @@ -0,0 +1,176 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isChatCompletionFunctionTool = isChatCompletionFunctionTool; +exports.makeParseableResponseFormat = makeParseableResponseFormat; +exports.makeParseableTextFormat = makeParseableTextFormat; +exports.isAutoParsableResponseFormat = isAutoParsableResponseFormat; +exports.makeParseableTool = makeParseableTool; +exports.isAutoParsableTool = isAutoParsableTool; +exports.maybeParseChatCompletion = maybeParseChatCompletion; +exports.parseChatCompletion = parseChatCompletion; +exports.shouldParseToolCall = shouldParseToolCall; +exports.hasAutoParseableInput = hasAutoParseableInput; +exports.assertToolCallsAreChatCompletionFunctionToolCalls = assertToolCallsAreChatCompletionFunctionToolCalls; +exports.validateInputTools = validateInputTools; +const error_1 = require("../error.js"); +function isChatCompletionFunctionTool(tool) { + return tool !== undefined && 'function' in tool && tool.function !== undefined; +} +function makeParseableResponseFormat(response_format, parser) { + const obj = { ...response_format }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-response-format', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + }); + return obj; +} +function makeParseableTextFormat(response_format, parser) { + const obj = { ...response_format }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-response-format', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + }); + return obj; +} +function isAutoParsableResponseFormat(response_format) { + return response_format?.['$brand'] === 'auto-parseable-response-format'; +} +function makeParseableTool(tool, { parser, callback, }) { + const obj = { ...tool }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-tool', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + $callback: { + value: callback, + enumerable: false, + }, + }); + return obj; +} +function isAutoParsableTool(tool) { + return tool?.['$brand'] === 'auto-parseable-tool'; +} +function maybeParseChatCompletion(completion, params) { + if (!params || !hasAutoParseableInput(params)) { + return { + ...completion, + choices: completion.choices.map((choice) => { + assertToolCallsAreChatCompletionFunctionToolCalls(choice.message.tool_calls); + return { + ...choice, + message: { + ...choice.message, + parsed: null, + ...(choice.message.tool_calls ? + { + tool_calls: choice.message.tool_calls, + } + : undefined), + }, + }; + }), + }; + } + return parseChatCompletion(completion, params); +} +function parseChatCompletion(completion, params) { + const choices = completion.choices.map((choice) => { + if (choice.finish_reason === 'length') { + throw new error_1.LengthFinishReasonError(); + } + if (choice.finish_reason === 'content_filter') { + throw new error_1.ContentFilterFinishReasonError(); + } + assertToolCallsAreChatCompletionFunctionToolCalls(choice.message.tool_calls); + return { + ...choice, + message: { + ...choice.message, + ...(choice.message.tool_calls ? + { + tool_calls: choice.message.tool_calls?.map((toolCall) => parseToolCall(params, toolCall)) ?? undefined, + } + : undefined), + parsed: choice.message.content && !choice.message.refusal ? + parseResponseFormat(params, choice.message.content) + : null, + }, + }; + }); + return { ...completion, choices }; +} +function parseResponseFormat(params, content) { + if (params.response_format?.type !== 'json_schema') { + return null; + } + if (params.response_format?.type === 'json_schema') { + if ('$parseRaw' in params.response_format) { + const response_format = params.response_format; + return response_format.$parseRaw(content); + } + return JSON.parse(content); + } + return null; +} +function parseToolCall(params, toolCall) { + const inputTool = params.tools?.find((inputTool) => isChatCompletionFunctionTool(inputTool) && inputTool.function?.name === toolCall.function.name); // TS doesn't narrow based on isChatCompletionTool + return { + ...toolCall, + function: { + ...toolCall.function, + parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.function.arguments) + : inputTool?.function.strict ? JSON.parse(toolCall.function.arguments) + : null, + }, + }; +} +function shouldParseToolCall(params, toolCall) { + if (!params || !('tools' in params) || !params.tools) { + return false; + } + const inputTool = params.tools?.find((inputTool) => isChatCompletionFunctionTool(inputTool) && inputTool.function?.name === toolCall.function.name); + return (isChatCompletionFunctionTool(inputTool) && + (isAutoParsableTool(inputTool) || inputTool?.function.strict || false)); +} +function hasAutoParseableInput(params) { + if (isAutoParsableResponseFormat(params.response_format)) { + return true; + } + return (params.tools?.some((t) => isAutoParsableTool(t) || (t.type === 'function' && t.function.strict === true)) ?? false); +} +function assertToolCallsAreChatCompletionFunctionToolCalls(toolCalls) { + for (const toolCall of toolCalls || []) { + if (toolCall.type !== 'function') { + throw new error_1.OpenAIError(`Currently only \`function\` tool calls are supported; Received \`${toolCall.type}\``); + } + } +} +function validateInputTools(tools) { + for (const tool of tools ?? []) { + if (tool.type !== 'function') { + throw new error_1.OpenAIError(`Currently only \`function\` tool types support auto-parsing; Received \`${tool.type}\``); + } + if (tool.function.strict !== true) { + throw new error_1.OpenAIError(`The \`${tool.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`); + } + } +} +//# sourceMappingURL=parser.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js.map new file mode 100644 index 0000000000000000000000000000000000000000..16a37d07f217d7993e2aa76c4b7ecf1dc3a20ca8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/lib/parser.ts"],"names":[],"mappings":";;AA4BA,oEAEC;AAYD,kEAkBC;AASD,0DAkBC;AAED,oEAIC;AAqBD,8CA4BC;AAED,gDAEC;AAED,4DA2BC;AAED,kDAkCC;AA2CD,kDAgBC;AAED,sDAUC;AAED,8GAUC;AAED,gDAcC;AAtTD,uCAAgG;AA4BhG,SAAgB,4BAA4B,CAAC,IAAc;IACzD,OAAO,IAAI,KAAK,SAAS,IAAI,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC;AACjF,CAAC;AAYD,SAAgB,2BAA2B,CACzC,eAAyC,EACzC,MAAoC;IAEpC,MAAM,GAAG,GAAG,EAAE,GAAG,eAAe,EAAE,CAAC;IAEnC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE;QAC3B,MAAM,EAAE;YACN,KAAK,EAAE,gCAAgC;YACvC,UAAU,EAAE,KAAK;SAClB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,KAAK;SAClB;KACF,CAAC,CAAC;IAEH,OAAO,GAA2C,CAAC;AACrD,CAAC;AASD,SAAgB,uBAAuB,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AAU,EAAE,CAAC;YACjC,MAAM,IAAI,mBAAW,CACnB,oEAAoE,QAAQ,CAAC,IAAI,IAAI,CACtF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAA8C;IAC/E,KAAK,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAW,CACnB,2EAA2E,IAAI,CAAC,IAAI,IAAI,CACzF,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,mBAAW,CACnB,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,4FAA4F,CACxH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs new file mode 100644 index 0000000000000000000000000000000000000000..34f698f9babab3b26070c1a7e0847621d0caea06 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs @@ -0,0 +1,162 @@ +import { ContentFilterFinishReasonError, LengthFinishReasonError, OpenAIError } from "../error.mjs"; +export function isChatCompletionFunctionTool(tool) { + return tool !== undefined && 'function' in tool && tool.function !== undefined; +} +export function makeParseableResponseFormat(response_format, parser) { + const obj = { ...response_format }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-response-format', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + }); + return obj; +} +export function makeParseableTextFormat(response_format, parser) { + const obj = { ...response_format }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-response-format', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + }); + return obj; +} +export function isAutoParsableResponseFormat(response_format) { + return response_format?.['$brand'] === 'auto-parseable-response-format'; +} +export function makeParseableTool(tool, { parser, callback, }) { + const obj = { ...tool }; + Object.defineProperties(obj, { + $brand: { + value: 'auto-parseable-tool', + enumerable: false, + }, + $parseRaw: { + value: parser, + enumerable: false, + }, + $callback: { + value: callback, + enumerable: false, + }, + }); + return obj; +} +export function isAutoParsableTool(tool) { + return tool?.['$brand'] === 'auto-parseable-tool'; +} +export function maybeParseChatCompletion(completion, params) { + if (!params || !hasAutoParseableInput(params)) { + return { + ...completion, + choices: completion.choices.map((choice) => { + assertToolCallsAreChatCompletionFunctionToolCalls(choice.message.tool_calls); + return { + ...choice, + message: { + ...choice.message, + parsed: null, + ...(choice.message.tool_calls ? + { + tool_calls: choice.message.tool_calls, + } + : undefined), + }, + }; + }), + }; + } + return parseChatCompletion(completion, params); +} +export function parseChatCompletion(completion, params) { + const choices = completion.choices.map((choice) => { + if (choice.finish_reason === 'length') { + throw new LengthFinishReasonError(); + } + if (choice.finish_reason === 'content_filter') { + throw new ContentFilterFinishReasonError(); + } + assertToolCallsAreChatCompletionFunctionToolCalls(choice.message.tool_calls); + return { + ...choice, + message: { + ...choice.message, + ...(choice.message.tool_calls ? + { + tool_calls: choice.message.tool_calls?.map((toolCall) => parseToolCall(params, toolCall)) ?? undefined, + } + : undefined), + parsed: choice.message.content && !choice.message.refusal ? + parseResponseFormat(params, choice.message.content) + : null, + }, + }; + }); + return { ...completion, choices }; +} +function parseResponseFormat(params, content) { + if (params.response_format?.type !== 'json_schema') { + return null; + } + if (params.response_format?.type === 'json_schema') { + if ('$parseRaw' in params.response_format) { + const response_format = params.response_format; + return response_format.$parseRaw(content); + } + return JSON.parse(content); + } + return null; +} +function parseToolCall(params, toolCall) { + const inputTool = params.tools?.find((inputTool) => isChatCompletionFunctionTool(inputTool) && inputTool.function?.name === toolCall.function.name); // TS doesn't narrow based on isChatCompletionTool + return { + ...toolCall, + function: { + ...toolCall.function, + parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.function.arguments) + : inputTool?.function.strict ? JSON.parse(toolCall.function.arguments) + : null, + }, + }; +} +export function shouldParseToolCall(params, toolCall) { + if (!params || !('tools' in params) || !params.tools) { + return false; + } + const inputTool = params.tools?.find((inputTool) => isChatCompletionFunctionTool(inputTool) && inputTool.function?.name === toolCall.function.name); + return (isChatCompletionFunctionTool(inputTool) && + (isAutoParsableTool(inputTool) || inputTool?.function.strict || false)); +} +export function hasAutoParseableInput(params) { + if (isAutoParsableResponseFormat(params.response_format)) { + return true; + } + return (params.tools?.some((t) => isAutoParsableTool(t) || (t.type === 'function' && t.function.strict === true)) ?? false); +} +export function assertToolCallsAreChatCompletionFunctionToolCalls(toolCalls) { + for (const toolCall of toolCalls || []) { + if (toolCall.type !== 'function') { + throw new OpenAIError(`Currently only \`function\` tool calls are supported; Received \`${toolCall.type}\``); + } + } +} +export function validateInputTools(tools) { + for (const tool of tools ?? []) { + if (tool.type !== 'function') { + throw new OpenAIError(`Currently only \`function\` tool types support auto-parsing; Received \`${tool.type}\``); + } + if (tool.function.strict !== true) { + throw new OpenAIError(`The \`${tool.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`); + } + } +} +//# sourceMappingURL=parser.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..14cf96bc93bd6a4a062c4f6b5443b7be5d549ee5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/lib/parser.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.mjs","sourceRoot":"","sources":["../src/lib/parser.ts"],"names":[],"mappings":"OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,WAAW,EAAE;AA4B/E,MAAM,UAAU,4BAA4B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C;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAqC;IACzE,IAAI,4BAA4B,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAM,CAAC,KAAK,EAAE,IAAI,CAChB,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,CACtF,IAAI,KAAK,CACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iDAAiD,CAC/D,SAA8C;IAE9C,KAAK,MAAM,QAAQ,IAAI,SAAS,IAAI,EAAE,EAAE,CAAC;QACvC,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACjC,MAAM,IAAI,WAAW,CACnB,oEAAoE,QAAQ,CAAC,IAAI,IAAI,CACtF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAA8C;IAC/E,KAAK,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM,IAAI,WAAW,CACnB,2EAA2E,IAAI,CAAC,IAAI,IAAI,CACzF,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,WAAW,CACnB,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,4FAA4F,CACxH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..368f9e18b82a91ad321c3c098d671e096acc2e10 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts @@ -0,0 +1,2 @@ +export * from "./audio/index.mjs"; +//# sourceMappingURL=audio.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5b751deafd650e5f9062d450926a5507cfd92312 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.d.mts","sourceRoot":"","sources":["../src/resources/audio.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4d55c9d1a71ccff8a2248a8d1d9f2415ca0555e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts @@ -0,0 +1,2 @@ +export * from "./audio/index.js"; +//# sourceMappingURL=audio.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8cf2949428f09fd9771970f5553795f084ab8aae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../src/resources/audio.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js new file mode 100644 index 0000000000000000000000000000000000000000..fb3518c22ba95a000b2489c032187be0f562fd5b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./audio/index.js"), exports); +//# sourceMappingURL=audio.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b6577c513b5311905d6d55a65bd0ca25056f611b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.js","sourceRoot":"","sources":["../src/resources/audio.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAA8B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0dacab4ac682a7a6ea8017a909407f7c6d0d6089 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./audio/index.mjs"; +//# sourceMappingURL=audio.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4b2e67440cd901bd84ed90cf12da32c5596a6744 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/audio.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../src/resources/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e962a337c41cc9118dbb7501aed5974373ba9038 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts @@ -0,0 +1,217 @@ +import { APIResource } from "../core/resource.mjs"; +import * as BatchesAPI from "./batches.mjs"; +import * as Shared from "./shared.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Batches extends APIResource { + /** + * Creates and executes a batch from an uploaded file of requests + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * Retrieves a batch. + */ + retrieve(batchID: string, options?: RequestOptions): APIPromise; + /** + * List your organization's batches. + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Cancels an in-progress batch. The batch will be in status `cancelling` for up to + * 10 minutes, before changing to `cancelled`, where it will have partial results + * (if any) available in the output file. + */ + cancel(batchID: string, options?: RequestOptions): APIPromise; +} +export type BatchesPage = CursorPage; +export interface Batch { + id: string; + /** + * The time frame within which the batch should be processed. + */ + completion_window: string; + /** + * The Unix timestamp (in seconds) for when the batch was created. + */ + created_at: number; + /** + * The OpenAI API endpoint used by the batch. + */ + endpoint: string; + /** + * The ID of the input file for the batch. + */ + input_file_id: string; + /** + * The object type, which is always `batch`. + */ + object: 'batch'; + /** + * The current status of the batch. + */ + status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled'; + /** + * The Unix timestamp (in seconds) for when the batch was cancelled. + */ + cancelled_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started cancelling. + */ + cancelling_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch was completed. + */ + completed_at?: number; + /** + * The ID of the file containing the outputs of requests with errors. + */ + error_file_id?: string; + errors?: Batch.Errors; + /** + * The Unix timestamp (in seconds) for when the batch expired. + */ + expired_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch will expire. + */ + expires_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch failed. + */ + failed_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started finalizing. + */ + finalizing_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started processing. + */ + in_progress_at?: number; + /** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ + metadata?: Shared.Metadata | null; + /** + * The ID of the file containing the outputs of successfully executed requests. + */ + output_file_id?: string; + /** + * The request counts for different statuses within the batch. + */ + request_counts?: BatchRequestCounts; +} +export declare namespace Batch { + interface Errors { + data?: Array; + /** + * The object type, which is always `list`. + */ + object?: string; + } +} +export interface BatchError { + /** + * An error code identifying the error type. + */ + code?: string; + /** + * The line number of the input file where the error occurred, if applicable. + */ + line?: number | null; + /** + * A human-readable message providing more details about the error. + */ + message?: string; + /** + * The name of the parameter that caused the error, if applicable. + */ + param?: string | null; +} +/** + * The request counts for different statuses within the batch. + */ +export interface BatchRequestCounts { + /** + * Number of requests that have been completed successfully. + */ + completed: number; + /** + * Number of requests that have failed. + */ + failed: number; + /** + * Total number of requests in the batch. + */ + total: number; +} +export interface BatchCreateParams { + /** + * The time frame within which the batch should be processed. Currently only `24h` + * is supported. + */ + completion_window: '24h'; + /** + * The endpoint to be used for all requests in the batch. Currently + * `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` + * are supported. Note that `/v1/embeddings` batches are also restricted to a + * maximum of 50,000 embedding inputs across all requests in the batch. + */ + endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions'; + /** + * The ID of an uploaded file that contains requests for the new batch. + * + * See [upload file](https://platform.openai.com/docs/api-reference/files/create) + * for how to upload a file. + * + * Your input file must be formatted as a + * [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + * and must be uploaded with the purpose `batch`. The file can contain up to 50,000 + * requests, and can be up to 200 MB in size. + */ + input_file_id: string; + /** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ + metadata?: Shared.Metadata | null; + /** + * The expiration policy for the output and/or error file that are generated for a + * batch. + */ + output_expires_after?: BatchCreateParams.OutputExpiresAfter; +} +export declare namespace BatchCreateParams { + /** + * The expiration policy for the output and/or error file that are generated for a + * batch. + */ + interface OutputExpiresAfter { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: + * `created_at`. Note that the anchor is the file creation time, not the time the + * batch is created. + */ + anchor: 'created_at'; + /** + * The number of seconds after the anchor time that the file will expire. Must be + * between 3600 (1 hour) and 2592000 (30 days). + */ + seconds: number; + } +} +export interface BatchListParams extends CursorPageParams { +} +export declare namespace Batches { + export { type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, type BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=batches.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..32fc308e0a58f7f7e7d1e393a16069a8882714e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAI5E;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAItE;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC;IAIlC;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;CAGrE;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAE5C,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,a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IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,iBAAiB,EAAE,KAAK,CAAC;IAEzB;;;;;OAKG;IACH,QAAQ,EAAE,eAAe,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;IAE1F;;;;;;;;;;OAUG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;CAC7D;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;;OAGG;IACH,UAAiB,kBAAkB;QACjC;;;;WAIG;QACH,MAAM,EAAE,YAAY,CAAC;QAErB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;CAAG;AAE5D,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..394478fdbe1e213622345b14ed1e58ed87a90b78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts @@ -0,0 +1,217 @@ +import { APIResource } from "../core/resource.js"; +import * as BatchesAPI from "./batches.js"; +import * as Shared from "./shared.js"; +import { APIPromise } from "../core/api-promise.js"; +import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Batches extends APIResource { + /** + * Creates and executes a batch from an uploaded file of requests + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * Retrieves a batch. + */ + retrieve(batchID: string, options?: RequestOptions): APIPromise; + /** + * List your organization's batches. + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Cancels an in-progress batch. The batch will be in status `cancelling` for up to + * 10 minutes, before changing to `cancelled`, where it will have partial results + * (if any) available in the output file. + */ + cancel(batchID: string, options?: RequestOptions): APIPromise; +} +export type BatchesPage = CursorPage; +export interface Batch { + id: string; + /** + * The time frame within which the batch should be processed. + */ + completion_window: string; + /** + * The Unix timestamp (in seconds) for when the batch was created. + */ + created_at: number; + /** + * The OpenAI API endpoint used by the batch. + */ + endpoint: string; + /** + * The ID of the input file for the batch. + */ + input_file_id: string; + /** + * The object type, which is always `batch`. + */ + object: 'batch'; + /** + * The current status of the batch. + */ + status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled'; + /** + * The Unix timestamp (in seconds) for when the batch was cancelled. + */ + cancelled_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started cancelling. + */ + cancelling_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch was completed. + */ + completed_at?: number; + /** + * The ID of the file containing the outputs of requests with errors. + */ + error_file_id?: string; + errors?: Batch.Errors; + /** + * The Unix timestamp (in seconds) for when the batch expired. + */ + expired_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch will expire. + */ + expires_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch failed. + */ + failed_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started finalizing. + */ + finalizing_at?: number; + /** + * The Unix timestamp (in seconds) for when the batch started processing. + */ + in_progress_at?: number; + /** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ + metadata?: Shared.Metadata | null; + /** + * The ID of the file containing the outputs of successfully executed requests. + */ + output_file_id?: string; + /** + * The request counts for different statuses within the batch. + */ + request_counts?: BatchRequestCounts; +} +export declare namespace Batch { + interface Errors { + data?: Array; + /** + * The object type, which is always `list`. + */ + object?: string; + } +} +export interface BatchError { + /** + * An error code identifying the error type. + */ + code?: string; + /** + * The line number of the input file where the error occurred, if applicable. + */ + line?: number | null; + /** + * A human-readable message providing more details about the error. + */ + message?: string; + /** + * The name of the parameter that caused the error, if applicable. + */ + param?: string | null; +} +/** + * The request counts for different statuses within the batch. + */ +export interface BatchRequestCounts { + /** + * Number of requests that have been completed successfully. + */ + completed: number; + /** + * Number of requests that have failed. + */ + failed: number; + /** + * Total number of requests in the batch. + */ + total: number; +} +export interface BatchCreateParams { + /** + * The time frame within which the batch should be processed. Currently only `24h` + * is supported. + */ + completion_window: '24h'; + /** + * The endpoint to be used for all requests in the batch. Currently + * `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` + * are supported. Note that `/v1/embeddings` batches are also restricted to a + * maximum of 50,000 embedding inputs across all requests in the batch. + */ + endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions'; + /** + * The ID of an uploaded file that contains requests for the new batch. + * + * See [upload file](https://platform.openai.com/docs/api-reference/files/create) + * for how to upload a file. + * + * Your input file must be formatted as a + * [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + * and must be uploaded with the purpose `batch`. The file can contain up to 50,000 + * requests, and can be up to 200 MB in size. + */ + input_file_id: string; + /** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ + metadata?: Shared.Metadata | null; + /** + * The expiration policy for the output and/or error file that are generated for a + * batch. + */ + output_expires_after?: BatchCreateParams.OutputExpiresAfter; +} +export declare namespace BatchCreateParams { + /** + * The expiration policy for the output and/or error file that are generated for a + * batch. + */ + interface OutputExpiresAfter { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: + * `created_at`. Note that the anchor is the file creation time, not the time the + * batch is created. + */ + anchor: 'created_at'; + /** + * The number of seconds after the anchor time that the file will expire. Must be + * between 3600 (1 hour) and 2592000 (30 days). + */ + seconds: number; + } +} +export interface BatchListParams extends CursorPageParams { +} +export declare namespace Batches { + export { type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, type BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=batches.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f96af5b67e3ed2574cdaf2fb0afdca7dc68541cd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ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AC,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;CAC7D;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;;OAGG;IACH,UAAiB,kBAAkB;QACjC;;;;WAIG;QACH,MAAM,EAAE,YAAY,CAAC;QAErB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;CAAG;AAE5D,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js new file mode 100644 index 0000000000000000000000000000000000000000..41961de26e6e22fdf146456a0bafd2c7fbdb5c66 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js @@ -0,0 +1,37 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Batches = void 0; +const resource_1 = require("../core/resource.js"); +const pagination_1 = require("../core/pagination.js"); +const path_1 = require("../internal/utils/path.js"); +class Batches extends resource_1.APIResource { + /** + * Creates and executes a batch from an uploaded file of requests + */ + create(body, options) { + return this._client.post('/batches', { body, ...options }); + } + /** + * Retrieves a batch. + */ + retrieve(batchID, options) { + return this._client.get((0, path_1.path) `/batches/${batchID}`, options); + } + /** + * List your organization's batches. + */ + list(query = {}, options) { + return this._client.getAPIList('/batches', (pagination_1.CursorPage), { query, ...options }); + } + /** + * Cancels an in-progress batch. The batch will be in status `cancelling` for up to + * 10 minutes, before changing to `cancelled`, where it will have partial results + * (if any) available in the output file. + */ + cancel(batchID, options) { + return this._client.post((0, path_1.path) `/batches/${batchID}/cancel`, options); + } +} +exports.Batches = Batches; +//# sourceMappingURL=batches.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c67ed861de74569498a15158cb3ccf28accc2a38 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.js","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,uBAAiB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF;AAjCD,0BAiCC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3317552b60a6faa2c5097189d3aac65a74af34ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { CursorPage } from "../core/pagination.mjs"; +import { path } from "../internal/utils/path.mjs"; +export class Batches extends APIResource { + /** + * Creates and executes a batch from an uploaded file of requests + */ + create(body, options) { + return this._client.post('/batches', { body, ...options }); + } + /** + * Retrieves a batch. + */ + retrieve(batchID, options) { + return this._client.get(path `/batches/${batchID}`, options); + } + /** + * List your organization's batches. + */ + list(query = {}, options) { + return this._client.getAPIList('/batches', (CursorPage), { query, ...options }); + } + /** + * Cancels an in-progress batch. The batch will be in status `cancelling` for up to + * 10 minutes, before changing to `cancelled`, where it will have partial results + * (if any) available in the output file. + */ + cancel(batchID, options) { + return this._client.post(path `/batches/${batchID}/cancel`, options); + } +} +//# sourceMappingURL=batches.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f4c2312f97b2a3ae0cdf7fbb190e5f2c7e62e256 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/batches.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,UAAiB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..42b229dab494758715e344894456d4012cca27d6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts @@ -0,0 +1,2 @@ +export * from "./beta/index.mjs"; +//# sourceMappingURL=beta.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..55303b68f0b44c8eaee87cb7887de46e643bdd53 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..03922ad3616559c41244308b6eb22ab9d5ce6b08 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts @@ -0,0 +1,2 @@ +export * from "./beta/index.js"; +//# sourceMappingURL=beta.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..04b228170fe2230522f33df109de2c46f5989bc7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js new file mode 100644 index 0000000000000000000000000000000000000000..4bcc05c863286cbd4f1c82e001ae381967657dfb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./beta/index.js"), exports); +//# sourceMappingURL=beta.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js.map new file mode 100644 index 0000000000000000000000000000000000000000..800b37085f60721ceaed52a1388651142fd2914d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.js","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs new file mode 100644 index 0000000000000000000000000000000000000000..db74562ebb7be6911cfbb1ccf649f7a16fa2b81f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./beta/index.mjs"; +//# sourceMappingURL=beta.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..385fa153027702b5ca0c985d6d372812b2df6e9e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/beta.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.mjs","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6dd405f1705272f1e703298b961805278a0b381c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts @@ -0,0 +1,2 @@ +export * from "./chat/index.mjs"; +//# sourceMappingURL=chat.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5a35eebc481c6ab2b6714e27c88ddd885c54b0ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b18584b494aaf03e5e5d4989f6f1d6965c658409 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts @@ -0,0 +1,2 @@ +export * from "./chat/index.js"; +//# sourceMappingURL=chat.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e04f537b0146db007ec383712a9f187c72e754d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js new file mode 100644 index 0000000000000000000000000000000000000000..67f26ed8103bd395140556a2170ccf375d33f364 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./chat/index.js"), exports); +//# sourceMappingURL=chat.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js.map new file mode 100644 index 0000000000000000000000000000000000000000..12746a11525689003f7a4782e5550421fc64539b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c02c20d7b4799d41913253f4067d4331705170b4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./chat/index.mjs"; +//# sourceMappingURL=chat.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b3501706468268f5f68ebcbffef87b20a2daecdd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/chat.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4f938064babb515623e1bc79e55ea65bc2ab8579 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts @@ -0,0 +1,329 @@ +import { APIResource } from "../core/resource.mjs"; +import * as CompletionsAPI from "./completions.mjs"; +import * as CompletionsCompletionsAPI from "./chat/completions/completions.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { Stream } from "../core/streaming.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Completions extends APIResource { + /** + * Creates a completion for the provided prompt and parameters. + * + * @example + * ```ts + * const completion = await client.completions.create({ + * model: 'string', + * prompt: 'This is a test.', + * }); + * ``` + */ + create(body: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(body: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(body: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | Completion>; +} +/** + * Represents a completion response from the API. Note: both the streamed and + * non-streamed response objects share the same shape (unlike the chat endpoint). + */ +export interface Completion { + /** + * A unique identifier for the completion. + */ + id: string; + /** + * The list of completion choices the model generated for the input prompt. + */ + choices: Array; + /** + * The Unix timestamp (in seconds) of when the completion was created. + */ + created: number; + /** + * The model used for completion. + */ + model: string; + /** + * The object type, which is always "text_completion" + */ + object: 'text_completion'; + /** + * This fingerprint represents the backend configuration that the model runs with. + * + * Can be used in conjunction with the `seed` request parameter to understand when + * backend changes have been made that might impact determinism. + */ + system_fingerprint?: string; + /** + * Usage statistics for the completion request. + */ + usage?: CompletionUsage; +} +export interface CompletionChoice { + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, or `content_filter` if + * content was omitted due to a flag from our content filters. + */ + finish_reason: 'stop' | 'length' | 'content_filter'; + index: number; + logprobs: CompletionChoice.Logprobs | null; + text: string; +} +export declare namespace CompletionChoice { + interface Logprobs { + text_offset?: Array; + token_logprobs?: Array; + tokens?: Array; + top_logprobs?: Array<{ + [key: string]: number; + }>; + } +} +/** + * Usage statistics for the completion request. + */ +export interface CompletionUsage { + /** + * Number of tokens in the generated completion. + */ + completion_tokens: number; + /** + * Number of tokens in the prompt. + */ + prompt_tokens: number; + /** + * Total number of tokens used in the request (prompt + completion). + */ + total_tokens: number; + /** + * Breakdown of tokens used in a completion. + */ + completion_tokens_details?: CompletionUsage.CompletionTokensDetails; + /** + * Breakdown of tokens used in the prompt. + */ + prompt_tokens_details?: CompletionUsage.PromptTokensDetails; +} +export declare namespace CompletionUsage { + /** + * Breakdown of tokens used in a completion. + */ + interface CompletionTokensDetails { + /** + * When using Predicted Outputs, the number of tokens in the prediction that + * appeared in the completion. + */ + accepted_prediction_tokens?: number; + /** + * Audio input tokens generated by the model. + */ + audio_tokens?: number; + /** + * Tokens generated by the model for reasoning. + */ + reasoning_tokens?: number; + /** + * When using Predicted Outputs, the number of tokens in the prediction that did + * not appear in the completion. However, like reasoning tokens, these tokens are + * still counted in the total completion tokens for purposes of billing, output, + * and context window limits. + */ + rejected_prediction_tokens?: number; + } + /** + * Breakdown of tokens used in the prompt. + */ + interface PromptTokensDetails { + /** + * Audio input tokens present in the prompt. + */ + audio_tokens?: number; + /** + * Cached tokens present in the prompt. + */ + cached_tokens?: number; + } +} +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export interface CompletionCreateParamsBase { + /** + * ID of the model to use. You can use the + * [List models](https://platform.openai.com/docs/api-reference/models/list) API to + * see all of your available models, or see our + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. + */ + model: (string & {}) | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002'; + /** + * The prompt(s) to generate completions for, encoded as a string, array of + * strings, array of tokens, or array of token arrays. + * + * Note that <|endoftext|> is the document separator that the model sees during + * training, so if a prompt is not specified the model will generate as if from the + * beginning of a new document. + */ + prompt: string | Array | Array | Array> | null; + /** + * Generates `best_of` completions server-side and returns the "best" (the one with + * the highest log probability per token). Results cannot be streamed. + * + * When used with `n`, `best_of` controls the number of candidate completions and + * `n` specifies how many to return – `best_of` must be greater than `n`. + * + * **Note:** Because this parameter generates many completions, it can quickly + * consume your token quota. Use carefully and ensure that you have reasonable + * settings for `max_tokens` and `stop`. + */ + best_of?: number | null; + /** + * Echo back the prompt in addition to the completion + */ + echo?: boolean | null; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their + * existing frequency in the text so far, decreasing the model's likelihood to + * repeat the same line verbatim. + * + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + */ + frequency_penalty?: number | null; + /** + * Modify the likelihood of specified tokens appearing in the completion. + * + * Accepts a JSON object that maps tokens (specified by their token ID in the GPT + * tokenizer) to an associated bias value from -100 to 100. You can use this + * [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. + * Mathematically, the bias is added to the logits generated by the model prior to + * sampling. The exact effect will vary per model, but values between -1 and 1 + * should decrease or increase likelihood of selection; values like -100 or 100 + * should result in a ban or exclusive selection of the relevant token. + * + * As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token + * from being generated. + */ + logit_bias?: { + [key: string]: number; + } | null; + /** + * Include the log probabilities on the `logprobs` most likely output tokens, as + * well the chosen tokens. For example, if `logprobs` is 5, the API will return a + * list of the 5 most likely tokens. The API will always return the `logprob` of + * the sampled token, so there may be up to `logprobs+1` elements in the response. + * + * The maximum value for `logprobs` is 5. + */ + logprobs?: number | null; + /** + * The maximum number of [tokens](/tokenizer) that can be generated in the + * completion. + * + * The token count of your prompt plus `max_tokens` cannot exceed the model's + * context length. + * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + * for counting tokens. + */ + max_tokens?: number | null; + /** + * How many completions to generate for each prompt. + * + * **Note:** Because this parameter generates many completions, it can quickly + * consume your token quota. Use carefully and ensure that you have reasonable + * settings for `max_tokens` and `stop`. + */ + n?: number | null; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on + * whether they appear in the text so far, increasing the model's likelihood to + * talk about new topics. + * + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + */ + presence_penalty?: number | null; + /** + * If specified, our system will make a best effort to sample deterministically, + * such that repeated requests with the same `seed` and parameters should return + * the same result. + * + * Determinism is not guaranteed, and you should refer to the `system_fingerprint` + * response parameter to monitor changes in the backend. + */ + seed?: number | null; + /** + * Not supported with latest reasoning models `o3` and `o4-mini`. + * + * Up to 4 sequences where the API will stop generating further tokens. The + * returned text will not contain the stop sequence. + */ + stop?: string | null | Array; + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream?: boolean | null; + /** + * Options for streaming response. Only set this when you set `stream: true`. + */ + stream_options?: CompletionsCompletionsAPI.ChatCompletionStreamOptions | null; + /** + * The suffix that comes after a completion of inserted text. + * + * This parameter is only supported for `gpt-3.5-turbo-instruct`. + */ + suffix?: string | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + * make the output more random, while lower values like 0.2 will make it more + * focused and deterministic. + * + * We generally recommend altering this or `top_p` but not both. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the + * model considers the results of the tokens with top_p probability mass. So 0.1 + * means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or `temperature` but not both. + */ + top_p?: number | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace CompletionCreateParams { + type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; + type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +} +export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream?: false | null; +} +export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream: true; +} +export declare namespace Completions { + export { type Completion as Completion, type CompletionChoice as CompletionChoice, type CompletionUsage as CompletionUsage, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; +} +//# sourceMappingURL=completions.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..273a9108609886d455284093afacbc3848bf70fb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.d.mts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,yBAAyB;OAC9B,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAClG,MAAM,CAAC,IAAI,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvG,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;CAS/C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAA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IAErB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAErC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,yBAAyB,CAAC,2BAA2B,GAAG,IAAI,CAAC;IAE9E;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;;;OAOG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..74b153ca23e117ef768b8205d1a085384e82b06f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts @@ -0,0 +1,329 @@ +import { APIResource } from "../core/resource.js"; +import * as CompletionsAPI from "./completions.js"; +import * as CompletionsCompletionsAPI from "./chat/completions/completions.js"; +import { APIPromise } from "../core/api-promise.js"; +import { Stream } from "../core/streaming.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Completions extends APIResource { + /** + * Creates a completion for the provided prompt and parameters. + * + * @example + * ```ts + * const completion = await client.completions.create({ + * model: 'string', + * prompt: 'This is a test.', + * }); + * ``` + */ + create(body: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(body: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(body: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | Completion>; +} +/** + * Represents a completion response from the API. Note: both the streamed and + * non-streamed response objects share the same shape (unlike the chat endpoint). + */ +export interface Completion { + /** + * A unique identifier for the completion. + */ + id: string; + /** + * The list of completion choices the model generated for the input prompt. + */ + choices: Array; + /** + * The Unix timestamp (in seconds) of when the completion was created. + */ + created: number; + /** + * The model used for completion. + */ + model: string; + /** + * The object type, which is always "text_completion" + */ + object: 'text_completion'; + /** + * This fingerprint represents the backend configuration that the model runs with. + * + * Can be used in conjunction with the `seed` request parameter to understand when + * backend changes have been made that might impact determinism. + */ + system_fingerprint?: string; + /** + * Usage statistics for the completion request. + */ + usage?: CompletionUsage; +} +export interface CompletionChoice { + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, or `content_filter` if + * content was omitted due to a flag from our content filters. + */ + finish_reason: 'stop' | 'length' | 'content_filter'; + index: number; + logprobs: CompletionChoice.Logprobs | null; + text: string; +} +export declare namespace CompletionChoice { + interface Logprobs { + text_offset?: Array; + token_logprobs?: Array; + tokens?: Array; + top_logprobs?: Array<{ + [key: string]: number; + }>; + } +} +/** + * Usage statistics for the completion request. + */ +export interface CompletionUsage { + /** + * Number of tokens in the generated completion. + */ + completion_tokens: number; + /** + * Number of tokens in the prompt. + */ + prompt_tokens: number; + /** + * Total number of tokens used in the request (prompt + completion). + */ + total_tokens: number; + /** + * Breakdown of tokens used in a completion. + */ + completion_tokens_details?: CompletionUsage.CompletionTokensDetails; + /** + * Breakdown of tokens used in the prompt. + */ + prompt_tokens_details?: CompletionUsage.PromptTokensDetails; +} +export declare namespace CompletionUsage { + /** + * Breakdown of tokens used in a completion. + */ + interface CompletionTokensDetails { + /** + * When using Predicted Outputs, the number of tokens in the prediction that + * appeared in the completion. + */ + accepted_prediction_tokens?: number; + /** + * Audio input tokens generated by the model. + */ + audio_tokens?: number; + /** + * Tokens generated by the model for reasoning. + */ + reasoning_tokens?: number; + /** + * When using Predicted Outputs, the number of tokens in the prediction that did + * not appear in the completion. However, like reasoning tokens, these tokens are + * still counted in the total completion tokens for purposes of billing, output, + * and context window limits. + */ + rejected_prediction_tokens?: number; + } + /** + * Breakdown of tokens used in the prompt. + */ + interface PromptTokensDetails { + /** + * Audio input tokens present in the prompt. + */ + audio_tokens?: number; + /** + * Cached tokens present in the prompt. + */ + cached_tokens?: number; + } +} +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export interface CompletionCreateParamsBase { + /** + * ID of the model to use. You can use the + * [List models](https://platform.openai.com/docs/api-reference/models/list) API to + * see all of your available models, or see our + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. + */ + model: (string & {}) | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002'; + /** + * The prompt(s) to generate completions for, encoded as a string, array of + * strings, array of tokens, or array of token arrays. + * + * Note that <|endoftext|> is the document separator that the model sees during + * training, so if a prompt is not specified the model will generate as if from the + * beginning of a new document. + */ + prompt: string | Array | Array | Array> | null; + /** + * Generates `best_of` completions server-side and returns the "best" (the one with + * the highest log probability per token). Results cannot be streamed. + * + * When used with `n`, `best_of` controls the number of candidate completions and + * `n` specifies how many to return – `best_of` must be greater than `n`. + * + * **Note:** Because this parameter generates many completions, it can quickly + * consume your token quota. Use carefully and ensure that you have reasonable + * settings for `max_tokens` and `stop`. + */ + best_of?: number | null; + /** + * Echo back the prompt in addition to the completion + */ + echo?: boolean | null; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their + * existing frequency in the text so far, decreasing the model's likelihood to + * repeat the same line verbatim. + * + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + */ + frequency_penalty?: number | null; + /** + * Modify the likelihood of specified tokens appearing in the completion. + * + * Accepts a JSON object that maps tokens (specified by their token ID in the GPT + * tokenizer) to an associated bias value from -100 to 100. You can use this + * [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. + * Mathematically, the bias is added to the logits generated by the model prior to + * sampling. The exact effect will vary per model, but values between -1 and 1 + * should decrease or increase likelihood of selection; values like -100 or 100 + * should result in a ban or exclusive selection of the relevant token. + * + * As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token + * from being generated. + */ + logit_bias?: { + [key: string]: number; + } | null; + /** + * Include the log probabilities on the `logprobs` most likely output tokens, as + * well the chosen tokens. For example, if `logprobs` is 5, the API will return a + * list of the 5 most likely tokens. The API will always return the `logprob` of + * the sampled token, so there may be up to `logprobs+1` elements in the response. + * + * The maximum value for `logprobs` is 5. + */ + logprobs?: number | null; + /** + * The maximum number of [tokens](/tokenizer) that can be generated in the + * completion. + * + * The token count of your prompt plus `max_tokens` cannot exceed the model's + * context length. + * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + * for counting tokens. + */ + max_tokens?: number | null; + /** + * How many completions to generate for each prompt. + * + * **Note:** Because this parameter generates many completions, it can quickly + * consume your token quota. Use carefully and ensure that you have reasonable + * settings for `max_tokens` and `stop`. + */ + n?: number | null; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on + * whether they appear in the text so far, increasing the model's likelihood to + * talk about new topics. + * + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + */ + presence_penalty?: number | null; + /** + * If specified, our system will make a best effort to sample deterministically, + * such that repeated requests with the same `seed` and parameters should return + * the same result. + * + * Determinism is not guaranteed, and you should refer to the `system_fingerprint` + * response parameter to monitor changes in the backend. + */ + seed?: number | null; + /** + * Not supported with latest reasoning models `o3` and `o4-mini`. + * + * Up to 4 sequences where the API will stop generating further tokens. The + * returned text will not contain the stop sequence. + */ + stop?: string | null | Array; + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream?: boolean | null; + /** + * Options for streaming response. Only set this when you set `stream: true`. + */ + stream_options?: CompletionsCompletionsAPI.ChatCompletionStreamOptions | null; + /** + * The suffix that comes after a completion of inserted text. + * + * This parameter is only supported for `gpt-3.5-turbo-instruct`. + */ + suffix?: string | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + * make the output more random, while lower values like 0.2 will make it more + * focused and deterministic. + * + * We generally recommend altering this or `top_p` but not both. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the + * model considers the results of the tokens with top_p probability mass. So 0.1 + * means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or `temperature` but not both. + */ + top_p?: number | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace CompletionCreateParams { + type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; + type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +} +export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream?: false | null; +} +export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { + /** + * Whether to stream back partial progress. If set, tokens will be sent as + * data-only + * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + * as they become available, with the stream terminated by a `data: [DONE]` + * message. + * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + */ + stream: true; +} +export declare namespace Completions { + export { type Completion as Completion, type CompletionChoice as CompletionChoice, type CompletionUsage as CompletionUsage, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; +} +//# sourceMappingURL=completions.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..72bd3b037bdfe94d0f3ddc00424e128cc9a54557 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,yBAAyB;OAC9B,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,M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B;IACpF;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;;;OAOG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js new file mode 100644 index 0000000000000000000000000000000000000000..788f49d33ec55b8f86ddb5ccf53ca2dcdf280e06 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js @@ -0,0 +1,12 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Completions = void 0; +const resource_1 = require("../core/resource.js"); +class Completions extends resource_1.APIResource { + create(body, options) { + return this._client.post('/completions', { body, ...options, stream: body.stream ?? false }); + } +} +exports.Completions = Completions; +//# sourceMappingURL=completions.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9cbf82510d3da2016a7c8778ee838c4ea0120f2b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAO/C,MAAa,WAAY,SAAQ,sBAAW;IAkB1C,MAAM,CACJ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAEzD,CAAC;IACrC,CAAC;CACF;AA1BD,kCA0BC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0faf8d6075d15155a6b983c6c93fc35582e44a80 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs @@ -0,0 +1,8 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +export class Completions extends APIResource { + create(body, options) { + return this._client.post('/completions', { body, ...options, stream: body.stream ?? false }); + } +} +//# sourceMappingURL=completions.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a2530ecc908487e7c9ec5c19b957b622e1e5174c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/completions.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAkB1C,MAAM,CACJ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAEzD,CAAC;IACrC,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..60ec9fd14625309645739a0ca3072974c8e4af44 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts @@ -0,0 +1,2 @@ +export * from "./containers/index.mjs"; +//# sourceMappingURL=containers.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..9dd19db3fca029d8fe92d86d265dbb23ed603149 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"containers.d.mts","sourceRoot":"","sources":["../src/resources/containers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2531f4690ac896ff09593bc5d7bb96ea04983d3a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts @@ -0,0 +1,2 @@ +export * from "./containers/index.js"; +//# sourceMappingURL=containers.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ecc4bfdfa0371d487fadf0bc4b239c1e1e1e5cb0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../src/resources/containers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js new file mode 100644 index 0000000000000000000000000000000000000000..53df8198eb6e6397b04e7215aa46a6298982a836 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./containers/index.js"), exports); +//# sourceMappingURL=containers.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d2bf00931aedec13f9b634d8c0d8867a56ba9b81 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"containers.js","sourceRoot":"","sources":["../src/resources/containers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gEAAmC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs new file mode 100644 index 0000000000000000000000000000000000000000..276383ce911cf55d0200e709925ad44ecd7d8a96 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./containers/index.mjs"; +//# sourceMappingURL=containers.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b857c41d9a6df1fc8b144f7816186cfc670ea5fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/containers.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"containers.mjs","sourceRoot":"","sources":["../src/resources/containers.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c50e04660bf5b124ae315725d02b7d0fc144d66c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts @@ -0,0 +1,2 @@ +export * from "./conversations/index.mjs"; +//# sourceMappingURL=conversations.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ebe17acdcc30ae95d894acafac7a400da6a315b3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"conversations.d.mts","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..505e9fc67cc6ab951c6a45016c7a03bda94a635a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts @@ -0,0 +1,2 @@ +export * from "./conversations/index.js"; +//# sourceMappingURL=conversations.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5efd0ca02a1f7eb66f4422269358b5b5c31593f9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js new file mode 100644 index 0000000000000000000000000000000000000000..37bc834b428160085c28091d7c60c690db493ce8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./conversations/index.js"), exports); +//# sourceMappingURL=conversations.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8bb96fe789cb6c628168cba87cdcd7ee8343c468 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mEAAsC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs new file mode 100644 index 0000000000000000000000000000000000000000..be4a5297d07e3e97b1c66b83f35d371f38abb945 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./conversations/index.mjs"; +//# sourceMappingURL=conversations.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..969e9550b610c5b5a97d763ab14e8067bce303ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/conversations.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..85b347bb359326360197849cb13ba9b690684e02 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts @@ -0,0 +1,113 @@ +import { APIResource } from "../core/resource.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Embeddings extends APIResource { + /** + * Creates an embedding vector representing the input text. + * + * @example + * ```ts + * const createEmbeddingResponse = + * await client.embeddings.create({ + * input: 'The quick brown fox jumped over the lazy dog', + * model: 'text-embedding-3-small', + * }); + * ``` + */ + create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise; +} +export interface CreateEmbeddingResponse { + /** + * The list of embeddings generated by the model. + */ + data: Array; + /** + * The name of the model used to generate the embedding. + */ + model: string; + /** + * The object type, which is always "list". + */ + object: 'list'; + /** + * The usage information for the request. + */ + usage: CreateEmbeddingResponse.Usage; +} +export declare namespace CreateEmbeddingResponse { + /** + * The usage information for the request. + */ + interface Usage { + /** + * The number of tokens used by the prompt. + */ + prompt_tokens: number; + /** + * The total number of tokens used by the request. + */ + total_tokens: number; + } +} +/** + * Represents an embedding vector returned by embedding endpoint. + */ +export interface Embedding { + /** + * The embedding vector, which is a list of floats. The length of vector depends on + * the model as listed in the + * [embedding guide](https://platform.openai.com/docs/guides/embeddings). + */ + embedding: Array; + /** + * The index of the embedding in the list of embeddings. + */ + index: number; + /** + * The object type, which is always "embedding". + */ + object: 'embedding'; +} +export type EmbeddingModel = 'text-embedding-ada-002' | 'text-embedding-3-small' | 'text-embedding-3-large'; +export interface EmbeddingCreateParams { + /** + * Input text to embed, encoded as a string or array of tokens. To embed multiple + * inputs in a single request, pass an array of strings or array of token arrays. + * The input must not exceed the max input tokens for the model (8192 tokens for + * all embedding models), cannot be an empty string, and any array must be 2048 + * dimensions or less. + * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + * for counting tokens. In addition to the per-input token limit, all embedding + * models enforce a maximum of 300,000 tokens summed across all inputs in a single + * request. + */ + input: string | Array | Array | Array>; + /** + * ID of the model to use. You can use the + * [List models](https://platform.openai.com/docs/api-reference/models/list) API to + * see all of your available models, or see our + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. + */ + model: (string & {}) | EmbeddingModel; + /** + * The number of dimensions the resulting output embeddings should have. Only + * supported in `text-embedding-3` and later models. + */ + dimensions?: number; + /** + * The format to return the embeddings in. Can be either `float` or + * [`base64`](https://pypi.org/project/pybase64/). + */ + encoding_format?: 'float' | 'base64'; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace Embeddings { + export { type CreateEmbeddingResponse as CreateEmbeddingResponse, type Embedding as Embedding, type EmbeddingModel as EmbeddingModel, type EmbeddingCreateParams as EmbeddingCreateParams, }; +} +//# sourceMappingURL=embeddings.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..336bd9d696b41209b90be49e62f2d4bcc5a576fe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"embeddings.d.mts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CA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,EAC3B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2073f91253ef7742f54b3c07ee67249d72d23d62 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts @@ -0,0 +1,113 @@ +import { APIResource } from "../core/resource.js"; +import { APIPromise } from "../core/api-promise.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Embeddings extends APIResource { + /** + * Creates an embedding vector representing the input text. + * + * @example + * ```ts + * const createEmbeddingResponse = + * await client.embeddings.create({ + * input: 'The quick brown fox jumped over the lazy dog', + * model: 'text-embedding-3-small', + * }); + * ``` + */ + create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise; +} +export interface CreateEmbeddingResponse { + /** + * The list of embeddings generated by the model. + */ + data: Array; + /** + * The name of the model used to generate the embedding. + */ + model: string; + /** + * The object type, which is always "list". + */ + object: 'list'; + /** + * The usage information for the request. + */ + usage: CreateEmbeddingResponse.Usage; +} +export declare namespace CreateEmbeddingResponse { + /** + * The usage information for the request. + */ + interface Usage { + /** + * The number of tokens used by the prompt. + */ + prompt_tokens: number; + /** + * The total number of tokens used by the request. + */ + total_tokens: number; + } +} +/** + * Represents an embedding vector returned by embedding endpoint. + */ +export interface Embedding { + /** + * The embedding vector, which is a list of floats. The length of vector depends on + * the model as listed in the + * [embedding guide](https://platform.openai.com/docs/guides/embeddings). + */ + embedding: Array; + /** + * The index of the embedding in the list of embeddings. + */ + index: number; + /** + * The object type, which is always "embedding". + */ + object: 'embedding'; +} +export type EmbeddingModel = 'text-embedding-ada-002' | 'text-embedding-3-small' | 'text-embedding-3-large'; +export interface EmbeddingCreateParams { + /** + * Input text to embed, encoded as a string or array of tokens. To embed multiple + * inputs in a single request, pass an array of strings or array of token arrays. + * The input must not exceed the max input tokens for the model (8192 tokens for + * all embedding models), cannot be an empty string, and any array must be 2048 + * dimensions or less. + * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + * for counting tokens. In addition to the per-input token limit, all embedding + * models enforce a maximum of 300,000 tokens summed across all inputs in a single + * request. + */ + input: string | Array | Array | Array>; + /** + * ID of the model to use. You can use the + * [List models](https://platform.openai.com/docs/api-reference/models/list) API to + * see all of your available models, or see our + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. + */ + model: (string & {}) | EmbeddingModel; + /** + * The number of dimensions the resulting output embeddings should have. Only + * supported in `text-embedding-3` and later models. + */ + dimensions?: number; + /** + * The format to return the embeddings in. Can be either `float` or + * [`base64`](https://pypi.org/project/pybase64/). + */ + encoding_format?: 'float' | 'base64'; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace Embeddings { + export { type CreateEmbeddingResponse as CreateEmbeddingResponse, type Embedding as Embedding, type EmbeddingModel as EmbeddingModel, type EmbeddingCreateParams as EmbeddingCreateParams, }; +} +//# sourceMappingURL=embeddings.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..54203ed2605806df380ca3944db7879a3ccc59a4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,U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C;IAErC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js new file mode 100644 index 0000000000000000000000000000000000000000..2404264d4ba0204322548945ebb7eab3bea82173 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js @@ -0,0 +1,56 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Embeddings = void 0; +const resource_1 = require("../core/resource.js"); +const utils_1 = require("../internal/utils.js"); +class Embeddings extends resource_1.APIResource { + /** + * Creates an embedding vector representing the input text. + * + * @example + * ```ts + * const createEmbeddingResponse = + * await client.embeddings.create({ + * input: 'The quick brown fox jumped over the lazy dog', + * model: 'text-embedding-3-small', + * }); + * ``` + */ + create(body, options) { + const hasUserProvidedEncodingFormat = !!body.encoding_format; + // No encoding_format specified, defaulting to base64 for performance reasons + // See https://github.com/openai/openai-node/pull/1312 + let encoding_format = hasUserProvidedEncodingFormat ? body.encoding_format : 'base64'; + if (hasUserProvidedEncodingFormat) { + (0, utils_1.loggerFor)(this._client).debug('embeddings/user defined encoding_format:', body.encoding_format); + } + const response = this._client.post('/embeddings', { + body: { + ...body, + encoding_format: encoding_format, + }, + ...options, + }); + // if the user specified an encoding_format, return the response as-is + if (hasUserProvidedEncodingFormat) { + return response; + } + // in this stage, we are sure the user did not specify an encoding_format + // and we defaulted to base64 for performance reasons + // we are sure then that the response is base64 encoded, let's decode it + // the returned result will be a float32 array since this is OpenAI API's default encoding + (0, utils_1.loggerFor)(this._client).debug('embeddings/decoding base64 embeddings from base64'); + return response._thenUnwrap((response) => { + if (response && response.data) { + response.data.forEach((embeddingBase64Obj) => { + const embeddingBase64Str = embeddingBase64Obj.embedding; + embeddingBase64Obj.embedding = (0, utils_1.toFloat32Array)(embeddingBase64Str); + }); + } + return response; + }); + } +} +exports.Embeddings = Embeddings; +//# sourceMappingURL=embeddings.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js.map new file mode 100644 index 0000000000000000000000000000000000000000..df00deac462d7e65f98cda370c7e0d707041863f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.js.map @@ -0,0 +1 @@ +{"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,gDAA8D;AAE9D,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,MAAM,6BAA6B,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC;QAC7D,6EAA6E;QAC7E,sDAAsD;QACtD,IAAI,eAAe,GACjB,6BAA6B,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC;QAElE,IAAI,6BAA6B,EAAE,CAAC;YAClC,IAAA,iBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAClG,CAAC;QAED,MAAM,QAAQ,GAAwC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;YACrF,IAAI,EAAE;gBACJ,GAAG,IAAI;gBACP,eAAe,EAAE,eAA2D;aAC7E;YACD,GAAG,OAAO;SACX,CAAC,CAAC;QAEH,sEAAsE;QACtE,IAAI,6BAA6B,EAAE,CAAC;YAClC,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,yEAAyE;QACzE,qDAAqD;QACrD,wEAAwE;QACxE,0FAA0F;QAC1F,IAAA,iBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QAEnF,OAAQ,QAAgD,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,EAAE;YAChF,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAC9B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;oBAC3C,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,SAA8B,CAAC;oBAC7E,kBAAkB,CAAC,SAAS,GAAG,IAAA,sBAAc,EAAC,kBAAkB,CAAC,CAAC;gBACpE,CAAC,CAAC,CAAC;YACL,CAAC;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtDD,gCAsDC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs new file mode 100644 index 0000000000000000000000000000000000000000..19dcaef578c194a89759c4360073cfd4f7dd2cbf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { loggerFor, toFloat32Array } from "../internal/utils.mjs"; +export class Embeddings extends APIResource { + /** + * Creates an embedding vector representing the input text. + * + * @example + * ```ts + * const createEmbeddingResponse = + * await client.embeddings.create({ + * input: 'The quick brown fox jumped over the lazy dog', + * model: 'text-embedding-3-small', + * }); + * ``` + */ + create(body, options) { + const hasUserProvidedEncodingFormat = !!body.encoding_format; + // No encoding_format specified, defaulting to base64 for performance reasons + // See https://github.com/openai/openai-node/pull/1312 + let encoding_format = hasUserProvidedEncodingFormat ? body.encoding_format : 'base64'; + if (hasUserProvidedEncodingFormat) { + loggerFor(this._client).debug('embeddings/user defined encoding_format:', body.encoding_format); + } + const response = this._client.post('/embeddings', { + body: { + ...body, + encoding_format: encoding_format, + }, + ...options, + }); + // if the user specified an encoding_format, return the response as-is + if (hasUserProvidedEncodingFormat) { + return response; + } + // in this stage, we are sure the user did not specify an encoding_format + // and we defaulted to base64 for performance reasons + // we are sure then that the response is base64 encoded, let's decode it + // the returned result will be a float32 array since this is OpenAI API's default encoding + loggerFor(this._client).debug('embeddings/decoding base64 embeddings from base64'); + return response._thenUnwrap((response) => { + if (response && response.data) { + response.data.forEach((embeddingBase64Obj) => { + const embeddingBase64Str = embeddingBase64Obj.embedding; + embeddingBase64Obj.embedding = toFloat32Array(embeddingBase64Str); + }); + } + return response; + }); + } +} +//# sourceMappingURL=embeddings.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f6ee1d860d2133e6c834e3ac9eaf80022b478b04 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/embeddings.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"embeddings.mjs","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,SAAS,EAAE,cAAc,EAAE;AAEpC,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;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git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..854c35a191589bd689742ffc41510e45345d896f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts @@ -0,0 +1,2 @@ +export * from "./evals/index.mjs"; +//# sourceMappingURL=evals.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..26429956f0f60bb848fb36df8b115f852f926a1a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"evals.d.mts","sourceRoot":"","sources":["../src/resources/evals.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f829713bf442e3bcc783a0b753a92e21b9f4cdea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts @@ -0,0 +1,2 @@ +export * from "./evals/index.js"; +//# sourceMappingURL=evals.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7dd97b26fcad75f509e3d375357fb3deedf02b7f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"evals.d.ts","sourceRoot":"","sources":["../src/resources/evals.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js new file mode 100644 index 0000000000000000000000000000000000000000..1562b7c2f3cdc7db0f4f79de308381f336c312c4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./evals/index.js"), exports); +//# sourceMappingURL=evals.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js.map new file mode 100644 index 0000000000000000000000000000000000000000..519584971b15fb64a689f92af1499331ee3fb5cb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"evals.js","sourceRoot":"","sources":["../src/resources/evals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAA8B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs new file mode 100644 index 0000000000000000000000000000000000000000..36a3307c0baf80565d94be49f6e34e28a0ce3e2f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./evals/index.mjs"; +//# sourceMappingURL=evals.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..63f2096cd7b17ddc65ba151991fa82224493213f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/evals.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"evals.mjs","sourceRoot":"","sources":["../src/resources/evals.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3abea0069221b3a5fa24275ba7e78bbebe917efe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.mts @@ -0,0 +1,164 @@ +import { APIResource } from "../core/resource.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs"; +import { type Uploadable } from "../core/uploads.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Files extends APIResource { + /** + * Upload a file that can be used across various endpoints. Individual files can be + * up to 512 MB, and the size of all files uploaded by one organization can be up + * to 1 TB. + * + * The Assistants API supports files up to 2 million tokens and of specific file + * types. See the + * [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + * details. + * + * The Fine-tuning API only supports `.jsonl` files. The input also has certain + * required formats for fine-tuning + * [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or + * [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + * models. + * + * The Batch API only supports `.jsonl` files up to 200 MB in size. The input also + * has a specific required + * [format](https://platform.openai.com/docs/api-reference/batch/request-input). + * + * Please [contact us](https://help.openai.com/) if you need to increase these + * storage limits. + */ + create(body: FileCreateParams, options?: RequestOptions): APIPromise; + /** + * Returns information about a specific file. + */ + retrieve(fileID: string, options?: RequestOptions): APIPromise; + /** + * Returns a list of files. + */ + list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a file. + */ + delete(fileID: string, options?: RequestOptions): APIPromise; + /** + * Returns the contents of the specified file. + */ + content(fileID: string, options?: RequestOptions): APIPromise; + /** + * Waits for the given file to be processed, default timeout is 30 mins. + */ + waitForProcessing(id: string, { pollInterval, maxWait }?: { + pollInterval?: number; + maxWait?: number; + }): Promise; +} +export type FileObjectsPage = CursorPage; +export type FileContent = string; +export interface FileDeleted { + id: string; + deleted: boolean; + object: 'file'; +} +/** + * The `File` object represents a document that has been uploaded to OpenAI. + */ +export interface FileObject { + /** + * The file identifier, which can be referenced in the API endpoints. + */ + id: string; + /** + * The size of the file, in bytes. + */ + bytes: number; + /** + * The Unix timestamp (in seconds) for when the file was created. + */ + created_at: number; + /** + * The name of the file. + */ + filename: string; + /** + * The object type, which is always `file`. + */ + object: 'file'; + /** + * The intended purpose of the file. Supported values are `assistants`, + * `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, + * `vision`, and `user_data`. + */ + purpose: 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data'; + /** + * @deprecated Deprecated. The current status of the file, which can be either + * `uploaded`, `processed`, or `error`. + */ + status: 'uploaded' | 'processed' | 'error'; + /** + * The Unix timestamp (in seconds) for when the file will expire. + */ + expires_at?: number; + /** + * @deprecated Deprecated. For details on why a fine-tuning training file failed + * validation, see the `error` field on `fine_tuning.job`. + */ + status_details?: string; +} +/** + * The intended purpose of the uploaded file. One of: - `assistants`: Used in the + * Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for + * fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: + * Flexible file type for any purpose - `evals`: Used for eval data sets + */ +export type FilePurpose = 'assistants' | 'batch' | 'fine-tune' | 'vision' | 'user_data' | 'evals'; +export interface FileCreateParams { + /** + * The File object (not file name) to be uploaded. + */ + file: Uploadable; + /** + * The intended purpose of the uploaded file. One of: - `assistants`: Used in the + * Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for + * fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: + * Flexible file type for any purpose - `evals`: Used for eval data sets + */ + purpose: FilePurpose; + /** + * The expiration policy for a file. By default, files with `purpose=batch` expire + * after 30 days and all other files are persisted until they are manually deleted. + */ + expires_after?: FileCreateParams.ExpiresAfter; +} +export declare namespace FileCreateParams { + /** + * The expiration policy for a file. By default, files with `purpose=batch` expire + * after 30 days and all other files are persisted until they are manually deleted. + */ + interface ExpiresAfter { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: + * `created_at`. + */ + anchor: 'created_at'; + /** + * The number of seconds after the anchor time that the file will expire. Must be + * between 3600 (1 hour) and 2592000 (30 days). + */ + seconds: number; + } +} +export interface FileListParams extends CursorPageParams { + /** + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending + * order and `desc` for descending order. + */ + order?: 'asc' | 'desc'; + /** + * Only return files with the given purpose. + */ + purpose?: string; +} +export declare namespace Files { + export { type FileContent as FileContent, type FileDeleted as FileDeleted, type FileObject as FileObject, type FilePurpose as FilePurpose, type FileObjectsPage as FileObjectsPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; +} +//# sourceMappingURL=files.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6fc4d063efb3d496ce509f31057b8952ba6dfa7a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.m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AO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..aeb3cc221974851f666807cdcf6574adca442da1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts @@ -0,0 +1,164 @@ +import { APIResource } from "../core/resource.js"; +import { APIPromise } from "../core/api-promise.js"; +import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js"; +import { type Uploadable } from "../core/uploads.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Files extends APIResource { + /** + * Upload a file that can be used across various endpoints. Individual files can be + * up to 512 MB, and the size of all files uploaded by one organization can be up + * to 1 TB. + * + * The Assistants API supports files up to 2 million tokens and of specific file + * types. See the + * [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + * details. + * + * The Fine-tuning API only supports `.jsonl` files. The input also has certain + * required formats for fine-tuning + * [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or + * [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + * models. + * + * The Batch API only supports `.jsonl` files up to 200 MB in size. The input also + * has a specific required + * [format](https://platform.openai.com/docs/api-reference/batch/request-input). + * + * Please [contact us](https://help.openai.com/) if you need to increase these + * storage limits. + */ + create(body: FileCreateParams, options?: RequestOptions): APIPromise; + /** + * Returns information about a specific file. + */ + retrieve(fileID: string, options?: RequestOptions): APIPromise; + /** + * Returns a list of files. + */ + list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a file. + */ + delete(fileID: string, options?: RequestOptions): APIPromise; + /** + * Returns the contents of the specified file. + */ + content(fileID: string, options?: RequestOptions): APIPromise; + /** + * Waits for the given file to be processed, default timeout is 30 mins. + */ + waitForProcessing(id: string, { pollInterval, maxWait }?: { + pollInterval?: number; + maxWait?: number; + }): Promise; +} +export type FileObjectsPage = CursorPage; +export type FileContent = string; +export interface FileDeleted { + id: string; + deleted: boolean; + object: 'file'; +} +/** + * The `File` object represents a document that has been uploaded to OpenAI. + */ +export interface FileObject { + /** + * The file identifier, which can be referenced in the API endpoints. + */ + id: string; + /** + * The size of the file, in bytes. + */ + bytes: number; + /** + * The Unix timestamp (in seconds) for when the file was created. + */ + created_at: number; + /** + * The name of the file. + */ + filename: string; + /** + * The object type, which is always `file`. + */ + object: 'file'; + /** + * The intended purpose of the file. Supported values are `assistants`, + * `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, + * `vision`, and `user_data`. + */ + purpose: 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data'; + /** + * @deprecated Deprecated. The current status of the file, which can be either + * `uploaded`, `processed`, or `error`. + */ + status: 'uploaded' | 'processed' | 'error'; + /** + * The Unix timestamp (in seconds) for when the file will expire. + */ + expires_at?: number; + /** + * @deprecated Deprecated. For details on why a fine-tuning training file failed + * validation, see the `error` field on `fine_tuning.job`. + */ + status_details?: string; +} +/** + * The intended purpose of the uploaded file. One of: - `assistants`: Used in the + * Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for + * fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: + * Flexible file type for any purpose - `evals`: Used for eval data sets + */ +export type FilePurpose = 'assistants' | 'batch' | 'fine-tune' | 'vision' | 'user_data' | 'evals'; +export interface FileCreateParams { + /** + * The File object (not file name) to be uploaded. + */ + file: Uploadable; + /** + * The intended purpose of the uploaded file. One of: - `assistants`: Used in the + * Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for + * fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: + * Flexible file type for any purpose - `evals`: Used for eval data sets + */ + purpose: FilePurpose; + /** + * The expiration policy for a file. By default, files with `purpose=batch` expire + * after 30 days and all other files are persisted until they are manually deleted. + */ + expires_after?: FileCreateParams.ExpiresAfter; +} +export declare namespace FileCreateParams { + /** + * The expiration policy for a file. By default, files with `purpose=batch` expire + * after 30 days and all other files are persisted until they are manually deleted. + */ + interface ExpiresAfter { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: + * `created_at`. + */ + anchor: 'created_at'; + /** + * The number of seconds after the anchor time that the file will expire. Must be + * between 3600 (1 hour) and 2592000 (30 days). + */ + seconds: number; + } +} +export interface FileListParams extends CursorPageParams { + /** + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending + * order and `desc` for descending order. + */ + order?: 'asc' | 'desc'; + /** + * Only return files with the given purpose. + */ + purpose?: string; +} +export declare namespace Files { + export { type FileContent as FileContent, type FileDeleted as FileDeleted, type FileObject as FileObject, type FilePurpose as FilePurpose, type FileObjectsPage as FileObjectsPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; +} +//# sourceMappingURL=files.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7ecef52e30c4cfcbf6ca4d15e9afc5bb9916345c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE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K,WAAW,IAAI,WAAW,EAC/B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js new file mode 100644 index 0000000000000000000000000000000000000000..fb7f1477a40bb1db6188e6e676d4748fb57e953b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js @@ -0,0 +1,87 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Files = void 0; +const resource_1 = require("../core/resource.js"); +const pagination_1 = require("../core/pagination.js"); +const headers_1 = require("../internal/headers.js"); +const sleep_1 = require("../internal/utils/sleep.js"); +const error_1 = require("../error.js"); +const uploads_1 = require("../internal/uploads.js"); +const path_1 = require("../internal/utils/path.js"); +class Files extends resource_1.APIResource { + /** + * Upload a file that can be used across various endpoints. Individual files can be + * up to 512 MB, and the size of all files uploaded by one organization can be up + * to 1 TB. + * + * The Assistants API supports files up to 2 million tokens and of specific file + * types. See the + * [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + * details. + * + * The Fine-tuning API only supports `.jsonl` files. The input also has certain + * required formats for fine-tuning + * [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or + * [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + * models. + * + * The Batch API only supports `.jsonl` files up to 200 MB in size. The input also + * has a specific required + * [format](https://platform.openai.com/docs/api-reference/batch/request-input). + * + * Please [contact us](https://help.openai.com/) if you need to increase these + * storage limits. + */ + create(body, options) { + return this._client.post('/files', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client)); + } + /** + * Returns information about a specific file. + */ + retrieve(fileID, options) { + return this._client.get((0, path_1.path) `/files/${fileID}`, options); + } + /** + * Returns a list of files. + */ + list(query = {}, options) { + return this._client.getAPIList('/files', (pagination_1.CursorPage), { query, ...options }); + } + /** + * Delete a file. + */ + delete(fileID, options) { + return this._client.delete((0, path_1.path) `/files/${fileID}`, options); + } + /** + * Returns the contents of the specified file. + */ + content(fileID, options) { + return this._client.get((0, path_1.path) `/files/${fileID}/content`, { + ...options, + headers: (0, headers_1.buildHeaders)([{ Accept: 'application/binary' }, options?.headers]), + __binaryResponse: true, + }); + } + /** + * Waits for the given file to be processed, default timeout is 30 mins. + */ + async waitForProcessing(id, { pollInterval = 5000, maxWait = 30 * 60 * 1000 } = {}) { + const TERMINAL_STATES = new Set(['processed', 'error', 'deleted']); + const start = Date.now(); + let file = await this.retrieve(id); + while (!file.status || !TERMINAL_STATES.has(file.status)) { + await (0, sleep_1.sleep)(pollInterval); + file = await this.retrieve(id); + if (Date.now() - start > maxWait) { + throw new error_1.APIConnectionTimeoutError({ + message: `Giving up on waiting for file ${id} to finish processing after ${maxWait} milliseconds.`, + }); + } + } + return file; + } +} +exports.Files = Files; +//# sourceMappingURL=files.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js.map new file mode 100644 index 0000000000000000000000000000000000000000..89d132adda899349174d97bed8cece6f550cb3cd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.js.map @@ -0,0 +1 @@ +{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAAmD;AAEnD,sDAAgD;AAChD,uCAAqD;AACrD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EAAE,YAAY,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,KAAkD,EAAE;QAEnG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;QAEnE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC;YAE1B,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC/B,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,OAAO,EAAE,CAAC;gBACjC,MAAM,IAAI,iCAAyB,CAAC;oBAClC,OAAO,EAAE,iCAAiC,EAAE,+BAA+B,OAAO,gBAAgB;iBACnG,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAxFD,sBAwFC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f151e19374bc030ad7d1eb50b9967da401da80ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs @@ -0,0 +1,83 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { CursorPage } from "../core/pagination.mjs"; +import { buildHeaders } from "../internal/headers.mjs"; +import { sleep } from "../internal/utils/sleep.mjs"; +import { APIConnectionTimeoutError } from "../error.mjs"; +import { multipartFormRequestOptions } from "../internal/uploads.mjs"; +import { path } from "../internal/utils/path.mjs"; +export class Files extends APIResource { + /** + * Upload a file that can be used across various endpoints. Individual files can be + * up to 512 MB, and the size of all files uploaded by one organization can be up + * to 1 TB. + * + * The Assistants API supports files up to 2 million tokens and of specific file + * types. See the + * [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + * details. + * + * The Fine-tuning API only supports `.jsonl` files. The input also has certain + * required formats for fine-tuning + * [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or + * [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + * models. + * + * The Batch API only supports `.jsonl` files up to 200 MB in size. The input also + * has a specific required + * [format](https://platform.openai.com/docs/api-reference/batch/request-input). + * + * Please [contact us](https://help.openai.com/) if you need to increase these + * storage limits. + */ + create(body, options) { + return this._client.post('/files', multipartFormRequestOptions({ body, ...options }, this._client)); + } + /** + * Returns information about a specific file. + */ + retrieve(fileID, options) { + return this._client.get(path `/files/${fileID}`, options); + } + /** + * Returns a list of files. + */ + list(query = {}, options) { + return this._client.getAPIList('/files', (CursorPage), { query, ...options }); + } + /** + * Delete a file. + */ + delete(fileID, options) { + return this._client.delete(path `/files/${fileID}`, options); + } + /** + * Returns the contents of the specified file. + */ + content(fileID, options) { + return this._client.get(path `/files/${fileID}/content`, { + ...options, + headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]), + __binaryResponse: true, + }); + } + /** + * Waits for the given file to be processed, default timeout is 30 mins. + */ + async waitForProcessing(id, { pollInterval = 5000, maxWait = 30 * 60 * 1000 } = {}) { + const TERMINAL_STATES = new Set(['processed', 'error', 'deleted']); + const start = Date.now(); + let file = await this.retrieve(id); + while (!file.status || !TERMINAL_STATES.has(file.status)) { + await sleep(pollInterval); + file = await this.retrieve(id); + if (Date.now() - start > maxWait) { + throw new APIConnectionTimeoutError({ + message: `Giving up on waiting for file ${id} to finish processing after ${maxWait} milliseconds.`, + }); + } + } + return file; + } +} +//# sourceMappingURL=files.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2d7362ddd9cd7ad2ac21d7ca68fe43b05246a4d1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/files.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,YAAY,EAAE;OAEhB,EAAE,KAAK,EAAE;OACT,EAAE,yBAAyB,EAAE;OAC7B,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACtG,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,UAAsB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;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,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..42012eac56708c890c2b899cd58abca779bfc8f5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts @@ -0,0 +1,2 @@ +export * from "./fine-tuning/index.mjs"; +//# sourceMappingURL=fine-tuning.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..281a985059ae6f353369ffde65da23eb8691ae3a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"fine-tuning.d.mts","sourceRoot":"","sources":["../src/resources/fine-tuning.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4969cbbc2f7c723c0ac68af70079d8e523b91bc2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts @@ -0,0 +1,2 @@ +export * from "./fine-tuning/index.js"; +//# sourceMappingURL=fine-tuning.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2b5e2ee66bcc241bde577e65d7580e12de88df89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fine-tuning.d.ts","sourceRoot":"","sources":["../src/resources/fine-tuning.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js new file mode 100644 index 0000000000000000000000000000000000000000..0b6be152a689f03b67ba6f46fa03640635a42361 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./fine-tuning/index.js"), exports); +//# sourceMappingURL=fine-tuning.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c7b9ac927262121693ffaea8f0c6382e517b6d7e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fine-tuning.js","sourceRoot":"","sources":["../src/resources/fine-tuning.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,iEAAoC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs new file mode 100644 index 0000000000000000000000000000000000000000..609367fc9f4eb9df0d2fb9866985062b5581199e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./fine-tuning/index.mjs"; +//# sourceMappingURL=fine-tuning.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9eb21547ad7cce31bc30ea1d3b6256e2e3a4fc97 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/fine-tuning.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"fine-tuning.mjs","sourceRoot":"","sources":["../src/resources/fine-tuning.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..139c57ee8dec12bee958160a75bc3666565d99f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts @@ -0,0 +1,2 @@ +export * from "./graders/index.mjs"; +//# sourceMappingURL=graders.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6c1465dd195daa0b60d77d74841d28d48584ef15 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"graders.d.mts","sourceRoot":"","sources":["../src/resources/graders.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3cbd869600eb2d18b91daeb458a29472494fa78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts @@ -0,0 +1,2 @@ +export * from "./graders/index.js"; +//# sourceMappingURL=graders.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..bb2ab9c0a72629ad009ec80ed593ce1b3a17754e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graders.d.ts","sourceRoot":"","sources":["../src/resources/graders.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js new file mode 100644 index 0000000000000000000000000000000000000000..457bbebefbe289b89a7dea1f815d069c31e527a0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./graders/index.js"), exports); +//# sourceMappingURL=graders.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bb6877720556f06dd73660302283e1b8ea98a2a0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graders.js","sourceRoot":"","sources":["../src/resources/graders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs new file mode 100644 index 0000000000000000000000000000000000000000..38452ea3d7b6aff855240158b875b7d50d7984a1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./graders/index.mjs"; +//# sourceMappingURL=graders.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b2d52118dae0dd1593932a241abfa0cc1d814998 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/graders.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"graders.mjs","sourceRoot":"","sources":["../src/resources/graders.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..12f939ab4a95ba86d1f2d394d24fa0762f8c705b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.mts @@ -0,0 +1,653 @@ +import { APIResource } from "../core/resource.mjs"; +import * as ImagesAPI from "./images.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { Stream } from "../core/streaming.mjs"; +import { type Uploadable } from "../core/uploads.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Images extends APIResource { + /** + * Creates a variation of a given image. This endpoint only supports `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.createVariation({ + * image: fs.createReadStream('otter.png'), + * }); + * ``` + */ + createVariation(body: ImageCreateVariationParams, options?: RequestOptions): APIPromise; + /** + * Creates an edited or extended image given one or more source images and a + * prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.edit({ + * image: fs.createReadStream('path/to/file'), + * prompt: 'A cute baby sea otter wearing a beret', + * }); + * ``` + */ + edit(body: ImageEditParamsNonStreaming, options?: RequestOptions): APIPromise; + edit(body: ImageEditParamsStreaming, options?: RequestOptions): APIPromise>; + edit(body: ImageEditParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; + /** + * Creates an image given a prompt. + * [Learn more](https://platform.openai.com/docs/guides/images). + * + * @example + * ```ts + * const imagesResponse = await client.images.generate({ + * prompt: 'A cute baby sea otter', + * }); + * ``` + */ + generate(body: ImageGenerateParamsNonStreaming, options?: RequestOptions): APIPromise; + generate(body: ImageGenerateParamsStreaming, options?: RequestOptions): APIPromise>; + generate(body: ImageGenerateParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; +} +/** + * Represents the content or the URL of an image generated by the OpenAI API. + */ +export interface Image { + /** + * The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, + * and only present if `response_format` is set to `b64_json` for `dall-e-2` and + * `dall-e-3`. + */ + b64_json?: string; + /** + * For `dall-e-3` only, the revised prompt that was used to generate the image. + */ + revised_prompt?: string; + /** + * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if + * `response_format` is set to `url` (default value). Unsupported for + * `gpt-image-1`. + */ + url?: string; +} +/** + * Emitted when image editing has completed and the final image is available. + */ +export interface ImageEditCompletedEvent { + /** + * Base64-encoded final edited image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the edited image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the edited image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * The quality setting for the edited image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the edited image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_edit.completed`. + */ + type: 'image_edit.completed'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage: ImageEditCompletedEvent.Usage; +} +export declare namespace ImageEditCompletedEvent { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of image tokens in the output image. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +/** + * Emitted when a partial image is available during image editing streaming. + */ +export interface ImageEditPartialImageEvent { + /** + * Base64-encoded partial image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the requested edited image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the requested edited image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * 0-based index for the partial image (streaming). + */ + partial_image_index: number; + /** + * The quality setting for the requested edited image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the requested edited image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_edit.partial_image`. + */ + type: 'image_edit.partial_image'; +} +/** + * Emitted when a partial image is available during image editing streaming. + */ +export type ImageEditStreamEvent = ImageEditPartialImageEvent | ImageEditCompletedEvent; +/** + * Emitted when image generation has completed and the final image is available. + */ +export interface ImageGenCompletedEvent { + /** + * Base64-encoded image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the generated image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the generated image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * The quality setting for the generated image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the generated image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_generation.completed`. + */ + type: 'image_generation.completed'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage: ImageGenCompletedEvent.Usage; +} +export declare namespace ImageGenCompletedEvent { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of image tokens in the output image. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +/** + * Emitted when a partial image is available during image generation streaming. + */ +export interface ImageGenPartialImageEvent { + /** + * Base64-encoded partial image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the requested image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the requested image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * 0-based index for the partial image (streaming). + */ + partial_image_index: number; + /** + * The quality setting for the requested image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the requested image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_generation.partial_image`. + */ + type: 'image_generation.partial_image'; +} +/** + * Emitted when a partial image is available during image generation streaming. + */ +export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent; +export type ImageModel = 'dall-e-2' | 'dall-e-3' | 'gpt-image-1'; +/** + * The response from the image generation endpoint. + */ +export interface ImagesResponse { + /** + * The Unix timestamp (in seconds) of when the image was created. + */ + created: number; + /** + * The background parameter used for the image generation. Either `transparent` or + * `opaque`. + */ + background?: 'transparent' | 'opaque'; + /** + * The list of generated images. + */ + data?: Array; + /** + * The output format of the image generation. Either `png`, `webp`, or `jpeg`. + */ + output_format?: 'png' | 'webp' | 'jpeg'; + /** + * The quality of the image generated. Either `low`, `medium`, or `high`. + */ + quality?: 'low' | 'medium' | 'high'; + /** + * The size of the image generated. Either `1024x1024`, `1024x1536`, or + * `1536x1024`. + */ + size?: '1024x1024' | '1024x1536' | '1536x1024'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage?: ImagesResponse.Usage; +} +export declare namespace ImagesResponse { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of output tokens generated by the model. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +export interface ImageCreateVariationParams { + /** + * The image to use as the basis for the variation(s). Must be a valid PNG file, + * less than 4MB, and square. + */ + image: Uploadable; + /** + * The model to use for image generation. Only `dall-e-2` is supported at this + * time. + */ + model?: (string & {}) | ImageModel | null; + /** + * The number of images to generate. Must be between 1 and 10. + */ + n?: number | null; + /** + * The format in which the generated images are returned. Must be one of `url` or + * `b64_json`. URLs are only valid for 60 minutes after the image has been + * generated. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `256x256`, `512x512`, or + * `1024x1024`. + */ + size?: '256x256' | '512x512' | '1024x1024' | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export type ImageEditParams = ImageEditParamsNonStreaming | ImageEditParamsStreaming; +export interface ImageEditParamsBase { + /** + * The image(s) to edit. Must be a supported image file or an array of images. + * + * For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than + * 50MB. You can provide up to 16 images. + * + * For `dall-e-2`, you can only provide one image, and it should be a square `png` + * file less than 4MB. + */ + image: Uploadable | Array; + /** + * A text description of the desired image(s). The maximum length is 1000 + * characters for `dall-e-2`, and 32000 characters for `gpt-image-1`. + */ + prompt: string; + /** + * Allows to set transparency for the background of the generated image(s). This + * parameter is only supported for `gpt-image-1`. Must be one of `transparent`, + * `opaque` or `auto` (default value). When `auto` is used, the model will + * automatically determine the best background for the image. + * + * If `transparent`, the output format needs to support transparency, so it should + * be set to either `png` (default value) or `webp`. + */ + background?: 'transparent' | 'opaque' | 'auto' | null; + /** + * Control how much effort the model will exert to match the style and features, + * especially facial features, of input images. This parameter is only supported + * for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`. + */ + input_fidelity?: 'high' | 'low' | null; + /** + * An additional image whose fully transparent areas (e.g. where alpha is zero) + * indicate where `image` should be edited. If there are multiple images provided, + * the mask will be applied on the first image. Must be a valid PNG file, less than + * 4MB, and have the same dimensions as `image`. + */ + mask?: Uploadable; + /** + * The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are + * supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` + * is used. + */ + model?: (string & {}) | ImageModel | null; + /** + * The number of images to generate. Must be between 1 and 10. + */ + n?: number | null; + /** + * The compression level (0-100%) for the generated images. This parameter is only + * supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and + * defaults to 100. + */ + output_compression?: number | null; + /** + * The format in which the generated images are returned. This parameter is only + * supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The + * default value is `png`. + */ + output_format?: 'png' | 'jpeg' | 'webp' | null; + /** + * The number of partial images to generate. This parameter is used for streaming + * responses that return partial images. Value must be between 0 and 3. When set to + * 0, the response will be a single image sent in one streaming event. + * + * Note that the final image may be sent before the full number of partial images + * are generated if the full image is generated more quickly. + */ + partial_images?: number | null; + /** + * The quality of the image that will be generated. `high`, `medium` and `low` are + * only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. + * Defaults to `auto`. + */ + quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto' | null; + /** + * The format in which the generated images are returned. Must be one of `url` or + * `b64_json`. URLs are only valid for 60 minutes after the image has been + * generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` + * will always return base64-encoded images. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `1024x1024`, `1536x1024` + * (landscape), `1024x1536` (portrait), or `auto` (default value) for + * `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. + */ + size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null; + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream?: boolean | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace ImageEditParams { + type ImageEditParamsNonStreaming = ImagesAPI.ImageEditParamsNonStreaming; + type ImageEditParamsStreaming = ImagesAPI.ImageEditParamsStreaming; +} +export interface ImageEditParamsNonStreaming extends ImageEditParamsBase { + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream?: false | null; +} +export interface ImageEditParamsStreaming extends ImageEditParamsBase { + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream: true; +} +export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerateParamsStreaming; +export interface ImageGenerateParamsBase { + /** + * A text description of the desired image(s). The maximum length is 32000 + * characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters + * for `dall-e-3`. + */ + prompt: string; + /** + * Allows to set transparency for the background of the generated image(s). This + * parameter is only supported for `gpt-image-1`. Must be one of `transparent`, + * `opaque` or `auto` (default value). When `auto` is used, the model will + * automatically determine the best background for the image. + * + * If `transparent`, the output format needs to support transparency, so it should + * be set to either `png` (default value) or `webp`. + */ + background?: 'transparent' | 'opaque' | 'auto' | null; + /** + * The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or + * `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to + * `gpt-image-1` is used. + */ + model?: (string & {}) | ImageModel | null; + /** + * Control the content-moderation level for images generated by `gpt-image-1`. Must + * be either `low` for less restrictive filtering or `auto` (default value). + */ + moderation?: 'low' | 'auto' | null; + /** + * The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only + * `n=1` is supported. + */ + n?: number | null; + /** + * The compression level (0-100%) for the generated images. This parameter is only + * supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and + * defaults to 100. + */ + output_compression?: number | null; + /** + * The format in which the generated images are returned. This parameter is only + * supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. + */ + output_format?: 'png' | 'jpeg' | 'webp' | null; + /** + * The number of partial images to generate. This parameter is used for streaming + * responses that return partial images. Value must be between 0 and 3. When set to + * 0, the response will be a single image sent in one streaming event. + * + * Note that the final image may be sent before the full number of partial images + * are generated if the full image is generated more quickly. + */ + partial_images?: number | null; + /** + * The quality of the image that will be generated. + * + * - `auto` (default value) will automatically select the best quality for the + * given model. + * - `high`, `medium` and `low` are supported for `gpt-image-1`. + * - `hd` and `standard` are supported for `dall-e-3`. + * - `standard` is the only option for `dall-e-2`. + */ + quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | null; + /** + * The format in which generated images with `dall-e-2` and `dall-e-3` are + * returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes + * after the image has been generated. This parameter isn't supported for + * `gpt-image-1` which will always return base64-encoded images. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `1024x1024`, `1536x1024` + * (landscape), `1024x1536` (portrait), or `auto` (default value) for + * `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and + * one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`. + */ + size?: 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792' | null; + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream?: boolean | null; + /** + * The style of the generated images. This parameter is only supported for + * `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean + * towards generating hyper-real and dramatic images. Natural causes the model to + * produce more natural, less hyper-real looking images. + */ + style?: 'vivid' | 'natural' | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace ImageGenerateParams { + type ImageGenerateParamsNonStreaming = ImagesAPI.ImageGenerateParamsNonStreaming; + type ImageGenerateParamsStreaming = ImagesAPI.ImageGenerateParamsStreaming; +} +export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase { + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream?: false | null; +} +export interface ImageGenerateParamsStreaming extends ImageGenerateParamsBase { + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream: true; +} +export declare namespace Images { + export { type Image as Image, type ImageEditCompletedEvent as ImageEditCompletedEvent, type ImageEditPartialImageEvent as ImageEditPartialImageEvent, type ImageEditStreamEvent as ImageEditStreamEvent, type ImageGenCompletedEvent as ImageGenCompletedEvent, type ImageGenPartialImageEvent as ImageGenPartialImageEvent, type ImageGenStreamEvent as ImageGenStreamEvent, type ImageModel as ImageModel, type ImagesResponse as ImagesResponse, type ImageCreateVariationParams as ImageCreateVariationParams, type ImageEditParams as ImageEditParams, type ImageEditParamsNonStreaming as ImageEditParamsNonStreaming, type ImageEditParamsStreaming as ImageEditParamsStreaming, type ImageGenerateParams as ImageGenerateParams, type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, }; +} +//# sourceMappingURL=images.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..3001843a168bfe504d7286eb23e55d73d3320f15 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources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mBAAmB,CAAC;IACnC,KAAY,+BAA+B,GAAG,SAAS,CAAC,+BAA+B,CAAC;IACxF,KAAY,4BAA4B,GAAG,SAAS,CAAC,4BAA4B,CAAC;CACnF;AAED,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC9E;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E;;;;OAIG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..eef634e64d1657fd883f218f13863ad57624f924 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts @@ -0,0 +1,653 @@ +import { APIResource } from "../core/resource.js"; +import * as ImagesAPI from "./images.js"; +import { APIPromise } from "../core/api-promise.js"; +import { Stream } from "../core/streaming.js"; +import { type Uploadable } from "../core/uploads.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Images extends APIResource { + /** + * Creates a variation of a given image. This endpoint only supports `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.createVariation({ + * image: fs.createReadStream('otter.png'), + * }); + * ``` + */ + createVariation(body: ImageCreateVariationParams, options?: RequestOptions): APIPromise; + /** + * Creates an edited or extended image given one or more source images and a + * prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.edit({ + * image: fs.createReadStream('path/to/file'), + * prompt: 'A cute baby sea otter wearing a beret', + * }); + * ``` + */ + edit(body: ImageEditParamsNonStreaming, options?: RequestOptions): APIPromise; + edit(body: ImageEditParamsStreaming, options?: RequestOptions): APIPromise>; + edit(body: ImageEditParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; + /** + * Creates an image given a prompt. + * [Learn more](https://platform.openai.com/docs/guides/images). + * + * @example + * ```ts + * const imagesResponse = await client.images.generate({ + * prompt: 'A cute baby sea otter', + * }); + * ``` + */ + generate(body: ImageGenerateParamsNonStreaming, options?: RequestOptions): APIPromise; + generate(body: ImageGenerateParamsStreaming, options?: RequestOptions): APIPromise>; + generate(body: ImageGenerateParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; +} +/** + * Represents the content or the URL of an image generated by the OpenAI API. + */ +export interface Image { + /** + * The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, + * and only present if `response_format` is set to `b64_json` for `dall-e-2` and + * `dall-e-3`. + */ + b64_json?: string; + /** + * For `dall-e-3` only, the revised prompt that was used to generate the image. + */ + revised_prompt?: string; + /** + * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if + * `response_format` is set to `url` (default value). Unsupported for + * `gpt-image-1`. + */ + url?: string; +} +/** + * Emitted when image editing has completed and the final image is available. + */ +export interface ImageEditCompletedEvent { + /** + * Base64-encoded final edited image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the edited image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the edited image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * The quality setting for the edited image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the edited image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_edit.completed`. + */ + type: 'image_edit.completed'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage: ImageEditCompletedEvent.Usage; +} +export declare namespace ImageEditCompletedEvent { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of image tokens in the output image. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +/** + * Emitted when a partial image is available during image editing streaming. + */ +export interface ImageEditPartialImageEvent { + /** + * Base64-encoded partial image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the requested edited image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the requested edited image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * 0-based index for the partial image (streaming). + */ + partial_image_index: number; + /** + * The quality setting for the requested edited image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the requested edited image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_edit.partial_image`. + */ + type: 'image_edit.partial_image'; +} +/** + * Emitted when a partial image is available during image editing streaming. + */ +export type ImageEditStreamEvent = ImageEditPartialImageEvent | ImageEditCompletedEvent; +/** + * Emitted when image generation has completed and the final image is available. + */ +export interface ImageGenCompletedEvent { + /** + * Base64-encoded image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the generated image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the generated image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * The quality setting for the generated image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the generated image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_generation.completed`. + */ + type: 'image_generation.completed'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage: ImageGenCompletedEvent.Usage; +} +export declare namespace ImageGenCompletedEvent { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of image tokens in the output image. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +/** + * Emitted when a partial image is available during image generation streaming. + */ +export interface ImageGenPartialImageEvent { + /** + * Base64-encoded partial image data, suitable for rendering as an image. + */ + b64_json: string; + /** + * The background setting for the requested image. + */ + background: 'transparent' | 'opaque' | 'auto'; + /** + * The Unix timestamp when the event was created. + */ + created_at: number; + /** + * The output format for the requested image. + */ + output_format: 'png' | 'webp' | 'jpeg'; + /** + * 0-based index for the partial image (streaming). + */ + partial_image_index: number; + /** + * The quality setting for the requested image. + */ + quality: 'low' | 'medium' | 'high' | 'auto'; + /** + * The size of the requested image. + */ + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; + /** + * The type of the event. Always `image_generation.partial_image`. + */ + type: 'image_generation.partial_image'; +} +/** + * Emitted when a partial image is available during image generation streaming. + */ +export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent; +export type ImageModel = 'dall-e-2' | 'dall-e-3' | 'gpt-image-1'; +/** + * The response from the image generation endpoint. + */ +export interface ImagesResponse { + /** + * The Unix timestamp (in seconds) of when the image was created. + */ + created: number; + /** + * The background parameter used for the image generation. Either `transparent` or + * `opaque`. + */ + background?: 'transparent' | 'opaque'; + /** + * The list of generated images. + */ + data?: Array; + /** + * The output format of the image generation. Either `png`, `webp`, or `jpeg`. + */ + output_format?: 'png' | 'webp' | 'jpeg'; + /** + * The quality of the image generated. Either `low`, `medium`, or `high`. + */ + quality?: 'low' | 'medium' | 'high'; + /** + * The size of the image generated. Either `1024x1024`, `1024x1536`, or + * `1536x1024`. + */ + size?: '1024x1024' | '1024x1536' | '1536x1024'; + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + usage?: ImagesResponse.Usage; +} +export declare namespace ImagesResponse { + /** + * For `gpt-image-1` only, the token usage information for the image generation. + */ + interface Usage { + /** + * The number of tokens (images and text) in the input prompt. + */ + input_tokens: number; + /** + * The input tokens detailed information for the image generation. + */ + input_tokens_details: Usage.InputTokensDetails; + /** + * The number of output tokens generated by the model. + */ + output_tokens: number; + /** + * The total number of tokens (images and text) used for the image generation. + */ + total_tokens: number; + } + namespace Usage { + /** + * The input tokens detailed information for the image generation. + */ + interface InputTokensDetails { + /** + * The number of image tokens in the input prompt. + */ + image_tokens: number; + /** + * The number of text tokens in the input prompt. + */ + text_tokens: number; + } + } +} +export interface ImageCreateVariationParams { + /** + * The image to use as the basis for the variation(s). Must be a valid PNG file, + * less than 4MB, and square. + */ + image: Uploadable; + /** + * The model to use for image generation. Only `dall-e-2` is supported at this + * time. + */ + model?: (string & {}) | ImageModel | null; + /** + * The number of images to generate. Must be between 1 and 10. + */ + n?: number | null; + /** + * The format in which the generated images are returned. Must be one of `url` or + * `b64_json`. URLs are only valid for 60 minutes after the image has been + * generated. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `256x256`, `512x512`, or + * `1024x1024`. + */ + size?: '256x256' | '512x512' | '1024x1024' | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export type ImageEditParams = ImageEditParamsNonStreaming | ImageEditParamsStreaming; +export interface ImageEditParamsBase { + /** + * The image(s) to edit. Must be a supported image file or an array of images. + * + * For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than + * 50MB. You can provide up to 16 images. + * + * For `dall-e-2`, you can only provide one image, and it should be a square `png` + * file less than 4MB. + */ + image: Uploadable | Array; + /** + * A text description of the desired image(s). The maximum length is 1000 + * characters for `dall-e-2`, and 32000 characters for `gpt-image-1`. + */ + prompt: string; + /** + * Allows to set transparency for the background of the generated image(s). This + * parameter is only supported for `gpt-image-1`. Must be one of `transparent`, + * `opaque` or `auto` (default value). When `auto` is used, the model will + * automatically determine the best background for the image. + * + * If `transparent`, the output format needs to support transparency, so it should + * be set to either `png` (default value) or `webp`. + */ + background?: 'transparent' | 'opaque' | 'auto' | null; + /** + * Control how much effort the model will exert to match the style and features, + * especially facial features, of input images. This parameter is only supported + * for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`. + */ + input_fidelity?: 'high' | 'low' | null; + /** + * An additional image whose fully transparent areas (e.g. where alpha is zero) + * indicate where `image` should be edited. If there are multiple images provided, + * the mask will be applied on the first image. Must be a valid PNG file, less than + * 4MB, and have the same dimensions as `image`. + */ + mask?: Uploadable; + /** + * The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are + * supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` + * is used. + */ + model?: (string & {}) | ImageModel | null; + /** + * The number of images to generate. Must be between 1 and 10. + */ + n?: number | null; + /** + * The compression level (0-100%) for the generated images. This parameter is only + * supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and + * defaults to 100. + */ + output_compression?: number | null; + /** + * The format in which the generated images are returned. This parameter is only + * supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The + * default value is `png`. + */ + output_format?: 'png' | 'jpeg' | 'webp' | null; + /** + * The number of partial images to generate. This parameter is used for streaming + * responses that return partial images. Value must be between 0 and 3. When set to + * 0, the response will be a single image sent in one streaming event. + * + * Note that the final image may be sent before the full number of partial images + * are generated if the full image is generated more quickly. + */ + partial_images?: number | null; + /** + * The quality of the image that will be generated. `high`, `medium` and `low` are + * only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. + * Defaults to `auto`. + */ + quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto' | null; + /** + * The format in which the generated images are returned. Must be one of `url` or + * `b64_json`. URLs are only valid for 60 minutes after the image has been + * generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` + * will always return base64-encoded images. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `1024x1024`, `1536x1024` + * (landscape), `1024x1536` (portrait), or `auto` (default value) for + * `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. + */ + size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null; + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream?: boolean | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace ImageEditParams { + type ImageEditParamsNonStreaming = ImagesAPI.ImageEditParamsNonStreaming; + type ImageEditParamsStreaming = ImagesAPI.ImageEditParamsStreaming; +} +export interface ImageEditParamsNonStreaming extends ImageEditParamsBase { + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream?: false | null; +} +export interface ImageEditParamsStreaming extends ImageEditParamsBase { + /** + * Edit the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. + */ + stream: true; +} +export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerateParamsStreaming; +export interface ImageGenerateParamsBase { + /** + * A text description of the desired image(s). The maximum length is 32000 + * characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters + * for `dall-e-3`. + */ + prompt: string; + /** + * Allows to set transparency for the background of the generated image(s). This + * parameter is only supported for `gpt-image-1`. Must be one of `transparent`, + * `opaque` or `auto` (default value). When `auto` is used, the model will + * automatically determine the best background for the image. + * + * If `transparent`, the output format needs to support transparency, so it should + * be set to either `png` (default value) or `webp`. + */ + background?: 'transparent' | 'opaque' | 'auto' | null; + /** + * The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or + * `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to + * `gpt-image-1` is used. + */ + model?: (string & {}) | ImageModel | null; + /** + * Control the content-moderation level for images generated by `gpt-image-1`. Must + * be either `low` for less restrictive filtering or `auto` (default value). + */ + moderation?: 'low' | 'auto' | null; + /** + * The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only + * `n=1` is supported. + */ + n?: number | null; + /** + * The compression level (0-100%) for the generated images. This parameter is only + * supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and + * defaults to 100. + */ + output_compression?: number | null; + /** + * The format in which the generated images are returned. This parameter is only + * supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. + */ + output_format?: 'png' | 'jpeg' | 'webp' | null; + /** + * The number of partial images to generate. This parameter is used for streaming + * responses that return partial images. Value must be between 0 and 3. When set to + * 0, the response will be a single image sent in one streaming event. + * + * Note that the final image may be sent before the full number of partial images + * are generated if the full image is generated more quickly. + */ + partial_images?: number | null; + /** + * The quality of the image that will be generated. + * + * - `auto` (default value) will automatically select the best quality for the + * given model. + * - `high`, `medium` and `low` are supported for `gpt-image-1`. + * - `hd` and `standard` are supported for `dall-e-3`. + * - `standard` is the only option for `dall-e-2`. + */ + quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | null; + /** + * The format in which generated images with `dall-e-2` and `dall-e-3` are + * returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes + * after the image has been generated. This parameter isn't supported for + * `gpt-image-1` which will always return base64-encoded images. + */ + response_format?: 'url' | 'b64_json' | null; + /** + * The size of the generated images. Must be one of `1024x1024`, `1536x1024` + * (landscape), `1024x1536` (portrait), or `auto` (default value) for + * `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and + * one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`. + */ + size?: 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792' | null; + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream?: boolean | null; + /** + * The style of the generated images. This parameter is only supported for + * `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean + * towards generating hyper-real and dramatic images. Natural causes the model to + * produce more natural, less hyper-real looking images. + */ + style?: 'vivid' | 'natural' | null; + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + */ + user?: string; +} +export declare namespace ImageGenerateParams { + type ImageGenerateParamsNonStreaming = ImagesAPI.ImageGenerateParamsNonStreaming; + type ImageGenerateParamsStreaming = ImagesAPI.ImageGenerateParamsStreaming; +} +export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase { + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream?: false | null; +} +export interface ImageGenerateParamsStreaming extends ImageGenerateParamsBase { + /** + * Generate the image in streaming mode. Defaults to `false`. See the + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + * for more information. This parameter is only supported for `gpt-image-1`. + */ + stream: true; +} +export declare namespace Images { + export { type Image as Image, type ImageEditCompletedEvent as ImageEditCompletedEvent, type ImageEditPartialImageEvent as ImageEditPartialImageEvent, type ImageEditStreamEvent as ImageEditStreamEvent, type ImageGenCompletedEvent as ImageGenCompletedEvent, type ImageGenPartialImageEvent as ImageGenPartialImageEvent, type ImageGenStreamEvent as ImageGenStreamEvent, type ImageModel as ImageModel, type ImagesResponse as ImagesResponse, type ImageCreateVariationParams as ImageCreateVariationParams, type ImageEditParams as ImageEditParams, type ImageEditParamsNonStreaming as ImageEditParamsNonStreaming, type ImageEditParamsStreaming as ImageEditParamsStreaming, type ImageGenerateParams as ImageGenerateParams, type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, }; +} +//# sourceMappingURL=images.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..aea95ebce07b9d8483d9f6182d30f2e1f432b8ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../src/resources/images.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,KAAK,UAAU,EAAE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KAAK,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E;;;;OAIG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js new file mode 100644 index 0000000000000000000000000000000000000000..fd6e8c5f102173874c44d6e1168849aafb006090 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js @@ -0,0 +1,29 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Images = void 0; +const resource_1 = require("../core/resource.js"); +const uploads_1 = require("../internal/uploads.js"); +class Images extends resource_1.APIResource { + /** + * Creates a variation of a given image. This endpoint only supports `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.createVariation({ + * image: fs.createReadStream('otter.png'), + * }); + * ``` + */ + createVariation(body, options) { + return this._client.post('/images/variations', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client)); + } + edit(body, options) { + return this._client.post('/images/edits', (0, uploads_1.multipartFormRequestOptions)({ body, ...options, stream: body.stream ?? false }, this._client)); + } + generate(body, options) { + return this._client.post('/images/generations', { body, ...options, stream: body.stream ?? false }); + } +} +exports.Images = Images; +//# sourceMappingURL=images.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js.map new file mode 100644 index 0000000000000000000000000000000000000000..293e245aeb03bb3e08a0becbebfa69ab656418d2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.js.map @@ -0,0 +1 @@ +{"version":3,"file":"images.js","sourceRoot":"","sources":["../src/resources/images.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAM/C,oDAAkE;AAElE,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;OASG;IACH,eAAe,CAAC,IAAgC,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,oBAAoB,EACpB,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAoBD,IAAI,CACF,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrB,CAAC;IAC7E,CAAC;IAsBD,QAAQ,CACN,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAEvD,CAAC;IAC9C,CAAC;CACF;AA1ED,wBA0EC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5ff0ad93496ff3e8f479b8cb057733d5768864ae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { multipartFormRequestOptions } from "../internal/uploads.mjs"; +export class Images extends APIResource { + /** + * Creates a variation of a given image. This endpoint only supports `dall-e-2`. + * + * @example + * ```ts + * const imagesResponse = await client.images.createVariation({ + * image: fs.createReadStream('otter.png'), + * }); + * ``` + */ + createVariation(body, options) { + return this._client.post('/images/variations', multipartFormRequestOptions({ body, ...options }, this._client)); + } + edit(body, options) { + return this._client.post('/images/edits', multipartFormRequestOptions({ body, ...options, stream: body.stream ?? false }, this._client)); + } + generate(body, options) { + return this._client.post('/images/generations', { body, ...options, stream: body.stream ?? false }); + } +} +//# sourceMappingURL=images.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..64b9817f45e9ad45c17f28e3fd3966097b61445c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/images.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"images.mjs","sourceRoot":"","sources":["../src/resources/images.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,eAAe,CAAC,IAAgC,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,oBAAoB,EACpB,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAoBD,IAAI,CACF,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrB,CAAC;IAC7E,CAAC;IAsBD,QAAQ,CACN,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAEvD,CAAC;IAC9C,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f423cedb9d7a2bd7d0a5d84ecd6ce19f77975b1e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts @@ -0,0 +1,21 @@ +export * from "./chat/index.mjs"; +export * from "./shared.mjs"; +export { Audio, type AudioModel, type AudioResponseFormat } from "./audio/audio.mjs"; +export { Batches, type Batch, type BatchError, type BatchRequestCounts, type BatchCreateParams, type BatchListParams, type BatchesPage, } from "./batches.mjs"; +export { Beta } from "./beta/beta.mjs"; +export { Completions, type Completion, type CompletionChoice, type CompletionUsage, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.mjs"; +export { Containers, type ContainerCreateResponse, type ContainerRetrieveResponse, type ContainerListResponse, type ContainerCreateParams, type ContainerListParams, type ContainerListResponsesPage, } from "./containers/containers.mjs"; +export { Conversations } from "./conversations/conversations.mjs"; +export { Embeddings, type CreateEmbeddingResponse, type Embedding, type EmbeddingModel, type EmbeddingCreateParams, } from "./embeddings.mjs"; +export { Evals, type EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, type EvalListResponsesPage, } from "./evals/evals.mjs"; +export { Files, type FileContent, type FileDeleted, type FileObject, type FilePurpose, type FileCreateParams, type FileListParams, type FileObjectsPage, } from "./files.mjs"; +export { FineTuning } from "./fine-tuning/fine-tuning.mjs"; +export { Graders } from "./graders/graders.mjs"; +export { Images, type Image, type ImageEditCompletedEvent, type ImageEditPartialImageEvent, type ImageEditStreamEvent, type ImageGenCompletedEvent, type ImageGenPartialImageEvent, type ImageGenStreamEvent, type ImageModel, type ImagesResponse, type ImageCreateVariationParams, type ImageEditParams, type ImageEditParamsNonStreaming, type ImageEditParamsStreaming, type ImageGenerateParams, type ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming, } from "./images.mjs"; +export { Models, type Model, type ModelDeleted, type ModelsPage } from "./models.mjs"; +export { Moderations, type Moderation, type ModerationImageURLInput, type ModerationModel, type ModerationMultiModalInput, type ModerationTextInput, type ModerationCreateResponse, type ModerationCreateParams, } from "./moderations.mjs"; +export { Responses } from "./responses/responses.mjs"; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads/uploads.mjs"; +export { VectorStores, type AutoFileChunkingStrategyParam, type FileChunkingStrategy, type FileChunkingStrategyParam, type OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyObjectParam, type VectorStore, type VectorStoreDeleted, type VectorStoreSearchResponse, type VectorStoreCreateParams, type VectorStoreUpdateParams, type VectorStoreListParams, type VectorStoreSearchParams, type VectorStoresPage, type VectorStoreSearchResponsesPage, } from "./vector-stores/vector-stores.mjs"; +export { Webhooks } from "./webhooks.mjs"; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6ec79fcadc1aa6cd048c0eed35b02391de420297 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";;OAIO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE;OACpD,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB;OACM,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC;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KAAK,oBAAoB,EAAE;OAC5E,EACL,YAAY,EACZ,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,8BAA8B,GACpC;OACM,EAAE,QAAQ,EAAE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..36b11e732c76d065ad4011bc299a861b69a2e5fe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts @@ -0,0 +1,21 @@ +export * from "./chat/index.js"; +export * from "./shared.js"; +export { Audio, type AudioModel, type AudioResponseFormat } from "./audio/audio.js"; +export { Batches, type Batch, type BatchError, type BatchRequestCounts, type BatchCreateParams, type BatchListParams, type BatchesPage, } from "./batches.js"; +export { Beta } from "./beta/beta.js"; +export { Completions, type Completion, type CompletionChoice, type CompletionUsage, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.js"; +export { Containers, type ContainerCreateResponse, type ContainerRetrieveResponse, type ContainerListResponse, type ContainerCreateParams, type ContainerListParams, type ContainerListResponsesPage, } from "./containers/containers.js"; +export { Conversations } from "./conversations/conversations.js"; +export { Embeddings, type CreateEmbeddingResponse, type Embedding, type EmbeddingModel, type EmbeddingCreateParams, } from "./embeddings.js"; +export { Evals, type EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, type EvalListResponsesPage, } from "./evals/evals.js"; +export { Files, type FileContent, type FileDeleted, type FileObject, type FilePurpose, type FileCreateParams, type FileListParams, type FileObjectsPage, } from "./files.js"; +export { FineTuning } from "./fine-tuning/fine-tuning.js"; +export { Graders } from "./graders/graders.js"; +export { Images, type Image, type ImageEditCompletedEvent, type ImageEditPartialImageEvent, type ImageEditStreamEvent, type ImageGenCompletedEvent, type ImageGenPartialImageEvent, type ImageGenStreamEvent, type ImageModel, type ImagesResponse, type ImageCreateVariationParams, type ImageEditParams, type ImageEditParamsNonStreaming, type ImageEditParamsStreaming, type ImageGenerateParams, type ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming, } from "./images.js"; +export { Models, type Model, type ModelDeleted, type ModelsPage } from "./models.js"; +export { Moderations, type Moderation, type ModerationImageURLInput, type ModerationModel, type ModerationMultiModalInput, type ModerationTextInput, type ModerationCreateResponse, type ModerationCreateParams, } from "./moderations.js"; +export { Responses } from "./responses/responses.js"; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads/uploads.js"; +export { VectorStores, type AutoFileChunkingStrategyParam, type FileChunkingStrategy, type FileChunkingStrategyParam, type OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyObjectParam, type VectorStore, type VectorStoreDeleted, type VectorStoreSearchResponse, type VectorStoreCreateParams, type VectorStoreUpdateParams, type VectorStoreListParams, type VectorStoreSearchParams, type VectorStoresPage, type VectorStoreSearchResponsesPage, } from "./vector-stores/vector-stores.js"; +export { Webhooks } from "./webhooks.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..23977d89f5feff4fd7edc343928d0cce2954e3ed --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";;OAIO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE;OACpD,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB;OACM,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC;OACM,EAAE,aAAa,EAAE;OACjB,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B;OACM,EACL,KAAK,EACL,KAAK,0BAA0B,EAC/B,KAAK,qCAAqC,EAC1C,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B;OACM,EACL,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,OAAO,EAAE;OACX,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE;OAC1D,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B;OACM,EAAE,SAAS,EAAE;OACb,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE;OAC5E,EACL,YAAY,EACZ,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,8BAA8B,GACpC;OACM,EAAE,QAAQ,EAAE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js new file mode 100644 index 0000000000000000000000000000000000000000..50e0d0514802ecbb513eb2cacd105cccd630a646 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js @@ -0,0 +1,44 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Webhooks = exports.VectorStores = exports.Uploads = exports.Responses = exports.Moderations = exports.Models = exports.Images = exports.Graders = exports.FineTuning = exports.Files = exports.Evals = exports.Embeddings = exports.Conversations = exports.Containers = exports.Completions = exports.Beta = exports.Batches = exports.Audio = void 0; +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./chat/index.js"), exports); +tslib_1.__exportStar(require("./shared.js"), exports); +var audio_1 = require("./audio/audio.js"); +Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return audio_1.Audio; } }); +var batches_1 = require("./batches.js"); +Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } }); +var beta_1 = require("./beta/beta.js"); +Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } }); +var completions_1 = require("./completions.js"); +Object.defineProperty(exports, "Completions", { enumerable: true, get: function () { return completions_1.Completions; } }); +var containers_1 = require("./containers/containers.js"); +Object.defineProperty(exports, "Containers", { enumerable: true, get: function () { return containers_1.Containers; } }); +var conversations_1 = require("./conversations/conversations.js"); +Object.defineProperty(exports, "Conversations", { enumerable: true, get: function () { return conversations_1.Conversations; } }); +var embeddings_1 = require("./embeddings.js"); +Object.defineProperty(exports, "Embeddings", { enumerable: true, get: function () { return embeddings_1.Embeddings; } }); +var evals_1 = require("./evals/evals.js"); +Object.defineProperty(exports, "Evals", { enumerable: true, get: function () { return evals_1.Evals; } }); +var files_1 = require("./files.js"); +Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } }); +var fine_tuning_1 = require("./fine-tuning/fine-tuning.js"); +Object.defineProperty(exports, "FineTuning", { enumerable: true, get: function () { return fine_tuning_1.FineTuning; } }); +var graders_1 = require("./graders/graders.js"); +Object.defineProperty(exports, "Graders", { enumerable: true, get: function () { return graders_1.Graders; } }); +var images_1 = require("./images.js"); +Object.defineProperty(exports, "Images", { enumerable: true, get: function () { return images_1.Images; } }); +var models_1 = require("./models.js"); +Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } }); +var moderations_1 = require("./moderations.js"); +Object.defineProperty(exports, "Moderations", { enumerable: true, get: function () { return moderations_1.Moderations; } }); +var responses_1 = require("./responses/responses.js"); +Object.defineProperty(exports, "Responses", { enumerable: true, get: function () { return responses_1.Responses; } }); +var uploads_1 = require("./uploads/uploads.js"); +Object.defineProperty(exports, "Uploads", { enumerable: true, get: function () { return uploads_1.Uploads; } }); +var vector_stores_1 = require("./vector-stores/vector-stores.js"); +Object.defineProperty(exports, "VectorStores", { enumerable: true, get: function () { return vector_stores_1.VectorStores; } }); +var webhooks_1 = require("./webhooks.js"); +Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..16abfd6270a835e81d62eedf8b465d1e3f995380 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,0DAA6B;AAC7B,sDAAyB;AACzB,0CAAiF;AAAxE,8FAAA,KAAK,OAAA;AACd,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,gDAQuB;AAPrB,0GAAA,WAAW,OAAA;AAQb,yDAQiC;AAP/B,wGAAA,UAAU,OAAA;AAQZ,kEAA8D;AAArD,8GAAA,aAAa,OAAA;AACtB,8CAMsB;AALpB,wGAAA,UAAU,OAAA;AAMZ,0CAauB;AAZrB,8FAAA,KAAK,OAAA;AAaP,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,4DAAuD;AAA9C,yGAAA,UAAU,OAAA;AACnB,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,sCAkBkB;AAjBhB,gGAAA,MAAM,OAAA;AAkBR,sCAAkF;AAAzE,gGAAA,MAAM,OAAA;AACf,gDASuB;AARrB,0GAAA,WAAW,OAAA;AASb,sDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,gDAA6G;AAApG,kGAAA,OAAO,OAAA;AAChB,kEAkBuC;AAjBrC,6GAAA,YAAY,OAAA;AAkBd,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..008befbe3e51e4d92f393ec7f2f4eb7f912f764f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./chat/index.mjs"; +export * from "./shared.mjs"; +export { Audio } from "./audio/audio.mjs"; +export { Batches, } from "./batches.mjs"; +export { Beta } from "./beta/beta.mjs"; +export { Completions, } from "./completions.mjs"; +export { Containers, } from "./containers/containers.mjs"; +export { Conversations } from "./conversations/conversations.mjs"; +export { Embeddings, } from "./embeddings.mjs"; +export { Evals, } from "./evals/evals.mjs"; +export { Files, } from "./files.mjs"; +export { FineTuning } from "./fine-tuning/fine-tuning.mjs"; +export { Graders } from "./graders/graders.mjs"; +export { Images, } from "./images.mjs"; +export { Models } from "./models.mjs"; +export { Moderations, } from "./moderations.mjs"; +export { Responses } from "./responses/responses.mjs"; +export { Uploads } from "./uploads/uploads.mjs"; +export { VectorStores, } from "./vector-stores/vector-stores.mjs"; +export { Webhooks } from "./webhooks.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..bed72034cbf8891f131e4596660088d26a8b68c9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAI/E,EAAE,KAAK,EAA6C;OACpD,EACL,OAAO,GAOR;OACM,EAAE,IAAI,EAAE;OACR,EACL,WAAW,GAOZ;OACM,EACL,UAAU,GAOX;OACM,EAAE,aAAa,EAAE;OACjB,EACL,UAAU,GAKX;OACM,EACL,KAAK,GAYN;OACM,EACL,KAAK,GAQN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,OAAO,EAAE;OACX,EACL,MAAM,GAiBP;OACM,EAAE,MAAM,EAAkD;OAC1D,EACL,WAAW,GAQZ;OACM,EAAE,SAAS,EAAE;OACb,EAAE,OAAO,EAAmE;OAC5E,EACL,YAAY,GAiBb;OACM,EAAE,QAAQ,EAAE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..baf5ad39f6de4ebd5351ac8b3b8afc57995360d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts @@ -0,0 +1,52 @@ +import { APIResource } from "../core/resource.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { Page, PagePromise } from "../core/pagination.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Models extends APIResource { + /** + * Retrieves a model instance, providing basic information about the model such as + * the owner and permissioning. + */ + retrieve(model: string, options?: RequestOptions): APIPromise; + /** + * Lists the currently available models, and provides basic information about each + * one such as the owner and availability. + */ + list(options?: RequestOptions): PagePromise; + /** + * Delete a fine-tuned model. You must have the Owner role in your organization to + * delete a model. + */ + delete(model: string, options?: RequestOptions): APIPromise; +} +export type ModelsPage = Page; +/** + * Describes an OpenAI model offering that can be used with the API. + */ +export interface Model { + /** + * The model identifier, which can be referenced in the API endpoints. + */ + id: string; + /** + * The Unix timestamp (in seconds) when the model was created. + */ + created: number; + /** + * The object type, which is always "model". + */ + object: 'model'; + /** + * The organization that owns the model. + */ + owned_by: string; +} +export interface ModelDeleted { + id: string; + deleted: boolean; + object: string; +} +export declare namespace Models { + export { type Model as Model, type ModelDeleted as ModelDeleted, type ModelsPage as ModelsPage }; +} +//# sourceMappingURL=models.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..4383813f4f17aaf0c10aef58ffcc9d1a448e854e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"models.d.mts","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIpE;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC;IAI9D;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAG1E;AAGD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,CAAC;CAClG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..419b99f3226560e17e7698070c2d24f0651ce656 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts @@ -0,0 +1,52 @@ +import { APIResource } from "../core/resource.js"; +import { APIPromise } from "../core/api-promise.js"; +import { Page, PagePromise } from "../core/pagination.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Models extends APIResource { + /** + * Retrieves a model instance, providing basic information about the model such as + * the owner and permissioning. + */ + retrieve(model: string, options?: RequestOptions): APIPromise; + /** + * Lists the currently available models, and provides basic information about each + * one such as the owner and availability. + */ + list(options?: RequestOptions): PagePromise; + /** + * Delete a fine-tuned model. You must have the Owner role in your organization to + * delete a model. + */ + delete(model: string, options?: RequestOptions): APIPromise; +} +export type ModelsPage = Page; +/** + * Describes an OpenAI model offering that can be used with the API. + */ +export interface Model { + /** + * The model identifier, which can be referenced in the API endpoints. + */ + id: string; + /** + * The Unix timestamp (in seconds) when the model was created. + */ + created: number; + /** + * The object type, which is always "model". + */ + object: 'model'; + /** + * The organization that owns the model. + */ + owned_by: string; +} +export interface ModelDeleted { + id: string; + deleted: boolean; + object: string; +} +export declare namespace Models { + export { type Model as Model, type ModelDeleted as ModelDeleted, type ModelsPage as ModelsPage }; +} +//# sourceMappingURL=models.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0fd99de28e719df2004c7311c12710f6c90b7d8b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIpE;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC;IAI9D;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAG1E;AAGD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,CAAC;CAClG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js new file mode 100644 index 0000000000000000000000000000000000000000..b195d63e1d70ea141e3ab8f78dc2949593da7e68 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js @@ -0,0 +1,32 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Models = void 0; +const resource_1 = require("../core/resource.js"); +const pagination_1 = require("../core/pagination.js"); +const path_1 = require("../internal/utils/path.js"); +class Models extends resource_1.APIResource { + /** + * Retrieves a model instance, providing basic information about the model such as + * the owner and permissioning. + */ + retrieve(model, options) { + return this._client.get((0, path_1.path) `/models/${model}`, options); + } + /** + * Lists the currently available models, and provides basic information about each + * one such as the owner and availability. + */ + list(options) { + return this._client.getAPIList('/models', (pagination_1.Page), options); + } + /** + * Delete a fine-tuned model. You must have the Owner role in your organization to + * delete a model. + */ + delete(model, options) { + return this._client.delete((0, path_1.path) `/models/${model}`, options); + } +} +exports.Models = Models; +//# sourceMappingURL=models.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8c6a271aef9e919fec41f9a28b196ef520c5bbe2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.js.map @@ -0,0 +1 @@ +{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAuD;AAEvD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,iBAAW,CAAA,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAxBD,wBAwBC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5b7d402c76bab2b9ce36e4e56dce4611298f3542 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { Page } from "../core/pagination.mjs"; +import { path } from "../internal/utils/path.mjs"; +export class Models extends APIResource { + /** + * Retrieves a model instance, providing basic information about the model such as + * the owner and permissioning. + */ + retrieve(model, options) { + return this._client.get(path `/models/${model}`, options); + } + /** + * Lists the currently available models, and provides basic information about each + * one such as the owner and availability. + */ + list(options) { + return this._client.getAPIList('/models', (Page), options); + } + /** + * Delete a fine-tuned model. You must have the Owner role in your organization to + * delete a model. + */ + delete(model, options) { + return this._client.delete(path `/models/${model}`, options); + } +} +//# sourceMappingURL=models.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8b72a531ba1d00a4222e06c9cd80ff3431ed6ee9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/models.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,IAAI,EAAe;OAErB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,IAAW,CAAA,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4bedacfe7652e89dd05519a3f0cf7d018db2d198 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts @@ -0,0 +1,295 @@ +import { APIResource } from "../core/resource.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Moderations extends APIResource { + /** + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * the [moderation guide](https://platform.openai.com/docs/guides/moderation). + */ + create(body: ModerationCreateParams, options?: RequestOptions): APIPromise; +} +export interface Moderation { + /** + * A list of the categories, and whether they are flagged or not. + */ + categories: Moderation.Categories; + /** + * A list of the categories along with the input type(s) that the score applies to. + */ + category_applied_input_types: Moderation.CategoryAppliedInputTypes; + /** + * A list of the categories along with their scores as predicted by model. + */ + category_scores: Moderation.CategoryScores; + /** + * Whether any of the below categories are flagged. + */ + flagged: boolean; +} +export declare namespace Moderation { + /** + * A list of the categories, and whether they are flagged or not. + */ + interface Categories { + /** + * Content that expresses, incites, or promotes harassing language towards any + * target. + */ + harassment: boolean; + /** + * Harassment content that also includes violence or serious harm towards any + * target. + */ + 'harassment/threatening': boolean; + /** + * Content that expresses, incites, or promotes hate based on race, gender, + * ethnicity, religion, nationality, sexual orientation, disability status, or + * caste. Hateful content aimed at non-protected groups (e.g., chess players) is + * harassment. + */ + hate: boolean; + /** + * Hateful content that also includes violence or serious harm towards the targeted + * group based on race, gender, ethnicity, religion, nationality, sexual + * orientation, disability status, or caste. + */ + 'hate/threatening': boolean; + /** + * Content that includes instructions or advice that facilitate the planning or + * execution of wrongdoing, or that gives advice or instruction on how to commit + * illicit acts. For example, "how to shoplift" would fit this category. + */ + illicit: boolean | null; + /** + * Content that includes instructions or advice that facilitate the planning or + * execution of wrongdoing that also includes violence, or that gives advice or + * instruction on the procurement of any weapon. + */ + 'illicit/violent': boolean | null; + /** + * Content that promotes, encourages, or depicts acts of self-harm, such as + * suicide, cutting, and eating disorders. + */ + 'self-harm': boolean; + /** + * Content that encourages performing acts of self-harm, such as suicide, cutting, + * and eating disorders, or that gives instructions or advice on how to commit such + * acts. + */ + 'self-harm/instructions': boolean; + /** + * Content where the speaker expresses that they are engaging or intend to engage + * in acts of self-harm, such as suicide, cutting, and eating disorders. + */ + 'self-harm/intent': boolean; + /** + * Content meant to arouse sexual excitement, such as the description of sexual + * activity, or that promotes sexual services (excluding sex education and + * wellness). + */ + sexual: boolean; + /** + * Sexual content that includes an individual who is under 18 years old. + */ + 'sexual/minors': boolean; + /** + * Content that depicts death, violence, or physical injury. + */ + violence: boolean; + /** + * Content that depicts death, violence, or physical injury in graphic detail. + */ + 'violence/graphic': boolean; + } + /** + * A list of the categories along with the input type(s) that the score applies to. + */ + interface CategoryAppliedInputTypes { + /** + * The applied input type(s) for the category 'harassment'. + */ + harassment: Array<'text'>; + /** + * The applied input type(s) for the category 'harassment/threatening'. + */ + 'harassment/threatening': Array<'text'>; + /** + * The applied input type(s) for the category 'hate'. + */ + hate: Array<'text'>; + /** + * The applied input type(s) for the category 'hate/threatening'. + */ + 'hate/threatening': Array<'text'>; + /** + * The applied input type(s) for the category 'illicit'. + */ + illicit: Array<'text'>; + /** + * The applied input type(s) for the category 'illicit/violent'. + */ + 'illicit/violent': Array<'text'>; + /** + * The applied input type(s) for the category 'self-harm'. + */ + 'self-harm': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'self-harm/instructions'. + */ + 'self-harm/instructions': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'self-harm/intent'. + */ + 'self-harm/intent': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'sexual'. + */ + sexual: Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'sexual/minors'. + */ + 'sexual/minors': Array<'text'>; + /** + * The applied input type(s) for the category 'violence'. + */ + violence: Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'violence/graphic'. + */ + 'violence/graphic': Array<'text' | 'image'>; + } + /** + * A list of the categories along with their scores as predicted by model. + */ + interface CategoryScores { + /** + * The score for the category 'harassment'. + */ + harassment: number; + /** + * The score for the category 'harassment/threatening'. + */ + 'harassment/threatening': number; + /** + * The score for the category 'hate'. + */ + hate: number; + /** + * The score for the category 'hate/threatening'. + */ + 'hate/threatening': number; + /** + * The score for the category 'illicit'. + */ + illicit: number; + /** + * The score for the category 'illicit/violent'. + */ + 'illicit/violent': number; + /** + * The score for the category 'self-harm'. + */ + 'self-harm': number; + /** + * The score for the category 'self-harm/instructions'. + */ + 'self-harm/instructions': number; + /** + * The score for the category 'self-harm/intent'. + */ + 'self-harm/intent': number; + /** + * The score for the category 'sexual'. + */ + sexual: number; + /** + * The score for the category 'sexual/minors'. + */ + 'sexual/minors': number; + /** + * The score for the category 'violence'. + */ + violence: number; + /** + * The score for the category 'violence/graphic'. + */ + 'violence/graphic': number; + } +} +/** + * An object describing an image to classify. + */ +export interface ModerationImageURLInput { + /** + * Contains either an image URL or a data URL for a base64 encoded image. + */ + image_url: ModerationImageURLInput.ImageURL; + /** + * Always `image_url`. + */ + type: 'image_url'; +} +export declare namespace ModerationImageURLInput { + /** + * Contains either an image URL or a data URL for a base64 encoded image. + */ + interface ImageURL { + /** + * Either a URL of the image or the base64 encoded image data. + */ + url: string; + } +} +export type ModerationModel = 'omni-moderation-latest' | 'omni-moderation-2024-09-26' | 'text-moderation-latest' | 'text-moderation-stable'; +/** + * An object describing an image to classify. + */ +export type ModerationMultiModalInput = ModerationImageURLInput | ModerationTextInput; +/** + * An object describing text to classify. + */ +export interface ModerationTextInput { + /** + * A string of text to classify. + */ + text: string; + /** + * Always `text`. + */ + type: 'text'; +} +/** + * Represents if a given text input is potentially harmful. + */ +export interface ModerationCreateResponse { + /** + * The unique identifier for the moderation request. + */ + id: string; + /** + * The model used to generate the moderation results. + */ + model: string; + /** + * A list of moderation objects. + */ + results: Array; +} +export interface ModerationCreateParams { + /** + * Input (or inputs) to classify. Can be a single string, an array of strings, or + * an array of multi-modal input objects similar to other models. + */ + input: string | Array | Array; + /** + * The content moderation model you would like to use. Learn more in + * [the moderation guide](https://platform.openai.com/docs/guides/moderation), and + * learn about available models + * [here](https://platform.openai.com/docs/models#moderation). + */ + model?: (string & {}) | ModerationModel; +} +export declare namespace Moderations { + export { type Moderation as Moderation, type ModerationImageURLInput as ModerationImageURLInput, type ModerationModel as ModerationModel, type ModerationMultiModalInput as ModerationMultiModalInput, type ModerationTextInput as ModerationTextInput, type ModerationCreateResponse as ModerationCreateResponse, type ModerationCreateParams as ModerationCreateParams, }; +} +//# sourceMappingURL=moderations.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..e9091f52874972695a38c79dcbc4c80096248919 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"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zC;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..43831346603007bcfc5f8476013a0d26f68e7864 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts @@ -0,0 +1,295 @@ +import { APIResource } from "../core/resource.js"; +import { APIPromise } from "../core/api-promise.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Moderations extends APIResource { + /** + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * the [moderation guide](https://platform.openai.com/docs/guides/moderation). + */ + create(body: ModerationCreateParams, options?: RequestOptions): APIPromise; +} +export interface Moderation { + /** + * A list of the categories, and whether they are flagged or not. + */ + categories: Moderation.Categories; + /** + * A list of the categories along with the input type(s) that the score applies to. + */ + category_applied_input_types: Moderation.CategoryAppliedInputTypes; + /** + * A list of the categories along with their scores as predicted by model. + */ + category_scores: Moderation.CategoryScores; + /** + * Whether any of the below categories are flagged. + */ + flagged: boolean; +} +export declare namespace Moderation { + /** + * A list of the categories, and whether they are flagged or not. + */ + interface Categories { + /** + * Content that expresses, incites, or promotes harassing language towards any + * target. + */ + harassment: boolean; + /** + * Harassment content that also includes violence or serious harm towards any + * target. + */ + 'harassment/threatening': boolean; + /** + * Content that expresses, incites, or promotes hate based on race, gender, + * ethnicity, religion, nationality, sexual orientation, disability status, or + * caste. Hateful content aimed at non-protected groups (e.g., chess players) is + * harassment. + */ + hate: boolean; + /** + * Hateful content that also includes violence or serious harm towards the targeted + * group based on race, gender, ethnicity, religion, nationality, sexual + * orientation, disability status, or caste. + */ + 'hate/threatening': boolean; + /** + * Content that includes instructions or advice that facilitate the planning or + * execution of wrongdoing, or that gives advice or instruction on how to commit + * illicit acts. For example, "how to shoplift" would fit this category. + */ + illicit: boolean | null; + /** + * Content that includes instructions or advice that facilitate the planning or + * execution of wrongdoing that also includes violence, or that gives advice or + * instruction on the procurement of any weapon. + */ + 'illicit/violent': boolean | null; + /** + * Content that promotes, encourages, or depicts acts of self-harm, such as + * suicide, cutting, and eating disorders. + */ + 'self-harm': boolean; + /** + * Content that encourages performing acts of self-harm, such as suicide, cutting, + * and eating disorders, or that gives instructions or advice on how to commit such + * acts. + */ + 'self-harm/instructions': boolean; + /** + * Content where the speaker expresses that they are engaging or intend to engage + * in acts of self-harm, such as suicide, cutting, and eating disorders. + */ + 'self-harm/intent': boolean; + /** + * Content meant to arouse sexual excitement, such as the description of sexual + * activity, or that promotes sexual services (excluding sex education and + * wellness). + */ + sexual: boolean; + /** + * Sexual content that includes an individual who is under 18 years old. + */ + 'sexual/minors': boolean; + /** + * Content that depicts death, violence, or physical injury. + */ + violence: boolean; + /** + * Content that depicts death, violence, or physical injury in graphic detail. + */ + 'violence/graphic': boolean; + } + /** + * A list of the categories along with the input type(s) that the score applies to. + */ + interface CategoryAppliedInputTypes { + /** + * The applied input type(s) for the category 'harassment'. + */ + harassment: Array<'text'>; + /** + * The applied input type(s) for the category 'harassment/threatening'. + */ + 'harassment/threatening': Array<'text'>; + /** + * The applied input type(s) for the category 'hate'. + */ + hate: Array<'text'>; + /** + * The applied input type(s) for the category 'hate/threatening'. + */ + 'hate/threatening': Array<'text'>; + /** + * The applied input type(s) for the category 'illicit'. + */ + illicit: Array<'text'>; + /** + * The applied input type(s) for the category 'illicit/violent'. + */ + 'illicit/violent': Array<'text'>; + /** + * The applied input type(s) for the category 'self-harm'. + */ + 'self-harm': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'self-harm/instructions'. + */ + 'self-harm/instructions': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'self-harm/intent'. + */ + 'self-harm/intent': Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'sexual'. + */ + sexual: Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'sexual/minors'. + */ + 'sexual/minors': Array<'text'>; + /** + * The applied input type(s) for the category 'violence'. + */ + violence: Array<'text' | 'image'>; + /** + * The applied input type(s) for the category 'violence/graphic'. + */ + 'violence/graphic': Array<'text' | 'image'>; + } + /** + * A list of the categories along with their scores as predicted by model. + */ + interface CategoryScores { + /** + * The score for the category 'harassment'. + */ + harassment: number; + /** + * The score for the category 'harassment/threatening'. + */ + 'harassment/threatening': number; + /** + * The score for the category 'hate'. + */ + hate: number; + /** + * The score for the category 'hate/threatening'. + */ + 'hate/threatening': number; + /** + * The score for the category 'illicit'. + */ + illicit: number; + /** + * The score for the category 'illicit/violent'. + */ + 'illicit/violent': number; + /** + * The score for the category 'self-harm'. + */ + 'self-harm': number; + /** + * The score for the category 'self-harm/instructions'. + */ + 'self-harm/instructions': number; + /** + * The score for the category 'self-harm/intent'. + */ + 'self-harm/intent': number; + /** + * The score for the category 'sexual'. + */ + sexual: number; + /** + * The score for the category 'sexual/minors'. + */ + 'sexual/minors': number; + /** + * The score for the category 'violence'. + */ + violence: number; + /** + * The score for the category 'violence/graphic'. + */ + 'violence/graphic': number; + } +} +/** + * An object describing an image to classify. + */ +export interface ModerationImageURLInput { + /** + * Contains either an image URL or a data URL for a base64 encoded image. + */ + image_url: ModerationImageURLInput.ImageURL; + /** + * Always `image_url`. + */ + type: 'image_url'; +} +export declare namespace ModerationImageURLInput { + /** + * Contains either an image URL or a data URL for a base64 encoded image. + */ + interface ImageURL { + /** + * Either a URL of the image or the base64 encoded image data. + */ + url: string; + } +} +export type ModerationModel = 'omni-moderation-latest' | 'omni-moderation-2024-09-26' | 'text-moderation-latest' | 'text-moderation-stable'; +/** + * An object describing an image to classify. + */ +export type ModerationMultiModalInput = ModerationImageURLInput | ModerationTextInput; +/** + * An object describing text to classify. + */ +export interface ModerationTextInput { + /** + * A string of text to classify. + */ + text: string; + /** + * Always `text`. + */ + type: 'text'; +} +/** + * Represents if a given text input is potentially harmful. + */ +export interface ModerationCreateResponse { + /** + * The unique identifier for the moderation request. + */ + id: string; + /** + * The model used to generate the moderation results. + */ + model: string; + /** + * A list of moderation objects. + */ + results: Array; +} +export interface ModerationCreateParams { + /** + * Input (or inputs) to classify. Can be a single string, an array of strings, or + * an array of multi-modal input objects similar to other models. + */ + input: string | Array | Array; + /** + * The content moderation model you would like to use. Learn more in + * [the moderation guide](https://platform.openai.com/docs/guides/moderation), and + * learn about available models + * [here](https://platform.openai.com/docs/models#moderation). + */ + model?: (string & {}) | ModerationModel; +} +export declare namespace Moderations { + export { type Moderation as Moderation, type ModerationImageURLInput as ModerationImageURLInput, type ModerationModel as ModerationModel, type ModerationMultiModalInput as ModerationMultiModalInput, type ModerationTextInput as ModerationTextInput, type ModerationCreateResponse as ModerationCreateResponse, type ModerationCreateParams as ModerationCreateParams, }; +} +//# sourceMappingURL=moderations.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..93f0aabc7f3b6c796c0287e3d152b36d5243bad1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;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,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js new file mode 100644 index 0000000000000000000000000000000000000000..a2f2f4246330f463bd6a2a4f7672b4b7d648088c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js @@ -0,0 +1,16 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Moderations = void 0; +const resource_1 = require("../core/resource.js"); +class Moderations extends resource_1.APIResource { + /** + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * the [moderation guide](https://platform.openai.com/docs/guides/moderation). + */ + create(body, options) { + return this._client.post('/moderations', { body, ...options }); + } +} +exports.Moderations = Moderations; +//# sourceMappingURL=moderations.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e47df8e228d3e934cecb876fbb14641c1e61c2f0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AARD,kCAQC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs new file mode 100644 index 0000000000000000000000000000000000000000..982ed552f8ea93c798aacb8ddecb1442a28d4454 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +export class Moderations extends APIResource { + /** + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * the [moderation guide](https://platform.openai.com/docs/guides/moderation). + */ + create(body, options) { + return this._client.post('/moderations', { body, ...options }); + } +} +//# sourceMappingURL=moderations.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6c6a9779d0cf6381ee17fc66fffaf969576b8864 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/moderations.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..911e4eb34398e0be11e04ddc45d3dc3a4a8a8a01 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts @@ -0,0 +1,2 @@ +export * from "./responses/index.mjs"; +//# sourceMappingURL=responses.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..06913501ec9d4dd915a84a396bf72b17f5b8ae74 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"responses.d.mts","sourceRoot":"","sources":["../src/resources/responses.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0d24781fa25ad2e5d28faa7c646277e826373a12 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts @@ -0,0 +1,2 @@ +export * from "./responses/index.js"; +//# sourceMappingURL=responses.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c8b4af2a1acac1abc1386da5be19df8c88047d9f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../src/resources/responses.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js new file mode 100644 index 0000000000000000000000000000000000000000..6eec4037e52fb3f8a37fd99a6686c6b0a24a1dcc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./responses/index.js"), exports); +//# sourceMappingURL=responses.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js.map new file mode 100644 index 0000000000000000000000000000000000000000..39ea90e5a6f764f291ab437ef4666ac84ad2397c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.js.map @@ -0,0 +1 @@ +{"version":3,"file":"responses.js","sourceRoot":"","sources":["../src/resources/responses.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+DAAkC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e105b5ea5399287dd536ed818e17f9398e45feec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./responses/index.mjs"; +//# sourceMappingURL=responses.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b63d7336c89f3b3e3113d8ba3415afcf2b58ba0c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/responses.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"responses.mjs","sourceRoot":"","sources":["../src/resources/responses.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..99a3063d1a5b7f8f749d84c26ad30f5517ada2e4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts @@ -0,0 +1,265 @@ +export type AllModels = (string & {}) | ChatModel | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11'; +export type ChatModel = 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613'; +/** + * A filter used to compare a specified attribute key to a given value using a + * defined comparison operation. + */ +export interface ComparisonFilter { + /** + * The key to compare against the value. + */ + key: string; + /** + * Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + * + * - `eq`: equals + * - `ne`: not equal + * - `gt`: greater than + * - `gte`: greater than or equal + * - `lt`: less than + * - `lte`: less than or equal + */ + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + /** + * The value to compare against the attribute key; supports string, number, or + * boolean types. + */ + value: string | number | boolean; +} +/** + * Combine multiple filters using `and` or `or`. + */ +export interface CompoundFilter { + /** + * Array of filters to combine. Items can be `ComparisonFilter` or + * `CompoundFilter`. + */ + filters: Array; + /** + * Type of operation: `and` or `or`. + */ + type: 'and' | 'or'; +} +/** + * The input format for the custom tool. Default is unconstrained text. + */ +export type CustomToolInputFormat = CustomToolInputFormat.Text | CustomToolInputFormat.Grammar; +export declare namespace CustomToolInputFormat { + /** + * Unconstrained free-form text. + */ + interface Text { + /** + * Unconstrained text format. Always `text`. + */ + type: 'text'; + } + /** + * A grammar defined by the user. + */ + interface Grammar { + /** + * The grammar definition. + */ + definition: string; + /** + * The syntax of the grammar definition. One of `lark` or `regex`. + */ + syntax: 'lark' | 'regex'; + /** + * Grammar format. Always `grammar`. + */ + type: 'grammar'; + } +} +export interface ErrorObject { + code: string | null; + message: string; + param: string | null; + type: string; +} +export interface FunctionDefinition { + /** + * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + * underscores and dashes, with a maximum length of 64. + */ + name: string; + /** + * A description of what the function does, used by the model to choose when and + * how to call the function. + */ + description?: string; + /** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](https://platform.openai.com/docs/guides/function-calling) for examples, + * and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ + parameters?: FunctionParameters; + /** + * Whether to enable strict schema adherence when generating the function call. If + * set to true, the model will follow the exact schema defined in the `parameters` + * field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn + * more about Structured Outputs in the + * [function calling guide](https://platform.openai.com/docs/guides/function-calling). + */ + strict?: boolean | null; +} +/** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](https://platform.openai.com/docs/guides/function-calling) for examples, + * and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ +export type FunctionParameters = { + [key: string]: unknown; +}; +/** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ +export type Metadata = { + [key: string]: string; +}; +/** + * **gpt-5 and o-series models only** + * + * Configuration options for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + */ +export interface Reasoning { + /** + * Constrains effort on reasoning for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + * effort can result in faster responses and fewer tokens used on reasoning in a + * response. + */ + effort?: ReasoningEffort | null; + /** + * @deprecated **Deprecated:** use `summary` instead. + * + * A summary of the reasoning performed by the model. This can be useful for + * debugging and understanding the model's reasoning process. One of `auto`, + * `concise`, or `detailed`. + */ + generate_summary?: 'auto' | 'concise' | 'detailed' | null; + /** + * A summary of the reasoning performed by the model. This can be useful for + * debugging and understanding the model's reasoning process. One of `auto`, + * `concise`, or `detailed`. + */ + summary?: 'auto' | 'concise' | 'detailed' | null; +} +/** + * Constrains effort on reasoning for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + * effort can result in faster responses and fewer tokens used on reasoning in a + * response. + */ +export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | null; +/** + * JSON object response format. An older method of generating JSON responses. Using + * `json_schema` is recommended for models that support it. Note that the model + * will not generate JSON without a system or user message instructing it to do so. + */ +export interface ResponseFormatJSONObject { + /** + * The type of response format being defined. Always `json_object`. + */ + type: 'json_object'; +} +/** + * JSON Schema response format. Used to generate structured JSON responses. Learn + * more about + * [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + */ +export interface ResponseFormatJSONSchema { + /** + * Structured Outputs configuration options, including a JSON Schema. + */ + json_schema: ResponseFormatJSONSchema.JSONSchema; + /** + * The type of response format being defined. Always `json_schema`. + */ + type: 'json_schema'; +} +export declare namespace ResponseFormatJSONSchema { + /** + * Structured Outputs configuration options, including a JSON Schema. + */ + interface JSONSchema { + /** + * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + * and dashes, with a maximum length of 64. + */ + name: string; + /** + * A description of what the response format is for, used by the model to determine + * how to respond in the format. + */ + description?: string; + /** + * The schema for the response format, described as a JSON Schema object. Learn how + * to build JSON schemas [here](https://json-schema.org/). + */ + schema?: { + [key: string]: unknown; + }; + /** + * Whether to enable strict schema adherence when generating the output. If set to + * true, the model will always follow the exact schema defined in the `schema` + * field. Only a subset of JSON Schema is supported when `strict` is `true`. To + * learn more, read the + * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + */ + strict?: boolean | null; + } +} +/** + * Default response format. Used to generate text responses. + */ +export interface ResponseFormatText { + /** + * The type of response format being defined. Always `text`. + */ + type: 'text'; +} +/** + * A custom grammar for the model to follow when generating text. Learn more in the + * [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + */ +export interface ResponseFormatTextGrammar { + /** + * The custom grammar for the model to follow. + */ + grammar: string; + /** + * The type of response format being defined. Always `grammar`. + */ + type: 'grammar'; +} +/** + * Configure the model to generate valid Python code. See the + * [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) + * for more details. + */ +export interface ResponseFormatTextPython { + /** + * The type of response format being defined. Always `python`. + */ + type: 'python'; +} +export type ResponsesModel = (string & {}) | ChatModel | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11'; +//# sourceMappingURL=shared.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..c49d7fe4f190aa4aaa60a107f62e8ba87d78241a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,CAAC;AAEtC,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,SAAS,GACT,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,YAAY,GACZ,uBAAuB,GACvB,SAAS,GACT,oBAAoB,GACpB,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,iCAAiC,GACjC,iCAAiC,GACjC,iCAAiC,GACjC,2BAA2B,GAC3B,sCAAsC,GACtC,uBAAuB,GACvB,4BAA4B,GAC5B,kCAAkC,GAClC,uCAAuC,GACvC,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,GACb,wBAAwB,GACxB,aAAa,GACb,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,oBA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;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GACtB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1201c0af5fedeef6a946c0999c64890fa3c83838 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts @@ -0,0 +1,265 @@ +export type AllModels = (string & {}) | ChatModel | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11'; +export type ChatModel = 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613'; +/** + * A filter used to compare a specified attribute key to a given value using a + * defined comparison operation. + */ +export interface ComparisonFilter { + /** + * The key to compare against the value. + */ + key: string; + /** + * Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + * + * - `eq`: equals + * - `ne`: not equal + * - `gt`: greater than + * - `gte`: greater than or equal + * - `lt`: less than + * - `lte`: less than or equal + */ + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + /** + * The value to compare against the attribute key; supports string, number, or + * boolean types. + */ + value: string | number | boolean; +} +/** + * Combine multiple filters using `and` or `or`. + */ +export interface CompoundFilter { + /** + * Array of filters to combine. Items can be `ComparisonFilter` or + * `CompoundFilter`. + */ + filters: Array; + /** + * Type of operation: `and` or `or`. + */ + type: 'and' | 'or'; +} +/** + * The input format for the custom tool. Default is unconstrained text. + */ +export type CustomToolInputFormat = CustomToolInputFormat.Text | CustomToolInputFormat.Grammar; +export declare namespace CustomToolInputFormat { + /** + * Unconstrained free-form text. + */ + interface Text { + /** + * Unconstrained text format. Always `text`. + */ + type: 'text'; + } + /** + * A grammar defined by the user. + */ + interface Grammar { + /** + * The grammar definition. + */ + definition: string; + /** + * The syntax of the grammar definition. One of `lark` or `regex`. + */ + syntax: 'lark' | 'regex'; + /** + * Grammar format. Always `grammar`. + */ + type: 'grammar'; + } +} +export interface ErrorObject { + code: string | null; + message: string; + param: string | null; + type: string; +} +export interface FunctionDefinition { + /** + * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + * underscores and dashes, with a maximum length of 64. + */ + name: string; + /** + * A description of what the function does, used by the model to choose when and + * how to call the function. + */ + description?: string; + /** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](https://platform.openai.com/docs/guides/function-calling) for examples, + * and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ + parameters?: FunctionParameters; + /** + * Whether to enable strict schema adherence when generating the function call. If + * set to true, the model will follow the exact schema defined in the `parameters` + * field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn + * more about Structured Outputs in the + * [function calling guide](https://platform.openai.com/docs/guides/function-calling). + */ + strict?: boolean | null; +} +/** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](https://platform.openai.com/docs/guides/function-calling) for examples, + * and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ +export type FunctionParameters = { + [key: string]: unknown; +}; +/** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ +export type Metadata = { + [key: string]: string; +}; +/** + * **gpt-5 and o-series models only** + * + * Configuration options for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + */ +export interface Reasoning { + /** + * Constrains effort on reasoning for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + * effort can result in faster responses and fewer tokens used on reasoning in a + * response. + */ + effort?: ReasoningEffort | null; + /** + * @deprecated **Deprecated:** use `summary` instead. + * + * A summary of the reasoning performed by the model. This can be useful for + * debugging and understanding the model's reasoning process. One of `auto`, + * `concise`, or `detailed`. + */ + generate_summary?: 'auto' | 'concise' | 'detailed' | null; + /** + * A summary of the reasoning performed by the model. This can be useful for + * debugging and understanding the model's reasoning process. One of `auto`, + * `concise`, or `detailed`. + */ + summary?: 'auto' | 'concise' | 'detailed' | null; +} +/** + * Constrains effort on reasoning for + * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + * effort can result in faster responses and fewer tokens used on reasoning in a + * response. + */ +export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | null; +/** + * JSON object response format. An older method of generating JSON responses. Using + * `json_schema` is recommended for models that support it. Note that the model + * will not generate JSON without a system or user message instructing it to do so. + */ +export interface ResponseFormatJSONObject { + /** + * The type of response format being defined. Always `json_object`. + */ + type: 'json_object'; +} +/** + * JSON Schema response format. Used to generate structured JSON responses. Learn + * more about + * [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + */ +export interface ResponseFormatJSONSchema { + /** + * Structured Outputs configuration options, including a JSON Schema. + */ + json_schema: ResponseFormatJSONSchema.JSONSchema; + /** + * The type of response format being defined. Always `json_schema`. + */ + type: 'json_schema'; +} +export declare namespace ResponseFormatJSONSchema { + /** + * Structured Outputs configuration options, including a JSON Schema. + */ + interface JSONSchema { + /** + * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + * and dashes, with a maximum length of 64. + */ + name: string; + /** + * A description of what the response format is for, used by the model to determine + * how to respond in the format. + */ + description?: string; + /** + * The schema for the response format, described as a JSON Schema object. Learn how + * to build JSON schemas [here](https://json-schema.org/). + */ + schema?: { + [key: string]: unknown; + }; + /** + * Whether to enable strict schema adherence when generating the output. If set to + * true, the model will always follow the exact schema defined in the `schema` + * field. Only a subset of JSON Schema is supported when `strict` is `true`. To + * learn more, read the + * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + */ + strict?: boolean | null; + } +} +/** + * Default response format. Used to generate text responses. + */ +export interface ResponseFormatText { + /** + * The type of response format being defined. Always `text`. + */ + type: 'text'; +} +/** + * A custom grammar for the model to follow when generating text. Learn more in the + * [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + */ +export interface ResponseFormatTextGrammar { + /** + * The custom grammar for the model to follow. + */ + grammar: string; + /** + * The type of response format being defined. Always `grammar`. + */ + type: 'grammar'; +} +/** + * Configure the model to generate valid Python code. See the + * [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) + * for more details. + */ +export interface ResponseFormatTextPython { + /** + * The type of response format being defined. Always `python`. + */ + type: 'python'; +} +export type ResponsesModel = (string & {}) | ChatModel | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11'; +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..763612462ed3aa9848deecd672861be9561377d0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,CAAC;AAEtC,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,SAAS,GACT,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,YAAY,GACZ,uBAAuB,GACvB,SAAS,GACT,oBAAoB,GACpB,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,iCAAiC,GACjC,iCAAiC,GACjC,iCAAiC,GACjC,2BAA2B,GAC3B,sCAAsC,GACtC,uBAAuB,GACvB,4BAA4B,GAC5B,kCAAkC,GAClC,uCAAuC,GACvC,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,GACb,wBAAwB,GACxB,aAAa,GACb,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB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AAI,CAAC;KACzB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GACtB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js new file mode 100644 index 0000000000000000000000000000000000000000..db0cae177b55b03281ce001453daa9b4874edf2a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=shared.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e532ab2cd75f671cbef8791617e56d4cd0b5e6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a88d4e1268fb4c84c66b4121e6e0a320586be89e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=shared.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ac8fa86401f84797458257482e1fcde8109eb235 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/shared.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..23a73a8547915ecf379a81bad317dbbece2f6759 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts @@ -0,0 +1,2 @@ +export * from "./uploads/index.mjs"; +//# sourceMappingURL=uploads.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6dfb2163eeda79214ac6f62db79015d88e6a454e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7367695119b520fc7ca89c773d6d24727251f3d2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts @@ -0,0 +1,2 @@ +export * from "./uploads/index.js"; +//# sourceMappingURL=uploads.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..66ff900c9c4e47bc5828fcadc927de9b078ff59f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js new file mode 100644 index 0000000000000000000000000000000000000000..ef78c7f485d931a74ea110cfd219a7e4e6ed6305 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./uploads/index.js"), exports); +//# sourceMappingURL=uploads.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6ebfe5c54cd9e0fd2e2f05511d8210d02aed72d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..913d2ca61f72563d2ddb1a81df9a9b74bba21883 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./uploads/index.mjs"; +//# sourceMappingURL=uploads.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..55c4a24d4646ea928536fb7fc470857e101c30fa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/uploads.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..69ab0bf24dbfd8fc8eb8df93d050eba040ab4133 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts @@ -0,0 +1,2 @@ +export * from "./vector-stores/index.mjs"; +//# sourceMappingURL=vector-stores.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..93fa5bfaae1690ba68692db19296246f67605dae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"vector-stores.d.mts","sourceRoot":"","sources":["../src/resources/vector-stores.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c5a77db3f077de9082fa20d80541433ef38157c4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts @@ -0,0 +1,2 @@ +export * from "./vector-stores/index.js"; +//# sourceMappingURL=vector-stores.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9fa6ad9dd0f01dc19bd1898013632dd36957883f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"vector-stores.d.ts","sourceRoot":"","sources":["../src/resources/vector-stores.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js new file mode 100644 index 0000000000000000000000000000000000000000..b7fb5e7093a56825634863396f8cc7a696a700c4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./vector-stores/index.js"), exports); +//# sourceMappingURL=vector-stores.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2762844d3a7a87b4fc3cfc0dff27ff0a2ef6d17a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vector-stores.js","sourceRoot":"","sources":["../src/resources/vector-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mEAAsC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6cd88834f2255dfc56b5a8f74cbb994267c331be --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./vector-stores/index.mjs"; +//# sourceMappingURL=vector-stores.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3c740c61480421ff962efbf9e9f7d6b9c89da0bc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/vector-stores.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"vector-stores.mjs","sourceRoot":"","sources":["../src/resources/vector-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a0095a51498845cd5d36b891ebe693b05e6d238e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts @@ -0,0 +1,532 @@ +import { APIResource } from "../core/resource.mjs"; +import { HeadersLike } from "../internal/headers.mjs"; +export declare class Webhooks extends APIResource { + #private; + /** + * Validates that the given payload was sent by OpenAI and parses the payload. + */ + unwrap(payload: string, headers: HeadersLike, secret?: string | undefined | null, tolerance?: number): Promise; + /** + * Validates whether or not the webhook payload was sent by OpenAI. + * + * An error will be raised if the webhook payload was not sent by OpenAI. + * + * @param payload - The webhook payload + * @param headers - The webhook headers + * @param secret - The webhook secret (optional, will use client secret if not provided) + * @param tolerance - Maximum age of the webhook in seconds (default: 300 = 5 minutes) + */ + verifySignature(payload: string, headers: HeadersLike, secret?: string | undefined | null, tolerance?: number): Promise; +} +/** + * Sent when a batch API request has been cancelled. + */ +export interface BatchCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchCancelledWebhookEvent.Data; + /** + * The type of the event. Always `batch.cancelled`. + */ + type: 'batch.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has been completed. + */ +export interface BatchCompletedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request was completed. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchCompletedWebhookEvent.Data; + /** + * The type of the event. Always `batch.completed`. + */ + type: 'batch.completed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchCompletedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has expired. + */ +export interface BatchExpiredWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request expired. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchExpiredWebhookEvent.Data; + /** + * The type of the event. Always `batch.expired`. + */ + type: 'batch.expired'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchExpiredWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has failed. + */ +export interface BatchFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchFailedWebhookEvent.Data; + /** + * The type of the event. Always `batch.failed`. + */ + type: 'batch.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when an eval run has been canceled. + */ +export interface EvalRunCanceledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run was canceled. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunCanceledWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.canceled`. + */ + type: 'eval.run.canceled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunCanceledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when an eval run has failed. + */ +export interface EvalRunFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunFailedWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.failed`. + */ + type: 'eval.run.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when an eval run has succeeded. + */ +export interface EvalRunSucceededWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run succeeded. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunSucceededWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.succeeded`. + */ + type: 'eval.run.succeeded'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunSucceededWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has been cancelled. + */ +export interface FineTuningJobCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobCancelledWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.cancelled`. + */ + type: 'fine_tuning.job.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has failed. + */ +export interface FineTuningJobFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobFailedWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.failed`. + */ + type: 'fine_tuning.job.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has succeeded. + */ +export interface FineTuningJobSucceededWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job succeeded. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobSucceededWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.succeeded`. + */ + type: 'fine_tuning.job.succeeded'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobSucceededWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a background response has been cancelled. + */ +export interface ResponseCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseCancelledWebhookEvent.Data; + /** + * The type of the event. Always `response.cancelled`. + */ + type: 'response.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has been completed. + */ +export interface ResponseCompletedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was completed. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseCompletedWebhookEvent.Data; + /** + * The type of the event. Always `response.completed`. + */ + type: 'response.completed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseCompletedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has failed. + */ +export interface ResponseFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseFailedWebhookEvent.Data; + /** + * The type of the event. Always `response.failed`. + */ + type: 'response.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has been interrupted. + */ +export interface ResponseIncompleteWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was interrupted. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseIncompleteWebhookEvent.Data; + /** + * The type of the event. Always `response.incomplete`. + */ + type: 'response.incomplete'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseIncompleteWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a batch API request has been cancelled. + */ +export type UnwrapWebhookEvent = BatchCancelledWebhookEvent | BatchCompletedWebhookEvent | BatchExpiredWebhookEvent | BatchFailedWebhookEvent | EvalRunCanceledWebhookEvent | EvalRunFailedWebhookEvent | EvalRunSucceededWebhookEvent | FineTuningJobCancelledWebhookEvent | FineTuningJobFailedWebhookEvent | FineTuningJobSucceededWebhookEvent | ResponseCancelledWebhookEvent | ResponseCompletedWebhookEvent | ResponseFailedWebhookEvent | ResponseIncompleteWebhookEvent; +export declare namespace Webhooks { + export { type BatchCancelledWebhookEvent as BatchCancelledWebhookEvent, type BatchCompletedWebhookEvent as BatchCompletedWebhookEvent, type BatchExpiredWebhookEvent as BatchExpiredWebhookEvent, type BatchFailedWebhookEvent as BatchFailedWebhookEvent, type EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent, type EvalRunFailedWebhookEvent as EvalRunFailedWebhookEvent, type EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent, type FineTuningJobCancelledWebhookEvent as FineTuningJobCancelledWebhookEvent, type FineTuningJobFailedWebhookEvent as FineTuningJobFailedWebhookEvent, type FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent, type ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent, type ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent, type ResponseFailedWebhookEvent as ResponseFailedWebhookEvent, type ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, }; +} +//# sourceMappingURL=webhooks.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..724dc3fb72504662ea6d0d1ed49814d9d912fc8d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"webhooks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AClC,+BAA+B,GAC/B,kCAAkC,GAClC,6BAA6B,GAC7B,6BAA6B,GAC7B,0BAA0B,GAC1B,8BAA8B,CAAC;AAEnC,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fbdc2167a884d4670233d97008ef43e158c3e986 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts @@ -0,0 +1,532 @@ +import { APIResource } from "../core/resource.js"; +import { HeadersLike } from "../internal/headers.js"; +export declare class Webhooks extends APIResource { + #private; + /** + * Validates that the given payload was sent by OpenAI and parses the payload. + */ + unwrap(payload: string, headers: HeadersLike, secret?: string | undefined | null, tolerance?: number): Promise; + /** + * Validates whether or not the webhook payload was sent by OpenAI. + * + * An error will be raised if the webhook payload was not sent by OpenAI. + * + * @param payload - The webhook payload + * @param headers - The webhook headers + * @param secret - The webhook secret (optional, will use client secret if not provided) + * @param tolerance - Maximum age of the webhook in seconds (default: 300 = 5 minutes) + */ + verifySignature(payload: string, headers: HeadersLike, secret?: string | undefined | null, tolerance?: number): Promise; +} +/** + * Sent when a batch API request has been cancelled. + */ +export interface BatchCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchCancelledWebhookEvent.Data; + /** + * The type of the event. Always `batch.cancelled`. + */ + type: 'batch.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has been completed. + */ +export interface BatchCompletedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request was completed. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchCompletedWebhookEvent.Data; + /** + * The type of the event. Always `batch.completed`. + */ + type: 'batch.completed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchCompletedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has expired. + */ +export interface BatchExpiredWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request expired. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchExpiredWebhookEvent.Data; + /** + * The type of the event. Always `batch.expired`. + */ + type: 'batch.expired'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchExpiredWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when a batch API request has failed. + */ +export interface BatchFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the batch API request failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: BatchFailedWebhookEvent.Data; + /** + * The type of the event. Always `batch.failed`. + */ + type: 'batch.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace BatchFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the batch API request. + */ + id: string; + } +} +/** + * Sent when an eval run has been canceled. + */ +export interface EvalRunCanceledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run was canceled. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunCanceledWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.canceled`. + */ + type: 'eval.run.canceled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunCanceledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when an eval run has failed. + */ +export interface EvalRunFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunFailedWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.failed`. + */ + type: 'eval.run.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when an eval run has succeeded. + */ +export interface EvalRunSucceededWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the eval run succeeded. + */ + created_at: number; + /** + * Event data payload. + */ + data: EvalRunSucceededWebhookEvent.Data; + /** + * The type of the event. Always `eval.run.succeeded`. + */ + type: 'eval.run.succeeded'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace EvalRunSucceededWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the eval run. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has been cancelled. + */ +export interface FineTuningJobCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobCancelledWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.cancelled`. + */ + type: 'fine_tuning.job.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has failed. + */ +export interface FineTuningJobFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobFailedWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.failed`. + */ + type: 'fine_tuning.job.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a fine-tuning job has succeeded. + */ +export interface FineTuningJobSucceededWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the fine-tuning job succeeded. + */ + created_at: number; + /** + * Event data payload. + */ + data: FineTuningJobSucceededWebhookEvent.Data; + /** + * The type of the event. Always `fine_tuning.job.succeeded`. + */ + type: 'fine_tuning.job.succeeded'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace FineTuningJobSucceededWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the fine-tuning job. + */ + id: string; + } +} +/** + * Sent when a background response has been cancelled. + */ +export interface ResponseCancelledWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was cancelled. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseCancelledWebhookEvent.Data; + /** + * The type of the event. Always `response.cancelled`. + */ + type: 'response.cancelled'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseCancelledWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has been completed. + */ +export interface ResponseCompletedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was completed. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseCompletedWebhookEvent.Data; + /** + * The type of the event. Always `response.completed`. + */ + type: 'response.completed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseCompletedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has failed. + */ +export interface ResponseFailedWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response failed. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseFailedWebhookEvent.Data; + /** + * The type of the event. Always `response.failed`. + */ + type: 'response.failed'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseFailedWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a background response has been interrupted. + */ +export interface ResponseIncompleteWebhookEvent { + /** + * The unique ID of the event. + */ + id: string; + /** + * The Unix timestamp (in seconds) of when the model response was interrupted. + */ + created_at: number; + /** + * Event data payload. + */ + data: ResponseIncompleteWebhookEvent.Data; + /** + * The type of the event. Always `response.incomplete`. + */ + type: 'response.incomplete'; + /** + * The object of the event. Always `event`. + */ + object?: 'event'; +} +export declare namespace ResponseIncompleteWebhookEvent { + /** + * Event data payload. + */ + interface Data { + /** + * The unique ID of the model response. + */ + id: string; + } +} +/** + * Sent when a batch API request has been cancelled. + */ +export type UnwrapWebhookEvent = BatchCancelledWebhookEvent | BatchCompletedWebhookEvent | BatchExpiredWebhookEvent | BatchFailedWebhookEvent | EvalRunCanceledWebhookEvent | EvalRunFailedWebhookEvent | EvalRunSucceededWebhookEvent | FineTuningJobCancelledWebhookEvent | FineTuningJobFailedWebhookEvent | FineTuningJobSucceededWebhookEvent | ResponseCancelledWebhookEvent | ResponseCompletedWebhookEvent | ResponseFailedWebhookEvent | ResponseIncompleteWebhookEvent; +export declare namespace Webhooks { + export { type BatchCancelledWebhookEvent as BatchCancelledWebhookEvent, type BatchCompletedWebhookEvent as BatchCompletedWebhookEvent, type BatchExpiredWebhookEvent as BatchExpiredWebhookEvent, type BatchFailedWebhookEvent as BatchFailedWebhookEvent, type EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent, type EvalRunFailedWebhookEvent as EvalRunFailedWebhookEvent, type EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent, type FineTuningJobCancelledWebhookEvent as FineTuningJobCancelledWebhookEvent, type FineTuningJobFailedWebhookEvent as FineTuningJobFailedWebhookEvent, type FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent, type ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent, type ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent, type ResponseFailedWebhookEvent as ResponseFailedWebhookEvent, type ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, }; +} +//# sourceMappingURL=webhooks.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..4230d09b133612f3c1d0e912fbf17076da2baed6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"OAGO,EAAE,WAAW,EAAE;OACf,EAAgB,WAAW,EAAE;AAEpC,qBAAa,QAAS,SAAQ,WAAW;;IACvC;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,EAC9D,SAAS,GAAE,MAAY,GACtB,OAAO,CAAC,kBAAkB,CAAC;IAM9B;;;;;;;;;OASG;IACG,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,EAC9D,SAAS,GAAE,MAAY,GACtB,OAAO,CAAC,IAAI,CAAC;CAuGjB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC;IAEtC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC;IAEtC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC;IAExB;;OAEG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A0B,GAC1B,wBAAwB,GACxB,uBAAuB,GACvB,2BAA2B,GAC3B,yBAAyB,GACzB,4BAA4B,GAC5B,kCAAkC,GAClC,+BAA+B,GAC/B,kCAAkC,GAClC,6BAA6B,GAC7B,6BAA6B,GAC7B,0BAA0B,GAC1B,8BAA8B,CAAC;AAEnC,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js new file mode 100644 index 0000000000000000000000000000000000000000..74f44999f03a14362a3932ac0538f175addf3934 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js @@ -0,0 +1,101 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _Webhooks_instances, _Webhooks_validateSecret, _Webhooks_getRequiredHeader; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Webhooks = void 0; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("../error.js"); +const resource_1 = require("../core/resource.js"); +const headers_1 = require("../internal/headers.js"); +class Webhooks extends resource_1.APIResource { + constructor() { + super(...arguments); + _Webhooks_instances.add(this); + } + /** + * Validates that the given payload was sent by OpenAI and parses the payload. + */ + async unwrap(payload, headers, secret = this._client.webhookSecret, tolerance = 300) { + await this.verifySignature(payload, headers, secret, tolerance); + return JSON.parse(payload); + } + /** + * Validates whether or not the webhook payload was sent by OpenAI. + * + * An error will be raised if the webhook payload was not sent by OpenAI. + * + * @param payload - The webhook payload + * @param headers - The webhook headers + * @param secret - The webhook secret (optional, will use client secret if not provided) + * @param tolerance - Maximum age of the webhook in seconds (default: 300 = 5 minutes) + */ + async verifySignature(payload, headers, secret = this._client.webhookSecret, tolerance = 300) { + if (typeof crypto === 'undefined' || + typeof crypto.subtle.importKey !== 'function' || + typeof crypto.subtle.verify !== 'function') { + throw new Error('Webhook signature verification is only supported when the `crypto` global is defined'); + } + tslib_1.__classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_validateSecret).call(this, secret); + const headersObj = (0, headers_1.buildHeaders)([headers]).values; + const signatureHeader = tslib_1.__classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-signature'); + const timestamp = tslib_1.__classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-timestamp'); + const webhookId = tslib_1.__classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-id'); + // Validate timestamp to prevent replay attacks + const timestampSeconds = parseInt(timestamp, 10); + if (isNaN(timestampSeconds)) { + throw new error_1.InvalidWebhookSignatureError('Invalid webhook timestamp format'); + } + const nowSeconds = Math.floor(Date.now() / 1000); + if (nowSeconds - timestampSeconds > tolerance) { + throw new error_1.InvalidWebhookSignatureError('Webhook timestamp is too old'); + } + if (timestampSeconds > nowSeconds + tolerance) { + throw new error_1.InvalidWebhookSignatureError('Webhook timestamp is too new'); + } + // Extract signatures from v1, format + // The signature header can have multiple values, separated by spaces. + // Each value is in the format v1,. We should accept if any match. + const signatures = signatureHeader + .split(' ') + .map((part) => (part.startsWith('v1,') ? part.substring(3) : part)); + // Decode the secret if it starts with whsec_ + const decodedSecret = secret.startsWith('whsec_') ? + Buffer.from(secret.replace('whsec_', ''), 'base64') + : Buffer.from(secret, 'utf-8'); + // Create the signed payload: {webhook_id}.{timestamp}.{payload} + const signedPayload = webhookId ? `${webhookId}.${timestamp}.${payload}` : `${timestamp}.${payload}`; + // Import the secret as a cryptographic key for HMAC + const key = await crypto.subtle.importKey('raw', decodedSecret, { name: 'HMAC', hash: 'SHA-256' }, false, ['verify']); + // Check if any signature matches using timing-safe WebCrypto verify + for (const signature of signatures) { + try { + const signatureBytes = Buffer.from(signature, 'base64'); + const isValid = await crypto.subtle.verify('HMAC', key, signatureBytes, new TextEncoder().encode(signedPayload)); + if (isValid) { + return; // Valid signature found + } + } + catch { + // Invalid base64 or signature format, continue to next signature + continue; + } + } + throw new error_1.InvalidWebhookSignatureError('The given webhook signature does not match the expected signature'); + } +} +exports.Webhooks = Webhooks; +_Webhooks_instances = new WeakSet(), _Webhooks_validateSecret = function _Webhooks_validateSecret(secret) { + if (typeof secret !== 'string' || secret.length === 0) { + throw new Error(`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`); + } +}, _Webhooks_getRequiredHeader = function _Webhooks_getRequiredHeader(headers, name) { + if (!headers) { + throw new Error(`Headers are required`); + } + const value = headers.get(name); + if (value === null || value === undefined) { + throw new Error(`Missing required header: ${name}`); + } + return value; +}; +//# sourceMappingURL=webhooks.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f39813ee6e1620e36147a5f76da3486e2e91206c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAEtF,uCAAwD;AACxD,kDAA+C;AAC/C,oDAAgE;AAEhE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;;IAqIA,CAAC;IApIC;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAe,EACf,OAAoB,EACpB,SAAoC,IAAI,CAAC,OAAO,CAAC,aAAa,EAC9D,YAAoB,GAAG;QAEvB,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAuB,CAAC;IACnD,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,eAAe,CACnB,OAAe,EACf,OAAoB,EACpB,SAAoC,IAAI,CAAC,OAAO,CAAC,aAAa,EAC9D,YAAoB,GAAG;QAEvB,IACE,OAAO,MAAM,KAAK,WAAW;YAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,KAAK,UAAU;YAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,EAC1C,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;QAC1G,CAAC;QAED,+BAAA,IAAI,qDAAgB,MAApB,IAAI,EAAiB,MAAM,CAAC,CAAC;QAE7B,MAAM,UAAU,GAAG,IAAA,sBAAY,EAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAClD,MAAM,eAAe,GAAG,+BAAA,IAAI,wDAAmB,MAAvB,IAAI,EAAoB,UAAU,EAAE,mBAAmB,CAAC,CAAC;QACjF,MAAM,SAAS,GA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AsB,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6b887cf05dd750abd505a1306513ab69af444c74 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs @@ -0,0 +1,97 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _Webhooks_instances, _Webhooks_validateSecret, _Webhooks_getRequiredHeader; +import { __classPrivateFieldGet } from "../internal/tslib.mjs"; +import { InvalidWebhookSignatureError } from "../error.mjs"; +import { APIResource } from "../core/resource.mjs"; +import { buildHeaders } from "../internal/headers.mjs"; +export class Webhooks extends APIResource { + constructor() { + super(...arguments); + _Webhooks_instances.add(this); + } + /** + * Validates that the given payload was sent by OpenAI and parses the payload. + */ + async unwrap(payload, headers, secret = this._client.webhookSecret, tolerance = 300) { + await this.verifySignature(payload, headers, secret, tolerance); + return JSON.parse(payload); + } + /** + * Validates whether or not the webhook payload was sent by OpenAI. + * + * An error will be raised if the webhook payload was not sent by OpenAI. + * + * @param payload - The webhook payload + * @param headers - The webhook headers + * @param secret - The webhook secret (optional, will use client secret if not provided) + * @param tolerance - Maximum age of the webhook in seconds (default: 300 = 5 minutes) + */ + async verifySignature(payload, headers, secret = this._client.webhookSecret, tolerance = 300) { + if (typeof crypto === 'undefined' || + typeof crypto.subtle.importKey !== 'function' || + typeof crypto.subtle.verify !== 'function') { + throw new Error('Webhook signature verification is only supported when the `crypto` global is defined'); + } + __classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_validateSecret).call(this, secret); + const headersObj = buildHeaders([headers]).values; + const signatureHeader = __classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-signature'); + const timestamp = __classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-timestamp'); + const webhookId = __classPrivateFieldGet(this, _Webhooks_instances, "m", _Webhooks_getRequiredHeader).call(this, headersObj, 'webhook-id'); + // Validate timestamp to prevent replay attacks + const timestampSeconds = parseInt(timestamp, 10); + if (isNaN(timestampSeconds)) { + throw new InvalidWebhookSignatureError('Invalid webhook timestamp format'); + } + const nowSeconds = Math.floor(Date.now() / 1000); + if (nowSeconds - timestampSeconds > tolerance) { + throw new InvalidWebhookSignatureError('Webhook timestamp is too old'); + } + if (timestampSeconds > nowSeconds + tolerance) { + throw new InvalidWebhookSignatureError('Webhook timestamp is too new'); + } + // Extract signatures from v1, format + // The signature header can have multiple values, separated by spaces. + // Each value is in the format v1,. We should accept if any match. + const signatures = signatureHeader + .split(' ') + .map((part) => (part.startsWith('v1,') ? part.substring(3) : part)); + // Decode the secret if it starts with whsec_ + const decodedSecret = secret.startsWith('whsec_') ? + Buffer.from(secret.replace('whsec_', ''), 'base64') + : Buffer.from(secret, 'utf-8'); + // Create the signed payload: {webhook_id}.{timestamp}.{payload} + const signedPayload = webhookId ? `${webhookId}.${timestamp}.${payload}` : `${timestamp}.${payload}`; + // Import the secret as a cryptographic key for HMAC + const key = await crypto.subtle.importKey('raw', decodedSecret, { name: 'HMAC', hash: 'SHA-256' }, false, ['verify']); + // Check if any signature matches using timing-safe WebCrypto verify + for (const signature of signatures) { + try { + const signatureBytes = Buffer.from(signature, 'base64'); + const isValid = await crypto.subtle.verify('HMAC', key, signatureBytes, new TextEncoder().encode(signedPayload)); + if (isValid) { + return; // Valid signature found + } + } + catch { + // Invalid base64 or signature format, continue to next signature + continue; + } + } + throw new InvalidWebhookSignatureError('The given webhook signature does not match the expected signature'); + } +} +_Webhooks_instances = new WeakSet(), _Webhooks_validateSecret = function _Webhooks_validateSecret(secret) { + if (typeof secret !== 'string' || secret.length === 0) { + throw new Error(`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`); + } +}, _Webhooks_getRequiredHeader = function _Webhooks_getRequiredHeader(headers, name) { + if (!headers) { + throw new Error(`Headers are required`); + } + const value = headers.get(name); + if (value === null || value === undefined) { + throw new Error(`Missing required header: ${name}`); + } + return value; +}; +//# sourceMappingURL=webhooks.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c2d99a61686600916f3bae15fea5f5c4ab9f5b11 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/resources/webhooks.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"webhooks.mjs","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAE/E,EAAE,4BAA4B,EAAE;OAChC,EAAE,WAAW,EAAE;OACf,EAAE,YAAY,EAAe;AAEpC,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;;IAqIA,CAAC;IApIC;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAe,EACf,OAAoB,EACpB,SAAoC,IAAI,CAAC,OAAO,CAAC,aAAa,EAC9D,YAAoB,GAAG;QAEvB,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,KAAK,CAA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,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CACxC,MAAM,EACN,GAAG,EACH,cAAc,EACd,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CACxC,CAAC;gBAEF,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO,CAAC,wBAAwB;gBAClC,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,iEAAiE;gBACjE,SAAS;YACX,CAAC;QACH,CAAC;QAED,MAAM,IAAI,4BAA4B,CACpC,mEAAmE,CACpE,CAAC;IACJ,CAAC;CAuBF;kGArBiB,MAAiC;IAC/C,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,mKAAmK,CACpK,CAAC;IACJ,CAAC;AACH,CAAC,qEAEkB,OAAgB,EAAE,IAAY;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/api-promise.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/api-promise.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c775ee697019eb33f8b2805251379155e89114c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/api-promise.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/api-promise instead */ +export * from './core/api-promise'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/azure.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/azure.ts new file mode 100644 index 0000000000000000000000000000000000000000..490b82b9fc6d44b5f4df82dec3f430f5b683f1ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/azure.ts @@ -0,0 +1,198 @@ +import type { RequestInit } from './internal/builtin-types'; +import * as Errors from './error'; +import { FinalRequestOptions } from './internal/request-options'; +import { isObj, readEnv } from './internal/utils'; +import { ClientOptions, OpenAI } from './client'; +import { buildHeaders, NullableHeaders } from './internal/headers'; + +/** API Client for interfacing with the Azure OpenAI API. */ +export interface AzureClientOptions extends ClientOptions { + /** + * Defaults to process.env['OPENAI_API_VERSION']. + */ + apiVersion?: string | undefined; + + /** + * Your Azure endpoint, including the resource, e.g. `https://example-resource.azure.openai.com/` + */ + endpoint?: string | undefined; + + /** + * A model deployment, if given, sets the base client URL to include `/deployments/{deployment}`. + * Note: this means you won't be able to use non-deployment endpoints. Not supported with Assistants APIs. + */ + deployment?: string | undefined; + + /** + * Defaults to process.env['AZURE_OPENAI_API_KEY']. + */ + apiKey?: string | undefined; + + /** + * A function that returns an access token for Microsoft Entra (formerly known as Azure Active Directory), + * which will be invoked on every request. + */ + azureADTokenProvider?: (() => Promise) | undefined; +} + +/** API Client for interfacing with the Azure OpenAI API. */ +export class AzureOpenAI extends OpenAI { + private _azureADTokenProvider: (() => Promise) | undefined; + deploymentName: string | undefined; + apiVersion: string = ''; + + /** + * API Client for interfacing with the Azure OpenAI API. + * + * @param {string | undefined} [opts.apiVersion=process.env['OPENAI_API_VERSION'] ?? undefined] + * @param {string | undefined} [opts.endpoint=process.env['AZURE_OPENAI_ENDPOINT'] ?? undefined] - Your Azure endpoint, including the resource, e.g. `https://example-resource.azure.openai.com/` + * @param {string | undefined} [opts.apiKey=process.env['AZURE_OPENAI_API_KEY'] ?? undefined] + * @param {string | undefined} opts.deployment - A model deployment, if given, sets the base client URL to include `/deployments/{deployment}`. + * @param {string | null | undefined} [opts.organization=process.env['OPENAI_ORG_ID'] ?? null] + * @param {string} [opts.baseURL=process.env['OPENAI_BASE_URL']] - Sets the base URL for the API, e.g. `https://example-resource.azure.openai.com/openai/`. + * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. + * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections. + * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. + * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. + * @param {Headers} opts.defaultHeaders - Default headers to include with every request to the API. + * @param {DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API. + * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + */ + constructor({ + baseURL = readEnv('OPENAI_BASE_URL'), + apiKey = readEnv('AZURE_OPENAI_API_KEY'), + apiVersion = readEnv('OPENAI_API_VERSION'), + endpoint, + deployment, + azureADTokenProvider, + dangerouslyAllowBrowser, + ...opts + }: AzureClientOptions = {}) { + if (!apiVersion) { + throw new Errors.OpenAIError( + "The OPENAI_API_VERSION environment variable is missing or empty; either provide it, or instantiate the AzureOpenAI client with an apiVersion option, like new AzureOpenAI({ apiVersion: 'My API Version' }).", + ); + } + + if (typeof azureADTokenProvider === 'function') { + dangerouslyAllowBrowser = true; + } + + if (!azureADTokenProvider && !apiKey) { + throw new Errors.OpenAIError( + 'Missing credentials. Please pass one of `apiKey` and `azureADTokenProvider`, or set the `AZURE_OPENAI_API_KEY` environment variable.', + ); + } + + if (azureADTokenProvider && apiKey) { + throw new Errors.OpenAIError( + 'The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.', + ); + } + + // define a sentinel value to avoid any typing issues + apiKey ??= API_KEY_SENTINEL; + + opts.defaultQuery = { ...opts.defaultQuery, 'api-version': apiVersion }; + + if (!baseURL) { + if (!endpoint) { + endpoint = process.env['AZURE_OPENAI_ENDPOINT']; + } + + if (!endpoint) { + throw new Errors.OpenAIError( + 'Must provide one of the `baseURL` or `endpoint` arguments, or the `AZURE_OPENAI_ENDPOINT` environment variable', + ); + } + + baseURL = `${endpoint}/openai`; + } else { + if (endpoint) { + throw new Errors.OpenAIError('baseURL and endpoint are mutually exclusive'); + } + } + + super({ + apiKey, + baseURL, + ...opts, + ...(dangerouslyAllowBrowser !== undefined ? { dangerouslyAllowBrowser } : {}), + }); + + this._azureADTokenProvider = azureADTokenProvider; + this.apiVersion = apiVersion; + this.deploymentName = deployment; + } + + override async buildRequest( + options: FinalRequestOptions, + props: { retryCount?: number } = {}, + ): Promise<{ req: RequestInit & { headers: Headers }; url: string; timeout: number }> { + if (_deployments_endpoints.has(options.path) && options.method === 'post' && options.body !== undefined) { + if (!isObj(options.body)) { + throw new Error('Expected request body to be an object'); + } + const model = this.deploymentName || options.body['model'] || options.__metadata?.['model']; + if (model !== undefined && !this.baseURL.includes('/deployments')) { + options.path = `/deployments/${model}${options.path}`; + } + } + return super.buildRequest(options, props); + } + + async _getAzureADToken(): Promise { + if (typeof this._azureADTokenProvider === 'function') { + const token = await this._azureADTokenProvider(); + if (!token || typeof token !== 'string') { + throw new Errors.OpenAIError( + `Expected 'azureADTokenProvider' argument to return a string but it returned ${token}`, + ); + } + return token; + } + return undefined; + } + + protected override async authHeaders(opts: FinalRequestOptions): Promise { + return; + } + + protected override async prepareOptions(opts: FinalRequestOptions): Promise { + opts.headers = buildHeaders([opts.headers]); + + /** + * The user should provide a bearer token provider if they want + * to use Azure AD authentication. The user shouldn't set the + * Authorization header manually because the header is overwritten + * with the Azure AD token if a bearer token provider is provided. + */ + if (opts.headers.values.get('Authorization') || opts.headers.values.get('api-key')) { + return super.prepareOptions(opts); + } + + const token = await this._getAzureADToken(); + if (token) { + opts.headers.values.set('Authorization', `Bearer ${token}`); + } else if (this.apiKey !== API_KEY_SENTINEL) { + opts.headers.values.set('api-key', this.apiKey); + } else { + throw new Errors.OpenAIError('Unable to handle auth'); + } + return super.prepareOptions(opts); + } +} + +const _deployments_endpoints = new Set([ + '/completions', + '/chat/completions', + '/embeddings', + '/audio/transcriptions', + '/audio/translations', + '/audio/speech', + '/images/generations', + '/batches', + '/images/edits', +]); + +const API_KEY_SENTINEL = ''; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/client.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/client.ts new file mode 100644 index 0000000000000000000000000000000000000000..4056bb52034485e1ab22669e0c62e16c1a4b93ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/client.ts @@ -0,0 +1,1212 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import type { RequestInit, RequestInfo, BodyInit } from './internal/builtin-types'; +import type { HTTPMethod, PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from './internal/types'; +import { uuid4 } from './internal/utils/uuid'; +import { validatePositiveInteger, isAbsoluteURL, safeJSON } from './internal/utils/values'; +import { sleep } from './internal/utils/sleep'; +export type { Logger, LogLevel } from './internal/utils/log'; +import { castToError, isAbortError } from './internal/errors'; +import type { APIResponseProps } from './internal/parse'; +import { getPlatformHeaders } from './internal/detect-platform'; +import * as Shims from './internal/shims'; +import * as Opts from './internal/request-options'; +import * as qs from './internal/qs'; +import { VERSION } from './version'; +import * as Errors from './core/error'; +import * as Pagination from './core/pagination'; +import { + AbstractPage, + type ConversationCursorPageParams, + ConversationCursorPageResponse, + type CursorPageParams, + CursorPageResponse, + PageResponse, +} from './core/pagination'; +import * as Uploads from './core/uploads'; +import * as API from './resources/index'; +import { APIPromise } from './core/api-promise'; +import { + Batch, + BatchCreateParams, + BatchError, + BatchListParams, + BatchRequestCounts, + Batches, + BatchesPage, +} from './resources/batches'; +import { + Completion, + CompletionChoice, + CompletionCreateParams, + CompletionCreateParamsNonStreaming, + CompletionCreateParamsStreaming, + CompletionUsage, + Completions, +} from './resources/completions'; +import { + CreateEmbeddingResponse, + Embedding, + EmbeddingCreateParams, + EmbeddingModel, + Embeddings, +} from './resources/embeddings'; +import { + FileContent, + FileCreateParams, + FileDeleted, + FileListParams, + FileObject, + FileObjectsPage, + FilePurpose, + Files, +} from './resources/files'; +import { + Image, + ImageCreateVariationParams, + ImageEditCompletedEvent, + ImageEditParams, + ImageEditParamsNonStreaming, + ImageEditParamsStreaming, + ImageEditPartialImageEvent, + ImageEditStreamEvent, + ImageGenCompletedEvent, + ImageGenPartialImageEvent, + ImageGenStreamEvent, + ImageGenerateParams, + ImageGenerateParamsNonStreaming, + ImageGenerateParamsStreaming, + ImageModel, + Images, + ImagesResponse, +} from './resources/images'; +import { Model, ModelDeleted, Models, ModelsPage } from './resources/models'; +import { + Moderation, + ModerationCreateParams, + ModerationCreateResponse, + ModerationImageURLInput, + ModerationModel, + ModerationMultiModalInput, + ModerationTextInput, + Moderations, +} from './resources/moderations'; +import { Webhooks } from './resources/webhooks'; +import { Audio, AudioModel, AudioResponseFormat } from './resources/audio/audio'; +import { Beta } from './resources/beta/beta'; +import { Chat } from './resources/chat/chat'; +import { + ContainerCreateParams, + ContainerCreateResponse, + ContainerListParams, + ContainerListResponse, + ContainerListResponsesPage, + ContainerRetrieveResponse, + Containers, +} from './resources/containers/containers'; +import { Conversations } from './resources/conversations/conversations'; +import { + EvalCreateParams, + EvalCreateResponse, + EvalCustomDataSourceConfig, + EvalDeleteResponse, + EvalListParams, + EvalListResponse, + EvalListResponsesPage, + EvalRetrieveResponse, + EvalStoredCompletionsDataSourceConfig, + EvalUpdateParams, + EvalUpdateResponse, + Evals, +} from './resources/evals/evals'; +import { FineTuning } from './resources/fine-tuning/fine-tuning'; +import { Graders } from './resources/graders/graders'; +import { Responses } from './resources/responses/responses'; +import { + Upload, + UploadCompleteParams, + UploadCreateParams, + Uploads as UploadsAPIUploads, +} from './resources/uploads/uploads'; +import { + AutoFileChunkingStrategyParam, + FileChunkingStrategy, + FileChunkingStrategyParam, + OtherFileChunkingStrategyObject, + StaticFileChunkingStrategy, + StaticFileChunkingStrategyObject, + StaticFileChunkingStrategyObjectParam, + VectorStore, + VectorStoreCreateParams, + VectorStoreDeleted, + VectorStoreListParams, + VectorStoreSearchParams, + VectorStoreSearchResponse, + VectorStoreSearchResponsesPage, + VectorStoreUpdateParams, + VectorStores, + VectorStoresPage, +} from './resources/vector-stores/vector-stores'; +import { + ChatCompletion, + ChatCompletionAllowedToolChoice, + ChatCompletionAllowedTools, + ChatCompletionAssistantMessageParam, + ChatCompletionAudio, + ChatCompletionAudioParam, + ChatCompletionChunk, + ChatCompletionContentPart, + ChatCompletionContentPartImage, + ChatCompletionContentPartInputAudio, + ChatCompletionContentPartRefusal, + ChatCompletionContentPartText, + ChatCompletionCreateParams, + ChatCompletionCreateParamsNonStreaming, + ChatCompletionCreateParamsStreaming, + ChatCompletionCustomTool, + ChatCompletionDeleted, + ChatCompletionDeveloperMessageParam, + ChatCompletionFunctionCallOption, + ChatCompletionFunctionMessageParam, + ChatCompletionFunctionTool, + ChatCompletionListParams, + ChatCompletionMessage, + ChatCompletionMessageCustomToolCall, + ChatCompletionMessageFunctionToolCall, + ChatCompletionMessageParam, + ChatCompletionMessageToolCall, + ChatCompletionModality, + ChatCompletionNamedToolChoice, + ChatCompletionNamedToolChoiceCustom, + ChatCompletionPredictionContent, + ChatCompletionReasoningEffort, + ChatCompletionRole, + ChatCompletionStoreMessage, + ChatCompletionStreamOptions, + ChatCompletionSystemMessageParam, + ChatCompletionTokenLogprob, + ChatCompletionTool, + ChatCompletionToolChoiceOption, + ChatCompletionToolMessageParam, + ChatCompletionUpdateParams, + ChatCompletionUserMessageParam, + ChatCompletionsPage, +} from './resources/chat/completions/completions'; +import { type Fetch } from './internal/builtin-types'; +import { isRunningInBrowser } from './internal/detect-platform'; +import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; +import { FinalRequestOptions, RequestOptions } from './internal/request-options'; +import { readEnv } from './internal/utils/env'; +import { + type LogLevel, + type Logger, + formatRequestDetails, + loggerFor, + parseLogLevel, +} from './internal/utils/log'; +import { isEmptyObj } from './internal/utils/values'; + +export interface ClientOptions { + /** + * Defaults to process.env['OPENAI_API_KEY']. + */ + apiKey?: string | undefined; + + /** + * Defaults to process.env['OPENAI_ORG_ID']. + */ + organization?: string | null | undefined; + + /** + * Defaults to process.env['OPENAI_PROJECT_ID']. + */ + project?: string | null | undefined; + + /** + * Defaults to process.env['OPENAI_WEBHOOK_SECRET']. + */ + webhookSecret?: string | null | undefined; + + /** + * Override the default base URL for the API, e.g., "https://api.example.com/v2/" + * + * Defaults to process.env['OPENAI_BASE_URL']. + */ + baseURL?: string | null | undefined; + + /** + * The maximum amount of time (in milliseconds) that the client should wait for a response + * from the server before timing out a single request. + * + * Note that request timeouts are retried by default, so in a worst-case scenario you may wait + * much longer than this timeout before the promise succeeds or fails. + * + * @unit milliseconds + */ + timeout?: number | undefined; + /** + * Additional `RequestInit` options to be passed to `fetch` calls. + * Properties will be overridden by per-request `fetchOptions`. + */ + fetchOptions?: MergedRequestInit | undefined; + + /** + * Specify a custom `fetch` function implementation. + * + * If not provided, we expect that `fetch` is defined globally. + */ + fetch?: Fetch | undefined; + + /** + * The maximum number of times that the client will retry a request in case of a + * temporary failure, like a network error or a 5XX error from the server. + * + * @default 2 + */ + maxRetries?: number | undefined; + + /** + * Default headers to include with every request to the API. + * + * These can be removed in individual requests by explicitly setting the + * header to `null` in request options. + */ + defaultHeaders?: HeadersLike | undefined; + + /** + * Default query parameters to include with every request to the API. + * + * These can be removed in individual requests by explicitly setting the + * param to `undefined` in request options. + */ + defaultQuery?: Record | undefined; + + /** + * By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + * Only set this option to `true` if you understand the risks and have appropriate mitigations in place. + */ + dangerouslyAllowBrowser?: boolean | undefined; + + /** + * Set the log level. + * + * Defaults to process.env['OPENAI_LOG'] or 'warn' if it isn't set. + */ + logLevel?: LogLevel | undefined; + + /** + * Set the logger. + * + * Defaults to globalThis.console. + */ + logger?: Logger | undefined; +} + +/** + * API Client for interfacing with the OpenAI API. + */ +export class OpenAI { + apiKey: string; + organization: string | null; + project: string | null; + webhookSecret: string | null; + + baseURL: string; + maxRetries: number; + timeout: number; + logger: Logger | undefined; + logLevel: LogLevel | undefined; + fetchOptions: MergedRequestInit | undefined; + + private fetch: Fetch; + #encoder: Opts.RequestEncoder; + protected idempotencyHeader?: string; + private _options: ClientOptions; + + /** + * API Client for interfacing with the OpenAI API. + * + * @param {string | undefined} [opts.apiKey=process.env['OPENAI_API_KEY'] ?? undefined] + * @param {string | null | undefined} [opts.organization=process.env['OPENAI_ORG_ID'] ?? null] + * @param {string | null | undefined} [opts.project=process.env['OPENAI_PROJECT_ID'] ?? null] + * @param {string | null | undefined} [opts.webhookSecret=process.env['OPENAI_WEBHOOK_SECRET'] ?? null] + * @param {string} [opts.baseURL=process.env['OPENAI_BASE_URL'] ?? https://api.openai.com/v1] - Override the default base URL for the API. + * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. + * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls. + * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. + * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. + * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API. + * @param {Record} opts.defaultQuery - Default query parameters to include with every request to the API. + * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + */ + constructor({ + baseURL = readEnv('OPENAI_BASE_URL'), + apiKey = readEnv('OPENAI_API_KEY'), + organization = readEnv('OPENAI_ORG_ID') ?? null, + project = readEnv('OPENAI_PROJECT_ID') ?? null, + webhookSecret = readEnv('OPENAI_WEBHOOK_SECRET') ?? null, + ...opts + }: ClientOptions = {}) { + if (apiKey === undefined) { + throw new Errors.OpenAIError( + "The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).", + ); + } + + const options: ClientOptions = { + apiKey, + organization, + project, + webhookSecret, + ...opts, + baseURL: baseURL || `https://api.openai.com/v1`, + }; + + if (!options.dangerouslyAllowBrowser && isRunningInBrowser()) { + throw new Errors.OpenAIError( + "It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew OpenAI({ apiKey, dangerouslyAllowBrowser: true });\n\nhttps://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\n", + ); + } + + this.baseURL = options.baseURL!; + this.timeout = options.timeout ?? OpenAI.DEFAULT_TIMEOUT /* 10 minutes */; + this.logger = options.logger ?? console; + const defaultLogLevel = 'warn'; + // Set default logLevel early so that we can log a warning in parseLogLevel. + this.logLevel = defaultLogLevel; + this.logLevel = + parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? + parseLogLevel(readEnv('OPENAI_LOG'), "process.env['OPENAI_LOG']", this) ?? + defaultLogLevel; + this.fetchOptions = options.fetchOptions; + this.maxRetries = options.maxRetries ?? 2; + this.fetch = options.fetch ?? Shims.getDefaultFetch(); + this.#encoder = Opts.FallbackEncoder; + + this._options = options; + + this.apiKey = apiKey; + this.organization = organization; + this.project = project; + this.webhookSecret = webhookSecret; + } + + /** + * Create a new client instance re-using the same options given to the current client with optional overriding. + */ + withOptions(options: Partial): this { + const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({ + ...this._options, + baseURL: this.baseURL, + maxRetries: this.maxRetries, + timeout: this.timeout, + logger: this.logger, + logLevel: this.logLevel, + fetch: this.fetch, + fetchOptions: this.fetchOptions, + apiKey: this.apiKey, + organization: this.organization, + project: this.project, + webhookSecret: this.webhookSecret, + ...options, + }); + return client; + } + + /** + * Check whether the base URL is set to its default. + */ + #baseURLOverridden(): boolean { + return this.baseURL !== 'https://api.openai.com/v1'; + } + + protected defaultQuery(): Record | undefined { + return this._options.defaultQuery; + } + + protected validateHeaders({ values, nulls }: NullableHeaders) { + return; + } + + protected async authHeaders(opts: FinalRequestOptions): Promise { + return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]); + } + + protected stringifyQuery(query: Record): string { + return qs.stringify(query, { arrayFormat: 'brackets' }); + } + + private getUserAgent(): string { + return `${this.constructor.name}/JS ${VERSION}`; + } + + protected defaultIdempotencyKey(): string { + return `stainless-node-retry-${uuid4()}`; + } + + protected makeStatusError( + status: number, + error: Object, + message: string | undefined, + headers: Headers, + ): Errors.APIError { + return Errors.APIError.generate(status, error, message, headers); + } + + buildURL( + path: string, + query: Record | null | undefined, + defaultBaseURL?: string | undefined, + ): string { + const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; + const url = + isAbsoluteURL(path) ? + new URL(path) + : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); + + const defaultQuery = this.defaultQuery(); + if (!isEmptyObj(defaultQuery)) { + query = { ...defaultQuery, ...query }; + } + + if (typeof query === 'object' && query && !Array.isArray(query)) { + url.search = this.stringifyQuery(query as Record); + } + + return url.toString(); + } + + /** + * Used as a callback for mutating the given `FinalRequestOptions` object. + */ + protected async prepareOptions(options: FinalRequestOptions): Promise {} + + /** + * Used as a callback for mutating the given `RequestInit` object. + * + * This is useful for cases where you want to add certain headers based off of + * the request properties, e.g. `method` or `url`. + */ + protected async prepareRequest( + request: RequestInit, + { url, options }: { url: string; options: FinalRequestOptions }, + ): Promise {} + + get(path: string, opts?: PromiseOrValue): APIPromise { + return this.methodRequest('get', path, opts); + } + + post(path: string, opts?: PromiseOrValue): APIPromise { + return this.methodRequest('post', path, opts); + } + + patch(path: string, opts?: PromiseOrValue): APIPromise { + return this.methodRequest('patch', path, opts); + } + + put(path: string, opts?: PromiseOrValue): APIPromise { + return this.methodRequest('put', path, opts); + } + + delete(path: string, opts?: PromiseOrValue): APIPromise { + return this.methodRequest('delete', path, opts); + } + + private methodRequest( + method: HTTPMethod, + path: string, + opts?: PromiseOrValue, + ): APIPromise { + return this.request( + Promise.resolve(opts).then((opts) => { + return { method, path, ...opts }; + }), + ); + } + + request( + options: PromiseOrValue, + remainingRetries: number | null = null, + ): APIPromise { + return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined)); + } + + private async makeRequest( + optionsInput: PromiseOrValue, + retriesRemaining: number | null, + retryOfRequestLogID: string | undefined, + ): Promise { + const options = await optionsInput; + const maxRetries = options.maxRetries ?? this.maxRetries; + if (retriesRemaining == null) { + retriesRemaining = maxRetries; + } + + await this.prepareOptions(options); + + const { req, url, timeout } = await this.buildRequest(options, { + retryCount: maxRetries - retriesRemaining, + }); + + await this.prepareRequest(req, { url, options }); + + /** Not an API request ID, just for correlating local log entries. */ + const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0'); + const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; + const startTime = Date.now(); + + loggerFor(this).debug( + `[${requestLogID}] sending request`, + formatRequestDetails({ + retryOfRequestLogID, + method: options.method, + url, + options, + headers: req.headers, + }), + ); + + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + + const controller = new AbortController(); + const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError); + const headersTime = Date.now(); + + if (response instanceof Error) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + // detect native connection timeout errors + // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" + // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" + // others do not provide enough information to distinguish timeouts from other connection errors + const isTimeout = + isAbortError(response) || + /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + if (retriesRemaining) { + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); + } + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); + if (isTimeout) { + throw new Errors.APIConnectionTimeoutError(); + } + throw new Errors.APIConnectionError({ cause: response }); + } + + const specialHeaders = [...response.headers.entries()] + .filter(([name]) => name === 'x-request-id') + .map(([name, value]) => ', ' + name + ': ' + JSON.stringify(value)) + .join(''); + const responseInfo = `[${requestLogID}${retryLogStr}${specialHeaders}] ${req.method} ${url} ${ + response.ok ? 'succeeded' : 'failed' + } with status ${response.status} in ${headersTime - startTime}ms`; + + if (!response.ok) { + const shouldRetry = await this.shouldRetry(response); + if (retriesRemaining && shouldRetry) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + + // We don't need the body of this response. + await Shims.CancelReadableStream(response.body); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); + return this.retryRequest( + options, + retriesRemaining, + retryOfRequestLogID ?? requestLogID, + response.headers, + ); + } + + const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; + + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + + const errText = await response.text().catch((err: any) => castToError(err).message); + const errJSON = safeJSON(errText); + const errMessage = errJSON ? undefined : errText; + + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + message: errMessage, + durationMs: Date.now() - startTime, + }), + ); + + const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); + throw err; + } + + loggerFor(this).info(responseInfo); + loggerFor(this).debug( + `[${requestLogID}] response start`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); + + return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; + } + + getAPIList = Pagination.AbstractPage>( + path: string, + Page: new (...args: any[]) => PageClass, + opts?: RequestOptions, + ): Pagination.PagePromise { + return this.requestAPIList(Page, { method: 'get', path, ...opts }); + } + + requestAPIList< + Item = unknown, + PageClass extends Pagination.AbstractPage = Pagination.AbstractPage, + >( + Page: new (...args: ConstructorParameters) => PageClass, + options: FinalRequestOptions, + ): Pagination.PagePromise { + const request = this.makeRequest(options, null, undefined); + return new Pagination.PagePromise(this as any as OpenAI, request, Page); + } + + async fetchWithTimeout( + url: RequestInfo, + init: RequestInit | undefined, + ms: number, + controller: AbortController, + ): Promise { + const { signal, method, ...options } = init || {}; + if (signal) signal.addEventListener('abort', () => controller.abort()); + + const timeout = setTimeout(() => controller.abort(), ms); + + const isReadableBody = + ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || + (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + + const fetchOptions: RequestInit = { + signal: controller.signal as any, + ...(isReadableBody ? { duplex: 'half' } : {}), + method: 'GET', + ...options, + }; + if (method) { + // Custom methods like 'patch' need to be uppercased + // See https://github.com/nodejs/undici/issues/2294 + fetchOptions.method = method.toUpperCase(); + } + + try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare + return await this.fetch.call(undefined, url, fetchOptions); + } finally { + clearTimeout(timeout); + } + } + + private async shouldRetry(response: Response): Promise { + // Note this is not a standard header. + const shouldRetryHeader = response.headers.get('x-should-retry'); + + // If the server explicitly says whether or not to retry, obey. + if (shouldRetryHeader === 'true') return true; + if (shouldRetryHeader === 'false') return false; + + // Retry on request timeouts. + if (response.status === 408) return true; + + // Retry on lock timeouts. + if (response.status === 409) return true; + + // Retry on rate limits. + if (response.status === 429) return true; + + // Retry internal errors. + if (response.status >= 500) return true; + + return false; + } + + private async retryRequest( + options: FinalRequestOptions, + retriesRemaining: number, + requestLogID: string, + responseHeaders?: Headers | undefined, + ): Promise { + let timeoutMillis: number | undefined; + + // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it. + const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms'); + if (retryAfterMillisHeader) { + const timeoutMs = parseFloat(retryAfterMillisHeader); + if (!Number.isNaN(timeoutMs)) { + timeoutMillis = timeoutMs; + } + } + + // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + const retryAfterHeader = responseHeaders?.get('retry-after'); + if (retryAfterHeader && !timeoutMillis) { + const timeoutSeconds = parseFloat(retryAfterHeader); + if (!Number.isNaN(timeoutSeconds)) { + timeoutMillis = timeoutSeconds * 1000; + } else { + timeoutMillis = Date.parse(retryAfterHeader) - Date.now(); + } + } + + // If the API asks us to wait a certain amount of time (and it's a reasonable amount), + // just do what it says, but otherwise calculate a default + if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { + const maxRetries = options.maxRetries ?? this.maxRetries; + timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); + } + await sleep(timeoutMillis); + + return this.makeRequest(options, retriesRemaining - 1, requestLogID); + } + + private calculateDefaultRetryTimeoutMillis(retriesRemaining: number, maxRetries: number): number { + const initialRetryDelay = 0.5; + const maxRetryDelay = 8.0; + + const numRetries = maxRetries - retriesRemaining; + + // Apply exponential backoff, but not more than the max. + const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay); + + // Apply some jitter, take up to at most 25 percent of the retry time. + const jitter = 1 - Math.random() * 0.25; + + return sleepSeconds * jitter * 1000; + } + + async buildRequest( + inputOptions: FinalRequestOptions, + { retryCount = 0 }: { retryCount?: number } = {}, + ): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> { + const options = { ...inputOptions }; + const { method, path, query, defaultBaseURL } = options; + + const url = this.buildURL(path!, query as Record, defaultBaseURL); + if ('timeout' in options) validatePositiveInteger('timeout', options.timeout); + options.timeout = options.timeout ?? this.timeout; + const { bodyHeaders, body } = this.buildBody({ options }); + const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount }); + + const req: FinalizedRequestInit = { + method, + headers: reqHeaders, + ...(options.signal && { signal: options.signal }), + ...((globalThis as any).ReadableStream && + body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), + ...(body && { body }), + ...((this.fetchOptions as any) ?? {}), + ...((options.fetchOptions as any) ?? {}), + }; + + return { req, url, timeout: options.timeout }; + } + + private async buildHeaders({ + options, + method, + bodyHeaders, + retryCount, + }: { + options: FinalRequestOptions; + method: HTTPMethod; + bodyHeaders: HeadersLike; + retryCount: number; + }): Promise { + let idempotencyHeaders: HeadersLike = {}; + if (this.idempotencyHeader && method !== 'get') { + if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey(); + idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey; + } + + const headers = buildHeaders([ + idempotencyHeaders, + { + Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders(), + 'OpenAI-Organization': this.organization, + 'OpenAI-Project': this.project, + }, + await this.authHeaders(options), + this._options.defaultHeaders, + bodyHeaders, + options.headers, + ]); + + this.validateHeaders(headers); + + return headers.values; + } + + private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { + bodyHeaders: HeadersLike; + body: BodyInit | undefined; + } { + if (!body) { + return { bodyHeaders: undefined, body: undefined }; + } + const headers = buildHeaders([rawHeaders]); + if ( + // Pass raw type verbatim + ArrayBuffer.isView(body) || + body instanceof ArrayBuffer || + body instanceof DataView || + (typeof body === 'string' && + // Preserve legacy string encoding behavior for now + headers.values.has('content-type')) || + // `Blob` is superset of `File` + body instanceof Blob || + // `FormData` -> `multipart/form-data` + body instanceof FormData || + // `URLSearchParams` -> `application/x-www-form-urlencoded` + body instanceof URLSearchParams || + // Send chunked stream (each chunk has own `length`) + ((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream) + ) { + return { bodyHeaders: undefined, body: body as BodyInit }; + } else if ( + typeof body === 'object' && + (Symbol.asyncIterator in body || + (Symbol.iterator in body && 'next' in body && typeof body.next === 'function')) + ) { + return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable) }; + } else { + return this.#encoder({ body, headers }); + } + } + + static OpenAI = this; + static DEFAULT_TIMEOUT = 600000; // 10 minutes + + static OpenAIError = Errors.OpenAIError; + static APIError = Errors.APIError; + static APIConnectionError = Errors.APIConnectionError; + static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError; + static APIUserAbortError = Errors.APIUserAbortError; + static NotFoundError = Errors.NotFoundError; + static ConflictError = Errors.ConflictError; + static RateLimitError = Errors.RateLimitError; + static BadRequestError = Errors.BadRequestError; + static AuthenticationError = Errors.AuthenticationError; + static InternalServerError = Errors.InternalServerError; + static PermissionDeniedError = Errors.PermissionDeniedError; + static UnprocessableEntityError = Errors.UnprocessableEntityError; + static InvalidWebhookSignatureError = Errors.InvalidWebhookSignatureError; + + static toFile = Uploads.toFile; + + completions: API.Completions = new API.Completions(this); + chat: API.Chat = new API.Chat(this); + embeddings: API.Embeddings = new API.Embeddings(this); + files: API.Files = new API.Files(this); + images: API.Images = new API.Images(this); + audio: API.Audio = new API.Audio(this); + moderations: API.Moderations = new API.Moderations(this); + models: API.Models = new API.Models(this); + fineTuning: API.FineTuning = new API.FineTuning(this); + graders: API.Graders = new API.Graders(this); + vectorStores: API.VectorStores = new API.VectorStores(this); + webhooks: API.Webhooks = new API.Webhooks(this); + beta: API.Beta = new API.Beta(this); + batches: API.Batches = new API.Batches(this); + uploads: API.Uploads = new API.Uploads(this); + responses: API.Responses = new API.Responses(this); + conversations: API.Conversations = new API.Conversations(this); + evals: API.Evals = new API.Evals(this); + containers: API.Containers = new API.Containers(this); +} + +OpenAI.Completions = Completions; +OpenAI.Chat = Chat; +OpenAI.Embeddings = Embeddings; +OpenAI.Files = Files; +OpenAI.Images = Images; +OpenAI.Audio = Audio; +OpenAI.Moderations = Moderations; +OpenAI.Models = Models; +OpenAI.FineTuning = FineTuning; +OpenAI.Graders = Graders; +OpenAI.VectorStores = VectorStores; +OpenAI.Webhooks = Webhooks; +OpenAI.Beta = Beta; +OpenAI.Batches = Batches; +OpenAI.Uploads = UploadsAPIUploads; +OpenAI.Responses = Responses; +OpenAI.Conversations = Conversations; +OpenAI.Evals = Evals; +OpenAI.Containers = Containers; + +export declare namespace OpenAI { + export type RequestOptions = Opts.RequestOptions; + + export import Page = Pagination.Page; + export { type PageResponse as PageResponse }; + + export import CursorPage = Pagination.CursorPage; + export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse }; + + export import ConversationCursorPage = Pagination.ConversationCursorPage; + export { + type ConversationCursorPageParams as ConversationCursorPageParams, + type ConversationCursorPageResponse as ConversationCursorPageResponse, + }; + + export { + Completions as Completions, + type Completion as Completion, + type CompletionChoice as CompletionChoice, + type CompletionUsage as CompletionUsage, + type CompletionCreateParams as CompletionCreateParams, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; + + export { + Chat as Chat, + type ChatCompletion as ChatCompletion, + type ChatCompletionAllowedToolChoice as ChatCompletionAllowedToolChoice, + type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, + type ChatCompletionAudio as ChatCompletionAudio, + type ChatCompletionAudioParam as ChatCompletionAudioParam, + type ChatCompletionChunk as ChatCompletionChunk, + type ChatCompletionContentPart as ChatCompletionContentPart, + type ChatCompletionContentPartImage as ChatCompletionContentPartImage, + type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, + type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, + type ChatCompletionContentPartText as ChatCompletionContentPartText, + type ChatCompletionCustomTool as ChatCompletionCustomTool, + type ChatCompletionDeleted as ChatCompletionDeleted, + type ChatCompletionDeveloperMessageParam as ChatCompletionDeveloperMessageParam, + type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, + type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, + type ChatCompletionFunctionTool as ChatCompletionFunctionTool, + type ChatCompletionMessage as ChatCompletionMessage, + type ChatCompletionMessageCustomToolCall as ChatCompletionMessageCustomToolCall, + type ChatCompletionMessageFunctionToolCall as ChatCompletionMessageFunctionToolCall, + type ChatCompletionMessageParam as ChatCompletionMessageParam, + type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, + type ChatCompletionModality as ChatCompletionModality, + type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, + type ChatCompletionNamedToolChoiceCustom as ChatCompletionNamedToolChoiceCustom, + type ChatCompletionPredictionContent as ChatCompletionPredictionContent, + type ChatCompletionRole as ChatCompletionRole, + type ChatCompletionStoreMessage as ChatCompletionStoreMessage, + type ChatCompletionStreamOptions as ChatCompletionStreamOptions, + type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, + type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, + type ChatCompletionTool as ChatCompletionTool, + type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, + type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, + type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, + type ChatCompletionAllowedTools as ChatCompletionAllowedTools, + type ChatCompletionReasoningEffort as ChatCompletionReasoningEffort, + type ChatCompletionsPage as ChatCompletionsPage, + type ChatCompletionCreateParams as ChatCompletionCreateParams, + type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, + type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, + type ChatCompletionUpdateParams as ChatCompletionUpdateParams, + type ChatCompletionListParams as ChatCompletionListParams, + }; + + export { + Embeddings as Embeddings, + type CreateEmbeddingResponse as CreateEmbeddingResponse, + type Embedding as Embedding, + type EmbeddingModel as EmbeddingModel, + type EmbeddingCreateParams as EmbeddingCreateParams, + }; + + export { + Files as Files, + type FileContent as FileContent, + type FileDeleted as FileDeleted, + type FileObject as FileObject, + type FilePurpose as FilePurpose, + type FileObjectsPage as FileObjectsPage, + type FileCreateParams as FileCreateParams, + type FileListParams as FileListParams, + }; + + export { + Images as Images, + type Image as Image, + type ImageEditCompletedEvent as ImageEditCompletedEvent, + type ImageEditPartialImageEvent as ImageEditPartialImageEvent, + type ImageEditStreamEvent as ImageEditStreamEvent, + type ImageGenCompletedEvent as ImageGenCompletedEvent, + type ImageGenPartialImageEvent as ImageGenPartialImageEvent, + type ImageGenStreamEvent as ImageGenStreamEvent, + type ImageModel as ImageModel, + type ImagesResponse as ImagesResponse, + type ImageCreateVariationParams as ImageCreateVariationParams, + type ImageEditParams as ImageEditParams, + type ImageEditParamsNonStreaming as ImageEditParamsNonStreaming, + type ImageEditParamsStreaming as ImageEditParamsStreaming, + type ImageGenerateParams as ImageGenerateParams, + type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, + type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, + }; + + export { Audio as Audio, type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat }; + + export { + Moderations as Moderations, + type Moderation as Moderation, + type ModerationImageURLInput as ModerationImageURLInput, + type ModerationModel as ModerationModel, + type ModerationMultiModalInput as ModerationMultiModalInput, + type ModerationTextInput as ModerationTextInput, + type ModerationCreateResponse as ModerationCreateResponse, + type ModerationCreateParams as ModerationCreateParams, + }; + + export { + Models as Models, + type Model as Model, + type ModelDeleted as ModelDeleted, + type ModelsPage as ModelsPage, + }; + + export { FineTuning as FineTuning }; + + export { Graders as Graders }; + + export { + VectorStores as VectorStores, + type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, + type FileChunkingStrategy as FileChunkingStrategy, + type FileChunkingStrategyParam as FileChunkingStrategyParam, + type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, + type StaticFileChunkingStrategy as StaticFileChunkingStrategy, + type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, + type StaticFileChunkingStrategyObjectParam as StaticFileChunkingStrategyObjectParam, + type VectorStore as VectorStore, + type VectorStoreDeleted as VectorStoreDeleted, + type VectorStoreSearchResponse as VectorStoreSearchResponse, + type VectorStoresPage as VectorStoresPage, + type VectorStoreSearchResponsesPage as VectorStoreSearchResponsesPage, + type VectorStoreCreateParams as VectorStoreCreateParams, + type VectorStoreUpdateParams as VectorStoreUpdateParams, + type VectorStoreListParams as VectorStoreListParams, + type VectorStoreSearchParams as VectorStoreSearchParams, + }; + + export { Webhooks as Webhooks }; + + export { Beta as Beta }; + + export { + Batches as Batches, + type Batch as Batch, + type BatchError as BatchError, + type BatchRequestCounts as BatchRequestCounts, + type BatchesPage as BatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchListParams as BatchListParams, + }; + + export { + UploadsAPIUploads as Uploads, + type Upload as Upload, + type UploadCreateParams as UploadCreateParams, + type UploadCompleteParams as UploadCompleteParams, + }; + + export { Responses as Responses }; + + export { Conversations as Conversations }; + + export { + Evals as Evals, + type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, + type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, + type EvalCreateResponse as EvalCreateResponse, + type EvalRetrieveResponse as EvalRetrieveResponse, + type EvalUpdateResponse as EvalUpdateResponse, + type EvalListResponse as EvalListResponse, + type EvalDeleteResponse as EvalDeleteResponse, + type EvalListResponsesPage as EvalListResponsesPage, + type EvalCreateParams as EvalCreateParams, + type EvalUpdateParams as EvalUpdateParams, + type EvalListParams as EvalListParams, + }; + + export { + Containers as Containers, + type ContainerCreateResponse as ContainerCreateResponse, + type ContainerRetrieveResponse as ContainerRetrieveResponse, + type ContainerListResponse as ContainerListResponse, + type ContainerListResponsesPage as ContainerListResponsesPage, + type ContainerCreateParams as ContainerCreateParams, + type ContainerListParams as ContainerListParams, + }; + + export type AllModels = API.AllModels; + export type ChatModel = API.ChatModel; + export type ComparisonFilter = API.ComparisonFilter; + export type CompoundFilter = API.CompoundFilter; + export type CustomToolInputFormat = API.CustomToolInputFormat; + export type ErrorObject = API.ErrorObject; + export type FunctionDefinition = API.FunctionDefinition; + export type FunctionParameters = API.FunctionParameters; + export type Metadata = API.Metadata; + export type Reasoning = API.Reasoning; + export type ReasoningEffort = API.ReasoningEffort; + export type ResponseFormatJSONObject = API.ResponseFormatJSONObject; + export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema; + export type ResponseFormatText = API.ResponseFormatText; + export type ResponseFormatTextGrammar = API.ResponseFormatTextGrammar; + export type ResponseFormatTextPython = API.ResponseFormatTextPython; + export type ResponsesModel = API.ResponsesModel; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/error.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/error.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc55f46c03ebe50da5ed012f61fe1a78478dbfc5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/error.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/error instead */ +export * from './core/error'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..7ae9b1b4e838345b4b5f9c72ee7a9ff5c7e9a27e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/index.ts @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { OpenAI as default } from './client'; + +export { type Uploadable, toFile } from './core/uploads'; +export { APIPromise } from './core/api-promise'; +export { OpenAI, type ClientOptions } from './client'; +export { PagePromise } from './core/pagination'; +export { + OpenAIError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, + InvalidWebhookSignatureError, +} from './core/error'; + +export { AzureOpenAI } from './azure'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/pagination.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/pagination.ts new file mode 100644 index 0000000000000000000000000000000000000000..90bf015e124ad08b8f3a5fa818f0ab115d8e72f6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/pagination.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/pagination instead */ +export * from './core/pagination'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resource.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resource.ts new file mode 100644 index 0000000000000000000000000000000000000000..363e3516b1499158e04fab6c25c747f9c01f3a99 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resource.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/resource instead */ +export * from './core/resource'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resources.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resources.ts new file mode 100644 index 0000000000000000000000000000000000000000..b283d5781de54a4df740f51ff11277e0787cb714 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/resources.ts @@ -0,0 +1 @@ +export * from './resources/index'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/streaming.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/streaming.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e6da1063287d75edc54a69e4f6d03b5cd631667 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/streaming.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/streaming instead */ +export * from './core/streaming'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/tsconfig.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..c550e2996bc6f4af070fef8250f2a4ee8cdb5255 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/tsconfig.json @@ -0,0 +1,11 @@ +{ + // this config is included in the published src directory to prevent TS errors + // from appearing when users go to source, and VSCode opens the source .ts file + // via declaration maps + "include": ["index.ts"], + "compilerOptions": { + "target": "ES2015", + "lib": ["DOM", "DOM.Iterable", "ES2018"], + "moduleResolution": "node" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/uploads.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/uploads.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2ef64710fb618f1115aaee5650edd3aaa82ec45 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/uploads.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/uploads instead */ +export * from './core/uploads'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/version.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/version.ts new file mode 100644 index 0000000000000000000000000000000000000000..4bb6c39fa05a26aa39e8a424c28b30591ae61ae2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/openai/src/version.ts @@ -0,0 +1 @@ +export const VERSION = '5.15.0'; // x-release-please-version