diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2a99ebe363281bb736ac01b53ec5d24c335fd18b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts @@ -0,0 +1,3 @@ +declare const partialParse: (input: string) => unknown; +export { partialParse }; +//# 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/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..dfd15fc506c6066f0ffcad15832edc7ecac05fee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_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":"AAKA,QAAA,MAgQE,YAAY,GAAI,OAAO,MAAM,KAAG,OAAgE,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc450af6b68155d2b0f9381385771f3e4a586bd5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts @@ -0,0 +1,3 @@ +declare const partialParse: (input: string) => unknown; +export { partialParse }; +//# 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/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..95879fec05fe3da9bee6d937fe74973e0bd4f9ad --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_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":"AAKA,QAAA,MAgQE,YAAY,GAAI,OAAO,MAAM,KAAG,OAAgE,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js new file mode 100644 index 0000000000000000000000000000000000000000..b7b4ec3df135c0aaeaa460c1f84de5e415eaf2f5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js @@ -0,0 +1,226 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.partialParse = void 0; +const tokenize = (input) => { + let current = 0; + let tokens = []; + while (current < input.length) { + let char = input[current]; + if (char === '\\') { + current++; + continue; + } + if (char === '{') { + tokens.push({ + type: 'brace', + value: '{', + }); + current++; + continue; + } + if (char === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + current++; + continue; + } + if (char === '[') { + tokens.push({ + type: 'paren', + value: '[', + }); + current++; + continue; + } + if (char === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + current++; + continue; + } + if (char === ':') { + tokens.push({ + type: 'separator', + value: ':', + }); + current++; + continue; + } + if (char === ',') { + tokens.push({ + type: 'delimiter', + value: ',', + }); + current++; + continue; + } + if (char === '"') { + let value = ''; + let danglingQuote = false; + char = input[++current]; + while (char !== '"') { + if (current === input.length) { + danglingQuote = true; + break; + } + if (char === '\\') { + current++; + if (current === input.length) { + danglingQuote = true; + break; + } + value += char + input[current]; + char = input[++current]; + } + else { + value += char; + char = input[++current]; + } + } + char = input[++current]; + if (!danglingQuote) { + tokens.push({ + type: 'string', + value, + }); + } + continue; + } + let WHITESPACE = /\s/; + if (char && WHITESPACE.test(char)) { + current++; + continue; + } + let NUMBERS = /[0-9]/; + if ((char && NUMBERS.test(char)) || char === '-' || char === '.') { + let value = ''; + if (char === '-') { + value += char; + char = input[++current]; + } + while ((char && NUMBERS.test(char)) || char === '.') { + value += char; + char = input[++current]; + } + tokens.push({ + type: 'number', + value, + }); + continue; + } + let LETTERS = /[a-z]/i; + if (char && LETTERS.test(char)) { + let value = ''; + while (char && LETTERS.test(char)) { + if (current === input.length) { + break; + } + value += char; + char = input[++current]; + } + if (value == 'true' || value == 'false' || value === 'null') { + tokens.push({ + type: 'name', + value, + }); + } + else { + // unknown token, e.g. `nul` which isn't quite `null` + current++; + continue; + } + continue; + } + current++; + } + return tokens; +}, strip = (tokens) => { + if (tokens.length === 0) { + return tokens; + } + let lastToken = tokens[tokens.length - 1]; + switch (lastToken.type) { + case 'separator': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + case 'number': + let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1]; + if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + case 'string': + let tokenBeforeTheLastToken = tokens[tokens.length - 2]; + if (tokenBeforeTheLastToken?.type === 'delimiter') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + break; + case 'delimiter': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + } + return tokens; +}, unstrip = (tokens) => { + let tail = []; + tokens.map((token) => { + if (token.type === 'brace') { + if (token.value === '{') { + tail.push('}'); + } + else { + tail.splice(tail.lastIndexOf('}'), 1); + } + } + if (token.type === 'paren') { + if (token.value === '[') { + tail.push(']'); + } + else { + tail.splice(tail.lastIndexOf(']'), 1); + } + } + }); + if (tail.length > 0) { + tail.reverse().map((item) => { + if (item === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + } + else if (item === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + } + }); + } + return tokens; +}, generate = (tokens) => { + let output = ''; + tokens.map((token) => { + switch (token.type) { + case 'string': + output += '"' + token.value + '"'; + break; + default: + output += token.value; + break; + } + }); + return output; +}, partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input))))); +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/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b13dbebe3843ef2df86467cea2f1b4aa11e17879 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_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":[],"mappings":";;;AAKA,MAAM,QAAQ,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AAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC1B,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACjB,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,GAAG;iBACX,CAAC,CAAC;YACL,CAAC;iBAAM,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,GAAG;iBACX,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,QAAQ,GAAG,CAAC,MAAe,EAAU,EAAE;IACrC,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACnB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,QAAQ;gBACX,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC;gBAClC,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC;gBACtB,MAAM;QACV,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,YAAY,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1F,oCAAY"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d2e0d5cbcd7ddbc688a328d3c17720ffed626586 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs @@ -0,0 +1,223 @@ +const tokenize = (input) => { + let current = 0; + let tokens = []; + while (current < input.length) { + let char = input[current]; + if (char === '\\') { + current++; + continue; + } + if (char === '{') { + tokens.push({ + type: 'brace', + value: '{', + }); + current++; + continue; + } + if (char === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + current++; + continue; + } + if (char === '[') { + tokens.push({ + type: 'paren', + value: '[', + }); + current++; + continue; + } + if (char === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + current++; + continue; + } + if (char === ':') { + tokens.push({ + type: 'separator', + value: ':', + }); + current++; + continue; + } + if (char === ',') { + tokens.push({ + type: 'delimiter', + value: ',', + }); + current++; + continue; + } + if (char === '"') { + let value = ''; + let danglingQuote = false; + char = input[++current]; + while (char !== '"') { + if (current === input.length) { + danglingQuote = true; + break; + } + if (char === '\\') { + current++; + if (current === input.length) { + danglingQuote = true; + break; + } + value += char + input[current]; + char = input[++current]; + } + else { + value += char; + char = input[++current]; + } + } + char = input[++current]; + if (!danglingQuote) { + tokens.push({ + type: 'string', + value, + }); + } + continue; + } + let WHITESPACE = /\s/; + if (char && WHITESPACE.test(char)) { + current++; + continue; + } + let NUMBERS = /[0-9]/; + if ((char && NUMBERS.test(char)) || char === '-' || char === '.') { + let value = ''; + if (char === '-') { + value += char; + char = input[++current]; + } + while ((char && NUMBERS.test(char)) || char === '.') { + value += char; + char = input[++current]; + } + tokens.push({ + type: 'number', + value, + }); + continue; + } + let LETTERS = /[a-z]/i; + if (char && LETTERS.test(char)) { + let value = ''; + while (char && LETTERS.test(char)) { + if (current === input.length) { + break; + } + value += char; + char = input[++current]; + } + if (value == 'true' || value == 'false' || value === 'null') { + tokens.push({ + type: 'name', + value, + }); + } + else { + // unknown token, e.g. `nul` which isn't quite `null` + current++; + continue; + } + continue; + } + current++; + } + return tokens; +}, strip = (tokens) => { + if (tokens.length === 0) { + return tokens; + } + let lastToken = tokens[tokens.length - 1]; + switch (lastToken.type) { + case 'separator': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + case 'number': + let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1]; + if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + case 'string': + let tokenBeforeTheLastToken = tokens[tokens.length - 2]; + if (tokenBeforeTheLastToken?.type === 'delimiter') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + break; + case 'delimiter': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + } + return tokens; +}, unstrip = (tokens) => { + let tail = []; + tokens.map((token) => { + if (token.type === 'brace') { + if (token.value === '{') { + tail.push('}'); + } + else { + tail.splice(tail.lastIndexOf('}'), 1); + } + } + if (token.type === 'paren') { + if (token.value === '[') { + tail.push(']'); + } + else { + tail.splice(tail.lastIndexOf(']'), 1); + } + } + }); + if (tail.length > 0) { + tail.reverse().map((item) => { + if (item === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + } + else if (item === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + } + }); + } + return tokens; +}, generate = (tokens) => { + let output = ''; + tokens.map((token) => { + switch (token.type) { + case 'string': + output += '"' + token.value + '"'; + break; + default: + output += token.value; + break; + } + }); + return output; +}, partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input))))); +export { partialParse }; +//# 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/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..69ed39c2925dcb322bf38257064efc4989dce931 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.mjs","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":"AAKA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAW,EAAE;IACxC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,MAAM,GAAY,EAAE,CAAC;IAEzB,OAAO,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QAE1B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;YAEH,OAAO,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;YAEH,OAAO,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;YAEH,OAAO,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AC;gBAClC,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC;gBACtB,MAAM;QACV,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,YAAY,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli new file mode 100644 index 0000000000000000000000000000000000000000..00d7c372f38fcedc51b53e2bb0cc6e5e07592341 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli @@ -0,0 +1,53 @@ +#!/usr/bin/env node + +const { spawnSync } = require('child_process'); + +const commands = { + migrate: { + description: + 'Run migrations to update your code using @anthropic-ai/sdk@0.41 to be compatible with @anthropic-ai/sdk@0.50', + fn: () => { + const result = spawnSync( + 'npx', + [ + '-y', + 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.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: anthropic-ai-sdk `); + 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/@anthropic-ai/sdk/bin/migration-config.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/bin/migration-config.json new file mode 100644 index 0000000000000000000000000000000000000000..88a4afd5afb804eee63ef912869bcba434127936 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/bin/migration-config.json @@ -0,0 +1,7 @@ +{ + "pkg": "@anthropic-ai/sdk", + "githubRepo": "https://github.com/anthropics/anthropic-sdk-typescript", + "clientClass": "Anthropic", + "baseClientClass": "BaseAnthropic", + "methods": [] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..218dbec2eedddbde9e5897f975c0850fd13e1a80 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts @@ -0,0 +1,49 @@ +import { type BaseAnthropic } 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: BaseAnthropic, responsePromise: Promise, parseResponse?: (client: BaseAnthropic, 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 `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * 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 | undefined; + }>; + 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/@anthropic-ai/sdk/core/api-promise.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d000fea8d68cb590e32aa4dc4b929faf146b7027 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,aAAa,EAAE;OAEtB,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAGnB;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;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AAO,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/@anthropic-ai/sdk/core/api-promise.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc02736bce6efd7e8fdec46bbfa01d9cf63929c6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts @@ -0,0 +1,49 @@ +import { type BaseAnthropic } 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: BaseAnthropic, responsePromise: Promise, parseResponse?: (client: BaseAnthropic, 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 `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * 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 | undefined; + }>; + 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/@anthropic-ai/sdk/core/api-promise.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1a1a212897e26e330c7e2e8115d5014c06fab444 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,aAAa,EAAE;OAEtB,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAGnB;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,aAAa,EACb,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAC1C,aAAa,GAAE,CACrB,MAAM,EAAE,aAAa,EACrB,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,GAAG,SAAS,CAAA;KAAE,CAAC;IAKrG,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/@anthropic-ai/sdk/core/api-promise.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.js new file mode 100644 index 0000000000000000000000000000000000000000..38f76482fe2f5f942adf773519f86634bdf3a19a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * 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('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/@anthropic-ai/sdk/core/api-promise.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2cad468705b52fa2782efd692271c4a0ff0f038f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,MAAqB,EACb,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,qCAAuB;QAgBrB,+BAAA,IAAI,sBAAW,MAAM,MAAA,CAAC;IACxB,CAAC;IAED,WAAW,CAAI,SAAkD;QAC/D,OAAO,IAAI,UAAU,CAAC,+BAAA,IAAI,0BAAQ,EAAE,IAAI,CA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,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/@anthropic-ai/sdk/core/api-promise.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3d67649a3fbdb4fb965c4a38b32c7fd2ade7f095 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * 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('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/@anthropic-ai/sdk/core/api-promise.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c6f7e3fb7819993835abc8bb972afe61d0c2e2f3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,EAGL,oBAAoB,EACpB,YAAY,GACb;AAED;;;GAGG;AACH,MAAM,OAAO,UAAc,SAAQ,OAAyB;IAI1D,YACE,MAAqB,EACb,eAA0C,EAC1C,gBAGgC,oBAAoB;QAE5D,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,yEAAyE;YACzE,0EAA0E;YAC1E,wBAA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QACJ,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/@anthropic-ai/sdk/core/error.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b4825e26919182352841f8e52554e88f87fa77bc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts @@ -0,0 +1,47 @@ +export declare class AnthropicError extends Error { +} +export declare class APIError extends AnthropicError { + /** 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 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 { +} +//# 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/@anthropic-ai/sdk/core/error.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b61e7b9f1d2dd25f9ebb0a737df8ed37ded39cd3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.mts","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C,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,cAAc;IACtB,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,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,QAA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CAAC;CAAG;AAE7D,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..13bc430e50dfe8c360a1add5a3daa037f555ed53 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.ts @@ -0,0 +1,47 @@ +export declare class AnthropicError extends Error { +} +export declare class APIError extends AnthropicError { + /** 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 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 { +} +//# 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/@anthropic-ai/sdk/core/error.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2b6ddc83eb4999bbaf8f13ace341e8bbf6f01b4a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C,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,cAAc;IACtB,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,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;IAQ1F,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,qBAAa,iBAAkB,SAAQ,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;gBAClE,EAAE,OAAO,EAAE,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO;CAGnD;AAED,qBAAa,kBAAmB,SAAQ,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;gBACnE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;KAAE;CAM5F;AAED,qBAAa,yBAA0B,SAAQ,kBAAkB;gBACnD,EAAE,OAAO,EAAE,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO;CAGnD;AAED,qBAAa,eAAgB,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE9D,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAElE,qBAAa,qBAAsB,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAEpE,qBAAa,aAAc,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE5D,qBAAa,aAAc,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE5D,qBAAa,wBAAyB,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAEvE,qBAAa,cAAe,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE7D,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js new file mode 100644 index 0000000000000000000000000000000000000000..2ce1412798919820d41c3b4bed261cb8ea69d15b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js @@ -0,0 +1,114 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +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.AnthropicError = void 0; +const errors_1 = require("../internal/errors.js"); +class AnthropicError extends Error { +} +exports.AnthropicError = AnthropicError; +class APIError extends AnthropicError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('request-id'); + this.error = error; + } + 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; + 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; +//# 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/@anthropic-ai/sdk/core/error.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bb8aa0eafeea95d6a3f766218a9612525c093af1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,cAAe,SAAQ,KAAK;CAAG;AAA5C,wCAA4C;AAE5C,MAAa,QAIX,SAAQ,cAAc;IAUtB,YAAY,MAAe,EAAE,KAAa,EAAE,OAA2B,EAAE,OAAiB;QACxF,KAAK,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,C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AA2B,EAAE;QAChD,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,IAAI,sBAAsB,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;CACF;AAJD,8CAIC;AAED,MAAa,kBAAmB,SAAQ,QAAyC;IAC/E,YAAY,EAAE,OAAO,EAAE,KAAK,EAA+D;QACzF,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,IAAI,mBAAmB,EAAE,SAAS,CAAC,CAAC;QACvE,gEAAgE;QAChE,aAAa;QACb,IAAI,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;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"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b2e189f8ca4a11f929acdabe2a2b016b3ffbdf14 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs @@ -0,0 +1,98 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { castToError } from "../internal/errors.mjs"; +export class AnthropicError extends Error { +} +export class APIError extends AnthropicError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('request-id'); + this.error = error; + } + 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; + 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 { +} +//# 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/@anthropic-ai/sdk/core/error.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c90ca9e822c8732d9738abb213f82a52054ca1c8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,cAAe,SAAQ,KAAK;CAAG;AAE5C,MAAM,OAAO,QAIX,SAAQ,cAAc;IAUtB,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,YAAY,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,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,KAAK,CAAC,OAAO;gBACf,CAAC,CAAC,IAA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AA2B,EAAE;QAChD,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,CAAC,CAAC;IACtD,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,QAAsB;CAAG;AAE9D,MAAM,OAAO,mBAAoB,SAAQ,QAAsB;CAAG;AAElE,MAAM,OAAO,qBAAsB,SAAQ,QAAsB;CAAG;AAEpE,MAAM,OAAO,aAAc,SAAQ,QAAsB;CAAG;AAE5D,MAAM,OAAO,aAAc,SAAQ,QAAsB;CAAG;AAE5D,MAAM,OAAO,wBAAyB,SAAQ,QAAsB;CAAG;AAEvE,MAAM,OAAO,cAAe,SAAQ,QAAsB;CAAG;AAE7D,MAAM,OAAO,mBAAoB,SAAQ,QAAyB;CAAG"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..209a0702f07f586eda2a20dfc4871597cef8678e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts @@ -0,0 +1,63 @@ +import { FinalRequestOptions } from "../internal/request-options.mjs"; +import { type BaseAnthropic } from "../client.mjs"; +import { APIPromise } from "./api-promise.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: BaseAnthropic, 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: BaseAnthropic, 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; + has_more: boolean; + first_id: string | null; + last_id: string | null; +} +export interface PageParams { + /** + * Number of items per page. + */ + limit?: number; + before_id?: string; + after_id?: string; +} +export declare class Page extends AbstractPage implements PageResponse { + data: Array; + has_more: boolean; + first_id: string | null; + last_id: string | null; + constructor(client: BaseAnthropic, response: Response, body: PageResponse, 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/@anthropic-ai/sdk/core/pagination.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..aa4e39b383aacce2be1dbefb28b495f341eb6280 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,KAAK,aAAa,EAAE;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,gBAAgB,EAAE;AAGhC,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC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,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,IAAI,CAAC,IAAI,CAAE,SAAQ,YAAY,CAAC,IAAI,CAAE,YAAW,YAAY,CAAC,IAAI,CAAC;IAC9E,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGrB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,OAAO,EAAE,mBAAmB;IAU9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CA8BpD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8fd5d9db8b4895b7209abfaa85778bf409fc11ed --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts @@ -0,0 +1,63 @@ +import { FinalRequestOptions } from "../internal/request-options.js"; +import { type BaseAnthropic } from "../client.js"; +import { APIPromise } from "./api-promise.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: BaseAnthropic, 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: BaseAnthropic, 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; + has_more: boolean; + first_id: string | null; + last_id: string | null; +} +export interface PageParams { + /** + * Number of items per page. + */ + limit?: number; + before_id?: string; + after_id?: string; +} +export declare class Page extends AbstractPage implements PageResponse { + data: Array; + has_more: boolean; + first_id: string | null; + last_id: string | null; + constructor(client: BaseAnthropic, response: Response, body: PageResponse, 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/@anthropic-ai/sdk/core/pagination.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f8e25d49bc1e20903536bb1df1d15f7df5e0f779 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"OAGO,EAA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;IACI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC;CAMtD;AAED,MAAM,WAAW,YAAY,CAAC,IAAI;IAChC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,IAAI,CAAC,IAAI,CAAE,SAAQ,YAAY,CAAC,IAAI,CAAE,YAAW,YAAY,CAAC,IAAI,CAAC;IAC9E,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGrB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,OAAO,EAAE,mBAAmB;IAU9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CA8BpD"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js new file mode 100644 index 0000000000000000000000000000000000000000..c46cfd326cb2254d9ca6c4556c3665d7b699ac06 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js @@ -0,0 +1,123 @@ +"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.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.AnthropicError('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; +class Page extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + this.first_id = body.first_id || null; + this.last_id = body.last_id || null; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + if (this.options.query?.['before_id']) { + // in reverse + const first_id = this.first_id; + if (!first_id) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + before_id: first_id, + }, + }; + } + const cursor = this.last_id; + if (!cursor) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + after_id: cursor, + }, + }; + } +} +exports.Page = Page; +//# 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/@anthropic-ai/sdk/core/pagination.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d1d93b017b590a1954f5bf58386274e7e508327b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAEtF,sCAAyC;AAEzC,gDAAwE;AAExE,kDAA2C;AAE3C,wDAAoD;AAIpD,MAAsB,YAAY;IAOhC,YAAY,MAAqB,EAAE,QAAkB,EAAE,IAAa,EAAE,OAA4B;QANlG,uCAAuB;QAOrB,+BAAA,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,C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AC,OAAO;gBACf,KAAK,EAAE;oBACL,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;oBAC/B,SAAS,EAAE,QAAQ;iBACpB;aACF,CAAC;QACJ,CAAC;QAED,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,IAAA,iBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC/B,QAAQ,EAAE,MAAM;aACjB;SACF,CAAC;IACJ,CAAC;CACF;AAjED,oBAiEC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.mjs new file mode 100644 index 0000000000000000000000000000000000000000..425937f0a2a5fc177866b479b1175f4a01c03600 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.mjs @@ -0,0 +1,117 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _AbstractPage_client; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { AnthropicError } 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 AnthropicError('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; + } + } +} +export class Page extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + this.first_id = body.first_id || null; + this.last_id = body.last_id || null; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + if (this.options.query?.['before_id']) { + // in reverse + const first_id = this.first_id; + if (!first_id) { + return null; + } + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + before_id: first_id, + }, + }; + } + const cursor = this.last_id; + if (!cursor) { + return null; + } + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + after_id: 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/@anthropic-ai/sdk/core/pagination.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6eab5d606fde0fb5410de1672b6d13683cec1a40 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,cAAc,EAAE;OAElB,EAAE,oBAAoB,EAAiB;OAEvC,EAAE,UAAU,EAAE;OAEd,EAAE,QAAQ,EAAE;AAInB,MAAM,OAAgB,YAAY;IAOhC,YAAY,MAAqB,EAAE,QAAkB,EAAE,IAAa,EAAE,OAA4B;QANlG,uCAAuB;QAOrB,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,cAAc,CACtB,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;QACd,IAAI,IAAI,GAAS,IAAI,CAAC;QACtB,MAAM,IAAI,CAAC;QACX,OAAO,IAAI,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G,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;IACtC,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,IAAK,IAAI,CAAC,OAAO,CAAC,KAAiC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;YACnE,aAAa;YACb,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,OAAO,IAAI,CAAC;YACd,CAAC;YAED,OAAO;gBACL,GAAG,IAAI,CAAC,OAAO;gBACf,KAAK,EAAE;oBACL,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;oBAC/B,SAAS,EAAE,QAAQ;iBACpB;aACF,CAAC;QACJ,CAAC;QAED,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,QAAQ,EAAE,MAAM;aACjB;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/@anthropic-ai/sdk/core/resource.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..820d0d81840746cd24d35e84ef4609cce58b2b32 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts @@ -0,0 +1,6 @@ +import { BaseAnthropic } from "../client.mjs"; +export declare class APIResource { + protected _client: BaseAnthropic; + constructor(client: BaseAnthropic); +} +//# 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/@anthropic-ai/sdk/core/resource.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..2257ce9ed2044d36e455616a1b3858be271e58f4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.mts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE;AAExB,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;gBAErB,MAAM,EAAE,aAAa;CAGlC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a5487a42dabfcfa32057b5ce84c9252deee0365c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts @@ -0,0 +1,6 @@ +import { BaseAnthropic } from "../client.js"; +export declare class APIResource { + protected _client: BaseAnthropic; + constructor(client: BaseAnthropic); +} +//# 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/@anthropic-ai/sdk/core/resource.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..15cd56ac7ad226d1eeac3b393d297e0077cf2715 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE;AAExB,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;gBAErB,MAAM,EAAE,aAAa;CAGlC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/resource.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.js.map new file mode 100644 index 0000000000000000000000000000000000000000..136c798c7a0556e4f0757adb9c8b35b5eda03bb0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.js","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAa,WAAW;IAGtB,YAAY,MAAqB;QAC/B,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/@anthropic-ai/sdk/core/resource.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/resource.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4e97db8a2ede2ddb266f324c205ee8804eddcb73 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAqB;QAC/B,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/@anthropic-ai/sdk/core/streaming.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bfe6a8797589c90dee934af7b79c5d33e2595913 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.mts @@ -0,0 +1,31 @@ +import { type ReadableStream } from "../internal/shim-types.mjs"; +export type ServerSentEvent = { + event: string | null; + data: string; + raw: string[]; +}; +export declare class Stream implements AsyncIterable { + private iterator; + controller: AbortController; + constructor(iterator: () => AsyncIterator, controller: AbortController); + static fromSSEResponse(response: Response, controller: AbortController): Stream; + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream: ReadableStream, controller: AbortController): 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/@anthropic-ai/sdk/core/streaming.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..fc916a8aedd8a8e0e518d3ddf5676c9ae9bffc6b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;AAY9B,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;IAIpD,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,eAAe;IAK7B,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA4D3F;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA2C1G,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/@anthropic-ai/sdk/core/streaming.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..10c1323bebf4a38268a16fdbdfc6e6f804d327a2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts @@ -0,0 +1,31 @@ +import { type ReadableStream } from "../internal/shim-types.js"; +export type ServerSentEvent = { + event: string | null; + data: string; + raw: string[]; +}; +export declare class Stream implements AsyncIterable { + private iterator; + controller: AbortController; + constructor(iterator: () => AsyncIterator, controller: AbortController); + static fromSSEResponse(response: Response, controller: AbortController): Stream; + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream: ReadableStream, controller: AbortController): 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/@anthropic-ai/sdk/core/streaming.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..603a7ef552595b43dd2e10dad9664285d553da29 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;AAY9B,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;IAIpD,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,eAAe;IAK7B,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA4D3F;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA2C1G,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/@anthropic-ai/sdk/core/streaming.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.js new file mode 100644 index 0000000000000000000000000000000000000000..a6e5b745992e9593aa354da3665374db7cecf5be --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.js @@ -0,0 +1,282 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Stream = void 0; +exports._iterSSEMessages = _iterSSEMessages; +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 values_1 = require("../internal/utils/values.js"); +const bytes_1 = require("../internal/utils/bytes.js"); +const error_2 = require("./error.js"); +class Stream { + constructor(iterator, controller) { + this.iterator = iterator; + this.controller = controller; + } + static fromSSEResponse(response, controller) { + let consumed = false; + async function* iterator() { + if (consumed) { + throw new error_1.AnthropicError('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 (sse.event === 'completion') { + try { + yield JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + if (sse.event === 'message_start' || + sse.event === 'message_delta' || + sse.event === 'message_stop' || + sse.event === 'content_block_start' || + sse.event === 'content_block_delta' || + sse.event === 'content_block_stop') { + try { + yield JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + if (sse.event === 'ping') { + continue; + } + if (sse.event === 'error') { + throw new error_2.APIError(undefined, (0, values_1.safeJSON)(sse.data) ?? sse.data, undefined, response.headers); + } + } + 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); + } + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream, controller) { + 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.AnthropicError('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); + } + [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), + new Stream(() => teeIterator(right), this.controller), + ]; + } + /** + * 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.AnthropicError(`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.AnthropicError(`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/@anthropic-ai/sdk/core/streaming.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6113a9b911772e41bcabb555fdda06f6b2574bf3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules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AAC,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAEjD,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,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/@anthropic-ai/sdk/core/streaming.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs new file mode 100644 index 0000000000000000000000000000000000000000..dc86d56bb5603df2d5efc6eb1c9c3492dcf3bccf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs @@ -0,0 +1,277 @@ +import { AnthropicError } 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 { safeJSON } from "../internal/utils/values.mjs"; +import { encodeUTF8 } from "../internal/utils/bytes.mjs"; +import { APIError } from "./error.mjs"; +export class Stream { + constructor(iterator, controller) { + this.iterator = iterator; + this.controller = controller; + } + static fromSSEResponse(response, controller) { + let consumed = false; + async function* iterator() { + if (consumed) { + throw new AnthropicError('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 (sse.event === 'completion') { + try { + yield JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + if (sse.event === 'message_start' || + sse.event === 'message_delta' || + sse.event === 'message_stop' || + sse.event === 'content_block_start' || + sse.event === 'content_block_delta' || + sse.event === 'content_block_stop') { + try { + yield JSON.parse(sse.data); + } + catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + if (sse.event === 'ping') { + continue; + } + if (sse.event === 'error') { + throw new APIError(undefined, safeJSON(sse.data) ?? sse.data, undefined, response.headers); + } + } + 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); + } + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream, controller) { + 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 AnthropicError('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); + } + [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), + new Stream(() => teeIterator(right), this.controller), + ]; + } + /** + * 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 AnthropicError(`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 AnthropicError(`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/@anthropic-ai/sdk/core/streaming.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..30810d09a848b76e1211a4430bc4f34d400d4c81 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAElB,EAAE,kBAAkB,EAAE;OACtB,EAAE,sBAAsB,EAAE,WAAW,EAAE;OACvC,EAAE,6BAA6B,EAAE;OACjC,EAAE,YAAY,EAAE;OAChB,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;OAEd,EAAE,QAAQ,EAAE;AAUnB,MAAM,OAAO,MAAM;IAGjB,YACU,QAAmC,EAC3C,UAA2B;QADnB,aAAQ,GAAR,QAAQ,CAA2B;QAG3C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,eAAe,CAAO,QAAkB,EAAE,UAA2B;QAC1E,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,KAAK,SAAS,CAAC,CAAC,QAAQ;YACtB,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,IAAI,cAAc,CAAC,0EAA0E,CAAC,CAAC;YACvG,CAAC;YACD,QAAQ,GAAG,IAAI,CAAC;YAChB,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,CAAC;gBACH,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;oBAC/D,IAAI,GAAG,CAAC,KAAK,KAAK,YAAY,EAAE,CAAC;wBAC/B,IAAI,CAAC;4BACH,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBAC7B,CAAC;wBAAC,OAAO,CAAC,EAAE,CAAC;4BACX,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;4BAC9D,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,GAAG,CA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AC;QACd,CAAC;QAED,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAEjD,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,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/@anthropic-ai/sdk/core/uploads.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/core/uploads.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/builtin-types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/constants.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..032c80c98417cd7e4555ef883d0cdc3d3f709b64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts @@ -0,0 +1,5 @@ +/** + * Model-specific timeout constraints for non-streaming requests + */ +export declare const MODEL_NONSTREAMING_TOKENS: Record; +//# sourceMappingURL=constants.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..014d301e431069201ffbe3c23fe42df580f437c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM5D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6bff005c0f6c7d170629258f4daea66254199bbe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts @@ -0,0 +1,5 @@ +/** + * Model-specific timeout constraints for non-streaming requests + */ +export declare const MODEL_NONSTREAMING_TOKENS: Record; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..66284b9c1a07071edb2eeecf9a296df582ce2e64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM5D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..f01a236695b44c1614f5f1529f7906a0490600a7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js @@ -0,0 +1,15 @@ +"use strict"; +// File containing shared constants +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MODEL_NONSTREAMING_TOKENS = void 0; +/** + * Model-specific timeout constraints for non-streaming requests + */ +exports.MODEL_NONSTREAMING_TOKENS = { + 'claude-opus-4-20250514': 8192, + 'claude-opus-4-0': 8192, + 'claude-4-opus-20250514': 8192, + 'anthropic.claude-opus-4-20250514-v1:0': 8192, + 'claude-opus-4@20250514': 8192, +}; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1e3e218253b52b2b97c195ffca6de1c34f2ffc65 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":";AAAA,mCAAmC;;;AAEnC;;GAEG;AACU,QAAA,yBAAyB,GAA2B;IAC/D,wBAAwB,EAAE,IAAI;IAC9B,iBAAiB,EAAE,IAAI;IACvB,wBAAwB,EAAE,IAAI;IAC9B,uCAAuC,EAAE,IAAI;IAC7C,wBAAwB,EAAE,IAAI;CAC/B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e2f4d03b3d878d4b07093fd7874dd2a981d306e5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs @@ -0,0 +1,12 @@ +// File containing shared constants +/** + * Model-specific timeout constraints for non-streaming requests + */ +export const MODEL_NONSTREAMING_TOKENS = { + 'claude-opus-4-20250514': 8192, + 'claude-opus-4-0': 8192, + 'claude-4-opus-20250514': 8192, + 'anthropic.claude-opus-4-20250514-v1:0': 8192, + 'claude-opus-4@20250514': 8192, +}; +//# sourceMappingURL=constants.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b1f1b9d754a2d220448e05984d02ae1060151ad9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA2B;IAC/D,wBAAwB,EAAE,IAAI;IAC9B,iBAAiB,EAAE,IAAI;IACvB,wBAAwB,EAAE,IAAI;IAC9B,uCAAuC,EAAE,IAAI;IAC7C,wBAAwB,EAAE,IAAI;CAC/B,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a65828dd4df192762ed030e501b537d4b0689588 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts @@ -0,0 +1,10 @@ +import { type Bytes } from "./line.mjs"; +export declare class JSONLDecoder { + private iterator; + controller: AbortController; + constructor(iterator: AsyncIterableIterator, controller: AbortController); + private decoder; + [Symbol.asyncIterator](): AsyncIterator; + static fromResponse(response: Response, controller: AbortController): JSONLDecoder; +} +//# sourceMappingURL=jsonl.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5b884d54a7a9451aebf1568c2e8f9a98f7a984c4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.d.mts","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":"OAEO,EAAe,KAAK,KAAK,EAAE;AAElC,qBAAa,YAAY,CAAC,CAAC;IAIvB,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAC9C,UAAU,EAAE,eAAe;YAKd,OAAO;IAatB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAI1C,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC;CAgBzF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7fb0b3ec069b18b2e64af1db3260996f4ea31e95 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts @@ -0,0 +1,10 @@ +import { type Bytes } from "./line.js"; +export declare class JSONLDecoder { + private iterator; + controller: AbortController; + constructor(iterator: AsyncIterableIterator, controller: AbortController); + private decoder; + [Symbol.asyncIterator](): AsyncIterator; + static fromResponse(response: Response, controller: AbortController): JSONLDecoder; +} +//# sourceMappingURL=jsonl.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..545b8028389711511289482fa893127c897d5a24 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":"OAEO,EAAe,KAAK,KAAK,EAAE;AAElC,qBAAa,YAAY,CAAC,CAAC;IAIvB,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAC9C,UAAU,EAAE,eAAe;YAKd,OAAO;IAatB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAI1C,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC;CAgBzF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js new file mode 100644 index 0000000000000000000000000000000000000000..16970b76a0371bb3cbaef97449db5d1e8c62fe85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JSONLDecoder = void 0; +const error_1 = require("../../core/error.js"); +const shims_1 = require("../shims.js"); +const line_1 = require("./line.js"); +class JSONLDecoder { + constructor(iterator, controller) { + this.iterator = iterator; + this.controller = controller; + } + async *decoder() { + const lineDecoder = new line_1.LineDecoder(); + for await (const chunk of this.iterator) { + for (const line of lineDecoder.decode(chunk)) { + yield JSON.parse(line); + } + } + for (const line of lineDecoder.flush()) { + yield JSON.parse(line); + } + } + [Symbol.asyncIterator]() { + return this.decoder(); + } + static fromResponse(response, controller) { + if (!response.body) { + controller.abort(); + if (typeof globalThis.navigator !== 'undefined' && + globalThis.navigator.product === 'ReactNative') { + throw new error_1.AnthropicError(`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.AnthropicError(`Attempted to iterate over a response with no body`); + } + return new JSONLDecoder((0, shims_1.ReadableStreamToAsyncIterable)(response.body), controller); + } +} +exports.JSONLDecoder = JSONLDecoder; +//# sourceMappingURL=jsonl.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c5988266c27b6a57efb8922fbd495e730c087e5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAClD,uCAAyD;AACzD,oCAAiD;AAEjD,MAAa,YAAY;IAGvB,YACU,QAAsC,EAC9C,UAA2B;QADnB,aAAQ,GAAR,QAAQ,CAA8B;QAG9C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,CAAC,OAAO;QACpB,MAAM,WAAW,GAAG,IAAI,kBAAW,EAAE,CAAC;QACtC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxC,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC7C,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC;YACvC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,YAAY,CAAI,QAAkB,EAAE,UAA2B;QACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnB,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,IACE,OAAQ,UAAkB,CAAC,SAAS,KAAK,WAAW;gBACnD,UAAkB,CAAC,SAAS,CAAC,OAAO,KAAK,aAAa,EACvD,CAAC;gBACD,MAAM,IAAI,sBAAc,CACtB,gKAAgK,CACjK,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,sBAAc,CAAC,mDAAmD,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,IAAI,YAAY,CAAC,IAAA,qCAA6B,EAAQ,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC3F,CAAC;CACF;AA3CD,oCA2CC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6d3f4b9eecb95ea05719d858243386be9f7df6a3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs @@ -0,0 +1,35 @@ +import { AnthropicError } from "../../core/error.mjs"; +import { ReadableStreamToAsyncIterable } from "../shims.mjs"; +import { LineDecoder } from "./line.mjs"; +export class JSONLDecoder { + constructor(iterator, controller) { + this.iterator = iterator; + this.controller = controller; + } + async *decoder() { + const lineDecoder = new LineDecoder(); + for await (const chunk of this.iterator) { + for (const line of lineDecoder.decode(chunk)) { + yield JSON.parse(line); + } + } + for (const line of lineDecoder.flush()) { + yield JSON.parse(line); + } + } + [Symbol.asyncIterator]() { + return this.decoder(); + } + static fromResponse(response, controller) { + if (!response.body) { + controller.abort(); + if (typeof globalThis.navigator !== 'undefined' && + globalThis.navigator.product === 'ReactNative') { + throw new AnthropicError(`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 AnthropicError(`Attempted to iterate over a response with no body`); + } + return new JSONLDecoder(ReadableStreamToAsyncIterable(response.body), controller); + } +} +//# sourceMappingURL=jsonl.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4417ab9cc6827d836caf0a2b9078ce48d631a42b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.mjs","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc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No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0fb40d95fd425d85eff7dfb64aaa05918621f6f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts @@ -0,0 +1,17 @@ +export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined; +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +export declare class LineDecoder { + #private; + static NEWLINE_CHARS: Set; + static NEWLINE_REGEXP: RegExp; + constructor(); + decode(chunk: Bytes): string[]; + flush(): string[]; +} +export declare function findDoubleNewlineIndex(buffer: Uint8Array): number; +//# sourceMappingURL=line.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5d3352d2c422fd9a60f8137b1c3f460df51d79c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"line.d.mts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzE;;;;;GAKG;AACH,qBAAa,WAAW;;IAEtB,MAAM,CAAC,aAAa,cAAyB;IAC7C,MAAM,CAAC,cAAc,SAAkB;;IAUvC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE;IA6C9B,KAAK,IAAI,MAAM,EAAE;CAMlB;AA+BD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CA6BjE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bd39367a83e236d19fd1eb681822d9a0945aa355 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts @@ -0,0 +1,17 @@ +export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined; +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +export declare class LineDecoder { + #private; + static NEWLINE_CHARS: Set; + static NEWLINE_REGEXP: RegExp; + constructor(); + decode(chunk: Bytes): string[]; + flush(): string[]; +} +export declare function findDoubleNewlineIndex(buffer: Uint8Array): number; +//# sourceMappingURL=line.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ccf562926431eb83b777043965e95e9cd96415a4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzE;;;;;GAKG;AACH,qBAAa,WAAW;;IAEtB,MAAM,CAAC,aAAa,cAAyB;IAC7C,MAAM,CAAC,cAAc,SAAkB;;IAUvC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE;IA6C9B,KAAK,IAAI,MAAM,EAAE;CAMlB;AA+BD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CA6BjE"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js new file mode 100644 index 0000000000000000000000000000000000000000..949664f3c52dba341d94429f66fc3a81653e5d43 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js @@ -0,0 +1,113 @@ +"use strict"; +var _LineDecoder_buffer, _LineDecoder_carriageReturnIndex; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LineDecoder = void 0; +exports.findDoubleNewlineIndex = findDoubleNewlineIndex; +const tslib_1 = require("../tslib.js"); +const bytes_1 = require("../utils/bytes.js"); +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +class LineDecoder { + constructor() { + _LineDecoder_buffer.set(this, void 0); + _LineDecoder_carriageReturnIndex.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f"); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + } + decode(chunk) { + if (chunk == null) { + return []; + } + const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) + : typeof chunk === 'string' ? (0, bytes_1.encodeUTF8)(chunk) + : chunk; + tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, (0, bytes_1.concatBytes)([tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), binaryChunk]), "f"); + const lines = []; + let patternIndex; + while ((patternIndex = findNewlineIndex(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f"))) != null) { + if (patternIndex.carriage && tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") == null) { + // skip until we either get a corresponding `\n`, a new `\r` or nothing + tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, patternIndex.index, "f"); + continue; + } + // we got double \r or \rtext\n + if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") != null && + (patternIndex.index !== tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) { + lines.push((0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") - 1))); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f")), "f"); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + continue; + } + const endIndex = tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding; + const line = (0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex)); + lines.push(line); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f"); + tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + } + return lines; + } + flush() { + if (!tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) { + return []; + } + return this.decode('\n'); + } +} +exports.LineDecoder = LineDecoder; +_LineDecoder_buffer = new WeakMap(), _LineDecoder_carriageReturnIndex = new WeakMap(); +// prettier-ignore +LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']); +LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g; +/** + * This function searches the buffer for the end patterns, (\r or \n) + * and returns an object with the index preceding the matched newline and the + * index after the newline char. `null` is returned if no new line is found. + * + * ```ts + * findNewLineIndex('abc\ndef') -> { preceding: 2, index: 3 } + * ``` + */ +function findNewlineIndex(buffer, startIndex) { + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + for (let i = startIndex ?? 0; i < buffer.length; i++) { + if (buffer[i] === newline) { + return { preceding: i, index: i + 1, carriage: false }; + } + if (buffer[i] === carriage) { + return { preceding: i, index: i + 1, carriage: true }; + } + } + return null; +} +function findDoubleNewlineIndex(buffer) { + // This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n) + // and returns the index right after the first occurrence of any pattern, + // or -1 if none of the patterns are found. + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + for (let i = 0; i < buffer.length - 1; i++) { + if (buffer[i] === newline && buffer[i + 1] === newline) { + // \n\n + return i + 2; + } + if (buffer[i] === carriage && buffer[i + 1] === carriage) { + // \r\r + return i + 2; + } + if (buffer[i] === carriage && + buffer[i + 1] === newline && + i + 3 < buffer.length && + buffer[i + 2] === carriage && + buffer[i + 3] === newline) { + // \r\n\r\n + return i + 4; + } + } + return -1; +} +//# sourceMappingURL=line.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map new file mode 100644 index 0000000000000000000000000000000000000000..724edf3c3c2462015d4dc17a254502ce15eae5da --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map @@ -0,0 +1 @@ +{"version":3,"file":"line.js","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":";;;;AAyGA,wDA6BC;;AAtID,6CAAqE;AAIrE;;;;;GAKG;AACH,MAAa,WAAW;IAQtB;QAHA,sCAAoB;QACpB,mDAAoC;QAGlC,+BAAA,IAAI,uBAAW,IAAI,UAAU,EAAE,MAAA,CAAC;QAChC,+BAAA,IAAI,oCAAwB,IAAI,MAAA,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAY;QACjB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,WAAW,GACf,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC;YACpD,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,kBAAU,EAAC,KAAK,CAAC;gBAC/C,CAAC,CAAC,KAAK,CAAC;QAEV,+BAAA,IAAI,uBAAW,IAAA,mBAAW,EAAC,CAAC,+BAAA,IAAI,2BAAQ,EAAE,WAAW,CAAC,CAAC,MAAA,CAAC;QAExD,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,YAAY,CAAC;QACjB,OAAO,CAAC,YAAY,GAAG,gBAAgB,CAAC,+BAAA,IAAI,2BAAQ,EAAE,+BAAA,IAAI,wCAAqB,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1F,IAAI,YAAY,CAAC,QAAQ,IAAI,+BAAA,IAAI,wCAAqB,IAAI,IAAI,EAAE,CAAC;gBAC/D,uEAAuE;gBACv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AAC,KAAK,OAAO,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;YACvD,OAAO;YACP,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;YACzD,OAAO;YACP,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IACE,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ;YACtB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO;YACzB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM;YACrB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ;YAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO,EACzB,CAAC;YACD,WAAW;YACX,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3e1207c0883f85ed285902ea8516b0a4a3b30520 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs @@ -0,0 +1,108 @@ +var _LineDecoder_buffer, _LineDecoder_carriageReturnIndex; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../tslib.mjs"; +import { concatBytes, decodeUTF8, encodeUTF8 } from "../utils/bytes.mjs"; +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +export class LineDecoder { + constructor() { + _LineDecoder_buffer.set(this, void 0); + _LineDecoder_carriageReturnIndex.set(this, void 0); + __classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f"); + __classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + } + decode(chunk) { + if (chunk == null) { + return []; + } + const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) + : typeof chunk === 'string' ? encodeUTF8(chunk) + : chunk; + __classPrivateFieldSet(this, _LineDecoder_buffer, concatBytes([__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), binaryChunk]), "f"); + const lines = []; + let patternIndex; + while ((patternIndex = findNewlineIndex(__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f"))) != null) { + if (patternIndex.carriage && __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") == null) { + // skip until we either get a corresponding `\n`, a new `\r` or nothing + __classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, patternIndex.index, "f"); + continue; + } + // we got double \r or \rtext\n + if (__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") != null && + (patternIndex.index !== __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) { + lines.push(decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") - 1))); + __classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f")), "f"); + __classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + continue; + } + const endIndex = __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding; + const line = decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex)); + lines.push(line); + __classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f"); + __classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f"); + } + return lines; + } + flush() { + if (!__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) { + return []; + } + return this.decode('\n'); + } +} +_LineDecoder_buffer = new WeakMap(), _LineDecoder_carriageReturnIndex = new WeakMap(); +// prettier-ignore +LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']); +LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g; +/** + * This function searches the buffer for the end patterns, (\r or \n) + * and returns an object with the index preceding the matched newline and the + * index after the newline char. `null` is returned if no new line is found. + * + * ```ts + * findNewLineIndex('abc\ndef') -> { preceding: 2, index: 3 } + * ``` + */ +function findNewlineIndex(buffer, startIndex) { + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + for (let i = startIndex ?? 0; i < buffer.length; i++) { + if (buffer[i] === newline) { + return { preceding: i, index: i + 1, carriage: false }; + } + if (buffer[i] === carriage) { + return { preceding: i, index: i + 1, carriage: true }; + } + } + return null; +} +export function findDoubleNewlineIndex(buffer) { + // This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n) + // and returns the index right after the first occurrence of any pattern, + // or -1 if none of the patterns are found. + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + for (let i = 0; i < buffer.length - 1; i++) { + if (buffer[i] === newline && buffer[i + 1] === newline) { + // \n\n + return i + 2; + } + if (buffer[i] === carriage && buffer[i + 1] === carriage) { + // \r\r + return i + 2; + } + if (buffer[i] === carriage && + buffer[i + 1] === newline && + i + 3 < buffer.length && + buffer[i + 2] === carriage && + buffer[i + 3] === newline) { + // \r\n\r\n + return i + 4; + } + } + return -1; +} +//# sourceMappingURL=line.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2ef413a960a9d7e5c8774c5ad3e81ad35d32e2a5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"line.mjs","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":";;OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE;AAI9C;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IAQtB;QAHA,sCAAoB;QACpB,mDAAoC;QAGlC,uBAAA,IAAI,uBAAW,IAAI,UAAU,EAAE,MAAA,CAAC;QAChC,uBAAA,IAAI,oCAAwB,IAAI,MAAA,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAY;QACjB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,WAAW,GACf,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC;YACpD,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;gBAC/C,CAAC,CAAC,KAAK,CAAC;QAEV,uBAAA,IAAI,uBAAW,WAAW,CAAC,CAAC,uBAAA,IAAI,2BAAQ,EAAE,WAAW,CAAC,CAAC,MAAA,CAAC;QAExD,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,YAAY,CAAC;QACjB,OAAO,CAAC,YAAY,GAAG,gBAAgB,CAAC,uBAAA,IAAI,2BAAQ,EAAE,uBAAA,IAAI,wCAAqB,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1F,IAAI,YAAY,C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AE,CAAC,EAAE,EAAE,CAAC;QAC3C,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;YACvD,OAAO;YACP,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;YACzD,OAAO;YACP,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IACE,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ;YACtB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO;YACzB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM;YACrB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ;YAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO,EACzB,CAAC;YACD,WAAW;YACX,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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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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/@anthropic-ai/sdk/internal/detect-platform.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/detect-platform.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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,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,IACE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAC5B,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAE,UAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACrF,KAAK,kBAAkB,EACxB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAwBD,MAAM,qBAAqB,GAAG,GAAuB,EAAE;IACrD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,IAAI,gBAAgB,KAAK,MAAM,EAAE,CAAC;QAChC,OAAO;YACL,kBAAkB,EAAE,IAAI;YACxB,6BAA6B,EAAE,OAAO;YACtC,gBAAgB,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAClD,kBAAkB,EAAE,a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AC;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/@anthropic-ai/sdk/internal/errors.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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,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/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/errors.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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,GAA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,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/@anthropic-ai/sdk/internal/headers.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7518e7b6a153cf20271c238e65f4b916cdcf4e47 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts @@ -0,0 +1,22 @@ +type HeaderValue = string | undefined | null; +export type HeadersLike = Headers | readonly HeaderValue[][] | Record | undefined | null | NullableHeaders; +declare const brand_privateNullableHeaders: symbol & { + description: "brand.privateNullableHeaders"; +}; +/** + * @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. */ + [_: typeof 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/@anthropic-ai/sdk/internal/headers.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..564c1c2c911a719443abcaae1db48bb9662388e0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAEA,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,EAAiD,MAAM,GAAG;IAC1F,WAAW,EAAE,8BAA8B,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,CAAC,EAAE,OAAO,4BAA4B,GAAG,IAAI,CAAC;IAC/C,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA6CF,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/@anthropic-ai/sdk/internal/headers.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3c36e518c08b8d6dae2b8fcae5fbf330f3953285 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts @@ -0,0 +1,22 @@ +type HeaderValue = string | undefined | null; +export type HeadersLike = Headers | readonly HeaderValue[][] | Record | undefined | null | NullableHeaders; +declare const brand_privateNullableHeaders: symbol & { + description: "brand.privateNullableHeaders"; +}; +/** + * @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. */ + [_: typeof 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/@anthropic-ai/sdk/internal/headers.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..39aecf5bf340905458f8c5885d81f793626135e6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAEA,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,EAAiD,MAAM,GAAG;IAC1F,WAAW,EAAE,8BAA8B,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,CAAC,EAAE,OAAO,4BAA4B,GAAG,IAAI,CAAC;IAC/C,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA6CF,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/@anthropic-ai/sdk/internal/headers.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js new file mode 100644 index 0000000000000000000000000000000000000000..a4569e8e457793ad4bd9ba1f48cb51ec015e7193 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 brand_privateNullableHeaders = Symbol.for('brand.privateNullableHeaders'); +const isArray = Array.isArray; +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 (isArray(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 = isArray(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/@anthropic-ai/sdk/internal/headers.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f95fa468a41254dcd9966d9b888cde0c6d3f8f09 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAWtF,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAE7E,CAAC;AAgBF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAsD,CAAC;AAE7E,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,OAA0B,CAAC;QACrD,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,C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,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/@anthropic-ai/sdk/internal/headers.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e84cd437dbeddb61ebd79bc17d308008f1a7ad8e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs @@ -0,0 +1,74 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +const brand_privateNullableHeaders = Symbol.for('brand.privateNullableHeaders'); +const isArray = Array.isArray; +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 (isArray(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 = isArray(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/@anthropic-ai/sdk/internal/headers.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..7657b8c6214c93ddb0eeae0de2fe9f371dbb316b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.mjs","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAWtF,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAE7E,CAAC;AAgBF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAsD,CAAC;AAE7E,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,OAA0B,CAAC;QACrD,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,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,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,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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;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/@anthropic-ai/sdk/internal/parse.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..21468eb8e97197322cf92b577cb48262dc8ae894 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts @@ -0,0 +1,17 @@ +import type { FinalRequestOptions } from "./request-options.mjs"; +import { type BaseAnthropic } from "../client.mjs"; +import type { AbstractPage } from "../core/pagination.mjs"; +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; +export declare function defaultParseResponse(client: BaseAnthropic, 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/@anthropic-ai/sdk/internal/parse.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b26d29d9ca9d4629653506bb06bd9281c13b12ef --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,aAAa,EAAE;OAEtB,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,aAAa,EACrB,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/@anthropic-ai/sdk/internal/parse.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d691ee8e9aab15b91704edb8c1e2a5d395cae947 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts @@ -0,0 +1,17 @@ +import type { FinalRequestOptions } from "./request-options.js"; +import { type BaseAnthropic } from "../client.js"; +import type { AbstractPage } from "../core/pagination.js"; +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; +export declare function defaultParseResponse(client: BaseAnthropic, 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/@anthropic-ai/sdk/internal/parse.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..70c18d4f24f7eccbee9d33874ac63e35ee492a3b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,aAAa,EAAE;OAEtB,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,aAAa,EACrB,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/@anthropic-ai/sdk/internal/parse.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..35900bdf21d0638220e7d30e16f31e88db9bd6c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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); + } + return streaming_1.Stream.fromSSEResponse(response, props.controller); + } + // 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('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/@anthropic-ai/sdk/internal/parse.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bd1f09455079656169df5d1d26e53699281c04f5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse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,MAAM,MAAM,GAAG,SAAS,EAAE,QAAQ,CAAC,kBAAkB,CAAC,IAAI,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;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,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,YAAY,CAAC;QACzC,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/@anthropic-ai/sdk/internal/parse.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b56963d40d8f5986fdcda451c28dc573e64714ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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); + } + return Stream.fromSSEResponse(response, props.controller); + } + // 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('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/@anthropic-ai/sdk/internal/parse.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..da0c35e0b7cf33c549ecf33017f0f0a1e99d5561 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,MAAqB,EACrB,KAAuB;IAEvB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACzB,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEpG,6EAA6E;YAC7E,4EAA4E;YAE5E,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAQ,CAAC;YACxF,CAAC;YAED,OAAO,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAQ,CAAC;QACnE,CAAC;QAED,8DAA8D;QAC9D,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5B,OAAO,IAAS,CAAC;QACnB,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;YACnC,OAAO,QAAwB,CAAC;QAClC,CAAC;QAED,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC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anthropic-ai/sdk/internal/request-options.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d15ee9439a8634c22fb90840c389590c420903d9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts @@ -0,0 +1,34 @@ +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 = { + method?: HTTPMethod; + path?: string; + query?: object | undefined | null; + body?: unknown; + headers?: HeadersLike; + maxRetries?: number; + stream?: boolean | undefined; + timeout?: number; + fetchOptions?: MergedRequestInit; + signal?: AbortSignal | undefined | null; + idempotencyKey?: string; + __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/@anthropic-ai/sdk/internal/request-options.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..9629576e9a6f181ead97695e23591aaba88e0d88 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,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/@anthropic-ai/sdk/internal/request-options.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1951b5802467bbc4d9adb2a037c8958602f2392c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts @@ -0,0 +1,34 @@ +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 = { + method?: HTTPMethod; + path?: string; + query?: object | undefined | null; + body?: unknown; + headers?: HeadersLike; + maxRetries?: number; + stream?: boolean | undefined; + timeout?: number; + fetchOptions?: MergedRequestInit; + signal?: AbortSignal | undefined | null; + idempotencyKey?: string; + __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/@anthropic-ai/sdk/internal/request-options.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..265c1111a1a691895c651c70c16c4bfda48e688a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,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/@anthropic-ai/sdk/internal/request-options.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/request-options.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.js.map new file mode 100644 index 0000000000000000000000000000000000000000..54fdfd871da1d506f0b7b3d7805c42b72503ed81 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;;;AA+B/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/@anthropic-ai/sdk/internal/request-options.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/request-options.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b7e2007f5ed2db4a2d1bf98780f38cbd7f948c1f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;AA+BtF,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/@anthropic-ai/sdk/internal/shim-types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shim-types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shims.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shims.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shims.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shims.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/shims.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js new file mode 100644 index 0000000000000000000000000000000000000000..df72ffa21b9e4c87295f4a2f55d1ed381cb921e7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 Anthropic({ 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/@anthropic-ai/sdk/internal/shims.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ad92c52d73f2874ddff0e985e009fa877b25a103 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.js","sourceRoot":"","sources":["../src/intern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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/@anthropic-ai/sdk/internal/shims.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c511fe86f4a2aba602cdd18457ccf673d7043a1e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 Anthropic({ 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/@anthropic-ai/sdk/internal/shims.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..98b9baf18a227bb308dffca9d2ab1da5041bd895 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.mjs","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAYtF,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,KAAY,CAAC;IACtB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,sJAAsJ,CACvJ,CAAC;AACJ,CAAC;AAID,MAAM,UAAU,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,MAA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BACX,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;AAED;;;GAGG;AACH,MAAM,CAAC,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/@anthropic-ai/sdk/internal/stream-utils.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/stream-utils.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/to-file.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/to-file.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..113ca197fb3eef9f8426f00220474d531230f33a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,CAsCf"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/to-file.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ad43b2f4212fce73fb52329caeb911e8047a336b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,CAsCf"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js new file mode 100644 index 0000000000000000000000000000000000000000..83a7e6558235e97d3765904836092340ac739040 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js @@ -0,0 +1,96 @@ +"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; + name || (name = (0, uploads_1.getName)(value)); + // If we've been given a `File` we don't need to do anything if the name / options + // have not been customised. + if (isFileLike(value)) { + if (value instanceof File && name == null && options == null) { + return value; + } + return (0, uploads_1.makeFile)([await value.arrayBuffer()], name ?? value.name, { + type: value.type, + lastModified: value.lastModified, + ...options, + }); + } + 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); + 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/@anthropic-ai/sdk/internal/to-file.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d63f0c396751f1537ccd71d6673d22b0a4e5a3a2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.js","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":";;AAkFA,wBA0CC;AA5HD,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,MAA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W,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/@anthropic-ai/sdk/internal/to-file.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bc95d0140c8ccf40a8473c03a086c34efd4e0df0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs @@ -0,0 +1,93 @@ +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; + name || (name = getName(value)); + // If we've been given a `File` we don't need to do anything if the name / options + // have not been customised. + if (isFileLike(value)) { + if (value instanceof File && name == null && options == null) { + return value; + } + return makeFile([await value.arrayBuffer()], name ?? value.name, { + type: value.type, + lastModified: value.lastModified, + ...options, + }); + } + 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); + 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/@anthropic-ai/sdk/internal/to-file.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..06a4f583ea1b2cb39b0c61131667ac2185147dcd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,EAAE;OAEhD,EAAE,gBAAgB,EAAE;AAmB3B;;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,KA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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/@anthropic-ai/sdk/internal/tslib.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/tslib.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/types.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e36497d9d3800d132c02babe05bf939ccbdad723 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts @@ -0,0 +1,67 @@ +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 = [unknown] extends [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 */ +type NodeFetchRequestInit = 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; +/** + * 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/@anthropic-ai/sdk/internal/types.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..4a49d62150820ddc2218396d0d7df708e47f2966 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAEnD;;GAEG;AACH,KAAK,oBAAoB,CAAC,CAAC,IACzB,CAAC,SAAS,CACR;IACE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC7B,CACF,GACC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GACb,CAAC,SAAS,CACV;IACE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC7B,CACF,GACC,CAAC,GAAG,CAAC,GAAG,CA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AG,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/@anthropic-ai/sdk/internal/types.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c24e26082a03bc0df688f932434789230e94a955 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts @@ -0,0 +1,67 @@ +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 = [unknown] extends [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 */ +type NodeFetchRequestInit = 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; +/** + * 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/@anthropic-ai/sdk/internal/types.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b2721d3715c9d00277c74c3f0827422cecd6fb18 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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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,kCAAkC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,qCAAqC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,wCAAwC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,2CAA2C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,8CAA8C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,iDAAiD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,oDAAoD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,uDAAuD,EAAE,WAAW,CAAC,CAAC;AAC/uB,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAG3E,KAAK,YAAY,GACb,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,GACtB,MAAM,CAAC,oBAAoB,CAAC,GAC5B,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/@anthropic-ai/sdk/internal/types.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/types.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/types.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/types.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/uploads.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..562fcd3d23f565e2cdb10a78fa6c0ae9f5c467b3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 { BaseAnthropic } 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: BaseAnthropic | Fetch) => Promise; +type MultipartFormRequestOptions = Omit & { + body: unknown; +}; +export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: BaseAnthropic | Fetch) => Promise; +export declare const createForm: >(body: T | undefined, fetch: BaseAnthropic | 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/@anthropic-ai/sdk/internal/uploads.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..60df146a0a18ce8502231b3e0b8b8ddd972e0720 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,aAAa,EAAE;AAG7B,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,aAAa,GAAG,KAAK,KAC3B,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,aAAa,GAAG,KAAK,KAC3B,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,aAAa,GAAG,KAAK,KAC3B,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/@anthropic-ai/sdk/internal/uploads.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c18a778f87076d6d6c11b107f5e18be03f84a689 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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 { BaseAnthropic } 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: BaseAnthropic | Fetch) => Promise; +type MultipartFormRequestOptions = Omit & { + body: unknown; +}; +export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: BaseAnthropic | Fetch) => Promise; +export declare const createForm: >(body: T | undefined, fetch: BaseAnthropic | 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/@anthropic-ai/sdk/internal/uploads.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3fa4048dbca24cec693c948b8a7c936fe7bf2651 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,EAAE;OAC/B,KAAK,EAAE,aAAa,EAAE;AAG7B,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,aAAa,GAAG,KAAK,KAC3B,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,aAAa,GAAG,KAAK,KAC3B,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,aAAa,GAAG,KAAK,KAC3B,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/@anthropic-ai/sdk/internal/uploads.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js new file mode 100644 index 0000000000000000000000000000000000000000..171a44557cd0a936abf81e48ef6f59e14742ad85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js @@ -0,0 +1,146 @@ +"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 = 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) { + let options = {}; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + form.append(key, makeFile([await value.blob()], getName(value), options)); + } + 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, makeFile([value], getName(value), { type: value.type })); + } + 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/@anthropic-ai/sdk/internal/uploads.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9727fcfc94a895e68619a0ad8068205789252969 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACjG,MAAM,IAAI,KAAK,CACb,wEAAwE;YACtE,CAAC,SAAS,CAAC,CA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/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9b86f31fa470173a455220e7f6cb57443294c7e7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs @@ -0,0 +1,136 @@ +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 = 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) { + let options = {}; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + form.append(key, makeFile([await value.blob()], getName(value), options)); + } + else if (isAsyncIterable(value)) { + form.append(key, makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value))); + } + else if (isNamedBlob(value)) { + form.append(key, makeFile([value], getName(value), { type: value.type })); + } + 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/@anthropic-ai/sdk/internal/uploads.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1b693277b46d49302026f2be6c8fd167216eb96d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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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,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5E,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/@anthropic-ai/sdk/internal/utils.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/internal/utils/base64.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..314847783aa0ea0dbcf420e2cbe2dac1db44b4c8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts @@ -0,0 +1,3 @@ +export declare const toBase64: (data: string | Uint8Array | null | undefined) => string; +export declare const fromBase64: (str: string) => Uint8Array; +//# sourceMappingURL=base64.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6398b47d8b2037110a5b6a911cb5db067c796482 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.mts","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,MAgBvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAgBxC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7649bb3bc34dfa0ee211522da088517c48d166c3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts @@ -0,0 +1,3 @@ +export declare const toBase64: (data: string | Uint8Array | null | undefined) => string; +export declare const fromBase64: (str: string) => Uint8Array; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..81019dfc7aa49d31d23d21848103b6b07d8a6af0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,MAgBvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAgBxC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js new file mode 100644 index 0000000000000000000000000000000000000000..c39e283ae2cf54e7395593bf439cbd4b11f5b771 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js @@ -0,0 +1,38 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromBase64 = exports.toBase64 = void 0; +const error_1 = require("../../core/error.js"); +const bytes_1 = require("./bytes.js"); +const toBase64 = (data) => { + if (!data) + return ''; + if (typeof globalThis.Buffer !== 'undefined') { + return globalThis.Buffer.from(data).toString('base64'); + } + if (typeof data === 'string') { + data = (0, bytes_1.encodeUTF8)(data); + } + if (typeof btoa !== 'undefined') { + return btoa(String.fromCharCode.apply(null, data)); + } + throw new error_1.AnthropicError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined'); +}; +exports.toBase64 = toBase64; +const fromBase64 = (str) => { + if (typeof globalThis.Buffer !== 'undefined') { + const buf = globalThis.Buffer.from(str, 'base64'); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + if (typeof atob !== 'undefined') { + const bstr = atob(str); + const buf = new Uint8Array(bstr.length); + for (let i = 0; i < bstr.length; i++) { + buf[i] = bstr.charCodeAt(i); + } + return buf; + } + throw new error_1.AnthropicError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined'); +}; +exports.fromBase64 = fromBase64; +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0a80b3629e789cc3a3d4778816ef6b197d0e6e03 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+CAAkD;AAClD,sCAAqC;AAE9B,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACtD,OAAQ,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,IAAI,sBAAc,CAAC,0EAA0E,CAAC,CAAC;AACvG,CAAC,CAAC;AAhBW,QAAA,QAAQ,YAgBnB;AAEK,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE;IACpD,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACtD,MAAM,GAAG,GAAI,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC3D,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,IAAI,sBAAc,CAAC,wEAAwE,CAAC,CAAC;AACrG,CAAC,CAAC;AAhBW,QAAA,UAAU,cAgBrB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7e1a83dfd00440ff8cd9eedaea05f550f8702976 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { AnthropicError } from "../../core/error.mjs"; +import { encodeUTF8 } from "./bytes.mjs"; +export const toBase64 = (data) => { + if (!data) + return ''; + if (typeof globalThis.Buffer !== 'undefined') { + return globalThis.Buffer.from(data).toString('base64'); + } + if (typeof data === 'string') { + data = encodeUTF8(data); + } + if (typeof btoa !== 'undefined') { + return btoa(String.fromCharCode.apply(null, data)); + } + throw new AnthropicError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined'); +}; +export const fromBase64 = (str) => { + if (typeof globalThis.Buffer !== 'undefined') { + const buf = globalThis.Buffer.from(str, 'base64'); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + if (typeof atob !== 'undefined') { + const bstr = atob(str); + const buf = new Uint8Array(bstr.length); + for (let i = 0; i < bstr.length; i++) { + buf[i] = bstr.charCodeAt(i); + } + return buf; + } + throw new AnthropicError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined'); +}; +//# sourceMappingURL=base64.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..15d0e96d3b1084cbc5eb74ca9ec9fe3b4c3c7bff --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.mjs","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,cAAc,EAAE;OAClB,EAAE,UAAU,EAAE;AAErB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;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AAC;IACb,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,wEAAwE,CAAC,CAAC;AACrG,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a6219ca298e2e1f1e6545fda6eab3b468ad4a69a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts @@ -0,0 +1,4 @@ +export declare function concatBytes(buffers: Uint8Array[]): Uint8Array; +export declare function encodeUTF8(str: string): Uint8Array; +export declare function decodeUTF8(bytes: Uint8Array): string; +//# sourceMappingURL=bytes.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..f554eb726da2af580822569424a03f5b1a3ec9c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.d.mts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,+BAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1dba564586b510100dba533c1b45a28a183821b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts @@ -0,0 +1,4 @@ +export declare function concatBytes(buffers: Uint8Array[]): Uint8Array; +export declare function encodeUTF8(str: string): Uint8Array; +export declare function decodeUTF8(bytes: Uint8Array): string; +//# sourceMappingURL=bytes.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..07fb5f776d332d4e33268b5b9300644579744463 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,+BAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js new file mode 100644 index 0000000000000000000000000000000000000000..80b5263a4b627a3108616759f00111a469a29730 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatBytes = concatBytes; +exports.encodeUTF8 = encodeUTF8; +exports.decodeUTF8 = decodeUTF8; +function concatBytes(buffers) { + let length = 0; + for (const buffer of buffers) { + length += buffer.length; + } + const output = new Uint8Array(length); + let index = 0; + for (const buffer of buffers) { + output.set(buffer, index); + index += buffer.length; + } + return output; +} +let encodeUTF8_; +function encodeUTF8(str) { + let encoder; + return (encodeUTF8_ ?? + ((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str); +} +let decodeUTF8_; +function decodeUTF8(bytes) { + let decoder; + return (decodeUTF8_ ?? + ((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes); +} +//# sourceMappingURL=bytes.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a80632e1d1e4028918a1adeb5f35ddace5676d41 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":";;AAAA,kCAaC;AAGD,gCAMC;AAGD,gCAMC;AA/BD,SAAgB,WAAW,CAAC,OAAqB;IAC/C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,IAAI,WAAwC,CAAC;AAC7C,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,GAAG,CAAC,CAAC;AACT,CAAC;AAED,IAAI,WAA0C,CAAC;AAC/C,SAAgB,UAAU,CAAC,KAAiB;IAC1C,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,KAAK,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5b9bb3896291322ed54c5c514c1ac31b731e493f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs @@ -0,0 +1,26 @@ +export function concatBytes(buffers) { + let length = 0; + for (const buffer of buffers) { + length += buffer.length; + } + const output = new Uint8Array(length); + let index = 0; + for (const buffer of buffers) { + output.set(buffer, index); + index += buffer.length; + } + return output; +} +let encodeUTF8_; +export function encodeUTF8(str) { + let encoder; + return (encodeUTF8_ ?? + ((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str); +} +let decodeUTF8_; +export function decodeUTF8(bytes) { + let decoder; + return (decodeUTF8_ ?? + ((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes); +} +//# sourceMappingURL=bytes.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..cd5fa7541bb03aa1b567176fb37afb745f21d624 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.mjs","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,OAAqB;IAC/C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,IAAI,WAAwC,CAAC;AAC7C,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,GAAG,CAAC,CAAC;AACT,CAAC;AAED,IAAI,WAA0C,CAAC;AAC/C,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,KAAK,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1238d47ba51a6c4db33d01c724063d57d66083ea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts @@ -0,0 +1,9 @@ +/** + * Read an environment variable. + * + * Trims beginning and trailing whitespace. + * + * Will return undefined if the environment variable doesn't exist or cannot be accessed. + */ +export declare const readEnv: (env: string) => string | undefined; +//# sourceMappingURL=env.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..58fa7dc2923016bed1bb050ba780eaab632decc0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"env.d.mts","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAQ9C,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..62c298576dd95f848ed9436305d08da00f53baef --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts @@ -0,0 +1,9 @@ +/** + * Read an environment variable. + * + * Trims beginning and trailing whitespace. + * + * Will return undefined if the environment variable doesn't exist or cannot be accessed. + */ +export declare const readEnv: (env: string) => string | undefined; +//# sourceMappingURL=env.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..d28ad528547253e4605dc72b2adf8f9d0e299b39 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAQ9C,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js new file mode 100644 index 0000000000000000000000000000000000000000..8d454732ae90c144f7f340146a6d04f28c26b90f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js @@ -0,0 +1,22 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readEnv = void 0; +/** + * Read an environment variable. + * + * Trims beginning and trailing whitespace. + * + * Will return undefined if the environment variable doesn't exist or cannot be accessed. + */ +const readEnv = (env) => { + if (typeof globalThis.process !== 'undefined') { + return globalThis.process.env?.[env]?.trim() ?? undefined; + } + if (typeof globalThis.Deno !== 'undefined') { + return globalThis.Deno.env?.get?.(env)?.trim(); + } + return undefined; +}; +exports.readEnv = readEnv; +//# sourceMappingURL=env.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ad559cac5a7d643304b728ca5340dd7302d39580 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map @@ -0,0 +1 @@ +{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF;;;;;;GAMG;AACI,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;IACD,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpD,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AARW,QAAA,OAAO,WAQlB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs new file mode 100644 index 0000000000000000000000000000000000000000..58ddfda1938916d13b3ec4c7672fdcfd34592f4d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +/** + * Read an environment variable. + * + * Trims beginning and trailing whitespace. + * + * Will return undefined if the environment variable doesn't exist or cannot be accessed. + */ +export const readEnv = (env) => { + if (typeof globalThis.process !== 'undefined') { + return globalThis.process.env?.[env]?.trim() ?? undefined; + } + if (typeof globalThis.Deno !== 'undefined') { + return globalThis.Deno.env?.get?.(env)?.trim(); + } + return undefined; +}; +//# sourceMappingURL=env.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ed884ae90fc201d242412a88aab177a7e2514633 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"env.mjs","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;IACD,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpD,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e7617f29cd0fbf5652a8ec91781950052fe78366 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts @@ -0,0 +1,37 @@ +import { type BaseAnthropic } from "../../client.mjs"; +import { RequestOptions } from "../request-options.mjs"; +type LogFn = (message: string, ...rest: unknown[]) => void; +export type Logger = { + error: LogFn; + warn: LogFn; + info: LogFn; + debug: LogFn; +}; +export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug'; +export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: BaseAnthropic) => LogLevel | undefined; +export declare function loggerFor(client: BaseAnthropic): Logger; +export declare const formatRequestDetails: (details: { + options?: RequestOptions | undefined; + headers?: Headers | Record | undefined; + retryOfRequestLogID?: string | undefined; + retryOf?: string | undefined; + url?: string | undefined; + status?: number | undefined; + method?: string | undefined; + durationMs?: number | undefined; + message?: unknown; + body?: unknown; +}) => { + options?: RequestOptions | undefined; + headers?: Headers | Record | undefined; + retryOfRequestLogID?: string | undefined; + retryOf?: string | undefined; + url?: string | undefined; + status?: number | undefined; + method?: string | undefined; + durationMs?: number | undefined; + message?: unknown; + body?: unknown; +}; +export {}; +//# sourceMappingURL=log.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..45eb4d40d5f21ed42be9727a9bfbf9e6ccb8693e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"log.d.mts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAUnE,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,GAAG,SAAS,EAC9B,YAAY,MAAM,EAClB,QAAQ,aAAa,KACpB,QAAQ,GAAG,SAab,CAAC;AAsBF,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAsBvD;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS;IAC5C,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACvD,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;cAVW,cAAc,GAAG,SAAS;cAC1B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;0BAChC,MAAM,GAAG,SAAS;cAC9B,MAAM,GAAG,SAAS;UACtB,MAAM,GAAG,SAAS;aACf,MAAM,GAAG,SAAS;aAClB,MAAM,GAAG,SAAS;iBACd,MAAM,GAAG,SAAS;cACrB,OAAO;WACV,OAAO;CA8Bf,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7dd351e7c0133a8901728ab382a5a5c3a9800fb1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts @@ -0,0 +1,37 @@ +import { type BaseAnthropic } from "../../client.js"; +import { RequestOptions } from "../request-options.js"; +type LogFn = (message: string, ...rest: unknown[]) => void; +export type Logger = { + error: LogFn; + warn: LogFn; + info: LogFn; + debug: LogFn; +}; +export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug'; +export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: BaseAnthropic) => LogLevel | undefined; +export declare function loggerFor(client: BaseAnthropic): Logger; +export declare const formatRequestDetails: (details: { + options?: RequestOptions | undefined; + headers?: Headers | Record | undefined; + retryOfRequestLogID?: string | undefined; + retryOf?: string | undefined; + url?: string | undefined; + status?: number | undefined; + method?: string | undefined; + durationMs?: number | undefined; + message?: unknown; + body?: unknown; +}) => { + options?: RequestOptions | undefined; + headers?: Headers | Record | undefined; + retryOfRequestLogID?: string | undefined; + retryOf?: string | undefined; + url?: string | undefined; + status?: number | undefined; + method?: string | undefined; + durationMs?: number | undefined; + message?: unknown; + body?: unknown; +}; +export {}; +//# sourceMappingURL=log.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..09813d1122727793dc52881319e423c586217909 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAA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-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js new file mode 100644 index 0000000000000000000000000000000000000000..67cb19c1e43c3851abd24245c9dcf560e126f430 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js @@ -0,0 +1,86 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatRequestDetails = exports.parseLogLevel = void 0; +exports.loggerFor = loggerFor; +const values_1 = require("./values.js"); +const levelNumbers = { + off: 0, + error: 200, + warn: 300, + info: 400, + debug: 500, +}; +const parseLogLevel = (maybeLevel, sourceName, client) => { + if (!maybeLevel) { + return undefined; + } + if ((0, values_1.hasOwn)(levelNumbers, maybeLevel)) { + return maybeLevel; + } + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); + return undefined; +}; +exports.parseLogLevel = parseLogLevel; +function noop() { } +function makeLogFn(fnLevel, logger, logLevel) { + if (!logger || levelNumbers[fnLevel] > levelNumbers[logLevel]) { + return noop; + } + else { + // Don't wrap logger functions, we want the stacktrace intact! + return logger[fnLevel].bind(logger); + } +} +const noopLogger = { + error: noop, + warn: noop, + info: noop, + debug: noop, +}; +let cachedLoggers = new WeakMap(); +function loggerFor(client) { + const logger = client.logger; + const logLevel = client.logLevel ?? 'off'; + if (!logger) { + return noopLogger; + } + const cachedLogger = cachedLoggers.get(logger); + if (cachedLogger && cachedLogger[0] === logLevel) { + return cachedLogger[1]; + } + const levelLogger = { + error: makeLogFn('error', logger, logLevel), + warn: makeLogFn('warn', logger, logLevel), + info: makeLogFn('info', logger, logLevel), + debug: makeLogFn('debug', logger, logLevel), + }; + cachedLoggers.set(logger, [logLevel, levelLogger]); + return levelLogger; +} +const formatRequestDetails = (details) => { + if (details.options) { + details.options = { ...details.options }; + delete details.options['headers']; // redundant + leaks internals + } + if (details.headers) { + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [ + name, + (name.toLowerCase() === 'x-api-key' || + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie') ? + '***' + : value, + ])); + } + if ('retryOfRequestLogID' in details) { + if (details.retryOfRequestLogID) { + details.retryOf = details.retryOfRequestLogID; + } + delete details.retryOfRequestLogID; + } + return details; +}; +exports.formatRequestDetails = formatRequestDetails; +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b861b8a76eed3ce8f216e0428c4a69ae0d582c79 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AA8DtF,8BAsBC;AAlFD,wCAAkC;AAalC,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC;AAEK,MAAM,aAAa,GAAG,CAC3B,UAA8B,EAC9B,UAAkB,EAClB,MAAqB,EACC,EAAE;IACxB,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,IAAA,eAAM,EAAC,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC;QACrC,OAA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CAAC,KAAK;SACR,CACF,CACF,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,IAAI,OAAO,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAChD,CAAC;QACD,OAAO,OAAO,CAAC,mBAAmB,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAxCW,QAAA,oBAAoB,wBAwC/B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6c51c1745417c93c053e8ba58e6df1a2603ab920 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs @@ -0,0 +1,80 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { hasOwn } from "./values.mjs"; +const levelNumbers = { + off: 0, + error: 200, + warn: 300, + info: 400, + debug: 500, +}; +export const parseLogLevel = (maybeLevel, sourceName, client) => { + if (!maybeLevel) { + return undefined; + } + if (hasOwn(levelNumbers, maybeLevel)) { + return maybeLevel; + } + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); + return undefined; +}; +function noop() { } +function makeLogFn(fnLevel, logger, logLevel) { + if (!logger || levelNumbers[fnLevel] > levelNumbers[logLevel]) { + return noop; + } + else { + // Don't wrap logger functions, we want the stacktrace intact! + return logger[fnLevel].bind(logger); + } +} +const noopLogger = { + error: noop, + warn: noop, + info: noop, + debug: noop, +}; +let cachedLoggers = new WeakMap(); +export function loggerFor(client) { + const logger = client.logger; + const logLevel = client.logLevel ?? 'off'; + if (!logger) { + return noopLogger; + } + const cachedLogger = cachedLoggers.get(logger); + if (cachedLogger && cachedLogger[0] === logLevel) { + return cachedLogger[1]; + } + const levelLogger = { + error: makeLogFn('error', logger, logLevel), + warn: makeLogFn('warn', logger, logLevel), + info: makeLogFn('info', logger, logLevel), + debug: makeLogFn('debug', logger, logLevel), + }; + cachedLoggers.set(logger, [logLevel, levelLogger]); + return levelLogger; +} +export const formatRequestDetails = (details) => { + if (details.options) { + details.options = { ...details.options }; + delete details.options['headers']; // redundant + leaks internals + } + if (details.headers) { + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [ + name, + (name.toLowerCase() === 'x-api-key' || + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie') ? + '***' + : value, + ])); + } + if ('retryOfRequestLogID' in details) { + if (details.retryOfRequestLogID) { + details.retryOf = details.retryOfRequestLogID; + } + delete details.retryOfRequestLogID; + } + return details; +}; +//# sourceMappingURL=log.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a6beba115c21aca3c84b7b6511cffbb926ffb3ef --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"log.mjs","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,MAAM,EAAE;AAajB,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC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,CACE,IAAI,CAAC,WAAW,EAAE,KAAK,WAAW;gBAClC,IAAI,CAAC,WAAW,EAAE,KAAK,eAAe;gBACtC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ;gBAC/B,IAAI,CAAC,WAAW,EAAE,KAAK,YAAY,CACpC,CAAC,CAAC;gBACD,KAAK;gBACP,CAAC,CAAC,KAAK;SACR,CACF,CACF,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,IAAI,OAAO,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAChD,CAAC;QACD,OAAO,OAAO,CAAC,mBAAmB,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a2482e912233e5b18b8a0ba25e5d646926425b69 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts @@ -0,0 +1,15 @@ +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +export declare function encodeURIPath(str: string): string; +export declare const createPathTagFunction: (pathEncoder?: typeof encodeURIPath) => (statics: readonly string[], ...params: readonly unknown[]) => string; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +export declare const path: (statics: readonly string[], ...params: readonly unknown[]) => string; +//# sourceMappingURL=path.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..dec06917e855384b8b5ffd95afe6cd0721cd8152 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"path.d.mts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAA2B,MACjD,SAAS,SAAS,MAAM,EAAE,EAAE,GAAG,QAAQ,SAAS,OAAO,EAAE,KAAG,MA4CzE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,YAjDQ,SAAS,MAAM,EAAE,aAAa,SAAS,OAAO,EAAE,KAAG,MAiDpB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..66ddc52b5d63f26ed9752afb6d209a67e202d5a3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts @@ -0,0 +1,15 @@ +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +export declare function encodeURIPath(str: string): string; +export declare const createPathTagFunction: (pathEncoder?: typeof encodeURIPath) => (statics: readonly string[], ...params: readonly unknown[]) => string; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +export declare const path: (statics: readonly string[], ...params: readonly unknown[]) => string; +//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7b0aee040c1d4c215b3605b7d0655038dee50c57 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAA2B,MACjD,SAAS,SAAS,MAAM,EAAE,EAAE,GAAG,QAAQ,SAAS,OAAO,EAAE,KAAG,MA4CzE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,YAjDQ,SAAS,MAAM,EAAE,aAAa,SAAS,OAAO,EAAE,KAAG,MAiDpB,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js new file mode 100644 index 0000000000000000000000000000000000000000..1f7e9e23deb003632ac9b90987867619196d80d9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.path = exports.createPathTagFunction = void 0; +exports.encodeURIPath = encodeURIPath; +const error_1 = require("../../core/error.js"); +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +function encodeURIPath(str) { + return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent); +} +const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) { + // If there are no params, no processing is needed. + if (statics.length === 1) + return statics[0]; + let postPath = false; + const path = statics.reduce((previousValue, currentValue, index) => { + if (/[?#]/.test(currentValue)) { + postPath = true; + } + return (previousValue + + currentValue + + (index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index])))); + }, ''); + const pathOnly = path.split(/[?#]/, 1)[0]; + const invalidSegments = []; + const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi; + let match; + // Find all invalid segments + while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) { + invalidSegments.push({ + start: match.index, + length: match[0].length, + }); + } + if (invalidSegments.length > 0) { + let lastEnd = 0; + const underline = invalidSegments.reduce((acc, segment) => { + const spaces = ' '.repeat(segment.start - lastEnd); + const arrows = '^'.repeat(segment.length); + lastEnd = segment.start + segment.length; + return acc + spaces + arrows; + }, ''); + throw new error_1.AnthropicError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`); + } + return path; +}; +exports.createPathTagFunction = createPathTagFunction; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +exports.path = (0, exports.createPathTagFunction)(encodeURIPath); +//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3bc25b1155e67e4179a6c2365d304e4ba98ed016 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":";;;AAUA,sCAEC;AAZD,+CAAkD;AAElD;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,OAAO,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC;AAC7E,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,WAAW,GAAG,aAAa,EAAE,EAAE,CACnE,SAAS,IAAI,CAAC,OAA0B,EAAE,GAAG,MAA0B;IACrE,mDAAmD;IACnD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAE,CAAC;IAE7C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;QACjE,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;QACD,OAAO,CACL,aAAa;YACb,YAAY;YACZ,CAAC,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,CA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J;;GAEG;AACU,QAAA,IAAI,GAAG,IAAA,6BAAqB,EAAC,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4da31c5122bad001eb482eb4c1f5eef793c23902 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs @@ -0,0 +1,53 @@ +import { AnthropicError } from "../../core/error.mjs"; +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +export function encodeURIPath(str) { + return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent); +} +export const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) { + // If there are no params, no processing is needed. + if (statics.length === 1) + return statics[0]; + let postPath = false; + const path = statics.reduce((previousValue, currentValue, index) => { + if (/[?#]/.test(currentValue)) { + postPath = true; + } + return (previousValue + + currentValue + + (index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index])))); + }, ''); + const pathOnly = path.split(/[?#]/, 1)[0]; + const invalidSegments = []; + const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi; + let match; + // Find all invalid segments + while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) { + invalidSegments.push({ + start: match.index, + length: match[0].length, + }); + } + if (invalidSegments.length > 0) { + let lastEnd = 0; + const underline = invalidSegments.reduce((acc, segment) => { + const spaces = ' '.repeat(segment.start - lastEnd); + const arrows = '^'.repeat(segment.length); + lastEnd = segment.start + segment.length; + return acc + spaces + arrows; + }, ''); + throw new AnthropicError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`); + } + return path; +}; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +export const path = createPathTagFunction(encodeURIPath); +//# sourceMappingURL=path.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ea8919dec04c7c4c6cf8ea75eb92e62c70b2b788 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"path.mjs","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;AAEzB;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,OAAO,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,WAAW,GAAG,aAAa,EAAE,EAAE,CACnE,SAAS,IAAI,CAAC,OAA0B,EAAE,GAAG,MAA0B;IACrE,mDAAmD;IACnD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAE,CAAC;IAE7C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;QACjE,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YA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GAAG,MAAM,GAAG,MAAM,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,IAAI,cAAc,CACtB,0DAA0D,IAAI,KAAK,SAAS,EAAE,CAC/E,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEJ;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..80b349379906ba00a2cac60607d10f11a4a56e02 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts @@ -0,0 +1,2 @@ +export declare const sleep: (ms: number) => Promise; +//# sourceMappingURL=sleep.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..c2eff131c1d7113774122aacccbf4698aa1dc6c2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.d.mts","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,kBAA4D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5471d72a685cfd0dd0bcbf0b1fbd6b726b460ab1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts @@ -0,0 +1,2 @@ +export declare const sleep: (ms: number) => Promise; +//# sourceMappingURL=sleep.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..80a85904367cb71bc3767bf8536fdc2dcfdef2a9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,kBAA4D,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js new file mode 100644 index 0000000000000000000000000000000000000000..45d1e13c88cc9295254524e40089846a6e9597c1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js @@ -0,0 +1,7 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = void 0; +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +exports.sleep = sleep; +//# sourceMappingURL=sleep.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a6890374140ba63405ea17684dc21e50ed98b12d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAE/E,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAAhF,QAAA,KAAK,SAA2E"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs new file mode 100644 index 0000000000000000000000000000000000000000..784954ac4e075f7a720282ac5b371ab965255d14 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +//# sourceMappingURL=sleep.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..abf0f4ae4234985dc95bad7a5d22f55d57e8284e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.mjs","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..80438fd395fa6907e3e682aebe4e20e26b3248c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts @@ -0,0 +1,5 @@ +/** + * https://stackoverflow.com/a/2117523 + */ +export declare let uuid4: () => any; +//# sourceMappingURL=uuid.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6076b266b3730026e0dac24f333fd0d2d0dcf977 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uuid.d.mts","sourceRoot":"","sources":["../../src/internal/utils/uuid.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,IAAI,KAAK,WAWf,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8939aa147508aab81aba6d46fd9e9dd8186263af --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts @@ -0,0 +1,5 @@ +/** + * https://stackoverflow.com/a/2117523 + */ +export declare let uuid4: () => any; +//# sourceMappingURL=uuid.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..32e5d3930980ccbb0e291a17f331dc2247491ba4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/internal/utils/uuid.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,IAAI,KAAK,WAWf,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js new file mode 100644 index 0000000000000000000000000000000000000000..b3a8468efeaaaea80192025f091a38261b06a68e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js @@ -0,0 +1,19 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uuid4 = void 0; +/** + * https://stackoverflow.com/a/2117523 + */ +let uuid4 = function () { + const { crypto } = globalThis; + if (crypto?.randomUUID) { + exports.uuid4 = crypto.randomUUID.bind(crypto); + return crypto.randomUUID(); + } + const u8 = new Uint8Array(1); + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0] : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16)); +}; +exports.uuid4 = uuid4; +//# sourceMappingURL=uuid.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1342b7741707d6a657b89deb5a833d0a5101fa7a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/internal/utils/uuid.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF;;GAEG;AACI,IAAI,KAAK,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,GAAG,UAAiB,CAAC;IACrC,IAAI,MAAM,EAAE,UAAU,EAAE,CAAC;QACvB,aAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACvG,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CACpE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CACtD,CAAC;AACJ,CAAC,CAAC;AAXS,QAAA,KAAK,SAWd"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4fe2cb2569e73445dde44bbf67db6b7d0783e149 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +/** + * https://stackoverflow.com/a/2117523 + */ +export let uuid4 = function () { + const { crypto } = globalThis; + if (crypto?.randomUUID) { + uuid4 = crypto.randomUUID.bind(crypto); + return crypto.randomUUID(); + } + const u8 = new Uint8Array(1); + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0] : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16)); +}; +//# sourceMappingURL=uuid.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..695815f4cc4173c521ec3d982cb12825436ffd64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uuid.mjs","sourceRoot":"","sources":["../../src/internal/utils/uuid.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF;;GAEG;AACH,MAAM,CAAC,IAAI,KAAK,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,GAAG,UAAiB,CAAC;IACrC,IAAI,MAAM,EAAE,UAAU,EAAE,CAAC;QACvB,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACvG,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CACpE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CACtD,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/@anthropic-ai/sdk/internal/utils/values.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d0ba2febe2f845c1682a63fde307ae63b0f82f5d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts @@ -0,0 +1,16 @@ +export declare const isAbsoluteURL: (url: string) => boolean; +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +export declare function maybeObj(x: unknown): object; +export declare function isEmptyObj(obj: Object | null | undefined): boolean; +export declare function hasOwn(obj: T, key: PropertyKey): key is keyof T; +export declare function isObj(obj: unknown): obj is Record; +export declare const ensurePresent: (value: T | null | undefined) => T; +export declare const validatePositiveInteger: (name: string, n: unknown) => number; +export declare const coerceInteger: (value: unknown) => number; +export declare const coerceFloat: (value: unknown) => number; +export declare const coerceBoolean: (value: unknown) => boolean; +export declare const maybeCoerceInteger: (value: unknown) => number | undefined; +export declare const maybeCoerceFloat: (value: unknown) => number | undefined; +export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined; +export declare const safeJSON: (text: string) => any; +//# sourceMappingURL=values.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..a27950f3000932f8d6e5911b88b88ae69f3c9949 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"values.d.mts","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,OAE3C,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAM3C;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIlE;AAGD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,GAAG,GAAG,IAAI,MAAM,CAAC,CAE1F;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,CAM9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,GAAG,OAAO,KAAG,MAQlE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,MAK9C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,OAI9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAK5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAK1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAAO,GAAG,SAK7D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,QAMpC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..27d6d6521ea12aafae8c4bb707e6ef53fef65059 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts @@ -0,0 +1,16 @@ +export declare const isAbsoluteURL: (url: string) => boolean; +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +export declare function maybeObj(x: unknown): object; +export declare function isEmptyObj(obj: Object | null | undefined): boolean; +export declare function hasOwn(obj: T, key: PropertyKey): key is keyof T; +export declare function isObj(obj: unknown): obj is Record; +export declare const ensurePresent: (value: T | null | undefined) => T; +export declare const validatePositiveInteger: (name: string, n: unknown) => number; +export declare const coerceInteger: (value: unknown) => number; +export declare const coerceFloat: (value: unknown) => number; +export declare const coerceBoolean: (value: unknown) => boolean; +export declare const maybeCoerceInteger: (value: unknown) => number | undefined; +export declare const maybeCoerceFloat: (value: unknown) => number | undefined; +export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined; +export declare const safeJSON: (text: string) => any; +//# sourceMappingURL=values.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ee48ffe9e38657775618ee2179bf722511fe799b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,OAE3C,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAM3C;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIlE;AAGD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,GAAG,GAAG,IAAI,MAAM,CAAC,CAE1F;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,CAM9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,GAAG,OAAO,KAAG,MAQlE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,MAK9C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,OAI9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAK5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAK1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAAO,GAAG,SAK7D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,QAMpC,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js new file mode 100644 index 0000000000000000000000000000000000000000..49f73d904e2981eee73959ad1e5eb6bc480208f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js @@ -0,0 +1,109 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.safeJSON = exports.maybeCoerceBoolean = exports.maybeCoerceFloat = exports.maybeCoerceInteger = exports.coerceBoolean = exports.coerceFloat = exports.coerceInteger = exports.validatePositiveInteger = exports.ensurePresent = exports.isAbsoluteURL = void 0; +exports.maybeObj = maybeObj; +exports.isEmptyObj = isEmptyObj; +exports.hasOwn = hasOwn; +exports.isObj = isObj; +const error_1 = require("../../core/error.js"); +// https://url.spec.whatwg.org/#url-scheme-string +const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i; +const isAbsoluteURL = (url) => { + return startsWithSchemeRegexp.test(url); +}; +exports.isAbsoluteURL = isAbsoluteURL; +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +function maybeObj(x) { + if (typeof x !== 'object') { + return {}; + } + return x ?? {}; +} +// https://stackoverflow.com/a/34491287 +function isEmptyObj(obj) { + if (!obj) + return true; + for (const _k in obj) + return false; + return true; +} +// https://eslint.org/docs/latest/rules/no-prototype-builtins +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} +function isObj(obj) { + return obj != null && typeof obj === 'object' && !Array.isArray(obj); +} +const ensurePresent = (value) => { + if (value == null) { + throw new error_1.AnthropicError(`Expected a value to be given but received ${value} instead.`); + } + return value; +}; +exports.ensurePresent = ensurePresent; +const validatePositiveInteger = (name, n) => { + if (typeof n !== 'number' || !Number.isInteger(n)) { + throw new error_1.AnthropicError(`${name} must be an integer`); + } + if (n < 0) { + throw new error_1.AnthropicError(`${name} must be a positive integer`); + } + return n; +}; +exports.validatePositiveInteger = validatePositiveInteger; +const coerceInteger = (value) => { + if (typeof value === 'number') + return Math.round(value); + if (typeof value === 'string') + return parseInt(value, 10); + throw new error_1.AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; +exports.coerceInteger = coerceInteger; +const coerceFloat = (value) => { + if (typeof value === 'number') + return value; + if (typeof value === 'string') + return parseFloat(value); + throw new error_1.AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; +exports.coerceFloat = coerceFloat; +const coerceBoolean = (value) => { + if (typeof value === 'boolean') + return value; + if (typeof value === 'string') + return value === 'true'; + return Boolean(value); +}; +exports.coerceBoolean = coerceBoolean; +const maybeCoerceInteger = (value) => { + if (value === undefined) { + return undefined; + } + return (0, exports.coerceInteger)(value); +}; +exports.maybeCoerceInteger = maybeCoerceInteger; +const maybeCoerceFloat = (value) => { + if (value === undefined) { + return undefined; + } + return (0, exports.coerceFloat)(value); +}; +exports.maybeCoerceFloat = maybeCoerceFloat; +const maybeCoerceBoolean = (value) => { + if (value === undefined) { + return undefined; + } + return (0, exports.coerceBoolean)(value); +}; +exports.maybeCoerceBoolean = maybeCoerceBoolean; +const safeJSON = (text) => { + try { + return JSON.parse(text); + } + catch (err) { + return undefined; + } +}; +exports.safeJSON = safeJSON; +//# sourceMappingURL=values.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a4c534330a12d91be2f69ef9bf4f8ccfd3643067 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map @@ -0,0 +1 @@ +{"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAYtF,4BAMC;AAGD,gCAIC;AAGD,wBAEC;AAED,sBAEC;AAhCD,+CAAkD;AAElD,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAE/C,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IACpD,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,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OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACrE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B;AAEK,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAuB,EAAE;IACxE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;IACvC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8555f50fbe3a1930c6ec0545e0f9a372a96536c2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { AnthropicError } from "../../core/error.mjs"; +// https://url.spec.whatwg.org/#url-scheme-string +const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i; +export const isAbsoluteURL = (url) => { + return startsWithSchemeRegexp.test(url); +}; +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +export function maybeObj(x) { + if (typeof x !== 'object') { + return {}; + } + return x ?? {}; +} +// https://stackoverflow.com/a/34491287 +export function isEmptyObj(obj) { + if (!obj) + return true; + for (const _k in obj) + return false; + return true; +} +// https://eslint.org/docs/latest/rules/no-prototype-builtins +export function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} +export function isObj(obj) { + return obj != null && typeof obj === 'object' && !Array.isArray(obj); +} +export const ensurePresent = (value) => { + if (value == null) { + throw new AnthropicError(`Expected a value to be given but received ${value} instead.`); + } + return value; +}; +export const validatePositiveInteger = (name, n) => { + if (typeof n !== 'number' || !Number.isInteger(n)) { + throw new AnthropicError(`${name} must be an integer`); + } + if (n < 0) { + throw new AnthropicError(`${name} must be a positive integer`); + } + return n; +}; +export const coerceInteger = (value) => { + if (typeof value === 'number') + return Math.round(value); + if (typeof value === 'string') + return parseInt(value, 10); + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; +export const coerceFloat = (value) => { + if (typeof value === 'number') + return value; + if (typeof value === 'string') + return parseFloat(value); + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; +export const coerceBoolean = (value) => { + if (typeof value === 'boolean') + return value; + if (typeof value === 'string') + return value === 'true'; + return Boolean(value); +}; +export const maybeCoerceInteger = (value) => { + if (value === undefined) { + return undefined; + } + return coerceInteger(value); +}; +export const maybeCoerceFloat = (value) => { + if (value === undefined) { + return undefined; + } + return coerceFloat(value); +}; +export const maybeCoerceBoolean = (value) => { + if (value === undefined) { + return undefined; + } + return coerceBoolean(value); +}; +export const safeJSON = (text) => { + try { + return JSON.parse(text); + } + catch (err) { + return undefined; + } +}; +//# sourceMappingURL=values.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e1623117af4b2d6903747282b349973d6b1cf3ab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"values.mjs","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,cAAc,EAAE;AAEzB,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IACpD,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,UAAU,CAAC,GAA8B;IACvD,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,KAAK,MAAM,EAAE,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,MAAM,CAA4B,GAAM,EAAE,GAAgB;IACxE,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CA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sdk/lib/BetaMessageStream.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0528031f21fee82cb7fdf1079ff45e8991bd4591 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { type BetaContentBlock, Messages as BetaMessages, type BetaMessage, type BetaRawMessageStreamEvent as BetaMessageStreamEvent, type BetaMessageParam, type MessageCreateParams as BetaMessageCreateParams, type MessageCreateParamsBase as BetaMessageCreateParamsBase, type BetaTextCitation, type BetaToolUseBlock, type BetaServerToolUseBlock, type BetaMCPToolUseBlock } from "../resources/beta/messages/messages.mjs"; +import { type RequestOptions } from "../internal/request-options.mjs"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: BetaMessage) => void; + contentBlock: (content: BetaContentBlock) => void; + finalMessage: (message: BetaMessage) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock; +export declare class BetaMessageStream implements AsyncIterable { + #private; + messages: BetaMessageParam[]; + receivedMessages: BetaMessage[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: BetaMessageStream; + response: Response; + request_id: string | null | 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): BetaMessageStream; + static createMessage(messages: BetaMessages, params: BetaMessageCreateParamsBase, options?: RequestOptions): BetaMessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: BetaMessageParam): void; + protected _addMessage(message: BetaMessage, emit?: boolean): void; + protected _createMessage(messages: BetaMessages, params: BetaMessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): 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 : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): BetaMessage | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=BetaMessageStream.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..8053b32091d2691e166ea58f19cbe2be19473a66 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.d.mts","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,gBAAgB,EACrB,QAAQ,IAAI,YAAY,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,IAAI,sBAAsB,EACxD,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,IAAI,uBAAuB,EACnD,KAAK,uBAAuB,IAAI,2BAA2B,EAE3D,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB;OAGM,EAAE,KAAK,cAAc,EAAE;AAE9B,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,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CAAC,KAAK,CAAC,GAAG,IAAI;IAOvG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,mBAAmB,EAC7C,KAAK,EAAE,KAAK,GACX,OAAO,CACR,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAClE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GACxD,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,cAAc,IAAI,WAAW,GAAG,SAAS,CAE5C;IASD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,WAAW,CAAC;IAmB1C;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BlC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,mBAAmB,EACrD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA8CjD,SAAS,CAAC,UAAU;cAqFJ,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAoIhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,sBAAsB,CAAC;IA6D/D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dbf3c5f1d48a4c42049914f7fe3f38374f569c14 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.js"; +import { type BetaContentBlock, Messages as BetaMessages, type BetaMessage, type BetaRawMessageStreamEvent as BetaMessageStreamEvent, type BetaMessageParam, type MessageCreateParams as BetaMessageCreateParams, type MessageCreateParamsBase as BetaMessageCreateParamsBase, type BetaTextCitation, type BetaToolUseBlock, type BetaServerToolUseBlock, type BetaMCPToolUseBlock } from "../resources/beta/messages/messages.js"; +import { type RequestOptions } from "../internal/request-options.js"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: BetaMessage) => void; + contentBlock: (content: BetaContentBlock) => void; + finalMessage: (message: BetaMessage) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock; +export declare class BetaMessageStream implements AsyncIterable { + #private; + messages: BetaMessageParam[]; + receivedMessages: BetaMessage[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: BetaMessageStream; + response: Response; + request_id: string | null | 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): BetaMessageStream; + static createMessage(messages: BetaMessages, params: BetaMessageCreateParamsBase, options?: RequestOptions): BetaMessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: BetaMessageParam): void; + protected _addMessage(message: BetaMessage, emit?: boolean): void; + protected _createMessage(messages: BetaMessages, params: BetaMessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): 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 : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): BetaMessage | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=BetaMessageStream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f1047d00d8107c2ffda0605abd2826d2ec437d80 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.d.ts","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,gBAAgB,EACrB,QAAQ,IAAI,YAAY,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,IAAI,sBAAsB,EACxD,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,IAAI,uBAAuB,EACnD,KAAK,uBAAuB,IAAI,2BAA2B,EAE3D,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB;OAGM,EAAE,KAAK,cAAc,EAAE;AAE9B,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5E,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,IAAI,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G,KAAK,GAClE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GACxD,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,cAAc,IAAI,WAAW,GAAG,SAAS,CAE5C;IASD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,WAAW,CAAC;IAmB1C;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BlC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,mBAAmB,EACrD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA8CjD,SAAS,CAAC,UAAU;cAqFJ,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAoIhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,sBAAsB,CAAC;IA6D/D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js new file mode 100644 index 0000000000000000000000000000000000000000..12de056a8307b6253d8ecf089f66c5608b64c511 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js @@ -0,0 +1,562 @@ +"use strict"; +var _BetaMessageStream_instances, _BetaMessageStream_currentMessageSnapshot, _BetaMessageStream_connectedPromise, _BetaMessageStream_resolveConnectedPromise, _BetaMessageStream_rejectConnectedPromise, _BetaMessageStream_endPromise, _BetaMessageStream_resolveEndPromise, _BetaMessageStream_rejectEndPromise, _BetaMessageStream_listeners, _BetaMessageStream_ended, _BetaMessageStream_errored, _BetaMessageStream_aborted, _BetaMessageStream_catchingPromiseCreated, _BetaMessageStream_response, _BetaMessageStream_request_id, _BetaMessageStream_getFinalMessage, _BetaMessageStream_getFinalText, _BetaMessageStream_handleError, _BetaMessageStream_beginRequest, _BetaMessageStream_addStreamEvent, _BetaMessageStream_endRequest, _BetaMessageStream_accumulateMessage; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BetaMessageStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const errors_1 = require("../internal/errors.js"); +const error_1 = require("../error.js"); +const streaming_1 = require("../streaming.js"); +const parser_1 = require("../_vendor/partial-json-parser/parser.js"); +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use'; +} +class BetaMessageStream { + constructor() { + _BetaMessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _BetaMessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _BetaMessageStream_connectedPromise.set(this, void 0); + _BetaMessageStream_resolveConnectedPromise.set(this, () => { }); + _BetaMessageStream_rejectConnectedPromise.set(this, () => { }); + _BetaMessageStream_endPromise.set(this, void 0); + _BetaMessageStream_resolveEndPromise.set(this, () => { }); + _BetaMessageStream_rejectEndPromise.set(this, () => { }); + _BetaMessageStream_listeners.set(this, {}); + _BetaMessageStream_ended.set(this, false); + _BetaMessageStream_errored.set(this, false); + _BetaMessageStream_aborted.set(this, false); + _BetaMessageStream_catchingPromiseCreated.set(this, false); + _BetaMessageStream_response.set(this, void 0); + _BetaMessageStream_request_id.set(this, void 0); + _BetaMessageStream_handleError.set(this, (error) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_errored, true, "f"); + if ((0, errors_1.isAbortError)(error)) { + error = new error_1.APIUserAbortError(); + } + if (error instanceof error_1.APIUserAbortError) { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof error_1.AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new error_1.AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new error_1.AnthropicError(String(error))); + }); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_connectedPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_resolveConnectedPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_endPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_resolveEndPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_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, _BetaMessageStream_connectedPromise, "f").catch(() => { }); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_response, "f"); + } + get request_id() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * 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 BetaMessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new BetaMessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_response, response, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_request_id, response?.headers.get('request-id'), "f"); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_ended, "f"); + } + get errored() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_errored, "f"); + } + get aborted() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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, _BetaMessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + await tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f"); + } + get currentMessage() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_ended, "f")) + return; + if (event === 'end') { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_ended, true, "f"); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_resolveEndPromise, "f").call(this); + } + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_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, _BetaMessageStream_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.final...() + // - etc. + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).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, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + this._connected(null); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + [(_BetaMessageStream_currentMessageSnapshot = new WeakMap(), _BetaMessageStream_connectedPromise = new WeakMap(), _BetaMessageStream_resolveConnectedPromise = new WeakMap(), _BetaMessageStream_rejectConnectedPromise = new WeakMap(), _BetaMessageStream_endPromise = new WeakMap(), _BetaMessageStream_resolveEndPromise = new WeakMap(), _BetaMessageStream_rejectEndPromise = new WeakMap(), _BetaMessageStream_listeners = new WeakMap(), _BetaMessageStream_ended = new WeakMap(), _BetaMessageStream_errored = new WeakMap(), _BetaMessageStream_aborted = new WeakMap(), _BetaMessageStream_catchingPromiseCreated = new WeakMap(), _BetaMessageStream_response = new WeakMap(), _BetaMessageStream_request_id = new WeakMap(), _BetaMessageStream_handleError = new WeakMap(), _BetaMessageStream_instances = new WeakSet(), _BetaMessageStream_getFinalMessage = function _BetaMessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _BetaMessageStream_getFinalText = function _BetaMessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _BetaMessageStream_beginRequest = function _BetaMessageStream_beginRequest() { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + }, _BetaMessageStream_addStreamEvent = function _BetaMessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _BetaMessageStream_endRequest = function _BetaMessageStream_endRequest() { + if (this.ended) { + throw new error_1.AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new error_1.AnthropicError(`request ended without sending any chunks`); + } + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _BetaMessageStream_accumulateMessage = function _BetaMessageStream_accumulateMessage(event) { + let snapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.container = event.delta.container; + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + try { + snapshotContent.input = (0, parser_1.partialParse)(jsonBuf); + } + catch (err) { + const error = new error_1.AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_handleError, "f").call(this, error); + } + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (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 }; + }, + }; + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +exports.BetaMessageStream = BetaMessageStream; +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=BetaMessageStream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1314520b2d76b8de29f16f9fc80bc6cd9850bb30 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.js","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":";;;;;AAAA,kDAAkD;AAClD,uCAA6D;AAe7D,+CAAsC;AACtC,qEAAqE;AAwBrE,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAIvC,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,KAAK,iBAAiB,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC;AAC9G,CAAC;AAED,MAAa,iBAAiB;IAwB5B;;QAvBA,aAAQ,GAAuB,EAAE,CAAC;QAClC,qBAAgB,GAAkB,EAAE,CAAC;QACrC,4DAAiD;QAEjD,eAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;QAEpD,sDAA4C;QAC5C,qDAAgE,GAAG,EAAE,GAAE,CAAC,EAAC;QACzE,oDAA2D,GAAG,EAAE,GAA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O,EAAE,MAAM,EAAE,EAAE,CACzE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CACpC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChG,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;gBACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AAroBD,8CAqoBC;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..255949d06ff56cabe71ad1959267e08ab58b9ebc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs @@ -0,0 +1,558 @@ +var _BetaMessageStream_instances, _BetaMessageStream_currentMessageSnapshot, _BetaMessageStream_connectedPromise, _BetaMessageStream_resolveConnectedPromise, _BetaMessageStream_rejectConnectedPromise, _BetaMessageStream_endPromise, _BetaMessageStream_resolveEndPromise, _BetaMessageStream_rejectEndPromise, _BetaMessageStream_listeners, _BetaMessageStream_ended, _BetaMessageStream_errored, _BetaMessageStream_aborted, _BetaMessageStream_catchingPromiseCreated, _BetaMessageStream_response, _BetaMessageStream_request_id, _BetaMessageStream_getFinalMessage, _BetaMessageStream_getFinalText, _BetaMessageStream_handleError, _BetaMessageStream_beginRequest, _BetaMessageStream_addStreamEvent, _BetaMessageStream_endRequest, _BetaMessageStream_accumulateMessage; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { isAbortError } from "../internal/errors.mjs"; +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { Stream } from "../streaming.mjs"; +import { partialParse } from "../_vendor/partial-json-parser/parser.mjs"; +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use'; +} +export class BetaMessageStream { + constructor() { + _BetaMessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _BetaMessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _BetaMessageStream_connectedPromise.set(this, void 0); + _BetaMessageStream_resolveConnectedPromise.set(this, () => { }); + _BetaMessageStream_rejectConnectedPromise.set(this, () => { }); + _BetaMessageStream_endPromise.set(this, void 0); + _BetaMessageStream_resolveEndPromise.set(this, () => { }); + _BetaMessageStream_rejectEndPromise.set(this, () => { }); + _BetaMessageStream_listeners.set(this, {}); + _BetaMessageStream_ended.set(this, false); + _BetaMessageStream_errored.set(this, false); + _BetaMessageStream_aborted.set(this, false); + _BetaMessageStream_catchingPromiseCreated.set(this, false); + _BetaMessageStream_response.set(this, void 0); + _BetaMessageStream_request_id.set(this, void 0); + _BetaMessageStream_handleError.set(this, (error) => { + __classPrivateFieldSet(this, _BetaMessageStream_errored, true, "f"); + if (isAbortError(error)) { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + __classPrivateFieldSet(this, _BetaMessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new AnthropicError(String(error))); + }); + __classPrivateFieldSet(this, _BetaMessageStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _BetaMessageStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + __classPrivateFieldSet(this, _BetaMessageStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _BetaMessageStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_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, _BetaMessageStream_connectedPromise, "f").catch(() => { }); + __classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return __classPrivateFieldGet(this, _BetaMessageStream_response, "f"); + } + get request_id() { + return __classPrivateFieldGet(this, _BetaMessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await __classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * 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 BetaMessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new BetaMessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, __classPrivateFieldGet(this, _BetaMessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + __classPrivateFieldSet(this, _BetaMessageStream_response, response, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_request_id, response?.headers.get('request-id'), "f"); + __classPrivateFieldGet(this, _BetaMessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return __classPrivateFieldGet(this, _BetaMessageStream_ended, "f"); + } + get errored() { + return __classPrivateFieldGet(this, _BetaMessageStream_errored, "f"); + } + get aborted() { + return __classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_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 MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _BetaMessageStream_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, _BetaMessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + __classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f"); + } + get currentMessage() { + return __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (__classPrivateFieldGet(this, _BetaMessageStream_ended, "f")) + return; + if (event === 'end') { + __classPrivateFieldSet(this, _BetaMessageStream_ended, true, "f"); + __classPrivateFieldGet(this, _BetaMessageStream_resolveEndPromise, "f").call(this); + } + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (listeners) { + __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!__classPrivateFieldGet(this, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + __classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _BetaMessageStream_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, _BetaMessageStream_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.final...() + // - etc. + Promise.reject(error); + } + __classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).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, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + this._connected(null); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + [(_BetaMessageStream_currentMessageSnapshot = new WeakMap(), _BetaMessageStream_connectedPromise = new WeakMap(), _BetaMessageStream_resolveConnectedPromise = new WeakMap(), _BetaMessageStream_rejectConnectedPromise = new WeakMap(), _BetaMessageStream_endPromise = new WeakMap(), _BetaMessageStream_resolveEndPromise = new WeakMap(), _BetaMessageStream_rejectEndPromise = new WeakMap(), _BetaMessageStream_listeners = new WeakMap(), _BetaMessageStream_ended = new WeakMap(), _BetaMessageStream_errored = new WeakMap(), _BetaMessageStream_aborted = new WeakMap(), _BetaMessageStream_catchingPromiseCreated = new WeakMap(), _BetaMessageStream_response = new WeakMap(), _BetaMessageStream_request_id = new WeakMap(), _BetaMessageStream_handleError = new WeakMap(), _BetaMessageStream_instances = new WeakSet(), _BetaMessageStream_getFinalMessage = function _BetaMessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _BetaMessageStream_getFinalText = function _BetaMessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _BetaMessageStream_beginRequest = function _BetaMessageStream_beginRequest() { + if (this.ended) + return; + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + }, _BetaMessageStream_addStreamEvent = function _BetaMessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _BetaMessageStream_endRequest = function _BetaMessageStream_endRequest() { + if (this.ended) { + throw new AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new AnthropicError(`request ended without sending any chunks`); + } + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _BetaMessageStream_accumulateMessage = function _BetaMessageStream_accumulateMessage(event) { + let snapshot = __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.container = event.delta.container; + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + try { + snapshotContent.input = partialParse(jsonBuf); + } + catch (err) { + const error = new AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`); + __classPrivateFieldGet(this, _BetaMessageStream_handleError, "f").call(this, error); + } + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (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 }; + }, + }; + } + toReadableStream() { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=BetaMessageStream.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..7d17f85b219ad13422e843707383d4b46082fd0a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.mjs","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":";;OAAO,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE,iBAAiB,EAAE;OAerC,EAAE,MAAM,EAAE;OACV,EAAE,YAAY,EAAE;AAwBvB,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAIvC,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,KAAK,iBAAiB,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC;AAC9G,CAAC;AAED,MAAM,OAAO,iBAAiB;IAwB5B;;QAvBA,aAAQ,GAAuB,EAAE,CAAC;QAClC,qBAAgB,GAAkB,EAAE,CAAC;QACrC,4DAAiD;QAEjD,eAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;QAEpD,sDAA4C;QAC5C,qDAAgE,GAAG,EAAE,GAAE,CAAC,EAAC;QACzE,oDAA2D,GAAG,EAAE,GAAE,CAAC,EAAC;QAEpE,gDAA2B;QAC3B,+CAAiC,GAAG,EAAE,GAAE,CAAC,EAAC;QAC1C,8CAAqD,GAAG,EAAE,GAAE,CAAC,EAAC;QAE9D,uCAA4F,EAAE,EAAC;QAE/F,mCAAS,KAAK,EAAC;QACf,qCAAW,KAAK,EAAC;QACjB,qCAAW,KAAK,EAAC;QACjB,oDAA0B,KAAK,EAAC;QAChC,8CAAuC;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I,EAAE,CAAC,CAAC,CAAC;gBAChG,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;gBACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2307a24a1b614e289961d123b10a4081e8505867 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { type ContentBlock, Messages, type Message, type MessageStreamEvent, type MessageParam, type MessageCreateParams, type MessageCreateParamsBase, type TextCitation, type ToolUseBlock, type ServerToolUseBlock } from "../resources/messages.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: MessageStreamEvent, snapshot: Message) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: TextCitation, citationsSnapshot: TextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: Message) => void; + contentBlock: (content: ContentBlock) => void; + finalMessage: (message: Message) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = ToolUseBlock | ServerToolUseBlock; +export declare class MessageStream implements AsyncIterable { + #private; + messages: MessageParam[]; + receivedMessages: Message[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: MessageStream; + response: Response; + request_id: string | null | 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): MessageStream; + static createMessage(messages: Messages, params: MessageCreateParamsBase, options?: RequestOptions): MessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: MessageParam): void; + protected _addMessage(message: Message, emit?: boolean): void; + protected _createMessage(messages: Messages, params: MessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): 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 : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): Message | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=MessageStream.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..de73379ed6d4051983fac398e15515e626b22a3c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.d.mts","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":"OACO,EAA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B,CAAC;IA6D3D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..92a1b3becb057f468d3c6c3a64140d25a0b9fa5f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.js"; +import { type ContentBlock, Messages, type Message, type MessageStreamEvent, type MessageParam, type MessageCreateParams, type MessageCreateParamsBase, type TextCitation, type ToolUseBlock, type ServerToolUseBlock } from "../resources/messages.js"; +import { RequestOptions } from "../internal/request-options.js"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: MessageStreamEvent, snapshot: Message) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: TextCitation, citationsSnapshot: TextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: Message) => void; + contentBlock: (content: ContentBlock) => void; + finalMessage: (message: Message) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = ToolUseBlock | ServerToolUseBlock; +export declare class MessageStream implements AsyncIterable { + #private; + messages: MessageParam[]; + receivedMessages: Message[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: MessageStream; + response: Response; + request_id: string | null | 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): MessageStream; + static createMessage(messages: Messages, params: MessageCreateParamsBase, options?: RequestOptions): MessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: MessageParam): void; + protected _addMessage(message: Message, emit?: boolean): void; + protected _createMessage(messages: Messages, params: MessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): 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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): 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 : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): Message | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=MessageStream.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..df738d425fb1d02b93596ba7ac8e9a1abcfabac8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.d.ts","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB;OAGM,EAAE,cAAc,EAAE;AAEzB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC9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,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GACxD,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,cAAc,IAAI,OAAO,GAAG,SAAS,CAExC;IASD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;IAmBtC;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BlC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,mBAAmB,EACrD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA8CjD,SAAS,CAAC,UAAU;cAqFJ,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IA8HhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,kBAAkB,CAAC;IA6D3D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js new file mode 100644 index 0000000000000000000000000000000000000000..33a950aafdda7810e783e1e01543045d2ed94e8a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js @@ -0,0 +1,556 @@ +"use strict"; +var _MessageStream_instances, _MessageStream_currentMessageSnapshot, _MessageStream_connectedPromise, _MessageStream_resolveConnectedPromise, _MessageStream_rejectConnectedPromise, _MessageStream_endPromise, _MessageStream_resolveEndPromise, _MessageStream_rejectEndPromise, _MessageStream_listeners, _MessageStream_ended, _MessageStream_errored, _MessageStream_aborted, _MessageStream_catchingPromiseCreated, _MessageStream_response, _MessageStream_request_id, _MessageStream_getFinalMessage, _MessageStream_getFinalText, _MessageStream_handleError, _MessageStream_beginRequest, _MessageStream_addStreamEvent, _MessageStream_endRequest, _MessageStream_accumulateMessage; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const errors_1 = require("../internal/errors.js"); +const error_1 = require("../error.js"); +const streaming_1 = require("../streaming.js"); +const parser_1 = require("../_vendor/partial-json-parser/parser.js"); +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use'; +} +class MessageStream { + constructor() { + _MessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _MessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _MessageStream_connectedPromise.set(this, void 0); + _MessageStream_resolveConnectedPromise.set(this, () => { }); + _MessageStream_rejectConnectedPromise.set(this, () => { }); + _MessageStream_endPromise.set(this, void 0); + _MessageStream_resolveEndPromise.set(this, () => { }); + _MessageStream_rejectEndPromise.set(this, () => { }); + _MessageStream_listeners.set(this, {}); + _MessageStream_ended.set(this, false); + _MessageStream_errored.set(this, false); + _MessageStream_aborted.set(this, false); + _MessageStream_catchingPromiseCreated.set(this, false); + _MessageStream_response.set(this, void 0); + _MessageStream_request_id.set(this, void 0); + _MessageStream_handleError.set(this, (error) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_errored, true, "f"); + if ((0, errors_1.isAbortError)(error)) { + error = new error_1.APIUserAbortError(); + } + if (error instanceof error_1.APIUserAbortError) { + tslib_1.__classPrivateFieldSet(this, _MessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof error_1.AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new error_1.AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new error_1.AnthropicError(String(error))); + }); + tslib_1.__classPrivateFieldSet(this, _MessageStream_connectedPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_resolveConnectedPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_endPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_resolveEndPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_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, _MessageStream_connectedPromise, "f").catch(() => { }); + tslib_1.__classPrivateFieldGet(this, _MessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_response, "f"); + } + get request_id() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await tslib_1.__classPrivateFieldGet(this, _MessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * 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 MessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new MessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, tslib_1.__classPrivateFieldGet(this, _MessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _MessageStream_response, response, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_request_id, response?.headers.get('request-id'), "f"); + tslib_1.__classPrivateFieldGet(this, _MessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_ended, "f"); + } + get errored() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_errored, "f"); + } + get aborted() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _MessageStream_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, _MessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + tslib_1.__classPrivateFieldSet(this, _MessageStream_catchingPromiseCreated, true, "f"); + await tslib_1.__classPrivateFieldGet(this, _MessageStream_endPromise, "f"); + } + get currentMessage() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (tslib_1.__classPrivateFieldGet(this, _MessageStream_ended, "f")) + return; + if (event === 'end') { + tslib_1.__classPrivateFieldSet(this, _MessageStream_ended, true, "f"); + tslib_1.__classPrivateFieldGet(this, _MessageStream_resolveEndPromise, "f").call(this); + } + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_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, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _MessageStream_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, _MessageStream_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.final...() + // - etc. + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).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, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + this._connected(null); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + [(_MessageStream_currentMessageSnapshot = new WeakMap(), _MessageStream_connectedPromise = new WeakMap(), _MessageStream_resolveConnectedPromise = new WeakMap(), _MessageStream_rejectConnectedPromise = new WeakMap(), _MessageStream_endPromise = new WeakMap(), _MessageStream_resolveEndPromise = new WeakMap(), _MessageStream_rejectEndPromise = new WeakMap(), _MessageStream_listeners = new WeakMap(), _MessageStream_ended = new WeakMap(), _MessageStream_errored = new WeakMap(), _MessageStream_aborted = new WeakMap(), _MessageStream_catchingPromiseCreated = new WeakMap(), _MessageStream_response = new WeakMap(), _MessageStream_request_id = new WeakMap(), _MessageStream_handleError = new WeakMap(), _MessageStream_instances = new WeakSet(), _MessageStream_getFinalMessage = function _MessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _MessageStream_getFinalText = function _MessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _MessageStream_beginRequest = function _MessageStream_beginRequest() { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + }, _MessageStream_addStreamEvent = function _MessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _MessageStream_endRequest = function _MessageStream_endRequest() { + if (this.ended) { + throw new error_1.AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new error_1.AnthropicError(`request ended without sending any chunks`); + } + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _MessageStream_accumulateMessage = function _MessageStream_accumulateMessage(event) { + let snapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + // Update other usage fields if they exist in the event + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + snapshotContent.input = (0, parser_1.partialParse)(jsonBuf); + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (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 }; + }, + }; + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +exports.MessageStream = MessageStream; +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=MessageStream.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..394af9066ab1a4c2ccfbe8ec9a77830f332e5bd0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.js","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":";;;;;AAAA,kDAAkD;AAClD,uC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EAAE,CAAC;oBACtB,IAAI,IAAI,EAAE,CAAC;wBACT,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;oBAC1C,CAAC;oBACD,OAAO,IAAI,OAAO,CAAiC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CACrE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CACpC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChG,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;gBACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AA/nBD,sCA+nBC;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..aa1190f5cb8ea03e5d6ced15ece5c3aec6ae3b61 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs @@ -0,0 +1,552 @@ +var _MessageStream_instances, _MessageStream_currentMessageSnapshot, _MessageStream_connectedPromise, _MessageStream_resolveConnectedPromise, _MessageStream_rejectConnectedPromise, _MessageStream_endPromise, _MessageStream_resolveEndPromise, _MessageStream_rejectEndPromise, _MessageStream_listeners, _MessageStream_ended, _MessageStream_errored, _MessageStream_aborted, _MessageStream_catchingPromiseCreated, _MessageStream_response, _MessageStream_request_id, _MessageStream_getFinalMessage, _MessageStream_getFinalText, _MessageStream_handleError, _MessageStream_beginRequest, _MessageStream_addStreamEvent, _MessageStream_endRequest, _MessageStream_accumulateMessage; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { isAbortError } from "../internal/errors.mjs"; +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { Stream } from "../streaming.mjs"; +import { partialParse } from "../_vendor/partial-json-parser/parser.mjs"; +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use'; +} +export class MessageStream { + constructor() { + _MessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _MessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _MessageStream_connectedPromise.set(this, void 0); + _MessageStream_resolveConnectedPromise.set(this, () => { }); + _MessageStream_rejectConnectedPromise.set(this, () => { }); + _MessageStream_endPromise.set(this, void 0); + _MessageStream_resolveEndPromise.set(this, () => { }); + _MessageStream_rejectEndPromise.set(this, () => { }); + _MessageStream_listeners.set(this, {}); + _MessageStream_ended.set(this, false); + _MessageStream_errored.set(this, false); + _MessageStream_aborted.set(this, false); + _MessageStream_catchingPromiseCreated.set(this, false); + _MessageStream_response.set(this, void 0); + _MessageStream_request_id.set(this, void 0); + _MessageStream_handleError.set(this, (error) => { + __classPrivateFieldSet(this, _MessageStream_errored, true, "f"); + if (isAbortError(error)) { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + __classPrivateFieldSet(this, _MessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new AnthropicError(String(error))); + }); + __classPrivateFieldSet(this, _MessageStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _MessageStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet(this, _MessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + __classPrivateFieldSet(this, _MessageStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _MessageStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet(this, _MessageStream_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, _MessageStream_connectedPromise, "f").catch(() => { }); + __classPrivateFieldGet(this, _MessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return __classPrivateFieldGet(this, _MessageStream_response, "f"); + } + get request_id() { + return __classPrivateFieldGet(this, _MessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await __classPrivateFieldGet(this, _MessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * 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 MessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new MessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, __classPrivateFieldGet(this, _MessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + __classPrivateFieldSet(this, _MessageStream_response, response, "f"); + __classPrivateFieldSet(this, _MessageStream_request_id, response?.headers.get('request-id'), "f"); + __classPrivateFieldGet(this, _MessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return __classPrivateFieldGet(this, _MessageStream_ended, "f"); + } + get errored() { + return __classPrivateFieldGet(this, _MessageStream_errored, "f"); + } + get aborted() { + return __classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = __classPrivateFieldGet(this, _MessageStream_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 MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _MessageStream_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, _MessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + __classPrivateFieldSet(this, _MessageStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet(this, _MessageStream_endPromise, "f"); + } + get currentMessage() { + return __classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (__classPrivateFieldGet(this, _MessageStream_ended, "f")) + return; + if (event === 'end') { + __classPrivateFieldSet(this, _MessageStream_ended, true, "f"); + __classPrivateFieldGet(this, _MessageStream_resolveEndPromise, "f").call(this); + } + const listeners = __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event]; + if (listeners) { + __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!__classPrivateFieldGet(this, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + __classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _MessageStream_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, _MessageStream_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.final...() + // - etc. + Promise.reject(error); + } + __classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _MessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).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, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + this._connected(null); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + [(_MessageStream_currentMessageSnapshot = new WeakMap(), _MessageStream_connectedPromise = new WeakMap(), _MessageStream_resolveConnectedPromise = new WeakMap(), _MessageStream_rejectConnectedPromise = new WeakMap(), _MessageStream_endPromise = new WeakMap(), _MessageStream_resolveEndPromise = new WeakMap(), _MessageStream_rejectEndPromise = new WeakMap(), _MessageStream_listeners = new WeakMap(), _MessageStream_ended = new WeakMap(), _MessageStream_errored = new WeakMap(), _MessageStream_aborted = new WeakMap(), _MessageStream_catchingPromiseCreated = new WeakMap(), _MessageStream_response = new WeakMap(), _MessageStream_request_id = new WeakMap(), _MessageStream_handleError = new WeakMap(), _MessageStream_instances = new WeakSet(), _MessageStream_getFinalMessage = function _MessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _MessageStream_getFinalText = function _MessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _MessageStream_beginRequest = function _MessageStream_beginRequest() { + if (this.ended) + return; + __classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + }, _MessageStream_addStreamEvent = function _MessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = __classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + __classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _MessageStream_endRequest = function _MessageStream_endRequest() { + if (this.ended) { + throw new AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = __classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new AnthropicError(`request ended without sending any chunks`); + } + __classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _MessageStream_accumulateMessage = function _MessageStream_accumulateMessage(event) { + let snapshot = __classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + // Update other usage fields if they exist in the event + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + snapshotContent.input = partialParse(jsonBuf); + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (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 }; + }, + }; + } + toReadableStream() { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=MessageStream.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8a7edef7a25d8e05043c7065d20306587ae9307f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.mjs","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":";;OAAO,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE,iBAAiB,EAAE;OAcrC,EAAE,MAAM,EAAE;OACV,EAAE,YAA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OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;oBAC1C,CAAC;oBACD,OAAO,IAAI,OAAO,CAAiC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CACrE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CACpC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChG,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;gBACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f9ac55599514942ec01c0892b1f95132640927cb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map new file mode 100644 index 0000000000000000000000000000000000000000..39006edfece4f50278c008918868c55a52721ae6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.js","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,+DAAkC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9498d5db89001a918eb2b599c37ae69487f2fda --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts @@ -0,0 +1,2 @@ +export * from "./core/resource.js"; +//# 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/@anthropic-ai/sdk/resource.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b4d42c632198d243db9e91340a7e8d503c4aa7ce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.js.map new file mode 100644 index 0000000000000000000000000000000000000000..09d4cc288fbd608d91b01c5970c3610e253fee91 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,6DAAgC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e91a02056f091f7ff0680236e99fd5fc301b2bce --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/beta/beta.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7b8e42cbc344ecdad49ecaaaf31068fc4835a535 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts @@ -0,0 +1,61 @@ +import { APIResource } from "../../core/resource.mjs"; +import * as FilesAPI from "./files.mjs"; +import { DeletedFile, FileDeleteParams, FileDownloadParams, FileListParams, FileMetadata, FileMetadataPage, FileRetrieveMetadataParams, FileUploadParams, Files } from "./files.mjs"; +import * as ModelsAPI from "./models.mjs"; +import { BetaModelInfo, BetaModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from "./models.mjs"; +import * as MessagesAPI from "./messages/messages.mjs"; +import { BetaBase64ImageSource, BetaBase64PDFBlock, BetaBase64PDFSource, BetaCacheControlEphemeral, BetaCacheCreation, BetaCitationCharLocation, BetaCitationCharLocationParam, BetaCitationContentBlockLocation, BetaCitationContentBlockLocationParam, BetaCitationPageLocation, BetaCitationPageLocationParam, BetaCitationWebSearchResultLocationParam, BetaCitationsConfigParam, BetaCitationsDelta, BetaCitationsWebSearchResultLocation, BetaCodeExecutionOutputBlock, BetaCodeExecutionOutputBlockParam, BetaCodeExecutionResultBlock, BetaCodeExecutionResultBlockParam, BetaCodeExecutionTool20250522, BetaCodeExecutionToolResultBlock, BetaCodeExecutionToolResultBlockContent, BetaCodeExecutionToolResultBlockParam, BetaCodeExecutionToolResultBlockParamContent, BetaCodeExecutionToolResultError, BetaCodeExecutionToolResultErrorCode, BetaCodeExecutionToolResultErrorParam, BetaContainer, BetaContainerUploadBlock, BetaContainerUploadBlockParam, BetaContentBlock, BetaContentBlockParam, BetaContentBlockSource, BetaContentBlockSourceContent, BetaFileDocumentSource, BetaFileImageSource, BetaImageBlockParam, BetaInputJSONDelta, BetaMCPToolResultBlock, BetaMCPToolUseBlock, BetaMCPToolUseBlockParam, BetaMessage, BetaMessageDeltaUsage, BetaMessageParam, BetaMessageTokensCount, BetaMetadata, BetaPlainTextSource, BetaRawContentBlockDelta, BetaRawContentBlockDeltaEvent, BetaRawContentBlockStartEvent, BetaRawContentBlockStopEvent, BetaRawMessageDeltaEvent, BetaRawMessageStartEvent, BetaRawMessageStopEvent, BetaRawMessageStreamEvent, BetaRedactedThinkingBlock, BetaRedactedThinkingBlockParam, BetaRequestDocumentBlock, BetaRequestMCPServerToolConfiguration, BetaRequestMCPServerURLDefinition, BetaRequestMCPToolResultBlockParam, BetaServerToolUsage, BetaServerToolUseBlock, BetaServerToolUseBlockParam, BetaSignatureDelta, BetaStopReason, BetaTextBlock, BetaTextBlockParam, BetaTextCitation, BetaTextCitationParam, BetaTextDelta, BetaThinkingBlock, BetaThinkingBlockParam, BetaThinkingConfigDisabled, BetaThinkingConfigEnabled, BetaThinkingConfigParam, BetaThinkingDelta, BetaTool, BetaToolBash20241022, BetaToolBash20250124, BetaToolChoice, BetaToolChoiceAny, BetaToolChoiceAuto, BetaToolChoiceNone, BetaToolChoiceTool, BetaToolComputerUse20241022, BetaToolComputerUse20250124, BetaToolResultBlockParam, BetaToolTextEditor20241022, BetaToolTextEditor20250124, BetaToolTextEditor20250429, BetaToolUnion, BetaToolUseBlock, BetaToolUseBlockParam, BetaURLImageSource, BetaURLPDFSource, BetaUsage, BetaWebSearchResultBlock, BetaWebSearchResultBlockParam, BetaWebSearchTool20250305, BetaWebSearchToolRequestError, BetaWebSearchToolResultBlock, BetaWebSearchToolResultBlockContent, BetaWebSearchToolResultBlockParam, BetaWebSearchToolResultBlockParamContent, BetaWebSearchToolResultError, BetaWebSearchToolResultErrorCode, MessageCountTokensParams, MessageCreateParams, MessageCreateParamsNonStreaming, MessageCreateParamsStreaming, Messages } from "./messages/messages.mjs"; +export declare class Beta extends APIResource { + models: ModelsAPI.Models; + messages: MessagesAPI.Messages; + files: FilesAPI.Files; +} +export type AnthropicBeta = (string & {}) | 'message-batches-2024-09-24' | 'prompt-caching-2024-07-31' | 'computer-use-2024-10-22' | 'computer-use-2025-01-24' | 'pdfs-2024-09-25' | 'token-counting-2024-11-01' | 'token-efficient-tools-2025-02-19' | 'output-128k-2025-02-19' | 'files-api-2025-04-14' | 'mcp-client-2025-04-04' | 'dev-full-thinking-2025-05-14' | 'interleaved-thinking-2025-05-14' | 'code-execution-2025-05-22' | 'extended-cache-ttl-2025-04-11'; +export interface BetaAPIError { + message: string; + type: 'api_error'; +} +export interface BetaAuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BetaBillingError { + message: string; + type: 'billing_error'; +} +export type BetaError = BetaInvalidRequestError | BetaAuthenticationError | BetaBillingError | BetaPermissionError | BetaNotFoundError | BetaRateLimitError | BetaGatewayTimeoutError | BetaAPIError | BetaOverloadedError; +export interface BetaErrorResponse { + error: BetaError; + type: 'error'; +} +export interface BetaGatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface BetaInvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface BetaNotFoundError { + message: string; + type: 'not_found_error'; +} +export interface BetaOverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface BetaPermissionError { + message: string; + type: 'permission_error'; +} +export interface BetaRateLimitError { + message: string; + type: 'rate_limit_error'; +} +export declare namespace Beta { + export { type AnthropicBeta as AnthropicBeta, type BetaAPIError as BetaAPIError, type BetaAuthenticationError as BetaAuthenticationError, type BetaBillingError as BetaBillingError, type BetaError as BetaError, type BetaErrorResponse as BetaErrorResponse, type BetaGatewayTimeoutError as BetaGatewayTimeoutError, type BetaInvalidRequestError as BetaInvalidRequestError, type BetaNotFoundError as BetaNotFoundError, type BetaOverloadedError as BetaOverloadedError, type BetaPermissionError as BetaPermissionError, type BetaRateLimitError as BetaRateLimitError, }; + export { Models as Models, type BetaModelInfo as BetaModelInfo, type BetaModelInfosPage as BetaModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; + export { Messages as Messages, type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaContainer as BetaContainer, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Files as Files, type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/beta.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..19ef48ada53aa7ba5d325324471f121c338ffaab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAg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,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..55637241db843bb2912478d5c500b9a5a5dd0fa6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts @@ -0,0 +1,61 @@ +import { APIResource } from "../../core/resource.js"; +import * as FilesAPI from "./files.js"; +import { DeletedFile, FileDeleteParams, FileDownloadParams, FileListParams, FileMetadata, FileMetadataPage, FileRetrieveMetadataParams, FileUploadParams, Files } from "./files.js"; +import * as ModelsAPI from "./models.js"; +import { BetaModelInfo, BetaModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from "./models.js"; +import * as MessagesAPI from "./messages/messages.js"; +import { BetaBase64ImageSource, BetaBase64PDFBlock, BetaBase64PDFSource, BetaCacheControlEphemeral, BetaCacheCreation, BetaCitationCharLocation, BetaCitationCharLocationParam, BetaCitationContentBlockLocation, BetaCitationContentBlockLocationParam, BetaCitationPageLocation, BetaCitationPageLocationParam, BetaCitationWebSearchResultLocationParam, BetaCitationsConfigParam, BetaCitationsDelta, BetaCitationsWebSearchResultLocation, BetaCodeExecutionOutputBlock, BetaCodeExecutionOutputBlockParam, BetaCodeExecutionResultBlock, BetaCodeExecutionResultBlockParam, BetaCodeExecutionTool20250522, BetaCodeExecutionToolResultBlock, BetaCodeExecutionToolResultBlockContent, BetaCodeExecutionToolResultBlockParam, BetaCodeExecutionToolResultBlockParamContent, BetaCodeExecutionToolResultError, BetaCodeExecutionToolResultErrorCode, BetaCodeExecutionToolResultErrorParam, BetaContainer, BetaContainerUploadBlock, BetaContainerUploadBlockParam, BetaContentBlock, BetaContentBlockParam, BetaContentBlockSource, BetaContentBlockSourceContent, BetaFileDocumentSource, BetaFileImageSource, BetaImageBlockParam, BetaInputJSONDelta, BetaMCPToolResultBlock, BetaMCPToolUseBlock, BetaMCPToolUseBlockParam, BetaMessage, BetaMessageDeltaUsage, BetaMessageParam, BetaMessageTokensCount, BetaMetadata, BetaPlainTextSource, BetaRawContentBlockDelta, BetaRawContentBlockDeltaEvent, BetaRawContentBlockStartEvent, BetaRawContentBlockStopEvent, BetaRawMessageDeltaEvent, BetaRawMessageStartEvent, BetaRawMessageStopEvent, BetaRawMessageStreamEvent, BetaRedactedThinkingBlock, BetaRedactedThinkingBlockParam, BetaRequestDocumentBlock, BetaRequestMCPServerToolConfiguration, BetaRequestMCPServerURLDefinition, BetaRequestMCPToolResultBlockParam, BetaServerToolUsage, BetaServerToolUseBlock, BetaServerToolUseBlockParam, BetaSignatureDelta, BetaStopReason, BetaTextBlock, BetaTextBlockParam, BetaTextCitation, BetaTextCitationParam, BetaTextDelta, BetaThinkingBlock, BetaThinkingBlockParam, BetaThinkingConfigDisabled, BetaThinkingConfigEnabled, BetaThinkingConfigParam, BetaThinkingDelta, BetaTool, BetaToolBash20241022, BetaToolBash20250124, BetaToolChoice, BetaToolChoiceAny, BetaToolChoiceAuto, BetaToolChoiceNone, BetaToolChoiceTool, BetaToolComputerUse20241022, BetaToolComputerUse20250124, BetaToolResultBlockParam, BetaToolTextEditor20241022, BetaToolTextEditor20250124, BetaToolTextEditor20250429, BetaToolUnion, BetaToolUseBlock, BetaToolUseBlockParam, BetaURLImageSource, BetaURLPDFSource, BetaUsage, BetaWebSearchResultBlock, BetaWebSearchResultBlockParam, BetaWebSearchTool20250305, BetaWebSearchToolRequestError, BetaWebSearchToolResultBlock, BetaWebSearchToolResultBlockContent, BetaWebSearchToolResultBlockParam, BetaWebSearchToolResultBlockParamContent, BetaWebSearchToolResultError, BetaWebSearchToolResultErrorCode, MessageCountTokensParams, MessageCreateParams, MessageCreateParamsNonStreaming, MessageCreateParamsStreaming, Messages } from "./messages/messages.js"; +export declare class Beta extends APIResource { + models: ModelsAPI.Models; + messages: MessagesAPI.Messages; + files: FilesAPI.Files; +} +export type AnthropicBeta = (string & {}) | 'message-batches-2024-09-24' | 'prompt-caching-2024-07-31' | 'computer-use-2024-10-22' | 'computer-use-2025-01-24' | 'pdfs-2024-09-25' | 'token-counting-2024-11-01' | 'token-efficient-tools-2025-02-19' | 'output-128k-2025-02-19' | 'files-api-2025-04-14' | 'mcp-client-2025-04-04' | 'dev-full-thinking-2025-05-14' | 'interleaved-thinking-2025-05-14' | 'code-execution-2025-05-22' | 'extended-cache-ttl-2025-04-11'; +export interface BetaAPIError { + message: string; + type: 'api_error'; +} +export interface BetaAuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BetaBillingError { + message: string; + type: 'billing_error'; +} +export type BetaError = BetaInvalidRequestError | BetaAuthenticationError | BetaBillingError | BetaPermissionError | BetaNotFoundError | BetaRateLimitError | BetaGatewayTimeoutError | BetaAPIError | BetaOverloadedError; +export interface BetaErrorResponse { + error: BetaError; + type: 'error'; +} +export interface BetaGatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface BetaInvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface BetaNotFoundError { + message: string; + type: 'not_found_error'; +} +export interface BetaOverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface BetaPermissionError { + message: string; + type: 'permission_error'; +} +export interface BetaRateLimitError { + message: string; + type: 'rate_limit_error'; +} +export declare namespace Beta { + export { type AnthropicBeta as AnthropicBeta, type BetaAPIError as BetaAPIError, type BetaAuthenticationError as BetaAuthenticationError, type BetaBillingError as BetaBillingError, type BetaError as BetaError, type BetaErrorResponse as BetaErrorResponse, type BetaGatewayTimeoutError as BetaGatewayTimeoutError, type BetaInvalidRequestError as BetaInvalidRequestError, type BetaNotFoundError as BetaNotFoundError, type BetaOverloadedError as BetaOverloadedError, type BetaPermissionError as BetaPermissionError, type BetaRateLimitError as BetaRateLimitError, }; + export { Models as Models, type BetaModelInfo as BetaModelInfo, type BetaModelInfosPage as BetaModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; + export { Messages as Messages, type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaContainer as BetaContainer, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Files as Files, type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/beta.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..29a2e734f84e6c38f30e948b7c110011aab892a3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,KAAK,EACN;OACM,KAAK,SAAS;OACd,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE;OACnF,KAAK,WAAW;OAChB,EACL,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EAChC,qCAAqC,EACrC,wBAAwB,EACxB,6BAA6B,EAC7B,wCAAwC,EACxC,wBAAwB,EACxB,kBAAkB,EAClB,oCAAoC,EACpC,4BAA4B,EAC5B,iCAAiC,EACjC,4BAA4B,EAC5B,iCAAiC,EACjC,6BAA6B,EAC7B,gCAAgC,EAChC,uCAAuC,EACvC,qCAAqC,EACrC,4CAA4C,EAC5C,gCAAgC,EAChC,oCAAoC,EACpC,qCAAqC,EACrC,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAs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BAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js new file mode 100644 index 0000000000000000000000000000000000000000..f8247b524dc28573ca8f5ddd36de9d5783d9a86a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js @@ -0,0 +1,25 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Beta = void 0; +const tslib_1 = require("../../internal/tslib.js"); +const resource_1 = require("../../core/resource.js"); +const FilesAPI = tslib_1.__importStar(require("./files.js")); +const files_1 = require("./files.js"); +const ModelsAPI = tslib_1.__importStar(require("./models.js")); +const models_1 = require("./models.js"); +const MessagesAPI = tslib_1.__importStar(require("./messages/messages.js")); +const messages_1 = require("./messages/messages.js"); +class Beta extends resource_1.APIResource { + constructor() { + super(...arguments); + this.models = new ModelsAPI.Models(this._client); + this.messages = new MessagesAPI.Messages(this._client); + this.files = new FilesAPI.Files(this._client); + } +} +exports.Beta = Beta; +Beta.Models = models_1.Models; +Beta.Messages = messages_1.Messages; +Beta.Files = files_1.Files; +//# 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/@anthropic-ai/sdk/resources/beta/beta.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e915d87fae506ae2ab3f7dac86eb414548859528 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAUiB;AACjB,+DAAsC;AACtC,wCAA2G;AAC3G,4EAAmD;AACnD,qDAiH6B;AAE7B,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAJD,oBAIC;AA0FD,IAAI,CAAC,MAAM,GAAG,eAAM,CAAC;AACrB,IAAI,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACzB,IAAI,CAAC,KAAK,GAAG,aAAK,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7b3a50b67f0cd1c5cd0dd55d994c3f818613c011 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../../core/resource.mjs"; +import * as FilesAPI from "./files.mjs"; +import { Files, } from "./files.mjs"; +import * as ModelsAPI from "./models.mjs"; +import { Models } from "./models.mjs"; +import * as MessagesAPI from "./messages/messages.mjs"; +import { Messages, } from "./messages/messages.mjs"; +export class Beta extends APIResource { + constructor() { + super(...arguments); + this.models = new ModelsAPI.Models(this._client); + this.messages = new MessagesAPI.Messages(this._client); + this.files = new FilesAPI.Files(this._client); + } +} +Beta.Models = Models; +Beta.Messages = Messages; +Beta.Files = Files; +//# 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/@anthropic-ai/sdk/resources/beta/beta.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..757d2f6a5adb8f26cc8df3bff989571d9fc892f2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.mjs","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EASL,KAAK,GACN;OACM,KAAK,SAAS;OACd,EAA2E,MAAM,EAAE;OACnF,KAAK,WAAW;OAChB,EAgHL,QAAQ,GACT;AAED,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AA0FD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5a837dfd281cc856b258e6e6b2d4c92f76219d30 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts @@ -0,0 +1,151 @@ +import { APIResource } from "../../core/resource.mjs"; +import * as BetaAPI from "./beta.mjs"; +import { APIPromise } from "../../core/api-promise.mjs"; +import { Page, type PageParams, 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 { + /** + * List Files + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const fileMetadata of client.beta.files.list()) { + * // ... + * } + * ``` + */ + list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete File + * + * @example + * ```ts + * const deletedFile = await client.beta.files.delete( + * 'file_id', + * ); + * ``` + */ + delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Download File + * + * @example + * ```ts + * const response = await client.beta.files.download( + * 'file_id', + * ); + * + * const content = await response.blob(); + * console.log(content); + * ``` + */ + download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Get File Metadata + * + * @example + * ```ts + * const fileMetadata = + * await client.beta.files.retrieveMetadata('file_id'); + * ``` + */ + retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Upload File + * + * @example + * ```ts + * const fileMetadata = await client.beta.files.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(params: FileUploadParams, options?: RequestOptions): APIPromise; +} +export type FileMetadataPage = Page; +export interface DeletedFile { + /** + * ID of the deleted file. + */ + id: string; + /** + * Deleted object type. + * + * For file deletion, this is always `"file_deleted"`. + */ + type?: 'file_deleted'; +} +export interface FileMetadata { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing when the file was created. + */ + created_at: string; + /** + * Original filename of the uploaded file. + */ + filename: string; + /** + * MIME type of the file. + */ + mime_type: string; + /** + * Size of the file in bytes. + */ + size_bytes: number; + /** + * Object type. + * + * For files, this is always `"file"`. + */ + type: 'file'; + /** + * Whether the file can be downloaded. + */ + downloadable?: boolean; +} +export interface FileListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileDownloadParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileRetrieveMetadataParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileUploadParams { + /** + * Body param: The file to upload + */ + file: Uploadable; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Files { + export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/files.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5280519f673f14220ef53ebc9c712016e36032e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map @@ -0,0 +1 @@ +{"version":3,"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BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..324a7c21670ad136254d3ca2df01016628591162 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts @@ -0,0 +1,151 @@ +import { APIResource } from "../../core/resource.js"; +import * as BetaAPI from "./beta.js"; +import { APIPromise } from "../../core/api-promise.js"; +import { Page, type PageParams, 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 { + /** + * List Files + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const fileMetadata of client.beta.files.list()) { + * // ... + * } + * ``` + */ + list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete File + * + * @example + * ```ts + * const deletedFile = await client.beta.files.delete( + * 'file_id', + * ); + * ``` + */ + delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Download File + * + * @example + * ```ts + * const response = await client.beta.files.download( + * 'file_id', + * ); + * + * const content = await response.blob(); + * console.log(content); + * ``` + */ + download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Get File Metadata + * + * @example + * ```ts + * const fileMetadata = + * await client.beta.files.retrieveMetadata('file_id'); + * ``` + */ + retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Upload File + * + * @example + * ```ts + * const fileMetadata = await client.beta.files.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(params: FileUploadParams, options?: RequestOptions): APIPromise; +} +export type FileMetadataPage = Page; +export interface DeletedFile { + /** + * ID of the deleted file. + */ + id: string; + /** + * Deleted object type. + * + * For file deletion, this is always `"file_deleted"`. + */ + type?: 'file_deleted'; +} +export interface FileMetadata { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing when the file was created. + */ + created_at: string; + /** + * Original filename of the uploaded file. + */ + filename: string; + /** + * MIME type of the file. + */ + mime_type: string; + /** + * Size of the file in bytes. + */ + size_bytes: number; + /** + * Object type. + * + * For files, this is always `"file"`. + */ + type: 'file'; + /** + * Whether the file can be downloaded. + */ + downloadable?: boolean; +} +export interface FileListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileDownloadParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileRetrieveMetadataParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface FileUploadParams { + /** + * Body param: The file to upload + */ + file: Uploadable; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Files { + export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/files.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..97a07aa4fb1b53e3e2fa0d9a42bfba74041292e0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OACtC,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,MAAM,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gBAAgB,EAAE,YAAY,CAAC;IAY9C;;;;;;;;;OASG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;IAW1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC;IAevB;;;;;;;;OAQG;IACH,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAW3B;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAiBrF;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;AAElD,MAAM,WAAW,W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C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.js new file mode 100644 index 0000000000000000000000000000000000000000..4f316b8ddcc247eb10eb67ef35730841bf30c732 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.js @@ -0,0 +1,122 @@ +"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 uploads_1 = require("../../internal/uploads.js"); +const path_1 = require("../../internal/utils/path.js"); +class Files extends resource_1.APIResource { + /** + * List Files + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const fileMetadata of client.beta.files.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/files', (pagination_1.Page), { + query, + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Delete File + * + * @example + * ```ts + * const deletedFile = await client.beta.files.delete( + * 'file_id', + * ); + * ``` + */ + delete(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.delete((0, path_1.path) `/v1/files/${fileID}`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Download File + * + * @example + * ```ts + * const response = await client.beta.files.download( + * 'file_id', + * ); + * + * const content = await response.blob(); + * console.log(content); + * ``` + */ + download(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/files/${fileID}/content`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { + 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + __binaryResponse: true, + }); + } + /** + * Get File Metadata + * + * @example + * ```ts + * const fileMetadata = + * await client.beta.files.retrieveMetadata('file_id'); + * ``` + */ + retrieveMetadata(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/files/${fileID}`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Upload File + * + * @example + * ```ts + * const fileMetadata = await client.beta.files.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/files', (0, uploads_1.multipartFormRequestOptions)({ + body, + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }, this._client)); + } +} +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/@anthropic-ai/sdk/resources/beta/files.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map new file mode 100644 index 0000000000000000000000000000000000000000..664910fadd48b2c6ebf2fb4e34151fc7445dd793 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map @@ -0,0 +1 @@ +{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/beta/files.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,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;CACF;AAvID,sBAuIC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9079f55b2c6d274be3923b5d5042c4ffcd2848ed --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs @@ -0,0 +1,118 @@ +// 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 { buildHeaders } from "../../internal/headers.mjs"; +import { multipartFormRequestOptions } from "../../internal/uploads.mjs"; +import { path } from "../../internal/utils/path.mjs"; +export class Files extends APIResource { + /** + * List Files + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const fileMetadata of client.beta.files.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/files', (Page), { + query, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Delete File + * + * @example + * ```ts + * const deletedFile = await client.beta.files.delete( + * 'file_id', + * ); + * ``` + */ + delete(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.delete(path `/v1/files/${fileID}`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Download File + * + * @example + * ```ts + * const response = await client.beta.files.download( + * 'file_id', + * ); + * + * const content = await response.blob(); + * console.log(content); + * ``` + */ + download(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/files/${fileID}/content`, { + ...options, + headers: buildHeaders([ + { + 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + __binaryResponse: true, + }); + } + /** + * Get File Metadata + * + * @example + * ```ts + * const fileMetadata = + * await client.beta.files.retrieveMetadata('file_id'); + * ``` + */ + retrieveMetadata(fileID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/files/${fileID}`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + /** + * Upload File + * + * @example + * ```ts + * const fileMetadata = await client.beta.files.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/files', multipartFormRequestOptions({ + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }, this._client)); + } +} +//# 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/@anthropic-ai/sdk/resources/beta/files.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2e6c3beb6c0716356774de6405f578798ad1de23 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OAEtC,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ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AG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE;oBACvE,MAAM,EAAE,oBAAoB;iBAC7B;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,gBAAgB,CACd,MAAc,EACd,SAAwD,EAAE,EAC1D,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,WAAW,EACX,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,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/@anthropic-ai/sdk/resources/beta/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..00708044a510161ee313dcc0c189ecf04d0d44c2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts @@ -0,0 +1,5 @@ +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta.mjs"; +export { Files, type DeletedFile, type FileMetadata, type FileListParams, type FileDeleteParams, type FileDownloadParams, type FileRetrieveMetadataParams, type FileUploadParams, type FileMetadataPage, } from "./files.mjs"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/index.mjs"; +export { Models, type BetaModelInfo, type ModelRetrieveParams, type ModelListParams, type BetaModelInfosPage, } from "./models.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/@anthropic-ai/sdk/resources/beta/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5365918d105fb1cbc4692f807ebcf3bec3a7656b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,wBAAwB,EAC7B,KAAK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B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8162feed1e88cda5972a8d25e2a84d4473d56708 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts @@ -0,0 +1,5 @@ +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta.js"; +export { Files, type DeletedFile, type FileMetadata, type FileListParams, type FileDeleteParams, type FileDownloadParams, type FileRetrieveMetadataParams, type FileUploadParams, type FileMetadataPage, } from "./files.js"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/index.js"; +export { Models, type BetaModelInfo, type ModelRetrieveParams, type ModelListParams, type BetaModelInfosPage, } from "./models.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/@anthropic-ai/sdk/resources/beta/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3af531f67b88b4bc0c4f1a374edbc4b750a6c70c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,qCAAqC,EAC1C,KAAK,4CAA4C,EACjD,K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B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js new file mode 100644 index 0000000000000000000000000000000000000000..08e33987c75c81798ad5daa12487e72d7ca67cf3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js @@ -0,0 +1,13 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Models = exports.Messages = exports.Files = exports.Beta = void 0; +var beta_1 = require("./beta.js"); +Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } }); +var files_1 = require("./files.js"); +Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } }); +var index_1 = require("./messages/index.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return index_1.Messages; } }); +var models_1 = require("./models.js"); +Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } }); +//# 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/@anthropic-ai/sdk/resources/beta/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cf0bda80e4aec9d7e0578ee1ceb3a0fc7f8f678a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAcgB;AAbd,4FAAA,IAAI,OAAA;AAcN,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,6CAiH0B;AAhHxB,iGAAA,QAAQ,OAAA;AAiHV,sCAMkB;AALhB,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1c0bed007690f90e2ba0d23faf984a3862a9c083 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Beta, } from "./beta.mjs"; +export { Files, } from "./files.mjs"; +export { Messages, } from "./messages/index.mjs"; +export { Models, } from "./models.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/@anthropic-ai/sdk/resources/beta/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ccd8db01df6ae24bf193eff1dea94a7025096f8c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAaL;OACM,EACL,KAAK,GASN;OACM,EACL,QAAQ,GAgHT;OACM,EACL,MAAM,GAKP"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..cfa5adeee9197dcc1b47d25c34bf8c31a91183ca --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts @@ -0,0 +1,2 @@ +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ec9e0dad0721e9d2e3f4c12e30ce0f58c7c9b743 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/beta/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..795250c879ea8e2f1d1f1acf743f0f5cea0e052b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts @@ -0,0 +1,2 @@ +export * from "./messages/index.js"; +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b003a3242f10bf85804c9b724bc0dd447551fe39 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/beta/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..04a25500cba95febcd3d851127f02a820156c9df --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.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("./messages/index.js"), exports); +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9b8fc8ae8073f09459f5b5cdebf6450e68b6e0f6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/beta/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d675b231aff911954a6f5467c1f702a7f337d03d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9c3036046c6cc337720e552ca51dcc5ccbfe6244 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/beta/messages.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/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..db30e80e56815f8e8dc63dcda9dd3a98d10b5318 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts @@ -0,0 +1,343 @@ +import { APIResource } from "../../../core/resource.mjs"; +import * as BetaAPI from "../beta.mjs"; +import { APIPromise } from "../../../core/api-promise.mjs"; +import * as BetaMessagesAPI from "./messages.mjs"; +import { Page, type PageParams, PagePromise } from "../../../core/pagination.mjs"; +import { RequestOptions } from "../../../internal/request-options.mjs"; +import { JSONLDecoder } from "../../../internal/decoders/jsonl.mjs"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, params?: BatchRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID: string, params?: BatchDeleteParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, params?: BatchCancelParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + results(messageBatchID: string, params?: BatchResultsParams | undefined, options?: RequestOptions): Promise>; +} +export type BetaMessageBatchesPage = Page; +export interface BetaDeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface BetaMessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: BetaMessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface BetaMessageBatchCanceledResult { + type: 'canceled'; +} +export interface BetaMessageBatchErroredResult { + error: BetaAPI.BetaErrorResponse; + type: 'errored'; +} +export interface BetaMessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface BetaMessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: BetaMessageBatchResult; +} +export interface BetaMessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type BetaMessageBatchResult = BetaMessageBatchSucceededResult | BetaMessageBatchErroredResult | BetaMessageBatchCanceledResult | BetaMessageBatchExpiredResult; +export interface BetaMessageBatchSucceededResult { + message: BetaMessagesAPI.BetaMessage; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * Body param: List of requests for prompt completion. Each is an individual + * request to create a Message. + */ + requests: Array; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: Omit; + } +} +export interface BatchRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchCancelParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchResultsParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Batches { + export { type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..10504623d4b3a05e916a476469f7a82f52a6af2b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;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;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,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/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f67df56968ad8ba6cd55e28429ad13aa4d8c809e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts @@ -0,0 +1,343 @@ +import { APIResource } from "../../../core/resource.js"; +import * as BetaAPI from "../beta.js"; +import { APIPromise } from "../../../core/api-promise.js"; +import * as BetaMessagesAPI from "./messages.js"; +import { Page, type PageParams, PagePromise } from "../../../core/pagination.js"; +import { RequestOptions } from "../../../internal/request-options.js"; +import { JSONLDecoder } from "../../../internal/decoders/jsonl.js"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, params?: BatchRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID: string, params?: BatchDeleteParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, params?: BatchCancelParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + results(messageBatchID: string, params?: BatchResultsParams | undefined, options?: RequestOptions): Promise>; +} +export type BetaMessageBatchesPage = Page; +export interface BetaDeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface BetaMessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: BetaMessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface BetaMessageBatchCanceledResult { + type: 'canceled'; +} +export interface BetaMessageBatchErroredResult { + error: BetaAPI.BetaErrorResponse; + type: 'errored'; +} +export interface BetaMessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface BetaMessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: BetaMessageBatchResult; +} +export interface BetaMessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type BetaMessageBatchResult = BetaMessageBatchSucceededResult | BetaMessageBatchErroredResult | BetaMessageBatchCanceledResult | BetaMessageBatchExpiredResult; +export interface BetaMessageBatchSucceededResult { + message: BetaMessagesAPI.BetaMessage; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * Body param: List of requests for prompt completion. Each is an individual + * request to create a Message. + */ + requests: Array; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: Omit; + } +} +export interface BatchRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchCancelParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchResultsParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Batches { + export { type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..beafe1c4964ebe36b5692376c21143b534c0380a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,KAAK,eAAe;OACpB,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;OAClB,EAAE,YAAY,EAAE;AAIvB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAYzF;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAW/B;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,gBAAg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C,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/@anthropic-ai/sdk/resources/beta/messages/batches.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js new file mode 100644 index 0000000000000000000000000000000000000000..d66464328a3c2716833380695f4813a590720e1b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js @@ -0,0 +1,204 @@ +"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 headers_1 = require("../../../internal/headers.js"); +const jsonl_1 = require("../../../internal/decoders/jsonl.js"); +const error_1 = require("../../../error.js"); +const path_1 = require("../../../internal/utils/path.js"); +class Batches extends resource_1.APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/messages/batches?beta=true', { + body, + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/messages/batches?beta=true', (pagination_1.Page), { + query, + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.delete((0, path_1.path) `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.post((0, path_1.path) `/v1/messages/batches/${messageBatchID}/cancel?beta=true`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + async results(messageBatchID, params = {}, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new error_1.AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + const { betas } = params ?? {}; + return this._client + .get(batch.results_url, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { + 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => jsonl_1.JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +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/@anthropic-ai/sdk/resources/beta/messages/batches.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map new file mode 100644 index 0000000000000000000000000000000000000000..17245cba3eedaa9e1e0b402129498c19b7ac772e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.js","sourceRoot":"","sources":["../../../src/resources/beta/messages/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,4DAA8E;AAC9E,0DAAyD;AAEzD,+DAAgE;AAChE,6CAAgD;AAChD,0DAAoD;AAEpD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE;YACzD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,4BAA4B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,cAAsB,EACtB,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,cAAc,YAAY,EAAE;YAC9E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,4BAA4B,CAAC,CAAC,QAAQ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"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs new file mode 100644 index 0000000000000000000000000000000000000000..568499643dccbf9a1a02f4d1308e8c54ed99a11c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs @@ -0,0 +1,200 @@ +// 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 { buildHeaders } from "../../../internal/headers.mjs"; +import { JSONLDecoder } from "../../../internal/decoders/jsonl.mjs"; +import { AnthropicError } from "../../../error.mjs"; +import { path } from "../../../internal/utils/path.mjs"; +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/messages/batches?beta=true', { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/messages/batches?beta=true', (Page), { + query, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.delete(path `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.post(path `/v1/messages/batches/${messageBatchID}/cancel?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + async results(messageBatchID, params = {}, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + const { betas } = params ?? {}; + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([ + { + 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +//# 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/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..960b7e6e907699e0a88c49e9a938d2e4ef742a48 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.mjs","sourceR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4BAA4B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,OAAO,CACX,cAAsB,EACtB,SAAyC,EAAE,EAC3C,OAAwB;QAExB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YACvB,MAAM,IAAI,cAAc,CACtB,yDAAyD,KAAK,CAAC,iBAAiB,MAAM,KAAK,CAAC,EAAE,EAAE,CACjG,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO;aAChB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE;YACtB,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,4BAA4B,CAAC,CAAC,QAAQ,EAAE;oBAC7E,MAAM,EAAE,oBAAoB;iBAC7B;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,IAAI;SACvB,CAAC;aACD,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAEvF,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/@anthropic-ai/sdk/resources/beta/messages/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5d4c8b4908cdb71874e9dc0fde34ccb7ee591d48 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts @@ -0,0 +1,3 @@ +export { Batches, type BetaDeletedMessageBatch, type BetaMessageBatch, type BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts, type BetaMessageBatchResult, type BetaMessageBatchSucceededResult, type BatchCreateParams, type BatchRetrieveParams, type BatchListParams, type BatchDeleteParams, type BatchCancelParams, type BatchResultsParams, type BetaMessageBatchesPage, } from "./batches.mjs"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, type BetaMessageStreamParams, } from "./messages.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/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..3c628797576bf7d8b6bb1a6afc13ead900dbfec7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,qCAAqC,EAC1C,KAAK,4CAA4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AAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54f1994fddc41ef40db1f340a36f2d3d0f5eacc6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts @@ -0,0 +1,3 @@ +export { Batches, type BetaDeletedMessageBatch, type BetaMessageBatch, type BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts, type BetaMessageBatchResult, type BetaMessageBatchSucceededResult, type BatchCreateParams, type BatchRetrieveParams, type BatchListParams, type BatchDeleteParams, type BatchCancelParams, type BatchResultsParams, type BetaMessageBatchesPage, } from "./batches.js"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, type BetaMessageStreamParams, } from "./messages.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/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..400ba2d1ae26e88b86f440becaf568ff690749e4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,uBAAuB,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KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js new file mode 100644 index 0000000000000000000000000000000000000000..56cbce5ff533754afacdaf4d53dcca9b7c899bab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js @@ -0,0 +1,9 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = exports.Batches = void 0; +var batches_1 = require("./batches.js"); +Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } }); +var messages_1 = require("./messages.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } }); +//# 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/@anthropic-ai/sdk/resources/beta/messages/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9cc40ec5b5883b635e8d4c8e1805ff4e3d2b31cd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAkBmB;AAjBjB,kGAAA,OAAO,OAAA;AAkBT,0CAkHoB;AAjHlB,oGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..43fef1dd1f50a905c5b77ff2a2df1d906329a5ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Batches, } from "./batches.mjs"; +export { Messages, } from "./messages.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/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1ce9dd9a81e5292573426431cd41687d66e89d3f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAiBR;OACM,EACL,QAAQ,GAiHT"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..718571b6c9451e8234c5f1cb3f496eb29d6b9b48 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts @@ -0,0 +1,1566 @@ +import { APIResource } from "../../../core/resource.mjs"; +import * as MessagesMessagesAPI from "./messages.mjs"; +import * as BetaAPI from "../beta.mjs"; +import * as MessagesAPI from "../../messages/messages.mjs"; +import * as BatchesAPI from "./batches.mjs"; +import { BatchCancelParams, BatchCreateParams, BatchDeleteParams, BatchListParams, BatchResultsParams, BatchRetrieveParams, Batches, BetaDeletedMessageBatch, BetaMessageBatch, BetaMessageBatchCanceledResult, BetaMessageBatchErroredResult, BetaMessageBatchExpiredResult, BetaMessageBatchIndividualResponse, BetaMessageBatchRequestCounts, BetaMessageBatchResult, BetaMessageBatchSucceededResult, BetaMessageBatchesPage } from "./batches.mjs"; +import { APIPromise } from "../../../core/api-promise.mjs"; +import { Stream } from "../../../core/streaming.mjs"; +import { RequestOptions } from "../../../internal/request-options.mjs"; +import { BetaMessageStream } from "../../../lib/BetaMessageStream.mjs"; +export declare class Messages extends APIResource { + batches: BatchesAPI.Batches; + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const betaMessage = await client.beta.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(params: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(params: MessageCreateParamsBase, options?: RequestOptions): APIPromise | BetaMessage>; + /** + * Create a Message stream + */ + stream(body: BetaMessageStreamParams, options?: RequestOptions): BetaMessageStream; + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const betaMessageTokensCount = + * await client.beta.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(params: MessageCountTokensParams, options?: RequestOptions): APIPromise; +} +export type BetaMessageStreamParams = MessageCreateParamsBase; +export interface BetaBase64ImageSource { + data: string; + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + type: 'base64'; +} +export interface BetaBase64PDFSource { + data: string; + media_type: 'application/pdf'; + type: 'base64'; +} +export interface BetaCacheControlEphemeral { + type: 'ephemeral'; + /** + * The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. + */ + ttl?: '5m' | '1h'; +} +export interface BetaCacheCreation { + /** + * The number of input tokens used to create the 1 hour cache entry. + */ + ephemeral_1h_input_tokens: number; + /** + * The number of input tokens used to create the 5 minute cache entry. + */ + ephemeral_5m_input_tokens: number; +} +export interface BetaCitationCharLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface BetaCitationCharLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface BetaCitationContentBlockLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface BetaCitationContentBlockLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface BetaCitationPageLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface BetaCitationPageLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface BetaCitationWebSearchResultLocationParam { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface BetaCitationsConfigParam { + enabled?: boolean; +} +export interface BetaCitationsDelta { + citation: BetaCitationCharLocation | BetaCitationPageLocation | BetaCitationContentBlockLocation | BetaCitationsWebSearchResultLocation; + type: 'citations_delta'; +} +export interface BetaCitationsWebSearchResultLocation { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface BetaCodeExecutionOutputBlock { + file_id: string; + type: 'code_execution_output'; +} +export interface BetaCodeExecutionOutputBlockParam { + file_id: string; + type: 'code_execution_output'; +} +export interface BetaCodeExecutionResultBlock { + content: Array; + return_code: number; + stderr: string; + stdout: string; + type: 'code_execution_result'; +} +export interface BetaCodeExecutionResultBlockParam { + content: Array; + return_code: number; + stderr: string; + stdout: string; + type: 'code_execution_result'; +} +export interface BetaCodeExecutionTool20250522 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'code_execution'; + type: 'code_execution_20250522'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaCodeExecutionToolResultBlock { + content: BetaCodeExecutionToolResultBlockContent; + tool_use_id: string; + type: 'code_execution_tool_result'; +} +export type BetaCodeExecutionToolResultBlockContent = BetaCodeExecutionToolResultError | BetaCodeExecutionResultBlock; +export interface BetaCodeExecutionToolResultBlockParam { + content: BetaCodeExecutionToolResultBlockParamContent; + tool_use_id: string; + type: 'code_execution_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaCodeExecutionToolResultBlockParamContent = BetaCodeExecutionToolResultErrorParam | BetaCodeExecutionResultBlockParam; +export interface BetaCodeExecutionToolResultError { + error_code: BetaCodeExecutionToolResultErrorCode; + type: 'code_execution_tool_result_error'; +} +export type BetaCodeExecutionToolResultErrorCode = 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded'; +export interface BetaCodeExecutionToolResultErrorParam { + error_code: BetaCodeExecutionToolResultErrorCode; + type: 'code_execution_tool_result_error'; +} +/** + * Information about the container used in the request (for the code execution + * tool) + */ +export interface BetaContainer { + /** + * Identifier for the container used in this request + */ + id: string; + /** + * The time at which the container will expire. + */ + expires_at: string; +} +/** + * Response model for a file uploaded to the container. + */ +export interface BetaContainerUploadBlock { + file_id: string; + type: 'container_upload'; +} +/** + * A content block that represents a file to be uploaded to the container Files + * uploaded via this block will be available in the container's input directory. + */ +export interface BetaContainerUploadBlockParam { + file_id: string; + type: 'container_upload'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +/** + * Response model for a file uploaded to the container. + */ +export type BetaContentBlock = BetaTextBlock | BetaToolUseBlock | BetaServerToolUseBlock | BetaWebSearchToolResultBlock | BetaCodeExecutionToolResultBlock | BetaMCPToolUseBlock | BetaMCPToolResultBlock | BetaContainerUploadBlock | BetaThinkingBlock | BetaRedactedThinkingBlock; +/** + * Regular text content. + */ +export type BetaContentBlockParam = BetaServerToolUseBlockParam | BetaWebSearchToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaMCPToolUseBlockParam | BetaRequestMCPToolResultBlockParam | BetaTextBlockParam | BetaImageBlockParam | BetaToolUseBlockParam | BetaToolResultBlockParam | BetaRequestDocumentBlock | BetaThinkingBlockParam | BetaRedactedThinkingBlockParam | BetaContainerUploadBlockParam; +export interface BetaContentBlockSource { + content: string | Array; + type: 'content'; +} +export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam; +export interface BetaFileDocumentSource { + file_id: string; + type: 'file'; +} +export interface BetaFileImageSource { + file_id: string; + type: 'file'; +} +export interface BetaImageBlockParam { + source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource; + type: 'image'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaInputJSONDelta { + partial_json: string; + type: 'input_json_delta'; +} +export interface BetaMCPToolResultBlock { + content: string | Array; + is_error: boolean; + tool_use_id: string; + type: 'mcp_tool_result'; +} +export interface BetaMCPToolUseBlock { + id: string; + input: unknown; + /** + * The name of the MCP tool + */ + name: string; + /** + * The name of the MCP server + */ + server_name: string; + type: 'mcp_tool_use'; +} +export interface BetaMCPToolUseBlockParam { + id: string; + input: unknown; + name: string; + /** + * The name of the MCP server + */ + server_name: string; + type: 'mcp_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaMessage { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: BetaContainer | null; + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: BetaStopReason | null; + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaUsage; +} +export interface BetaMessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; +} +export interface BetaMessageParam { + content: string | Array; + role: 'user' | 'assistant'; +} +export interface BetaMessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} +export interface BetaMetadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} +export interface BetaPlainTextSource { + data: string; + media_type: 'text/plain'; + type: 'text'; +} +export type BetaRawContentBlockDelta = BetaTextDelta | BetaInputJSONDelta | BetaCitationsDelta | BetaThinkingDelta | BetaSignatureDelta; +export interface BetaRawContentBlockDeltaEvent { + delta: BetaRawContentBlockDelta; + index: number; + type: 'content_block_delta'; +} +export interface BetaRawContentBlockStartEvent { + /** + * Response model for a file uploaded to the container. + */ + content_block: BetaTextBlock | BetaToolUseBlock | BetaServerToolUseBlock | BetaWebSearchToolResultBlock | BetaCodeExecutionToolResultBlock | BetaMCPToolUseBlock | BetaMCPToolResultBlock | BetaContainerUploadBlock | BetaThinkingBlock | BetaRedactedThinkingBlock; + index: number; + type: 'content_block_start'; +} +export interface BetaRawContentBlockStopEvent { + index: number; + type: 'content_block_stop'; +} +export interface BetaRawMessageDeltaEvent { + delta: BetaRawMessageDeltaEvent.Delta; + type: 'message_delta'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaMessageDeltaUsage; +} +export declare namespace BetaRawMessageDeltaEvent { + interface Delta { + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: MessagesMessagesAPI.BetaContainer | null; + stop_reason: MessagesMessagesAPI.BetaStopReason | null; + stop_sequence: string | null; + } +} +export interface BetaRawMessageStartEvent { + message: BetaMessage; + type: 'message_start'; +} +export interface BetaRawMessageStopEvent { + type: 'message_stop'; +} +export type BetaRawMessageStreamEvent = BetaRawMessageStartEvent | BetaRawMessageDeltaEvent | BetaRawMessageStopEvent | BetaRawContentBlockStartEvent | BetaRawContentBlockDeltaEvent | BetaRawContentBlockStopEvent; +export interface BetaRedactedThinkingBlock { + data: string; + type: 'redacted_thinking'; +} +export interface BetaRedactedThinkingBlockParam { + data: string; + type: 'redacted_thinking'; +} +export interface BetaRequestDocumentBlock { + source: BetaBase64PDFSource | BetaPlainTextSource | BetaContentBlockSource | BetaURLPDFSource | BetaFileDocumentSource; + type: 'document'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + citations?: BetaCitationsConfigParam; + context?: string | null; + title?: string | null; +} +export interface BetaRequestMCPServerToolConfiguration { + allowed_tools?: Array | null; + enabled?: boolean | null; +} +export interface BetaRequestMCPServerURLDefinition { + name: string; + type: 'url'; + url: string; + authorization_token?: string | null; + tool_configuration?: BetaRequestMCPServerToolConfiguration | null; +} +export interface BetaRequestMCPToolResultBlockParam { + tool_use_id: string; + type: 'mcp_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface BetaServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} +export interface BetaServerToolUseBlock { + id: string; + input: unknown; + name: 'web_search' | 'code_execution'; + type: 'server_tool_use'; +} +export interface BetaServerToolUseBlockParam { + id: string; + input: unknown; + name: 'web_search' | 'code_execution'; + type: 'server_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaSignatureDelta { + signature: string; + type: 'signature_delta'; +} +export type BetaStopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; +export interface BetaTextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + text: string; + type: 'text'; +} +export interface BetaTextBlockParam { + text: string; + type: 'text'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + citations?: Array | null; +} +export type BetaTextCitation = BetaCitationCharLocation | BetaCitationPageLocation | BetaCitationContentBlockLocation | BetaCitationsWebSearchResultLocation; +export type BetaTextCitationParam = BetaCitationCharLocationParam | BetaCitationPageLocationParam | BetaCitationContentBlockLocationParam | BetaCitationWebSearchResultLocationParam; +export interface BetaTextDelta { + text: string; + type: 'text_delta'; +} +export interface BetaThinkingBlock { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface BetaThinkingBlockParam { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface BetaThinkingConfigDisabled { + type: 'disabled'; +} +export interface BetaThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + type: 'enabled'; +} +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled; +export interface BetaThinkingDelta { + thinking: string; + type: 'thinking_delta'; +} +export interface BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: BetaTool.InputSchema; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + type?: 'custom' | null; +} +export declare namespace BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + interface InputSchema { + type: 'object'; + properties?: unknown | null; + required?: Array | null; + [k: string]: unknown; + } +} +export interface BetaToolBash20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone; +/** + * The model will use any available tools. + */ +export interface BetaToolChoiceAny { + type: 'any'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will automatically decide whether to use tools. + */ +export interface BetaToolChoiceAuto { + type: 'auto'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will not be allowed to use tools. + */ +export interface BetaToolChoiceNone { + type: 'none'; +} +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface BetaToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + type: 'tool'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +export interface BetaToolComputerUse20241022 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + /** + * The width of the display in pixels. + */ + display_width_px: number; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + type: 'computer_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} +export interface BetaToolComputerUse20250124 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + /** + * The width of the display in pixels. + */ + display_width_px: number; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + type: 'computer_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} +export interface BetaToolResultBlockParam { + tool_use_id: string; + type: 'tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface BetaToolTextEditor20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolTextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaToolUnion = BetaTool | BetaToolComputerUse20241022 | BetaToolBash20241022 | BetaToolTextEditor20241022 | BetaToolComputerUse20250124 | BetaToolBash20250124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaWebSearchTool20250305 | BetaCodeExecutionTool20250522; +export interface BetaToolUseBlock { + id: string; + input: unknown; + name: string; + type: 'tool_use'; +} +export interface BetaToolUseBlockParam { + id: string; + input: unknown; + name: string; + type: 'tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaURLImageSource { + type: 'url'; + url: string; +} +export interface BetaURLPDFSource { + type: 'url'; + url: string; +} +export interface BetaUsage { + /** + * Breakdown of cached tokens by TTL + */ + cache_creation: BetaCacheCreation | null; + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The number of input tokens which were used. + */ + input_tokens: number; + /** + * The number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} +export interface BetaWebSearchResultBlock { + encrypted_content: string; + page_age: string | null; + title: string; + type: 'web_search_result'; + url: string; +} +export interface BetaWebSearchResultBlockParam { + encrypted_content: string; + title: string; + type: 'web_search_result'; + url: string; + page_age?: string | null; +} +export interface BetaWebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + type: 'web_search_20250305'; + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: BetaWebSearchTool20250305.UserLocation | null; +} +export declare namespace BetaWebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + interface UserLocation { + type: 'approximate'; + /** + * The city of the user. + */ + city?: string | null; + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + /** + * The region of the user. + */ + region?: string | null; + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} +export interface BetaWebSearchToolRequestError { + error_code: BetaWebSearchToolResultErrorCode; + type: 'web_search_tool_result_error'; +} +export interface BetaWebSearchToolResultBlock { + content: BetaWebSearchToolResultBlockContent; + tool_use_id: string; + type: 'web_search_tool_result'; +} +export type BetaWebSearchToolResultBlockContent = BetaWebSearchToolResultError | Array; +export interface BetaWebSearchToolResultBlockParam { + content: BetaWebSearchToolResultBlockParamContent; + tool_use_id: string; + type: 'web_search_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaWebSearchToolResultBlockParamContent = Array | BetaWebSearchToolRequestError; +export interface BetaWebSearchToolResultError { + error_code: BetaWebSearchToolResultErrorCode; + type: 'web_search_tool_result_error'; +} +export type BetaWebSearchToolResultErrorCode = 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; +/** + * @deprecated BetaRequestDocumentBlock should be used insated + */ +export type BetaBase64PDFBlock = BetaRequestDocumentBlock; +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; +export interface MessageCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: Container identifier for reuse across requests. + */ + container?: string | null; + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + /** + * Body param: An object describing metadata about the request. + */ + metadata?: BetaMetadata; + /** + * Body param: Determines whether to use priority capacity (if available) or + * standard capacity for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + /** + * Body param: Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace MessageCreateParams { + type MessageCreateParamsNonStreaming = MessagesMessagesAPI.MessageCreateParamsNonStreaming; + type MessageCreateParamsStreaming = MessagesMessagesAPI.MessageCreateParamsStreaming; +} +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} +export interface MessageCountTokensParams { + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Messages { + export { type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaContainer as BetaContainer, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Batches as Batches, type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, }; +} +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..c922d294cc2d21b4c252978cc4a7a7826f6f87a1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,kCAAkC,EAClC,6BAA6B,EAC7B,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACvB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;OAElB,EAAE,iBAAiB,EAAE;AAgB5B,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAClG,MAAM,CACJ,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAChD,MAAM,CACJ,MAAM,EAAE,uB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4B,EACjE,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,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/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28b1df1456c3c68258f292ab029eee654d18f798 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts @@ -0,0 +1,1566 @@ +import { APIResource } from "../../../core/resource.js"; +import * as MessagesMessagesAPI from "./messages.js"; +import * as BetaAPI from "../beta.js"; +import * as MessagesAPI from "../../messages/messages.js"; +import * as BatchesAPI from "./batches.js"; +import { BatchCancelParams, BatchCreateParams, BatchDeleteParams, BatchListParams, BatchResultsParams, BatchRetrieveParams, Batches, BetaDeletedMessageBatch, BetaMessageBatch, BetaMessageBatchCanceledResult, BetaMessageBatchErroredResult, BetaMessageBatchExpiredResult, BetaMessageBatchIndividualResponse, BetaMessageBatchRequestCounts, BetaMessageBatchResult, BetaMessageBatchSucceededResult, BetaMessageBatchesPage } from "./batches.js"; +import { APIPromise } from "../../../core/api-promise.js"; +import { Stream } from "../../../core/streaming.js"; +import { RequestOptions } from "../../../internal/request-options.js"; +import { BetaMessageStream } from "../../../lib/BetaMessageStream.js"; +export declare class Messages extends APIResource { + batches: BatchesAPI.Batches; + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const betaMessage = await client.beta.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(params: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(params: MessageCreateParamsBase, options?: RequestOptions): APIPromise | BetaMessage>; + /** + * Create a Message stream + */ + stream(body: BetaMessageStreamParams, options?: RequestOptions): BetaMessageStream; + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const betaMessageTokensCount = + * await client.beta.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(params: MessageCountTokensParams, options?: RequestOptions): APIPromise; +} +export type BetaMessageStreamParams = MessageCreateParamsBase; +export interface BetaBase64ImageSource { + data: string; + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + type: 'base64'; +} +export interface BetaBase64PDFSource { + data: string; + media_type: 'application/pdf'; + type: 'base64'; +} +export interface BetaCacheControlEphemeral { + type: 'ephemeral'; + /** + * The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. + */ + ttl?: '5m' | '1h'; +} +export interface BetaCacheCreation { + /** + * The number of input tokens used to create the 1 hour cache entry. + */ + ephemeral_1h_input_tokens: number; + /** + * The number of input tokens used to create the 5 minute cache entry. + */ + ephemeral_5m_input_tokens: number; +} +export interface BetaCitationCharLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface BetaCitationCharLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface BetaCitationContentBlockLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface BetaCitationContentBlockLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface BetaCitationPageLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface BetaCitationPageLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface BetaCitationWebSearchResultLocationParam { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface BetaCitationsConfigParam { + enabled?: boolean; +} +export interface BetaCitationsDelta { + citation: BetaCitationCharLocation | BetaCitationPageLocation | BetaCitationContentBlockLocation | BetaCitationsWebSearchResultLocation; + type: 'citations_delta'; +} +export interface BetaCitationsWebSearchResultLocation { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface BetaCodeExecutionOutputBlock { + file_id: string; + type: 'code_execution_output'; +} +export interface BetaCodeExecutionOutputBlockParam { + file_id: string; + type: 'code_execution_output'; +} +export interface BetaCodeExecutionResultBlock { + content: Array; + return_code: number; + stderr: string; + stdout: string; + type: 'code_execution_result'; +} +export interface BetaCodeExecutionResultBlockParam { + content: Array; + return_code: number; + stderr: string; + stdout: string; + type: 'code_execution_result'; +} +export interface BetaCodeExecutionTool20250522 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'code_execution'; + type: 'code_execution_20250522'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaCodeExecutionToolResultBlock { + content: BetaCodeExecutionToolResultBlockContent; + tool_use_id: string; + type: 'code_execution_tool_result'; +} +export type BetaCodeExecutionToolResultBlockContent = BetaCodeExecutionToolResultError | BetaCodeExecutionResultBlock; +export interface BetaCodeExecutionToolResultBlockParam { + content: BetaCodeExecutionToolResultBlockParamContent; + tool_use_id: string; + type: 'code_execution_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaCodeExecutionToolResultBlockParamContent = BetaCodeExecutionToolResultErrorParam | BetaCodeExecutionResultBlockParam; +export interface BetaCodeExecutionToolResultError { + error_code: BetaCodeExecutionToolResultErrorCode; + type: 'code_execution_tool_result_error'; +} +export type BetaCodeExecutionToolResultErrorCode = 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded'; +export interface BetaCodeExecutionToolResultErrorParam { + error_code: BetaCodeExecutionToolResultErrorCode; + type: 'code_execution_tool_result_error'; +} +/** + * Information about the container used in the request (for the code execution + * tool) + */ +export interface BetaContainer { + /** + * Identifier for the container used in this request + */ + id: string; + /** + * The time at which the container will expire. + */ + expires_at: string; +} +/** + * Response model for a file uploaded to the container. + */ +export interface BetaContainerUploadBlock { + file_id: string; + type: 'container_upload'; +} +/** + * A content block that represents a file to be uploaded to the container Files + * uploaded via this block will be available in the container's input directory. + */ +export interface BetaContainerUploadBlockParam { + file_id: string; + type: 'container_upload'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +/** + * Response model for a file uploaded to the container. + */ +export type BetaContentBlock = BetaTextBlock | BetaToolUseBlock | BetaServerToolUseBlock | BetaWebSearchToolResultBlock | BetaCodeExecutionToolResultBlock | BetaMCPToolUseBlock | BetaMCPToolResultBlock | BetaContainerUploadBlock | BetaThinkingBlock | BetaRedactedThinkingBlock; +/** + * Regular text content. + */ +export type BetaContentBlockParam = BetaServerToolUseBlockParam | BetaWebSearchToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaMCPToolUseBlockParam | BetaRequestMCPToolResultBlockParam | BetaTextBlockParam | BetaImageBlockParam | BetaToolUseBlockParam | BetaToolResultBlockParam | BetaRequestDocumentBlock | BetaThinkingBlockParam | BetaRedactedThinkingBlockParam | BetaContainerUploadBlockParam; +export interface BetaContentBlockSource { + content: string | Array; + type: 'content'; +} +export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam; +export interface BetaFileDocumentSource { + file_id: string; + type: 'file'; +} +export interface BetaFileImageSource { + file_id: string; + type: 'file'; +} +export interface BetaImageBlockParam { + source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource; + type: 'image'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaInputJSONDelta { + partial_json: string; + type: 'input_json_delta'; +} +export interface BetaMCPToolResultBlock { + content: string | Array; + is_error: boolean; + tool_use_id: string; + type: 'mcp_tool_result'; +} +export interface BetaMCPToolUseBlock { + id: string; + input: unknown; + /** + * The name of the MCP tool + */ + name: string; + /** + * The name of the MCP server + */ + server_name: string; + type: 'mcp_tool_use'; +} +export interface BetaMCPToolUseBlockParam { + id: string; + input: unknown; + name: string; + /** + * The name of the MCP server + */ + server_name: string; + type: 'mcp_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaMessage { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: BetaContainer | null; + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: BetaStopReason | null; + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaUsage; +} +export interface BetaMessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; +} +export interface BetaMessageParam { + content: string | Array; + role: 'user' | 'assistant'; +} +export interface BetaMessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} +export interface BetaMetadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} +export interface BetaPlainTextSource { + data: string; + media_type: 'text/plain'; + type: 'text'; +} +export type BetaRawContentBlockDelta = BetaTextDelta | BetaInputJSONDelta | BetaCitationsDelta | BetaThinkingDelta | BetaSignatureDelta; +export interface BetaRawContentBlockDeltaEvent { + delta: BetaRawContentBlockDelta; + index: number; + type: 'content_block_delta'; +} +export interface BetaRawContentBlockStartEvent { + /** + * Response model for a file uploaded to the container. + */ + content_block: BetaTextBlock | BetaToolUseBlock | BetaServerToolUseBlock | BetaWebSearchToolResultBlock | BetaCodeExecutionToolResultBlock | BetaMCPToolUseBlock | BetaMCPToolResultBlock | BetaContainerUploadBlock | BetaThinkingBlock | BetaRedactedThinkingBlock; + index: number; + type: 'content_block_start'; +} +export interface BetaRawContentBlockStopEvent { + index: number; + type: 'content_block_stop'; +} +export interface BetaRawMessageDeltaEvent { + delta: BetaRawMessageDeltaEvent.Delta; + type: 'message_delta'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaMessageDeltaUsage; +} +export declare namespace BetaRawMessageDeltaEvent { + interface Delta { + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: MessagesMessagesAPI.BetaContainer | null; + stop_reason: MessagesMessagesAPI.BetaStopReason | null; + stop_sequence: string | null; + } +} +export interface BetaRawMessageStartEvent { + message: BetaMessage; + type: 'message_start'; +} +export interface BetaRawMessageStopEvent { + type: 'message_stop'; +} +export type BetaRawMessageStreamEvent = BetaRawMessageStartEvent | BetaRawMessageDeltaEvent | BetaRawMessageStopEvent | BetaRawContentBlockStartEvent | BetaRawContentBlockDeltaEvent | BetaRawContentBlockStopEvent; +export interface BetaRedactedThinkingBlock { + data: string; + type: 'redacted_thinking'; +} +export interface BetaRedactedThinkingBlockParam { + data: string; + type: 'redacted_thinking'; +} +export interface BetaRequestDocumentBlock { + source: BetaBase64PDFSource | BetaPlainTextSource | BetaContentBlockSource | BetaURLPDFSource | BetaFileDocumentSource; + type: 'document'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + citations?: BetaCitationsConfigParam; + context?: string | null; + title?: string | null; +} +export interface BetaRequestMCPServerToolConfiguration { + allowed_tools?: Array | null; + enabled?: boolean | null; +} +export interface BetaRequestMCPServerURLDefinition { + name: string; + type: 'url'; + url: string; + authorization_token?: string | null; + tool_configuration?: BetaRequestMCPServerToolConfiguration | null; +} +export interface BetaRequestMCPToolResultBlockParam { + tool_use_id: string; + type: 'mcp_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface BetaServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} +export interface BetaServerToolUseBlock { + id: string; + input: unknown; + name: 'web_search' | 'code_execution'; + type: 'server_tool_use'; +} +export interface BetaServerToolUseBlockParam { + id: string; + input: unknown; + name: 'web_search' | 'code_execution'; + type: 'server_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaSignatureDelta { + signature: string; + type: 'signature_delta'; +} +export type BetaStopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; +export interface BetaTextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + text: string; + type: 'text'; +} +export interface BetaTextBlockParam { + text: string; + type: 'text'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + citations?: Array | null; +} +export type BetaTextCitation = BetaCitationCharLocation | BetaCitationPageLocation | BetaCitationContentBlockLocation | BetaCitationsWebSearchResultLocation; +export type BetaTextCitationParam = BetaCitationCharLocationParam | BetaCitationPageLocationParam | BetaCitationContentBlockLocationParam | BetaCitationWebSearchResultLocationParam; +export interface BetaTextDelta { + text: string; + type: 'text_delta'; +} +export interface BetaThinkingBlock { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface BetaThinkingBlockParam { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface BetaThinkingConfigDisabled { + type: 'disabled'; +} +export interface BetaThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + type: 'enabled'; +} +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled; +export interface BetaThinkingDelta { + thinking: string; + type: 'thinking_delta'; +} +export interface BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: BetaTool.InputSchema; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + type?: 'custom' | null; +} +export declare namespace BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + interface InputSchema { + type: 'object'; + properties?: unknown | null; + required?: Array | null; + [k: string]: unknown; + } +} +export interface BetaToolBash20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone; +/** + * The model will use any available tools. + */ +export interface BetaToolChoiceAny { + type: 'any'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will automatically decide whether to use tools. + */ +export interface BetaToolChoiceAuto { + type: 'auto'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will not be allowed to use tools. + */ +export interface BetaToolChoiceNone { + type: 'none'; +} +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface BetaToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + type: 'tool'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +export interface BetaToolComputerUse20241022 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + /** + * The width of the display in pixels. + */ + display_width_px: number; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + type: 'computer_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} +export interface BetaToolComputerUse20250124 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + /** + * The width of the display in pixels. + */ + display_width_px: number; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + type: 'computer_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} +export interface BetaToolResultBlockParam { + tool_use_id: string; + type: 'tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface BetaToolTextEditor20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20241022'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaToolTextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaToolUnion = BetaTool | BetaToolComputerUse20241022 | BetaToolBash20241022 | BetaToolTextEditor20241022 | BetaToolComputerUse20250124 | BetaToolBash20250124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaWebSearchTool20250305 | BetaCodeExecutionTool20250522; +export interface BetaToolUseBlock { + id: string; + input: unknown; + name: string; + type: 'tool_use'; +} +export interface BetaToolUseBlockParam { + id: string; + input: unknown; + name: string; + type: 'tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export interface BetaURLImageSource { + type: 'url'; + url: string; +} +export interface BetaURLPDFSource { + type: 'url'; + url: string; +} +export interface BetaUsage { + /** + * Breakdown of cached tokens by TTL + */ + cache_creation: BetaCacheCreation | null; + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The number of input tokens which were used. + */ + input_tokens: number; + /** + * The number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} +export interface BetaWebSearchResultBlock { + encrypted_content: string; + page_age: string | null; + title: string; + type: 'web_search_result'; + url: string; +} +export interface BetaWebSearchResultBlockParam { + encrypted_content: string; + title: string; + type: 'web_search_result'; + url: string; + page_age?: string | null; +} +export interface BetaWebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + type: 'web_search_20250305'; + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: BetaWebSearchTool20250305.UserLocation | null; +} +export declare namespace BetaWebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + interface UserLocation { + type: 'approximate'; + /** + * The city of the user. + */ + city?: string | null; + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + /** + * The region of the user. + */ + region?: string | null; + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} +export interface BetaWebSearchToolRequestError { + error_code: BetaWebSearchToolResultErrorCode; + type: 'web_search_tool_result_error'; +} +export interface BetaWebSearchToolResultBlock { + content: BetaWebSearchToolResultBlockContent; + tool_use_id: string; + type: 'web_search_tool_result'; +} +export type BetaWebSearchToolResultBlockContent = BetaWebSearchToolResultError | Array; +export interface BetaWebSearchToolResultBlockParam { + content: BetaWebSearchToolResultBlockParamContent; + tool_use_id: string; + type: 'web_search_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} +export type BetaWebSearchToolResultBlockParamContent = Array | BetaWebSearchToolRequestError; +export interface BetaWebSearchToolResultError { + error_code: BetaWebSearchToolResultErrorCode; + type: 'web_search_tool_result_error'; +} +export type BetaWebSearchToolResultErrorCode = 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; +/** + * @deprecated BetaRequestDocumentBlock should be used insated + */ +export type BetaBase64PDFBlock = BetaRequestDocumentBlock; +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; +export interface MessageCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: Container identifier for reuse across requests. + */ + container?: string | null; + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + /** + * Body param: An object describing metadata about the request. + */ + metadata?: BetaMetadata; + /** + * Body param: Determines whether to use priority capacity (if available) or + * standard capacity for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + /** + * Body param: Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace MessageCreateParams { + type MessageCreateParamsNonStreaming = MessagesMessagesAPI.MessageCreateParamsNonStreaming; + type MessageCreateParamsStreaming = MessagesMessagesAPI.MessageCreateParamsStreaming; +} +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} +export interface MessageCountTokensParams { + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Messages { + export { type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaContainer as BetaContainer, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Batches as Batches, type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, }; +} +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..80b0f719b01a28f31a1700e5cf404b213bd601ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,kCAAkC,EAClC,6BAA6B,EAC7B,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACvB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;OAElB,EAAE,iBAAiB,EAAE;AAgB5B,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAClG,MAAM,CACJ,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAChD,MAAM,CACJ,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,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E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,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/@anthropic-ai/sdk/resources/beta/messages/messages.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..4bae81cfb346b2f5aef1b575e55e680d7358cfa6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js @@ -0,0 +1,86 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = void 0; +const tslib_1 = require("../../../internal/tslib.js"); +const resource_1 = require("../../../core/resource.js"); +const BatchesAPI = tslib_1.__importStar(require("./batches.js")); +const batches_1 = require("./batches.js"); +const headers_1 = require("../../../internal/headers.js"); +const BetaMessageStream_1 = require("../../../lib/BetaMessageStream.js"); +const DEPRECATED_MODELS = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +const constants_1 = require("../../../internal/constants.js"); +class Messages extends resource_1.APIResource { + constructor() { + super(...arguments); + this.batches = new BatchesAPI.Batches(this._client); + } + create(params, options) { + const { betas, ...body } = params; + if (body.model in DEPRECATED_MODELS) { + console.warn(`The model '${body.model}' is deprecated and will reach end-of-life on ${DEPRECATED_MODELS[body.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`); + } + let timeout = this._client._options.timeout; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = constants_1.MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages?beta=true', { + body, + timeout: timeout ?? 600000, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }); + } + /** + * Create a Message stream + */ + stream(body, options) { + return BetaMessageStream_1.BetaMessageStream.createMessage(this, body, options); + } + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const betaMessageTokensCount = + * await client.beta.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/messages/count_tokens?beta=true', { + body, + ...options, + headers: (0, headers_1.buildHeaders)([ + { 'anthropic-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString() }, + options?.headers, + ]), + }); + } +} +exports.Messages = Messages; +Messages.Batches = batches_1.Batches; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..54f6417582d967cdff4f297b6dd8da79ad0cc793 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/beta/messages/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAIrD,iEAAwC;AACxC,0CAkBmB;AAGnB,0DAAyD;AAGzD,yEAAmE;AAEnE,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AACF,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AED;;OAEG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,qCAAiB,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CACT,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE;YAC9D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AApGD,4BAoGC;AAq7DD,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0c8ad8db5978f156faedd4abf85db3cb23a6a6c6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../../../core/resource.mjs"; +import * as BatchesAPI from "./batches.mjs"; +import { Batches, } from "./batches.mjs"; +import { buildHeaders } from "../../../internal/headers.mjs"; +import { BetaMessageStream } from "../../../lib/BetaMessageStream.mjs"; +const DEPRECATED_MODELS = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +import { MODEL_NONSTREAMING_TOKENS } from "../../../internal/constants.mjs"; +export class Messages extends APIResource { + constructor() { + super(...arguments); + this.batches = new BatchesAPI.Batches(this._client); + } + create(params, options) { + const { betas, ...body } = params; + if (body.model in DEPRECATED_MODELS) { + console.warn(`The model '${body.model}' is deprecated and will reach end-of-life on ${DEPRECATED_MODELS[body.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`); + } + let timeout = this._client._options.timeout; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages?beta=true', { + body, + timeout: timeout ?? 600000, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }); + } + /** + * Create a Message stream + */ + stream(body, options) { + return BetaMessageStream.createMessage(this, body, options); + } + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const betaMessageTokensCount = + * await client.beta.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/messages/count_tokens?beta=true', { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString() }, + options?.headers, + ]), + }); + } +} +Messages.Batches = Batches; +//# sourceMappingURL=messages.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..124bc93d860384a32fed5d8d7d16a5bec3c197cd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../src/resources/beta/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,UAAU;OACf,EAOL,OAAO,GAWR;OAGM,EAAE,YAAY,EAAE;OAGhB,EAAE,iBAAiB,EAAE;AAE5B,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;OACK,EAAE,yBAAyB,EAAE;AAEpC,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmGrE,CAAC;IAtEC,MAAM,CACJ,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAElC,IAAI,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CACV,cAAc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IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAq7DD,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..da94b74f2dba6f8da66ea8527aa1f45b65f50ebf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts @@ -0,0 +1,74 @@ +import { APIResource } from "../../core/resource.mjs"; +import * as BetaAPI from "./beta.mjs"; +import { APIPromise } from "../../core/api-promise.mjs"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs"; +import { RequestOptions } from "../../internal/request-options.mjs"; +export declare class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve(modelID: string, params?: ModelRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list(params?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise; +} +export type BetaModelInfosPage = Page; +export interface BetaModelInfo { + /** + * Unique model identifier. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + /** + * A human-readable name for the model. + */ + display_name: string; + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Models { + export { type BetaModelInfo as BetaModelInfo, type BetaModelInfosPage as BetaModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/models.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..3fadaf372d145fd1a304baef3bc2479b5ae5211e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"models.d.mts","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,aAAa,CAAC;CAWlD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,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/@anthropic-ai/sdk/resources/beta/models.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..20c68a6d7333a1106b06e9db4071a50de90c497c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts @@ -0,0 +1,74 @@ +import { APIResource } from "../../core/resource.js"; +import * as BetaAPI from "./beta.js"; +import { APIPromise } from "../../core/api-promise.js"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.js"; +import { RequestOptions } from "../../internal/request-options.js"; +export declare class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve(modelID: string, params?: ModelRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list(params?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise; +} +export type BetaModelInfosPage = Page; +export interface BetaModelInfo { + /** + * Unique model identifier. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + /** + * A human-readable name for the model. + */ + display_name: string; + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Models { + export { type BetaModelInfo as BetaModelInfo, type BetaModelInfosPage as BetaModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; +} +//# 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/@anthropic-ai/sdk/resources/beta/models.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ebce7057da738689c82533a488cf8a5347657e34 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"models.d.ts","sourceR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,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/@anthropic-ai/sdk/resources/beta/models.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js new file mode 100644 index 0000000000000000000000000000000000000000..d398f333e38ff8de71bb9ffdf8ee51b385b3b72b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js @@ -0,0 +1,60 @@ +"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 headers_1 = require("../../internal/headers.js"); +const path_1 = require("../../internal/utils/path.js"); +class Models extends resource_1.APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/models/${modelID}?beta=true`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models?beta=true', (pagination_1.Page), { + query, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +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/@anthropic-ai/sdk/resources/beta/models.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cc17c3a5720153f7d5898b56e51a85763471a184 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map @@ -0,0 +1 @@ +{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA2E;AAC3E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,YAAY,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,iBAAmB,CAAA,EAAE;YAC1E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAzDD,wBAyDC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs new file mode 100644 index 0000000000000000000000000000000000000000..645c853d2ba3a2bca7e434bcea28beb3505791ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs @@ -0,0 +1,56 @@ +// 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 { buildHeaders } from "../../internal/headers.mjs"; +import { path } from "../../internal/utils/path.mjs"; +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/models/${modelID}?beta=true`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models?beta=true', (Page), { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +//# 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/@anthropic-ai/sdk/resources/beta/models.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e27b0e30fb6e7f329a2417d10048735f148d7c09 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,YAAY,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,IAAmB,CAAA,EAAE;YAC1E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f73716bef54a84f948b8ceec97a15e551d2a0b72 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts @@ -0,0 +1,183 @@ +import { APIResource } from "../core/resource.mjs"; +import * as CompletionsAPI from "./completions.mjs"; +import * as BetaAPI from "./beta/beta.mjs"; +import * as MessagesAPI from "./messages/messages.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 { + /** + * [Legacy] Create a Text Completion. + * + * The Text Completions API is a legacy API. We recommend using the + * [Messages API](https://docs.anthropic.com/en/api/messages) going forward. + * + * Future models and features will not be compatible with Text Completions. See our + * [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages) + * for guidance in migrating from Text Completions to Messages. + * + * @example + * ```ts + * const completion = await client.completions.create({ + * max_tokens_to_sample: 256, + * model: 'claude-3-7-sonnet-latest', + * prompt: '\n\nHuman: Hello, world!\n\nAssistant:', + * }); + * ``` + */ + create(params: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(params: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(params: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | Completion>; +} +export interface Completion { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * The resulting completion up to and excluding the stop sequences. + */ + completion: string; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"stop_sequence"`: we reached a stop sequence — either provided by you via the + * `stop_sequences` parameter, or a stop sequence built into the model + * - `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum + */ + stop_reason: string | null; + /** + * Object type. + * + * For Text Completions, this is always `"completion"`. + */ + type: 'completion'; +} +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export interface CompletionCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + */ + max_tokens_to_sample: number; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: The prompt that you want Claude to complete. + * + * For proper response generation you will need to format your prompt using + * alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example: + * + * ``` + * "\n\nHuman: {userQuestion}\n\nAssistant:" + * ``` + * + * See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and + * our guide to + * [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more + * details. + */ + prompt: string; + /** + * Body param: An object describing metadata about the request. + */ + metadata?: MessagesAPI.Metadata; + /** + * Body param: Sequences that will cause the model to stop generating. + * + * Our models stop on `"\n\nHuman:"`, and may include additional built-in stop + * sequences in the future. By providing the stop_sequences parameter, you may + * include additional strings that will cause the model to stop generating. + */ + stop_sequences?: Array; + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: boolean; + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace CompletionCreateParams { + /** + * @deprecated use `Anthropic.Messages.Metadata` instead + */ + type Metadata = MessagesAPI.Metadata; + type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; + type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +} +export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: false; +} +export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream: true; +} +export declare namespace Completions { + export { type Completion as Completion, 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/@anthropic-ai/sdk/resources/completions.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..664d8738919ddb8d760a07faf5425abc1ebaceb6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CACJ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;CAiB/C;AAED,MAA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,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,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/@anthropic-ai/sdk/resources/completions.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..18d6e6f92a4465a6f610cea6c89bbb6792ba5f26 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.ts @@ -0,0 +1,183 @@ +import { APIResource } from "../core/resource.js"; +import * as CompletionsAPI from "./completions.js"; +import * as BetaAPI from "./beta/beta.js"; +import * as MessagesAPI from "./messages/messages.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 { + /** + * [Legacy] Create a Text Completion. + * + * The Text Completions API is a legacy API. We recommend using the + * [Messages API](https://docs.anthropic.com/en/api/messages) going forward. + * + * Future models and features will not be compatible with Text Completions. See our + * [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages) + * for guidance in migrating from Text Completions to Messages. + * + * @example + * ```ts + * const completion = await client.completions.create({ + * max_tokens_to_sample: 256, + * model: 'claude-3-7-sonnet-latest', + * prompt: '\n\nHuman: Hello, world!\n\nAssistant:', + * }); + * ``` + */ + create(params: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(params: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(params: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | Completion>; +} +export interface Completion { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * The resulting completion up to and excluding the stop sequences. + */ + completion: string; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"stop_sequence"`: we reached a stop sequence — either provided by you via the + * `stop_sequences` parameter, or a stop sequence built into the model + * - `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum + */ + stop_reason: string | null; + /** + * Object type. + * + * For Text Completions, this is always `"completion"`. + */ + type: 'completion'; +} +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export interface CompletionCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + */ + max_tokens_to_sample: number; + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + /** + * Body param: The prompt that you want Claude to complete. + * + * For proper response generation you will need to format your prompt using + * alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example: + * + * ``` + * "\n\nHuman: {userQuestion}\n\nAssistant:" + * ``` + * + * See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and + * our guide to + * [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more + * details. + */ + prompt: string; + /** + * Body param: An object describing metadata about the request. + */ + metadata?: MessagesAPI.Metadata; + /** + * Body param: Sequences that will cause the model to stop generating. + * + * Our models stop on `"\n\nHuman:"`, and may include additional built-in stop + * sequences in the future. By providing the stop_sequences parameter, you may + * include additional strings that will cause the model to stop generating. + */ + stop_sequences?: Array; + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: boolean; + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace CompletionCreateParams { + /** + * @deprecated use `Anthropic.Messages.Metadata` instead + */ + type Metadata = MessagesAPI.Metadata; + type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; + type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +} +export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: false; +} +export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream: true; +} +export declare namespace Completions { + export { type Completion as Completion, 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/@anthropic-ai/sdk/resources/completions.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9e5511eb06bccc57058480e3c627ba7c94e5de5f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CACJ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;CAiB/C;AAED,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC;IAEzB;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;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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/@anthropic-ai/sdk/resources/completions.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js new file mode 100644 index 0000000000000000000000000000000000000000..6c721bb99a123cacfb002b95296ab0391cba2928 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js @@ -0,0 +1,23 @@ +"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"); +const headers_1 = require("../internal/headers.js"); +class Completions extends resource_1.APIResource { + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/complete', { + body, + timeout: this._client._options.timeout ?? 600000, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.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/@anthropic-ai/sdk/resources/completions.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7e4e65826e64d4bfaa4b94162d63de5605d7b6b9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;AAM/C,oDAAmD;AAGnD,MAAa,WAAY,SAAQ,sBAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF;AA1CD,kCA0CC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs new file mode 100644 index 0000000000000000000000000000000000000000..648f8e96c8b6bbe0b8b89338f074b1baf779106a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { buildHeaders } from "../internal/headers.mjs"; +export class Completions extends APIResource { + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/complete', { + body, + timeout: this._client._options.timeout ?? 600000, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.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/@anthropic-ai/sdk/resources/completions.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0454551d9ebdf449384f033a2a46a024e52f127b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;OAMf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,WAAY,SAAQ,WAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b2e463c4299f0a515566a726ff89f8ad0046ad56 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts @@ -0,0 +1,6 @@ +export * from "./shared.mjs"; +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.mjs"; +export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.mjs"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.mjs"; +export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.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/@anthropic-ai/sdk/resources/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..252af9d0b3992f1131741e2f66712d8d4decb3ed --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B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ACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..931d04fdea1845b8007231d3df1269f66efa940d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts @@ -0,0 +1,6 @@ +export * from "./shared.js"; +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.js"; +export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.js"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.js"; +export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.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/@anthropic-ai/sdk/resources/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..89a8ec945c015da3271a4b8edd13181bce40281f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACn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B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3d8058bd187b0a36de14a93694720850b704ffeb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js @@ -0,0 +1,15 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Models = exports.Messages = exports.Completions = exports.Beta = void 0; +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./shared.js"), exports); +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 messages_1 = require("./messages/messages.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } }); +var models_1 = require("./models.js"); +Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } }); +//# 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/@anthropic-ai/sdk/resources/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e858d7e369dbc11a7e025920bdd13ea477b3f783 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,uCAcqB;AAbnB,4FAAA,IAAI,OAAA;AAcN,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,mDAwF6B;AAvF3B,oGAAA,QAAQ,OAAA;AAwFV,sCAMkB;AALhB,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..01d72943df0d43238e747dc4e3dd6c6f7a17c95b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./shared.mjs"; +export { Beta, } from "./beta/beta.mjs"; +export { Completions, } from "./completions.mjs"; +export { Messages, } from "./messages/messages.mjs"; +export { Models, } from "./models.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/@anthropic-ai/sdk/resources/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..410ab73104f2d62b59471641f85cd8c31ef307b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,IAAI,GAaL;OACM,EACL,WAAW,GAKZ;OACM,EACL,QAAQ,GAuFT;OACM,EACL,MAAM,GAKP"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..cfa5adeee9197dcc1b47d25c34bf8c31a91183ca --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts @@ -0,0 +1,2 @@ +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..12628e31fa3541d1aebc6eb55f508251c025986a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..795250c879ea8e2f1d1f1acf743f0f5cea0e052b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts @@ -0,0 +1,2 @@ +export * from "./messages/index.js"; +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..659ed6dcddebb6da9447852d616b60534f44a810 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..4c703a21a5feeec2a9fe29fd62f3c872e0394512 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.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("./messages/index.js"), exports); +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bcef52fbf90415cacc7f177cd15b3b271dddc9d3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d675b231aff911954a6f5467c1f702a7f337d03d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..caa8ebda6ad00aed9ab7260c12f2d55ef60afbc1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.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/@anthropic-ai/sdk/resources/messages/batches.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..59e5ad927f1d885c781f639171e017bda994d967 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts @@ -0,0 +1,304 @@ +import { APIResource } from "../../core/resource.mjs"; +import * as Shared from "../shared.mjs"; +import * as MessagesAPI from "./messages.mjs"; +import { APIPromise } from "../../core/api-promise.mjs"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs"; +import { RequestOptions } from "../../internal/request-options.mjs"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.mjs"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + results(messageBatchID: string, options?: RequestOptions): Promise>; +} +export type MessageBatchesPage = Page; +export interface DeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface MessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: MessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface MessageBatchCanceledResult { + type: 'canceled'; +} +export interface MessageBatchErroredResult { + error: Shared.ErrorResponse; + type: 'errored'; +} +export interface MessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface MessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: MessageBatchResult; +} +export interface MessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type MessageBatchResult = MessageBatchSucceededResult | MessageBatchErroredResult | MessageBatchCanceledResult | MessageBatchExpiredResult; +export interface MessageBatchSucceededResult { + message: MessagesAPI.Message; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * List of requests for prompt completion. Each is an individual request to create + * a Message. + */ + requests: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: MessagesAPI.MessageCreateParamsNonStreaming; + } +} +export interface BatchListParams extends PageParams { +} +export declare namespace Batches { + export { type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, 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/@anthropic-ai/sdk/resources/messages/batches.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..a824e0e6c81e30e47d2734d54d1246c5b18fe4be --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;OAClB,EAAE,YAAY,EAAE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CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;CAC5C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,OAAO;QACtB;;;;;WAKG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,MAAM,EAAE,WAAW,CAAC,+BAA+B,CAAC;KACrD;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;CAAG;AAEtD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,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/@anthropic-ai/sdk/resources/messages/batches.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ac8875aa96fccf89865affe0fce23a046b112dfe --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts @@ -0,0 +1,304 @@ +import { APIResource } from "../../core/resource.js"; +import * as Shared from "../shared.js"; +import * as MessagesAPI from "./messages.js"; +import { APIPromise } from "../../core/api-promise.js"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.js"; +import { RequestOptions } from "../../internal/request-options.js"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.js"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + results(messageBatchID: string, options?: RequestOptions): Promise>; +} +export type MessageBatchesPage = Page; +export interface DeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface MessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: MessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface MessageBatchCanceledResult { + type: 'canceled'; +} +export interface MessageBatchErroredResult { + error: Shared.ErrorResponse; + type: 'errored'; +} +export interface MessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface MessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: MessageBatchResult; +} +export interface MessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type MessageBatchResult = MessageBatchSucceededResult | MessageBatchErroredResult | MessageBatchCanceledResult | MessageBatchExpiredResult; +export interface MessageBatchSucceededResult { + message: MessagesAPI.Message; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * List of requests for prompt completion. Each is an individual request to create + * a Message. + */ + requests: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: MessagesAPI.MessageCreateParamsNonStreaming; + } +} +export interface BatchListParams extends PageParams { +} +export declare namespace Batches { + export { type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, 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/@anthropic-ai/sdk/resources/messages/batches.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0c0e19258aa315e996f78817faea572c2b62ff0b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE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EAAE,WAAW,CAAC,OAAO,CAAC;IAE7B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;CAC5C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,OAAO;QACtB;;;;;WAKG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,MAAM,EAAE,WAAW,CAAC,+BAA+B,CAAC;KACrD;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;CAAG;AAEtD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,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/@anthropic-ai/sdk/resources/messages/batches.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js new file mode 100644 index 0000000000000000000000000000000000000000..b66f3be2172320c4f7c568c2b44beaad7488551f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js @@ -0,0 +1,153 @@ +"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 headers_1 = require("../../internal/headers.js"); +const jsonl_1 = require("../../internal/decoders/jsonl.js"); +const error_1 = require("../../error.js"); +const path_1 = require("../../internal/utils/path.js"); +class Batches extends resource_1.APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body, options) { + return this._client.post('/v1/messages/batches', { body, ...options }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, options) { + return this._client.get((0, path_1.path) `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query = {}, options) { + return this._client.getAPIList('/v1/messages/batches', (pagination_1.Page), { query, ...options }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID, options) { + return this._client.delete((0, path_1.path) `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, options) { + return this._client.post((0, path_1.path) `/v1/messages/batches/${messageBatchID}/cancel`, options); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + async results(messageBatchID, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new error_1.AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + return this._client + .get(batch.results_url, { + ...options, + headers: (0, headers_1.buildHeaders)([{ Accept: 'application/binary' }, options?.headers]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => jsonl_1.JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +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/@anthropic-ai/sdk/resources/messages/batches.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4464b84362b540fa49fed5b74b387f6a4a59bfc1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.js","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAA2E;AAC3E,uDAAsD;AAEtD,4DAA6D;AAC7D,0CAA6C;AAC7C,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,iBAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,cAAc,SAAS,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,OAAO,CACX,cAAsB,EACtB,OAAwB;QAExB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YACvB,MAAM,IAAI,sBAAc,CACtB,yDAAyD,KAAK,CAAC,iBAAiB,MAAM,KAAK,CAAC,EAAE,EAAE,CACjG,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,OAAO;aAChB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE;YACtB,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3E,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,IAAI;SACvB,CAAC;aACD,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,oBAAY,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAEvF,CAAC;IACJ,CAAC;CACF;AA5JD,0BA4JC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7db6c90d23595c817a25ec2152f653a7b0d0c12b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs @@ -0,0 +1,149 @@ +// 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 { buildHeaders } from "../../internal/headers.mjs"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.mjs"; +import { AnthropicError } from "../../error.mjs"; +import { path } from "../../internal/utils/path.mjs"; +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body, options) { + return this._client.post('/v1/messages/batches', { body, ...options }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, options) { + return this._client.get(path `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query = {}, options) { + return this._client.getAPIList('/v1/messages/batches', (Page), { query, ...options }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID, options) { + return this._client.delete(path `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, options) { + return this._client.post(path `/v1/messages/batches/${messageBatchID}/cancel`, options); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + async results(messageBatchID, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +//# 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/@anthropic-ai/sdk/resources/messages/batches.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..777743902590ae95de12d133c9fc830493292c9e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE;OAClB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,IAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,wBAAwB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,cAAc,SAAS,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,OAAO,CACX,cAAsB,EACtB,OAAwB;QAExB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YACvB,MAAM,IAAI,cAAc,CACtB,yDAAyD,KAAK,CAAC,iBAAiB,MAAM,KAAK,CAAC,EAAE,EAAE,CACjG,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,OAAO;aAChB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE;YACtB,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3E,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,IAAI;SACvB,CAAC;aACD,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAEvF,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/@anthropic-ai/sdk/resources/messages/index.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..881ca208de7e5dffe8846986e68424f7803a8041 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts @@ -0,0 +1,3 @@ +export { Batches, type DeletedMessageBatch, type MessageBatch, type MessageBatchCanceledResult, type MessageBatchErroredResult, type MessageBatchExpiredResult, type MessageBatchIndividualResponse, type MessageBatchRequestCounts, type MessageBatchResult, type MessageBatchSucceededResult, type BatchCreateParams, type BatchListParams, type MessageBatchesPage, } from "./batches.mjs"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageStreamEvent, type MessageStartEvent, type MessageStopEvent, type ContentBlockDeltaEvent, type MessageCreateParams, type MessageCreateParamsBase, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages.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/@anthropic-ai/sdk/resources/messages/index.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ac9ab33cb1a81d8595d5982730232b796bdcc2e3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,E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B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2478e2f3a49d22f6b9e7af0d5d786521af979e3a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts @@ -0,0 +1,3 @@ +export { Batches, type DeletedMessageBatch, type MessageBatch, type MessageBatchCanceledResult, type MessageBatchErroredResult, type MessageBatchExpiredResult, type MessageBatchIndividualResponse, type MessageBatchRequestCounts, type MessageBatchResult, type MessageBatchSucceededResult, type BatchCreateParams, type BatchListParams, type MessageBatchesPage, } from "./batches.js"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageStreamEvent, type MessageStartEvent, type MessageStopEvent, type ContentBlockDeltaEvent, type MessageCreateParams, type MessageCreateParamsBase, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages.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/@anthropic-ai/sdk/resources/messages/index.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a128f0178b3beb533070b018e8bec9855af5df86 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KA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iB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js new file mode 100644 index 0000000000000000000000000000000000000000..56cbce5ff533754afacdaf4d53dcca9b7c899bab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js @@ -0,0 +1,9 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = exports.Batches = void 0; +var batches_1 = require("./batches.js"); +Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } }); +var messages_1 = require("./messages.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } }); +//# 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/@anthropic-ai/sdk/resources/messages/index.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c5e09238d6e30240f02d8e6c5729a4b63a8d6ab4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAcmB;AAbjB,kGAAA,OAAO,OAAA;AAcT,0CA4FoB;AA3FlB,oGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..43fef1dd1f50a905c5b77ff2a2df1d906329a5ec --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Batches, } from "./batches.mjs"; +export { Messages, } from "./messages.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/@anthropic-ai/sdk/resources/messages/index.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b3e353f62d118eb0c1b1c7b04a0c1f4ad2f4efbf --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAaR;OACM,EACL,QAAQ,GA2FT"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0c90322dc419d37def61b51b676b5af2c28e0415 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts @@ -0,0 +1,1295 @@ +import { APIPromise } from "../../core/api-promise.mjs"; +import { APIResource } from "../../core/resource.mjs"; +import { Stream } from "../../core/streaming.mjs"; +import { RequestOptions } from "../../internal/request-options.mjs"; +import { MessageStream } from "../../lib/MessageStream.mjs"; +import * as BatchesAPI from "./batches.mjs"; +import { BatchCreateParams, BatchListParams, Batches, DeletedMessageBatch, MessageBatch, MessageBatchCanceledResult, MessageBatchErroredResult, MessageBatchExpiredResult, MessageBatchIndividualResponse, MessageBatchRequestCounts, MessageBatchResult, MessageBatchSucceededResult, MessageBatchesPage } from "./batches.mjs"; +import * as MessagesAPI from "./messages.mjs"; +export declare class Messages extends APIResource { + batches: BatchesAPI.Batches; + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const message = await client.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(body: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(body: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(body: MessageCreateParamsBase, options?: RequestOptions): APIPromise | Message>; + /** + * Create a Message stream + */ + stream(body: MessageStreamParams, options?: RequestOptions): MessageStream; + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body: MessageCountTokensParams, options?: RequestOptions): APIPromise; +} +export interface Base64ImageSource { + data: string; + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + type: 'base64'; +} +export interface Base64PDFSource { + data: string; + media_type: 'application/pdf'; + type: 'base64'; +} +export interface CacheControlEphemeral { + type: 'ephemeral'; +} +export interface CitationCharLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationCharLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationContentBlockLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationContentBlockLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationPageLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationPageLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationWebSearchResultLocationParam { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface CitationsConfigParam { + enabled?: boolean; +} +export interface CitationsDelta { + citation: CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; + type: 'citations_delta'; +} +export interface CitationsWebSearchResultLocation { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export type ContentBlock = TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; +/** + * Regular text content. + */ +export type ContentBlockParam = ServerToolUseBlockParam | WebSearchToolResultBlockParam | TextBlockParam | ImageBlockParam | ToolUseBlockParam | ToolResultBlockParam | DocumentBlockParam | ThinkingBlockParam | RedactedThinkingBlockParam; +export interface ContentBlockSource { + content: string | Array; + type: 'content'; +} +export type ContentBlockSourceContent = TextBlockParam | ImageBlockParam; +export interface DocumentBlockParam { + source: Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource; + type: 'document'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: CitationsConfigParam; + context?: string | null; + title?: string | null; +} +export interface ImageBlockParam { + source: Base64ImageSource | URLImageSource; + type: 'image'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface InputJSONDelta { + partial_json: string; + type: 'input_json_delta'; +} +export interface Message { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: StopReason | null; + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: Usage; +} +export type MessageCountTokensTool = Tool | ToolBash20250124 | ToolTextEditor20250124 | MessageCountTokensTool.TextEditor20250429 | WebSearchTool20250305; +export declare namespace MessageCountTokensTool { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface MessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; +} +export interface MessageParam { + content: string | Array; + role: 'user' | 'assistant'; +} +export interface MessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} +export interface Metadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} +/** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ +export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-0' | 'claude-4-sonnet-20250514' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-4-opus-20250514' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-2.1' | 'claude-2.0' | (string & {}); +export interface PlainTextSource { + data: string; + media_type: 'text/plain'; + type: 'text'; +} +export type RawContentBlockDelta = TextDelta | InputJSONDelta | CitationsDelta | ThinkingDelta | SignatureDelta; +export interface RawContentBlockDeltaEvent { + delta: RawContentBlockDelta; + index: number; + type: 'content_block_delta'; +} +export interface RawContentBlockStartEvent { + content_block: TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; + index: number; + type: 'content_block_start'; +} +export interface RawContentBlockStopEvent { + index: number; + type: 'content_block_stop'; +} +export interface RawMessageDeltaEvent { + delta: RawMessageDeltaEvent.Delta; + type: 'message_delta'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: MessageDeltaUsage; +} +export declare namespace RawMessageDeltaEvent { + interface Delta { + stop_reason: MessagesAPI.StopReason | null; + stop_sequence: string | null; + } +} +export interface RawMessageStartEvent { + message: Message; + type: 'message_start'; +} +export interface RawMessageStopEvent { + type: 'message_stop'; +} +export type RawMessageStreamEvent = RawMessageStartEvent | RawMessageDeltaEvent | RawMessageStopEvent | RawContentBlockStartEvent | RawContentBlockDeltaEvent | RawContentBlockStopEvent; +export interface RedactedThinkingBlock { + data: string; + type: 'redacted_thinking'; +} +export interface RedactedThinkingBlockParam { + data: string; + type: 'redacted_thinking'; +} +export interface ServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} +export interface ServerToolUseBlock { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; +} +export interface ServerToolUseBlockParam { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface SignatureDelta { + signature: string; + type: 'signature_delta'; +} +export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; +export interface TextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + text: string; + type: 'text'; +} +export interface TextBlockParam { + text: string; + type: 'text'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: Array | null; +} +export type TextCitation = CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; +export type TextCitationParam = CitationCharLocationParam | CitationPageLocationParam | CitationContentBlockLocationParam | CitationWebSearchResultLocationParam; +export interface TextDelta { + text: string; + type: 'text_delta'; +} +export interface ThinkingBlock { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingBlockParam { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingConfigDisabled { + type: 'disabled'; +} +export interface ThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + type: 'enabled'; +} +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled; +export interface ThinkingDelta { + thinking: string; + type: 'thinking_delta'; +} +export interface Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: Tool.InputSchema; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + type?: 'custom' | null; +} +export declare namespace Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + interface InputSchema { + type: 'object'; + properties?: unknown | null; + required?: Array | null; + [k: string]: unknown; + } +} +export interface ToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | ToolChoiceNone; +/** + * The model will use any available tools. + */ +export interface ToolChoiceAny { + type: 'any'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will automatically decide whether to use tools. + */ +export interface ToolChoiceAuto { + type: 'auto'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will not be allowed to use tools. + */ +export interface ToolChoiceNone { + type: 'none'; +} +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface ToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + type: 'tool'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +export interface ToolResultBlockParam { + tool_use_id: string; + type: 'tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface ToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type ToolUnion = Tool | ToolBash20250124 | ToolTextEditor20250124 | ToolUnion.TextEditor20250429 | WebSearchTool20250305; +export declare namespace ToolUnion { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface ToolUseBlock { + id: string; + input: unknown; + name: string; + type: 'tool_use'; +} +export interface ToolUseBlockParam { + id: string; + input: unknown; + name: string; + type: 'tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface URLImageSource { + type: 'url'; + url: string; +} +export interface URLPDFSource { + type: 'url'; + url: string; +} +export interface Usage { + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The number of input tokens which were used. + */ + input_tokens: number; + /** + * The number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} +export interface WebSearchResultBlock { + encrypted_content: string; + page_age: string | null; + title: string; + type: 'web_search_result'; + url: string; +} +export interface WebSearchResultBlockParam { + encrypted_content: string; + title: string; + type: 'web_search_result'; + url: string; + page_age?: string | null; +} +export interface WebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + type: 'web_search_20250305'; + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: WebSearchTool20250305.UserLocation | null; +} +export declare namespace WebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + interface UserLocation { + type: 'approximate'; + /** + * The city of the user. + */ + city?: string | null; + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + /** + * The region of the user. + */ + region?: string | null; + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} +export interface WebSearchToolRequestError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export interface WebSearchToolResultBlock { + content: WebSearchToolResultBlockContent; + tool_use_id: string; + type: 'web_search_tool_result'; +} +export type WebSearchToolResultBlockContent = WebSearchToolResultError | Array; +export interface WebSearchToolResultBlockParam { + content: WebSearchToolResultBlockParamContent; + tool_use_id: string; + type: 'web_search_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type WebSearchToolResultBlockParamContent = Array | WebSearchToolRequestError; +export interface WebSearchToolResultError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export type MessageStreamEvent = RawMessageStreamEvent; +export type MessageStartEvent = RawMessageStartEvent; +export type MessageDeltaEvent = RawMessageDeltaEvent; +export type MessageStopEvent = RawMessageStopEvent; +export type ContentBlockStartEvent = RawContentBlockStartEvent; +export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent; +export type ContentBlockStopEvent = RawContentBlockStopEvent; +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; +export interface MessageCreateParamsBase { + /** + * The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * An object describing metadata about the request. + */ + metadata?: Metadata; + /** + * Determines whether to use priority capacity (if available) or standard capacity + * for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + /** + * Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; +} +export declare namespace MessageCreateParams { + type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming; + type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming; +} +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} +export type MessageStreamParams = MessageCreateParamsBase; +export interface MessageCountTokensParams { + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; +} +export declare namespace Messages { + export { type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type ContentBlock as ContentBlock, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageStreamEvent as MessageStreamEvent, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Batches as Batches, type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..836c62011223a1831ca65d3d568af60b21cc0a6d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE;OACf,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;OAClB,EAAE,aAAa,EAAE;OACjB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EACnB;OACM,KAAK,WAAW;AAIvB,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,IAAI,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAC5F,MAAM,CACJ,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC5C,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;IAyBtD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa;IAI1E;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,c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AK,EACnB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,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/@anthropic-ai/sdk/resources/messages/messages.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8713ac70b168fa1990143ebf91e381e5610298b8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts @@ -0,0 +1,1295 @@ +import { APIPromise } from "../../core/api-promise.js"; +import { APIResource } from "../../core/resource.js"; +import { Stream } from "../../core/streaming.js"; +import { RequestOptions } from "../../internal/request-options.js"; +import { MessageStream } from "../../lib/MessageStream.js"; +import * as BatchesAPI from "./batches.js"; +import { BatchCreateParams, BatchListParams, Batches, DeletedMessageBatch, MessageBatch, MessageBatchCanceledResult, MessageBatchErroredResult, MessageBatchExpiredResult, MessageBatchIndividualResponse, MessageBatchRequestCounts, MessageBatchResult, MessageBatchSucceededResult, MessageBatchesPage } from "./batches.js"; +import * as MessagesAPI from "./messages.js"; +export declare class Messages extends APIResource { + batches: BatchesAPI.Batches; + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const message = await client.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(body: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(body: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(body: MessageCreateParamsBase, options?: RequestOptions): APIPromise | Message>; + /** + * Create a Message stream + */ + stream(body: MessageStreamParams, options?: RequestOptions): MessageStream; + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body: MessageCountTokensParams, options?: RequestOptions): APIPromise; +} +export interface Base64ImageSource { + data: string; + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + type: 'base64'; +} +export interface Base64PDFSource { + data: string; + media_type: 'application/pdf'; + type: 'base64'; +} +export interface CacheControlEphemeral { + type: 'ephemeral'; +} +export interface CitationCharLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationCharLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationContentBlockLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationContentBlockLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationPageLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationPageLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationWebSearchResultLocationParam { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface CitationsConfigParam { + enabled?: boolean; +} +export interface CitationsDelta { + citation: CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; + type: 'citations_delta'; +} +export interface CitationsWebSearchResultLocation { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export type ContentBlock = TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; +/** + * Regular text content. + */ +export type ContentBlockParam = ServerToolUseBlockParam | WebSearchToolResultBlockParam | TextBlockParam | ImageBlockParam | ToolUseBlockParam | ToolResultBlockParam | DocumentBlockParam | ThinkingBlockParam | RedactedThinkingBlockParam; +export interface ContentBlockSource { + content: string | Array; + type: 'content'; +} +export type ContentBlockSourceContent = TextBlockParam | ImageBlockParam; +export interface DocumentBlockParam { + source: Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource; + type: 'document'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: CitationsConfigParam; + context?: string | null; + title?: string | null; +} +export interface ImageBlockParam { + source: Base64ImageSource | URLImageSource; + type: 'image'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface InputJSONDelta { + partial_json: string; + type: 'input_json_delta'; +} +export interface Message { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: StopReason | null; + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: Usage; +} +export type MessageCountTokensTool = Tool | ToolBash20250124 | ToolTextEditor20250124 | MessageCountTokensTool.TextEditor20250429 | WebSearchTool20250305; +export declare namespace MessageCountTokensTool { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface MessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; +} +export interface MessageParam { + content: string | Array; + role: 'user' | 'assistant'; +} +export interface MessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} +export interface Metadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} +/** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ +export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-0' | 'claude-4-sonnet-20250514' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-4-opus-20250514' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-2.1' | 'claude-2.0' | (string & {}); +export interface PlainTextSource { + data: string; + media_type: 'text/plain'; + type: 'text'; +} +export type RawContentBlockDelta = TextDelta | InputJSONDelta | CitationsDelta | ThinkingDelta | SignatureDelta; +export interface RawContentBlockDeltaEvent { + delta: RawContentBlockDelta; + index: number; + type: 'content_block_delta'; +} +export interface RawContentBlockStartEvent { + content_block: TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; + index: number; + type: 'content_block_start'; +} +export interface RawContentBlockStopEvent { + index: number; + type: 'content_block_stop'; +} +export interface RawMessageDeltaEvent { + delta: RawMessageDeltaEvent.Delta; + type: 'message_delta'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: MessageDeltaUsage; +} +export declare namespace RawMessageDeltaEvent { + interface Delta { + stop_reason: MessagesAPI.StopReason | null; + stop_sequence: string | null; + } +} +export interface RawMessageStartEvent { + message: Message; + type: 'message_start'; +} +export interface RawMessageStopEvent { + type: 'message_stop'; +} +export type RawMessageStreamEvent = RawMessageStartEvent | RawMessageDeltaEvent | RawMessageStopEvent | RawContentBlockStartEvent | RawContentBlockDeltaEvent | RawContentBlockStopEvent; +export interface RedactedThinkingBlock { + data: string; + type: 'redacted_thinking'; +} +export interface RedactedThinkingBlockParam { + data: string; + type: 'redacted_thinking'; +} +export interface ServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} +export interface ServerToolUseBlock { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; +} +export interface ServerToolUseBlockParam { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface SignatureDelta { + signature: string; + type: 'signature_delta'; +} +export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; +export interface TextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + text: string; + type: 'text'; +} +export interface TextBlockParam { + text: string; + type: 'text'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: Array | null; +} +export type TextCitation = CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; +export type TextCitationParam = CitationCharLocationParam | CitationPageLocationParam | CitationContentBlockLocationParam | CitationWebSearchResultLocationParam; +export interface TextDelta { + text: string; + type: 'text_delta'; +} +export interface ThinkingBlock { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingBlockParam { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingConfigDisabled { + type: 'disabled'; +} +export interface ThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + type: 'enabled'; +} +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled; +export interface ThinkingDelta { + thinking: string; + type: 'thinking_delta'; +} +export interface Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: Tool.InputSchema; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + type?: 'custom' | null; +} +export declare namespace Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + interface InputSchema { + type: 'object'; + properties?: unknown | null; + required?: Array | null; + [k: string]: unknown; + } +} +export interface ToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | ToolChoiceNone; +/** + * The model will use any available tools. + */ +export interface ToolChoiceAny { + type: 'any'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will automatically decide whether to use tools. + */ +export interface ToolChoiceAuto { + type: 'auto'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will not be allowed to use tools. + */ +export interface ToolChoiceNone { + type: 'none'; +} +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface ToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + type: 'tool'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +export interface ToolResultBlockParam { + tool_use_id: string; + type: 'tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface ToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type ToolUnion = Tool | ToolBash20250124 | ToolTextEditor20250124 | ToolUnion.TextEditor20250429 | WebSearchTool20250305; +export declare namespace ToolUnion { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface ToolUseBlock { + id: string; + input: unknown; + name: string; + type: 'tool_use'; +} +export interface ToolUseBlockParam { + id: string; + input: unknown; + name: string; + type: 'tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface URLImageSource { + type: 'url'; + url: string; +} +export interface URLPDFSource { + type: 'url'; + url: string; +} +export interface Usage { + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The number of input tokens which were used. + */ + input_tokens: number; + /** + * The number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} +export interface WebSearchResultBlock { + encrypted_content: string; + page_age: string | null; + title: string; + type: 'web_search_result'; + url: string; +} +export interface WebSearchResultBlockParam { + encrypted_content: string; + title: string; + type: 'web_search_result'; + url: string; + page_age?: string | null; +} +export interface WebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + type: 'web_search_20250305'; + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: WebSearchTool20250305.UserLocation | null; +} +export declare namespace WebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + interface UserLocation { + type: 'approximate'; + /** + * The city of the user. + */ + city?: string | null; + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + /** + * The region of the user. + */ + region?: string | null; + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} +export interface WebSearchToolRequestError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export interface WebSearchToolResultBlock { + content: WebSearchToolResultBlockContent; + tool_use_id: string; + type: 'web_search_tool_result'; +} +export type WebSearchToolResultBlockContent = WebSearchToolResultError | Array; +export interface WebSearchToolResultBlockParam { + content: WebSearchToolResultBlockParamContent; + tool_use_id: string; + type: 'web_search_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type WebSearchToolResultBlockParamContent = Array | WebSearchToolRequestError; +export interface WebSearchToolResultError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export type MessageStreamEvent = RawMessageStreamEvent; +export type MessageStartEvent = RawMessageStartEvent; +export type MessageDeltaEvent = RawMessageDeltaEvent; +export type MessageStopEvent = RawMessageStopEvent; +export type ContentBlockStartEvent = RawContentBlockStartEvent; +export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent; +export type ContentBlockStopEvent = RawContentBlockStopEvent; +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; +export interface MessageCreateParamsBase { + /** + * The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * An object describing metadata about the request. + */ + metadata?: Metadata; + /** + * Determines whether to use priority capacity (if available) or standard capacity + * for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + /** + * Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; +} +export declare namespace MessageCreateParams { + type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming; + type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming; +} +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} +export type MessageStreamParams = MessageCreateParamsBase; +export interface MessageCountTokensParams { + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; +} +export declare namespace Messages { + export { type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type ContentBlock as ContentBlock, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageStreamEvent as MessageStreamEvent, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Batches as Batches, type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..4ffe6481dbc33f48ad79ed2f567d1220a476b2a4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE;OACf,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;OAClB,EAAE,aAAa,EAAE;OACjB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,0B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B,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,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/@anthropic-ai/sdk/resources/messages/messages.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..14b6f8a3eab913111fa18bf2f1d0387a87811e85 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js @@ -0,0 +1,72 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = void 0; +const tslib_1 = require("../../internal/tslib.js"); +const resource_1 = require("../../core/resource.js"); +const MessageStream_1 = require("../../lib/MessageStream.js"); +const BatchesAPI = tslib_1.__importStar(require("./batches.js")); +const batches_1 = require("./batches.js"); +const constants_1 = require("../../internal/constants.js"); +class Messages extends resource_1.APIResource { + constructor() { + super(...arguments); + this.batches = new BatchesAPI.Batches(this._client); + } + create(body, options) { + if (body.model in DEPRECATED_MODELS) { + console.warn(`The model '${body.model}' is deprecated and will reach end-of-life on ${DEPRECATED_MODELS[body.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`); + } + let timeout = this._client._options.timeout; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = constants_1.MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages', { + body, + timeout: timeout ?? 600000, + ...options, + stream: body.stream ?? false, + }); + } + /** + * Create a Message stream + */ + stream(body, options) { + return MessageStream_1.MessageStream.createMessage(this, body, options); + } + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body, options) { + return this._client.post('/v1/messages/count_tokens', { body, ...options }); + } +} +exports.Messages = Messages; +const DEPRECATED_MODELS = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +Messages.Batches = batches_1.Batches; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c0fe784f578a57c54813943c5b918bcd5e47027 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAGtF,qDAAkD;AAGlD,8DAAwD;AACxD,iEAAwC;AACxC,0CAcmB;AAGnB,2DAAqE;AAErE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFrE,CAAC;IApDC,MAAM,CACJ,IAAyB,EACzB,OAAwB;QAExB,IAAI,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CACV,cAAc,IAAI,CAAC,KAAK,iDACtB,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAC9B,gIAAgI,CACjI,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,GAAI,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAwB,CAAC;QACtE,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,qBAAqB,GAAG,qCAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;YACjF,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAE,OAAO,IAAI,MAAM;YAC1B,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,6BAAa,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,IAA8B,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAlFD,4BAkFC;AAoaD,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AA2pCF,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2960dd94ad7fdea8c5b6e24efe8aed5ea408d361 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs @@ -0,0 +1,67 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../../core/resource.mjs"; +import { MessageStream } from "../../lib/MessageStream.mjs"; +import * as BatchesAPI from "./batches.mjs"; +import { Batches, } from "./batches.mjs"; +import { MODEL_NONSTREAMING_TOKENS } from "../../internal/constants.mjs"; +export class Messages extends APIResource { + constructor() { + super(...arguments); + this.batches = new BatchesAPI.Batches(this._client); + } + create(body, options) { + if (body.model in DEPRECATED_MODELS) { + console.warn(`The model '${body.model}' is deprecated and will reach end-of-life on ${DEPRECATED_MODELS[body.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`); + } + let timeout = this._client._options.timeout; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages', { + body, + timeout: timeout ?? 600000, + ...options, + stream: body.stream ?? false, + }); + } + /** + * Create a Message stream + */ + stream(body, options) { + return MessageStream.createMessage(this, body, options); + } + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body, options) { + return this._client.post('/v1/messages/count_tokens', { body, ...options }); + } +} +const DEPRECATED_MODELS = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +Messages.Batches = Batches; +//# sourceMappingURL=messages.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c26a71dcb29f7691f72da32700871f11a11fcee8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;OAGf,EAAE,aAAa,EAAE;OACjB,KAAK,UAAU;OACf,EAGL,OAAO,GAWR;OAGM,EAAE,yBAAyB,EAAE;AAEpC,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFrE,CAAC;IApDC,MAAM,CACJ,IAAyB,EACzB,OAAwB;QAExB,IAAI,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CACV,cAAc,IAAI,CAAC,KAAK,iDACtB,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAC9B,gIAAgI,CACjI,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,GAAI,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAwB,CAAC;QACtE,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;YACjF,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAE,OAAO,IAAI,MAAM;YAC1B,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,IAA8B,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAoaD,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AA2pCF,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b9c8b62ff2faec86536ce2d421a9d0779bb0a0b6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts @@ -0,0 +1,59 @@ +import { APIResource } from "../core/resource.mjs"; +import * as BetaAPI from "./beta/beta.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { Page, type PageParams, PagePromise } from "../core/pagination.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID: string, params?: ModelRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise; +} +export type ModelInfosPage = Page; +export interface ModelInfo { + /** + * Unique model identifier. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + /** + * A human-readable name for the model. + */ + display_name: string; + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Models { + export { type ModelInfo as ModelInfo, type ModelInfosPage as ModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; +} +//# 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/@anthropic-ai/sdk/resources/models.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..6ae8ddb2ae1817d63fca5ab8087924f90351c140 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,SAAS,CAAC;IAWxB;;;;;OAKG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC;CAW1C;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,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/@anthropic-ai/sdk/resources/models.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ebb09d30c6b51e3136c5f09e9023ea429d25af77 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.ts @@ -0,0 +1,59 @@ +import { APIResource } from "../core/resource.js"; +import * as BetaAPI from "./beta/beta.js"; +import { APIPromise } from "../core/api-promise.js"; +import { Page, type PageParams, PagePromise } from "../core/pagination.js"; +import { RequestOptions } from "../internal/request-options.js"; +export declare class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID: string, params?: ModelRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise; +} +export type ModelInfosPage = Page; +export interface ModelInfo { + /** + * Unique model identifier. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + /** + * A human-readable name for the model. + */ + display_name: string; + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Models { + export { type ModelInfo as ModelInfo, type ModelInfosPage as ModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; +} +//# 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/@anthropic-ai/sdk/resources/models.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..38726dcaa990653962da89906a2872bf268bda87 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,SAAS,CAAC;IAWxB;;;;;OAKG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC;CAW1C;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,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/@anthropic-ai/sdk/resources/models.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js new file mode 100644 index 0000000000000000000000000000000000000000..68d9395566072f1e8aae132750e3e217da6fdde6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js @@ -0,0 +1,45 @@ +"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 headers_1 = require("../internal/headers.js"); +const path_1 = require("../internal/utils/path.js"); +class Models extends resource_1.APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/models/${modelID}`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models', (pagination_1.Page), { + query, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +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/@anthropic-ai/sdk/resources/models.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js.map new file mode 100644 index 0000000000000000000000000000000000000000..51aed3ede1bda351c23406bde9f7ed70eafd7af5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;AAG/C,sDAAwE;AACxE,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,EAAE,EAAE;YACnD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,iBAAe,CAAA,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,wBA0CC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs new file mode 100644 index 0000000000000000000000000000000000000000..15e0aff8ccda457788b08a394a71d04d93be7622 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs @@ -0,0 +1,41 @@ +// 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 { buildHeaders } from "../internal/headers.mjs"; +import { path } from "../internal/utils/path.mjs"; +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/models/${modelID}`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models', (Page), { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +//# 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/@anthropic-ai/sdk/resources/models.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..21e619e7663a982519ad8f3306cced41d69ccc2e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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;OAGf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,EAAE,EAAE;YACnD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,IAAe,CAAA,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8c1643a95d2885a5697535e8c36eafbc71163000 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts @@ -0,0 +1,42 @@ +export interface APIErrorObject { + message: string; + type: 'api_error'; +} +export interface AuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BillingError { + message: string; + type: 'billing_error'; +} +export type ErrorObject = InvalidRequestError | AuthenticationError | BillingError | PermissionError | NotFoundError | RateLimitError | GatewayTimeoutError | APIErrorObject | OverloadedError; +export interface ErrorResponse { + error: ErrorObject; + type: 'error'; +} +export interface GatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface InvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface NotFoundError { + message: string; + type: 'not_found_error'; +} +export interface OverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface PermissionError { + message: string; + type: 'permission_error'; +} +export interface RateLimitError { + message: string; + type: 'rate_limit_error'; +} +//# 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/@anthropic-ai/sdk/resources/shared.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ee05065833e6aa57c20f190d54783bad2a518204 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IAEnB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b912fb74b77413ba3f0b6aa3aab8808d1ffc6734 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts @@ -0,0 +1,42 @@ +export interface APIErrorObject { + message: string; + type: 'api_error'; +} +export interface AuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BillingError { + message: string; + type: 'billing_error'; +} +export type ErrorObject = InvalidRequestError | AuthenticationError | BillingError | PermissionError | NotFoundError | RateLimitError | GatewayTimeoutError | APIErrorObject | OverloadedError; +export interface ErrorResponse { + error: ErrorObject; + type: 'error'; +} +export interface GatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface InvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface NotFoundError { + message: string; + type: 'not_found_error'; +} +export interface OverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface PermissionError { + message: string; + type: 'permission_error'; +} +export interface RateLimitError { + message: string; + type: 'rate_limit_error'; +} +//# 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/@anthropic-ai/sdk/resources/shared.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..86814131c6db8947e25fe5a73d75c8450eb139d6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IAEnB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/shared.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/shared.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/shared.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/resources/top-level.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..31cd61359931c9f46b1503bf1416abc66901fa62 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=top-level.d.mts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ab805acb45604d18382601990e9db19c9aa57422 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.d.mts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3501e29cf7b88a43a465e3da38ff7ec2c0bc9370 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=top-level.d.ts.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..d5a8c488ea093765a3b25fba386222e3ce23d3ac --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js new file mode 100644 index 0000000000000000000000000000000000000000..4c281069e3b55a1d03c84130b6b4106e370da18b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.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=top-level.js.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map new file mode 100644 index 0000000000000000000000000000000000000000..73a66a9edfb6597b7f5a0202d075f9493f774328 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.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/@anthropic-ai/sdk/resources/top-level.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6ab73f65cbfee31f42123468b18e3e756899c91b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=top-level.mjs.map \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a73827e024499191aa70eb776b9763c6a7c30b6d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.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/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bc6ea4e3d180d8f6532fde682535af9e4399bc7f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md @@ -0,0 +1,3 @@ +# Partial JSON Parser + +Vendored from https://www.npmjs.com/package/partial-json-parser and updated to use TypeScript. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts new file mode 100644 index 0000000000000000000000000000000000000000..9470c462f1f6cd609cd1f4901d370ddd986a2dc4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts @@ -0,0 +1,264 @@ +type Token = { + type: string; + value: string; +}; + +const tokenize = (input: string): Token[] => { + let current = 0; + let tokens: Token[] = []; + + while (current < input.length) { + let char = input[current]; + + if (char === '\\') { + current++; + continue; + } + + if (char === '{') { + tokens.push({ + type: 'brace', + value: '{', + }); + + current++; + continue; + } + + if (char === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + + current++; + continue; + } + + if (char === '[') { + tokens.push({ + type: 'paren', + value: '[', + }); + + current++; + continue; + } + + if (char === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + + current++; + continue; + } + + if (char === ':') { + tokens.push({ + type: 'separator', + value: ':', + }); + + current++; + continue; + } + + if (char === ',') { + tokens.push({ + type: 'delimiter', + value: ',', + }); + + current++; + continue; + } + + if (char === '"') { + let value = ''; + let danglingQuote = false; + + char = input[++current]; + + while (char !== '"') { + if (current === input.length) { + danglingQuote = true; + break; + } + + if (char === '\\') { + current++; + if (current === input.length) { + danglingQuote = true; + break; + } + value += char + input[current]; + char = input[++current]; + } else { + value += char; + char = input[++current]; + } + } + + char = input[++current]; + + if (!danglingQuote) { + tokens.push({ + type: 'string', + value, + }); + } + continue; + } + + let WHITESPACE = /\s/; + if (char && WHITESPACE.test(char)) { + current++; + continue; + } + + let NUMBERS = /[0-9]/; + if ((char && NUMBERS.test(char)) || char === '-' || char === '.') { + let value = ''; + + if (char === '-') { + value += char; + char = input[++current]; + } + + while ((char && NUMBERS.test(char)) || char === '.') { + value += char; + char = input[++current]; + } + + tokens.push({ + type: 'number', + value, + }); + continue; + } + + let LETTERS = /[a-z]/i; + if (char && LETTERS.test(char)) { + let value = ''; + + while (char && LETTERS.test(char)) { + if (current === input.length) { + break; + } + value += char; + char = input[++current]; + } + + if (value == 'true' || value == 'false' || value === 'null') { + tokens.push({ + type: 'name', + value, + }); + } else { + // unknown token, e.g. `nul` which isn't quite `null` + current++; + continue; + } + continue; + } + + current++; + } + + return tokens; + }, + strip = (tokens: Token[]): Token[] => { + if (tokens.length === 0) { + return tokens; + } + + let lastToken = tokens[tokens.length - 1]!; + + switch (lastToken.type) { + case 'separator': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + case 'number': + let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1]; + if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + case 'string': + let tokenBeforeTheLastToken = tokens[tokens.length - 2]; + if (tokenBeforeTheLastToken?.type === 'delimiter') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') { + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + } + break; + case 'delimiter': + tokens = tokens.slice(0, tokens.length - 1); + return strip(tokens); + break; + } + + return tokens; + }, + unstrip = (tokens: Token[]): Token[] => { + let tail: string[] = []; + + tokens.map((token) => { + if (token.type === 'brace') { + if (token.value === '{') { + tail.push('}'); + } else { + tail.splice(tail.lastIndexOf('}'), 1); + } + } + if (token.type === 'paren') { + if (token.value === '[') { + tail.push(']'); + } else { + tail.splice(tail.lastIndexOf(']'), 1); + } + } + }); + + if (tail.length > 0) { + tail.reverse().map((item) => { + if (item === '}') { + tokens.push({ + type: 'brace', + value: '}', + }); + } else if (item === ']') { + tokens.push({ + type: 'paren', + value: ']', + }); + } + }); + } + + return tokens; + }, + generate = (tokens: Token[]): string => { + let output = ''; + + tokens.map((token) => { + switch (token.type) { + case 'string': + output += '"' + token.value + '"'; + break; + default: + output += token.value; + break; + } + }); + + return output; + }, + partialParse = (input: string): unknown => JSON.parse(generate(unstrip(strip(tokenize(input))))); + +export { partialParse }; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/api-promise.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/client.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/client.ts new file mode 100644 index 0000000000000000000000000000000000000000..c031f46ee3ff7532bc334ca7d1533cd619f14ea3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/client.ts @@ -0,0 +1,1070 @@ +// 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'; +import { type Logger, type LogLevel, parseLogLevel } from './internal/utils/log'; +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 { VERSION } from './version'; +import * as Errors from './core/error'; +import * as Pagination from './core/pagination'; +import { type PageParams, PageResponse } from './core/pagination'; +import * as Uploads from './core/uploads'; +import * as API from './resources/index'; +import { APIPromise } from './core/api-promise'; +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 { + Completion, + CompletionCreateParams, + CompletionCreateParamsNonStreaming, + CompletionCreateParamsStreaming, + Completions, +} from './resources/completions'; +import { ModelInfo, ModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from './resources/models'; +import { readEnv } from './internal/utils/env'; +import { formatRequestDetails, loggerFor } from './internal/utils/log'; +import { isEmptyObj } from './internal/utils/values'; +import { + AnthropicBeta, + Beta, + BetaAPIError, + BetaAuthenticationError, + BetaBillingError, + BetaError, + BetaErrorResponse, + BetaGatewayTimeoutError, + BetaInvalidRequestError, + BetaNotFoundError, + BetaOverloadedError, + BetaPermissionError, + BetaRateLimitError, +} from './resources/beta/beta'; +import { + Base64ImageSource, + Base64PDFSource, + CacheControlEphemeral, + CitationCharLocation, + CitationCharLocationParam, + CitationContentBlockLocation, + CitationContentBlockLocationParam, + CitationPageLocation, + CitationPageLocationParam, + CitationWebSearchResultLocationParam, + CitationsConfigParam, + CitationsDelta, + CitationsWebSearchResultLocation, + ContentBlock, + ContentBlockDeltaEvent, + ContentBlockParam, + ContentBlockStartEvent, + ContentBlockStopEvent, + ContentBlockSource, + ContentBlockSourceContent, + DocumentBlockParam, + ImageBlockParam, + InputJSONDelta, + Message, + MessageStreamParams, + MessageCountTokensParams, + MessageCountTokensTool, + MessageCreateParams, + MessageCreateParamsNonStreaming, + MessageCreateParamsStreaming, + MessageDeltaEvent, + MessageDeltaUsage, + MessageParam, + MessageStartEvent, + MessageStopEvent, + MessageStreamEvent, + MessageTokensCount, + Messages, + Metadata, + Model, + PlainTextSource, + RawContentBlockDelta, + RawContentBlockDeltaEvent, + RawContentBlockStartEvent, + RawContentBlockStopEvent, + RawMessageDeltaEvent, + RawMessageStartEvent, + RawMessageStopEvent, + RawMessageStreamEvent, + RedactedThinkingBlock, + RedactedThinkingBlockParam, + ServerToolUsage, + ServerToolUseBlock, + ServerToolUseBlockParam, + SignatureDelta, + StopReason, + TextBlock, + TextBlockParam, + TextCitation, + TextCitationParam, + TextDelta, + ThinkingBlock, + ThinkingBlockParam, + ThinkingConfigDisabled, + ThinkingConfigEnabled, + ThinkingConfigParam, + ThinkingDelta, + Tool, + ToolBash20250124, + ToolChoice, + ToolChoiceAny, + ToolChoiceAuto, + ToolChoiceNone, + ToolChoiceTool, + ToolResultBlockParam, + ToolTextEditor20250124, + ToolUnion, + ToolUseBlock, + ToolUseBlockParam, + URLImageSource, + URLPDFSource, + Usage, + WebSearchResultBlock, + WebSearchResultBlockParam, + WebSearchTool20250305, + WebSearchToolRequestError, + WebSearchToolResultBlock, + WebSearchToolResultBlockContent, + WebSearchToolResultBlockParam, + WebSearchToolResultBlockParamContent, + WebSearchToolResultError, +} from './resources/messages/messages'; + +export interface ClientOptions { + /** + * Defaults to process.env['ANTHROPIC_API_KEY']. + */ + apiKey?: string | null | undefined; + + /** + * Defaults to process.env['ANTHROPIC_AUTH_TOKEN']. + */ + authToken?: string | null | undefined; + + /** + * Override the default base URL for the API, e.g., "https://api.example.com/v2/" + * + * Defaults to process.env['ANTHROPIC_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. + */ + 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['ANTHROPIC_LOG'] or 'warn' if it isn't set. + */ + logLevel?: LogLevel | undefined; + + /** + * Set the logger. + * + * Defaults to globalThis.console. + */ + logger?: Logger | undefined; +} + +export class BaseAnthropic { + apiKey: string | null; + authToken: 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 Anthropic API. + * + * @param {string | null | undefined} [opts.apiKey=process.env['ANTHROPIC_API_KEY'] ?? null] + * @param {string | null | undefined} [opts.authToken=process.env['ANTHROPIC_AUTH_TOKEN'] ?? null] + * @param {string} [opts.baseURL=process.env['ANTHROPIC_BASE_URL'] ?? https://api.anthropic.com] - 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('ANTHROPIC_BASE_URL'), + apiKey = readEnv('ANTHROPIC_API_KEY') ?? null, + authToken = readEnv('ANTHROPIC_AUTH_TOKEN') ?? null, + ...opts + }: ClientOptions = {}) { + const options: ClientOptions = { + apiKey, + authToken, + ...opts, + baseURL: baseURL || `https://api.anthropic.com`, + }; + + if (!options.dangerouslyAllowBrowser && isRunningInBrowser()) { + throw new Errors.AnthropicError( + "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 Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n", + ); + } + + this.baseURL = options.baseURL!; + this.timeout = options.timeout ?? Anthropic.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('ANTHROPIC_LOG'), "process.env['ANTHROPIC_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.authToken = authToken; + } + + /** + * Create a new client instance re-using the same options given to the current client with optional overriding. + */ + withOptions(options: Partial): this { + return 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, + fetchOptions: this.fetchOptions, + apiKey: this.apiKey, + authToken: this.authToken, + ...options, + }); + } + + protected defaultQuery(): Record | undefined { + return this._options.defaultQuery; + } + + protected validateHeaders({ values, nulls }: NullableHeaders) { + if (this.apiKey && values.get('x-api-key')) { + return; + } + if (nulls.has('x-api-key')) { + return; + } + + if (this.authToken && values.get('authorization')) { + return; + } + if (nulls.has('authorization')) { + return; + } + + throw new Error( + 'Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted', + ); + } + + protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined { + return buildHeaders([this.apiKeyAuth(opts), this.bearerAuth(opts)]); + } + + protected apiKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + if (this.apiKey == null) { + return undefined; + } + return buildHeaders([{ 'X-Api-Key': this.apiKey }]); + } + + protected bearerAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + if (this.authToken == null) { + return undefined; + } + return buildHeaders([{ Authorization: `Bearer ${this.authToken}` }]); + } + + /** + * Basic re-implementation of `qs.stringify` for primitive types. + */ + protected stringifyQuery(query: Record): string { + return Object.entries(query) + .filter(([_, value]) => typeof value !== 'undefined') + .map(([key, value]) => { + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; + } + if (value === null) { + return `${encodeURIComponent(key)}=`; + } + throw new Errors.AnthropicError( + `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`, + ); + }) + .join('&'); + } + + 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): string { + const url = + isAbsoluteURL(path) ? + new URL(path) + : new URL(this.baseURL + (this.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(); + } + + _calculateNonstreamingTimeout(maxTokens: number): number { + const defaultTimeout = 10 * 60; + const expectedTimeout = (60 * 60 * maxTokens) / 128_000; + if (expectedTimeout > defaultTimeout) { + throw new Errors.AnthropicError( + 'Streaming is strongly recommended for operations that may take longer than 10 minutes. ' + + 'See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details', + ); + } + return defaultTimeout * 1000; + } + + /** + * 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 } = 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 === '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 = 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 Anthropic, 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 shouldRetry(response: Response): boolean { + // 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; + } + + public calculateNonstreamingTimeout(maxTokens: number, maxNonstreamingTokens?: number): number { + const maxTime = 60 * 60 * 1000; // 10 minutes + const defaultTime = 60 * 10 * 1000; // 10 minutes + + const expectedTime = (maxTime * maxTokens) / 128000; + if (expectedTime > defaultTime || (maxNonstreamingTokens != null && maxTokens > maxNonstreamingTokens)) { + throw new Errors.AnthropicError( + 'Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details', + ); + } + + return defaultTime; + } + + buildRequest( + inputOptions: FinalRequestOptions, + { retryCount = 0 }: { retryCount?: number } = {}, + ): { req: FinalizedRequestInit; url: string; timeout: number } { + const options = { ...inputOptions }; + const { method, path, query } = options; + + const url = this.buildURL(path!, query as Record); + if ('timeout' in options) validatePositiveInteger('timeout', options.timeout); + options.timeout = options.timeout ?? this.timeout; + const { bodyHeaders, body } = this.buildBody({ options }); + const reqHeaders = 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 buildHeaders({ + options, + method, + bodyHeaders, + retryCount, + }: { + options: FinalRequestOptions; + method: HTTPMethod; + bodyHeaders: HeadersLike; + retryCount: number; + }): Headers { + 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(), + ...(this._options.dangerouslyAllowBrowser ? + { 'anthropic-dangerous-direct-browser-access': 'true' } + : undefined), + 'anthropic-version': '2023-06-01', + }, + 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 Anthropic = this; + static HUMAN_PROMPT = '\n\nHuman:'; + static AI_PROMPT = '\n\nAssistant:'; + static DEFAULT_TIMEOUT = 600000; // 10 minutes + + static AnthropicError = Errors.AnthropicError; + 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 toFile = Uploads.toFile; +} + +/** + * API Client for interfacing with the Anthropic API. + */ +export class Anthropic extends BaseAnthropic { + completions: API.Completions = new API.Completions(this); + messages: API.Messages = new API.Messages(this); + models: API.Models = new API.Models(this); + beta: API.Beta = new API.Beta(this); +} +Anthropic.Completions = Completions; +Anthropic.Messages = Messages; +Anthropic.Models = Models; +Anthropic.Beta = Beta; +export declare namespace Anthropic { + export type RequestOptions = Opts.RequestOptions; + + export import Page = Pagination.Page; + export { type PageParams as PageParams, type PageResponse as PageResponse }; + + export { + Completions as Completions, + type Completion as Completion, + type CompletionCreateParams as CompletionCreateParams, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; + + export { + Messages as Messages, + type Base64ImageSource as Base64ImageSource, + type Base64PDFSource as Base64PDFSource, + type CacheControlEphemeral as CacheControlEphemeral, + type CitationCharLocation as CitationCharLocation, + type CitationCharLocationParam as CitationCharLocationParam, + type CitationContentBlockLocation as CitationContentBlockLocation, + type CitationContentBlockLocationParam as CitationContentBlockLocationParam, + type CitationPageLocation as CitationPageLocation, + type CitationPageLocationParam as CitationPageLocationParam, + type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, + type CitationsConfigParam as CitationsConfigParam, + type CitationsDelta as CitationsDelta, + type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, + type ContentBlock as ContentBlock, + type ContentBlockDeltaEvent as ContentBlockDeltaEvent, + type ContentBlockParam as ContentBlockParam, + type ContentBlockStartEvent as ContentBlockStartEvent, + type ContentBlockStopEvent as ContentBlockStopEvent, + type ContentBlockSource as ContentBlockSource, + type ContentBlockSourceContent as ContentBlockSourceContent, + type DocumentBlockParam as DocumentBlockParam, + type ImageBlockParam as ImageBlockParam, + type InputJSONDelta as InputJSONDelta, + type Message as Message, + type MessageCountTokensTool as MessageCountTokensTool, + type MessageDeltaEvent as MessageDeltaEvent, + type MessageDeltaUsage as MessageDeltaUsage, + type MessageParam as MessageParam, + type MessageStartEvent as MessageStartEvent, + type MessageStopEvent as MessageStopEvent, + type MessageStreamEvent as MessageStreamEvent, + type MessageTokensCount as MessageTokensCount, + type Metadata as Metadata, + type Model as Model, + type PlainTextSource as PlainTextSource, + type RawContentBlockDelta as RawContentBlockDelta, + type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, + type RawContentBlockStartEvent as RawContentBlockStartEvent, + type RawContentBlockStopEvent as RawContentBlockStopEvent, + type RawMessageDeltaEvent as RawMessageDeltaEvent, + type RawMessageStartEvent as RawMessageStartEvent, + type RawMessageStopEvent as RawMessageStopEvent, + type RawMessageStreamEvent as RawMessageStreamEvent, + type RedactedThinkingBlock as RedactedThinkingBlock, + type RedactedThinkingBlockParam as RedactedThinkingBlockParam, + type ServerToolUsage as ServerToolUsage, + type ServerToolUseBlock as ServerToolUseBlock, + type ServerToolUseBlockParam as ServerToolUseBlockParam, + type SignatureDelta as SignatureDelta, + type StopReason as StopReason, + type TextBlock as TextBlock, + type TextBlockParam as TextBlockParam, + type TextCitation as TextCitation, + type TextCitationParam as TextCitationParam, + type TextDelta as TextDelta, + type ThinkingBlock as ThinkingBlock, + type ThinkingBlockParam as ThinkingBlockParam, + type ThinkingConfigDisabled as ThinkingConfigDisabled, + type ThinkingConfigEnabled as ThinkingConfigEnabled, + type ThinkingConfigParam as ThinkingConfigParam, + type ThinkingDelta as ThinkingDelta, + type Tool as Tool, + type ToolBash20250124 as ToolBash20250124, + type ToolChoice as ToolChoice, + type ToolChoiceAny as ToolChoiceAny, + type ToolChoiceAuto as ToolChoiceAuto, + type ToolChoiceNone as ToolChoiceNone, + type ToolChoiceTool as ToolChoiceTool, + type ToolResultBlockParam as ToolResultBlockParam, + type ToolTextEditor20250124 as ToolTextEditor20250124, + type ToolUnion as ToolUnion, + type ToolUseBlock as ToolUseBlock, + type ToolUseBlockParam as ToolUseBlockParam, + type URLImageSource as URLImageSource, + type URLPDFSource as URLPDFSource, + type Usage as Usage, + type WebSearchResultBlock as WebSearchResultBlock, + type WebSearchResultBlockParam as WebSearchResultBlockParam, + type WebSearchTool20250305 as WebSearchTool20250305, + type WebSearchToolRequestError as WebSearchToolRequestError, + type WebSearchToolResultBlock as WebSearchToolResultBlock, + type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, + type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, + type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, + type WebSearchToolResultError as WebSearchToolResultError, + type MessageCreateParams as MessageCreateParams, + type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming as MessageCreateParamsStreaming, + type MessageStreamParams as MessageStreamParams, + type MessageCountTokensParams as MessageCountTokensParams, + }; + + export { + Models as Models, + type ModelInfo as ModelInfo, + type ModelInfosPage as ModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; + + export { + Beta as Beta, + type AnthropicBeta as AnthropicBeta, + type BetaAPIError as BetaAPIError, + type BetaAuthenticationError as BetaAuthenticationError, + type BetaBillingError as BetaBillingError, + type BetaError as BetaError, + type BetaErrorResponse as BetaErrorResponse, + type BetaGatewayTimeoutError as BetaGatewayTimeoutError, + type BetaInvalidRequestError as BetaInvalidRequestError, + type BetaNotFoundError as BetaNotFoundError, + type BetaOverloadedError as BetaOverloadedError, + type BetaPermissionError as BetaPermissionError, + type BetaRateLimitError as BetaRateLimitError, + }; + + export type APIErrorObject = API.APIErrorObject; + export type AuthenticationError = API.AuthenticationError; + export type BillingError = API.BillingError; + export type ErrorObject = API.ErrorObject; + export type ErrorResponse = API.ErrorResponse; + export type GatewayTimeoutError = API.GatewayTimeoutError; + export type InvalidRequestError = API.InvalidRequestError; + export type NotFoundError = API.NotFoundError; + export type OverloadedError = API.OverloadedError; + export type PermissionError = API.PermissionError; + export type RateLimitError = API.RateLimitError; +} +export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md new file mode 100644 index 0000000000000000000000000000000000000000..485fce8617c9df053f0bed2dd56873df0371b0d0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md @@ -0,0 +1,3 @@ +# `core` + +This directory holds public modules implementing non-resource-specific SDK functionality. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts new file mode 100644 index 0000000000000000000000000000000000000000..3baea03a05ebfba4dcad2bff142ef91ae299dc03 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type BaseAnthropic } from '../client'; + +import { type PromiseOrValue } from '../internal/types'; +import { + type APIResponseProps, + type WithRequestID, + defaultParseResponse, + addRequestID, +} from '../internal/parse'; + +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +export class APIPromise extends Promise> { + private parsedPromise: Promise> | undefined; + #client: BaseAnthropic; + + constructor( + client: BaseAnthropic, + private responsePromise: Promise, + private parseResponse: ( + client: BaseAnthropic, + props: APIResponseProps, + ) => PromiseOrValue> = 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 as any); + }); + this.#client = client; + } + + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { + return new APIPromise(this.#client, 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(): Promise { + 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 `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * 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(): Promise<{ data: T; response: Response; request_id: string | null | undefined }> { + const [data, response] = await Promise.all([this.parse(), this.asResponse()]); + return { data, response, request_id: response.headers.get('request-id') }; + } + + private parse(): Promise> { + if (!this.parsedPromise) { + this.parsedPromise = this.responsePromise.then( + (data) => this.parseResponse(this.#client, data) as any as Promise>, + ); + } + return this.parsedPromise; + } + + override then, TResult2 = never>( + onfulfilled?: ((value: WithRequestID) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): Promise { + return this.parse().then(onfulfilled, onrejected); + } + + override catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): Promise | TResult> { + return this.parse().catch(onrejected); + } + + override finally(onfinally?: (() => void) | undefined | null): Promise> { + return this.parse().finally(onfinally); + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/error.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/error.ts new file mode 100644 index 0000000000000000000000000000000000000000..89ffec90fa9ac3fab06644e17b240f352dc0c18d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/error.ts @@ -0,0 +1,133 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { castToError } from '../internal/errors'; + +export class AnthropicError extends Error {} + +export class APIError< + TStatus extends number | undefined = number | undefined, + THeaders extends Headers | undefined = Headers | undefined, + TError extends Object | undefined = Object | undefined, +> extends AnthropicError { + /** 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 requestID: string | null | undefined; + + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('request-id'); + this.error = error; + } + + private static makeMessage(status: number | undefined, error: any, message: string | undefined) { + 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: number | undefined, + errorResponse: Object | undefined, + message: string | undefined, + headers: Headers | undefined, + ): APIError { + if (!status || !headers) { + return new APIConnectionError({ message, cause: castToError(errorResponse) }); + } + + const error = errorResponse as Record; + + 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 }: { message?: string } = {}) { + super(undefined, undefined, message || 'Request was aborted.', undefined); + } +} + +export class APIConnectionError extends APIError { + constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined }) { + 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 }: { message?: string } = {}) { + super({ message: message ?? 'Request timed out.' }); + } +} + +export class BadRequestError extends APIError<400, Headers> {} + +export class AuthenticationError extends APIError<401, Headers> {} + +export class PermissionDeniedError extends APIError<403, Headers> {} + +export class NotFoundError extends APIError<404, Headers> {} + +export class ConflictError extends APIError<409, Headers> {} + +export class UnprocessableEntityError extends APIError<422, Headers> {} + +export class RateLimitError extends APIError<429, Headers> {} + +export class InternalServerError extends APIError {} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/pagination.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/pagination.ts new file mode 100644 index 0000000000000000000000000000000000000000..f0048bc292722b87267a3d7cf3e06d47c9586eeb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/pagination.ts @@ -0,0 +1,201 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { AnthropicError } from './error'; +import { FinalRequestOptions } from '../internal/request-options'; +import { defaultParseResponse, WithRequestID } from '../internal/parse'; +import { type BaseAnthropic } from '../client'; +import { APIPromise } from './api-promise'; +import { type APIResponseProps } from '../internal/parse'; +import { maybeObj } from '../internal/utils/values'; + +export type PageRequestOptions = Pick; + +export abstract class AbstractPage implements AsyncIterable { + #client: BaseAnthropic; + protected options: FinalRequestOptions; + + protected response: Response; + protected body: unknown; + + constructor(client: BaseAnthropic, response: Response, body: unknown, options: FinalRequestOptions) { + this.#client = client; + this.options = options; + this.response = response; + this.body = body; + } + + abstract nextPageRequestOptions(): PageRequestOptions | null; + + abstract getPaginatedItems(): Item[]; + + hasNextPage(): boolean { + const items = this.getPaginatedItems(); + if (!items.length) return false; + return this.nextPageRequestOptions() != null; + } + + async getNextPage(): Promise { + const nextOptions = this.nextPageRequestOptions(); + if (!nextOptions) { + throw new AnthropicError( + 'No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.', + ); + } + + return await this.#client.requestAPIList(this.constructor as any, nextOptions); + } + + async *iterPages(): AsyncGenerator { + let page: this = this; + yield page; + while (page.hasNextPage()) { + page = await page.getNextPage(); + yield page; + } + } + + async *[Symbol.asyncIterator](): AsyncGenerator { + 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< + PageClass extends AbstractPage, + Item = ReturnType[number], + > + extends APIPromise + implements AsyncIterable +{ + constructor( + client: BaseAnthropic, + request: Promise, + Page: new (...args: ConstructorParameters) => PageClass, + ) { + super( + client, + request, + async (client, props) => + new Page( + client, + props.response, + await defaultParseResponse(client, props), + props.options, + ) as WithRequestID, + ); + } + + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + async *[Symbol.asyncIterator](): AsyncGenerator { + const page = await this; + for await (const item of page) { + yield item; + } + } +} + +export interface PageResponse { + data: Array; + + has_more: boolean; + + first_id: string | null; + + last_id: string | null; +} + +export interface PageParams { + /** + * Number of items per page. + */ + limit?: number; + + before_id?: string; + + after_id?: string; +} + +export class Page extends AbstractPage implements PageResponse { + data: Array; + + has_more: boolean; + + first_id: string | null; + + last_id: string | null; + + constructor( + client: BaseAnthropic, + response: Response, + body: PageResponse, + options: FinalRequestOptions, + ) { + super(client, response, body, options); + + this.data = body.data || []; + this.has_more = body.has_more || false; + this.first_id = body.first_id || null; + this.last_id = body.last_id || null; + } + + getPaginatedItems(): Item[] { + return this.data ?? []; + } + + override hasNextPage(): boolean { + if (this.has_more === false) { + return false; + } + + return super.hasNextPage(); + } + + nextPageRequestOptions(): PageRequestOptions | null { + if ((this.options.query as Record)?.['before_id']) { + // in reverse + const first_id = this.first_id; + if (!first_id) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + before_id: first_id, + }, + }; + } + + const cursor = this.last_id; + if (!cursor) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + after_id: cursor, + }, + }; + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/resource.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/resource.ts new file mode 100644 index 0000000000000000000000000000000000000000..9de4b6772a0b718433cf00e705e6ac2805641650 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/resource.ts @@ -0,0 +1,11 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { BaseAnthropic } from '../client'; + +export class APIResource { + protected _client: BaseAnthropic; + + constructor(client: BaseAnthropic) { + this._client = client; + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/streaming.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/streaming.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae863756807c33bdf12bff95b1c997e77c49a33e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/streaming.ts @@ -0,0 +1,331 @@ +import { AnthropicError } from './error'; +import { type ReadableStream } from '../internal/shim-types'; +import { makeReadableStream } from '../internal/shims'; +import { findDoubleNewlineIndex, LineDecoder } from '../internal/decoders/line'; +import { ReadableStreamToAsyncIterable } from '../internal/shims'; +import { isAbortError } from '../internal/errors'; +import { safeJSON } from '../internal/utils/values'; +import { encodeUTF8 } from '../internal/utils/bytes'; + +import { APIError } from './error'; + +type Bytes = string | ArrayBuffer | Uint8Array | null | undefined; + +export type ServerSentEvent = { + event: string | null; + data: string; + raw: string[]; +}; + +export class Stream implements AsyncIterable { + controller: AbortController; + + constructor( + private iterator: () => AsyncIterator, + controller: AbortController, + ) { + this.controller = controller; + } + + static fromSSEResponse(response: Response, controller: AbortController): Stream { + let consumed = false; + + async function* iterator(): AsyncIterator { + if (consumed) { + throw new AnthropicError('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 (sse.event === 'completion') { + try { + yield JSON.parse(sse.data); + } catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + + if ( + sse.event === 'message_start' || + sse.event === 'message_delta' || + sse.event === 'message_stop' || + sse.event === 'content_block_start' || + sse.event === 'content_block_delta' || + sse.event === 'content_block_stop' + ) { + try { + yield JSON.parse(sse.data); + } catch (e) { + console.error(`Could not parse message into JSON:`, sse.data); + console.error(`From chunk:`, sse.raw); + throw e; + } + } + + if (sse.event === 'ping') { + continue; + } + + if (sse.event === 'error') { + throw new APIError(undefined, safeJSON(sse.data) ?? sse.data, undefined, response.headers); + } + } + 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); + } + + /** + * Generates a Stream from a newline-separated ReadableStream + * where each item is a JSON value. + */ + static fromReadableStream(readableStream: ReadableStream, controller: AbortController): Stream { + let consumed = false; + + async function* iterLines(): AsyncGenerator { + 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(): AsyncIterator { + if (consumed) { + throw new AnthropicError('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); + } + + [Symbol.asyncIterator](): AsyncIterator { + return this.iterator(); + } + + /** + * Splits the stream into two streams which can be + * independently read from at different speeds. + */ + tee(): [Stream, Stream] { + const left: Array>> = []; + const right: Array>> = []; + const iterator = this.iterator(); + + const teeIterator = (queue: Array>>): AsyncIterator => { + 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), + new Stream(() => teeIterator(right), this.controller), + ]; + } + + /** + * 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 { + const self = this; + let iter: AsyncIterator; + + return makeReadableStream({ + async start() { + iter = self[Symbol.asyncIterator](); + }, + async pull(ctrl: any) { + 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: Response, + controller: AbortController, +): AsyncGenerator { + if (!response.body) { + controller.abort(); + if ( + typeof (globalThis as any).navigator !== 'undefined' && + (globalThis as any).navigator.product === 'ReactNative' + ) { + throw new AnthropicError( + `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 AnthropicError(`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: AsyncIterableIterator): AsyncGenerator { + 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 { + private data: string[]; + private event: string | null; + private chunks: string[]; + + constructor() { + this.event = null; + this.data = []; + this.chunks = []; + } + + decode(line: string) { + 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: ServerSentEvent = { + 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: string, delimiter: string): [string, string, string] { + const index = str.indexOf(delimiter); + if (index !== -1) { + return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)]; + } + + return [str, '', '']; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/uploads.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/uploads.ts new file mode 100644 index 0000000000000000000000000000000000000000..2882ca6d18167e95dc8f204846ee798db6b131f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/uploads.ts @@ -0,0 +1,2 @@ +export { type Uploadable } from '../internal/uploads'; +export { toFile, type ToFileInput } from '../internal/to-file'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/error.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..8594f41be8ce609fc3849607785f5038fad3dcd3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/index.ts @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Anthropic as default } from './client'; + +export { type Uploadable, toFile } from './core/uploads'; +export { APIPromise } from './core/api-promise'; +export { BaseAnthropic, Anthropic, type ClientOptions, HUMAN_PROMPT, AI_PROMPT } from './client'; +export { PagePromise } from './core/pagination'; +export { + AnthropicError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from './core/error'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3ef5a25bac10eec3925c29eacbfa68a84517c726 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md @@ -0,0 +1,3 @@ +# `internal` + +The modules in this directory are not importable outside this package and will change between releases. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts new file mode 100644 index 0000000000000000000000000000000000000000..c23d3bdedc13683a2ad7defc1515539ae2f1b32e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts @@ -0,0 +1,93 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +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; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/constants.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/constants.ts new file mode 100644 index 0000000000000000000000000000000000000000..14e9109531a9bf4cb89f6e531858f6a0cb98faea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/constants.ts @@ -0,0 +1,12 @@ +// File containing shared constants + +/** + * Model-specific timeout constraints for non-streaming requests + */ +export const MODEL_NONSTREAMING_TOKENS: Record = { + 'claude-opus-4-20250514': 8192, + 'claude-opus-4-0': 8192, + 'claude-4-opus-20250514': 8192, + 'anthropic.claude-opus-4-20250514-v1:0': 8192, + 'claude-opus-4@20250514': 8192, +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba0cb8f4ad2ace42a4e6bbeaaaf84b1fb5422f6f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts @@ -0,0 +1,48 @@ +import { AnthropicError } from '../../core/error'; +import { ReadableStreamToAsyncIterable } from '../shims'; +import { LineDecoder, type Bytes } from './line'; + +export class JSONLDecoder { + controller: AbortController; + + constructor( + private iterator: AsyncIterableIterator, + controller: AbortController, + ) { + this.controller = controller; + } + + private async *decoder(): AsyncIterator { + const lineDecoder = new LineDecoder(); + for await (const chunk of this.iterator) { + for (const line of lineDecoder.decode(chunk)) { + yield JSON.parse(line); + } + } + + for (const line of lineDecoder.flush()) { + yield JSON.parse(line); + } + } + + [Symbol.asyncIterator](): AsyncIterator { + return this.decoder(); + } + + static fromResponse(response: Response, controller: AbortController): JSONLDecoder { + if (!response.body) { + controller.abort(); + if ( + typeof (globalThis as any).navigator !== 'undefined' && + (globalThis as any).navigator.product === 'ReactNative' + ) { + throw new AnthropicError( + `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 AnthropicError(`Attempted to iterate over a response with no body`); + } + + return new JSONLDecoder(ReadableStreamToAsyncIterable(response.body), controller); + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3bfa97cdfd4723a61c56281af4818dbeedafa22 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts @@ -0,0 +1,135 @@ +import { concatBytes, decodeUTF8, encodeUTF8 } from '../utils/bytes'; + +export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined; + +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +export class LineDecoder { + // prettier-ignore + static NEWLINE_CHARS = new Set(['\n', '\r']); + static NEWLINE_REGEXP = /\r\n|[\n\r]/g; + + #buffer: Uint8Array; + #carriageReturnIndex: number | null; + + constructor() { + this.#buffer = new Uint8Array(); + this.#carriageReturnIndex = null; + } + + decode(chunk: Bytes): string[] { + if (chunk == null) { + return []; + } + + const binaryChunk = + chunk instanceof ArrayBuffer ? new Uint8Array(chunk) + : typeof chunk === 'string' ? encodeUTF8(chunk) + : chunk; + + this.#buffer = concatBytes([this.#buffer, binaryChunk]); + + const lines: string[] = []; + let patternIndex; + while ((patternIndex = findNewlineIndex(this.#buffer, this.#carriageReturnIndex)) != null) { + if (patternIndex.carriage && this.#carriageReturnIndex == null) { + // skip until we either get a corresponding `\n`, a new `\r` or nothing + this.#carriageReturnIndex = patternIndex.index; + continue; + } + + // we got double \r or \rtext\n + if ( + this.#carriageReturnIndex != null && + (patternIndex.index !== this.#carriageReturnIndex + 1 || patternIndex.carriage) + ) { + lines.push(decodeUTF8(this.#buffer.subarray(0, this.#carriageReturnIndex - 1))); + this.#buffer = this.#buffer.subarray(this.#carriageReturnIndex); + this.#carriageReturnIndex = null; + continue; + } + + const endIndex = + this.#carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding; + + const line = decodeUTF8(this.#buffer.subarray(0, endIndex)); + lines.push(line); + + this.#buffer = this.#buffer.subarray(patternIndex.index); + this.#carriageReturnIndex = null; + } + + return lines; + } + + flush(): string[] { + if (!this.#buffer.length) { + return []; + } + return this.decode('\n'); + } +} + +/** + * This function searches the buffer for the end patterns, (\r or \n) + * and returns an object with the index preceding the matched newline and the + * index after the newline char. `null` is returned if no new line is found. + * + * ```ts + * findNewLineIndex('abc\ndef') -> { preceding: 2, index: 3 } + * ``` + */ +function findNewlineIndex( + buffer: Uint8Array, + startIndex: number | null, +): { preceding: number; index: number; carriage: boolean } | null { + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + + for (let i = startIndex ?? 0; i < buffer.length; i++) { + if (buffer[i] === newline) { + return { preceding: i, index: i + 1, carriage: false }; + } + + if (buffer[i] === carriage) { + return { preceding: i, index: i + 1, carriage: true }; + } + } + + return null; +} + +export function findDoubleNewlineIndex(buffer: Uint8Array): number { + // This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n) + // and returns the index right after the first occurrence of any pattern, + // or -1 if none of the patterns are found. + const newline = 0x0a; // \n + const carriage = 0x0d; // \r + + for (let i = 0; i < buffer.length - 1; i++) { + if (buffer[i] === newline && buffer[i + 1] === newline) { + // \n\n + return i + 2; + } + if (buffer[i] === carriage && buffer[i + 1] === carriage) { + // \r\r + return i + 2; + } + if ( + buffer[i] === carriage && + buffer[i + 1] === newline && + i + 3 < buffer.length && + buffer[i + 2] === carriage && + buffer[i + 3] === newline + ) { + // \r\n\r\n + return i + 4; + } + } + + return -1; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts new file mode 100644 index 0000000000000000000000000000000000000000..e82d95c92f05cdc6a167aea50becedff88116adc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts @@ -0,0 +1,196 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { VERSION } from '../version'; + +export const isRunningInBrowser = () => { + return ( + // @ts-ignore + typeof window !== 'undefined' && + // @ts-ignore + typeof window.document !== 'undefined' && + // @ts-ignore + typeof navigator !== 'undefined' + ); +}; + +type DetectedPlatform = 'deno' | 'node' | 'edge' | 'unknown'; + +/** + * Note this does not detect 'browser'; for that, use getBrowserInfo(). + */ +function getDetectedPlatform(): DetectedPlatform { + if (typeof Deno !== 'undefined' && Deno.build != null) { + return 'deno'; + } + if (typeof EdgeRuntime !== 'undefined') { + return 'edge'; + } + if ( + Object.prototype.toString.call( + typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, + ) === '[object process]' + ) { + return 'node'; + } + return 'unknown'; +} + +declare const Deno: any; +declare const EdgeRuntime: any; +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; +}; +const getPlatformProperties = (): PlatformProperties => { + 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 as any).process.version, + }; + } + // Check if Node.js + if (detectedPlatform === 'node') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'), + 'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'), + 'X-Stainless-Runtime': 'node', + 'X-Stainless-Runtime-Version': (globalThis as any).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', + }; +}; + +type BrowserInfo = { + browser: Browser; + version: string; +}; + +declare const navigator: { userAgent: string } | undefined; + +// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts +function getBrowserInfo(): BrowserInfo | null { + if (typeof navigator === 'undefined' || !navigator) { + return null; + } + + // NOTE: The order matters here! + const browserPatterns = [ + { key: 'edge' as const, pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie' as const, pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie' as const, pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'chrome' as const, pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'firefox' as const, pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'safari' as const, 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: string): 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: string): PlatformName => { + // 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: PlatformProperties; +export const getPlatformHeaders = () => { + return (_platformHeaders ??= getPlatformProperties()); +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/errors.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/errors.ts new file mode 100644 index 0000000000000000000000000000000000000000..82c7b14d577cccf53e1719ea34c11d47351c5a63 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/errors.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export function isAbortError(err: unknown) { + return ( + typeof err === 'object' && + err !== null && + // Spec-compliant fetch implementations + (('name' in err && (err as any).name === 'AbortError') || + // Expo fetch + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) + ); +} + +export const castToError = (err: any): Error => { + 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); +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/headers.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/headers.ts new file mode 100644 index 0000000000000000000000000000000000000000..724dd7cb5b83e480119f1a7f8b62642f2c386188 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/headers.ts @@ -0,0 +1,99 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +type HeaderValue = string | undefined | null; +export type HeadersLike = + | Headers + | readonly HeaderValue[][] + | Record + | undefined + | null + | NullableHeaders; + +const brand_privateNullableHeaders = Symbol.for('brand.privateNullableHeaders') as symbol & { + description: 'brand.privateNullableHeaders'; +}; + +/** + * @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. */ + [_: typeof brand_privateNullableHeaders]: true; + /** Parsed headers. */ + values: Headers; + /** Set of lowercase header names explicitly set to null. */ + nulls: Set; +}; + +const isArray = Array.isArray as (val: unknown) => val is readonly unknown[]; + +function* iterateHeaders(headers: HeadersLike): IterableIterator { + if (!headers) return; + + if (brand_privateNullableHeaders in headers) { + const { values, nulls } = headers as NullableHeaders; + yield* values.entries(); + for (const name of nulls) { + yield [name, null]; + } + return; + } + + let shouldClear = false; + let iter: Iterable; + if (headers instanceof Headers) { + iter = headers.entries(); + } else if (isArray(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 = isArray(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: HeadersLike[]): NullableHeaders => { + 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: HeadersLike) => { + for (const _ of iterateHeaders(headers)) return false; + return true; +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/parse.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/parse.ts new file mode 100644 index 0000000000000000000000000000000000000000..f5b8e52702b62f8e0e755b9288daa9474f979a63 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/parse.ts @@ -0,0 +1,84 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import type { FinalRequestOptions } from './request-options'; +import { Stream } from '../core/streaming'; +import { type BaseAnthropic } from '../client'; +import { formatRequestDetails, loggerFor } from './utils/log'; +import type { AbstractPage } from '../core/pagination'; + +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; + +export async function defaultParseResponse( + client: BaseAnthropic, + props: APIResponseProps, +): Promise> { + 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) as any; + } + + return Stream.fromSSEResponse(response, props.controller) as any; + } + + // fetch refuses to read the body when the status code is 204. + if (response.status === 204) { + return null as T; + } + + if (props.options.__binaryResponse) { + return response as unknown as T; + } + + 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 as T, response); + } + + const text = await response.text(); + return text as unknown as T; + })(); + loggerFor(client).debug( + `[${requestLogID}] response parsed`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + }), + ); + return body; +} + +export type WithRequestID = + T extends Array | Response | AbstractPage ? T + : T extends Record ? T & { _request_id?: string | null } + : T; + +export function addRequestID(value: T, response: Response): WithRequestID { + if (!value || typeof value !== 'object' || Array.isArray(value)) { + return value as WithRequestID; + } + + return Object.defineProperty(value, '_request_id', { + value: response.headers.get('request-id'), + enumerable: false, + }) as WithRequestID; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef099310867f2be3a48ce78daf33a7890b51f3bb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { NullableHeaders } from './headers'; + +import type { BodyInit } from './builtin-types'; +import { Stream } from '../core/streaming'; +import type { HTTPMethod, MergedRequestInit } from './types'; +import { type HeadersLike } from './headers'; + +export type FinalRequestOptions = RequestOptions & { method: HTTPMethod; path: string }; + +export type RequestOptions = { + method?: HTTPMethod; + path?: string; + query?: object | undefined | null; + body?: unknown; + headers?: HeadersLike; + maxRetries?: number; + stream?: boolean | undefined; + timeout?: number; + fetchOptions?: MergedRequestInit; + signal?: AbortSignal | undefined | null; + idempotencyKey?: string; + + __binaryResponse?: boolean | undefined; + __streamClass?: typeof Stream; +}; + +export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; +export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; + +export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { + return { + bodyHeaders: { + 'content-type': 'application/json', + }, + body: JSON.stringify(body), + }; +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shim-types.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shim-types.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ddf7b0ad14b80bc73317cf34beae74991f906bb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shim-types.ts @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +/** + * 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 }; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shims.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shims.ts new file mode 100644 index 0000000000000000000000000000000000000000..98d8cd69eb275604e845e52ab32bcad0ae14abfa --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/shims.ts @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +/** + * This module provides internal shims and utility functions for environments where certain Node.js or global types may not be available. + * + * These are used to ensure we can provide a consistent behaviour between different JavaScript environments and good error + * messages in cases where an environment isn't fully supported. + */ + +import type { Fetch } from './builtin-types'; +import type { ReadableStream } from './shim-types'; + +export function getDefaultFetch(): Fetch { + if (typeof fetch !== 'undefined') { + return fetch as any; + } + + throw new Error( + '`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`', + ); +} + +type ReadableStreamArgs = ConstructorParameters; + +export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream { + const ReadableStream = (globalThis as any).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: Iterable | AsyncIterable): ReadableStream { + let iter: AsyncIterator | Iterator = + Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + + return makeReadableStream({ + start() {}, + async pull(controller: any) { + 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: any): AsyncIterableIterator { + 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: any): Promise { + 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; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..37f7793cffc8d65cc02ce1750f600e676ced481f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts @@ -0,0 +1,32 @@ +/** + * 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: any): AsyncIterableIterator { + 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; + }, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts new file mode 100644 index 0000000000000000000000000000000000000000..289c4eed7054cd102a99e2f42ca730edb62e7770 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts @@ -0,0 +1,159 @@ +import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; +import type { FilePropertyBag } from './builtin-types'; +import { checkFileSupport } from './uploads'; + +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; +} + +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isBlobLike = (value: any): value is BlobLike & { arrayBuffer(): Promise } => + 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'; + +/** + * 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; +} + +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isFileLike = (value: any): value is FileLike & { arrayBuffer(): Promise } => + value != null && + typeof value === 'object' && + typeof value.name === 'string' && + typeof value.lastModified === 'number' && + isBlobLike(value); + +/** + * Intended to match DOM Response, node-fetch Response, undici Response, etc. + */ +export interface ResponseLike { + url: string; + blob(): Promise; +} + +const isResponseLike = (value: any): value is ResponseLike => + value != null && + typeof value === 'object' && + typeof value.url === 'string' && + typeof value.blob === 'function'; + +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 async function toFile( + value: ToFileInput | PromiseLike, + name?: string | null | undefined, + options?: FilePropertyBag | undefined, +): Promise { + checkFileSupport(); + + // If it's a promise, resolve it. + value = await value; + + name ||= getName(value); + + // If we've been given a `File` we don't need to do anything if the name / options + // have not been customised. + if (isFileLike(value)) { + if (value instanceof File && name == null && options == null) { + return value; + } + return makeFile([await value.arrayBuffer()], name ?? value.name, { + type: value.type, + lastModified: value.lastModified, + ...options, + }); + } + + if (isResponseLike(value)) { + const blob = await value.blob(); + name ||= new URL(value.url).pathname.split(/[\\/]/).pop(); + + return makeFile(await getBytes(blob), name, options); + } + + const parts = await getBytes(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: BlobLikePart | AsyncIterable): Promise> { + let parts: Array = []; + 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 as BlobLikePart))); // 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: unknown): string { + if (typeof value !== 'object' || value === null) return ''; + const props = Object.getOwnPropertyNames(value); + return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/types.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..d7928cd35dc9ac803ca64108fb20b94b6a28401e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/types.ts @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +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 = [unknown] extends [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; + +/* eslint-disable */ +/** + * 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 */ +type NodeFetchRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users who use Deno */ +type FetchRequestInit = NonNullable[1]>; +/* eslint-enable */ + +type RequestInits = + | 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>; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts new file mode 100644 index 0000000000000000000000000000000000000000..95f4be26a424c45d1a9377cc426a5c2b893d0f8e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts @@ -0,0 +1,193 @@ +import { type RequestOptions } from './request-options'; +import type { FilePropertyBag, Fetch } from './builtin-types'; +import type { BaseAnthropic } from '../client'; +import { ReadableStreamFrom } from './shims'; + +export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView; +type FsReadStream = AsyncIterable & { path: string | { toString(): string } }; + +// https://github.com/oven-sh/bun/issues/5980 +interface BunFile extends Blob { + readonly name?: string | undefined; +} + +export const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis as any; + 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`." + : ''), + ); + } +}; + +/** + * 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 function makeFile( + fileBits: BlobPart[], + fileName: string | undefined, + options?: FilePropertyBag, +): File { + checkFileSupport(); + return new File(fileBits as any, fileName ?? 'unknown_file', options); +} + +export function getName(value: any): string | undefined { + 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: any): value is AsyncIterable => + 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: RequestOptions, + fetch: BaseAnthropic | Fetch, +): Promise => { + if (!hasUploadableValue(opts.body)) return opts; + + return { ...opts, body: await createForm(opts.body, fetch) }; +}; + +type MultipartFormRequestOptions = Omit & { body: unknown }; + +export const multipartFormRequestOptions = async ( + opts: MultipartFormRequestOptions, + fetch: BaseAnthropic | Fetch, +): Promise => { + return { ...opts, body: await createForm(opts.body, fetch) }; +}; + +const supportsFormDataMap = 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: BaseAnthropic | Fetch): Promise { + const fetch: Fetch = typeof fetchObject === 'function' ? fetchObject : (fetchObject as any).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) as typeof Response; + 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: T | undefined, + fetch: BaseAnthropic | Fetch, +): Promise => { + 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: unknown): value is Blob => value instanceof Blob && 'name' in value; + +const isUploadable = (value: unknown) => + typeof value === 'object' && + value !== null && + (value instanceof Response || isAsyncIterable(value) || isNamedBlob(value)); + +const hasUploadableValue = (value: unknown): boolean => { + 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 as any)[k])) return true; + } + } + return false; +}; + +const addFormValue = async (form: FormData, key: string, value: unknown): Promise => { + 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) { + let options = {} as FilePropertyBag; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + + form.append(key, makeFile([await value.blob()], getName(value), options)); + } else if (isAsyncIterable(value)) { + form.append(key, makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value))); + } else if (isNamedBlob(value)) { + form.append(key, makeFile([value], getName(value), { type: value.type })); + } 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`, + ); + } +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..3cbfacce29a05b720a183ce2c4680a40a8463fea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils.ts @@ -0,0 +1,8 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './utils/values'; +export * from './utils/base64'; +export * from './utils/env'; +export * from './utils/log'; +export * from './utils/uuid'; +export * from './utils/sleep'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts new file mode 100644 index 0000000000000000000000000000000000000000..f028d34aa3b6e70f4d9a2d6885165c5876eb6a88 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { AnthropicError } from '../../core/error'; +import { encodeUTF8 } from './bytes'; + +export const toBase64 = (data: string | Uint8Array | null | undefined): string => { + if (!data) return ''; + + if (typeof (globalThis as any).Buffer !== 'undefined') { + return (globalThis as any).Buffer.from(data).toString('base64'); + } + + if (typeof data === 'string') { + data = encodeUTF8(data); + } + + if (typeof btoa !== 'undefined') { + return btoa(String.fromCharCode.apply(null, data as any)); + } + + throw new AnthropicError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined'); +}; + +export const fromBase64 = (str: string): Uint8Array => { + if (typeof (globalThis as any).Buffer !== 'undefined') { + const buf = (globalThis as any).Buffer.from(str, 'base64'); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + + if (typeof atob !== 'undefined') { + const bstr = atob(str); + const buf = new Uint8Array(bstr.length); + for (let i = 0; i < bstr.length; i++) { + buf[i] = bstr.charCodeAt(i); + } + return buf; + } + + throw new AnthropicError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined'); +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts new file mode 100644 index 0000000000000000000000000000000000000000..8da627abe133306f787a3d0c4d7182ab3170804b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts @@ -0,0 +1,32 @@ +export function concatBytes(buffers: Uint8Array[]): Uint8Array { + let length = 0; + for (const buffer of buffers) { + length += buffer.length; + } + const output = new Uint8Array(length); + let index = 0; + for (const buffer of buffers) { + output.set(buffer, index); + index += buffer.length; + } + + return output; +} + +let encodeUTF8_: (str: string) => Uint8Array; +export function encodeUTF8(str: string) { + let encoder; + return ( + encodeUTF8_ ?? + ((encoder = new (globalThis as any).TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))) + )(str); +} + +let decodeUTF8_: (bytes: Uint8Array) => string; +export function decodeUTF8(bytes: Uint8Array) { + let decoder; + return ( + decodeUTF8_ ?? + ((decoder = new (globalThis as any).TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))) + )(bytes); +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d8480077c2302e9c2f376fc56afccb4330f94d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +/** + * Read an environment variable. + * + * Trims beginning and trailing whitespace. + * + * Will return undefined if the environment variable doesn't exist or cannot be accessed. + */ +export const readEnv = (env: string): string | undefined => { + if (typeof (globalThis as any).process !== 'undefined') { + return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + } + if (typeof (globalThis as any).Deno !== 'undefined') { + return (globalThis as any).Deno.env?.get?.(env)?.trim(); + } + return undefined; +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts new file mode 100644 index 0000000000000000000000000000000000000000..143862af74cd8d4bf2f9c67d460b16d2f74c9381 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts @@ -0,0 +1,127 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { hasOwn } from './values'; +import { type BaseAnthropic } from '../../client'; +import { RequestOptions } from '../request-options'; + +type LogFn = (message: string, ...rest: unknown[]) => void; +export type Logger = { + error: LogFn; + warn: LogFn; + info: LogFn; + debug: LogFn; +}; +export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug'; + +const levelNumbers = { + off: 0, + error: 200, + warn: 300, + info: 400, + debug: 500, +}; + +export const parseLogLevel = ( + maybeLevel: string | undefined, + sourceName: string, + client: BaseAnthropic, +): LogLevel | undefined => { + if (!maybeLevel) { + return undefined; + } + if (hasOwn(levelNumbers, maybeLevel)) { + return maybeLevel; + } + loggerFor(client).warn( + `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( + Object.keys(levelNumbers), + )}`, + ); + return undefined; +}; + +function noop() {} + +function makeLogFn(fnLevel: keyof Logger, logger: Logger | undefined, logLevel: LogLevel) { + if (!logger || levelNumbers[fnLevel] > levelNumbers[logLevel]) { + return noop; + } else { + // Don't wrap logger functions, we want the stacktrace intact! + return logger[fnLevel].bind(logger); + } +} + +const noopLogger = { + error: noop, + warn: noop, + info: noop, + debug: noop, +}; + +let cachedLoggers = new WeakMap(); + +export function loggerFor(client: BaseAnthropic): Logger { + const logger = client.logger; + const logLevel = client.logLevel ?? 'off'; + if (!logger) { + return noopLogger; + } + + const cachedLogger = cachedLoggers.get(logger); + if (cachedLogger && cachedLogger[0] === logLevel) { + return cachedLogger[1]; + } + + const levelLogger = { + error: makeLogFn('error', logger, logLevel), + warn: makeLogFn('warn', logger, logLevel), + info: makeLogFn('info', logger, logLevel), + debug: makeLogFn('debug', logger, logLevel), + }; + + cachedLoggers.set(logger, [logLevel, levelLogger]); + + return levelLogger; +} + +export const formatRequestDetails = (details: { + options?: RequestOptions | undefined; + headers?: Headers | Record | undefined; + retryOfRequestLogID?: string | undefined; + retryOf?: string | undefined; + url?: string | undefined; + status?: number | undefined; + method?: string | undefined; + durationMs?: number | undefined; + message?: unknown; + body?: unknown; +}) => { + if (details.options) { + details.options = { ...details.options }; + delete details.options['headers']; // redundant + leaks internals + } + if (details.headers) { + details.headers = Object.fromEntries( + (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( + ([name, value]) => [ + name, + ( + name.toLowerCase() === 'x-api-key' || + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie' + ) ? + '***' + : value, + ], + ), + ); + } + if ('retryOfRequestLogID' in details) { + if (details.retryOfRequestLogID) { + details.retryOf = details.retryOfRequestLogID; + } + delete details.retryOfRequestLogID; + } + return details; +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts new file mode 100644 index 0000000000000000000000000000000000000000..4a7648ca87a321b399561131df316209966aa7d0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts @@ -0,0 +1,65 @@ +import { AnthropicError } from '../../core/error'; + +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +export function encodeURIPath(str: string) { + return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent); +} + +export const createPathTagFunction = (pathEncoder = encodeURIPath) => + function path(statics: readonly string[], ...params: readonly unknown[]): string { + // If there are no params, no processing is needed. + if (statics.length === 1) return statics[0]!; + + let postPath = false; + const path = statics.reduce((previousValue, currentValue, index) => { + if (/[?#]/.test(currentValue)) { + postPath = true; + } + return ( + previousValue + + currentValue + + (index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index]))) + ); + }, ''); + + const pathOnly = path.split(/[?#]/, 1)[0]!; + const invalidSegments = []; + const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi; + let match; + + // Find all invalid segments + while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) { + invalidSegments.push({ + start: match.index, + length: match[0].length, + }); + } + + if (invalidSegments.length > 0) { + let lastEnd = 0; + const underline = invalidSegments.reduce((acc, segment) => { + const spaces = ' '.repeat(segment.start - lastEnd); + const arrows = '^'.repeat(segment.length); + lastEnd = segment.start + segment.length; + return acc + spaces + arrows; + }, ''); + + throw new AnthropicError( + `Path parameters result in path with invalid segments:\n${path}\n${underline}`, + ); + } + + return path; + }; + +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +export const path = createPathTagFunction(encodeURIPath); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts new file mode 100644 index 0000000000000000000000000000000000000000..65e52962bbb288c4a2f19fbe14b7ffb9baba6487 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0e53aaf7ef092c1bd64847211ab62b27bb18869 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +/** + * https://stackoverflow.com/a/2117523 + */ +export let uuid4 = function () { + const { crypto } = globalThis as any; + if (crypto?.randomUUID) { + uuid4 = crypto.randomUUID.bind(crypto); + return crypto.randomUUID(); + } + const u8 = new Uint8Array(1); + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => + (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), + ); +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts new file mode 100644 index 0000000000000000000000000000000000000000..d151bd0dbc4aa21fa8a014de6450a2a6e6ae7702 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts @@ -0,0 +1,102 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { AnthropicError } from '../../core/error'; + +// https://url.spec.whatwg.org/#url-scheme-string +const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i; + +export const isAbsoluteURL = (url: string): boolean => { + return startsWithSchemeRegexp.test(url); +}; + +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +export function maybeObj(x: unknown): object { + if (typeof x !== 'object') { + return {}; + } + + return x ?? {}; +} + +// https://stackoverflow.com/a/34491287 +export function isEmptyObj(obj: Object | null | undefined): boolean { + if (!obj) return true; + for (const _k in obj) return false; + return true; +} + +// https://eslint.org/docs/latest/rules/no-prototype-builtins +export function hasOwn(obj: T, key: PropertyKey): key is keyof T { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +export function isObj(obj: unknown): obj is Record { + return obj != null && typeof obj === 'object' && !Array.isArray(obj); +} + +export const ensurePresent = (value: T | null | undefined): T => { + if (value == null) { + throw new AnthropicError(`Expected a value to be given but received ${value} instead.`); + } + + return value; +}; + +export const validatePositiveInteger = (name: string, n: unknown): number => { + if (typeof n !== 'number' || !Number.isInteger(n)) { + throw new AnthropicError(`${name} must be an integer`); + } + if (n < 0) { + throw new AnthropicError(`${name} must be a positive integer`); + } + return n; +}; + +export const coerceInteger = (value: unknown): number => { + if (typeof value === 'number') return Math.round(value); + if (typeof value === 'string') return parseInt(value, 10); + + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; + +export const coerceFloat = (value: unknown): number => { + if (typeof value === 'number') return value; + if (typeof value === 'string') return parseFloat(value); + + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; + +export const coerceBoolean = (value: unknown): boolean => { + if (typeof value === 'boolean') return value; + if (typeof value === 'string') return value === 'true'; + return Boolean(value); +}; + +export const maybeCoerceInteger = (value: unknown): number | undefined => { + if (value === undefined) { + return undefined; + } + return coerceInteger(value); +}; + +export const maybeCoerceFloat = (value: unknown): number | undefined => { + if (value === undefined) { + return undefined; + } + return coerceFloat(value); +}; + +export const maybeCoerceBoolean = (value: unknown): boolean | undefined => { + if (value === undefined) { + return undefined; + } + return coerceBoolean(value); +}; + +export const safeJSON = (text: string) => { + try { + return JSON.parse(text); + } catch (err) { + return undefined; + } +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/.keep b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/.keep new file mode 100644 index 0000000000000000000000000000000000000000..7554f8b20ae58485df49010107f79349db1c5943 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/.keep @@ -0,0 +1,4 @@ +File generated from our OpenAPI spec by Stainless. + +This directory can be used to store custom files to expand the SDK. +It is ignored by Stainless code generation and its content (other than this keep file) won't be touched. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed1eb5797d1566af9853f414bbcd7441a47f6f4e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts @@ -0,0 +1,698 @@ +import { isAbortError } from '../internal/errors'; +import { AnthropicError, APIUserAbortError } from '../error'; +import { + type BetaContentBlock, + Messages as BetaMessages, + type BetaMessage, + type BetaRawMessageStreamEvent as BetaMessageStreamEvent, + type BetaMessageParam, + type MessageCreateParams as BetaMessageCreateParams, + type MessageCreateParamsBase as BetaMessageCreateParamsBase, + type BetaTextBlock, + type BetaTextCitation, + type BetaToolUseBlock, + type BetaServerToolUseBlock, + type BetaMCPToolUseBlock, +} from '../resources/beta/messages/messages'; +import { Stream } from '../streaming'; +import { partialParse } from '../_vendor/partial-json-parser/parser'; +import { type RequestOptions } from '../internal/request-options'; + +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: BetaMessage) => void; + contentBlock: (content: BetaContentBlock) => void; + finalMessage: (message: BetaMessage) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} + +type MessageStreamEventListeners = { + listener: MessageStreamEvents[Event]; + once?: boolean; +}[]; + +const JSON_BUF_PROPERTY = '__json_buf'; + +export type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock; + +function tracksToolInput(content: BetaContentBlock): content is TracksToolInput { + return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use'; +} + +export class BetaMessageStream implements AsyncIterable { + messages: BetaMessageParam[] = []; + receivedMessages: BetaMessage[] = []; + #currentMessageSnapshot: BetaMessage | undefined; + + controller: AbortController = new AbortController(); + + #connectedPromise: Promise; + #resolveConnectedPromise: (response: Response | null) => void = () => {}; + #rejectConnectedPromise: (error: AnthropicError) => void = () => {}; + + #endPromise: Promise; + #resolveEndPromise: () => void = () => {}; + #rejectEndPromise: (error: AnthropicError) => void = () => {}; + + #listeners: { [Event in keyof MessageStreamEvents]?: MessageStreamEventListeners } = {}; + + #ended = false; + #errored = false; + #aborted = false; + #catchingPromiseCreated = false; + #response: Response | null | undefined; + #request_id: string | null | undefined; + + constructor() { + this.#connectedPromise = new Promise((resolve, reject) => { + this.#resolveConnectedPromise = resolve; + this.#rejectConnectedPromise = reject; + }); + + this.#endPromise = new Promise((resolve, reject) => { + this.#resolveEndPromise = resolve; + this.#rejectEndPromise = reject; + }); + + // 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. + this.#connectedPromise.catch(() => {}); + this.#endPromise.catch(() => {}); + } + + get response(): Response | null | undefined { + return this.#response; + } + + get request_id(): string | null | undefined { + return this.#request_id; + } + + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse(): Promise<{ + data: BetaMessageStream; + response: Response; + request_id: string | null | undefined; + }> { + const response = await this.#connectedPromise; + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + + /** + * 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): BetaMessageStream { + const runner = new BetaMessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + + static createMessage( + messages: BetaMessages, + params: BetaMessageCreateParamsBase, + options?: RequestOptions, + ): BetaMessageStream { + const runner = new BetaMessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => + runner._createMessage( + messages, + { ...params, stream: true }, + { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } }, + ), + ); + return runner; + } + + protected _run(executor: () => Promise) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, this.#handleError); + } + + protected _addMessageParam(message: BetaMessageParam) { + this.messages.push(message); + } + + protected _addMessage(message: BetaMessage, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + + protected async _createMessage( + messages: BetaMessages, + params: BetaMessageCreateParams, + options?: RequestOptions, + ): Promise { + const signal = options?.signal; + if (signal) { + if (signal.aborted) this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this.#beginRequest(); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + this.#addStreamEvent(event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + this.#endRequest(); + } + + protected _connected(response: Response | null) { + if (this.ended) return; + this.#response = response; + this.#request_id = response?.headers.get('request-id'); + this.#resolveConnectedPromise(response); + this._emit('connect'); + } + + get ended(): boolean { + return this.#ended; + } + + get errored(): boolean { + return this.#errored; + } + + get aborted(): boolean { + return this.#aborted; + } + + 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners: MessageStreamEventListeners = + this.#listeners[event] || (this.#listeners[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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners = this.#listeners[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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners: MessageStreamEventListeners = + this.#listeners[event] || (this.#listeners[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: Event, + ): Promise< + Parameters extends [infer Param] ? Param + : Parameters extends [] ? void + : Parameters + > { + return new Promise((resolve, reject) => { + this.#catchingPromiseCreated = true; + if (event !== 'error') this.once('error', reject); + this.once(event, resolve as any); + }); + } + + async done(): Promise { + this.#catchingPromiseCreated = true; + await this.#endPromise; + } + + get currentMessage(): BetaMessage | undefined { + return this.#currentMessageSnapshot; + } + + #getFinalMessage(): BetaMessage { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1)!; + } + + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage(): Promise { + await this.done(); + return this.#getFinalMessage(); + } + + #getFinalText(): string { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1)! + .content.filter((block): block is BetaTextBlock => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + } + + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText(): Promise { + await this.done(); + return this.#getFinalText(); + } + + #handleError = (error: unknown) => { + this.#errored = true; + if (isAbortError(error)) { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + this.#aborted = true; + return this._emit('abort', error); + } + if (error instanceof AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError: AnthropicError = new AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new AnthropicError(String(error))); + }; + + protected _emit( + event: Event, + ...args: Parameters + ) { + // make sure we don't emit any MessageStreamEvents after end + if (this.#ended) return; + + if (event === 'end') { + this.#ended = true; + this.#resolveEndPromise(); + } + + const listeners: MessageStreamEventListeners | undefined = this.#listeners[event]; + if (listeners) { + this.#listeners[event] = listeners.filter((l) => !l.once) as any; + listeners.forEach(({ listener }: any) => listener(...args)); + } + + if (event === 'abort') { + const error = args[0] as APIUserAbortError; + if (!this.#catchingPromiseCreated && !listeners?.length) { + Promise.reject(error); + } + this.#rejectConnectedPromise(error); + this.#rejectEndPromise(error); + this._emit('end'); + return; + } + + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + + const error = args[0] as AnthropicError; + if (!this.#catchingPromiseCreated && !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.final...() + // - etc. + Promise.reject(error); + } + this.#rejectConnectedPromise(error); + this.#rejectEndPromise(error); + this._emit('end'); + } + } + + protected _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', this.#getFinalMessage()); + } + } + + #beginRequest() { + if (this.ended) return; + this.#currentMessageSnapshot = undefined; + } + #addStreamEvent(event: BetaMessageStreamEvent) { + if (this.ended) return; + const messageSnapshot = this.#accumulateMessage(event); + this._emit('streamEvent', event, messageSnapshot); + + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1)!; + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)!); + break; + } + case 'message_start': { + this.#currentMessageSnapshot = messageSnapshot; + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + } + #endRequest(): BetaMessage { + if (this.ended) { + throw new AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = this.#currentMessageSnapshot; + if (!snapshot) { + throw new AnthropicError(`request ended without sending any chunks`); + } + this.#currentMessageSnapshot = undefined; + return snapshot; + } + + protected async _fromReadableStream( + readableStream: ReadableStream, + options?: RequestOptions, + ): Promise { + const signal = options?.signal; + if (signal) { + if (signal.aborted) this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this.#beginRequest(); + this._connected(null); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + this.#addStreamEvent(event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + this.#endRequest(); + } + + /** + * Mutates this.#currentMessage with the current event. Handling the accumulation of multiple messages + * will be needed to be handled by the caller, this method will throw if you try to accumulate for multiple + * messages. + */ + #accumulateMessage(event: BetaMessageStreamEvent): BetaMessage { + let snapshot = this.#currentMessageSnapshot; + + if (event.type === 'message_start') { + if (snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + + if (!snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.container = event.delta.container; + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ??= []; + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = (snapshotContent as any)[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + + if (jsonBuf) { + try { + snapshotContent.input = partialParse(jsonBuf); + } catch (err) { + const error = new AnthropicError( + `Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`, + ); + this.#handleError(error); + } + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + } + + [Symbol.asyncIterator](): AsyncIterator { + const pushQueue: BetaMessageStreamEvent[] = []; + const readQueue: { + resolve: (chunk: BetaMessageStreamEvent | undefined) => void; + reject: (error: unknown) => void; + }[] = []; + let done = false; + + this.on('streamEvent', (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 (): Promise> => { + 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(): ReadableStream { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} + +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x: never) {} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts new file mode 100644 index 0000000000000000000000000000000000000000..793cbcd15ad7ca0af2d35dce12b46a927bb50dfc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts @@ -0,0 +1,691 @@ +import { isAbortError } from '../internal/errors'; +import { AnthropicError, APIUserAbortError } from '../error'; +import { + type ContentBlock, + Messages, + type Message, + type MessageStreamEvent, + type MessageParam, + type MessageCreateParams, + type MessageCreateParamsBase, + type TextBlock, + type TextCitation, + type ToolUseBlock, + type ServerToolUseBlock, +} from '../resources/messages'; +import { Stream } from '../streaming'; +import { partialParse } from '../_vendor/partial-json-parser/parser'; +import { RequestOptions } from '../internal/request-options'; + +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: MessageStreamEvent, snapshot: Message) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: TextCitation, citationsSnapshot: TextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: Message) => void; + contentBlock: (content: ContentBlock) => void; + finalMessage: (message: Message) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} + +type MessageStreamEventListeners = { + listener: MessageStreamEvents[Event]; + once?: boolean; +}[]; + +const JSON_BUF_PROPERTY = '__json_buf'; + +export type TracksToolInput = ToolUseBlock | ServerToolUseBlock; + +function tracksToolInput(content: ContentBlock): content is TracksToolInput { + return content.type === 'tool_use' || content.type === 'server_tool_use'; +} + +export class MessageStream implements AsyncIterable { + messages: MessageParam[] = []; + receivedMessages: Message[] = []; + #currentMessageSnapshot: Message | undefined; + + controller: AbortController = new AbortController(); + + #connectedPromise: Promise; + #resolveConnectedPromise: (response: Response | null) => void = () => {}; + #rejectConnectedPromise: (error: AnthropicError) => void = () => {}; + + #endPromise: Promise; + #resolveEndPromise: () => void = () => {}; + #rejectEndPromise: (error: AnthropicError) => void = () => {}; + + #listeners: { [Event in keyof MessageStreamEvents]?: MessageStreamEventListeners } = {}; + + #ended = false; + #errored = false; + #aborted = false; + #catchingPromiseCreated = false; + #response: Response | null | undefined; + #request_id: string | null | undefined; + + constructor() { + this.#connectedPromise = new Promise((resolve, reject) => { + this.#resolveConnectedPromise = resolve; + this.#rejectConnectedPromise = reject; + }); + + this.#endPromise = new Promise((resolve, reject) => { + this.#resolveEndPromise = resolve; + this.#rejectEndPromise = reject; + }); + + // 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. + this.#connectedPromise.catch(() => {}); + this.#endPromise.catch(() => {}); + } + + get response(): Response | null | undefined { + return this.#response; + } + + get request_id(): string | null | undefined { + return this.#request_id; + } + + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse(): Promise<{ + data: MessageStream; + response: Response; + request_id: string | null | undefined; + }> { + const response = await this.#connectedPromise; + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + + /** + * 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): MessageStream { + const runner = new MessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + + static createMessage( + messages: Messages, + params: MessageCreateParamsBase, + options?: RequestOptions, + ): MessageStream { + const runner = new MessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => + runner._createMessage( + messages, + { ...params, stream: true }, + { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } }, + ), + ); + return runner; + } + + protected _run(executor: () => Promise) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, this.#handleError); + } + + protected _addMessageParam(message: MessageParam) { + this.messages.push(message); + } + + protected _addMessage(message: Message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + + protected async _createMessage( + messages: Messages, + params: MessageCreateParams, + options?: RequestOptions, + ): Promise { + const signal = options?.signal; + if (signal) { + if (signal.aborted) this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this.#beginRequest(); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + this.#addStreamEvent(event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + this.#endRequest(); + } + + protected _connected(response: Response | null) { + if (this.ended) return; + this.#response = response; + this.#request_id = response?.headers.get('request-id'); + this.#resolveConnectedPromise(response); + this._emit('connect'); + } + + get ended(): boolean { + return this.#ended; + } + + get errored(): boolean { + return this.#errored; + } + + get aborted(): boolean { + return this.#aborted; + } + + 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 MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners: MessageStreamEventListeners = + this.#listeners[event] || (this.#listeners[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 MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners = this.#listeners[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 MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): this { + const listeners: MessageStreamEventListeners = + this.#listeners[event] || (this.#listeners[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: Event, + ): Promise< + Parameters extends [infer Param] ? Param + : Parameters extends [] ? void + : Parameters + > { + return new Promise((resolve, reject) => { + this.#catchingPromiseCreated = true; + if (event !== 'error') this.once('error', reject); + this.once(event, resolve as any); + }); + } + + async done(): Promise { + this.#catchingPromiseCreated = true; + await this.#endPromise; + } + + get currentMessage(): Message | undefined { + return this.#currentMessageSnapshot; + } + + #getFinalMessage(): Message { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1)!; + } + + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage(): Promise { + await this.done(); + return this.#getFinalMessage(); + } + + #getFinalText(): string { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1)! + .content.filter((block): block is TextBlock => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + } + + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText(): Promise { + await this.done(); + return this.#getFinalText(); + } + + #handleError = (error: unknown) => { + this.#errored = true; + if (isAbortError(error)) { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + this.#aborted = true; + return this._emit('abort', error); + } + if (error instanceof AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError: AnthropicError = new AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new AnthropicError(String(error))); + }; + + protected _emit( + event: Event, + ...args: Parameters + ) { + // make sure we don't emit any MessageStreamEvents after end + if (this.#ended) return; + + if (event === 'end') { + this.#ended = true; + this.#resolveEndPromise(); + } + + const listeners: MessageStreamEventListeners | undefined = this.#listeners[event]; + if (listeners) { + this.#listeners[event] = listeners.filter((l) => !l.once) as any; + listeners.forEach(({ listener }: any) => listener(...args)); + } + + if (event === 'abort') { + const error = args[0] as APIUserAbortError; + if (!this.#catchingPromiseCreated && !listeners?.length) { + Promise.reject(error); + } + this.#rejectConnectedPromise(error); + this.#rejectEndPromise(error); + this._emit('end'); + return; + } + + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + + const error = args[0] as AnthropicError; + if (!this.#catchingPromiseCreated && !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.final...() + // - etc. + Promise.reject(error); + } + this.#rejectConnectedPromise(error); + this.#rejectEndPromise(error); + this._emit('end'); + } + } + + protected _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', this.#getFinalMessage()); + } + } + + #beginRequest() { + if (this.ended) return; + this.#currentMessageSnapshot = undefined; + } + #addStreamEvent(event: MessageStreamEvent) { + if (this.ended) return; + const messageSnapshot = this.#accumulateMessage(event); + this._emit('streamEvent', event, messageSnapshot); + + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1)!; + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)!); + break; + } + case 'message_start': { + this.#currentMessageSnapshot = messageSnapshot; + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + } + #endRequest(): Message { + if (this.ended) { + throw new AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = this.#currentMessageSnapshot; + if (!snapshot) { + throw new AnthropicError(`request ended without sending any chunks`); + } + this.#currentMessageSnapshot = undefined; + return snapshot; + } + + protected async _fromReadableStream( + readableStream: ReadableStream, + options?: RequestOptions, + ): Promise { + const signal = options?.signal; + if (signal) { + if (signal.aborted) this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + this.#beginRequest(); + this._connected(null); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + this.#addStreamEvent(event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + this.#endRequest(); + } + + /** + * Mutates this.#currentMessage with the current event. Handling the accumulation of multiple messages + * will be needed to be handled by the caller, this method will throw if you try to accumulate for multiple + * messages. + */ + #accumulateMessage(event: MessageStreamEvent): Message { + let snapshot = this.#currentMessageSnapshot; + + if (event.type === 'message_start') { + if (snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + + if (!snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + + // Update other usage fields if they exist in the event + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ??= []; + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = (snapshotContent as any)[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + + if (jsonBuf) { + snapshotContent.input = partialParse(jsonBuf); + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + } + + [Symbol.asyncIterator](): AsyncIterator { + const pushQueue: MessageStreamEvent[] = []; + const readQueue: { + resolve: (chunk: MessageStreamEvent | undefined) => void; + reject: (error: unknown) => void; + }[] = []; + let done = false; + + this.on('streamEvent', (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 (): Promise> => { + 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(): ReadableStream { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} + +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x: never) {} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/pagination.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/resource.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/resources.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/resources/beta.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta.ts new file mode 100644 index 0000000000000000000000000000000000000000..1542e942b513d490a80ef1a063f8f7221de8b0c1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './beta/index'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts new file mode 100644 index 0000000000000000000000000000000000000000..107db45f6852814a5213213ac6db957c79352e30 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts @@ -0,0 +1,382 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as FilesAPI from './files'; +import { + DeletedFile, + FileDeleteParams, + FileDownloadParams, + FileListParams, + FileMetadata, + FileMetadataPage, + FileRetrieveMetadataParams, + FileUploadParams, + Files, +} from './files'; +import * as ModelsAPI from './models'; +import { BetaModelInfo, BetaModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from './models'; +import * as MessagesAPI from './messages/messages'; +import { + BetaBase64ImageSource, + BetaBase64PDFBlock, + BetaBase64PDFSource, + BetaCacheControlEphemeral, + BetaCacheCreation, + BetaCitationCharLocation, + BetaCitationCharLocationParam, + BetaCitationContentBlockLocation, + BetaCitationContentBlockLocationParam, + BetaCitationPageLocation, + BetaCitationPageLocationParam, + BetaCitationWebSearchResultLocationParam, + BetaCitationsConfigParam, + BetaCitationsDelta, + BetaCitationsWebSearchResultLocation, + BetaCodeExecutionOutputBlock, + BetaCodeExecutionOutputBlockParam, + BetaCodeExecutionResultBlock, + BetaCodeExecutionResultBlockParam, + BetaCodeExecutionTool20250522, + BetaCodeExecutionToolResultBlock, + BetaCodeExecutionToolResultBlockContent, + BetaCodeExecutionToolResultBlockParam, + BetaCodeExecutionToolResultBlockParamContent, + BetaCodeExecutionToolResultError, + BetaCodeExecutionToolResultErrorCode, + BetaCodeExecutionToolResultErrorParam, + BetaContainer, + BetaContainerUploadBlock, + BetaContainerUploadBlockParam, + BetaContentBlock, + BetaContentBlockParam, + BetaContentBlockSource, + BetaContentBlockSourceContent, + BetaFileDocumentSource, + BetaFileImageSource, + BetaImageBlockParam, + BetaInputJSONDelta, + BetaMCPToolResultBlock, + BetaMCPToolUseBlock, + BetaMCPToolUseBlockParam, + BetaMessage, + BetaMessageDeltaUsage, + BetaMessageParam, + BetaMessageTokensCount, + BetaMetadata, + BetaPlainTextSource, + BetaRawContentBlockDelta, + BetaRawContentBlockDeltaEvent, + BetaRawContentBlockStartEvent, + BetaRawContentBlockStopEvent, + BetaRawMessageDeltaEvent, + BetaRawMessageStartEvent, + BetaRawMessageStopEvent, + BetaRawMessageStreamEvent, + BetaRedactedThinkingBlock, + BetaRedactedThinkingBlockParam, + BetaRequestDocumentBlock, + BetaRequestMCPServerToolConfiguration, + BetaRequestMCPServerURLDefinition, + BetaRequestMCPToolResultBlockParam, + BetaServerToolUsage, + BetaServerToolUseBlock, + BetaServerToolUseBlockParam, + BetaSignatureDelta, + BetaStopReason, + BetaTextBlock, + BetaTextBlockParam, + BetaTextCitation, + BetaTextCitationParam, + BetaTextDelta, + BetaThinkingBlock, + BetaThinkingBlockParam, + BetaThinkingConfigDisabled, + BetaThinkingConfigEnabled, + BetaThinkingConfigParam, + BetaThinkingDelta, + BetaTool, + BetaToolBash20241022, + BetaToolBash20250124, + BetaToolChoice, + BetaToolChoiceAny, + BetaToolChoiceAuto, + BetaToolChoiceNone, + BetaToolChoiceTool, + BetaToolComputerUse20241022, + BetaToolComputerUse20250124, + BetaToolResultBlockParam, + BetaToolTextEditor20241022, + BetaToolTextEditor20250124, + BetaToolTextEditor20250429, + BetaToolUnion, + BetaToolUseBlock, + BetaToolUseBlockParam, + BetaURLImageSource, + BetaURLPDFSource, + BetaUsage, + BetaWebSearchResultBlock, + BetaWebSearchResultBlockParam, + BetaWebSearchTool20250305, + BetaWebSearchToolRequestError, + BetaWebSearchToolResultBlock, + BetaWebSearchToolResultBlockContent, + BetaWebSearchToolResultBlockParam, + BetaWebSearchToolResultBlockParamContent, + BetaWebSearchToolResultError, + BetaWebSearchToolResultErrorCode, + MessageCountTokensParams, + MessageCreateParams, + MessageCreateParamsNonStreaming, + MessageCreateParamsStreaming, + Messages, +} from './messages/messages'; + +export class Beta extends APIResource { + models: ModelsAPI.Models = new ModelsAPI.Models(this._client); + messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client); + files: FilesAPI.Files = new FilesAPI.Files(this._client); +} + +export type AnthropicBeta = + | (string & {}) + | 'message-batches-2024-09-24' + | 'prompt-caching-2024-07-31' + | 'computer-use-2024-10-22' + | 'computer-use-2025-01-24' + | 'pdfs-2024-09-25' + | 'token-counting-2024-11-01' + | 'token-efficient-tools-2025-02-19' + | 'output-128k-2025-02-19' + | 'files-api-2025-04-14' + | 'mcp-client-2025-04-04' + | 'dev-full-thinking-2025-05-14' + | 'interleaved-thinking-2025-05-14' + | 'code-execution-2025-05-22' + | 'extended-cache-ttl-2025-04-11'; + +export interface BetaAPIError { + message: string; + + type: 'api_error'; +} + +export interface BetaAuthenticationError { + message: string; + + type: 'authentication_error'; +} + +export interface BetaBillingError { + message: string; + + type: 'billing_error'; +} + +export type BetaError = + | BetaInvalidRequestError + | BetaAuthenticationError + | BetaBillingError + | BetaPermissionError + | BetaNotFoundError + | BetaRateLimitError + | BetaGatewayTimeoutError + | BetaAPIError + | BetaOverloadedError; + +export interface BetaErrorResponse { + error: BetaError; + + type: 'error'; +} + +export interface BetaGatewayTimeoutError { + message: string; + + type: 'timeout_error'; +} + +export interface BetaInvalidRequestError { + message: string; + + type: 'invalid_request_error'; +} + +export interface BetaNotFoundError { + message: string; + + type: 'not_found_error'; +} + +export interface BetaOverloadedError { + message: string; + + type: 'overloaded_error'; +} + +export interface BetaPermissionError { + message: string; + + type: 'permission_error'; +} + +export interface BetaRateLimitError { + message: string; + + type: 'rate_limit_error'; +} + +Beta.Models = Models; +Beta.Messages = Messages; +Beta.Files = Files; + +export declare namespace Beta { + export { + type AnthropicBeta as AnthropicBeta, + type BetaAPIError as BetaAPIError, + type BetaAuthenticationError as BetaAuthenticationError, + type BetaBillingError as BetaBillingError, + type BetaError as BetaError, + type BetaErrorResponse as BetaErrorResponse, + type BetaGatewayTimeoutError as BetaGatewayTimeoutError, + type BetaInvalidRequestError as BetaInvalidRequestError, + type BetaNotFoundError as BetaNotFoundError, + type BetaOverloadedError as BetaOverloadedError, + type BetaPermissionError as BetaPermissionError, + type BetaRateLimitError as BetaRateLimitError, + }; + + export { + Models as Models, + type BetaModelInfo as BetaModelInfo, + type BetaModelInfosPage as BetaModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; + + export { + Messages as Messages, + type BetaBase64ImageSource as BetaBase64ImageSource, + type BetaBase64PDFSource as BetaBase64PDFSource, + type BetaCacheControlEphemeral as BetaCacheControlEphemeral, + type BetaCacheCreation as BetaCacheCreation, + type BetaCitationCharLocation as BetaCitationCharLocation, + type BetaCitationCharLocationParam as BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation as BetaCitationPageLocation, + type BetaCitationPageLocationParam as BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam as BetaCitationsConfigParam, + type BetaCitationsDelta as BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, + type BetaContainer as BetaContainer, + type BetaContainerUploadBlock as BetaContainerUploadBlock, + type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, + type BetaContentBlock as BetaContentBlock, + type BetaContentBlockParam as BetaContentBlockParam, + type BetaContentBlockSource as BetaContentBlockSource, + type BetaContentBlockSourceContent as BetaContentBlockSourceContent, + type BetaFileDocumentSource as BetaFileDocumentSource, + type BetaFileImageSource as BetaFileImageSource, + type BetaImageBlockParam as BetaImageBlockParam, + type BetaInputJSONDelta as BetaInputJSONDelta, + type BetaMCPToolResultBlock as BetaMCPToolResultBlock, + type BetaMCPToolUseBlock as BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, + type BetaMessage as BetaMessage, + type BetaMessageDeltaUsage as BetaMessageDeltaUsage, + type BetaMessageParam as BetaMessageParam, + type BetaMessageTokensCount as BetaMessageTokensCount, + type BetaMetadata as BetaMetadata, + type BetaPlainTextSource as BetaPlainTextSource, + type BetaRawContentBlockDelta as BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent as BetaRawMessageStartEvent, + type BetaRawMessageStopEvent as BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock as BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage as BetaServerToolUsage, + type BetaServerToolUseBlock as BetaServerToolUseBlock, + type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, + type BetaSignatureDelta as BetaSignatureDelta, + type BetaStopReason as BetaStopReason, + type BetaTextBlock as BetaTextBlock, + type BetaTextBlockParam as BetaTextBlockParam, + type BetaTextCitation as BetaTextCitation, + type BetaTextCitationParam as BetaTextCitationParam, + type BetaTextDelta as BetaTextDelta, + type BetaThinkingBlock as BetaThinkingBlock, + type BetaThinkingBlockParam as BetaThinkingBlockParam, + type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, + type BetaThinkingConfigParam as BetaThinkingConfigParam, + type BetaThinkingDelta as BetaThinkingDelta, + type BetaTool as BetaTool, + type BetaToolBash20241022 as BetaToolBash20241022, + type BetaToolBash20250124 as BetaToolBash20250124, + type BetaToolChoice as BetaToolChoice, + type BetaToolChoiceAny as BetaToolChoiceAny, + type BetaToolChoiceAuto as BetaToolChoiceAuto, + type BetaToolChoiceNone as BetaToolChoiceNone, + type BetaToolChoiceTool as BetaToolChoiceTool, + type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, + type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, + type BetaToolResultBlockParam as BetaToolResultBlockParam, + type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, + type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, + type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, + type BetaToolUnion as BetaToolUnion, + type BetaToolUseBlock as BetaToolUseBlock, + type BetaToolUseBlockParam as BetaToolUseBlockParam, + type BetaURLImageSource as BetaURLImageSource, + type BetaURLPDFSource as BetaURLPDFSource, + type BetaUsage as BetaUsage, + type BetaWebSearchResultBlock as BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError as BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock as BetaBase64PDFBlock, + type MessageCreateParams as MessageCreateParams, + type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming as MessageCreateParamsStreaming, + type MessageCountTokensParams as MessageCountTokensParams, + }; + + export { + Files as Files, + type DeletedFile as DeletedFile, + type FileMetadata as FileMetadata, + type FileMetadataPage as FileMetadataPage, + type FileListParams as FileListParams, + type FileDeleteParams as FileDeleteParams, + type FileDownloadParams as FileDownloadParams, + type FileRetrieveMetadataParams as FileRetrieveMetadataParams, + type FileUploadParams as FileUploadParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts new file mode 100644 index 0000000000000000000000000000000000000000..448a7ee295e92c2315019b727b2d3928fe8e0a76 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts @@ -0,0 +1,258 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as BetaAPI from './beta'; +import { APIPromise } from '../../core/api-promise'; +import { Page, type PageParams, PagePromise } from '../../core/pagination'; +import { type Uploadable } from '../../core/uploads'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { multipartFormRequestOptions } from '../../internal/uploads'; +import { path } from '../../internal/utils/path'; + +export class Files extends APIResource { + /** + * List Files + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const fileMetadata of client.beta.files.list()) { + * // ... + * } + * ``` + */ + list( + params: FileListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/files', Page, { + query, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Delete File + * + * @example + * ```ts + * const deletedFile = await client.beta.files.delete( + * 'file_id', + * ); + * ``` + */ + delete( + fileID: string, + params: FileDeleteParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.delete(path`/v1/files/${fileID}`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Download File + * + * @example + * ```ts + * const response = await client.beta.files.download( + * 'file_id', + * ); + * + * const content = await response.blob(); + * console.log(content); + * ``` + */ + download( + fileID: string, + params: FileDownloadParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/files/${fileID}/content`, { + ...options, + headers: buildHeaders([ + { + 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + __binaryResponse: true, + }); + } + + /** + * Get File Metadata + * + * @example + * ```ts + * const fileMetadata = + * await client.beta.files.retrieveMetadata('file_id'); + * ``` + */ + retrieveMetadata( + fileID: string, + params: FileRetrieveMetadataParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/files/${fileID}`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Upload File + * + * @example + * ```ts + * const fileMetadata = await client.beta.files.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(params: FileUploadParams, options?: RequestOptions): APIPromise { + const { betas, ...body } = params; + return this._client.post( + '/v1/files', + multipartFormRequestOptions( + { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() }, + options?.headers, + ]), + }, + this._client, + ), + ); + } +} + +export type FileMetadataPage = Page; + +export interface DeletedFile { + /** + * ID of the deleted file. + */ + id: string; + + /** + * Deleted object type. + * + * For file deletion, this is always `"file_deleted"`. + */ + type?: 'file_deleted'; +} + +export interface FileMetadata { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * RFC 3339 datetime string representing when the file was created. + */ + created_at: string; + + /** + * Original filename of the uploaded file. + */ + filename: string; + + /** + * MIME type of the file. + */ + mime_type: string; + + /** + * Size of the file in bytes. + */ + size_bytes: number; + + /** + * Object type. + * + * For files, this is always `"file"`. + */ + type: 'file'; + + /** + * Whether the file can be downloaded. + */ + downloadable?: boolean; +} + +export interface FileListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface FileDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface FileDownloadParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface FileRetrieveMetadataParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface FileUploadParams { + /** + * Body param: The file to upload + */ + file: Uploadable; + + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export declare namespace Files { + export { + type DeletedFile as DeletedFile, + type FileMetadata as FileMetadata, + type FileMetadataPage as FileMetadataPage, + type FileListParams as FileListParams, + type FileDeleteParams as FileDeleteParams, + type FileDownloadParams as FileDownloadParams, + type FileRetrieveMetadataParams as FileRetrieveMetadataParams, + type FileUploadParams as FileUploadParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..f23a32200b7b8c2fd462e15ee662b5f23daf80fc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts @@ -0,0 +1,149 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Beta, + type AnthropicBeta, + type BetaAPIError, + type BetaAuthenticationError, + type BetaBillingError, + type BetaError, + type BetaErrorResponse, + type BetaGatewayTimeoutError, + type BetaInvalidRequestError, + type BetaNotFoundError, + type BetaOverloadedError, + type BetaPermissionError, + type BetaRateLimitError, +} from './beta'; +export { + Files, + type DeletedFile, + type FileMetadata, + type FileListParams, + type FileDeleteParams, + type FileDownloadParams, + type FileRetrieveMetadataParams, + type FileUploadParams, + type FileMetadataPage, +} from './files'; +export { + Messages, + type BetaBase64ImageSource, + type BetaBase64PDFSource, + type BetaCacheControlEphemeral, + type BetaCacheCreation, + type BetaCitationCharLocation, + type BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation, + type BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam, + type BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam, + type BetaContainer, + type BetaContainerUploadBlock, + type BetaContainerUploadBlockParam, + type BetaContentBlock, + type BetaContentBlockParam, + type BetaContentBlockSource, + type BetaContentBlockSourceContent, + type BetaFileDocumentSource, + type BetaFileImageSource, + type BetaImageBlockParam, + type BetaInputJSONDelta, + type BetaMCPToolResultBlock, + type BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam, + type BetaMessage, + type BetaMessageDeltaUsage, + type BetaMessageParam, + type BetaMessageTokensCount, + type BetaMetadata, + type BetaPlainTextSource, + type BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent, + type BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage, + type BetaServerToolUseBlock, + type BetaServerToolUseBlockParam, + type BetaSignatureDelta, + type BetaStopReason, + type BetaTextBlock, + type BetaTextBlockParam, + type BetaTextCitation, + type BetaTextCitationParam, + type BetaTextDelta, + type BetaThinkingBlock, + type BetaThinkingBlockParam, + type BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled, + type BetaThinkingConfigParam, + type BetaThinkingDelta, + type BetaTool, + type BetaToolBash20241022, + type BetaToolBash20250124, + type BetaToolChoice, + type BetaToolChoiceAny, + type BetaToolChoiceAuto, + type BetaToolChoiceNone, + type BetaToolChoiceTool, + type BetaToolComputerUse20241022, + type BetaToolComputerUse20250124, + type BetaToolResultBlockParam, + type BetaToolTextEditor20241022, + type BetaToolTextEditor20250124, + type BetaToolTextEditor20250429, + type BetaToolUnion, + type BetaToolUseBlock, + type BetaToolUseBlockParam, + type BetaURLImageSource, + type BetaURLPDFSource, + type BetaUsage, + type BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock, + type MessageCreateParams, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, +} from './messages/index'; +export { + Models, + type BetaModelInfo, + type ModelRetrieveParams, + type ModelListParams, + type BetaModelInfosPage, +} from './models'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb1752308f31e493534e505ff745085107f9d210 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './messages/index'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts new file mode 100644 index 0000000000000000000000000000000000000000..1ef96edbd1b87c7b081d927fcb88eb3aee14c011 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts @@ -0,0 +1,502 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../core/resource'; +import * as BetaAPI from '../beta'; +import { APIPromise } from '../../../core/api-promise'; +import * as BetaMessagesAPI from './messages'; +import { Page, type PageParams, PagePromise } from '../../../core/pagination'; +import { buildHeaders } from '../../../internal/headers'; +import { RequestOptions } from '../../../internal/request-options'; +import { JSONLDecoder } from '../../../internal/decoders/jsonl'; +import { AnthropicError } from '../../../error'; +import { path } from '../../../internal/utils/path'; + +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params: BatchCreateParams, options?: RequestOptions): APIPromise { + const { betas, ...body } = params; + return this._client.post('/v1/messages/batches?beta=true', { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve( + messageBatchID: string, + params: BatchRetrieveParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list( + params: BatchListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/messages/batches?beta=true', Page, { + query, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete( + messageBatchID: string, + params: BatchDeleteParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.delete(path`/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel( + messageBatchID: string, + params: BatchCancelParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.post(path`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + async results( + messageBatchID: string, + params: BatchResultsParams | undefined = {}, + options?: RequestOptions, + ): Promise> { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError( + `No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`, + ); + } + + const { betas } = params ?? {}; + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([ + { + 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise< + JSONLDecoder + >; + } +} + +export type BetaMessageBatchesPage = Page; + +export interface BetaDeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} + +export interface BetaMessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: BetaMessageBatchRequestCounts; + + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} + +export interface BetaMessageBatchCanceledResult { + type: 'canceled'; +} + +export interface BetaMessageBatchErroredResult { + error: BetaAPI.BetaErrorResponse; + + type: 'errored'; +} + +export interface BetaMessageBatchExpiredResult { + type: 'expired'; +} + +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface BetaMessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: BetaMessageBatchResult; +} + +export interface BetaMessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} + +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type BetaMessageBatchResult = + | BetaMessageBatchSucceededResult + | BetaMessageBatchErroredResult + | BetaMessageBatchCanceledResult + | BetaMessageBatchExpiredResult; + +export interface BetaMessageBatchSucceededResult { + message: BetaMessagesAPI.BetaMessage; + + type: 'succeeded'; +} + +export interface BatchCreateParams { + /** + * Body param: List of requests for prompt completion. Each is an individual + * request to create a Message. + */ + requests: Array; + + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export namespace BatchCreateParams { + export interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: Omit; + } +} + +export interface BatchRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface BatchListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface BatchDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface BatchCancelParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface BatchResultsParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export declare namespace Batches { + export { + type BetaDeletedMessageBatch as BetaDeletedMessageBatch, + type BetaMessageBatch as BetaMessageBatch, + type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, + type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, + type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, + type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, + type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, + type BetaMessageBatchResult as BetaMessageBatchResult, + type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, + type BetaMessageBatchesPage as BetaMessageBatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchRetrieveParams as BatchRetrieveParams, + type BatchListParams as BatchListParams, + type BatchDeleteParams as BatchDeleteParams, + type BatchCancelParams as BatchCancelParams, + type BatchResultsParams as BatchResultsParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb89d66f2ee590f1cc80873788e89b92208f89fd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts @@ -0,0 +1,136 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Batches, + type BetaDeletedMessageBatch, + type BetaMessageBatch, + type BetaMessageBatchCanceledResult, + type BetaMessageBatchErroredResult, + type BetaMessageBatchExpiredResult, + type BetaMessageBatchIndividualResponse, + type BetaMessageBatchRequestCounts, + type BetaMessageBatchResult, + type BetaMessageBatchSucceededResult, + type BatchCreateParams, + type BatchRetrieveParams, + type BatchListParams, + type BatchDeleteParams, + type BatchCancelParams, + type BatchResultsParams, + type BetaMessageBatchesPage, +} from './batches'; +export { + Messages, + type BetaBase64ImageSource, + type BetaBase64PDFSource, + type BetaCacheControlEphemeral, + type BetaCacheCreation, + type BetaCitationCharLocation, + type BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation, + type BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam, + type BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam, + type BetaContainer, + type BetaContainerUploadBlock, + type BetaContainerUploadBlockParam, + type BetaContentBlock, + type BetaContentBlockParam, + type BetaContentBlockSource, + type BetaContentBlockSourceContent, + type BetaFileDocumentSource, + type BetaFileImageSource, + type BetaImageBlockParam, + type BetaInputJSONDelta, + type BetaMCPToolResultBlock, + type BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam, + type BetaMessage, + type BetaMessageDeltaUsage, + type BetaMessageParam, + type BetaMessageTokensCount, + type BetaMetadata, + type BetaPlainTextSource, + type BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent, + type BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage, + type BetaServerToolUseBlock, + type BetaServerToolUseBlockParam, + type BetaSignatureDelta, + type BetaStopReason, + type BetaTextBlock, + type BetaTextBlockParam, + type BetaTextCitation, + type BetaTextCitationParam, + type BetaTextDelta, + type BetaThinkingBlock, + type BetaThinkingBlockParam, + type BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled, + type BetaThinkingConfigParam, + type BetaThinkingDelta, + type BetaTool, + type BetaToolBash20241022, + type BetaToolBash20250124, + type BetaToolChoice, + type BetaToolChoiceAny, + type BetaToolChoiceAuto, + type BetaToolChoiceNone, + type BetaToolChoiceTool, + type BetaToolComputerUse20241022, + type BetaToolComputerUse20250124, + type BetaToolResultBlockParam, + type BetaToolTextEditor20241022, + type BetaToolTextEditor20250124, + type BetaToolTextEditor20250429, + type BetaToolUnion, + type BetaToolUseBlock, + type BetaToolUseBlockParam, + type BetaURLImageSource, + type BetaURLPDFSource, + type BetaUsage, + type BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock, + type MessageCreateParams, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, + type BetaMessageStreamParams, +} from './messages'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts new file mode 100644 index 0000000000000000000000000000000000000000..0025a7546e22eb4eea5e3d37324e5be86a9b57c3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts @@ -0,0 +1,2257 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../core/resource'; +import * as MessagesMessagesAPI from './messages'; +import * as BetaAPI from '../beta'; +import * as MessagesAPI from '../../messages/messages'; +import * as BatchesAPI from './batches'; +import { + BatchCancelParams, + BatchCreateParams, + BatchDeleteParams, + BatchListParams, + BatchResultsParams, + BatchRetrieveParams, + Batches, + BetaDeletedMessageBatch, + BetaMessageBatch, + BetaMessageBatchCanceledResult, + BetaMessageBatchErroredResult, + BetaMessageBatchExpiredResult, + BetaMessageBatchIndividualResponse, + BetaMessageBatchRequestCounts, + BetaMessageBatchResult, + BetaMessageBatchSucceededResult, + BetaMessageBatchesPage, +} from './batches'; +import { APIPromise } from '../../../core/api-promise'; +import { Stream } from '../../../core/streaming'; +import { buildHeaders } from '../../../internal/headers'; +import { RequestOptions } from '../../../internal/request-options'; +import type { Model } from '../../messages/messages'; +import { BetaMessageStream } from '../../../lib/BetaMessageStream'; + +const DEPRECATED_MODELS: { + [K in Model]?: string; +} = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +import { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants'; + +export class Messages extends APIResource { + batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client); + + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const betaMessage = await client.beta.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create( + params: MessageCreateParamsStreaming, + options?: RequestOptions, + ): APIPromise>; + create( + params: MessageCreateParamsBase, + options?: RequestOptions, + ): APIPromise | BetaMessage>; + create( + params: MessageCreateParams, + options?: RequestOptions, + ): APIPromise | APIPromise> { + const { betas, ...body } = params; + + if (body.model in DEPRECATED_MODELS) { + console.warn( + `The model '${body.model}' is deprecated and will reach end-of-life on ${ + DEPRECATED_MODELS[body.model] + }\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`, + ); + } + + let timeout = (this._client as any)._options.timeout as number | null; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages?beta=true', { + body, + timeout: timeout ?? 600000, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }) as APIPromise | APIPromise>; + } + + /** + * Create a Message stream + */ + stream(body: BetaMessageStreamParams, options?: RequestOptions): BetaMessageStream { + return BetaMessageStream.createMessage(this, body, options); + } + + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const betaMessageTokensCount = + * await client.beta.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens( + params: MessageCountTokensParams, + options?: RequestOptions, + ): APIPromise { + const { betas, ...body } = params; + return this._client.post('/v1/messages/count_tokens?beta=true', { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString() }, + options?.headers, + ]), + }); + } +} + +export type BetaMessageStreamParams = MessageCreateParamsBase; + +export interface BetaBase64ImageSource { + data: string; + + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + + type: 'base64'; +} + +export interface BetaBase64PDFSource { + data: string; + + media_type: 'application/pdf'; + + type: 'base64'; +} + +export interface BetaCacheControlEphemeral { + type: 'ephemeral'; + + /** + * The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. + */ + ttl?: '5m' | '1h'; +} + +export interface BetaCacheCreation { + /** + * The number of input tokens used to create the 1 hour cache entry. + */ + ephemeral_1h_input_tokens: number; + + /** + * The number of input tokens used to create the 5 minute cache entry. + */ + ephemeral_5m_input_tokens: number; +} + +export interface BetaCitationCharLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_char_index: number; + + start_char_index: number; + + type: 'char_location'; +} + +export interface BetaCitationCharLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_char_index: number; + + start_char_index: number; + + type: 'char_location'; +} + +export interface BetaCitationContentBlockLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_block_index: number; + + start_block_index: number; + + type: 'content_block_location'; +} + +export interface BetaCitationContentBlockLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_block_index: number; + + start_block_index: number; + + type: 'content_block_location'; +} + +export interface BetaCitationPageLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_page_number: number; + + start_page_number: number; + + type: 'page_location'; +} + +export interface BetaCitationPageLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_page_number: number; + + start_page_number: number; + + type: 'page_location'; +} + +export interface BetaCitationWebSearchResultLocationParam { + cited_text: string; + + encrypted_index: string; + + title: string | null; + + type: 'web_search_result_location'; + + url: string; +} + +export interface BetaCitationsConfigParam { + enabled?: boolean; +} + +export interface BetaCitationsDelta { + citation: + | BetaCitationCharLocation + | BetaCitationPageLocation + | BetaCitationContentBlockLocation + | BetaCitationsWebSearchResultLocation; + + type: 'citations_delta'; +} + +export interface BetaCitationsWebSearchResultLocation { + cited_text: string; + + encrypted_index: string; + + title: string | null; + + type: 'web_search_result_location'; + + url: string; +} + +export interface BetaCodeExecutionOutputBlock { + file_id: string; + + type: 'code_execution_output'; +} + +export interface BetaCodeExecutionOutputBlockParam { + file_id: string; + + type: 'code_execution_output'; +} + +export interface BetaCodeExecutionResultBlock { + content: Array; + + return_code: number; + + stderr: string; + + stdout: string; + + type: 'code_execution_result'; +} + +export interface BetaCodeExecutionResultBlockParam { + content: Array; + + return_code: number; + + stderr: string; + + stdout: string; + + type: 'code_execution_result'; +} + +export interface BetaCodeExecutionTool20250522 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'code_execution'; + + type: 'code_execution_20250522'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaCodeExecutionToolResultBlock { + content: BetaCodeExecutionToolResultBlockContent; + + tool_use_id: string; + + type: 'code_execution_tool_result'; +} + +export type BetaCodeExecutionToolResultBlockContent = + | BetaCodeExecutionToolResultError + | BetaCodeExecutionResultBlock; + +export interface BetaCodeExecutionToolResultBlockParam { + content: BetaCodeExecutionToolResultBlockParamContent; + + tool_use_id: string; + + type: 'code_execution_tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export type BetaCodeExecutionToolResultBlockParamContent = + | BetaCodeExecutionToolResultErrorParam + | BetaCodeExecutionResultBlockParam; + +export interface BetaCodeExecutionToolResultError { + error_code: BetaCodeExecutionToolResultErrorCode; + + type: 'code_execution_tool_result_error'; +} + +export type BetaCodeExecutionToolResultErrorCode = + | 'invalid_tool_input' + | 'unavailable' + | 'too_many_requests' + | 'execution_time_exceeded'; + +export interface BetaCodeExecutionToolResultErrorParam { + error_code: BetaCodeExecutionToolResultErrorCode; + + type: 'code_execution_tool_result_error'; +} + +/** + * Information about the container used in the request (for the code execution + * tool) + */ +export interface BetaContainer { + /** + * Identifier for the container used in this request + */ + id: string; + + /** + * The time at which the container will expire. + */ + expires_at: string; +} + +/** + * Response model for a file uploaded to the container. + */ +export interface BetaContainerUploadBlock { + file_id: string; + + type: 'container_upload'; +} + +/** + * A content block that represents a file to be uploaded to the container Files + * uploaded via this block will be available in the container's input directory. + */ +export interface BetaContainerUploadBlockParam { + file_id: string; + + type: 'container_upload'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +/** + * Response model for a file uploaded to the container. + */ +export type BetaContentBlock = + | BetaTextBlock + | BetaToolUseBlock + | BetaServerToolUseBlock + | BetaWebSearchToolResultBlock + | BetaCodeExecutionToolResultBlock + | BetaMCPToolUseBlock + | BetaMCPToolResultBlock + | BetaContainerUploadBlock + | BetaThinkingBlock + | BetaRedactedThinkingBlock; + +/** + * Regular text content. + */ +export type BetaContentBlockParam = + | BetaServerToolUseBlockParam + | BetaWebSearchToolResultBlockParam + | BetaCodeExecutionToolResultBlockParam + | BetaMCPToolUseBlockParam + | BetaRequestMCPToolResultBlockParam + | BetaTextBlockParam + | BetaImageBlockParam + | BetaToolUseBlockParam + | BetaToolResultBlockParam + | BetaRequestDocumentBlock + | BetaThinkingBlockParam + | BetaRedactedThinkingBlockParam + | BetaContainerUploadBlockParam; + +export interface BetaContentBlockSource { + content: string | Array; + + type: 'content'; +} + +export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam; + +export interface BetaFileDocumentSource { + file_id: string; + + type: 'file'; +} + +export interface BetaFileImageSource { + file_id: string; + + type: 'file'; +} + +export interface BetaImageBlockParam { + source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource; + + type: 'image'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaInputJSONDelta { + partial_json: string; + + type: 'input_json_delta'; +} + +export interface BetaMCPToolResultBlock { + content: string | Array; + + is_error: boolean; + + tool_use_id: string; + + type: 'mcp_tool_result'; +} + +export interface BetaMCPToolUseBlock { + id: string; + + input: unknown; + + /** + * The name of the MCP tool + */ + name: string; + + /** + * The name of the MCP server + */ + server_name: string; + + type: 'mcp_tool_use'; +} + +export interface BetaMCPToolUseBlockParam { + id: string; + + input: unknown; + + name: string; + + /** + * The name of the MCP server + */ + server_name: string; + + type: 'mcp_tool_use'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaMessage { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: BetaContainer | null; + + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: BetaStopReason | null; + + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaUsage; +} + +export interface BetaMessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; +} + +export interface BetaMessageParam { + content: string | Array; + + role: 'user' | 'assistant'; +} + +export interface BetaMessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} + +export interface BetaMetadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} + +export interface BetaPlainTextSource { + data: string; + + media_type: 'text/plain'; + + type: 'text'; +} + +export type BetaRawContentBlockDelta = + | BetaTextDelta + | BetaInputJSONDelta + | BetaCitationsDelta + | BetaThinkingDelta + | BetaSignatureDelta; + +export interface BetaRawContentBlockDeltaEvent { + delta: BetaRawContentBlockDelta; + + index: number; + + type: 'content_block_delta'; +} + +export interface BetaRawContentBlockStartEvent { + /** + * Response model for a file uploaded to the container. + */ + content_block: + | BetaTextBlock + | BetaToolUseBlock + | BetaServerToolUseBlock + | BetaWebSearchToolResultBlock + | BetaCodeExecutionToolResultBlock + | BetaMCPToolUseBlock + | BetaMCPToolResultBlock + | BetaContainerUploadBlock + | BetaThinkingBlock + | BetaRedactedThinkingBlock; + + index: number; + + type: 'content_block_start'; +} + +export interface BetaRawContentBlockStopEvent { + index: number; + + type: 'content_block_stop'; +} + +export interface BetaRawMessageDeltaEvent { + delta: BetaRawMessageDeltaEvent.Delta; + + type: 'message_delta'; + + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: BetaMessageDeltaUsage; +} + +export namespace BetaRawMessageDeltaEvent { + export interface Delta { + /** + * Information about the container used in the request (for the code execution + * tool) + */ + container: MessagesMessagesAPI.BetaContainer | null; + + stop_reason: MessagesMessagesAPI.BetaStopReason | null; + + stop_sequence: string | null; + } +} + +export interface BetaRawMessageStartEvent { + message: BetaMessage; + + type: 'message_start'; +} + +export interface BetaRawMessageStopEvent { + type: 'message_stop'; +} + +export type BetaRawMessageStreamEvent = + | BetaRawMessageStartEvent + | BetaRawMessageDeltaEvent + | BetaRawMessageStopEvent + | BetaRawContentBlockStartEvent + | BetaRawContentBlockDeltaEvent + | BetaRawContentBlockStopEvent; + +export interface BetaRedactedThinkingBlock { + data: string; + + type: 'redacted_thinking'; +} + +export interface BetaRedactedThinkingBlockParam { + data: string; + + type: 'redacted_thinking'; +} + +export interface BetaRequestDocumentBlock { + source: + | BetaBase64PDFSource + | BetaPlainTextSource + | BetaContentBlockSource + | BetaURLPDFSource + | BetaFileDocumentSource; + + type: 'document'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + citations?: BetaCitationsConfigParam; + + context?: string | null; + + title?: string | null; +} + +export interface BetaRequestMCPServerToolConfiguration { + allowed_tools?: Array | null; + + enabled?: boolean | null; +} + +export interface BetaRequestMCPServerURLDefinition { + name: string; + + type: 'url'; + + url: string; + + authorization_token?: string | null; + + tool_configuration?: BetaRequestMCPServerToolConfiguration | null; +} + +export interface BetaRequestMCPToolResultBlockParam { + tool_use_id: string; + + type: 'mcp_tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + content?: string | Array; + + is_error?: boolean; +} + +export interface BetaServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} + +export interface BetaServerToolUseBlock { + id: string; + + input: unknown; + + name: 'web_search' | 'code_execution'; + + type: 'server_tool_use'; +} + +export interface BetaServerToolUseBlockParam { + id: string; + + input: unknown; + + name: 'web_search' | 'code_execution'; + + type: 'server_tool_use'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaSignatureDelta { + signature: string; + + type: 'signature_delta'; +} + +export type BetaStopReason = + | 'end_turn' + | 'max_tokens' + | 'stop_sequence' + | 'tool_use' + | 'pause_turn' + | 'refusal'; + +export interface BetaTextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + + text: string; + + type: 'text'; +} + +export interface BetaTextBlockParam { + text: string; + + type: 'text'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + citations?: Array | null; +} + +export type BetaTextCitation = + | BetaCitationCharLocation + | BetaCitationPageLocation + | BetaCitationContentBlockLocation + | BetaCitationsWebSearchResultLocation; + +export type BetaTextCitationParam = + | BetaCitationCharLocationParam + | BetaCitationPageLocationParam + | BetaCitationContentBlockLocationParam + | BetaCitationWebSearchResultLocationParam; + +export interface BetaTextDelta { + text: string; + + type: 'text_delta'; +} + +export interface BetaThinkingBlock { + signature: string; + + thinking: string; + + type: 'thinking'; +} + +export interface BetaThinkingBlockParam { + signature: string; + + thinking: string; + + type: 'thinking'; +} + +export interface BetaThinkingConfigDisabled { + type: 'disabled'; +} + +export interface BetaThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + + type: 'enabled'; +} + +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled; + +export interface BetaThinkingDelta { + thinking: string; + + type: 'thinking_delta'; +} + +export interface BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: BetaTool.InputSchema; + + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + + type?: 'custom' | null; +} + +export namespace BetaTool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + export interface InputSchema { + type: 'object'; + + properties?: unknown | null; + + required?: Array | null; + + [k: string]: unknown; + } +} + +export interface BetaToolBash20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + + type: 'bash_20241022'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + + type: 'bash_20250124'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone; + +/** + * The model will use any available tools. + */ +export interface BetaToolChoiceAny { + type: 'any'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +/** + * The model will automatically decide whether to use tools. + */ +export interface BetaToolChoiceAuto { + type: 'auto'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +/** + * The model will not be allowed to use tools. + */ +export interface BetaToolChoiceNone { + type: 'none'; +} + +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface BetaToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + + type: 'tool'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +export interface BetaToolComputerUse20241022 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + + /** + * The width of the display in pixels. + */ + display_width_px: number; + + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + + type: 'computer_20241022'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} + +export interface BetaToolComputerUse20250124 { + /** + * The height of the display in pixels. + */ + display_height_px: number; + + /** + * The width of the display in pixels. + */ + display_width_px: number; + + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'computer'; + + type: 'computer_20250124'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + /** + * The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null; +} + +export interface BetaToolResultBlockParam { + tool_use_id: string; + + type: 'tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + content?: string | Array; + + is_error?: boolean; +} + +export interface BetaToolTextEditor20241022 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + + type: 'text_editor_20241022'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + + type: 'text_editor_20250124'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaToolTextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + + type: 'text_editor_20250429'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export type BetaToolUnion = + | BetaTool + | BetaToolComputerUse20241022 + | BetaToolBash20241022 + | BetaToolTextEditor20241022 + | BetaToolComputerUse20250124 + | BetaToolBash20250124 + | BetaToolTextEditor20250124 + | BetaToolTextEditor20250429 + | BetaWebSearchTool20250305 + | BetaCodeExecutionTool20250522; + +export interface BetaToolUseBlock { + id: string; + + input: unknown; + + name: string; + + type: 'tool_use'; +} + +export interface BetaToolUseBlockParam { + id: string; + + input: unknown; + + name: string; + + type: 'tool_use'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export interface BetaURLImageSource { + type: 'url'; + + url: string; +} + +export interface BetaURLPDFSource { + type: 'url'; + + url: string; +} + +export interface BetaUsage { + /** + * Breakdown of cached tokens by TTL + */ + cache_creation: BetaCacheCreation | null; + + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + + /** + * The number of input tokens which were used. + */ + input_tokens: number; + + /** + * The number of output tokens which were used. + */ + output_tokens: number; + + /** + * The number of server tool requests. + */ + server_tool_use: BetaServerToolUsage | null; + + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} + +export interface BetaWebSearchResultBlock { + encrypted_content: string; + + page_age: string | null; + + title: string; + + type: 'web_search_result'; + + url: string; +} + +export interface BetaWebSearchResultBlockParam { + encrypted_content: string; + + title: string; + + type: 'web_search_result'; + + url: string; + + page_age?: string | null; +} + +export interface BetaWebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + + type: 'web_search_20250305'; + + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; + + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: BetaWebSearchTool20250305.UserLocation | null; +} + +export namespace BetaWebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + export interface UserLocation { + type: 'approximate'; + + /** + * The city of the user. + */ + city?: string | null; + + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + + /** + * The region of the user. + */ + region?: string | null; + + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} + +export interface BetaWebSearchToolRequestError { + error_code: BetaWebSearchToolResultErrorCode; + + type: 'web_search_tool_result_error'; +} + +export interface BetaWebSearchToolResultBlock { + content: BetaWebSearchToolResultBlockContent; + + tool_use_id: string; + + type: 'web_search_tool_result'; +} + +export type BetaWebSearchToolResultBlockContent = + | BetaWebSearchToolResultError + | Array; + +export interface BetaWebSearchToolResultBlockParam { + content: BetaWebSearchToolResultBlockParamContent; + + tool_use_id: string; + + type: 'web_search_tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: BetaCacheControlEphemeral | null; +} + +export type BetaWebSearchToolResultBlockParamContent = + | Array + | BetaWebSearchToolRequestError; + +export interface BetaWebSearchToolResultError { + error_code: BetaWebSearchToolResultErrorCode; + + type: 'web_search_tool_result_error'; +} + +export type BetaWebSearchToolResultErrorCode = + | 'invalid_tool_input' + | 'unavailable' + | 'max_uses_exceeded' + | 'too_many_requests' + | 'query_too_long'; + +/** + * @deprecated BetaRequestDocumentBlock should be used insated + */ +export type BetaBase64PDFBlock = BetaRequestDocumentBlock; + +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; + +export interface MessageCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + + /** + * Body param: Container identifier for reuse across requests. + */ + container?: string | null; + + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + + /** + * Body param: An object describing metadata about the request. + */ + metadata?: BetaMetadata; + + /** + * Body param: Determines whether to use priority capacity (if available) or + * standard capacity for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + + /** + * Body param: Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export namespace MessageCreateParams { + export type MessageCreateParamsNonStreaming = MessagesMessagesAPI.MessageCreateParamsNonStreaming; + export type MessageCreateParamsStreaming = MessagesMessagesAPI.MessageCreateParamsStreaming; +} + +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} + +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} + +export interface MessageCountTokensParams { + /** + * Body param: Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + + /** + * Body param: MCP servers to be utilized in this request + */ + mcp_servers?: Array; + + /** + * Body param: System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + + /** + * Body param: Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: BetaThinkingConfigParam; + + /** + * Body param: How the model should use the provided tools. The model can use a + * specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice; + + /** + * Body param: Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array< + | BetaTool + | BetaToolComputerUse20241022 + | BetaToolBash20241022 + | BetaToolTextEditor20241022 + | BetaToolComputerUse20250124 + | BetaToolBash20250124 + | BetaToolTextEditor20250124 + | BetaToolTextEditor20250429 + | BetaWebSearchTool20250305 + | BetaCodeExecutionTool20250522 + >; + + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +Messages.Batches = Batches; + +export declare namespace Messages { + export { + type BetaBase64ImageSource as BetaBase64ImageSource, + type BetaBase64PDFSource as BetaBase64PDFSource, + type BetaCacheControlEphemeral as BetaCacheControlEphemeral, + type BetaCacheCreation as BetaCacheCreation, + type BetaCitationCharLocation as BetaCitationCharLocation, + type BetaCitationCharLocationParam as BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation as BetaCitationPageLocation, + type BetaCitationPageLocationParam as BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam as BetaCitationsConfigParam, + type BetaCitationsDelta as BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, + type BetaContainer as BetaContainer, + type BetaContainerUploadBlock as BetaContainerUploadBlock, + type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, + type BetaContentBlock as BetaContentBlock, + type BetaContentBlockParam as BetaContentBlockParam, + type BetaContentBlockSource as BetaContentBlockSource, + type BetaContentBlockSourceContent as BetaContentBlockSourceContent, + type BetaFileDocumentSource as BetaFileDocumentSource, + type BetaFileImageSource as BetaFileImageSource, + type BetaImageBlockParam as BetaImageBlockParam, + type BetaInputJSONDelta as BetaInputJSONDelta, + type BetaMCPToolResultBlock as BetaMCPToolResultBlock, + type BetaMCPToolUseBlock as BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, + type BetaMessage as BetaMessage, + type BetaMessageDeltaUsage as BetaMessageDeltaUsage, + type BetaMessageParam as BetaMessageParam, + type BetaMessageTokensCount as BetaMessageTokensCount, + type BetaMetadata as BetaMetadata, + type BetaPlainTextSource as BetaPlainTextSource, + type BetaRawContentBlockDelta as BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent as BetaRawMessageStartEvent, + type BetaRawMessageStopEvent as BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock as BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage as BetaServerToolUsage, + type BetaServerToolUseBlock as BetaServerToolUseBlock, + type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, + type BetaSignatureDelta as BetaSignatureDelta, + type BetaStopReason as BetaStopReason, + type BetaTextBlock as BetaTextBlock, + type BetaTextBlockParam as BetaTextBlockParam, + type BetaTextCitation as BetaTextCitation, + type BetaTextCitationParam as BetaTextCitationParam, + type BetaTextDelta as BetaTextDelta, + type BetaThinkingBlock as BetaThinkingBlock, + type BetaThinkingBlockParam as BetaThinkingBlockParam, + type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, + type BetaThinkingConfigParam as BetaThinkingConfigParam, + type BetaThinkingDelta as BetaThinkingDelta, + type BetaTool as BetaTool, + type BetaToolBash20241022 as BetaToolBash20241022, + type BetaToolBash20250124 as BetaToolBash20250124, + type BetaToolChoice as BetaToolChoice, + type BetaToolChoiceAny as BetaToolChoiceAny, + type BetaToolChoiceAuto as BetaToolChoiceAuto, + type BetaToolChoiceNone as BetaToolChoiceNone, + type BetaToolChoiceTool as BetaToolChoiceTool, + type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, + type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, + type BetaToolResultBlockParam as BetaToolResultBlockParam, + type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, + type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, + type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, + type BetaToolUnion as BetaToolUnion, + type BetaToolUseBlock as BetaToolUseBlock, + type BetaToolUseBlockParam as BetaToolUseBlockParam, + type BetaURLImageSource as BetaURLImageSource, + type BetaURLPDFSource as BetaURLPDFSource, + type BetaUsage as BetaUsage, + type BetaWebSearchResultBlock as BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError as BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock as BetaBase64PDFBlock, + type MessageCreateParams as MessageCreateParams, + type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming as MessageCreateParamsStreaming, + type MessageCountTokensParams as MessageCountTokensParams, + }; + + export { + Batches as Batches, + type BetaDeletedMessageBatch as BetaDeletedMessageBatch, + type BetaMessageBatch as BetaMessageBatch, + type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, + type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, + type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, + type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, + type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, + type BetaMessageBatchResult as BetaMessageBatchResult, + type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, + type BetaMessageBatchesPage as BetaMessageBatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchRetrieveParams as BatchRetrieveParams, + type BatchListParams as BatchListParams, + type BatchDeleteParams as BatchDeleteParams, + type BatchCancelParams as BatchCancelParams, + type BatchResultsParams as BatchResultsParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts new file mode 100644 index 0000000000000000000000000000000000000000..94473d3898e2d5c8c3ffbadcd698c7d5ceb552c0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts @@ -0,0 +1,118 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as BetaAPI from './beta'; +import { APIPromise } from '../../core/api-promise'; +import { Page, type PageParams, PagePromise } from '../../core/pagination'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { path } from '../../internal/utils/path'; + +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve( + modelID: string, + params: ModelRetrieveParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/models/${modelID}?beta=true`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list( + params: ModelListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models?beta=true', Page, { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} + +export type BetaModelInfosPage = Page; + +export interface BetaModelInfo { + /** + * Unique model identifier. + */ + id: string; + + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + + /** + * A human-readable name for the model. + */ + display_name: string; + + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} + +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export declare namespace Models { + export { + type BetaModelInfo as BetaModelInfo, + type BetaModelInfosPage as BetaModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/completions.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/completions.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc52a9ff11410be496eaaa2a8bc2cc927a433075 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/completions.ts @@ -0,0 +1,231 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import * as CompletionsAPI from './completions'; +import * as BetaAPI from './beta/beta'; +import * as MessagesAPI from './messages/messages'; +import { APIPromise } from '../core/api-promise'; +import { Stream } from '../core/streaming'; +import { buildHeaders } from '../internal/headers'; +import { RequestOptions } from '../internal/request-options'; + +export class Completions extends APIResource { + /** + * [Legacy] Create a Text Completion. + * + * The Text Completions API is a legacy API. We recommend using the + * [Messages API](https://docs.anthropic.com/en/api/messages) going forward. + * + * Future models and features will not be compatible with Text Completions. See our + * [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages) + * for guidance in migrating from Text Completions to Messages. + * + * @example + * ```ts + * const completion = await client.completions.create({ + * max_tokens_to_sample: 256, + * model: 'claude-3-7-sonnet-latest', + * prompt: '\n\nHuman: Hello, world!\n\nAssistant:', + * }); + * ``` + */ + create(params: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(params: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create( + params: CompletionCreateParamsBase, + options?: RequestOptions, + ): APIPromise | Completion>; + create( + params: CompletionCreateParams, + options?: RequestOptions, + ): APIPromise | APIPromise> { + const { betas, ...body } = params; + return this._client.post('/v1/complete', { + body, + timeout: (this._client as any)._options.timeout ?? 600000, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }) as APIPromise | APIPromise>; + } +} + +export interface Completion { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * The resulting completion up to and excluding the stop sequences. + */ + completion: string; + + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"stop_sequence"`: we reached a stop sequence — either provided by you via the + * `stop_sequences` parameter, or a stop sequence built into the model + * - `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum + */ + stop_reason: string | null; + + /** + * Object type. + * + * For Text Completions, this is always `"completion"`. + */ + type: 'completion'; +} + +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; + +export interface CompletionCreateParamsBase { + /** + * Body param: The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + */ + max_tokens_to_sample: number; + + /** + * Body param: The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: MessagesAPI.Model; + + /** + * Body param: The prompt that you want Claude to complete. + * + * For proper response generation you will need to format your prompt using + * alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example: + * + * ``` + * "\n\nHuman: {userQuestion}\n\nAssistant:" + * ``` + * + * See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and + * our guide to + * [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more + * details. + */ + prompt: string; + + /** + * Body param: An object describing metadata about the request. + */ + metadata?: MessagesAPI.Metadata; + + /** + * Body param: Sequences that will cause the model to stop generating. + * + * Our models stop on `"\n\nHuman:"`, and may include additional built-in stop + * sequences in the future. By providing the stop_sequences parameter, you may + * include additional strings that will cause the model to stop generating. + */ + stop_sequences?: Array; + + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: boolean; + + /** + * Body param: Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + + /** + * Body param: Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + + /** + * Body param: Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; + + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export namespace CompletionCreateParams { + /** + * @deprecated use `Anthropic.Messages.Metadata` instead + */ + export type Metadata = MessagesAPI.Metadata; + + export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; + export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +} + +export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream?: false; +} + +export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { + /** + * Body param: Whether to incrementally stream the response using server-sent + * events. + * + * See [streaming](https://docs.anthropic.com/en/api/streaming) for details. + */ + stream: true; +} + +export declare namespace Completions { + export { + type Completion as Completion, + type CompletionCreateParams as CompletionCreateParams, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d3a88a356f117aaf97d8783b09a793c223a3cea --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/index.ts @@ -0,0 +1,121 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './shared'; +export { + Beta, + type AnthropicBeta, + type BetaAPIError, + type BetaAuthenticationError, + type BetaBillingError, + type BetaError, + type BetaErrorResponse, + type BetaGatewayTimeoutError, + type BetaInvalidRequestError, + type BetaNotFoundError, + type BetaOverloadedError, + type BetaPermissionError, + type BetaRateLimitError, +} from './beta/beta'; +export { + Completions, + type Completion, + type CompletionCreateParams, + type CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming, +} from './completions'; +export { + Messages, + type Base64ImageSource, + type Base64PDFSource, + type CacheControlEphemeral, + type CitationCharLocation, + type CitationCharLocationParam, + type CitationContentBlockLocation, + type CitationContentBlockLocationParam, + type CitationPageLocation, + type CitationPageLocationParam, + type CitationWebSearchResultLocationParam, + type CitationsConfigParam, + type CitationsDelta, + type CitationsWebSearchResultLocation, + type ContentBlock, + type ContentBlockParam, + type ContentBlockStartEvent, + type ContentBlockStopEvent, + type ContentBlockSource, + type ContentBlockSourceContent, + type DocumentBlockParam, + type ImageBlockParam, + type InputJSONDelta, + type Message, + type MessageCountTokensTool, + type MessageDeltaEvent, + type MessageDeltaUsage, + type MessageParam, + type MessageStreamParams, + type MessageTokensCount, + type Metadata, + type Model, + type PlainTextSource, + type RawContentBlockDelta, + type RawContentBlockDeltaEvent, + type RawContentBlockStartEvent, + type RawContentBlockStopEvent, + type RawMessageDeltaEvent, + type RawMessageStartEvent, + type RawMessageStopEvent, + type RawMessageStreamEvent, + type RedactedThinkingBlock, + type RedactedThinkingBlockParam, + type ServerToolUsage, + type ServerToolUseBlock, + type ServerToolUseBlockParam, + type SignatureDelta, + type StopReason, + type TextBlock, + type TextBlockParam, + type TextCitation, + type TextCitationParam, + type TextDelta, + type ThinkingBlock, + type ThinkingBlockParam, + type ThinkingConfigDisabled, + type ThinkingConfigEnabled, + type ThinkingConfigParam, + type ThinkingDelta, + type Tool, + type ToolBash20250124, + type ToolChoice, + type ToolChoiceAny, + type ToolChoiceAuto, + type ToolChoiceNone, + type ToolChoiceTool, + type ToolResultBlockParam, + type ToolTextEditor20250124, + type ToolUnion, + type ToolUseBlock, + type ToolUseBlockParam, + type URLImageSource, + type URLPDFSource, + type Usage, + type WebSearchResultBlock, + type WebSearchResultBlockParam, + type WebSearchTool20250305, + type WebSearchToolRequestError, + type WebSearchToolResultBlock, + type WebSearchToolResultBlockContent, + type WebSearchToolResultBlockParam, + type WebSearchToolResultBlockParamContent, + type WebSearchToolResultError, + type MessageCreateParams, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, +} from './messages/messages'; +export { + Models, + type ModelInfo, + type ModelRetrieveParams, + type ModelListParams, + type ModelInfosPage, +} from './models'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb1752308f31e493534e505ff745085107f9d210 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './messages/index'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts new file mode 100644 index 0000000000000000000000000000000000000000..974a1be5bb223e60aded6934123c38871c28b830 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts @@ -0,0 +1,396 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as Shared from '../shared'; +import * as MessagesAPI from './messages'; +import { APIPromise } from '../../core/api-promise'; +import { Page, type PageParams, PagePromise } from '../../core/pagination'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { JSONLDecoder } from '../../internal/decoders/jsonl'; +import { AnthropicError } from '../../error'; +import { path } from '../../internal/utils/path'; + +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/v1/messages/batches', { body, ...options }); + } + + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/v1/messages/batches/${messageBatchID}`, options); + } + + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list( + query: BatchListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + return this._client.getAPIList('/v1/messages/batches', Page, { query, ...options }); + } + + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID: string, options?: RequestOptions): APIPromise { + return this._client.delete(path`/v1/messages/batches/${messageBatchID}`, options); + } + + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, options?: RequestOptions): APIPromise { + return this._client.post(path`/v1/messages/batches/${messageBatchID}/cancel`, options); + } + + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + async results( + messageBatchID: string, + options?: RequestOptions, + ): Promise> { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError( + `No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`, + ); + } + + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise< + JSONLDecoder + >; + } +} + +export type MessageBatchesPage = Page; + +export interface DeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} + +export interface MessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: MessageBatchRequestCounts; + + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} + +export interface MessageBatchCanceledResult { + type: 'canceled'; +} + +export interface MessageBatchErroredResult { + error: Shared.ErrorResponse; + + type: 'errored'; +} + +export interface MessageBatchExpiredResult { + type: 'expired'; +} + +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface MessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: MessageBatchResult; +} + +export interface MessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} + +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type MessageBatchResult = + | MessageBatchSucceededResult + | MessageBatchErroredResult + | MessageBatchCanceledResult + | MessageBatchExpiredResult; + +export interface MessageBatchSucceededResult { + message: MessagesAPI.Message; + + type: 'succeeded'; +} + +export interface BatchCreateParams { + /** + * List of requests for prompt completion. Each is an individual request to create + * a Message. + */ + requests: Array; +} + +export namespace BatchCreateParams { + export interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: MessagesAPI.MessageCreateParamsNonStreaming; + } +} + +export interface BatchListParams extends PageParams {} + +export declare namespace Batches { + export { + type DeletedMessageBatch as DeletedMessageBatch, + type MessageBatch as MessageBatch, + type MessageBatchCanceledResult as MessageBatchCanceledResult, + type MessageBatchErroredResult as MessageBatchErroredResult, + type MessageBatchExpiredResult as MessageBatchExpiredResult, + type MessageBatchIndividualResponse as MessageBatchIndividualResponse, + type MessageBatchRequestCounts as MessageBatchRequestCounts, + type MessageBatchResult as MessageBatchResult, + type MessageBatchSucceededResult as MessageBatchSucceededResult, + type MessageBatchesPage as MessageBatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchListParams as BatchListParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..db7320ea7be03530aab9509eeb6cc4d8bc204e97 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts @@ -0,0 +1,110 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Batches, + type DeletedMessageBatch, + type MessageBatch, + type MessageBatchCanceledResult, + type MessageBatchErroredResult, + type MessageBatchExpiredResult, + type MessageBatchIndividualResponse, + type MessageBatchRequestCounts, + type MessageBatchResult, + type MessageBatchSucceededResult, + type BatchCreateParams, + type BatchListParams, + type MessageBatchesPage, +} from './batches'; +export { + Messages, + type Base64ImageSource, + type Base64PDFSource, + type CacheControlEphemeral, + type CitationCharLocation, + type CitationCharLocationParam, + type CitationContentBlockLocation, + type CitationContentBlockLocationParam, + type CitationPageLocation, + type CitationPageLocationParam, + type CitationWebSearchResultLocationParam, + type CitationsConfigParam, + type CitationsDelta, + type CitationsWebSearchResultLocation, + type ContentBlock, + type ContentBlockParam, + type ContentBlockStartEvent, + type ContentBlockStopEvent, + type ContentBlockSource, + type ContentBlockSourceContent, + type DocumentBlockParam, + type ImageBlockParam, + type InputJSONDelta, + type Message, + type MessageCountTokensTool, + type MessageDeltaEvent, + type MessageDeltaUsage, + type MessageParam, + type MessageTokensCount, + type Metadata, + type Model, + type PlainTextSource, + type RawContentBlockDelta, + type RawContentBlockDeltaEvent, + type RawContentBlockStartEvent, + type RawContentBlockStopEvent, + type RawMessageDeltaEvent, + type RawMessageStartEvent, + type RawMessageStopEvent, + type RawMessageStreamEvent, + type RedactedThinkingBlock, + type RedactedThinkingBlockParam, + type ServerToolUsage, + type ServerToolUseBlock, + type ServerToolUseBlockParam, + type SignatureDelta, + type StopReason, + type TextBlock, + type TextBlockParam, + type TextCitation, + type TextCitationParam, + type TextDelta, + type ThinkingBlock, + type ThinkingBlockParam, + type ThinkingConfigDisabled, + type ThinkingConfigEnabled, + type ThinkingConfigParam, + type ThinkingDelta, + type Tool, + type ToolBash20250124, + type ToolChoice, + type ToolChoiceAny, + type ToolChoiceAuto, + type ToolChoiceNone, + type ToolChoiceTool, + type ToolResultBlockParam, + type ToolTextEditor20250124, + type ToolUnion, + type ToolUseBlock, + type ToolUseBlockParam, + type URLImageSource, + type URLPDFSource, + type Usage, + type WebSearchResultBlock, + type WebSearchResultBlockParam, + type WebSearchTool20250305, + type WebSearchToolRequestError, + type WebSearchToolResultBlock, + type WebSearchToolResultBlockContent, + type WebSearchToolResultBlockParam, + type WebSearchToolResultBlockParamContent, + type WebSearchToolResultError, + type MessageStreamEvent, + type MessageStartEvent, + type MessageStopEvent, + type ContentBlockDeltaEvent, + type MessageCreateParams, + type MessageCreateParamsBase, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, +} from './messages'; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2c9429d7f66f990c5e13b091bf62a02016bc360 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts @@ -0,0 +1,1831 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIPromise } from '../../core/api-promise'; +import { APIResource } from '../../core/resource'; +import { Stream } from '../../core/streaming'; +import { RequestOptions } from '../../internal/request-options'; +import { MessageStream } from '../../lib/MessageStream'; +import * as BatchesAPI from './batches'; +import { + BatchCreateParams, + BatchListParams, + Batches, + DeletedMessageBatch, + MessageBatch, + MessageBatchCanceledResult, + MessageBatchErroredResult, + MessageBatchExpiredResult, + MessageBatchIndividualResponse, + MessageBatchRequestCounts, + MessageBatchResult, + MessageBatchSucceededResult, + MessageBatchesPage, +} from './batches'; +import * as MessagesAPI from './messages'; + +import { MODEL_NONSTREAMING_TOKENS } from '../../internal/constants'; + +export class Messages extends APIResource { + batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client); + + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const message = await client.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(body: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create( + body: MessageCreateParamsStreaming, + options?: RequestOptions, + ): APIPromise>; + create( + body: MessageCreateParamsBase, + options?: RequestOptions, + ): APIPromise | Message>; + create( + body: MessageCreateParams, + options?: RequestOptions, + ): APIPromise | APIPromise> { + if (body.model in DEPRECATED_MODELS) { + console.warn( + `The model '${body.model}' is deprecated and will reach end-of-life on ${ + DEPRECATED_MODELS[body.model] + }\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`, + ); + } + let timeout = (this._client as any)._options.timeout as number | null; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages', { + body, + timeout: timeout ?? 600000, + ...options, + stream: body.stream ?? false, + }) as APIPromise | APIPromise>; + } + + /** + * Create a Message stream + */ + stream(body: MessageStreamParams, options?: RequestOptions): MessageStream { + return MessageStream.createMessage(this, body, options); + } + + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body: MessageCountTokensParams, options?: RequestOptions): APIPromise { + return this._client.post('/v1/messages/count_tokens', { body, ...options }); + } +} + +export interface Base64ImageSource { + data: string; + + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + + type: 'base64'; +} + +export interface Base64PDFSource { + data: string; + + media_type: 'application/pdf'; + + type: 'base64'; +} + +export interface CacheControlEphemeral { + type: 'ephemeral'; +} + +export interface CitationCharLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_char_index: number; + + start_char_index: number; + + type: 'char_location'; +} + +export interface CitationCharLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_char_index: number; + + start_char_index: number; + + type: 'char_location'; +} + +export interface CitationContentBlockLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_block_index: number; + + start_block_index: number; + + type: 'content_block_location'; +} + +export interface CitationContentBlockLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_block_index: number; + + start_block_index: number; + + type: 'content_block_location'; +} + +export interface CitationPageLocation { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_page_number: number; + + start_page_number: number; + + type: 'page_location'; +} + +export interface CitationPageLocationParam { + cited_text: string; + + document_index: number; + + document_title: string | null; + + end_page_number: number; + + start_page_number: number; + + type: 'page_location'; +} + +export interface CitationWebSearchResultLocationParam { + cited_text: string; + + encrypted_index: string; + + title: string | null; + + type: 'web_search_result_location'; + + url: string; +} + +export interface CitationsConfigParam { + enabled?: boolean; +} + +export interface CitationsDelta { + citation: + | CitationCharLocation + | CitationPageLocation + | CitationContentBlockLocation + | CitationsWebSearchResultLocation; + + type: 'citations_delta'; +} + +export interface CitationsWebSearchResultLocation { + cited_text: string; + + encrypted_index: string; + + title: string | null; + + type: 'web_search_result_location'; + + url: string; +} + +export type ContentBlock = + | TextBlock + | ToolUseBlock + | ServerToolUseBlock + | WebSearchToolResultBlock + | ThinkingBlock + | RedactedThinkingBlock; + +/** + * Regular text content. + */ +export type ContentBlockParam = + | ServerToolUseBlockParam + | WebSearchToolResultBlockParam + | TextBlockParam + | ImageBlockParam + | ToolUseBlockParam + | ToolResultBlockParam + | DocumentBlockParam + | ThinkingBlockParam + | RedactedThinkingBlockParam; + +export interface ContentBlockSource { + content: string | Array; + + type: 'content'; +} + +export type ContentBlockSourceContent = TextBlockParam | ImageBlockParam; + +export interface DocumentBlockParam { + source: Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource; + + type: 'document'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + + citations?: CitationsConfigParam; + + context?: string | null; + + title?: string | null; +} + +export interface ImageBlockParam { + source: Base64ImageSource | URLImageSource; + + type: 'image'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +export interface InputJSONDelta { + partial_json: string; + + type: 'input_json_delta'; +} + +export interface Message { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: StopReason | null; + + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: Usage; +} + +export type MessageCountTokensTool = + | Tool + | ToolBash20250124 + | ToolTextEditor20250124 + | MessageCountTokensTool.TextEditor20250429 + | WebSearchTool20250305; + +export namespace MessageCountTokensTool { + export interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + + type: 'text_editor_20250429'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} + +export interface MessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; +} + +export interface MessageParam { + content: string | Array; + + role: 'user' | 'assistant'; +} + +export interface MessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} + +export interface Metadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} + +/** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ +export type Model = + | 'claude-3-7-sonnet-latest' + | 'claude-3-7-sonnet-20250219' + | 'claude-3-5-haiku-latest' + | 'claude-3-5-haiku-20241022' + | 'claude-sonnet-4-20250514' + | 'claude-sonnet-4-0' + | 'claude-4-sonnet-20250514' + | 'claude-3-5-sonnet-latest' + | 'claude-3-5-sonnet-20241022' + | 'claude-3-5-sonnet-20240620' + | 'claude-opus-4-0' + | 'claude-opus-4-20250514' + | 'claude-4-opus-20250514' + | 'claude-3-opus-latest' + | 'claude-3-opus-20240229' + | 'claude-3-sonnet-20240229' + | 'claude-3-haiku-20240307' + | 'claude-2.1' + | 'claude-2.0' + | (string & {}); + +const DEPRECATED_MODELS: { + [K in Model]?: string; +} = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; + +export interface PlainTextSource { + data: string; + + media_type: 'text/plain'; + + type: 'text'; +} + +export type RawContentBlockDelta = + | TextDelta + | InputJSONDelta + | CitationsDelta + | ThinkingDelta + | SignatureDelta; + +export interface RawContentBlockDeltaEvent { + delta: RawContentBlockDelta; + + index: number; + + type: 'content_block_delta'; +} + +export interface RawContentBlockStartEvent { + content_block: + | TextBlock + | ToolUseBlock + | ServerToolUseBlock + | WebSearchToolResultBlock + | ThinkingBlock + | RedactedThinkingBlock; + + index: number; + + type: 'content_block_start'; +} + +export interface RawContentBlockStopEvent { + index: number; + + type: 'content_block_stop'; +} + +export interface RawMessageDeltaEvent { + delta: RawMessageDeltaEvent.Delta; + + type: 'message_delta'; + + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: MessageDeltaUsage; +} + +export namespace RawMessageDeltaEvent { + export interface Delta { + stop_reason: MessagesAPI.StopReason | null; + + stop_sequence: string | null; + } +} + +export interface RawMessageStartEvent { + message: Message; + + type: 'message_start'; +} + +export interface RawMessageStopEvent { + type: 'message_stop'; +} + +export type RawMessageStreamEvent = + | RawMessageStartEvent + | RawMessageDeltaEvent + | RawMessageStopEvent + | RawContentBlockStartEvent + | RawContentBlockDeltaEvent + | RawContentBlockStopEvent; + +export interface RedactedThinkingBlock { + data: string; + + type: 'redacted_thinking'; +} + +export interface RedactedThinkingBlockParam { + data: string; + + type: 'redacted_thinking'; +} + +export interface ServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} + +export interface ServerToolUseBlock { + id: string; + + input: unknown; + + name: 'web_search'; + + type: 'server_tool_use'; +} + +export interface ServerToolUseBlockParam { + id: string; + + input: unknown; + + name: 'web_search'; + + type: 'server_tool_use'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +export interface SignatureDelta { + signature: string; + + type: 'signature_delta'; +} + +export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; + +export interface TextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + + text: string; + + type: 'text'; +} + +export interface TextBlockParam { + text: string; + + type: 'text'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + + citations?: Array | null; +} + +export type TextCitation = + | CitationCharLocation + | CitationPageLocation + | CitationContentBlockLocation + | CitationsWebSearchResultLocation; + +export type TextCitationParam = + | CitationCharLocationParam + | CitationPageLocationParam + | CitationContentBlockLocationParam + | CitationWebSearchResultLocationParam; + +export interface TextDelta { + text: string; + + type: 'text_delta'; +} + +export interface ThinkingBlock { + signature: string; + + thinking: string; + + type: 'thinking'; +} + +export interface ThinkingBlockParam { + signature: string; + + thinking: string; + + type: 'thinking'; +} + +export interface ThinkingConfigDisabled { + type: 'disabled'; +} + +export interface ThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + + type: 'enabled'; +} + +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled; + +export interface ThinkingDelta { + thinking: string; + + type: 'thinking_delta'; +} + +export interface Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: Tool.InputSchema; + + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + + type?: 'custom' | null; +} + +export namespace Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + export interface InputSchema { + type: 'object'; + + properties?: unknown | null; + + required?: Array | null; + + [k: string]: unknown; + } +} + +export interface ToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + + type: 'bash_20250124'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | ToolChoiceNone; + +/** + * The model will use any available tools. + */ +export interface ToolChoiceAny { + type: 'any'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +/** + * The model will automatically decide whether to use tools. + */ +export interface ToolChoiceAuto { + type: 'auto'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +/** + * The model will not be allowed to use tools. + */ +export interface ToolChoiceNone { + type: 'none'; +} + +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface ToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + + type: 'tool'; + + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} + +export interface ToolResultBlockParam { + tool_use_id: string; + + type: 'tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + + content?: string | Array; + + is_error?: boolean; +} + +export interface ToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + + type: 'text_editor_20250124'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +export type ToolUnion = + | Tool + | ToolBash20250124 + | ToolTextEditor20250124 + | ToolUnion.TextEditor20250429 + | WebSearchTool20250305; + +export namespace ToolUnion { + export interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + + type: 'text_editor_20250429'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} + +export interface ToolUseBlock { + id: string; + + input: unknown; + + name: string; + + type: 'tool_use'; +} + +export interface ToolUseBlockParam { + id: string; + + input: unknown; + + name: string; + + type: 'tool_use'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +export interface URLImageSource { + type: 'url'; + + url: string; +} + +export interface URLPDFSource { + type: 'url'; + + url: string; +} + +export interface Usage { + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + + /** + * The number of input tokens which were used. + */ + input_tokens: number; + + /** + * The number of output tokens which were used. + */ + output_tokens: number; + + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; + + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} + +export interface WebSearchResultBlock { + encrypted_content: string; + + page_age: string | null; + + title: string; + + type: 'web_search_result'; + + url: string; +} + +export interface WebSearchResultBlockParam { + encrypted_content: string; + + title: string; + + type: 'web_search_result'; + + url: string; + + page_age?: string | null; +} + +export interface WebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + + type: 'web_search_20250305'; + + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: WebSearchTool20250305.UserLocation | null; +} + +export namespace WebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + export interface UserLocation { + type: 'approximate'; + + /** + * The city of the user. + */ + city?: string | null; + + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + + /** + * The region of the user. + */ + region?: string | null; + + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} + +export interface WebSearchToolRequestError { + error_code: + | 'invalid_tool_input' + | 'unavailable' + | 'max_uses_exceeded' + | 'too_many_requests' + | 'query_too_long'; + + type: 'web_search_tool_result_error'; +} + +export interface WebSearchToolResultBlock { + content: WebSearchToolResultBlockContent; + + tool_use_id: string; + + type: 'web_search_tool_result'; +} + +export type WebSearchToolResultBlockContent = WebSearchToolResultError | Array; + +export interface WebSearchToolResultBlockParam { + content: WebSearchToolResultBlockParamContent; + + tool_use_id: string; + + type: 'web_search_tool_result'; + + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} + +export type WebSearchToolResultBlockParamContent = + | Array + | WebSearchToolRequestError; + +export interface WebSearchToolResultError { + error_code: + | 'invalid_tool_input' + | 'unavailable' + | 'max_uses_exceeded' + | 'too_many_requests' + | 'query_too_long'; + + type: 'web_search_tool_result_error'; +} + +export type MessageStreamEvent = RawMessageStreamEvent; + +export type MessageStartEvent = RawMessageStartEvent; + +export type MessageDeltaEvent = RawMessageDeltaEvent; + +export type MessageStopEvent = RawMessageStopEvent; + +export type ContentBlockStartEvent = RawContentBlockStartEvent; + +export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent; + +export type ContentBlockStopEvent = RawContentBlockStopEvent; + +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; + +export interface MessageCreateParamsBase { + /** + * The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + + /** + * An object describing metadata about the request. + */ + metadata?: Metadata; + + /** + * Determines whether to use priority capacity (if available) or standard capacity + * for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + + /** + * Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + + /** + * Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + + /** + * Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + + /** + * Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; +} + +export namespace MessageCreateParams { + export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming; + export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming; +} + +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} + +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} + +export type MessageStreamParams = MessageCreateParamsBase; + +export interface MessageCountTokensParams { + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; +} + +Messages.Batches = Batches; + +export declare namespace Messages { + export { + type Base64ImageSource as Base64ImageSource, + type Base64PDFSource as Base64PDFSource, + type CacheControlEphemeral as CacheControlEphemeral, + type CitationCharLocation as CitationCharLocation, + type CitationCharLocationParam as CitationCharLocationParam, + type CitationContentBlockLocation as CitationContentBlockLocation, + type CitationContentBlockLocationParam as CitationContentBlockLocationParam, + type CitationPageLocation as CitationPageLocation, + type CitationPageLocationParam as CitationPageLocationParam, + type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, + type CitationsConfigParam as CitationsConfigParam, + type CitationsDelta as CitationsDelta, + type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, + type ContentBlock as ContentBlock, + type ContentBlockParam as ContentBlockParam, + type ContentBlockStartEvent as ContentBlockStartEvent, + type ContentBlockStopEvent as ContentBlockStopEvent, + type ContentBlockSource as ContentBlockSource, + type ContentBlockSourceContent as ContentBlockSourceContent, + type DocumentBlockParam as DocumentBlockParam, + type ImageBlockParam as ImageBlockParam, + type InputJSONDelta as InputJSONDelta, + type Message as Message, + type MessageCountTokensTool as MessageCountTokensTool, + type MessageDeltaEvent as MessageDeltaEvent, + type MessageDeltaUsage as MessageDeltaUsage, + type MessageParam as MessageParam, + type MessageTokensCount as MessageTokensCount, + type Metadata as Metadata, + type Model as Model, + type PlainTextSource as PlainTextSource, + type RawContentBlockDelta as RawContentBlockDelta, + type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, + type RawContentBlockStartEvent as RawContentBlockStartEvent, + type RawContentBlockStopEvent as RawContentBlockStopEvent, + type RawMessageDeltaEvent as RawMessageDeltaEvent, + type RawMessageStartEvent as RawMessageStartEvent, + type RawMessageStopEvent as RawMessageStopEvent, + type RawMessageStreamEvent as RawMessageStreamEvent, + type RedactedThinkingBlock as RedactedThinkingBlock, + type RedactedThinkingBlockParam as RedactedThinkingBlockParam, + type ServerToolUsage as ServerToolUsage, + type ServerToolUseBlock as ServerToolUseBlock, + type ServerToolUseBlockParam as ServerToolUseBlockParam, + type SignatureDelta as SignatureDelta, + type StopReason as StopReason, + type TextBlock as TextBlock, + type TextBlockParam as TextBlockParam, + type TextCitation as TextCitation, + type TextCitationParam as TextCitationParam, + type TextDelta as TextDelta, + type ThinkingBlock as ThinkingBlock, + type ThinkingBlockParam as ThinkingBlockParam, + type ThinkingConfigDisabled as ThinkingConfigDisabled, + type ThinkingConfigEnabled as ThinkingConfigEnabled, + type ThinkingConfigParam as ThinkingConfigParam, + type ThinkingDelta as ThinkingDelta, + type Tool as Tool, + type ToolBash20250124 as ToolBash20250124, + type ToolChoice as ToolChoice, + type ToolChoiceAny as ToolChoiceAny, + type ToolChoiceAuto as ToolChoiceAuto, + type ToolChoiceNone as ToolChoiceNone, + type ToolChoiceTool as ToolChoiceTool, + type ToolResultBlockParam as ToolResultBlockParam, + type ToolTextEditor20250124 as ToolTextEditor20250124, + type ToolUnion as ToolUnion, + type ToolUseBlock as ToolUseBlock, + type ToolUseBlockParam as ToolUseBlockParam, + type URLImageSource as URLImageSource, + type URLPDFSource as URLPDFSource, + type Usage as Usage, + type WebSearchResultBlock as WebSearchResultBlock, + type WebSearchResultBlockParam as WebSearchResultBlockParam, + type WebSearchTool20250305 as WebSearchTool20250305, + type WebSearchToolRequestError as WebSearchToolRequestError, + type WebSearchToolResultBlock as WebSearchToolResultBlock, + type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, + type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, + type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, + type WebSearchToolResultError as WebSearchToolResultError, + type MessageStreamEvent as MessageStreamEvent, + type MessageStartEvent as MessageStartEvent, + type MessageStopEvent as MessageStopEvent, + type ContentBlockDeltaEvent as ContentBlockDeltaEvent, + type MessageCreateParams as MessageCreateParams, + type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming as MessageCreateParamsStreaming, + type MessageStreamParams as MessageStreamParams, + type MessageCountTokensParams as MessageCountTokensParams, + }; + + export { + Batches as Batches, + type DeletedMessageBatch as DeletedMessageBatch, + type MessageBatch as MessageBatch, + type MessageBatchCanceledResult as MessageBatchCanceledResult, + type MessageBatchErroredResult as MessageBatchErroredResult, + type MessageBatchExpiredResult as MessageBatchExpiredResult, + type MessageBatchIndividualResponse as MessageBatchIndividualResponse, + type MessageBatchRequestCounts as MessageBatchRequestCounts, + type MessageBatchResult as MessageBatchResult, + type MessageBatchSucceededResult as MessageBatchSucceededResult, + type MessageBatchesPage as MessageBatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchListParams as BatchListParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/models.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/models.ts new file mode 100644 index 0000000000000000000000000000000000000000..b42ae35519cf404fbddbd35733928f1744644e0e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/models.ts @@ -0,0 +1,103 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import * as BetaAPI from './beta/beta'; +import { APIPromise } from '../core/api-promise'; +import { Page, type PageParams, PagePromise } from '../core/pagination'; +import { buildHeaders } from '../internal/headers'; +import { RequestOptions } from '../internal/request-options'; +import { path } from '../internal/utils/path'; + +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve( + modelID: string, + params: ModelRetrieveParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/models/${modelID}`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list( + params: ModelListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models', Page, { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} + +export type ModelInfosPage = Page; + +export interface ModelInfo { + /** + * Unique model identifier. + */ + id: string; + + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + + /** + * A human-readable name for the model. + */ + display_name: string; + + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} + +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export declare namespace Models { + export { + type ModelInfo as ModelInfo, + type ModelInfosPage as ModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/shared.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/shared.ts new file mode 100644 index 0000000000000000000000000000000000000000..d731c1f986644f7e74e706d441bb43493f2179ab --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/shared.ts @@ -0,0 +1,72 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export interface APIErrorObject { + message: string; + + type: 'api_error'; +} + +export interface AuthenticationError { + message: string; + + type: 'authentication_error'; +} + +export interface BillingError { + message: string; + + type: 'billing_error'; +} + +export type ErrorObject = + | InvalidRequestError + | AuthenticationError + | BillingError + | PermissionError + | NotFoundError + | RateLimitError + | GatewayTimeoutError + | APIErrorObject + | OverloadedError; + +export interface ErrorResponse { + error: ErrorObject; + + type: 'error'; +} + +export interface GatewayTimeoutError { + message: string; + + type: 'timeout_error'; +} + +export interface InvalidRequestError { + message: string; + + type: 'invalid_request_error'; +} + +export interface NotFoundError { + message: string; + + type: 'not_found_error'; +} + +export interface OverloadedError { + message: string; + + type: 'overloaded_error'; +} + +export interface PermissionError { + message: string; + + type: 'permission_error'; +} + +export interface RateLimitError { + message: string; + + type: 'rate_limit_error'; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7426a62a507214266c84dc260a010b6002a406b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export {}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/streaming.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/tsconfig.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/uploads.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/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/@anthropic-ai/sdk/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/@anthropic-ai/sdk/src/version.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/version.ts new file mode 100644 index 0000000000000000000000000000000000000000..3a6141dc2fda132eb86136aa5b663c7a9a16223e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/src/version.ts @@ -0,0 +1 @@ +export const VERSION = '0.54.0'; // x-release-please-version diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f58cd7c64365327309fcc5ff63f56c50b1f1d7e9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts @@ -0,0 +1,2 @@ +export * from "./core/streaming.mjs"; +//# 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/@anthropic-ai/sdk/streaming.d.mts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b1441091adec83c44c47c1d2abd3afa0d9d2744e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.mts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..89ba506bff13498352a95d3f39683d6d472f664d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts @@ -0,0 +1,2 @@ +export * from "./core/streaming.js"; +//# 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/@anthropic-ai/sdk/streaming.d.ts.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5f9f18e89c5102c5fe5cd9b9ee3435c55104aba7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.js new file mode 100644 index 0000000000000000000000000000000000000000..ecb28fca3a03bf270c67b43a752a0cb8315f1f75 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("./internal/tslib.js"); +/** @deprecated Import from ./core/streaming instead */ +tslib_1.__exportStar(require("./core/streaming.js"), exports); +//# 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/@anthropic-ai/sdk/streaming.js.map b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9cb042088370e7991b5b75b3a2f820c258f5d540 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.js.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,8DAAiC"} \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b2f19300430eb75c1a1fc7d5700ad0b6e7e69333 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8d0ec96f9e48c2f361197a0511349e58177d25e2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@esbuild/linux-x64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/linux-x64", + "version": "0.25.9", + "description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "linux" + ], + "cpu": [ + "x64" + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..232b5877afcb8515a79501239b1d567813681592 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2022 The Fastify Team + +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/@fastify/accept-negotiator/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4ec8b613bb5f58d4a7a75c714a9eee26a987437e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/README.md @@ -0,0 +1,52 @@ +# @fastify/accept-negotiator + + +[![CI](https://github.com/fastify/accept-negotiator/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/accept-negotiator/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/accept-negotiator.svg?style=flat)](https://www.npmjs.com/package/@fastify/accept-negotiator) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +A negotiator for accept-* headers. + +### Install +``` +npm i @fastify/accept-negotiator +``` + +### Usage + +The module exports a function that you can use for negotiating an accept-* header such as [`accept-encoding`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding). It takes 2 parameters: + +``` +negotiate(header, supportedValues) +``` + +- `header` (`string`, required) - The accept-header, e.g. accept-encoding +- `supportedValues` (`string[]`, required) - The values, which are supported + +```js +const negotiate = require('@fastify/accept-negotiator').negotiate +const encoding = negotiate('gzip, deflate, br', ['br']) +console.log(encoding) // 'br* +``` + +The module also exports a class that you can use for negotiating an accept-* header, and use caching for better performance. + + +``` +Negotiate(supportedValues) +``` + +- `supportedValues` (`string[]`, required) - The values, which are supported +- `cache` (`{ set: Function; get: Function; has: Function }`, optional) - A Cache-Store, e.g. ES6-Map or mnemonist LRUCache + +```js +const Negotiator = require('@fastify/accept-negotiator').Negotiator +const encodingNegotiator = new Negotiator({ supportedValues: ['br'], cache: new Map() }) + +const encoding = encodingNegotiator.negotiate('gzip, deflate, br') +console.log(encoding) // 'br* +``` + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7798845589db201df410ba4c215c03944e72bd1e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/index.js @@ -0,0 +1,170 @@ +'use strict' + +function Negotiator (options) { + if (!new.target) { + return new Negotiator(options) + } + + const { + supportedValues = [], + cache + } = (options && typeof options === 'object' && options) || {} + + this.supportedValues = supportedValues + + this.cache = cache +} + +Negotiator.prototype.negotiate = function (header) { + if (typeof header !== 'string') { + return null + } + if (!this.cache) { + return negotiate(header, this.supportedValues) + } + if (!this.cache.has(header)) { + this.cache.set(header, negotiate(header, this.supportedValues)) + } + return this.cache.get(header) +} + +function negotiate (header, supportedValues) { + if ( + !header || + !Array.isArray(supportedValues) || + supportedValues.length === 0 + ) { + return null + } + + if (header === '*') { + return supportedValues[0] + } + + let preferredEncoding = null + let preferredEncodingPriority = Infinity + let preferredEncodingQuality = 0 + + function processMatch (enc, quality) { + if (quality === 0 || preferredEncodingQuality > quality) { + return false + } + + const encoding = (enc === '*' && supportedValues[0]) || enc + const priority = supportedValues.indexOf(encoding) + if (priority === -1) { + return false + } + + if (priority === 0 && quality === 1) { + preferredEncoding = encoding + return true + } else if (preferredEncodingQuality < quality) { + preferredEncoding = encoding + preferredEncodingPriority = priority + preferredEncodingQuality = quality + } else if (preferredEncodingPriority > priority) { + preferredEncoding = encoding + preferredEncodingPriority = priority + preferredEncodingQuality = quality + } + return false + } + + parse(header, processMatch) + + return preferredEncoding +} + +const BEGIN = 0 +const TOKEN = 1 +const QUALITY = 2 +const END = 3 + +function parse (header, processMatch) { + let str = '' + let quality + let state = BEGIN + for (let i = 0, il = header.length; i < il; ++i) { + const char = header[i] + + if (char === ' ' || char === '\t') { + continue + } else if (char === ';') { + if (state === TOKEN) { + state = QUALITY + quality = '' + } + continue + } else if (char === ',') { + if (state === TOKEN) { + if (processMatch(str, 1)) { + state = END + break + } + state = BEGIN + str = '' + } else if (state === QUALITY) { + if (processMatch(str, parseFloat(quality) || 0)) { + state = END + break + } + state = BEGIN + str = '' + quality = '' + } + continue + } else if ( + state === QUALITY + ) { + if (char === 'q' || char === '=') { + continue + } else if ( + char === '.' || + char === '1' || + char === '0' || + char === '2' || + char === '3' || + char === '4' || + char === '5' || + char === '6' || + char === '7' || + char === '8' || + char === '9' + ) { + quality += char + continue + } + } else if (state === BEGIN) { + state = TOKEN + str += char + continue + } + if (state === TOKEN) { + const prevChar = header[i - 1] + if (prevChar === ' ' || prevChar === '\t') { + str = '' + } + str += char + continue + } + if (processMatch(str, parseFloat(quality) || 0)) { + state = END + break + } + state = BEGIN + str = char + quality = '' + } + + if (state === TOKEN) { + processMatch(str, 1) + } else if (state === QUALITY) { + processMatch(str, parseFloat(quality) || 0) + } +} + +module.exports = negotiate +module.exports.default = negotiate +module.exports.negotiate = negotiate +module.exports.Negotiator = Negotiator diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..96084b529ed415db3d606f8c8664e0ec14d88b0c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/package.json @@ -0,0 +1,77 @@ +{ + "name": "@fastify/accept-negotiator", + "version": "2.0.1", + "description": "a negotiator for the accept-headers", + "type": "commonjs", + "main": "index.js", + "types": "types/index.d.ts", + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:unit": "c8 --100 node --test", + "test:typescript": "tsd" + }, + "keywords": [ + "encoding", + "negotiator", + "accept-encoding", + "accept", + "http", + "header" + ], + "files": [ + "README.md", + "LICENSE", + "index.js", + "types/index.d.ts" + ], + "author": "Aras Abbasi ", + "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", + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@matteo.collina/tspl": "^0.1.1", + "benchmark": "2.1.4", + "c8": "^10.1.2", + "eslint": "^9.17.0", + "neostandard": "^0.12.0", + "tsd": "^0.31.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/accept-negotiator.git" + }, + "bugs": { + "url": "https://github.com/fastify/accept-negotiator/issues" + }, + "homepage": "https://github.com/fastify/accept-negotiator#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7ba9982ac976c47b5d38683e7a0adb3144cbd02 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts @@ -0,0 +1,17 @@ +type CacheStore = { set: (key: string, value: string) => CacheStore, get: (key: string) => string | undefined, has: (key: string) => boolean } + +type NegotiateFn = typeof negotiate + +declare namespace negotiate { + export class Negotiator { + constructor (options: { supportedValues: K[]; cache?: CacheStore }) + + negotiate (header: string): K | null + } + + export const negotiate: NegotiateFn + export { negotiate as default } +} + +declare function negotiate (header: string, supportedValues: K[]): K | null +export = negotiate diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.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/@fastify/ajv-compiler/.github/.stale.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.github/.stale.yml new file mode 100644 index 0000000000000000000000000000000000000000..2ee12691a4fc015ba9eea94b53f14c037dc8f164 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.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 \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.github/dependabot.yml b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.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/@fastify/ajv-compiler/.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/@fastify/ajv-compiler/.taprc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.taprc new file mode 100644 index 0000000000000000000000000000000000000000..7695d35cfa1d0e719b5f816000e440366f4c2f78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/.taprc @@ -0,0 +1,2 @@ +files: + - test/**/*.test.js \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7f6f482410494a28532f44ca8239ef863f36ea9d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) The Fastify Team + +The Fastify team members are listed at https://github.com/fastify/fastify#team +and in the README file. + +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/@fastify/ajv-compiler/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6186fe349f4f7d3702bd94a588c65b67aaabff8f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/README.md @@ -0,0 +1,237 @@ +# @fastify/ajv-compiler + +[![CI](https://github.com/fastify/ajv-compiler/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/ajv-compiler/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/ajv-compiler.svg?style=flat)](https://www.npmjs.com/package/@fastify/ajv-compiler) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +This module manages the [`ajv`](https://www.npmjs.com/package/ajv) instances for the Fastify framework. +It isolates the `ajv` dependency so that the AJV version is not tightly coupled to the Fastify version. +This allows the user to decide which version of AJV to use in their Fastify-based application. + + +## Versions + +| `@fastify/ajv-compiler` | `ajv` | Default in `fastify` | +|------------------------:|------:|---------------------:| +| v4.x | v8.x | ^5.x | +| v3.x | v8.x | ^4.x | +| v2.x | v8.x | - | +| v1.x | v6.x | ^3.14 | + +### AJV Configuration + +The Fastify's default [`ajv` options](https://github.com/ajv-validator/ajv/tree/v6#options) are: + +```js +{ + coerceTypes: 'array', + useDefaults: true, + removeAdditional: true, + uriResolver: require('fast-uri'), + addUsedSchema: false, + // Explicitly set allErrors to `false`. + // When set to `true`, a DoS attack is possible. + allErrors: false +} +``` + +Moreover, the [`ajv-formats`](https://www.npmjs.com/package/ajv-formats) module is included by default. +If you need to customize it, check the _usage_ section below. + +To customize the `ajv` options, see how in the [Fastify documentation](https://fastify.dev/docs/latest/Reference/Server/#ajv). + + +## Usage + +This module is already used as default by Fastify. +If you need to provide your server instance with a different version, refer to [the Fastify docs](https://fastify.dev/docs/latest/Reference/Server/#schemacontroller). + +### Customize the `ajv-formats` plugin + +The `format` keyword is not part of the official `ajv` module since v7. To use it, you need to install the `ajv-formats` module and this module +does it for you with the default configuration. + +If you need to configure the `ajv-formats` plugin you can do it using the standard Fastify configuration: + +```js +const app = fastify({ + ajv: { + plugins: [[require('ajv-formats'), { mode: 'fast' }]] + } +}) +``` + +In this way, your setup will have precedence over the `@fastify/ajv-compiler` default configuration. + +### Customize the `ajv` instance + +If you need to customize the `ajv` instance and take full control of its configuration, you can do it by +using the `onCreate` option in the Fastify configuration that accepts a synchronous function that receives the `ajv` instance: + +```js +const app = fastify({ + ajv: { + onCreate: (ajv) => { + // Modify the ajv instance as you need. + ajv.addFormat('myFormat', (data) => typeof data === 'string') + } + } +}) +``` + +### Fastify with JTD + +The [JSON Type Definition](https://jsontypedef.com/) feature is supported by AJV v8.x and you can benefit from it in your Fastify application. + +With Fastify v3.20.x and higher, you can use the `@fastify/ajv-compiler` module to load JSON Type Definitions like so: + +```js +const factory = require('@fastify/ajv-compiler')() + +const app = fastify({ + jsonShorthand: false, + ajv: { + customOptions: { }, // additional JTD options + mode: 'JTD' + }, + schemaController: { + compilersFactory: { + buildValidator: factory + } + } +}) +``` + +The default AJV JTD options are the same as [Fastify's default options](#AJV-Configuration). + +#### Fastify with JTD and serialization + +You can use JTD Schemas to serialize your response object too: + +```js +const factoryValidator = require('@fastify/ajv-compiler')() +const factorySerializer = require('@fastify/ajv-compiler')({ jtdSerializer: true }) + +const app = fastify({ + jsonShorthand: false, + ajv: { + customOptions: { }, // additional JTD options + mode: 'JTD' + }, + schemaController: { + compilersFactory: { + buildValidator: factoryValidator, + buildSerializer: factorySerializer + } + } +}) +``` + + +### AJV Standalone + +AJV v8 introduced a [standalone feature](https://ajv.js.org/standalone.html) that lets you pre-compile your schemas and use them in your application for a faster startup. + +To use this feature, you must be aware of the following: + +1. You must generate and save the application's compiled schemas. +2. Read the compiled schemas from the file and provide them back to your Fastify application. + + +#### Generate and save the compiled schemas + +Fastify helps you to generate the validation schemas functions and it is your choice to save them where you want. +To accomplish this, you must use a new compiler: `StandaloneValidator`. + +You must provide 2 parameters to this compiler: + +- `readMode: false`: a boolean to indicate that you want to generate the schemas functions string. +- `storeFunction`" a sync function that must store the source code of the schemas functions. You may provide an async function too, but you must manage errors. + +When `readMode: false`, **the compiler is meant to be used in development ONLY**. + + +```js +const { StandaloneValidator } = require('@fastify/ajv-compiler') +const factory = StandaloneValidator({ + readMode: false, + storeFunction (routeOpts, schemaValidationCode) { + // routeOpts is like: { schema, method, url, httpPart } + // schemaValidationCode is a string source code that is the compiled schema function + const fileName = generateFileName(routeOpts) + fs.writeFileSync(path.join(__dirname, fileName), schemaValidationCode) + } +}) + +const app = fastify({ + jsonShorthand: false, + schemaController: { + compilersFactory: { + buildValidator: factory + } + } +}) + +// ... add all your routes with schemas ... + +app.ready().then(() => { + // at this stage all your schemas are compiled and stored in the file system + // now it is important to turn off the readMode +}) +``` + +#### Read the compiled schemas functions + +At this stage, you should have a file for every route's schema. +To use them, you must use the `StandaloneValidator` with the parameters: + +- `readMode: true`: a boolean to indicate that you want to read and use the schemas functions string. +- `restoreFunction`" a sync function that must return a function to validate the route. + +Important keep away before you continue reading the documentation: + +- when you use the `readMode: true`, the application schemas are not compiled (they are ignored). So, if you change your schemas, you must recompile them! +- as you can see, you must relate the route's schema to the file name using the `routeOpts` object. You may use the `routeOpts.schema.$id` field to do so, it is up to you to define a unique schema identifier. + +```js +const { StandaloneValidator } = require('@fastify/ajv-compiler') +const factory = StandaloneValidator({ + readMode: true, + restoreFunction (routeOpts) { + // routeOpts is like: { schema, method, url, httpPart } + const fileName = generateFileName(routeOpts) + return require(path.join(__dirname, fileName)) + } +}) + +const app = fastify({ + jsonShorthand: false, + schemaController: { + compilersFactory: { + buildValidator: factory + } + } +}) + +// ... add all your routes with schemas as before... + +app.listen({ port: 3000 }) +``` + +### How it works + +This module provides a factory function to produce [Validator Compilers](https://fastify.dev/docs/latest/Reference/Server/#validatorcompiler) functions. + +The Fastify factory function is just one per server instance and it is called for every encapsulated context created by the application through the `fastify.register()` call. + +Every Validator Compiler produced has a dedicated AJV instance, so this factory will try to produce as less as possible AJV instances to reduce the memory footprint and the startup time. + +The variables involved to choose if a Validator Compiler can be reused are: + +- the AJV configuration: it is [one per server](https://fastify.dev/docs/latest/Reference/Server/#ajv) +- the external JSON schemas: once a new schema is added to a fastify's context, calling `fastify.addSchema()`, it will cause a new AJV initialization + + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a206582330dcda14bb680f1f6b79ddc3383f72da --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs @@ -0,0 +1,37 @@ +import cronometro from 'cronometro' + +import fjs from 'fast-json-stringify' +import AjvCompiler from '../index.js' + +const fjsSerialize = buildFJSSerializerFunction({ + type: 'object', + properties: { + hello: { type: 'string' }, + name: { type: 'string' } + } +}) +const ajvSerialize = buildAJVSerializerFunction({ + properties: { + hello: { type: 'string' }, + name: { type: 'string' } + } +}) + +await cronometro({ + 'fast-json-stringify': function () { + fjsSerialize({ hello: 'Ciao', name: 'Manuel' }) + }, + 'ajv serializer': function () { + ajvSerialize({ hello: 'Ciao', name: 'Manuel' }) + } +}) + +function buildFJSSerializerFunction (schema) { + return fjs(schema) +} + +function buildAJVSerializerFunction (schema) { + const factory = AjvCompiler({ jtdSerializer: true }) + const compiler = factory({}, { customOptions: {} }) + return compiler({ schema }) +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/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/@fastify/ajv-compiler/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/@fastify/ajv-compiler/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2274766bab959c39ed1c990b3170204af822b407 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/index.js @@ -0,0 +1,53 @@ +'use strict' + +const AjvReference = Symbol.for('fastify.ajv-compiler.reference') +const ValidatorCompiler = require('./lib/validator-compiler') +const SerializerCompiler = require('./lib/serializer-compiler') + +function AjvCompiler (opts) { + const validatorPool = new Map() + const serializerPool = new Map() + + if (opts && opts.jtdSerializer === true) { + return function buildSerializerFromPool (externalSchemas, serializerOpts) { + const uniqueAjvKey = getPoolKey({}, serializerOpts) + if (serializerPool.has(uniqueAjvKey)) { + return serializerPool.get(uniqueAjvKey) + } + + const compiler = new SerializerCompiler(externalSchemas, serializerOpts) + const ret = compiler.buildSerializerFunction.bind(compiler) + serializerPool.set(uniqueAjvKey, ret) + + return ret + } + } + + return function buildCompilerFromPool (externalSchemas, options) { + const uniqueAjvKey = getPoolKey(externalSchemas, options.customOptions) + if (validatorPool.has(uniqueAjvKey)) { + return validatorPool.get(uniqueAjvKey) + } + + const compiler = new ValidatorCompiler(externalSchemas, options) + const ret = compiler.buildValidatorFunction.bind(compiler) + validatorPool.set(uniqueAjvKey, ret) + + if (options.customOptions.code !== undefined) { + ret[AjvReference] = compiler + } + + return ret + } +} + +function getPoolKey (externalSchemas, options) { + const externals = JSON.stringify(externalSchemas) + const ajvConfig = JSON.stringify(options) + return `${externals}${ajvConfig}` +} +module.exports = AjvCompiler +module.exports.default = AjvCompiler +module.exports.AjvCompiler = AjvCompiler +module.exports.AjvReference = AjvReference +module.exports.StandaloneValidator = require('./standalone') diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/package.json new file mode 100644 index 0000000000000000000000000000000000000000..92d48a9c32847ceb5d217d5dd4d925b36ede09f7 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/package.json @@ -0,0 +1,84 @@ +{ + "name": "@fastify/ajv-compiler", + "version": "4.0.2", + "description": "Build and manage the AJV instances for the fastify framework", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "directories": { + "test": "test" + }, + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "unit": "tap", + "test": "npm run unit && npm run test:typescript", + "test:typescript": "tsd", + "ajv:compile": "ajv compile -s test/source.json -o test/validate_schema.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/ajv-compiler.git" + }, + "keywords": [ + "ajv", + "validator", + "schema", + "compiler", + "fastify" + ], + "author": "Manuel Spigolon (https://github.com/Eomm)", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@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/ajv-compiler/issues" + }, + "homepage": "https://github.com/fastify/ajv-compiler#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "ajv-cli": "^5.0.0", + "ajv-errors": "^3.0.0", + "ajv-i18n": "^4.2.0", + "ajv-merge-patch": "^5.0.1", + "cronometro": "^4.0.0", + "eslint": "^9.17.0", + "fastify": "^5.0.0", + "neostandard": "^0.12.0", + "require-from-string": "^2.0.2", + "sanitize-filename": "^1.6.3", + "tap": "^19.0.0", + "tsd": "^0.31.0" + }, + "dependencies": { + "ajv": "^8.12.0", + "ajv-formats": "^3.0.1", + "fast-uri": "^3.0.0" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/standalone.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/standalone.js new file mode 100644 index 0000000000000000000000000000000000000000..42428a0d66746fdf8a86a53f56c04b2994e0ba29 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/ajv-compiler/standalone.js @@ -0,0 +1,44 @@ +'use strict' + +const ValidatorSelector = require('./index') +const standaloneCode = require('ajv/dist/standalone').default + +function StandaloneValidator (options = { readMode: true }) { + if (options.readMode === true && !options.restoreFunction) { + throw new Error('You must provide a restoreFunction options when readMode ON') + } + + if (options.readMode !== true && !options.storeFunction) { + throw new Error('You must provide a storeFunction options when readMode OFF') + } + + if (options.readMode === true) { + // READ MODE: it behalf only in the restore function provided by the user + return function wrapper () { + return function (opts) { + return options.restoreFunction(opts) + } + } + } + + // WRITE MODE: it behalf on the default ValidatorSelector, wrapping the API to run the Ajv Standalone code generation + const factory = ValidatorSelector() + return function wrapper (externalSchemas, ajvOptions = {}) { + if (!ajvOptions.customOptions || !ajvOptions.customOptions.code) { + // to generate the validation source code, these options are mandatory + ajvOptions.customOptions = Object.assign({}, ajvOptions.customOptions, { code: { source: true } }) + } + + const compiler = factory(externalSchemas, ajvOptions) + return function (opts) { // { schema/*, method, url, httpPart */ } + const validationFunc = compiler(opts) + + const schemaValidationCode = standaloneCode(compiler[ValidatorSelector.AjvReference].ajv, validationFunc) + options.storeFunction(opts, schemaValidationCode) + + return validationFunc + } + } +} + +module.exports = StandaloneValidator diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.editorconfig b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..db87e1fb3f74f240d34c36c112c06adae84792eb --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..cad1c32e3deb59f649a90fb55994a7c6a0685f64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/.gitattributes @@ -0,0 +1,5 @@ +# Set the default behavior, in case people don't have core.autocrlf set +* text=auto + +# Require Unix line endings +* text eol=lf diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cebd3e423c211bdeb61d51b83a3fe5692894a76a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2018-present The Fastify team + +The Fastify team members are listed at https://github.com/fastify/fastify#team. + +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/@fastify/cors/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/README.md new file mode 100644 index 0000000000000000000000000000000000000000..271214c54e66e16ec9857d3b96631bba2c668920 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/README.md @@ -0,0 +1,198 @@ +# @fastify/cors + +[![CI](https://github.com/fastify/fastify-cors/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-cors/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/cors.svg?style=flat)](https://www.npmjs.com/package/@fastify/cors) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +`@fastify/cors` enables the use of [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) in a Fastify application. + +## Install +``` +npm i @fastify/cors +``` + +### Compatibility + +| Plugin version | Fastify version | +| ---------------|-----------------| +| `^11.x` | `^5.x` | +| `^10.x` | `^5.x` | +| `^8.x` | `^4.x` | +| `^7.x` | `^3.x` | +| `>=3.x <7.x` | `^2.x` | +| `>=1.x <3.x` | `^1.x` | + +Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin +in the table above. +See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details. + +## Usage +Require `@fastify/cors` and register it as any other plugin. It adds an `onRequest` hook and a [wildcard options route](https://github.com/fastify/fastify/issues/326#issuecomment-411360862). +```js +import Fastify from 'fastify' +import cors from '@fastify/cors' + +const fastify = Fastify() +await fastify.register(cors, { + // put your options here +}) + +fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) +}) + +await fastify.listen({ port: 3000 }) +``` +You can use it as is without passing any option or you can configure it as explained below. +### Options +* `origin`: Configures the **Access-Control-Allow-Origin** CORS header. The value of origin can be: + - `Boolean`: Set to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), or `false` to disable CORS. + - `String`: Set to a specific origin (e.g., `"http://example.com"`). The special `*` value (default) allows any origin. + - `RegExp`: Set to a regular expression pattern to test the request origin. If it matches, the request origin is reflected (e.g., `/example\.com$/` returns the origin only if it ends with `example.com`). + - `Array`: Set to an array of valid origins, each being a `String` or `RegExp` (e.g., `["http://example1.com", /\.example2\.com$/]`). + - `Function`: Set to a function with custom logic. The function takes the request origin as the first parameter and a callback as the second (signature `err [Error | null], origin`). *Async-await* and promises are supported. The Fastify instance is bound to the function call and can be accessed via `this`. For example: + ```js + origin: (origin, cb) => { + const hostname = new URL(origin).hostname + if(hostname === "localhost"){ + // Request from localhost will pass + cb(null, true) + return + } + // Generate an error on other origins, disabling access + cb(new Error("Not allowed"), false) + } + ``` +* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (e.g., 'GET,HEAD,POST') or an array (e.g., `['GET', 'HEAD', 'POST']`). Default: [CORS-safelisted methods](https://fetch.spec.whatwg.org/#methods) `GET,HEAD,POST`. +* `hook`: See [Custom Fastify hook name](#custom-fastify-hook-name). Default: `onRequest`. +* `allowedHeaders`: Configures the **Access-Control-Allow-Headers** CORS header. Expects a comma-delimited string (e.g., `'Content-Type,Authorization'`) or an array (e.g., `['Content-Type', 'Authorization']`). Defaults to reflecting the headers specified in the request's **Access-Control-Request-Headers** header if not specified. +* `exposedHeaders`: Configures the **Access-Control-Expose-Headers** CORS header. Expects a comma-delimited string (e.g., `'Content-Range,X-Content-Range'`) or an array (e.g., `['Content-Range', 'X-Content-Range']`). No custom headers are exposed if not specified. +* `credentials`: Configures the **Access-Control-Allow-Credentials** CORS header. Set to `true` to pass the header; otherwise, it is omitted. +* `maxAge`: Configures the **Access-Control-Max-Age** CORS header in seconds. Set to an integer to pass the header; otherwise, it is omitted. +* `cacheControl`: Configures the **Cache-Control** header for CORS preflight responses. Set to an integer to pass the header as `Cache-Control: max-age=${cacheControl}`, or set to a string to pass the header as `Cache-Control: ${cacheControl}`. Otherwise, the header is omitted. +* `preflightContinue`: Passes the CORS preflight response to the route handler. Default: `false`. +* `optionsSuccessStatus`: Provides a status code for successful `OPTIONS` requests, as some legacy browsers (IE11, various SmartTVs) choke on `204`. +* `preflight`: Disables preflight by passing `false`. Default: `true`. +* `strictPreflight`: Enforces strict requirements for the CORS preflight request headers (**Access-Control-Request-Method** and **Origin**) as defined by the [W3C CORS specification](https://www.w3.org/TR/2020/SPSD-cors-20200602/#resource-preflight-requests). Preflight requests without the required headers result in 400 errors when set to `true`. Default: `true`. +* `hideOptionsRoute`: Hides the options route from documentation built using [@fastify/swagger](https://github.com/fastify/fastify-swagger). Default: `true`. +* `logLevel`: Sets the Fastify log level **only** for the internal CORS pre-flight `OPTIONS *` route. + Pass `'silent'` to suppress these requests in your logs, or any valid Fastify + log level (`'trace'`, `'debug'`, `'info'`, `'warn'`, `'error'`, `'fatal'`). + Default: inherits Fastify’s global log level. + +#### :warning: DoS attacks + +Using `RegExp` or a `function` for the `origin` parameter may enable Denial of Service attacks. +Craft with extreme care. + +### Configuring CORS Asynchronously + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), (instance) => { + return (req, callback) => { + const corsOptions = { + // This is NOT recommended for production as it enables reflection exploits + origin: true + }; + + // do not include CORS headers for requests from localhost + if (/^localhost$/m.test(req.headers.origin)) { + corsOptions.origin = false + } + + // callback expects two parameters: error and options + callback(null, corsOptions) + } +}) + +fastify.register(async function (fastify) { + fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) + }) +}) + +fastify.listen({ port: 3000 }) +``` + +### Disabling CORS for a specific route + +CORS can be disabled at the route level by setting the `cors` option to `false`. + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), { origin: '*' }) + +fastify.get('/cors-enabled', (_req, reply) => { + reply.send('CORS headers') +}) + +fastify.get('/cors-disabled', { cors: false }, (_req, reply) => { + reply.send('No CORS headers') +}) + +fastify.listen({ port: 3000 }) +``` + +### Custom Fastify hook name + +By default, `@fastify/cors` adds an `onRequest` hook for validation and header injection. This can be customized by passing `hook` in the options. Valid values are `onRequest`, `preParsing`, `preValidation`, `preHandler`, `preSerialization`, and `onSend`. + +```js +import Fastify from 'fastify' +import cors from '@fastify/cors' + +const fastify = Fastify() +await fastify.register(cors, { + hook: 'preHandler', +}) + +fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) +}) + +await fastify.listen({ port: 3000 }) +``` + +To configure CORS asynchronously, provide an object with the `delegator` key: + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), { + hook: 'preHandler', + delegator: (req, callback) => { + const corsOptions = { + // This is NOT recommended for production as it enables reflection exploits + origin: true + }; + + // do not include CORS headers for requests from localhost + if (/^localhost$/m.test(req.headers.origin)) { + corsOptions.origin = false + } + + // callback expects two parameters: error and options + callback(null, corsOptions) + }, +}) + +fastify.register(async function (fastify) { + fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) + }) +}) + +fastify.listen({ port: 3000 }) +``` + +## Acknowledgments + +The code is a port for Fastify of [`expressjs/cors`](https://github.com/expressjs/cors). + +## License + +Licensed under [MIT](./LICENSE).
+[`expressjs/cors` license](https://github.com/expressjs/cors/blob/master/LICENSE) \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/bench.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/bench.js new file mode 100644 index 0000000000000000000000000000000000000000..30dd09a26e956a65601ccc7465a8d396e02600d2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/bench.js @@ -0,0 +1,17 @@ +'use strict' + +const fastify = require('fastify')() + +fastify.register((instance, _opts, next) => { + instance.register(require('./index')) + instance.get('/fastify', (_req, reply) => reply.send('ok')) + next() +}) + +fastify.register((instance, _opts, next) => { + instance.use(require('cors')()) + instance.get('/express', (_req, reply) => reply.send('ok')) + next() +}) + +fastify.listen({ port: 3000 }) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/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/@fastify/cors/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/@fastify/cors/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ca946f99e95060ff11b3fe36da9bc9a75577434b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/index.js @@ -0,0 +1,316 @@ +'use strict' + +const fp = require('fastify-plugin') +const { + addAccessControlRequestHeadersToVaryHeader, + addOriginToVaryHeader +} = require('./vary') + +const defaultOptions = { + origin: '*', + methods: 'GET,HEAD,POST', + hook: 'onRequest', + preflightContinue: false, + optionsSuccessStatus: 204, + credentials: false, + exposedHeaders: null, + allowedHeaders: null, + maxAge: null, + preflight: true, + strictPreflight: true +} + +const validHooks = [ + 'onRequest', + 'preParsing', + 'preValidation', + 'preHandler', + 'preSerialization', + 'onSend' +] + +const hookWithPayload = [ + 'preSerialization', + 'preParsing', + 'onSend' +] + +function validateHook (value, next) { + if (validHooks.indexOf(value) !== -1) { + return + } + next(new TypeError('@fastify/cors: Invalid hook option provided.')) +} + +function fastifyCors (fastify, opts, next) { + fastify.decorateRequest('corsPreflightEnabled', false) + + let hideOptionsRoute = true + let logLevel + + if (typeof opts === 'function') { + handleCorsOptionsDelegator(opts, fastify, { hook: defaultOptions.hook }, next) + } else if (opts.delegator) { + const { delegator, ...options } = opts + handleCorsOptionsDelegator(delegator, fastify, options, next) + } else { + const corsOptions = normalizeCorsOptions(opts) + validateHook(corsOptions.hook, next) + if (hookWithPayload.indexOf(corsOptions.hook) !== -1) { + fastify.addHook(corsOptions.hook, function handleCors (req, reply, _payload, next) { + addCorsHeadersHandler(fastify, corsOptions, req, reply, next) + }) + } else { + fastify.addHook(corsOptions.hook, function handleCors (req, reply, next) { + addCorsHeadersHandler(fastify, corsOptions, req, reply, next) + }) + } + } + if (opts.logLevel !== undefined) logLevel = opts.logLevel + if (opts.hideOptionsRoute !== undefined) hideOptionsRoute = opts.hideOptionsRoute + + // The preflight reply must occur in the hook. This allows fastify-cors to reply to + // preflight requests BEFORE possible authentication plugins. If the preflight reply + // occurred in this handler, other plugins may deny the request since the browser will + // remove most headers (such as the Authentication header). + // + // This route simply enables fastify to accept preflight requests. + + fastify.options('*', { schema: { hide: hideOptionsRoute }, logLevel }, (req, reply) => { + if (!req.corsPreflightEnabled) { + // Do not handle preflight requests if the origin option disabled CORS + reply.callNotFound() + return + } + + reply.send() + }) + + next() +} + +function handleCorsOptionsDelegator (optionsResolver, fastify, opts, next) { + const hook = opts?.hook || defaultOptions.hook + validateHook(hook, next) + if (optionsResolver.length === 2) { + if (hookWithPayload.indexOf(hook) !== -1) { + fastify.addHook(hook, function handleCors (req, reply, _payload, next) { + handleCorsOptionsCallbackDelegator(optionsResolver, fastify, req, reply, next) + }) + } else { + fastify.addHook(hook, function handleCors (req, reply, next) { + handleCorsOptionsCallbackDelegator(optionsResolver, fastify, req, reply, next) + }) + } + } else { + if (hookWithPayload.indexOf(hook) !== -1) { + // handle delegator based on Promise + fastify.addHook(hook, function handleCors (req, reply, _payload, next) { + const ret = optionsResolver(req) + if (ret && typeof ret.then === 'function') { + ret.then(options => addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next)).catch(next) + return + } + next(new Error('Invalid CORS origin option')) + }) + } else { + // handle delegator based on Promise + fastify.addHook(hook, function handleCors (req, reply, next) { + const ret = optionsResolver(req) + if (ret && typeof ret.then === 'function') { + ret.then(options => addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next)).catch(next) + return + } + next(new Error('Invalid CORS origin option')) + }) + } + } +} + +function handleCorsOptionsCallbackDelegator (optionsResolver, fastify, req, reply, next) { + optionsResolver(req, (err, options) => { + if (err) { + next(err) + } else { + addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next) + } + }) +} + +/** + * @param {import('./types').FastifyCorsOptions} opts + */ +function normalizeCorsOptions (opts, dynamic) { + const corsOptions = { ...defaultOptions, ...opts } + if (Array.isArray(opts.origin) && opts.origin.indexOf('*') !== -1) { + corsOptions.origin = '*' + } + if (Number.isInteger(corsOptions.cacheControl)) { + // integer numbers are formatted this way + corsOptions.cacheControl = `max-age=${corsOptions.cacheControl}` + } else if (typeof corsOptions.cacheControl !== 'string') { + // strings are applied directly and any other value is ignored + corsOptions.cacheControl = null + } + corsOptions.dynamic = dynamic || false + return corsOptions +} + +function addCorsHeadersHandler (fastify, options, req, reply, next) { + if ((typeof options.origin !== 'string' && options.origin !== false) || options.dynamic) { + // Always set Vary header for non-static origin option + // https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches + addOriginToVaryHeader(reply) + } + + const resolveOriginOption = typeof options.origin === 'function' ? resolveOriginWrapper(fastify, options.origin) : (_, cb) => cb(null, options.origin) + + resolveOriginOption(req, (error, resolvedOriginOption) => { + if (error !== null) { + return next(error) + } + + // Disable CORS and preflight if false + if (resolvedOriginOption === false) { + return next() + } + + // Allow routes to disable CORS individually + if (req.routeOptions.config?.cors === false) { + return next() + } + + // Falsy values are invalid + if (!resolvedOriginOption) { + return next(new Error('Invalid CORS origin option')) + } + + addCorsHeaders(req, reply, resolvedOriginOption, options) + + if (req.raw.method === 'OPTIONS' && options.preflight === true) { + // Strict mode enforces the required headers for preflight + if (options.strictPreflight === true && (!req.headers.origin || !req.headers['access-control-request-method'])) { + reply.status(400).type('text/plain').send('Invalid Preflight Request') + return + } + + req.corsPreflightEnabled = true + + addPreflightHeaders(req, reply, options) + + if (!options.preflightContinue) { + // Do not call the hook callback and terminate the request + // Safari (and potentially other browsers) need content-length 0, + // for 204 or they just hang waiting for a body + reply + .code(options.optionsSuccessStatus) + .header('Content-Length', '0') + .send() + return + } + } + + return next() + }) +} + +function addCorsHeaders (req, reply, originOption, corsOptions) { + const origin = getAccessControlAllowOriginHeader(req.headers.origin, originOption) + // In the case of origin not allowed the header is not + // written in the response. + // https://github.com/fastify/fastify-cors/issues/127 + if (origin) { + reply.header('Access-Control-Allow-Origin', origin) + } + + if (corsOptions.credentials) { + reply.header('Access-Control-Allow-Credentials', 'true') + } + + if (corsOptions.exposedHeaders !== null) { + reply.header( + 'Access-Control-Expose-Headers', + Array.isArray(corsOptions.exposedHeaders) ? corsOptions.exposedHeaders.join(', ') : corsOptions.exposedHeaders + ) + } +} + +function addPreflightHeaders (req, reply, corsOptions) { + reply.header( + 'Access-Control-Allow-Methods', + Array.isArray(corsOptions.methods) ? corsOptions.methods.join(', ') : corsOptions.methods + ) + + if (corsOptions.allowedHeaders === null) { + addAccessControlRequestHeadersToVaryHeader(reply) + const reqAllowedHeaders = req.headers['access-control-request-headers'] + if (reqAllowedHeaders !== undefined) { + reply.header('Access-Control-Allow-Headers', reqAllowedHeaders) + } + } else { + reply.header( + 'Access-Control-Allow-Headers', + Array.isArray(corsOptions.allowedHeaders) ? corsOptions.allowedHeaders.join(', ') : corsOptions.allowedHeaders + ) + } + + if (corsOptions.maxAge !== null) { + reply.header('Access-Control-Max-Age', String(corsOptions.maxAge)) + } + + if (corsOptions.cacheControl) { + reply.header('Cache-Control', corsOptions.cacheControl) + } +} + +function resolveOriginWrapper (fastify, origin) { + return function (req, cb) { + const result = origin.call(fastify, req.headers.origin, cb) + + // Allow for promises + if (result && typeof result.then === 'function') { + result.then(res => cb(null, res), cb) + } + } +} + +function getAccessControlAllowOriginHeader (reqOrigin, originOption) { + if (typeof originOption === 'string') { + // fixed or any origin ('*') + return originOption + } + + // reflect origin + return isRequestOriginAllowed(reqOrigin, originOption) ? reqOrigin : false +} + +function isRequestOriginAllowed (reqOrigin, allowedOrigin) { + if (Array.isArray(allowedOrigin)) { + for (let i = 0; i < allowedOrigin.length; ++i) { + if (isRequestOriginAllowed(reqOrigin, allowedOrigin[i])) { + return true + } + } + return false + } else if (typeof allowedOrigin === 'string') { + return reqOrigin === allowedOrigin + } else if (allowedOrigin instanceof RegExp) { + allowedOrigin.lastIndex = 0 + return allowedOrigin.test(reqOrigin) + } else { + return !!allowedOrigin + } +} + +const _fastifyCors = fp(fastifyCors, { + fastify: '5.x', + name: '@fastify/cors' +}) + +/** + * These export configurations enable JS and TS developers + * to consumer fastify in whatever way best suits their needs. + */ +module.exports = _fastifyCors +module.exports.fastifyCors = _fastifyCors +module.exports.default = _fastifyCors diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/package.json new file mode 100644 index 0000000000000000000000000000000000000000..08be4c7c6f67d5a8a05fbe418c103f9afb330071 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/package.json @@ -0,0 +1,86 @@ +{ + "name": "@fastify/cors", + "version": "11.1.0", + "description": "Fastify CORS", + "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:typescript", + "test:typescript": "tsd", + "test:unit": "c8 --100 node --test" + }, + "keywords": [ + "fastify", + "cors", + "headers", + "access", + "control" + ], + "author": "Tomas Della Vedova - @delvedor (http://delved.org)", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Manuel Spigolon", + "email": "behemoth89@gmail.com" + }, + { + "name": "Cemre Mengu", + "email": "cemremengu@gmail.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-cors.git" + }, + "bugs": { + "url": "https://github.com/fastify/fastify-cors/issues" + }, + "homepage": "https://github.com/fastify/fastify-cors#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^24.0.8", + "c8": "^10.1.2", + "cors": "^2.8.5", + "eslint": "^9.17.0", + "fastify": "^5.0.0", + "neostandard": "^0.12.0", + "tsd": "^0.32.0", + "typescript": "~5.8.2" + }, + "dependencies": { + "fastify-plugin": "^5.0.0", + "toad-cache": "^3.7.0" + }, + "tsd": { + "directory": "test" + }, + "publishConfig": { + "access": "public" + }, + "pre-commit": [ + "lint", + "test" + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/vary.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/vary.js new file mode 100644 index 0000000000000000000000000000000000000000..73b3551e7071cd5decd34582f1c4b221216a37f2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/cors/vary.js @@ -0,0 +1,116 @@ +'use strict' + +const { FifoMap: FifoCache } = require('toad-cache') + +/** + * Field Value Components + * Most HTTP header field values are defined using common syntax + * components (token, quoted-string, and comment) separated by + * whitespace or specific delimiting characters. Delimiters are chosen + * from the set of US-ASCII visual characters not allowed in a token + * (DQUOTE and "(),/:;<=>?@[\]{}"). + * + * field-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 + */ + +const validFieldnameRE = /^[!#$%&'*+\-.^\w`|~]+$/u +function validateFieldname (fieldname) { + if (validFieldnameRE.test(fieldname) === false) { + throw new TypeError('Fieldname contains invalid characters.') + } +} + +function parse (header) { + header = header.trim().toLowerCase() + const result = [] + + if (header.length === 0) { + // pass through + } else if (header.indexOf(',') === -1) { + result.push(header) + } else { + const il = header.length + let i = 0 + let pos = 0 + let char + + // tokenize the header + for (i; i < il; ++i) { + char = header[i] + // when we have whitespace set the pos to the next position + if (char === ' ') { + pos = i + 1 + // `,` is the separator of vary-values + } else if (char === ',') { + // if pos and current position are not the same we have a valid token + if (pos !== i) { + result.push(header.slice(pos, i)) + } + // reset the positions + pos = i + 1 + } + } + + if (pos !== i) { + result.push(header.slice(pos, i)) + } + } + + return result +} + +function createAddFieldnameToVary (fieldname) { + const headerCache = new FifoCache(1000) + + validateFieldname(fieldname) + + return function (reply) { + let header = reply.getHeader('Vary') + + if (!header) { + reply.header('Vary', fieldname) + return + } + + if (header === '*') { + return + } + + if (fieldname === '*') { + reply.header('Vary', '*') + return + } + + if (Array.isArray(header)) { + header = header.join(', ') + } + + if (headerCache.get(header) === undefined) { + const vals = parse(header) + + if (vals.indexOf('*') !== -1) { + headerCache.set(header, '*') + } else if (vals.indexOf(fieldname.toLowerCase()) === -1) { + headerCache.set(header, header + ', ' + fieldname) + } else { + headerCache.set(header, null) + } + } + const cached = headerCache.get(header) + if (cached !== null) { + reply.header('Vary', cached) + } + } +} + +module.exports.createAddFieldnameToVary = createAddFieldnameToVary +module.exports.addOriginToVaryHeader = createAddFieldnameToVary('Origin') +module.exports.addAccessControlRequestHeadersToVaryHeader = createAddFieldnameToVary('Access-Control-Request-Headers') +module.exports.parse = parse diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/.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/@fastify/error/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..08250b880441a047520f6d39ee6b08c6bcee2220 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 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/@fastify/error/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94814fe686890e199320bea2980fde24b2182d81 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/README.md @@ -0,0 +1,140 @@ +# @fastify/error + +[![CI](https://github.com/fastify/fastify-error/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-error/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/error.svg?style=flat)](https://www.npmjs.com/package/@fastify/error) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins. + +### Install +``` +npm i @fastify/error +``` + +### Usage + +The module exports a function that you can use for consistent error objects, it takes 4 parameters: + +```js +createError(code, message [, statusCode [, Base [, captureStackTrace]]]) +``` + +- `code` (`string`, required) - The error code, you can access it later with `error.code`. For consistency, we recommend prefixing plugin error codes with `FST_` +- `message` (`string`, required) - The error message. You can also use interpolated strings for formatting the message. +- `statusCode` (`number`, optional) - The status code that Fastify will use if the error is sent via HTTP. +- `Base` (`ErrorConstructor`, optional) - The base error object that will be used. (eg `TypeError`, `RangeError`) +- `captureStackTrace` (`boolean`, optional) - Whether to capture the stack trace or not. + +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello') +console.log(new CustomError()) // error.message => 'Hello' +``` + +How to use an interpolated string: +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s') +console.log(new CustomError('world')) // error.message => 'Hello world' +``` + +How to add cause: +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s') +console.log(new CustomError('world', {cause: new Error('cause')})) +// error.message => 'Hello world' +// error.cause => Error('cause') +``` + +### TypeScript + +It is possible to limit your error constructor with a generic type using TypeScript: + +```ts +const CustomError = createError<[string]>('ERROR_CODE', 'Hello %s') +new CustomError('world') +//@ts-expect-error +new CustomError(1) +``` + +### instanceof + +All errors created with `createError` will be instances of the base error constructor you provided, or `Error` if none was provided. + +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const customError = new CustomError('world') + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof TypeError) // true +console.log(customError instanceof Error) // true +``` + +All instantiated errors are instances of the `FastifyError` class, which can be required directly from the module. + +```js +const { createError, FastifyError } = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const customError = new CustomError('world') + +console.log(customError instanceof FastifyError) // true +``` + +A `FastifyError` created by `createError` can extend another `FastifyError` while maintaining correct `instanceof` behavior. + +```js +const { createError, FastifyError } = require('@fastify/error') + +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const ChildCustomError = createError('CHILD_ERROR_CODE', 'Hello %s', 500, CustomError) + +const customError = new ChildCustomError('world') + +console.log(customError instanceof ChildCustomError) // true +console.log(customError instanceof CustomError) // true +console.log(customError instanceof FastifyError) // true +console.log(customError instanceof TypeError) // true +console.log(customError instanceof Error) // true +``` + +If `fastify-error` is installed multiple times directly or as a transitive dependency, `instanceof` checks for errors created by `createError` will still work correctly across these installations, as long as their error codes (e.g., `FST_ERR_CUSTOM_ERROR`) are identical. + +```js +const { createError, FastifyError } = require('@fastify/error') + +// CustomError from `@fastify/some-plugin` is created with `createError` and +// has its own `@fastify/error` installation as dependency. CustomError has +// FST_ERR_CUSTOM_ERROR as code. +const { CustomError: CustomErrorFromPlugin } = require('@fastify/some-plugin') + +const CustomError = createError('FST_ERR_CUSTOM_ERROR', 'Hello %s', 500) + +const customError = new CustomError('world') +const customErrorFromPlugin = new CustomErrorFromPlugin('world') + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof CustomErrorFromPlugin) // true +console.log(customErrorFromPlugin instanceof CustomError) // true +console.log(customErrorFromPlugin instanceof CustomErrorFromPlugin) // true +``` + +Changing the code of an instantiated Error will not change the result of the `instanceof` operator. + +```js +const { createError, FastifyError } = require('@fastify/error') + +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const AnotherCustomError = createError('ANOTHER_ERROR_CODE', 'Hello %s', 500, CustomError) + +const customError = new CustomError('world') +customError.code = 'ANOTHER_ERROR_CODE' + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof AnotherCustomError) // false +``` + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/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/@fastify/error/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/@fastify/error/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4d8da8e5e15cdf3f3457965067687c3c54a15b99 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/index.js @@ -0,0 +1,100 @@ +'use strict' + +const { format } = require('node:util') + +function toString () { + return `${this.name} [${this.code}]: ${this.message}` +} + +const FastifyGenericErrorSymbol = Symbol.for('fastify-error-generic') + +function createError (code, message, statusCode = 500, Base = Error, captureStackTrace = createError.captureStackTrace) { + const shouldCreateFastifyGenericError = code === FastifyGenericErrorSymbol + + if (shouldCreateFastifyGenericError) { + code = 'FST_ERR' + } + + if (!code) throw new Error('Fastify error code must not be empty') + if (!message) throw new Error('Fastify error message must not be empty') + + code = code.toUpperCase() + !statusCode && (statusCode = undefined) + + const FastifySpecificErrorSymbol = Symbol.for(`fastify-error ${code}`) + + function FastifyError (...args) { + if (!new.target) { + return new FastifyError(...args) + } + + this.code = code + this.name = 'FastifyError' + this.statusCode = statusCode + + const lastElement = args.length - 1 + if (lastElement !== -1 && args[lastElement] && typeof args[lastElement] === 'object' && 'cause' in args[lastElement]) { + this.cause = args.pop().cause + } + + this.message = format(message, ...args) + + Error.stackTraceLimit && captureStackTrace && Error.captureStackTrace(this, FastifyError) + } + + FastifyError.prototype = Object.create(Base.prototype, { + constructor: { + value: FastifyError, + enumerable: false, + writable: true, + configurable: true + }, + [FastifyGenericErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + }, + [FastifySpecificErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + } + }) + + if (shouldCreateFastifyGenericError) { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value (instance) { + return instance && instance[FastifyGenericErrorSymbol] + }, + configurable: false, + writable: false, + enumerable: false + }) + } else { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value (instance) { + return instance && instance[FastifySpecificErrorSymbol] + }, + configurable: false, + writable: false, + enumerable: false + }) + } + + FastifyError.prototype[Symbol.toStringTag] = 'Error' + + FastifyError.prototype.toString = toString + + return FastifyError +} + +createError.captureStackTrace = true + +const FastifyErrorConstructor = createError(FastifyGenericErrorSymbol, 'Fastify Error', 500, Error) + +module.exports = createError +module.exports.FastifyError = FastifyErrorConstructor +module.exports.default = createError +module.exports.createError = createError diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9a9beb89181430aaedec7ddd002272a9916895c3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/error/package.json @@ -0,0 +1,75 @@ +{ + "name": "@fastify/error", + "version": "4.2.0", + "description": "A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.", + "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:typescript", + "test:unit": "c8 --100 node --test", + "test:typescript": "tsd" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-error.git" + }, + "keywords": [ + "fastify", + "error", + "utility", + "plugin" + ], + "author": "Tomas Della Vedova", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "James Sumners", + "url": "https://james.sumners.info" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/fastify-error/issues" + }, + "homepage": "https://github.com/fastify/fastify-error#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "benchmark": "^2.1.4", + "c8": "^10.1.2", + "eslint": "^9.17.0", + "neostandard": "^0.12.0", + "tsd": "^0.32.0" + }, + "tsd": { + "compilerOptions": { + "esModuleInterop": true + } + }, + "publishConfig": { + "access": "public" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.eslintrc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..185ff2ec247992d88eb49b8581f20d8676c859f1 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.eslintrc @@ -0,0 +1 @@ +{"extends": "standard"} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/.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/@fastify/fast-json-stringify-compiler/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5559f4f5474ede095fe90f128023a7c9dfeb75bc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 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/@fastify/fast-json-stringify-compiler/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dcc1ecd6ba7d8b7be4e680ced6e2a19d6e6060b3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/README.md @@ -0,0 +1,128 @@ +# @fastify/fast-json-stringify-compiler + +[![CI](https://github.com/fastify/fast-json-stringify-compiler/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fast-json-stringify-compiler/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/fast-json-stringify-compiler.svg?style=flat)](https://www.npmjs.com/package/@fastify/fast-json-stringify-compiler) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +Build and manage the [`fast-json-stringify`](https://www.npmjs.com/package/fast-json-stringify) instances for the Fastify framework. +This package is responsible for compiling the application's `response` JSON schemas into optimized functions to speed up the response time. + +## Versions + +| `@fastify/fast-json-stringify-compiler` | `fast-json-stringify` | Supported `fastify` | +|----------------------------------------:|----------------------:|--------------------:| +| v1.x | v3.x | ^3.x | +| v2.x | v3.x | ^4.x | +| v3.x | v4.x | ^4.x | +| v4.x | v5.x | ^5.x | + +### fast-json-stringify Configuration + +The `fast-json-stringify` configuration is the default one. You can check the default settings in the [`fast-json-stringify` option](https://github.com/fastify/fast-json-stringify/#options) documentation. + +You can also override the default configuration by passing the [`serializerOpts`](https://fastify.dev/docs/latest/Reference/Server/#serializeropts) configuration to the Fastify instance. + +## Usage + +This module is already used as default by Fastify. +If you need to provide to your server instance a different version, refer to [the official doc](https://fastify.dev/docs/latest/Reference/Server/#schemacontroller). + +### fast-json-stringify Standalone + +`fast-json-stringify@v4.1.0` introduces the [standalone feature](https://github.com/fastify/fast-json-stringify#standalone) that lets you pre-compile your schemas and use them in your application for a faster startup. + +To use this feature, you must be aware of the following: + +1. You must generate and save the application's compiled schemas. +2. Read the compiled schemas from the file and provide them back to your Fastify application. + + +#### Generate and save the compiled schemas + +Fastify helps you to generate the serialization schemas functions and it is your choice to save them where you want. +To accomplish this, you must use a new compiler: `@fastify/fast-json-stringify-compiler/standalone`. + +You must provide 2 parameters to this compiler: + +- `readMode: false`: a boolean to indicate that you want to generate the schemas functions string. +- `storeFunction`" a sync function that must store the source code of the schemas functions. You may provide an async function too, but you must manage errors. + +When `readMode: false`, **the compiler is meant to be used in development ONLY**. + + +```js +const { StandaloneSerializer } = require('@fastify/fast-json-stringify-compiler') + +const factory = StandaloneSerializer({ + readMode: false, + storeFunction (routeOpts, schemaSerializationCode) { + // routeOpts is like: { schema, method, url, httpStatus } + // schemaSerializationCode is a string source code that is the compiled schema function + const fileName = generateFileName(routeOpts) + fs.writeFileSync(path.join(__dirname, fileName), schemaSerializationCode) + } +}) + +const app = fastify({ + jsonShorthand: false, + schemaController: { + compilersFactory: { + buildSerializer: factory + } + } +}) + +// ... add all your routes with schemas ... + +app.ready().then(() => { + // at this stage all your schemas are compiled and stored in the file system + // now it is important to turn off the readMode +}) +``` + +#### Read the compiled schemas functions + +At this stage, you should have a file for every route's schema. +To use them, you must use the `@fastify/fast-json-stringify-compiler/standalone` with the parameters: + +- `readMode: true`: a boolean to indicate that you want to read and use the schemas functions string. +- `restoreFunction`" a sync function that must return a function to serialize the route's payload. + +Important keep away before you continue reading the documentation: + +- when you use the `readMode: true`, the application schemas are not compiled (they are ignored). So, if you change your schemas, you must recompile them! +- as you can see, you must relate the route's schema to the file name using the `routeOpts` object. You may use the `routeOpts.schema.$id` field to do so, it is up to you to define a unique schema identifier. + +```js +const { StandaloneSerializer } = require('@fastify/fast-json-stringify-compiler') + +const factory = StandaloneSerializer({ + readMode: true, + restoreFunction (routeOpts) { + // routeOpts is like: { schema, method, url, httpStatus } + const fileName = generateFileName(routeOpts) + return require(path.join(__dirname, fileName)) + } +}) + +const app = fastify({ + jsonShorthand: false, + schemaController: { + compilersFactory: { + buildSerializer: factory + } + } +}) + +// ... add all your routes with schemas as before... + +app.listen({ port: 3000 }) +``` + +### How it works + +This module provides a factory function to produce [Serializer Compilers](https://fastify.dev/docs/latest/Reference/Server/#serializercompiler) functions. + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/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/@fastify/fast-json-stringify-compiler/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/@fastify/fast-json-stringify-compiler/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9323c971a1d4da1cf1b95f244fa2d3b7263673a6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/index.js @@ -0,0 +1,8 @@ +'use strict' + +const { SerializerSelector, StandaloneSerializer } = require('./standalone') + +module.exports = SerializerSelector +module.exports.default = SerializerSelector +module.exports.SerializerSelector = SerializerSelector +module.exports.StandaloneSerializer = StandaloneSerializer diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cc104b7c4ff802cda367b2ed32ed9a500fc13637 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/package.json @@ -0,0 +1,71 @@ +{ + "name": "@fastify/fast-json-stringify-compiler", + "description": "Build and manage the fast-json-stringify instances for the fastify framework", + "version": "5.0.3", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "unit": "c8 --100 node --test", + "test": "npm run unit && npm run test:typescript", + "test:typescript": "tsd" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fast-json-stringify-compiler.git" + }, + "keywords": [], + "author": "Manuel Spigolon (https://github.com/Eomm)", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@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/fast-json-stringify-compiler/issues" + }, + "homepage": "https://github.com/fastify/fast-json-stringify-compiler#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "c8": "^10.1.3", + "eslint": "^9.17.0", + "fastify": "^5.0.0", + "neostandard": "^0.12.0", + "sanitize-filename": "^1.6.3", + "tsd": "^0.31.0" + }, + "pre-commit": [ + "lint", + "test" + ], + "dependencies": { + "fast-json-stringify": "^6.0.0" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/standalone.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/standalone.js new file mode 100644 index 0000000000000000000000000000000000000000..7f0d40ae219c8adaf6b6487a1874b98dc899d82d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/standalone.js @@ -0,0 +1,58 @@ +'use strict' + +const fastJsonStringify = require('fast-json-stringify') + +function SerializerSelector () { + return function buildSerializerFactory (externalSchemas, serializerOpts) { + const fjsOpts = Object.assign({}, serializerOpts, { schema: externalSchemas }) + return responseSchemaCompiler.bind(null, fjsOpts) + } +} + +function responseSchemaCompiler (fjsOpts, { schema /* method, url, httpStatus */ }) { + if (fjsOpts.schema && schema.$id && fjsOpts.schema[schema.$id]) { + fjsOpts.schema = { ...fjsOpts.schema } + delete fjsOpts.schema[schema.$id] + } + return fastJsonStringify(schema, fjsOpts) +} + +function StandaloneSerializer (options = { readMode: true }) { + if (options.readMode === true && typeof options.restoreFunction !== 'function') { + throw new Error('You must provide a function for the restoreFunction-option when readMode ON') + } + + if (options.readMode !== true && typeof options.storeFunction !== 'function') { + throw new Error('You must provide a function for the storeFunction-option when readMode OFF') + } + + if (options.readMode === true) { + // READ MODE: it behalf only in the restore function provided by the user + return function wrapper () { + return function (opts) { + return options.restoreFunction(opts) + } + } + } + + // WRITE MODE: it behalf on the default SerializerSelector, wrapping the API to run the Ajv Standalone code generation + const factory = SerializerSelector() + return function wrapper (externalSchemas, serializerOpts = {}) { + // to generate the serialization source code, this option is mandatory + serializerOpts.mode = 'standalone' + + const compiler = factory(externalSchemas, serializerOpts) + return function (opts) { // { schema/*, method, url, httpPart */ } + const serializeFuncCode = compiler(opts) + + options.storeFunction(opts, serializeFuncCode) + + // eslint-disable-next-line no-new-func + return new Function(serializeFuncCode) + } + } +} + +module.exports.SerializerSelector = SerializerSelector +module.exports.StandaloneSerializer = StandaloneSerializer +module.exports.default = StandaloneSerializer diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..acf869fa53b0fa8f652e4b451c1e76180e19757d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2021 Fastify collaborators +Copyright (c) 2014-2017 Douglas Christopher Wilson + +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/@fastify/forwarded/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3995c93ffd32b04d12a1d525a4ef17d4836e254a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/README.md @@ -0,0 +1,43 @@ +# @fastify/forwarded + +![CI](https://github.com/fastify/forwarded/workflows/CI/badge.svg) +[![NPM version](https://img.shields.io/npm/v/@fastify/forwarded.svg?style=flat)](https://www.npmjs.com/package/@fastify/forwarded) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) + +Parse HTTP X-Forwarded-For header. + +Updated version of the great https://github.com/jshttp/forwarded. +Implements https://github.com/jshttp/forwarded/pull/9. + +## Installation + +```sh +$ npm i @fastify/forwarded +``` + +## API + +```js +var forwarded = require('@fastify/forwarded') +``` + +### forwarded(req) + +```js +var addresses = forwarded(req) +``` + +Parse the `X-Forwarded-For` header from the request. Returns an array +of the addresses, including the socket address for the `req`, in reverse +order (i.e. index `0` is the socket address and the last index is the +furthest address, typically the end-user). + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9b7285faefaf81c8d1e2bba35d91bff5147a467f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/index.js @@ -0,0 +1,59 @@ +/*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Get all addresses in the request used in the `X-Forwarded-For` header. + */ +function forwarded (req) { + if (!req) { + throw new TypeError('argument req is required') + } + + const header = req.headers['x-forwarded-for'] + const socketAddr = req.socket.remoteAddress + + if (!header || typeof header !== 'string') { + return [socketAddr] + } else if (header.indexOf(',') === -1) { + const remote = header.trim() + return (remote.length) + ? [socketAddr, remote] + : [socketAddr] + } else { + return parse(header, socketAddr) + } +} + +function parse (header, socketAddr) { + const result = [socketAddr] + + let end = header.length + let start = end + let char + let i + + for (i = end - 1; i >= 0; --i) { + char = header[i] + if (char === ' ') { + (start === end) && (start = end = i) + } else if (char === ',') { + (start !== end) && result.push(header.slice(start, end)) + start = end = i + } else { + start = i + } + } + + (start !== end) && result.push(header.substring(start, end)) + + return result +} + +module.exports = forwarded +module.exports.default = forwarded +module.exports.forwarded = forwarded diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/package.json new file mode 100644 index 0000000000000000000000000000000000000000..67666322ba31d525b1e183f5d8664ea715ba6fe0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/forwarded/package.json @@ -0,0 +1,48 @@ +{ + "name": "@fastify/forwarded", + "description": "Parse HTTP X-Forwarded-For header", + "version": "3.0.0", + "type": "commonjs", + "contributors": [ + "Matteo Collina ", + "Douglas Christopher Wilson ", + "Aras Abbasi + +## Installation + +```bash +npm i @fastify/merge-json-schemas +``` + + + +## Usage + +```javascript +const assert = require('node:assert') +const { mergeSchemas } = require('@fastify/merge-json-schemas'); + +const schema1 = { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1', 'foo2'] }, + bar: { type: 'string', minLength: 3 } + } +} + +const schema2 = { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1', 'foo3'] }, + bar: { type: 'string', minLength: 5 } + }, + required: ['foo'] +} + +const mergedSchema = mergeSchemas([schema1, schema2]) +assert.deepStrictEqual(mergedSchema, { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1'] }, + bar: { type: 'string', minLength: 5 } + }, + required: ['foo'] +}) +``` + + + +## API + + + +#### mergeSchemas(schemas, options) + +Builds a logical conjunction (AND) of multiple [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction). + +- `schemas` __\__ - list of JSON schemas to merge +- `options` __\__ - optional options + - `resolvers` __\__ - custom resolvers for JSON schema keywords. Each key is the name of a JSON schema keyword. Each value is a resolver function. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options) + - `defaultResolver` __\__ - custom default resolver for JSON schema keywords. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options) + - `onConflict` __\__ - action to take when a conflict is found. Used by the default `defaultResolver`. Default is `throw`. Possible values are: + - `throw` - throws an error multiple different schemas for the same keyword are found + - `ignore` - do nothing if multiple different schemas for the same keyword are found + - `first` - use the value of the first schema if multiple different schemas for the same keyword are found + +#### resolvers + +A list of default resolvers that __merge-json-schema__ uses to merge JSON schemas. You can override the default resolvers by passing a list of custom resolvers in the `options` argument of `mergeSchemas`. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options). + +#### defaultResolver + +A default resolver that __merge-json-schema__ uses to merge JSON schemas. Default resolver is used when no custom resolver is defined for a JSON schema keyword. By default, the default resolver works as follows: + +- If only one schema contains the keyword, the value of the keyword is used as the merged value +- If multiple schemas contain the exact same value for the keyword, the value of the keyword is used as the merged value +- If multiple schemas contain different values for the keyword, it throws an error + +#### keywordResolver (keyword, values, mergedSchema, parentSchemas, options) + +__merge-json-schema__ uses a set of resolvers to merge JSON schemas. Each resolver is associated with a JSON schema keyword. The resolver is called when the keyword is found in the schemas to merge. The resolver is called with the following arguments: + +- `keyword` __\__ - the name of the keyword to merge +- `values` __\__ - the values of the keyword to merge. The length of the array is equal to the number of schemas to merge. If a schema does not contain the keyword, the value is `undefined` +- `mergedSchema` __\__ - an instance of the merged schema +- `parentSchemas` __\__ - the list of parent schemas +- `options` __\__ - the options passed to `mergeSchemas` + +The resolver must set the merged value of the `keyword` in the `mergedSchema` object. + +__Example:__ resolver for the `minNumber` keyword. + +```javascript +function minNumberResolver (keyword, values, mergedSchema) { + mergedSchema[keyword] = Math.min(...values) +} +``` + + + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/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/@fastify/merge-json-schemas/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/@fastify/merge-json-schemas/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/index.js new file mode 100644 index 0000000000000000000000000000000000000000..74774308f6b9121e243297f53d28272001dd6b3c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/index.js @@ -0,0 +1,357 @@ +'use strict' + +const { dequal: deepEqual } = require('dequal') +const resolvers = require('./lib/resolvers') +const errors = require('./lib/errors') + +const keywordsResolvers = { + $id: resolvers.skip, + type: resolvers.hybridArraysIntersection, + enum: resolvers.arraysIntersection, + minLength: resolvers.maxNumber, + maxLength: resolvers.minNumber, + minimum: resolvers.maxNumber, + maximum: resolvers.minNumber, + multipleOf: resolvers.commonMultiple, + exclusiveMinimum: resolvers.maxNumber, + exclusiveMaximum: resolvers.minNumber, + minItems: resolvers.maxNumber, + maxItems: resolvers.minNumber, + maxProperties: resolvers.minNumber, + minProperties: resolvers.maxNumber, + const: resolvers.allEqual, + default: resolvers.allEqual, + format: resolvers.allEqual, + required: resolvers.arraysUnion, + properties: mergeProperties, + patternProperties: mergeObjects, + additionalProperties: mergeSchemasResolver, + items: mergeItems, + additionalItems: mergeAdditionalItems, + definitions: mergeObjects, + $defs: mergeObjects, + nullable: resolvers.booleanAnd, + oneOf: mergeOneOf, + anyOf: mergeOneOf, + allOf: resolvers.arraysUnion, + not: mergeSchemasResolver, + if: mergeIfThenElseSchemas, + then: resolvers.skip, + else: resolvers.skip, + dependencies: mergeDependencies, + dependentRequired: mergeDependencies, + dependentSchemas: mergeObjects, + propertyNames: mergeSchemasResolver, + uniqueItems: resolvers.booleanOr, + contains: mergeSchemasResolver +} + +function mergeSchemasResolver (keyword, values, mergedSchema, _schemas, options) { + mergedSchema[keyword] = _mergeSchemas(values, options) +} + +function cartesianProduct (arrays) { + let result = [[]] + + for (const array of arrays) { + const temp = [] + for (const x of result) { + for (const y of array) { + temp.push([...x, y]) + } + } + result = temp + } + + return result +} + +function mergeOneOf (keyword, values, mergedSchema, _schemas, options) { + if (values.length === 1) { + mergedSchema[keyword] = values[0] + return + } + + const product = cartesianProduct(values) + const mergedOneOf = [] + for (const combination of product) { + try { + const mergedSchema = _mergeSchemas(combination, options) + if (mergedSchema !== undefined) { + mergedOneOf.push(mergedSchema) + } + } catch (error) { + // If this combination is not valid, we can ignore it. + if (error instanceof errors.MergeError) continue + throw error + } + } + mergedSchema[keyword] = mergedOneOf +} + +function getSchemaForItem (schema, index) { + const { items, additionalItems } = schema + + if (Array.isArray(items)) { + if (index < items.length) { + return items[index] + } + return additionalItems + } + + if (items !== undefined) { + return items + } + + return additionalItems +} + +function mergeItems (keyword, values, mergedSchema, schemas, options) { + let maxArrayItemsLength = 0 + for (const itemsSchema of values) { + if (Array.isArray(itemsSchema)) { + maxArrayItemsLength = Math.max(maxArrayItemsLength, itemsSchema.length) + } + } + + if (maxArrayItemsLength === 0) { + mergedSchema[keyword] = _mergeSchemas(values, options) + return + } + + const mergedItemsSchemas = [] + for (let i = 0; i < maxArrayItemsLength; i++) { + const indexItemSchemas = [] + for (const schema of schemas) { + const itemSchema = getSchemaForItem(schema, i) + if (itemSchema !== undefined) { + indexItemSchemas.push(itemSchema) + } + } + mergedItemsSchemas[i] = _mergeSchemas(indexItemSchemas, options) + } + mergedSchema[keyword] = mergedItemsSchemas +} + +function mergeAdditionalItems (keyword, values, mergedSchema, schemas, options) { + let hasArrayItems = false + for (const schema of schemas) { + if (Array.isArray(schema.items)) { + hasArrayItems = true + break + } + } + + if (!hasArrayItems) { + mergedSchema[keyword] = _mergeSchemas(values, options) + return + } + + const mergedAdditionalItemsSchemas = [] + for (const schema of schemas) { + let additionalItemsSchema = schema.additionalItems + if ( + additionalItemsSchema === undefined && + !Array.isArray(schema.items) + ) { + additionalItemsSchema = schema.items + } + if (additionalItemsSchema !== undefined) { + mergedAdditionalItemsSchemas.push(additionalItemsSchema) + } + } + + mergedSchema[keyword] = _mergeSchemas(mergedAdditionalItemsSchemas, options) +} + +function getSchemaForProperty (schema, propertyName) { + const { properties, patternProperties, additionalProperties } = schema + + if (properties?.[propertyName] !== undefined) { + return properties[propertyName] + } + + for (const pattern of Object.keys(patternProperties ?? {})) { + const regexp = new RegExp(pattern) + if (regexp.test(propertyName)) { + return patternProperties[pattern] + } + } + + return additionalProperties +} + +function mergeProperties (keyword, _values, mergedSchema, schemas, options) { + const foundProperties = {} + for (const currentSchema of schemas) { + const properties = currentSchema.properties ?? {} + for (const propertyName of Object.keys(properties)) { + if (foundProperties[propertyName] !== undefined) continue + + const propertySchema = properties[propertyName] + foundProperties[propertyName] = [propertySchema] + + for (const anotherSchema of schemas) { + if (currentSchema === anotherSchema) continue + + const propertySchema = getSchemaForProperty(anotherSchema, propertyName) + if (propertySchema !== undefined) { + foundProperties[propertyName].push(propertySchema) + } + } + } + } + + const mergedProperties = {} + for (const property of Object.keys(foundProperties)) { + const propertySchemas = foundProperties[property] + mergedProperties[property] = _mergeSchemas(propertySchemas, options) + } + mergedSchema[keyword] = mergedProperties +} + +function mergeObjects (keyword, values, mergedSchema, _schemas, options) { + const objectsProperties = {} + + for (const properties of values) { + for (const propertyName of Object.keys(properties)) { + if (objectsProperties[propertyName] === undefined) { + objectsProperties[propertyName] = [] + } + objectsProperties[propertyName].push(properties[propertyName]) + } + } + + const mergedProperties = {} + for (const propertyName of Object.keys(objectsProperties)) { + const propertySchemas = objectsProperties[propertyName] + const mergedPropertySchema = _mergeSchemas(propertySchemas, options) + mergedProperties[propertyName] = mergedPropertySchema + } + + mergedSchema[keyword] = mergedProperties +} + +function mergeIfThenElseSchemas (_keyword, _values, mergedSchema, schemas, options) { + for (let i = 0; i < schemas.length; i++) { + const subSchema = { + if: schemas[i].if, + then: schemas[i].then, + else: schemas[i].else + } + + if (subSchema.if === undefined) continue + + if (mergedSchema.if === undefined) { + mergedSchema.if = subSchema.if + if (subSchema.then !== undefined) { + mergedSchema.then = subSchema.then + } + if (subSchema.else !== undefined) { + mergedSchema.else = subSchema.else + } + continue + } + + if (mergedSchema.then !== undefined) { + mergedSchema.then = _mergeSchemas([mergedSchema.then, subSchema], options) + } + if (mergedSchema.else !== undefined) { + mergedSchema.else = _mergeSchemas([mergedSchema.else, subSchema], options) + } + } +} + +function mergeDependencies (keyword, values, mergedSchema) { + const mergedDependencies = {} + for (const dependencies of values) { + for (const propertyName of Object.keys(dependencies)) { + if (mergedDependencies[propertyName] === undefined) { + mergedDependencies[propertyName] = [] + } + const mergedPropertyDependencies = mergedDependencies[propertyName] + for (const propertyDependency of dependencies[propertyName]) { + if (!mergedPropertyDependencies.includes(propertyDependency)) { + mergedPropertyDependencies.push(propertyDependency) + } + } + } + } + mergedSchema[keyword] = mergedDependencies +} + +function _mergeSchemas (schemas, options) { + if (schemas.length === 0) return {} + if (schemas.length === 1) return schemas[0] + + const mergedSchema = {} + const keywords = {} + + let allSchemasAreTrue = true + + for (const schema of schemas) { + if (schema === false) return false + if (schema === true) continue + allSchemasAreTrue = false + + for (const keyword of Object.keys(schema)) { + if (keywords[keyword] === undefined) { + keywords[keyword] = [] + } + keywords[keyword].push(schema[keyword]) + } + } + + if (allSchemasAreTrue) return true + + for (const keyword of Object.keys(keywords)) { + const keywordValues = keywords[keyword] + const resolver = options.resolvers[keyword] ?? options.defaultResolver + resolver(keyword, keywordValues, mergedSchema, schemas, options) + } + + return mergedSchema +} + +function defaultResolver (keyword, values, mergedSchema, _schemas, options) { + const onConflict = options.onConflict ?? 'throw' + + if (values.length === 1 || onConflict === 'first') { + mergedSchema[keyword] = values[0] + return + } + + let allValuesEqual = true + for (let i = 1; i < values.length; i++) { + if (!deepEqual(values[i], values[0])) { + allValuesEqual = false + break + } + } + + if (allValuesEqual) { + mergedSchema[keyword] = values[0] + return + } + + if (onConflict === 'throw') { + throw new errors.ResolverNotFoundError(keyword, values) + } + if (onConflict === 'skip') { + return + } + throw new errors.InvalidOnConflictOptionError(onConflict) +} + +function mergeSchemas (schemas, options = {}) { + if (options.defaultResolver === undefined) { + options.defaultResolver = defaultResolver + } + + options.resolvers = { ...keywordsResolvers, ...options.resolvers } + + const mergedSchema = _mergeSchemas(schemas, options) + return mergedSchema +} + +module.exports = { mergeSchemas, keywordsResolvers, defaultResolver, ...errors } diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/package.json new file mode 100644 index 0000000000000000000000000000000000000000..01c745c28910e3fca656d992af0749df091806ac --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/merge-json-schemas/package.json @@ -0,0 +1,67 @@ +{ + "name": "@fastify/merge-json-schemas", + "version": "0.2.1", + "description": "Builds a logical conjunction (AND) of multiple JSON schemas", + "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:types", + "test:unit": "c8 --100 node --test", + "test:types": "tsd" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/merge-json-schemas.git" + }, + "keywords": [ + "json", + "schema", + "merge", + "allOf" + ], + "author": "Ivan Tymoshenko ", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + }, + { + "name": "Gürgün Dayıoğlu", + "email": "hey@gurgun.day", + "url": "https://heyhey.to/G" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/merge-json-schemas/issues" + }, + "homepage": "https://github.com/fastify/merge-json-schemas#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "c8": "^10.1.3", + "eslint": "^9.17.0", + "neostandard": "^0.12.0", + "tsd": "^0.31.2" + }, + "dependencies": { + "dequal": "^2.0.3" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/.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/@fastify/proxy-addr/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4b53c0a880c5b1d91329709079fc422e8f859ad0 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2021 Fastify collaborators +Copyright (c) 2014-2016 Douglas Christopher Wilson + +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/@fastify/proxy-addr/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5757412404d4c881b2fcce5ed2f3428676808d6e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/README.md @@ -0,0 +1,141 @@ +# proxy-addr + +![CI](https://github.com/fastify/proxy-addr/workflows/CI/badge.svg) +[![NPM version](https://img.shields.io/npm/v/@fastify/proxy-addr.svg?style=flat)](https://www.npmjs.com/package/@fastify/proxy-addr) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) + +Determine address of proxied request. + +Forked from https://github.com/jshttp/proxy-addr to address https://github.com/jshttp/forwarded/pull/9. + +## Install + +```sh +$ npm i @fastify/proxy-addr +``` + +## API + + + +```js +var proxyaddr = require('@fastify/proxy-addr') +``` + +### proxyaddr(req, trust) + +Return the address of the request, using the given `trust` parameter. + +The `trust` argument is a function that returns `true` if you trust +the address, `false` if you don't. The closest untrusted address is +returned. + + + +```js +proxyaddr(req, function (addr) { return addr === '127.0.0.1' }) +proxyaddr(req, function (addr, i) { return i < 1 }) +``` + +The `trust` arugment may also be a single IP address string or an +array of trusted addresses, as plain IP addresses, CIDR-formatted +strings, or IP/netmask strings. + + + +```js +proxyaddr(req, '127.0.0.1') +proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8']) +proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0']) +``` + +This module also supports IPv6. Your IPv6 addresses will be normalized +automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`). + + + +```js +proxyaddr(req, '::1') +proxyaddr(req, ['::1/128', 'fe80::/10']) +``` + +This module will automatically work with IPv4-mapped IPv6 addresses +as well to support node.js in IPv6-only mode. This means that you do +not have to specify both `::ffff:a00:1` and `10.0.0.1`. + +As a convenience, this module also takes certain pre-defined names +in addition to IP addresses, which expand into IP addresses: + + + +```js +proxyaddr(req, 'loopback') +proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64']) +``` + + * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and + `127.0.0.1`). + * `linklocal`: IPv4 and IPv6 link-local addresses (like + `fe80::1:1:1:1` and `169.254.0.1`). + * `uniquelocal`: IPv4 private addresses and IPv6 unique-local + addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`). + +When `trust` is specified as a function, it will be called for each +address to determine if it is a trusted address. The function is +given two arguments: `addr` and `i`, where `addr` is a string of +the address to check and `i` is a number that represents the distance +from the socket address. + +### proxyaddr.all(req, [trust]) + +Return all the addresses of the request, optionally stopping at the +first untrusted. This array is ordered from closest to furthest +(i.e. `arr[0] === req.connection.remoteAddress`). + + + +```js +proxyaddr.all(req) +``` + +The optional `trust` argument takes the same arguments as `trust` +does in `proxyaddr(req, trust)`. + + + +```js +proxyaddr.all(req, 'loopback') +``` + +### proxyaddr.compile(val) + +Compiles argument `val` into a `trust` function. This function takes +the same arguments as `trust` does in `proxyaddr(req, trust)` and +returns a function suitable for `proxyaddr(req, trust)`. + + + +```js +var trust = proxyaddr.compile('loopback') +var addr = proxyaddr(req, trust) +``` + +This function is meant to be optimized for use against every request. +It is recommend to compile a trust function up-front for the trusted +configuration and pass that to `proxyaddr(req, trust)` for each request. + +## Testing + +```sh +$ npm test +``` + +## Benchmarks + +```sh +$ npm run-script bench +``` + +## License + +[MIT](LICENSE) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4fabb199f2575486f050e04e021c8777f292e852 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/index.js @@ -0,0 +1,334 @@ +/*! + * proxy-addr + * Copyright(c) 2021 Fastify collaborators + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = proxyaddr +module.exports.default = proxyaddr +module.exports.proxyaddr = proxyaddr +module.exports.all = alladdrs +module.exports.compile = compile + +/** + * Module dependencies. + * @private + */ + +const forwarded = require('@fastify/forwarded') +const ipaddr = require('ipaddr.js') + +/** + * Variables. + * @private + */ + +const DIGIT_REGEXP = /^\d+$/u +const isip = ipaddr.isValid +const parseip = ipaddr.parse + +/** + * Pre-defined IP ranges. + * @private + */ + +const IP_RANGES = { + linklocal: ['169.254.0.0/16', 'fe80::/10'], + loopback: ['127.0.0.1/8', '::1/128'], + uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] +} + +/** + * Get all addresses in the request, optionally stopping + * at the first untrusted. + * + * @param {Object} request + * @param {Function|Array|String} [trust] + * @public + */ + +function alladdrs (req, trust) { + // get addresses + const addrs = forwarded(req) + + if (!trust) { + // Return all addresses + return addrs + } + + if (typeof trust !== 'function') { + trust = compile(trust) + } + + /* eslint-disable no-var */ + for (var i = 0; i < addrs.length - 1; i++) { + if (trust(addrs[i], i)) continue + + addrs.length = i + 1 + } + + return addrs +} + +/** + * Compile argument into trust function. + * + * @param {Array|String} val + * @private + */ + +function compile (val) { + if (!val) { + throw new TypeError('argument is required') + } + + let trust + + if (typeof val === 'string') { + trust = [val] + } else if (Array.isArray(val)) { + trust = val.slice() + } else { + throw new TypeError('unsupported trust argument') + } + + /* eslint-disable no-var */ + for (var i = 0; i < trust.length; i++) { + val = trust[i] + + if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { + continue + } + + // Splice in pre-defined range + val = IP_RANGES[val] + trust.splice.apply(trust, [i, 1].concat(val)) + i += val.length - 1 + } + + return compileTrust(compileRangeSubnets(trust)) +} + +/** + * Compile `arr` elements into range subnets. + * + * @param {Array} arr + * @private + */ + +function compileRangeSubnets (arr) { + const rangeSubnets = new Array(arr.length) + + /* eslint-disable no-var */ + for (var i = 0; i < arr.length; i++) { + rangeSubnets[i] = parseipNotation(arr[i]) + } + + return rangeSubnets +} + +/** + * Compile range subnet array into trust function. + * + * @param {Array} rangeSubnets + * @private + */ + +function compileTrust (rangeSubnets) { + // Return optimized function based on length + const len = rangeSubnets.length + return len === 0 + ? trustNone + : len === 1 + ? trustSingle(rangeSubnets[0]) + : trustMulti(rangeSubnets) +} + +/** + * Parse IP notation string into range subnet. + * + * @param {String} note + * @private + */ + +function parseipNotation (note) { + const pos = note.lastIndexOf('/') + const str = pos !== -1 + ? note.substring(0, pos) + : note + + if (!isip(str)) { + throw new TypeError('invalid IP address: ' + str) + } + + let ip = parseip(str) + + if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { + // Store as IPv4 + ip = ip.toIPv4Address() + } + + const max = ip.kind() === 'ipv6' + ? 128 + : 32 + + let range = pos !== -1 + ? note.substring(pos + 1, note.length) + : null + + if (range === null) { + range = max + } else if (DIGIT_REGEXP.test(range)) { + range = parseInt(range, 10) + } else if (ip.kind() === 'ipv4' && isip(range)) { + range = parseNetmask(range) + } else { + range = null + } + + if (range <= 0 || range > max) { + throw new TypeError('invalid range on address: ' + note) + } + + return [ip, range] +} + +/** + * Parse netmask string into CIDR range. + * + * @param {String} netmask + * @private + */ + +function parseNetmask (netmask) { + const ip = parseip(netmask) + const kind = ip.kind() + + return kind === 'ipv4' + ? ip.prefixLengthFromSubnetMask() + : null +} + +/** + * Determine address of proxied request. + * + * @param {Object} request + * @param {Function|Array|String} trust + * @public + */ + +function proxyaddr (req, trust) { + if (!req) { + throw new TypeError('req argument is required') + } + + if (!trust) { + throw new TypeError('trust argument is required') + } + + const addrs = alladdrs(req, trust) + const addr = addrs[addrs.length - 1] + + return addr +} + +/** + * Static trust function to trust nothing. + * + * @private + */ + +function trustNone () { + return false +} + +/** + * Compile trust function for multiple subnets. + * + * @param {Array} subnets + * @private + */ + +function trustMulti (subnets) { + return function trust (addr) { + if (!isip(addr)) return false + + const ip = parseip(addr) + let ipconv + const kind = ip.kind() + + /* eslint-disable no-var */ + for (var i = 0; i < subnets.length; i++) { + const subnet = subnets[i] + const subnetip = subnet[0] + const subnetkind = subnetip.kind() + const subnetrange = subnet[1] + let trusted = ip + + if (kind !== subnetkind) { + if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) { + // Incompatible IP addresses + continue + } + + if (!ipconv) { + // Convert IP to match subnet IP kind + ipconv = subnetkind === 'ipv4' + ? ip.toIPv4Address() + : ip.toIPv4MappedAddress() + } + + trusted = ipconv + } + + if (trusted.match(subnetip, subnetrange)) { + return true + } + } + + return false + } +} + +/** + * Compile trust function for single subnet. + * + * @param {Object} subnet + * @private + */ + +function trustSingle (subnet) { + const subnetip = subnet[0] + const subnetkind = subnetip.kind() + const subnetisipv4 = subnetkind === 'ipv4' + const subnetrange = subnet[1] + + return function trust (addr) { + if (!isip(addr)) return false + + let ip = parseip(addr) + const kind = ip.kind() + + if (kind !== subnetkind) { + if (subnetisipv4 && !ip.isIPv4MappedAddress()) { + // Incompatible IP addresses + return false + } + + // Convert IP to match subnet IP kind + ip = subnetisipv4 + ? ip.toIPv4Address() + : ip.toIPv4MappedAddress() + } + + return ip.match(subnetip, subnetrange) + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/package.json new file mode 100644 index 0000000000000000000000000000000000000000..719d19388636b5cd945503e0d8c8cff98a7c09d4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/proxy-addr/package.json @@ -0,0 +1,45 @@ +{ + "name": "@fastify/proxy-addr", + "description": "Determine address of proxied request", + "version": "5.0.0", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "ip", + "proxy", + "x-forwarded-for" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/proxy-addr.git" + }, + "bugs": { + "url": "https://github.com/fastify/proxy-addr/issues" + }, + "homepage": "https://github.com/fastify/proxy-addr#readme", + "dependencies": { + "@fastify/forwarded": "^3.0.0", + "ipaddr.js": "^2.1.0" + }, + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "c8": "^7.14.0", + "standard": "^17.1.0", + "tape": "^5.7.5", + "tsd": "^0.31.0" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "standard", + "lint:fix": "standard --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:typescript": "tsd", + "test:unit": "c8 tape test/**/*.js" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a0e7df931f90e194cc6b80313f8f07744d9fc6d8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/.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/@fastify/send/HISTORY.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/HISTORY.md new file mode 100644 index 0000000000000000000000000000000000000000..bebfd46c954f035abdcababbbffb9eb825d15650 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/HISTORY.md @@ -0,0 +1,521 @@ +0.18.0 / 2022-03-23 +=================== + + * Fix emitted 416 error missing headers property + * Limit the headers removed for 304 response + * deps: depd@2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: destroy@1.2.0 + * deps: http-errors@2.0.0 + - deps: depd@2.0.0 + - deps: statuses@2.0.1 + * deps: on-finished@2.4.1 + * deps: statuses@2.0.1 + +0.17.2 / 2021-12-11 +=================== + + * pref: ignore empty http tokens + * deps: http-errors@1.8.1 + - deps: inherits@2.0.4 + - deps: toidentifier@1.0.1 + - deps: setprototypeof@1.2.0 + * deps: ms@2.1.3 + +0.17.1 / 2019-05-10 +=================== + + * Set stricter CSP header in redirect & error responses + * deps: range-parser@~1.2.1 + +0.17.0 / 2019-05-03 +=================== + + * deps: http-errors@~1.7.2 + - Set constructor name when possible + - Use `toidentifier` module to make class names + - deps: depd@~1.1.2 + - deps: setprototypeof@1.1.1 + - deps: statuses@'>= 1.5.0 < 2' + * deps: mime@1.6.0 + - Add extensions for JPEG-2000 images + - Add new `font/*` types from IANA + - Add WASM mapping + - Update `.bdoc` to `application/bdoc` + - Update `.bmp` to `image/bmp` + - Update `.m4a` to `audio/mp4` + - Update `.rtf` to `application/rtf` + - Update `.wav` to `audio/wav` + - Update `.xml` to `application/xml` + - Update generic extensions to `application/octet-stream`: + `.deb`, `.dll`, `.dmg`, `.exe`, `.iso`, `.msi` + - Use mime-score module to resolve extension conflicts + * deps: ms@2.1.1 + - Add `week`/`w` support + - Fix negative number handling + * deps: statuses@~1.5.0 + * perf: remove redundant `path.normalize` call + +0.16.2 / 2018-02-07 +=================== + + * Fix incorrect end tag in default error & redirects + * deps: depd@~1.1.2 + - perf: remove argument reassignment + * deps: encodeurl@~1.0.2 + - Fix encoding `%` as last character + * deps: statuses@~1.4.0 + +0.16.1 / 2017-09-29 +=================== + + * Fix regression in edge-case behavior for empty `path` + +0.16.0 / 2017-09-27 +=================== + + * Add `immutable` option + * Fix missing `` in default error & redirects + * Use instance methods on steam to check for listeners + * deps: mime@1.4.1 + - Add 70 new types for file extensions + - Set charset as "UTF-8" for .js and .json + * perf: improve path validation speed + +0.15.6 / 2017-09-22 +=================== + + * deps: debug@2.6.9 + * perf: improve `If-Match` token parsing + +0.15.5 / 2017-09-20 +=================== + + * deps: etag@~1.8.1 + - perf: replace regular expression with substring + * deps: fresh@0.5.2 + - Fix handling of modified headers with invalid dates + - perf: improve ETag match loop + - perf: improve `If-None-Match` token parsing + +0.15.4 / 2017-08-05 +=================== + + * deps: debug@2.6.8 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + * deps: http-errors@~1.6.2 + - deps: depd@1.1.1 + +0.15.3 / 2017-05-16 +=================== + + * deps: debug@2.6.7 + - deps: ms@2.0.0 + * deps: ms@2.0.0 + +0.15.2 / 2017-04-26 +=================== + + * deps: debug@2.6.4 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@0.7.3 + * deps: ms@1.0.0 + +0.15.1 / 2017-03-04 +=================== + + * Fix issue when `Date.parse` does not return `NaN` on invalid date + * Fix strict violation in broken environments + +0.15.0 / 2017-02-25 +=================== + + * Support `If-Match` and `If-Unmodified-Since` headers + * Add `res` and `path` arguments to `directory` event + * Remove usage of `res._headers` private field + - Improves compatibility with Node.js 8 nightly + * Send complete HTML document in redirect & error responses + * Set default CSP header in redirect & error responses + * Use `res.getHeaderNames()` when available + * Use `res.headersSent` when available + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * deps: etag@~1.8.0 + * deps: fresh@0.5.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - perf: delay reading header values until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove duplicate conditional + - perf: remove unnecessary boolean coercions + - perf: skip checking modified time if ETag check failed + - perf: skip parsing `If-None-Match` when no `ETag` header + - perf: use `Date.parse` instead of `new Date` + * deps: http-errors@~1.6.1 + - Make `message` property enumerable for `HttpError`s + - deps: setprototypeof@1.0.3 + +0.14.2 / 2017-01-23 +=================== + + * deps: http-errors@~1.5.1 + - deps: inherits@2.0.3 + - deps: setprototypeof@1.0.2 + - deps: statuses@'>= 1.3.1 < 2' + * deps: ms@0.7.2 + * deps: statuses@~1.3.1 + +0.14.1 / 2016-06-09 +=================== + + * Fix redirect error when `path` contains raw non-URL characters + * Fix redirect when `path` starts with multiple forward slashes + +0.14.0 / 2016-06-06 +=================== + + * Add `acceptRanges` option + * Add `cacheControl` option + * Attempt to combine multiple ranges into single range + * Correctly inherit from `Stream` class + * Fix `Content-Range` header in 416 responses when using `start`/`end` options + * Fix `Content-Range` header missing from default 416 responses + * Ignore non-byte `Range` headers + * deps: http-errors@~1.5.0 + - Add `HttpError` export, for `err instanceof createError.HttpError` + - Support new code `421 Misdirected Request` + - Use `setprototypeof` module to replace `__proto__` setting + - deps: inherits@2.0.1 + - deps: statuses@'>= 1.3.0 < 2' + - perf: enable strict mode + * deps: range-parser@~1.2.0 + - Fix incorrectly returning -1 when there is at least one valid range + - perf: remove internal function + * deps: statuses@~1.3.0 + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: remove argument reassignment + +0.13.2 / 2016-03-05 +=================== + + * Fix invalid `Content-Type` header when `send.mime.default_type` unset + +0.13.1 / 2016-01-16 +=================== + + * deps: depd@~1.1.0 + - Support web browser loading + - perf: enable strict mode + * deps: destroy@~1.0.4 + - perf: enable strict mode + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: range-parser@~1.0.3 + - perf: enable strict mode + +0.13.0 / 2015-06-16 +=================== + + * Allow Node.js HTTP server to set `Date` response header + * Fix incorrectly removing `Content-Location` on 304 response + * Improve the default redirect response headers + * Send appropriate headers on default error response + * Use `http-errors` for standard emitted errors + * Use `statuses` instead of `http` module for status messages + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Improve stat performance by removing hashing + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * perf: enable strict mode + * perf: remove unnecessary array allocations + +0.12.3 / 2015-05-13 +=================== + + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: etag@~1.6.0 + - Improve support for JXcore + - Support "fake" stats objects in environments without `fs` + * deps: ms@0.7.1 + - Prevent extraordinarily long inputs + * deps: on-finished@~2.2.1 + +0.12.2 / 2015-03-13 +=================== + + * Throw errors early for invalid `extensions` or `index` options + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +0.12.1 / 2015-02-17 +=================== + + * Fix regression sending zero-length files + +0.12.0 / 2015-02-16 +=================== + + * Always read the stat size from the file + * Fix mutating passed-in `options` + * deps: mime@1.3.4 + +0.11.1 / 2015-01-20 +=================== + + * Fix `root` path disclosure + +0.11.0 / 2015-01-05 +=================== + + * deps: debug@~2.1.1 + * deps: etag@~1.5.1 + - deps: crc@3.2.1 + * deps: ms@0.7.0 + - Add `milliseconds` + - Add `msecs` + - Add `secs` + - Add `mins` + - Add `hrs` + - Add `yrs` + * deps: on-finished@~2.2.0 + +0.10.1 / 2014-10-22 +=================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +0.10.0 / 2014-10-15 +=================== + + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: etag@~1.5.0 + - Improve string performance + - Slightly improve speed for weak ETags over 1KB + +0.9.3 / 2014-09-24 +================== + + * deps: etag@~1.4.0 + - Support "fake" stats objects + +0.9.2 / 2014-09-15 +================== + + * deps: depd@0.4.5 + * deps: etag@~1.3.1 + * deps: range-parser@~1.0.2 + +0.9.1 / 2014-09-07 +================== + + * deps: fresh@0.2.4 + +0.9.0 / 2014-09-07 +================== + + * Add `lastModified` option + * Use `etag` to generate `ETag` header + * deps: debug@~2.0.0 + +0.8.5 / 2014-09-04 +================== + + * Fix malicious path detection for empty string path + +0.8.4 / 2014-09-04 +================== + + * Fix a path traversal issue when using `root` + +0.8.3 / 2014-08-16 +================== + + * deps: destroy@1.0.3 + - renamed from dethroy + * deps: on-finished@2.1.0 + +0.8.2 / 2014-08-14 +================== + + * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + * deps: dethroy@1.0.2 + +0.8.1 / 2014-08-05 +================== + + * Fix `extensions` behavior when file already has extension + +0.8.0 / 2014-08-05 +================== + + * Add `extensions` option + +0.7.4 / 2014-08-04 +================== + + * Fix serving index files without root dir + +0.7.3 / 2014-07-29 +================== + + * Fix incorrect 403 on Windows and Node.js 0.11 + +0.7.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + +0.7.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + +0.7.0 / 2014-07-20 +================== + + * Deprecate `hidden` option; use `dotfiles` option + * Add `dotfiles` option + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + +0.6.0 / 2014-07-11 +================== + + * Deprecate `from` option; use `root` option + * Deprecate `send.etag()` -- use `etag` in `options` + * Deprecate `send.hidden()` -- use `hidden` in `options` + * Deprecate `send.index()` -- use `index` in `options` + * Deprecate `send.maxage()` -- use `maxAge` in `options` + * Deprecate `send.root()` -- use `root` in `options` + * Cap `maxAge` value to 1 year + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + +0.5.0 / 2014-06-28 +================== + + * Accept string for `maxAge` (converted by `ms`) + * Add `headers` event + * Include link in default redirect response + * Use `EventEmitter.listenerCount` to count listeners + +0.4.3 / 2014-06-11 +================== + + * Do not throw un-catchable error on file open race condition + * Use `escape-html` for HTML escaping + * deps: debug@1.0.2 + - fix some debugging output colors on node.js 0.8 + * deps: finished@1.2.2 + * deps: fresh@0.2.2 + +0.4.2 / 2014-06-09 +================== + + * fix "event emitter leak" warnings + * deps: debug@1.0.1 + * deps: finished@1.2.1 + +0.4.1 / 2014-06-02 +================== + + * Send `max-age` in `Cache-Control` in correct format + +0.4.0 / 2014-05-27 +================== + + * Calculate ETag with md5 for reduced collisions + * Fix wrong behavior when index file matches directory + * Ignore stream errors after request ends + - Goodbye `EBADF, read` + * Skip directories in index file search + * deps: debug@0.8.1 + +0.3.0 / 2014-04-24 +================== + + * Fix sending files with dots without root set + * Coerce option types + * Accept API options in options object + * Set etags to "weak" + * Include file path in etag + * Make "Can't set headers after they are sent." catchable + * Send full entity-body for multi range requests + * Default directory access to 403 when index disabled + * Support multiple index paths + * Support "If-Range" header + * Control whether to generate etags + * deps: mime@1.2.11 + +0.2.0 / 2014-01-29 +================== + + * update range-parser and fresh + +0.1.4 / 2013-08-11 +================== + + * update fresh + +0.1.3 / 2013-07-08 +================== + + * Revert "Fix fd leak" + +0.1.2 / 2013-07-03 +================== + + * Fix fd leak + +0.1.0 / 2012-08-25 +================== + + * add options parameter to send() that is passed to fs.createReadStream() [kanongil] + +0.0.4 / 2012-08-16 +================== + + * allow custom "Accept-Ranges" definition + +0.0.3 / 2012-07-16 +================== + + * fix normalization of the root directory. Closes #3 + +0.0.2 / 2012-07-09 +================== + + * add passing of req explicitly for now (YUCK) + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..74e960141dd38f126e61944e8a156cd19b635e6a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2014-2022 Douglas Christopher Wilson +Copyright (c) 2023 The Fastify Team + +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/@fastify/send/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cf351e442daf70eeeddef2da5fa7659af34629b6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/README.md @@ -0,0 +1,310 @@ +# @fastify/send + +[![CI](https://github.com/fastify/send/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/send/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/send.svg?style=flat)](https://www.npmjs.com/package/@fastify/send) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +Send is a library for streaming files from the file system as an HTTP response +supporting partial responses (Ranges), conditional-GET negotiation (If-Match, +If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage, +and granular events which may be leveraged to take appropriate actions in your +application or framework. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install @fastify/send +``` + +### TypeScript + +`@types/mime@3` must be used if wanting to use TypeScript; +`@types/mime@4` removed the `mime` types. + +```bash +$ npm install -D @types/mime@3 +``` + +## API + +```js +const send = require('@fastify/send') +``` + +### send(req, path, [options]) + +Provide `statusCode`, `headers`, and `stream` for the given path to send to a +`res`. The `req` is the Node.js HTTP request and the `path `is a urlencoded path +to send (urlencoded, not the actual file-system path). + +#### Options + +##### acceptRanges + +Enable or disable accepting ranged requests, defaults to true. +Disabling this will not send `Accept-Ranges` and ignore the contents +of the `Range` request header. + +##### cacheControl + +Enable or disable setting `Cache-Control` response header, defaults to +true. Disabling this will ignore the `immutable` and `maxAge` options. + +##### contentType + +By default, this library uses the `mime` module to set the `Content-Type` +of the response based on the file extension of the requested file. + +To disable this functionality, set `contentType` to `false`. +The `Content-Type` header will need to be set manually if disabled. + +##### dotfiles + +Set how "dotfiles" are treated when encountered. A dotfile is a file +or directory that begins with a dot ("."). Note this check is done on +the path itself without checking if the path exists on the +disk. If `root` is specified, only the dotfiles above the root are +checked (i.e. the root itself can be within a dotfile when set +to "deny"). + + - `'allow'` No special treatment for dotfiles. + - `'deny'` Send a 403 for any request for a dotfile. + - `'ignore'` Pretend like the dotfile does not exist and 404. + +The default value is _similar_ to `'ignore'`, with the exception that +this default will not ignore the files within a directory that begins +with a dot, for backward-compatibility. + +##### end + +Byte offset at which the stream ends, defaults to the length of the file +minus 1. The end is inclusive in the stream, meaning `end: 3` will include +the 4th byte in the stream. + +##### etag + +Enable or disable etag generation, defaults to true. + +##### extensions + +If a given file doesn't exist, try appending one of the given extensions, +in the given order. By default, this is disabled (set to `false`). An +example value that will serve extension-less HTML files: `['html', 'htm']`. +This is skipped if the requested file already has an extension. + +##### immutable + +Enable or disable the `immutable` directive in the `Cache-Control` response +header, defaults to `false`. If set to `true`, the `maxAge` option should +also be specified to enable caching. The `immutable` directive will prevent +supported clients from making conditional requests during the life of the +`maxAge` option to check if the file has changed. + +##### index + +By default send supports "index.html" files, to disable this +set `false` or to supply a new index pass a string or an array +in preferred order. + +##### lastModified + +Enable or disable `Last-Modified` header, defaults to true. Uses the file +system's last modified value. + +##### maxAge + +Provide a max-age in milliseconds for HTTP caching, defaults to 0. +This can also be a string accepted by the +[ms](https://www.npmjs.org/package/ms#readme) module. + +##### maxContentRangeChunkSize + +Specify the maximum response content size, defaults to the entire file size. +This will be used when `acceptRanges` is true. + +##### root + +Serve files relative to `path`. + +##### start + +Byte offset at which the stream starts, defaults to 0. The start is inclusive, +meaning `start: 2` will include the 3rd byte in the stream. + +##### highWaterMark + +When provided, this option sets the maximum number of bytes that the internal +buffer will hold before pausing reads from the underlying resource. +If you omit this option (or pass undefined), Node.js falls back to +its built-in default for readable binary streams. + +### .mime + +The `mime` export is the global instance of the +[`mime` npm module](https://www.npmjs.com/package/mime). + +This is used to configure the MIME types that are associated with file extensions +as well as other options for how to resolve the MIME type of a file (like the +default type to use for an unknown file extension). + +## Caching + +It does _not_ perform internal caching, you should use a reverse proxy cache +such as Varnish for this, or those fancy things called CDNs. If your +application is small enough that it would benefit from single-node memory +caching, it's small enough that it does not need caching at all ;). + +## Debugging + +To enable `debug()` instrumentation output export __NODE_DEBUG__: + +``` +$ NODE_DEBUG=send node app +``` + +## Running tests + +``` +$ npm install +$ npm test +``` + +## Examples + +### Serve a specific file + +This simple example will send a specific file to all requests. + +```js +const http = require('node:http') +const send = require('send') + +const server = http.createServer(async function onRequest (req, res) { + const { statusCode, headers, stream } = await send(req, '/path/to/index.html') + res.writeHead(statusCode, headers) + stream.pipe(res) +}) + +server.listen(3000) +``` + +### Serve all files from a directory + +This simple example will just serve up all the files in a +given directory as the top-level. For example, a request +`GET /foo.txt` will send back `/www/public/foo.txt`. + +```js +const http = require('node:http') +const parseUrl = require('parseurl') +const send = require('@fastify/send') + +const server = http.createServer(async function onRequest (req, res) { + const { statusCode, headers, stream } = await send(req, parseUrl(req).pathname, { root: '/www/public' }) + res.writeHead(statusCode, headers) + stream.pipe(res) +}) + +server.listen(3000) +``` + +### Custom file types + +```js +const http = require('node:http') +const parseUrl = require('parseurl') +const send = require('@fastify/send') + +// Default unknown types to text/plain +send.mime.default_type = 'text/plain' + +// Add a custom type +send.mime.define({ + 'application/x-my-type': ['x-mt', 'x-mtt'] +}) + +const server = http.createServer(function onRequest (req, res) { + const { statusCode, headers, stream } = await send(req, parseUrl(req).pathname, { root: '/www/public' }) + res.writeHead(statusCode, headers) + stream.pipe(res) +}) + +server.listen(3000) +``` + +### Custom directory index view + +This is an example of serving up a structure of directories with a +custom function to render a listing of a directory. + +```js +const http = require('node:http') +const fs = require('node:fs') +const parseUrl = require('parseurl') +const send = require('@fastify/send') + +// Transfer arbitrary files from within /www/example.com/public/* +// with a custom handler for directory listing +const server = http.createServer(async function onRequest (req, res) { + const { statusCode, headers, stream, type, metadata } = await send(req, parseUrl(req).pathname, { index: false, root: '/www/public' }) + if(type === 'directory') { + // get directory list + const list = await readdir(metadata.path) + // render an index for the directory + res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }) + res.end(list.join('\n') + '\n') + } else { + res.writeHead(statusCode, headers) + stream.pipe(res) + } +}) + +server.listen(3000) +``` + +### Serving from a root directory with custom error-handling + +```js +const http = require('node:http') +const parseUrl = require('parseurl') +const send = require('@fastify/send') + +const server = http.createServer(async function onRequest (req, res) { + // transfer arbitrary files from within + // /www/example.com/public/* + const { statusCode, headers, stream, type, metadata } = await send(req, parseUrl(req).pathname, { root: '/www/public' }) + switch (type) { + case 'directory': { + // your custom directory handling logic: + res.writeHead(301, { + 'Location': metadata.requestPath + '/' + }) + res.end('Redirecting to ' + metadata.requestPath + '/') + break + } + case 'error': { + // your custom error-handling logic: + res.writeHead(metadata.error.status ?? 500, {}) + res.end(metadata.error.message) + break + } + default: { + // your custom headers + // serve all files for download + res.setHeader('Content-Disposition', 'attachment') + res.writeHead(statusCode, headers) + stream.pipe(res) + } + } +}) + +server.listen(3000) +``` + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/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/@fastify/send/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/@fastify/send/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c1c2b01beea9501426f3d12bf226b0e5cf1821a9 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/index.js @@ -0,0 +1,28 @@ +/*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ +const isUtf8MimeType = require('./lib/isUtf8MimeType').isUtf8MimeType +const mime = require('mime') +const send = require('./lib/send').send + +/** + * Module exports. + * @public + */ + +module.exports = send +module.exports.default = send +module.exports.send = send + +module.exports.isUtf8MimeType = isUtf8MimeType +module.exports.mime = mime diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/package.json new file mode 100644 index 0000000000000000000000000000000000000000..32e32405dd9c58ef4c1671534fdfbb17fc5ee83a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/send/package.json @@ -0,0 +1,81 @@ +{ + "name": "@fastify/send", + "description": "Better streaming static file server with Range and conditional-GET support", + "version": "4.1.0", + "author": "TJ Holowaychuk ", + "contributors": [ + "Douglas Christopher Wilson ", + "James Wyatt Cready ", + "Jesús Leganés Combarro ", + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + } + ], + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/send.git" + }, + "bugs": { + "url": "https://github.com/fastify/send/issues" + }, + "homepage": "https://github.com/fastify/send#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "keywords": [ + "static", + "file", + "server" + ], + "dependencies": { + "@lukeed/ms": "^2.0.2", + "escape-html": "~1.0.3", + "fast-decode-uri-component": "^1.0.1", + "http-errors": "^2.0.0", + "mime": "^3" + }, + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "after": "0.8.2", + "benchmark": "^2.1.4", + "c8": "^10.1.3", + "eslint": "^9.17.0", + "neostandard": "^0.12.0", + "supertest": "6.3.4", + "tsd": "^0.32.0" + }, + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:coverage": "c8 --reporter html node --test", + "test:typescript": "tsd", + "test:unit": "c8 --100 node --test" + }, + "pre-commit": [ + "lint", + "test" + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/.gitattributes b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..cad1c32e3deb59f649a90fb55994a7c6a0685f64 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/.gitattributes @@ -0,0 +1,5 @@ +# Set the default behavior, in case people don't have core.autocrlf set +* text=auto + +# Require Unix line endings +* text eol=lf diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7780923cfa5dc55d49fa1884f7eeabb1e7272d1b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2023 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/@fastify/static/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/README.md new file mode 100644 index 0000000000000000000000000000000000000000..634a08805a50fad7f415d0e14ef32c99d8f46e66 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/README.md @@ -0,0 +1,533 @@ +# @fastify/static + +[![CI](https://github.com/fastify/fastify-static/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-static/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/static.svg?style=flat)](https://www.npmjs.com/package/@fastify/static) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +Plugin for serving static files as fast as possible. + +## Install +``` +npm i @fastify/static +``` + +### Compatibility + +| Plugin version | Fastify version | +| ---------------|-----------------| +| `>=8.x` | `^5.x` | +| `^7.x` | `^4.x` | +| `>=5.x <7.x` | `^3.x` | +| `>=2.x <5.x` | `^2.x` | +| `^1.x` | `^1.x` | + + +Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin +in the table above. +See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details. + +## Usage + +```js +const fastify = require('fastify')({logger: true}) +const path = require('node:path') + +fastify.register(require('@fastify/static'), { + root: path.join(__dirname, 'public'), + prefix: '/public/', // optional: default '/' + constraints: { host: 'example.com' } // optional: default {} +}) + +fastify.get('/another/path', function (req, reply) { + reply.sendFile('myHtml.html') // serving path.join(__dirname, 'public', 'myHtml.html') directly +}) + +fastify.get('/another/patch-async', async function (req, reply) { + return reply.sendFile('myHtml.html') +}) + +fastify.get('/path/with/different/root', function (req, reply) { + reply.sendFile('myHtml.html', path.join(__dirname, 'build')) // serving a file from a different root location +}) + +fastify.get('/another/path', function (req, reply) { + reply.sendFile('myHtml.html', { cacheControl: false }) // overriding the options disabling cache-control headers +}) + +// Run the server! +fastify.listen({ port: 3000 }, (err, address) => { + if (err) throw err + // Server is now listening on ${address} +}) +``` + +### Multiple prefixed roots + +```js +const fastify = require('fastify')() +const fastifyStatic = require('@fastify/static') +const path = require('node:path') +// first plugin +fastify.register(fastifyStatic, { + root: path.join(__dirname, 'public') +}) + +// second plugin +fastify.register(fastifyStatic, { + root: path.join(__dirname, 'node_modules'), + prefix: '/node_modules/', + decorateReply: false // the reply decorator has been added by the first plugin registration +}) + +``` + +### Sending a file with `content-disposition` header + +```js +const fastify = require('fastify')() +const path = require('node:path') + +fastify.register(require('@fastify/static'), { + root: path.join(__dirname, 'public'), + prefix: '/public/', // optional: default '/' +}) + +fastify.get('/another/path', function (req, reply) { + reply.download('myHtml.html', 'custom-filename.html') // sending path.join(__dirname, 'public', 'myHtml.html') directly with custom filename +}) + +fastify.get('another/patch-async', async function (req, reply) { + // an async handler must always return the reply object + return reply.download('myHtml.html', 'custom-filename.html') +}) + +fastify.get('/path/without/cache/control', function (req, reply) { + reply.download('myHtml.html', { cacheControl: false }) // serving a file disabling cache-control headers +}) + +fastify.get('/path/without/cache/control', function (req, reply) { + reply.download('myHtml.html', 'custom-filename.html', { cacheControl: false }) +}) + +``` + +### Managing cache-control headers + +Production sites should use a reverse-proxy to manage caching headers. +However, here is an example of using fastify-static to host a Single Page Application (for example a [vite.js](https://vite.dev/) build) with sane caching. + +```js +fastify.register(require('@fastify/static'), { + root: path.join(import.meta.dirname, 'dist'), // import.meta.dirname node.js >= v20.11.0 + // By default all assets are immutable and can be cached for a long period due to cache bursting techniques + maxAge: '30d', + immutable: true, +}) + +// Explicitly reduce caching of assets that don't use cache bursting techniques +fastify.get('/', function (req, reply) { + // index.html should never be cached + reply.sendFile('index.html', {maxAge: 0, immutable: false}) +}) + +fastify.get('/favicon.ico', function (req, reply) { + // favicon can be cached for a short period + reply.sendFile('favicon.ico', {maxAge: '1d', immutable: false}) +}) +``` + +### Options + +#### `root` (required) + +The absolute path of the directory containing the files to serve. +The file to serve is determined by combining `req.url` with the +root directory. + +An array of directories can be provided to serve multiple static directories +under a single prefix. Files are served in a "first found, first served" manner, +so list directories in order of priority. Duplicate paths will raise an error. + +#### `prefix` + +Default: `'/'` + +A URL path prefix used to create a virtual mount path for the static directory. + +#### `constraints` + +Default: `{}` + +Constraints to add to registered routes. See Fastify's documentation for +[route constraints](https://fastify.dev/docs/latest/Reference/Routes/#constraints). + +#### `logLevel` + +Default: `info` + +Set log level for registered routes. + +#### `prefixAvoidTrailingSlash` + +Default: `false` + +If `false`, the prefix gets a trailing "/". If `true`, no trailing "/" is added to the prefix. + +#### `schemaHide` + +Default: `true` + +A flag that defines if the fastify route hide-schema attribute is hidden or not. + +#### `setHeaders` + +Default: `undefined` + +A function to set custom headers on the response. Alterations to the headers +must be done synchronously. The function is called as `fn(res, path, stat)`, +with the arguments: + +- `res` The response object. +- `path` The path of the file that is being sent. +- `stat` The stat object of the file that is being sent. + +#### `send` Options + +The following options are also supported and will be passed directly to the +[`@fastify/send`](https://www.npmjs.com/package/@fastify/send) module: + +- [`acceptRanges`](https://www.npmjs.com/package/@fastify/send#acceptranges) +- [`contentType`](https://www.npmjs.com/package/@fastify/send#contenttype) +- [`cacheControl`](https://www.npmjs.com/package/@fastify/send#cachecontrol) - Enable or disable setting Cache-Control response header (defaults to `true`). To provide a custom Cache-Control header, set this option to false +- [`dotfiles`](https://www.npmjs.com/package/@fastify/send#dotfiles) +- [`etag`](https://www.npmjs.com/package/@fastify/send#etag) +- [`extensions`](https://www.npmjs.com/package/@fastify/send#extensions) +- [`immutable`](https://www.npmjs.com/package/@fastify/send#immutable) +- [`index`](https://www.npmjs.com/package/@fastify/send#index) +- [`lastModified`](https://www.npmjs.com/package/@fastify/send#lastmodified) +- [`maxAge`](https://www.npmjs.com/package/@fastify/send#maxage) + +These options can be altered when calling `reply.sendFile('filename.html', options)` or `reply.sendFile('filename.html', 'otherfilename.html', options)` on each response. + +#### `redirect` + +Default: `false` + +If set to `true`, `@fastify/static` redirects to the directory with a trailing slash. + +This option cannot be `true` if `wildcard` is `false` and `ignoreTrailingSlash` is `true`. + +If `false`, requesting directories without a trailing slash triggers the app's 404 handler using `reply.callNotFound()`. + +#### `wildcard` + +Default: `true` + +If `true`, `@fastify/static` adds a wildcard route to serve files. +If `false`, it globs the filesystem for all defined files in the +served folder (`${root}/**/**`) and creates the necessary routes, +but will not serve newly added files. + +The default options of [`glob`](https://www.npmjs.com/package/glob) +are applied for getting the file list. + +This option cannot be `false` if `redirect` is `true` and `ignoreTrailingSlash` is `true`. + +#### `globIgnore` + +Default: `undefined` + +This is passed to [`glob`](https://www.npmjs.com/package/glob) +as the `ignore` option. It can be used to ignore files or directories +when using the `wildcard: false` option. + +#### `allowedPath` + +Default: `(pathName, root, request) => true` + +This function filters served files. Using the request object, complex path authentication is possible. +Returning `true` serves the file; returning `false` calls Fastify's 404 handler. + +#### `index` + +Default: `undefined` + +Under the hood, [`@fastify/send`](https://www.npmjs.com/package/@fastify/send) supports "index.html" files by default. +To disable this, set `false`, or supply a new index by passing a string or an array in preferred order. + +#### `serveDotFiles` + +Default: `false` + +If `true`, serves files in hidden directories (e.g., `.foo`). + +#### `list` + +Default: `undefined` + +If set, provides the directory list by calling the directory path. +Default response is JSON. + +Multi-root is not supported within the `list` option. + +If `dotfiles` is `deny` or `ignore`, dotfiles are excluded. + +Example: + +```js +fastify.register(require('@fastify/static'), { + root: path.join(__dirname, 'public'), + prefix: '/public/', + index: false + list: true +}) +``` + +Request + +```bash +GET /public +``` + +Response + +```json +{ "dirs": ["dir1", "dir2"], "files": ["file1.png", "file2.txt"] } +``` + +#### `list.format` + +Default: `json` + +Options: `html`, `json` + +Directory list can be in `html` format; in that case, `list.render` function is required. + +This option can be overridden by the URL parameter `format`. Options are `html` and `json`. + +```bash +GET /public/assets?format=json +``` + +Returns the response as JSON, regardless of `list.format`. + +Example: + +```js +fastify.register(require('@fastify/static'), { + root: path.join(__dirname, 'public'), + prefix: '/public/', + list: { + format: 'html', + render: (dirs, files) => { + return ` + + + + +` + }, + } +}) +``` + +Request + +```bash +GET /public +``` + +Response + +```html + + + + +``` + +#### `list.names` + +Default: `['']` + +Directory list can respond to different routes declared in `list.names`. + +> 🛈 Note: If a file with the same name exists, the actual file is sent. + +Example: + +```js +fastify.register(require('@fastify/static'), { + root: path.join(__dirname, '/static'), + prefix: '/public', + prefixAvoidTrailingSlash: true, + list: { + format: 'json', + names: ['index', 'index.json', '/'] + } +}) +``` + +Dir list respond with the same content to: + +```bash +GET /public +GET /public/ +GET /public/index +GET /public/index.json +``` + +#### `list.extendedFolderInfo` + +Default: `undefined` + +If `true`, extended information for folders will be accessible in `list.render` and the JSON response. + +```js +render(dirs, files) { + const dir = dirs[0]; + dir.fileCount // number of files in this folder + dir.totalFileCount // number of files in this folder (recursive) + dir.folderCount // number of folders in this folder + dir.totalFolderCount // number of folders in this folder (recursive) + dir.totalSize // size of all files in this folder (recursive) + dir.lastModified // most recent last modified timestamp of all files in this folder (recursive) +} +``` + +> ⚠ Warning: This will slightly decrease the performance, especially for deeply nested file structures. + +#### `list.jsonFormat` + +Default: `names` + +Options: `names`, `extended` + +Determines the output format when `json` is selected. + +`names`: +```json +{ + "dirs": [ + "dir1", + "dir2" + ], + "files": [ + "file1.txt", + "file2.txt" + ] +} +``` + +`extended`: +```json +{ + "dirs": [ + { + "name": "dir1", + "stats": { + "dev": 2100, + "size": 4096 + }, + "extendedInfo": { + "fileCount": 4, + "totalSize": 51233 + } + } + ], + "files": [ + { + "name": "file1.txt", + "stats": { + "dev": 2200, + "size": 554 + } + } + ] +} +``` + +#### `preCompressed` + +Default: `false` + +First, try to send the brotli encoded asset (if supported by `Accept-Encoding` headers), then gzip, and finally the original `pathname`. Skip compression for smaller files that do not benefit from it. + +Assume this structure with the compressed asset as a sibling of the uncompressed counterpart: + +``` +./public +├── main.js +├── main.js.br +├── main.js.gz +├── crit.css +├── crit.css.gz +└── index.html +``` + +#### Disable serving + +To use only the reply decorator without serving directories, pass `{ serve: false }`. +This prevents the plugin from serving everything under `root`. + +#### Disabling reply decorator + +The reply object is decorated with a `sendFile` function by default. To disable this, +pass `{ decorateReply: false }`. If `@fastify/static` is registered to multiple prefixes +in the same route, only one can initialize reply decorators. + +#### Handling 404s + +If a request matches the URL `prefix` but no file is found, Fastify's 404 +handler is called. Set a custom 404 handler with [`fastify.setNotFoundHandler()`](https://fastify.dev/docs/latest/Reference/Server/#setnotfoundhandler). + +When registering `@fastify/static` within an encapsulated context, the `wildcard` option may need to be set to `false` to support index resolution and nested not-found-handler: + +```js +const app = require('fastify')(); + +app.register((childContext, _, done) => { + childContext.register(require('@fastify/static'), { + root: path.join(__dirname, 'docs'), // docs is a folder that contains `index.html` and `404.html` + wildcard: false + }); + childContext.setNotFoundHandler((_, reply) => { + return reply.code(404).type('text/html').sendFile('404.html'); + }); + done(); +}, { prefix: 'docs' }); +``` + +This code will send the `index.html` for the paths `docs`, `docs/`, and `docs/index.html`. For all other `docs/` it will reply with `404.html`. + +### Handling Errors + +If an error occurs while sending a file, it is passed to Fastify's error handler. +Set a custom handler with [`fastify.setErrorHandler()`](https://fastify.dev/docs/latest/Reference/Server/#seterrorhandler). + +### Payload `stream.path` + +Access the file path inside the `onSend` hook using `payload.path`. + +```js +fastify.addHook('onSend', function (req, reply, payload, next) { + console.log(payload.path) + next() +}) +``` + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/eslint.config.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..449d56aa1a2cd194743f92022da2b1f072ffd848 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/eslint.config.js @@ -0,0 +1,7 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + noJsx: true, + ts: true, +}) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e65211595939b7f6311ced10d0e4d0a6dd337e78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/index.js @@ -0,0 +1,547 @@ +'use strict' + +const path = require('node:path') +const { fileURLToPath } = require('node:url') +const { statSync } = require('node:fs') +const { glob } = require('glob') +const fp = require('fastify-plugin') +const send = require('@fastify/send') +const encodingNegotiator = require('@fastify/accept-negotiator') +const contentDisposition = require('content-disposition') + +const dirList = require('./lib/dirList') + +const endForwardSlashRegex = /\/$/u +const asteriskRegex = /\*/gu + +const supportedEncodings = ['br', 'gzip', 'deflate'] +send.mime.default_type = 'application/octet-stream' + +async function fastifyStatic (fastify, opts) { + opts.root = normalizeRoot(opts.root) + checkRootPathForErrors(fastify, opts.root) + + const setHeaders = opts.setHeaders + if (setHeaders !== undefined && typeof setHeaders !== 'function') { + throw new TypeError('The `setHeaders` option must be a function') + } + + const invalidDirListOpts = dirList.validateOptions(opts) + if (invalidDirListOpts) { + throw invalidDirListOpts + } + + if (opts.dotfiles === undefined) { + opts.dotfiles = 'allow' + } + + const sendOptions = { + root: opts.root, + acceptRanges: opts.acceptRanges, + contentType: opts.contentType, + cacheControl: opts.cacheControl, + dotfiles: opts.dotfiles, + etag: opts.etag, + extensions: opts.extensions, + immutable: opts.immutable, + index: opts.index, + lastModified: opts.lastModified, + maxAge: opts.maxAge + } + + let prefix = opts.prefix ?? (opts.prefix = '/') + + if (!opts.prefixAvoidTrailingSlash) { + prefix = + prefix[prefix.length - 1] === '/' + ? prefix + : prefix + '/' + } + + // Set the schema hide property if defined in opts or true by default + const routeOpts = { + constraints: opts.constraints, + schema: { + hide: opts.schemaHide !== undefined ? opts.schemaHide : true + }, + logLevel: opts.logLevel, + errorHandler (error, request, reply) { + if (error?.code === 'ERR_STREAM_PREMATURE_CLOSE') { + reply.request.raw.destroy() + return + } + + fastify.errorHandler(error, request, reply) + } + } + + if (opts.decorateReply !== false) { + fastify.decorateReply('sendFile', function (filePath, rootPath, options) { + const opts = typeof rootPath === 'object' ? rootPath : options + const root = typeof rootPath === 'string' ? rootPath : opts?.root + pumpSendToReply( + this.request, + this, + filePath, + root || sendOptions.root, + 0, + opts + ) + return this + }) + + fastify.decorateReply( + 'download', + function (filePath, fileName, options = {}) { + const { root, ...opts } = + typeof fileName === 'object' ? fileName : options + fileName = typeof fileName === 'string' ? fileName : filePath + + // Set content disposition header + this.header('content-disposition', contentDisposition(fileName)) + + pumpSendToReply(this.request, this, filePath, root, 0, opts) + + return this + } + ) + } + + if (opts.serve !== false) { + if (opts.wildcard && typeof opts.wildcard !== 'boolean') { + throw new TypeError('"wildcard" option must be a boolean') + } + if (opts.wildcard === undefined || opts.wildcard === true) { + fastify.route({ + ...routeOpts, + method: ['HEAD', 'GET'], + path: prefix + '*', + handler (req, reply) { + pumpSendToReply(req, reply, '/' + req.params['*'], sendOptions.root) + } + }) + if (opts.redirect === true && prefix !== opts.prefix) { + fastify.get(opts.prefix, routeOpts, (req, reply) => { + reply.redirect(getRedirectUrl(req.raw.url), 301) + }) + } + } else { + const indexes = opts.index === undefined ? ['index.html'] : [].concat(opts.index) + const indexDirs = new Map() + const routes = new Set() + + const roots = Array.isArray(sendOptions.root) ? sendOptions.root : [sendOptions.root] + for (let rootPath of roots) { + rootPath = rootPath.split(path.win32.sep).join(path.posix.sep) + !rootPath.endsWith('/') && (rootPath += '/') + const files = await glob('**/**', { + cwd: rootPath, absolute: false, follow: true, nodir: true, dot: opts.serveDotFiles, ignore: opts.globIgnore + }) + + for (let file of files) { + file = file.split(path.win32.sep).join(path.posix.sep) + const route = prefix + file + + if (routes.has(route)) { + continue + } + + routes.add(route) + + setUpHeadAndGet(routeOpts, route, `/${file}`, rootPath) + + const key = path.posix.basename(route) + if (indexes.includes(key) && !indexDirs.has(key)) { + indexDirs.set(path.posix.dirname(route), rootPath) + } + } + } + + for (const [dirname, rootPath] of indexDirs.entries()) { + const pathname = dirname + (dirname.endsWith('/') ? '' : '/') + const file = '/' + pathname.replace(prefix, '') + setUpHeadAndGet(routeOpts, pathname, file, rootPath) + + if (opts.redirect === true) { + setUpHeadAndGet(routeOpts, pathname.replace(endForwardSlashRegex, ''), file.replace(endForwardSlashRegex, ''), rootPath) + } + } + } + } + + const allowedPath = opts.allowedPath + + async function pumpSendToReply ( + request, + reply, + pathname, + rootPath, + rootPathOffset = 0, + pumpOptions, + checkedEncodings + ) { + const pathnameOrig = pathname + const options = Object.assign({}, sendOptions, pumpOptions) + + if (rootPath) { + if (Array.isArray(rootPath)) { + options.root = rootPath[rootPathOffset] + } else { + options.root = rootPath + } + } + + if (allowedPath && !allowedPath(pathname, options.root, request)) { + return reply.callNotFound() + } + + let encoding + let pathnameForSend = pathname + + if (opts.preCompressed) { + /** + * We conditionally create this structure to track our attempts + * at sending pre-compressed assets + */ + if (!checkedEncodings) { + checkedEncodings = new Set() + } + + encoding = getEncodingHeader(request.headers, checkedEncodings) + + if (encoding) { + if (pathname.endsWith('/')) { + pathname = findIndexFile(pathname, options.root, options.index) + if (!pathname) { + return reply.callNotFound() + } + pathnameForSend = pathnameForSend + pathname + '.' + getEncodingExtension(encoding) + } else { + pathnameForSend = pathname + '.' + getEncodingExtension(encoding) + } + } + } + + // `send(..., path, ...)` will URI-decode path so we pass an encoded path here + const { + statusCode, + headers, + stream, + type, + metadata + } = await send(request.raw, encodeURI(pathnameForSend), options) + switch (type) { + case 'directory': { + const path = metadata.path + if (opts.list) { + await dirList.send({ + reply, + dir: path, + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)) + } + + if (opts.redirect === true) { + try { + reply.redirect(getRedirectUrl(request.raw.url), 301) + } /* c8 ignore start */ catch (error) { + // the try-catch here is actually unreachable, but we keep it for safety and prevent DoS attack + await reply.send(error) + } /* c8 ignore stop */ + } else { + // if is a directory path without a trailing slash, and has an index file, reply as if it has a trailing slash + if (!pathname.endsWith('/') && findIndexFile(pathname, options.root, options.index)) { + return pumpSendToReply( + request, + reply, + pathname + '/', + rootPath, + undefined, + undefined, + checkedEncodings + ) + } + + reply.callNotFound() + } + break + } + case 'error': { + if ( + statusCode === 403 && + (!options.index || !options.index.length) && + pathnameForSend[pathnameForSend.length - 1] === '/' + ) { + if (opts.list) { + await dirList.send({ + reply, + dir: dirList.path(opts.root, pathname), + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)) + return + } + } + + if (metadata.error.code === 'ENOENT') { + // when preCompress is enabled and the path is a directory without a trailing slash + if (opts.preCompressed && encoding) { + if (opts.redirect !== true) { + const indexPathname = findIndexFile(pathname, options.root, options.index) + if (indexPathname) { + return pumpSendToReply( + request, + reply, + pathname + '/', + rootPath, + undefined, + undefined, + checkedEncodings + ) + } + } + } + + // if file exists, send real file, otherwise send dir list if name match + if (opts.list && dirList.handle(pathname, opts.list)) { + await dirList.send({ + reply, + dir: dirList.path(opts.root, pathname), + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)) + return + } + + // root paths left to try? + if (Array.isArray(rootPath) && rootPathOffset < (rootPath.length - 1)) { + return pumpSendToReply(request, reply, pathname, rootPath, rootPathOffset + 1) + } + + if (opts.preCompressed && !checkedEncodings.has(encoding)) { + checkedEncodings.add(encoding) + return pumpSendToReply( + request, + reply, + pathnameOrig, + rootPath, + rootPathOffset, + undefined, + checkedEncodings + ) + } + + return reply.callNotFound() + } + + // The `send` library terminates the request with a 404 if the requested + // path contains a dotfile and `send` is initialized with `{dotfiles: + // 'ignore'}`. `send` aborts the request before getting far enough to + // check if the file exists (hence, a 404 `NotFoundError` instead of + // `ENOENT`). + // https://github.com/pillarjs/send/blob/de073ed3237ade9ff71c61673a34474b30e5d45b/index.js#L582 + if (metadata.error.status === 404) { + return reply.callNotFound() + } + + await reply.send(metadata.error) + break + } + case 'file': { + // reply.raw.statusCode by default 200 + // when ever the user changed it, we respect the status code + // otherwise use send provided status code + const newStatusCode = reply.statusCode !== 200 ? reply.statusCode : statusCode + reply.code(newStatusCode) + if (setHeaders !== undefined) { + setHeaders(reply.raw, metadata.path, metadata.stat) + } + reply.headers(headers) + if (encoding) { + reply.header('content-type', getContentType(pathname)) + reply.header('content-encoding', encoding) + } + await reply.send(stream) + break + } + } + } + + function setUpHeadAndGet (routeOpts, route, file, rootPath) { + const toSetUp = Object.assign({}, routeOpts, { + method: ['HEAD', 'GET'], + url: route, + handler: serveFileHandler + }) + toSetUp.config = toSetUp.config || {} + toSetUp.config.file = file + toSetUp.config.rootPath = rootPath + fastify.route(toSetUp) + } + + async function serveFileHandler (req, reply) { + // TODO: remove the fallback branch when bump major + /* c8 ignore next */ + const routeConfig = req.routeOptions?.config || req.routeConfig + return pumpSendToReply(req, reply, routeConfig.file, routeConfig.rootPath) + } +} + +function normalizeRoot (root) { + if (root === undefined) { + return root + } + if (root instanceof URL && root.protocol === 'file:') { + return fileURLToPath(root) + } + if (Array.isArray(root)) { + const result = [] + for (let i = 0, il = root.length; i < il; ++i) { + if (root[i] instanceof URL && root[i].protocol === 'file:') { + result.push(fileURLToPath(root[i])) + } else { + result.push(root[i]) + } + } + + return result + } + + return root +} + +function checkRootPathForErrors (fastify, rootPath) { + if (rootPath === undefined) { + throw new Error('"root" option is required') + } + + if (Array.isArray(rootPath)) { + if (!rootPath.length) { + throw new Error('"root" option array requires one or more paths') + } + + if (new Set(rootPath).size !== rootPath.length) { + throw new Error( + '"root" option array contains one or more duplicate paths' + ) + } + + // check each path and fail at first invalid + rootPath.map((path) => checkPath(fastify, path)) + return + } + + if (typeof rootPath === 'string') { + return checkPath(fastify, rootPath) + } + + throw new Error('"root" option must be a string or array of strings') +} + +function checkPath (fastify, rootPath) { + if (typeof rootPath !== 'string') { + throw new TypeError('"root" option must be a string') + } + if (path.isAbsolute(rootPath) === false) { + throw new Error('"root" option must be an absolute path') + } + + let pathStat + + try { + pathStat = statSync(rootPath) + } catch (e) { + if (e.code === 'ENOENT') { + fastify.log.warn(`"root" path "${rootPath}" must exist`) + return + } + + throw e + } + + if (pathStat.isDirectory() === false) { + throw new Error('"root" option must point to a directory') + } +} + +function getContentType (path) { + const type = send.mime.getType(path) || send.mime.default_type + + if (!send.isUtf8MimeType(type)) { + return type + } + return `${type}; charset=utf-8` +} + +function findIndexFile (pathname, root, indexFiles = ['index.html']) { + if (Array.isArray(indexFiles)) { + return indexFiles.find(filename => { + const p = path.join(root, pathname, filename) + try { + const stats = statSync(p) + return !stats.isDirectory() + } catch { + return false + } + }) + } + /* c8 ignore next */ + return false +} + +// Adapted from https://github.com/fastify/fastify-compress/blob/665e132fa63d3bf05ad37df3c20346660b71a857/index.js#L451 +function getEncodingHeader (headers, checked) { + if (!('accept-encoding' in headers)) return + + // consider the no-preference token as gzip for downstream compat + const header = headers['accept-encoding'].toLowerCase().replace(asteriskRegex, 'gzip') + + return encodingNegotiator.negotiate( + header, + supportedEncodings.filter((enc) => !checked.has(enc)) + ) +} + +function getEncodingExtension (encoding) { + switch (encoding) { + case 'br': + return 'br' + + case 'gzip': + return 'gz' + } +} + +function getRedirectUrl (url) { + let i = 0 + // we detect how many slash before a valid path + for (; i < url.length; ++i) { + if (url[i] !== '/' && url[i] !== '\\') break + } + // turns all leading / or \ into a single / + url = '/' + url.substr(i) + try { + const parsed = new URL(url, 'http://localhost.com/') + const parsedPathname = parsed.pathname + return parsedPathname + (parsedPathname[parsedPathname.length - 1] !== '/' ? '/' : '') + (parsed.search || '') + } /* c8 ignore start */ catch { + // the try-catch here is actually unreachable, but we keep it for safety and prevent DoS attack + const err = new Error(`Invalid redirect URL: ${url}`) + err.statusCode = 400 + throw err + } /* c8 ignore stop */ +} + +module.exports = fp(fastifyStatic, { + fastify: '5.x', + name: '@fastify/static' +}) +module.exports.default = fastifyStatic +module.exports.fastifyStatic = fastifyStatic diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1855675df826d198f5b002c0317c429ba30df997 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/@fastify/static/package.json @@ -0,0 +1,88 @@ +{ + "name": "@fastify/static", + "version": "8.2.0", + "description": "Plugin for serving static files as fast as possible.", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "scripts": { + "coverage": "c8 --reporter html borp --coverage --check-coverage --lines 100", + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:typescript": "tsd", + "test:unit": "borp -C --check-coverage --lines 100", + "example": "node example/server.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-static.git" + }, + "keywords": [ + "fastify", + "static" + ], + "author": "Tommaso Allevi - @allevo", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Manuel Spigolon", + "email": "behemoth89@gmail.com" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/fastify-static/issues" + }, + "homepage": "https://github.com/fastify/fastify-static", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "dependencies": { + "@fastify/accept-negotiator": "^2.0.0", + "@fastify/send": "^4.0.0", + "content-disposition": "^0.5.4", + "fastify-plugin": "^5.0.0", + "fastq": "^1.17.1", + "glob": "^11.0.0" + }, + "devDependencies": { + "@fastify/compress": "^8.0.0", + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "borp": "^0.20.0", + "c8": "^10.1.3", + "concat-stream": "^2.0.0", + "eslint": "^9.17.0", + "fastify": "^5.1.0", + "neostandard": "^0.12.0", + "pino": "^9.1.0", + "proxyquire": "^2.1.3", + "tsd": "^0.32.0" + }, + "tsd": { + "directory": "test/types" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..12b5309751dd50aeef72b96d10a9f81207d27066 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/index.d.ts @@ -0,0 +1,29 @@ +declare const stringWidth: { + /** + Get the visual width of a string - the number of columns required to display it. + + Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + + @example + ``` + import stringWidth = require('string-width'); + + stringWidth('a'); + //=> 1 + + stringWidth('古'); + //=> 2 + + stringWidth('\u001B[1m古\u001B[22m'); + //=> 2 + ``` + */ + (string: string): number; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function stringWidth(string: string): number; + // export = stringWidth; + default: typeof stringWidth; +} + +export = stringWidth; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width-cjs/license @@ -0,0 +1,9 @@ +MIT License + +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/string-width/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..aed9fdffeba549654c593fddf4fa587cbf8fa340 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/index.d.ts @@ -0,0 +1,29 @@ +export interface Options { + /** + Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). + + @default true + */ + readonly ambiguousIsNarrow: boolean; +} + +/** +Get the visual width of a string - the number of columns required to display it. + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +@example +``` +import stringWidth from 'string-width'; + +stringWidth('a'); +//=> 1 + +stringWidth('古'); +//=> 2 + +stringWidth('\u001B[1m古\u001B[22m'); +//=> 2 +``` +*/ +export default function stringWidth(string: string, options?: Options): number; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9294488f8848827dd983a82f0c3f5f0a04ec7570 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/index.js @@ -0,0 +1,54 @@ +import stripAnsi from 'strip-ansi'; +import eastAsianWidth from 'eastasianwidth'; +import emojiRegex from 'emoji-regex'; + +export default function stringWidth(string, options = {}) { + if (typeof string !== 'string' || string.length === 0) { + return 0; + } + + options = { + ambiguousIsNarrow: true, + ...options + }; + + string = stripAnsi(string); + + if (string.length === 0) { + return 0; + } + + string = string.replace(emojiRegex(), ' '); + + const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2; + let width = 0; + + for (const character of string) { + const codePoint = character.codePointAt(0); + + // Ignore control characters + if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (codePoint >= 0x300 && codePoint <= 0x36F) { + continue; + } + + const code = eastAsianWidth.eastAsianWidth(character); + switch (code) { + case 'F': + case 'W': + width += 2; + break; + case 'A': + width += ambiguousCharacterWidth; + break; + default: + width += 1; + } + } + + return width; +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://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/string-width/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f46d6770f9ebb20e518ce2a123a953895e3d654a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/package.json @@ -0,0 +1,59 @@ +{ + "name": "string-width", + "version": "5.1.2", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "string", + "character", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "devDependencies": { + "ava": "^3.15.0", + "tsd": "^0.14.0", + "xo": "^0.38.2" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/readme.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..52910df1abb07b55b5397861bc2ee1731d7899e4 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/string-width/readme.md @@ -0,0 +1,67 @@ +# string-width + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + +## Install + +``` +$ npm install string-width +``` + +## Usage + +```js +import stringWidth from 'string-width'; + +stringWidth('a'); +//=> 1 + +stringWidth('古'); +//=> 2 + +stringWidth('\u001B[1m古\u001B[22m'); +//=> 2 +``` + +## API + +### stringWidth(string, options?) + +#### string + +Type: `string` + +The string to be counted. + +#### options + +Type: `object` + +##### ambiguousIsNarrow + +Type: `boolean`\ +Default: `false` + +Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..907fccc29269ebcd49141fa8a4513be3b6a8d270 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.d.ts @@ -0,0 +1,17 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +declare function stripAnsi(string: string): string; + +export = stripAnsi; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9a593dfcd1fd5c9e627d9ff2ed85a88df9a41a99 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/license @@ -0,0 +1,9 @@ +MIT License + +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/strip-ansi-cjs/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1a41108d42831c9c156fdcc4e6cd8c2539983ccd --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/readme.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..7c4b56d46ddc72a3a627a5fd8f3dfcad8c9b599e --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi-cjs/readme.md @@ -0,0 +1,46 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..44e954d0c724d82e07bbb484f05fcbf817347b03 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,15 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +export default function stripAnsi(string: string): string; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ba19750e64e061f4f7afa8dbd468234b1770efbc --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/index.js @@ -0,0 +1,14 @@ +import ansiRegex from 'ansi-regex'; + +const regex = ansiRegex(); + +export default function stripAnsi(string) { + if (typeof string !== 'string') { + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + } + + // Even though the regex is global, we don't need to reset the `.lastIndex` + // because unlike `.exec()` and `.test()`, `.replace()` does it automatically + // and doing it manually has a performance penalty. + return string.replace(regex, ''); +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://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/strip-ansi/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e1f455c325b0073da71b0594ebb4a0e84c6f8f43 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/package.json @@ -0,0 +1,57 @@ +{ + "name": "strip-ansi", + "version": "7.1.0", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "funding": "https://github.com/chalk/strip-ansi?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "devDependencies": { + "ava": "^3.15.0", + "tsd": "^0.17.0", + "xo": "^0.44.0" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/readme.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..562785107bf259e021a4b4737108aae9a64ebb78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-ansi/readme.md @@ -0,0 +1,41 @@ +# strip-ansi + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + +## Install + +``` +$ npm install strip-ansi +``` + +## Usage + +```js +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/index.js new file mode 100644 index 0000000000000000000000000000000000000000..a17d0afd33fee8d56cda15fe58e49c8cc385596b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/license b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/license new file mode 100644 index 0000000000000000000000000000000000000000..654d0bfe943437d43242325b1fbcff5f400d84ee --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/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/strip-eof/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/package.json new file mode 100644 index 0000000000000000000000000000000000000000..36b88cdcfe0d8c22ed045dfc55e0fdde31d4e818 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/package.json @@ -0,0 +1,39 @@ +{ + "name": "strip-eof", + "version": "1.0.0", + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "license": "MIT", + "repository": "sindresorhus/strip-eof", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "delete", + "eof", + "end", + "file", + "newline", + "linebreak", + "character", + "string", + "buffer" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/readme.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..45ffe04362c26801c2109f44fdfd8f9c11b9a99d --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.eslintrc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..346ffeca87d3784723773d39f9e52b8c6d12f8c3 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.nycrc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000000000000000000000000000000000000..bdd626ce91477abbdd489b79988baebadbd3c897 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..61f607f4894beba4e0693c72a6446bf3497bb318 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2e7b9a3eacf263cb418f4c16b087290ef78c39b2 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +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/supports-preserve-symlinks-flag/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb05b124ca68ba0312c98834f282a2cd6ce568b5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/browser.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000000000000000000000000000000000000..087be1fe9fda8930ca66a68204bd0112b9d8710b --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000000000000000000000000000000000000..86fd5d331c4a4d44e9a92d46fbb637165cea78d5 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000000000000000000000000000000000000..56edadcaad850fa1f348aeb0988e98d16eb14a84 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/.taprc b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/.taprc new file mode 100644 index 0000000000000000000000000000000000000000..954e8544e393901ab84870e3b9d60207d1a7be78 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/.taprc @@ -0,0 +1,4 @@ +jobs: 1 +check-coverage: false +# in seconds +timeout: 60 diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/LICENSE b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2c1a038fd1e9b4fe7f936bdf9509406236d6a767 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Matteo Collina + +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/thread-stream/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/README.md new file mode 100644 index 0000000000000000000000000000000000000000..80d1b3f8f1fb00062f498ae2422dddc299b96ce8 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/README.md @@ -0,0 +1,135 @@ +# thread-stream +[![npm version](https://img.shields.io/npm/v/thread-stream)](https://www.npmjs.com/package/thread-stream) +[![Build Status](https://img.shields.io/github/actions/workflow/status/pinojs/thread-stream/ci.yml?branch=main)](https://github.com/pinojs/thread-stream/actions) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) + +A streaming way to send data to a Node.js Worker Thread. + +## install + +```sh +npm i thread-stream +``` + +## Usage + +```js +'use strict' + +const ThreadStream = require('thread-stream') +const { join } = require('path') + +const stream = new ThreadStream({ + filename: join(__dirname, 'worker.js'), + workerData: { dest }, + workerOpts: {}, // Other options to be passed to Worker + sync: false, // default +}) + +stream.write('hello') + +// Asynchronous flushing +stream.flush(function () { + stream.write(' ') + stream.write('world') + + // Synchronous flushing + stream.flushSync() + stream.end() +}) +``` + +In `worker.js`: + +```js +'use strict' + +const fs = require('fs') +const { once } = require('events') + +async function run (opts) { + const stream = fs.createWriteStream(opts.dest) + await once(stream, 'open') + return stream +} + +module.exports = run +``` + +Make sure that the stream emits `'close'` when the stream completes. +This can usually be achieved by passing the [`autoDestroy: true`](https://nodejs.org/api/stream.html#stream_new_stream_writable_options) +flag your stream classes. + +The underlining worker is automatically closed if the stream is garbage collected. + + +### External modules + +You may use this module within compatible external modules, that exports the `worker.js` interface. + +```js +const ThreadStream = require('thread-stream') + +const modulePath = require.resolve('pino-elasticsearch') + +const stream = new ThreadStream({ + filename: modulePath, + workerData: { node: 'http://localhost:9200' } +}) + +stream.write('log to elasticsearch!') +stream.flushSync() +stream.end() +``` + +This module works with `yarn` in PnP (plug'n play) mode too! + +### Emit events + +You can emit events on the ThreadStream from your worker using [`worker.parentPort.postMessage()`](https://nodejs.org/api/worker_threads.html#workerparentport). +The message (JSON object) must have the following data structure: + +```js +parentPort.postMessage({ + code: 'EVENT', + name: 'eventName', + args: ['list', 'of', 'args', 123, new Error('Boom')] +}) +``` + +On your ThreadStream, you can add a listener function for this event name: + +```js +const stream = new ThreadStream({ + filename: join(__dirname, 'worker.js'), + workerData: {}, +}) +stream.on('eventName', function (a, b, c, n, err) { + console.log('received:', a, b, c, n, err) // received: list of args 123 Error: Boom +}) +``` + +### Post Messages + +You can post messages to the worker by emitting a `message` event on the ThreadStream. + +```js +const stream = new ThreadStream({ + filename: join(__dirname, 'worker.js'), + workerData: {}, +}) +stream.emit('message', message) +``` + +On your worker, you can listen for this message using [`worker.parentPort.on('message', cb)`](https://nodejs.org/api/worker_threads.html#event-message). + +```js +const { parentPort } = require('worker_threads') +parentPort.on('message', function (message) { + console.log('received:', message) +}) +``` + +## License + +MIT diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/bench.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/bench.js new file mode 100644 index 0000000000000000000000000000000000000000..f13454ce1e9bc7517900863b201e0a9bd68d6d9a --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/bench.js @@ -0,0 +1,85 @@ +'use strict' + +const bench = require('fastbench') +const SonicBoom = require('sonic-boom') +const ThreadStream = require('.') +const Console = require('console').Console +const fs = require('fs') +const { join } = require('path') + +const core = fs.createWriteStream('/dev/null') +const fd = fs.openSync('/dev/null', 'w') +const sonic = new SonicBoom({ fd }) +const sonicSync = new SonicBoom({ fd, sync: true }) +const out = fs.createWriteStream('/dev/null') +const dummyConsole = new Console(out) +const threadStreamSync = new ThreadStream({ + filename: join(__dirname, 'test', 'to-file.js'), + workerData: { dest: '/dev/null' }, + bufferSize: 4 * 1024 * 1024, + sync: true +}) +const threadStreamAsync = new ThreadStream({ + filename: join(__dirname, 'test', 'to-file.js'), + workerData: { dest: '/dev/null' }, + bufferSize: 4 * 1024 * 1024, + sync: false +}) + +const MAX = 10000 + +let str = '' + +for (let i = 0; i < 100; i++) { + str += 'hello' +} + +setTimeout(doBench, 100) + +const run = bench([ + function benchThreadStreamSync (cb) { + for (let i = 0; i < MAX; i++) { + threadStreamSync.write(str) + } + setImmediate(cb) + }, + function benchThreadStreamAsync (cb) { + threadStreamAsync.once('drain', cb) + for (let i = 0; i < MAX; i++) { + threadStreamAsync.write(str) + } + }, + function benchSonic (cb) { + sonic.once('drain', cb) + for (let i = 0; i < MAX; i++) { + sonic.write(str) + } + }, + function benchSonicSync (cb) { + sonicSync.once('drain', cb) + for (let i = 0; i < MAX; i++) { + sonicSync.write(str) + } + }, + function benchCore (cb) { + core.once('drain', cb) + for (let i = 0; i < MAX; i++) { + core.write(str) + } + }, + function benchConsole (cb) { + for (let i = 0; i < MAX; i++) { + dummyConsole.log(str) + } + setImmediate(cb) + } +], 1000) + +function doBench () { + run(function () { + run(function () { + // TODO figure out why it does not shut down + process.exit(0) + }) + }) +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/index.js b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/index.js new file mode 100644 index 0000000000000000000000000000000000000000..bf8b38755e7ca591bf962facc82794de13fe9536 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/index.js @@ -0,0 +1,537 @@ +'use strict' + +const { version } = require('./package.json') +const { EventEmitter } = require('events') +const { Worker } = require('worker_threads') +const { join } = require('path') +const { pathToFileURL } = require('url') +const { wait } = require('./lib/wait') +const { + WRITE_INDEX, + READ_INDEX +} = require('./lib/indexes') +const buffer = require('buffer') +const assert = require('assert') + +const kImpl = Symbol('kImpl') + +// V8 limit for string size +const MAX_STRING = buffer.constants.MAX_STRING_LENGTH + +class FakeWeakRef { + constructor (value) { + this._value = value + } + + deref () { + return this._value + } +} + +class FakeFinalizationRegistry { + register () {} + + unregister () {} +} + +// Currently using FinalizationRegistry with code coverage breaks the world +// Ref: https://github.com/nodejs/node/issues/49344 +const FinalizationRegistry = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry +const WeakRef = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef + +const registry = new FinalizationRegistry((worker) => { + if (worker.exited) { + return + } + worker.terminate() +}) + +function createWorker (stream, opts) { + const { filename, workerData } = opts + + const bundlerOverrides = '__bundlerPathsOverrides' in globalThis ? globalThis.__bundlerPathsOverrides : {} + const toExecute = bundlerOverrides['thread-stream-worker'] || join(__dirname, 'lib', 'worker.js') + + const worker = new Worker(toExecute, { + ...opts.workerOpts, + trackUnmanagedFds: false, + workerData: { + filename: filename.indexOf('file://') === 0 + ? filename + : pathToFileURL(filename).href, + dataBuf: stream[kImpl].dataBuf, + stateBuf: stream[kImpl].stateBuf, + workerData: { + $context: { + threadStreamVersion: version + }, + ...workerData + } + } + }) + + // We keep a strong reference for now, + // we need to start writing first + worker.stream = new FakeWeakRef(stream) + + worker.on('message', onWorkerMessage) + worker.on('exit', onWorkerExit) + registry.register(stream, worker) + + return worker +} + +function drain (stream) { + assert(!stream[kImpl].sync) + if (stream[kImpl].needDrain) { + stream[kImpl].needDrain = false + stream.emit('drain') + } +} + +function nextFlush (stream) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) + let leftover = stream[kImpl].data.length - writeIndex + + if (leftover > 0) { + if (stream[kImpl].buf.length === 0) { + stream[kImpl].flushing = false + + if (stream[kImpl].ending) { + end(stream) + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream) + } + + return + } + + let toWrite = stream[kImpl].buf.slice(0, leftover) + let toWriteBytes = Buffer.byteLength(toWrite) + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover) + // process._rawDebug('writing ' + toWrite.length) + write(stream, toWrite, nextFlush.bind(null, stream)) + } else { + // multi-byte utf-8 + stream.flush(() => { + // err is already handled in flush() + if (stream.destroyed) { + return + } + + Atomics.store(stream[kImpl].state, READ_INDEX, 0) + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) + + // Find a toWrite length that fits the buffer + // it must exists as the buffer is at least 4 bytes length + // and the max utf-8 length for a char is 4 bytes. + while (toWriteBytes > stream[kImpl].data.length) { + leftover = leftover / 2 + toWrite = stream[kImpl].buf.slice(0, leftover) + toWriteBytes = Buffer.byteLength(toWrite) + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover) + write(stream, toWrite, nextFlush.bind(null, stream)) + }) + } + } else if (leftover === 0) { + if (writeIndex === 0 && stream[kImpl].buf.length === 0) { + // we had a flushSync in the meanwhile + return + } + stream.flush(() => { + Atomics.store(stream[kImpl].state, READ_INDEX, 0) + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) + nextFlush(stream) + }) + } else { + // This should never happen + destroy(stream, new Error('overwritten')) + } +} + +function onWorkerMessage (msg) { + const stream = this.stream.deref() + if (stream === undefined) { + this.exited = true + // Terminate the worker. + this.terminate() + return + } + + switch (msg.code) { + case 'READY': + // Replace the FakeWeakRef with a + // proper one. + this.stream = new WeakRef(stream) + + stream.flush(() => { + stream[kImpl].ready = true + stream.emit('ready') + }) + break + case 'ERROR': + destroy(stream, msg.err) + break + case 'EVENT': + if (Array.isArray(msg.args)) { + stream.emit(msg.name, ...msg.args) + } else { + stream.emit(msg.name, msg.args) + } + break + case 'WARNING': + process.emitWarning(msg.err) + break + default: + destroy(stream, new Error('this should not happen: ' + msg.code)) + } +} + +function onWorkerExit (code) { + const stream = this.stream.deref() + if (stream === undefined) { + // Nothing to do, the worker already exit + return + } + registry.unregister(stream) + stream.worker.exited = true + stream.worker.off('exit', onWorkerExit) + destroy(stream, code !== 0 ? new Error('the worker thread exited') : null) +} + +class ThreadStream extends EventEmitter { + constructor (opts = {}) { + super() + + if (opts.bufferSize < 4) { + throw new Error('bufferSize must at least fit a 4-byte utf-8 char') + } + + this[kImpl] = {} + this[kImpl].stateBuf = new SharedArrayBuffer(128) + this[kImpl].state = new Int32Array(this[kImpl].stateBuf) + this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024) + this[kImpl].data = Buffer.from(this[kImpl].dataBuf) + this[kImpl].sync = opts.sync || false + this[kImpl].ending = false + this[kImpl].ended = false + this[kImpl].needDrain = false + this[kImpl].destroyed = false + this[kImpl].flushing = false + this[kImpl].ready = false + this[kImpl].finished = false + this[kImpl].errored = null + this[kImpl].closed = false + this[kImpl].buf = '' + + // TODO (fix): Make private? + this.worker = createWorker(this, opts) // TODO (fix): make private + this.on('message', (message, transferList) => { + this.worker.postMessage(message, transferList) + }) + } + + write (data) { + if (this[kImpl].destroyed) { + error(this, new Error('the worker has exited')) + return false + } + + if (this[kImpl].ending) { + error(this, new Error('the worker is ending')) + return false + } + + if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { + try { + writeSync(this) + this[kImpl].flushing = true + } catch (err) { + destroy(this, err) + return false + } + } + + this[kImpl].buf += data + + if (this[kImpl].sync) { + try { + writeSync(this) + return true + } catch (err) { + destroy(this, err) + return false + } + } + + if (!this[kImpl].flushing) { + this[kImpl].flushing = true + setImmediate(nextFlush, this) + } + + this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0 + return !this[kImpl].needDrain + } + + end () { + if (this[kImpl].destroyed) { + return + } + + this[kImpl].ending = true + end(this) + } + + flush (cb) { + if (this[kImpl].destroyed) { + if (typeof cb === 'function') { + process.nextTick(cb, new Error('the worker has exited')) + } + return + } + + // TODO write all .buf + const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX) + // process._rawDebug(`(flush) readIndex (${Atomics.load(this.state, READ_INDEX)}) writeIndex (${Atomics.load(this.state, WRITE_INDEX)})`) + wait(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { + if (err) { + destroy(this, err) + process.nextTick(cb, err) + return + } + if (res === 'not-equal') { + // TODO handle deadlock + this.flush(cb) + return + } + process.nextTick(cb) + }) + } + + flushSync () { + if (this[kImpl].destroyed) { + return + } + + writeSync(this) + flushSync(this) + } + + unref () { + this.worker.unref() + } + + ref () { + this.worker.ref() + } + + get ready () { + return this[kImpl].ready + } + + get destroyed () { + return this[kImpl].destroyed + } + + get closed () { + return this[kImpl].closed + } + + get writable () { + return !this[kImpl].destroyed && !this[kImpl].ending + } + + get writableEnded () { + return this[kImpl].ending + } + + get writableFinished () { + return this[kImpl].finished + } + + get writableNeedDrain () { + return this[kImpl].needDrain + } + + get writableObjectMode () { + return false + } + + get writableErrored () { + return this[kImpl].errored + } +} + +function error (stream, err) { + setImmediate(() => { + stream.emit('error', err) + }) +} + +function destroy (stream, err) { + if (stream[kImpl].destroyed) { + return + } + stream[kImpl].destroyed = true + + if (err) { + stream[kImpl].errored = err + error(stream, err) + } + + if (!stream.worker.exited) { + stream.worker.terminate() + .catch(() => {}) + .then(() => { + stream[kImpl].closed = true + stream.emit('close') + }) + } else { + setImmediate(() => { + stream[kImpl].closed = true + stream.emit('close') + }) + } +} + +function write (stream, data, cb) { + // data is smaller than the shared buffer length + const current = Atomics.load(stream[kImpl].state, WRITE_INDEX) + const length = Buffer.byteLength(data) + stream[kImpl].data.write(data, current) + Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length) + Atomics.notify(stream[kImpl].state, WRITE_INDEX) + cb() + return true +} + +function end (stream) { + if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { + return + } + stream[kImpl].ended = true + + try { + stream.flushSync() + + let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) + + // process._rawDebug('writing index') + Atomics.store(stream[kImpl].state, WRITE_INDEX, -1) + // process._rawDebug(`(end) readIndex (${Atomics.load(stream.state, READ_INDEX)}) writeIndex (${Atomics.load(stream.state, WRITE_INDEX)})`) + Atomics.notify(stream[kImpl].state, WRITE_INDEX) + + // Wait for the process to complete + let spins = 0 + while (readIndex !== -1) { + // process._rawDebug(`read = ${read}`) + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) + readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) + + if (readIndex === -2) { + destroy(stream, new Error('end() failed')) + return + } + + if (++spins === 10) { + destroy(stream, new Error('end() took too long (10s)')) + return + } + } + + process.nextTick(() => { + stream[kImpl].finished = true + stream.emit('finish') + }) + } catch (err) { + destroy(stream, err) + } + // process._rawDebug('end finished...') +} + +function writeSync (stream) { + const cb = () => { + if (stream[kImpl].ending) { + end(stream) + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream) + } + } + stream[kImpl].flushing = false + + while (stream[kImpl].buf.length !== 0) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) + let leftover = stream[kImpl].data.length - writeIndex + if (leftover === 0) { + flushSync(stream) + Atomics.store(stream[kImpl].state, READ_INDEX, 0) + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) + continue + } else if (leftover < 0) { + // stream should never happen + throw new Error('overwritten') + } + + let toWrite = stream[kImpl].buf.slice(0, leftover) + let toWriteBytes = Buffer.byteLength(toWrite) + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover) + // process._rawDebug('writing ' + toWrite.length) + write(stream, toWrite, cb) + } else { + // multi-byte utf-8 + flushSync(stream) + Atomics.store(stream[kImpl].state, READ_INDEX, 0) + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) + + // Find a toWrite length that fits the buffer + // it must exists as the buffer is at least 4 bytes length + // and the max utf-8 length for a char is 4 bytes. + while (toWriteBytes > stream[kImpl].buf.length) { + leftover = leftover / 2 + toWrite = stream[kImpl].buf.slice(0, leftover) + toWriteBytes = Buffer.byteLength(toWrite) + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover) + write(stream, toWrite, cb) + } + } +} + +function flushSync (stream) { + if (stream[kImpl].flushing) { + throw new Error('unable to flush while flushing') + } + + // process._rawDebug('flushSync started') + + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) + + let spins = 0 + + // TODO handle deadlock + while (true) { + const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) + + if (readIndex === -2) { + throw Error('_flushSync failed') + } + + // process._rawDebug(`(flushSync) readIndex (${readIndex}) writeIndex (${writeIndex})`) + if (readIndex !== writeIndex) { + // TODO stream timeouts for some reason. + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) + } else { + break + } + + if (++spins === 10) { + throw new Error('_flushSync took too long (10s)') + } + } + // process._rawDebug('flushSync finished') +} + +module.exports = ThreadStream diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/package.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1c9f718db64f0464e655d5a0777d75f222eb9d83 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/thread-stream/package.json @@ -0,0 +1,57 @@ +{ + "name": "thread-stream", + "version": "3.1.0", + "description": "A streaming way to send data to a Node.js Worker Thread", + "main": "index.js", + "types": "index.d.ts", + "dependencies": { + "real-require": "^0.2.0" + }, + "devDependencies": { + "@types/node": "^20.1.0", + "@types/tap": "^15.0.0", + "@yao-pkg/pkg": "^5.11.5", + "desm": "^1.3.0", + "fastbench": "^1.0.1", + "husky": "^9.0.6", + "pino-elasticsearch": "^8.0.0", + "sonic-boom": "^4.0.1", + "standard": "^17.0.0", + "tap": "^16.2.0", + "ts-node": "^10.8.0", + "typescript": "^5.3.2", + "why-is-node-running": "^2.2.2" + }, + "scripts": { + "build": "tsc --noEmit", + "test": "standard && npm run build && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts", + "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts", + "test:ci:js": "tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \"test/**/*.test.*js\"", + "test:ci:ts": "tap --ts --no-check-coverage --coverage-report=lcovonly \"test/**/*.test.*ts\"", + "test:yarn": "npm run transpile && tap \"test/**/*.test.js\" --no-check-coverage", + "transpile": "sh ./test/ts/transpile.sh", + "prepare": "husky install" + }, + "standard": { + "ignore": [ + "test/ts/**/*", + "test/syntax-error.mjs" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/thread-stream.git" + }, + "keywords": [ + "worker", + "thread", + "threads", + "stream" + ], + "author": "Matteo Collina ", + "license": "MIT", + "bugs": { + "url": "https://github.com/mcollina/thread-stream/issues" + }, + "homepage": "https://github.com/mcollina/thread-stream#readme" +} diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/README.md b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/README.md new file mode 100644 index 0000000000000000000000000000000000000000..24d834bc57ef846a9166ade36d883c766f12ef49 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/README.md @@ -0,0 +1,325 @@ +# ⏳ tiktoken + +tiktoken is a [BPE](https://en.wikipedia.org/wiki/Byte_pair_encoding) tokeniser for use with +OpenAI's models, forked from the original tiktoken library to provide JS/WASM bindings for NodeJS and other JS runtimes. + +This repository contains the following packages: + +- `tiktoken` (formally hosted at `@dqbd/tiktoken`): WASM bindings for the original Python library, providing full 1-to-1 feature parity. +- `js-tiktoken`: Pure JavaScript port of the original library with the core functionality, suitable for environments where WASM is not well supported or not desired (such as edge runtimes). + +Documentation for `js-tiktoken` can be found in [here](https://github.com/dqbd/tiktoken/blob/main/js/README.md). Documentation for the `tiktoken` can be found here below. + +The WASM version of `tiktoken` can be installed from NPM: + +``` +npm install tiktoken +``` + +## Usage + +Basic usage follows, which includes all the OpenAI encoders and ranks: + +```typescript +import assert from "node:assert"; +import { get_encoding, encoding_for_model } from "tiktoken"; + +const enc = get_encoding("gpt2"); +assert( + new TextDecoder().decode(enc.decode(enc.encode("hello world"))) === + "hello world" +); + +// To get the tokeniser corresponding to a specific model in the OpenAI API: +const enc = encoding_for_model("text-davinci-003"); + +// Extend existing encoding with custom special tokens +const enc = encoding_for_model("gpt2", { + "<|im_start|>": 100264, + "<|im_end|>": 100265, +}); + +// don't forget to free the encoder after it is not used +enc.free(); +``` + +In constrained environments (eg. Edge Runtime, Cloudflare Workers), where you don't want to load all the encoders at once, you can use the lightweight WASM binary via `tiktoken/lite`. + +```typescript +const { Tiktoken } = require("tiktoken/lite"); +const cl100k_base = require("tiktoken/encoders/cl100k_base.json"); + +const encoding = new Tiktoken( + cl100k_base.bpe_ranks, + cl100k_base.special_tokens, + cl100k_base.pat_str +); +const tokens = encoding.encode("hello world"); +encoding.free(); +``` + +If you want to fetch the latest ranks, use the `load` function: + +```typescript +const { Tiktoken } = require("tiktoken/lite"); +const { load } = require("tiktoken/load"); +const registry = require("tiktoken/registry.json"); +const models = require("tiktoken/model_to_encoding.json"); + +async function main() { + const model = await load(registry[models["gpt-3.5-turbo"]]); + const encoder = new Tiktoken( + model.bpe_ranks, + model.special_tokens, + model.pat_str + ); + const tokens = encoder.encode("hello world"); + encoder.free(); +} + +main(); +``` + +If desired, you can create a Tiktoken instance directly with custom ranks, special tokens and regex pattern: + +```typescript +import { Tiktoken } from "../pkg"; +import { readFileSync } from "fs"; + +const encoder = new Tiktoken( + readFileSync("./ranks/gpt2.tiktoken").toString("utf-8"), + { "<|endoftext|>": 50256, "<|im_start|>": 100264, "<|im_end|>": 100265 }, + "'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+" +); +``` + +Finally, you can a custom `init` function to override the WASM initialization logic for non-Node environments. This is useful if you are using a bundler that does not support WASM ESM integration. + +```typescript +import { get_encoding, init } from "tiktoken/init"; + +async function main() { + const wasm = "..."; // fetch the WASM binary somehow + await init((imports) => WebAssembly.instantiate(wasm, imports)); + + const encoding = get_encoding("cl100k_base"); + const tokens = encoding.encode("hello world"); + encoding.free(); +} + +main(); +``` + +## Compatibility + +As this is a WASM library, there might be some issues with specific runtimes. If you encounter any issues, please open an issue. + +| Runtime | Status | Notes | +| ---------------------------- | ------ | ------------------------------------------------------------------------------------------ | +| Node.js | ✅ | | +| Bun | ✅ | | +| Vite | ✅ | See [here](#vite) for notes | +| Next.js | ✅ | See [here](#nextjs) for notes | +| Create React App (via Craco) | ✅ | See [here](#create-react-app) for notes | +| Vercel Edge Runtime | ✅ | See [here](#vercel-edge-runtime) for notes | +| Cloudflare Workers | ✅ | See [here](#cloudflare-workers) for notes | +| Electron | ✅ | See [here](#electron) for notes | +| Deno | ❌ | Currently unsupported (see [dqbd/tiktoken#22](https://github.com/dqbd/tiktoken/issues/22)) | +| Svelte + Cloudflare Workers | ❌ | Currently unsupported (see [dqbd/tiktoken#37](https://github.com/dqbd/tiktoken/issues/37)) | + +For unsupported runtimes, consider using [`js-tiktoken`](https://www.npmjs.com/package/js-tiktoken), which is a pure JS implementation of the tokeniser. + +### [Vite](#vite) + +If you are using Vite, you will need to add both the `vite-plugin-wasm` and `vite-plugin-top-level-await`. Add the following to your `vite.config.js`: + +```js +import wasm from "vite-plugin-wasm"; +import topLevelAwait from "vite-plugin-top-level-await"; +import { defineConfig } from "vite"; + +export default defineConfig({ + plugins: [wasm(), topLevelAwait()], +}); +``` + +### [Next.js](#nextjs) + +Both API routes and `/pages` are supported with the following `next.config.js` configuration. + +```typescript +// next.config.json +const config = { + webpack(config, { isServer, dev }) { + config.experiments = { + asyncWebAssembly: true, + layers: true, + }; + + return config; + }, +}; +``` + +Usage in pages: + +```tsx +import { get_encoding } from "tiktoken"; +import { useState } from "react"; + +const encoding = get_encoding("cl100k_base"); + +export default function Home() { + const [input, setInput] = useState("hello world"); + const tokens = encoding.encode(input); + + return ( +
+ setInput(e.target.value)} + /> +
{tokens.toString()}
+
+ ); +} +``` + +Usage in API routes: + +```typescript +import { get_encoding } from "tiktoken"; +import { NextApiRequest, NextApiResponse } from "next"; + +export default function handler(req: NextApiRequest, res: NextApiResponse) { + const encoding = get_encoding("cl100k_base"); + const tokens = encoding.encode("hello world"); + encoding.free(); + return res.status(200).json({ tokens }); +} +``` + +### [Create React App](#create-react-app) + +By default, the Webpack configugration found in Create React App does not support WASM ESM modules. To add support, please do the following: + +1. Swap `react-scripts` with `craco`, using the guide found here: https://craco.js.org/docs/getting-started/. +2. Add the following to `craco.config.js`: + +```js +module.exports = { + webpack: { + configure: (config) => { + config.experiments = { + asyncWebAssembly: true, + layers: true, + }; + + // turn off static file serving of WASM files + // we need to let Webpack handle WASM import + config.module.rules + .find((i) => "oneOf" in i) + .oneOf.find((i) => i.type === "asset/resource") + .exclude.push(/\.wasm$/); + + return config; + }, + }, +}; +``` + +### [Vercel Edge Runtime](#vercel-edge-runtime) + +Vercel Edge Runtime does support WASM modules by adding a `?module` suffix. Initialize the encoder with the following snippet: + +```typescript +// @ts-expect-error +import wasm from "tiktoken/lite/tiktoken_bg.wasm?module"; +import model from "tiktoken/encoders/cl100k_base.json"; +import { init, Tiktoken } from "tiktoken/lite/init"; + +export const config = { runtime: "edge" }; + +export default async function (req: Request) { + await init((imports) => WebAssembly.instantiate(wasm, imports)); + + const encoding = new Tiktoken( + model.bpe_ranks, + model.special_tokens, + model.pat_str + ); + + const tokens = encoding.encode("hello world"); + encoding.free(); + + return new Response(`${tokens}`); +} +``` + +### [Cloudflare Workers](#cloudflare-workers) + +Similar to Vercel Edge Runtime, Cloudflare Workers must import the WASM binary file manually and use the `tiktoken/lite` version to fit the 1 MB limit. However, users need to point directly at the WASM binary via a relative path (including `./node_modules/`). + +Add the following rule to the `wrangler.toml` to upload WASM during build: + +```toml +[[rules]] +globs = ["**/*.wasm"] +type = "CompiledWasm" +``` + +Initialize the encoder with the following snippet: + +```javascript +import { init, Tiktoken } from "tiktoken/lite/init"; +import wasm from "./node_modules/tiktoken/lite/tiktoken_bg.wasm"; +import model from "tiktoken/encoders/cl100k_base.json"; + +export default { + async fetch() { + await init((imports) => WebAssembly.instantiate(wasm, imports)); + const encoder = new Tiktoken( + model.bpe_ranks, + model.special_tokens, + model.pat_str + ); + const tokens = encoder.encode("test"); + encoder.free(); + return new Response(`${tokens}`); + }, +}; +``` + +### [Electron](#electron) + +To use tiktoken in your Electron main process, you need to make sure the WASM binary gets copied into your application package. + +Assuming a setup with [Electron Forge](https://www.electronforge.io) and [`@electron-forge/plugin-webpack`](https://www.npmjs.com/package/@electron-forge/plugin-webpack), add the following to your `webpack.main.config.js`: + +```javascript +const CopyPlugin = require("copy-webpack-plugin"); + +module.exports = { + // ... + plugins: [ + new CopyPlugin({ + patterns: [ + { from: "./node_modules/tiktoken/tiktoken_bg.wasm" }, + ], + }), + ], +}; +``` + +## Development + +To build the `tiktoken` library, make sure to have: +- Rust and [`wasm-pack`](https://github.com/rustwasm/wasm-pack) installed. +- Node.js 18+ is required to build the JS bindings and fetch the latest encoder ranks via `fetch`. + +Install all the dev-dependencies with `yarn install` and build both WASM binary and JS bindings with `yarn build`. + +## Acknowledgements + +- https://github.com/zurawiki/tiktoken-rs diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.cjs b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.cjs new file mode 100644 index 0000000000000000000000000000000000000000..245485b0449c2ba8fbbefbd87817337e199b7da6 --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.cjs @@ -0,0 +1,42 @@ +"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 __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.init = void 0; +// @ts-expect-error +const imports = require("./tiktoken_bg.cjs"); +let isInitialized = false; +async function init(callback) { + if (isInitialized) + return imports; + const result = await callback({ "./tiktoken_bg.js": imports }); + const instance = "instance" in result && result.instance instanceof WebAssembly.Instance + ? result.instance + : result instanceof WebAssembly.Instance + ? result + : null; + if (instance == null) + throw new Error("Missing instance"); + imports.__wbg_set_wasm(instance.exports); + isInitialized = true; + return imports; +} +exports.init = init; +exports["get_encoding"] = imports["get_encoding"]; +exports["encoding_for_model"] = imports["encoding_for_model"]; +exports["get_encoding_name_for_model"] = imports["get_encoding_name_for_model"]; +exports["Tiktoken"] = imports["Tiktoken"]; +// @ts-expect-error +__exportStar(require("./tiktoken_bg.cjs"), exports); diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4c7f2288a8d000a386b7b19c1b79f5ce2b484aff --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/init.d.ts @@ -0,0 +1,2 @@ +export declare function init(callback: (imports: WebAssembly.Imports) => Promise): Promise; +export * from "./tiktoken_bg"; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/lite.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/lite.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5ffd559cace6811e80fa288ac36e84b76fff85c --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/lite.d.ts @@ -0,0 +1 @@ +export * from "./lite/tiktoken"; \ No newline at end of file diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/load.d.ts b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/load.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4713be087811e0685d6d58b275be21bf31672a8f --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/load.d.ts @@ -0,0 +1,17 @@ +export declare function load(registry: ({ + load_tiktoken_bpe: string; +} | { + data_gym_to_mergeable_bpe_ranks: { + vocab_bpe_file: string; + encoder_json_file: string; + }; +}) & { + explicit_n_vocab?: number; + pat_str: string; + special_tokens: Record; +}, customFetch?: (url: string) => Promise): Promise<{ + explicit_n_vocab: number | undefined; + pat_str: string; + special_tokens: Record; + bpe_ranks: string; +}>; diff --git a/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/model_to_encoding.json b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/model_to_encoding.json new file mode 100644 index 0000000000000000000000000000000000000000..7180527d29ec8c84bd06941f289c4b9df75bf8ae --- /dev/null +++ b/platform/aiml/elizabeth/e-1-first_session/claude-code-router/node_modules/tiktoken/model_to_encoding.json @@ -0,0 +1,108 @@ +{ + "davinci-002": "cl100k_base", + "babbage-002": "cl100k_base", + "text-davinci-003": "p50k_base", + "text-davinci-002": "p50k_base", + "text-davinci-001": "r50k_base", + "text-curie-001": "r50k_base", + "text-babbage-001": "r50k_base", + "text-ada-001": "r50k_base", + "davinci": "r50k_base", + "curie": "r50k_base", + "babbage": "r50k_base", + "ada": "r50k_base", + "code-davinci-002": "p50k_base", + "code-davinci-001": "p50k_base", + "code-cushman-002": "p50k_base", + "code-cushman-001": "p50k_base", + "davinci-codex": "p50k_base", + "cushman-codex": "p50k_base", + "text-davinci-edit-001": "p50k_edit", + "code-davinci-edit-001": "p50k_edit", + "text-embedding-ada-002": "cl100k_base", + "text-embedding-3-small": "cl100k_base", + "text-embedding-3-large": "cl100k_base", + "text-similarity-davinci-001": "r50k_base", + "text-similarity-curie-001": "r50k_base", + "text-similarity-babbage-001": "r50k_base", + "text-similarity-ada-001": "r50k_base", + "text-search-davinci-doc-001": "r50k_base", + "text-search-curie-doc-001": "r50k_base", + "text-search-babbage-doc-001": "r50k_base", + "text-search-ada-doc-001": "r50k_base", + "code-search-babbage-code-001": "r50k_base", + "code-search-ada-code-001": "r50k_base", + "gpt2": "gpt2", + "gpt-3.5-turbo": "cl100k_base", + "gpt-35-turbo": "cl100k_base", + "gpt-3.5-turbo-0301": "cl100k_base", + "gpt-3.5-turbo-0613": "cl100k_base", + "gpt-3.5-turbo-1106": "cl100k_base", + "gpt-3.5-turbo-0125": "cl100k_base", + "gpt-3.5-turbo-16k": "cl100k_base", + "gpt-3.5-turbo-16k-0613": "cl100k_base", + "gpt-3.5-turbo-instruct": "cl100k_base", + "gpt-3.5-turbo-instruct-0914": "cl100k_base", + "gpt-4": "cl100k_base", + "gpt-4-0314": "cl100k_base", + "gpt-4-0613": "cl100k_base", + "gpt-4-32k": "cl100k_base", + "gpt-4-32k-0314": "cl100k_base", + "gpt-4-32k-0613": "cl100k_base", + "gpt-4-turbo": "cl100k_base", + "gpt-4-turbo-2024-04-09": "cl100k_base", + "gpt-4-turbo-preview": "cl100k_base", + "gpt-4-1106-preview": "cl100k_base", + "gpt-4-0125-preview": "cl100k_base", + "gpt-4-vision-preview": "cl100k_base", + "gpt-4o": "o200k_base", + "gpt-4o-2024-05-13": "o200k_base", + "gpt-4o-2024-08-06": "o200k_base", + "gpt-4o-2024-11-20": "o200k_base", + "gpt-4o-mini-2024-07-18": "o200k_base", + "gpt-4o-mini": "o200k_base", + "gpt-4o-search-preview": "o200k_base", + "gpt-4o-search-preview-2025-03-11": "o200k_base", + "gpt-4o-mini-search-preview": "o200k_base", + "gpt-4o-mini-search-preview-2025-03-11": "o200k_base", + "gpt-4o-audio-preview": "o200k_base", + "gpt-4o-audio-preview-2024-12-17": "o200k_base", + "gpt-4o-audio-preview-2024-10-01": "o200k_base", + "gpt-4o-mini-audio-preview": "o200k_base", + "gpt-4o-mini-audio-preview-2024-12-17": "o200k_base", + "o1": "o200k_base", + "o1-2024-12-17": "o200k_base", + "o1-mini": "o200k_base", + "o1-mini-2024-09-12": "o200k_base", + "o1-preview": "o200k_base", + "o1-preview-2024-09-12": "o200k_base", + "o1-pro": "o200k_base", + "o1-pro-2025-03-19": "o200k_base", + "o3": "o200k_base", + "o3-2025-04-16": "o200k_base", + "o3-mini": "o200k_base", + "o3-mini-2025-01-31": "o200k_base", + "o4-mini": "o200k_base", + "o4-mini-2025-04-16": "o200k_base", + "chatgpt-4o-latest": "o200k_base", + "gpt-4o-realtime": "o200k_base", + "gpt-4o-realtime-preview-2024-10-01": "o200k_base", + "gpt-4o-realtime-preview-2024-12-17": "o200k_base", + "gpt-4o-mini-realtime-preview": "o200k_base", + "gpt-4o-mini-realtime-preview-2024-12-17": "o200k_base", + "gpt-4.1": "o200k_base", + "gpt-4.1-2025-04-14": "o200k_base", + "gpt-4.1-mini": "o200k_base", + "gpt-4.1-mini-2025-04-14": "o200k_base", + "gpt-4.1-nano": "o200k_base", + "gpt-4.1-nano-2025-04-14": "o200k_base", + "gpt-4.5-preview": "o200k_base", + "gpt-4.5-preview-2025-02-27": "o200k_base", + "gpt-5": "o200k_base", + "gpt-5-2025-08-07": "o200k_base", + "gpt-5-nano": "o200k_base", + "gpt-5-nano-2025-08-07": "o200k_base", + "gpt-5-mini": "o200k_base", + "gpt-5-mini-2025-08-07": "o200k_base", + "gpt-5-chat-latest": "o200k_base" +}