release-note 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +1 -3
- package/dist/bin.mjs +1 -3
- package/dist/{dist-KSaqNpqH.mjs → dist-BKDBZrkD.mjs} +1 -3
- package/dist/{dist-Bgu3E62L.cjs → dist-DGil98Eq.cjs} +1 -3
- package/dist/{generate-Cy2c8xRC.cjs → generate-BvQfZAwr.cjs} +22 -216
- package/dist/{generate-CHfRvUG7.mjs → generate-CLz75nUt.mjs} +22 -216
- package/dist/index.cjs +1 -3
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -3
- package/dist/{token-Bq6EKU7W.mjs → token-BTkzJW-X.mjs} +1 -3
- package/dist/{token-DTfaB8-i.cjs → token-K-kJmAE8.cjs} +1 -3
- package/package.json +1 -2
- package/dist/bin.cjs.map +0 -1
- package/dist/bin.mjs.map +0 -1
- package/dist/dist-Bgu3E62L.cjs.map +0 -1
- package/dist/dist-KSaqNpqH.mjs.map +0 -1
- package/dist/generate-CHfRvUG7.mjs.map +0 -1
- package/dist/generate-Cy2c8xRC.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/token-Bq6EKU7W.mjs.map +0 -1
- package/dist/token-DTfaB8-i.cjs.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.cjs");
|
|
3
|
-
const require_generate = require("./generate-
|
|
3
|
+
const require_generate = require("./generate-BvQfZAwr.cjs");
|
|
4
4
|
let node_events = require("node:events");
|
|
5
5
|
let node_child_process = require("node:child_process");
|
|
6
6
|
node_child_process = require_chunk.__toESM(node_child_process, 1);
|
|
@@ -2982,5 +2982,3 @@ async function createArgs() {
|
|
|
2982
2982
|
//#region src/bin.ts
|
|
2983
2983
|
createArgs().then((p) => p.parse());
|
|
2984
2984
|
//#endregion
|
|
2985
|
-
|
|
2986
|
-
//# sourceMappingURL=bin.cjs.map
|
package/dist/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as resolveConfig, t as generateReleaseNote } from "./generate-
|
|
2
|
+
import { C as resolveConfig, t as generateReleaseNote } from "./generate-CLz75nUt.mjs";
|
|
3
3
|
import { EventEmitter } from "node:events";
|
|
4
4
|
import childProcess from "node:child_process";
|
|
5
5
|
import path from "node:path";
|
|
@@ -2976,5 +2976,3 @@ async function createArgs() {
|
|
|
2976
2976
|
createArgs().then((p) => p.parse());
|
|
2977
2977
|
//#endregion
|
|
2978
2978
|
export {};
|
|
2979
|
-
|
|
2980
|
-
//# sourceMappingURL=bin.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as number, D as boolean, E as array, M as record, N as string, O as literal, P as union, S as UnsupportedFunctionalityError, T as any, _ as withUserAgentSuffix, a as convertBase64ToUint8Array, b as InvalidResponseDataError, c as createEventSourceResponseHandler, d as downloadBlob, f as generateId, g as postJsonToApi, h as postFormDataToApi, i as combineHeaders, j as object, k as looseObject, l as createJsonErrorResponseHandler, m as parseProviderOptions, o as convertToBase64, p as isParsableJson, s as convertToFormData, u as createJsonResponseHandler, v as withoutTrailingSlash, w as _enum, x as TooManyEmbeddingValuesForCallError, y as InvalidPromptError } from "./generate-
|
|
1
|
+
import { A as number, D as boolean, E as array, M as record, N as string, O as literal, P as union, S as UnsupportedFunctionalityError, T as any, _ as withUserAgentSuffix, a as convertBase64ToUint8Array, b as InvalidResponseDataError, c as createEventSourceResponseHandler, d as downloadBlob, f as generateId, g as postJsonToApi, h as postFormDataToApi, i as combineHeaders, j as object, k as looseObject, l as createJsonErrorResponseHandler, m as parseProviderOptions, o as convertToBase64, p as isParsableJson, s as convertToFormData, u as createJsonResponseHandler, v as withoutTrailingSlash, w as _enum, x as TooManyEmbeddingValuesForCallError, y as InvalidPromptError } from "./generate-CLz75nUt.mjs";
|
|
2
2
|
//#region node_modules/.pnpm/@ai-sdk+openai-compatible@2.0.48_zod@4.4.3/node_modules/@ai-sdk/openai-compatible/dist/index.mjs
|
|
3
3
|
function toCamelCase(str) {
|
|
4
4
|
return str.replace(/[_-]([a-z])/g, (g) => g[1].toUpperCase());
|
|
@@ -1370,5 +1370,3 @@ function createOpenAICompatible(options) {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
//#endregion
|
|
1372
1372
|
export { createOpenAICompatible };
|
|
1373
|
-
|
|
1374
|
-
//# sourceMappingURL=dist-KSaqNpqH.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.cjs");
|
|
2
|
-
const require_generate = require("./generate-
|
|
2
|
+
const require_generate = require("./generate-BvQfZAwr.cjs");
|
|
3
3
|
//#region node_modules/.pnpm/@ai-sdk+openai-compatible@2.0.48_zod@4.4.3/node_modules/@ai-sdk/openai-compatible/dist/index.mjs
|
|
4
4
|
function toCamelCase(str) {
|
|
5
5
|
return str.replace(/[_-]([a-z])/g, (g) => g[1].toUpperCase());
|
|
@@ -1371,5 +1371,3 @@ function createOpenAICompatible(options) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
//#endregion
|
|
1373
1373
|
exports.createOpenAICompatible = createOpenAICompatible;
|
|
1374
|
-
|
|
1375
|
-
//# sourceMappingURL=dist-Bgu3E62L.cjs.map
|
|
@@ -415,196 +415,6 @@ const chalk = createChalk();
|
|
|
415
415
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region src/constants/providers.ts
|
|
418
|
-
var import_main = (/* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
419
|
-
(function(factory) {
|
|
420
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
421
|
-
var v = factory(require, exports);
|
|
422
|
-
if (v !== void 0) module.exports = v;
|
|
423
|
-
} else if (typeof define === "function" && define.amd) define([
|
|
424
|
-
"require",
|
|
425
|
-
"exports",
|
|
426
|
-
"./impl/format",
|
|
427
|
-
"./impl/edit",
|
|
428
|
-
"./impl/scanner",
|
|
429
|
-
"./impl/parser"
|
|
430
|
-
], factory);
|
|
431
|
-
})(function(require, exports$1) {
|
|
432
|
-
"use strict";
|
|
433
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
434
|
-
exports$1.applyEdits = exports$1.modify = exports$1.format = exports$1.printParseErrorCode = exports$1.ParseErrorCode = exports$1.stripComments = exports$1.visit = exports$1.getNodeValue = exports$1.getNodePath = exports$1.findNodeAtOffset = exports$1.findNodeAtLocation = exports$1.parseTree = exports$1.parse = exports$1.getLocation = exports$1.SyntaxKind = exports$1.ScanError = exports$1.createScanner = void 0;
|
|
435
|
-
const formatter = require("./impl/format");
|
|
436
|
-
const edit = require("./impl/edit");
|
|
437
|
-
const scanner = require("./impl/scanner");
|
|
438
|
-
const parser = require("./impl/parser");
|
|
439
|
-
/**
|
|
440
|
-
* Creates a JSON scanner on the given text.
|
|
441
|
-
* If ignoreTrivia is set, whitespaces or comments are ignored.
|
|
442
|
-
*/
|
|
443
|
-
exports$1.createScanner = scanner.createScanner;
|
|
444
|
-
var ScanError;
|
|
445
|
-
(function(ScanError) {
|
|
446
|
-
ScanError[ScanError["None"] = 0] = "None";
|
|
447
|
-
ScanError[ScanError["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment";
|
|
448
|
-
ScanError[ScanError["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString";
|
|
449
|
-
ScanError[ScanError["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber";
|
|
450
|
-
ScanError[ScanError["InvalidUnicode"] = 4] = "InvalidUnicode";
|
|
451
|
-
ScanError[ScanError["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter";
|
|
452
|
-
ScanError[ScanError["InvalidCharacter"] = 6] = "InvalidCharacter";
|
|
453
|
-
})(ScanError || (exports$1.ScanError = ScanError = {}));
|
|
454
|
-
var SyntaxKind;
|
|
455
|
-
(function(SyntaxKind) {
|
|
456
|
-
SyntaxKind[SyntaxKind["OpenBraceToken"] = 1] = "OpenBraceToken";
|
|
457
|
-
SyntaxKind[SyntaxKind["CloseBraceToken"] = 2] = "CloseBraceToken";
|
|
458
|
-
SyntaxKind[SyntaxKind["OpenBracketToken"] = 3] = "OpenBracketToken";
|
|
459
|
-
SyntaxKind[SyntaxKind["CloseBracketToken"] = 4] = "CloseBracketToken";
|
|
460
|
-
SyntaxKind[SyntaxKind["CommaToken"] = 5] = "CommaToken";
|
|
461
|
-
SyntaxKind[SyntaxKind["ColonToken"] = 6] = "ColonToken";
|
|
462
|
-
SyntaxKind[SyntaxKind["NullKeyword"] = 7] = "NullKeyword";
|
|
463
|
-
SyntaxKind[SyntaxKind["TrueKeyword"] = 8] = "TrueKeyword";
|
|
464
|
-
SyntaxKind[SyntaxKind["FalseKeyword"] = 9] = "FalseKeyword";
|
|
465
|
-
SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral";
|
|
466
|
-
SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral";
|
|
467
|
-
SyntaxKind[SyntaxKind["LineCommentTrivia"] = 12] = "LineCommentTrivia";
|
|
468
|
-
SyntaxKind[SyntaxKind["BlockCommentTrivia"] = 13] = "BlockCommentTrivia";
|
|
469
|
-
SyntaxKind[SyntaxKind["LineBreakTrivia"] = 14] = "LineBreakTrivia";
|
|
470
|
-
SyntaxKind[SyntaxKind["Trivia"] = 15] = "Trivia";
|
|
471
|
-
SyntaxKind[SyntaxKind["Unknown"] = 16] = "Unknown";
|
|
472
|
-
SyntaxKind[SyntaxKind["EOF"] = 17] = "EOF";
|
|
473
|
-
})(SyntaxKind || (exports$1.SyntaxKind = SyntaxKind = {}));
|
|
474
|
-
/**
|
|
475
|
-
* For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.
|
|
476
|
-
*/
|
|
477
|
-
exports$1.getLocation = parser.getLocation;
|
|
478
|
-
/**
|
|
479
|
-
* Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
480
|
-
* Therefore, always check the errors list to find out if the input was valid.
|
|
481
|
-
*/
|
|
482
|
-
exports$1.parse = parser.parse;
|
|
483
|
-
/**
|
|
484
|
-
* Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
485
|
-
*/
|
|
486
|
-
exports$1.parseTree = parser.parseTree;
|
|
487
|
-
/**
|
|
488
|
-
* Finds the node at the given path in a JSON DOM.
|
|
489
|
-
*/
|
|
490
|
-
exports$1.findNodeAtLocation = parser.findNodeAtLocation;
|
|
491
|
-
/**
|
|
492
|
-
* Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.
|
|
493
|
-
*/
|
|
494
|
-
exports$1.findNodeAtOffset = parser.findNodeAtOffset;
|
|
495
|
-
/**
|
|
496
|
-
* Gets the JSON path of the given JSON DOM node
|
|
497
|
-
*/
|
|
498
|
-
exports$1.getNodePath = parser.getNodePath;
|
|
499
|
-
/**
|
|
500
|
-
* Evaluates the JavaScript object of the given JSON DOM node
|
|
501
|
-
*/
|
|
502
|
-
exports$1.getNodeValue = parser.getNodeValue;
|
|
503
|
-
/**
|
|
504
|
-
* Parses the given text and invokes the visitor functions for each object, array and literal reached.
|
|
505
|
-
*/
|
|
506
|
-
exports$1.visit = parser.visit;
|
|
507
|
-
/**
|
|
508
|
-
* Takes JSON with JavaScript-style comments and remove
|
|
509
|
-
* them. Optionally replaces every none-newline character
|
|
510
|
-
* of comments with a replaceCharacter
|
|
511
|
-
*/
|
|
512
|
-
exports$1.stripComments = parser.stripComments;
|
|
513
|
-
var ParseErrorCode;
|
|
514
|
-
(function(ParseErrorCode) {
|
|
515
|
-
ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
516
|
-
ParseErrorCode[ParseErrorCode["InvalidNumberFormat"] = 2] = "InvalidNumberFormat";
|
|
517
|
-
ParseErrorCode[ParseErrorCode["PropertyNameExpected"] = 3] = "PropertyNameExpected";
|
|
518
|
-
ParseErrorCode[ParseErrorCode["ValueExpected"] = 4] = "ValueExpected";
|
|
519
|
-
ParseErrorCode[ParseErrorCode["ColonExpected"] = 5] = "ColonExpected";
|
|
520
|
-
ParseErrorCode[ParseErrorCode["CommaExpected"] = 6] = "CommaExpected";
|
|
521
|
-
ParseErrorCode[ParseErrorCode["CloseBraceExpected"] = 7] = "CloseBraceExpected";
|
|
522
|
-
ParseErrorCode[ParseErrorCode["CloseBracketExpected"] = 8] = "CloseBracketExpected";
|
|
523
|
-
ParseErrorCode[ParseErrorCode["EndOfFileExpected"] = 9] = "EndOfFileExpected";
|
|
524
|
-
ParseErrorCode[ParseErrorCode["InvalidCommentToken"] = 10] = "InvalidCommentToken";
|
|
525
|
-
ParseErrorCode[ParseErrorCode["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment";
|
|
526
|
-
ParseErrorCode[ParseErrorCode["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString";
|
|
527
|
-
ParseErrorCode[ParseErrorCode["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber";
|
|
528
|
-
ParseErrorCode[ParseErrorCode["InvalidUnicode"] = 14] = "InvalidUnicode";
|
|
529
|
-
ParseErrorCode[ParseErrorCode["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
|
|
530
|
-
ParseErrorCode[ParseErrorCode["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
531
|
-
})(ParseErrorCode || (exports$1.ParseErrorCode = ParseErrorCode = {}));
|
|
532
|
-
function printParseErrorCode(code) {
|
|
533
|
-
switch (code) {
|
|
534
|
-
case 1: return "InvalidSymbol";
|
|
535
|
-
case 2: return "InvalidNumberFormat";
|
|
536
|
-
case 3: return "PropertyNameExpected";
|
|
537
|
-
case 4: return "ValueExpected";
|
|
538
|
-
case 5: return "ColonExpected";
|
|
539
|
-
case 6: return "CommaExpected";
|
|
540
|
-
case 7: return "CloseBraceExpected";
|
|
541
|
-
case 8: return "CloseBracketExpected";
|
|
542
|
-
case 9: return "EndOfFileExpected";
|
|
543
|
-
case 10: return "InvalidCommentToken";
|
|
544
|
-
case 11: return "UnexpectedEndOfComment";
|
|
545
|
-
case 12: return "UnexpectedEndOfString";
|
|
546
|
-
case 13: return "UnexpectedEndOfNumber";
|
|
547
|
-
case 14: return "InvalidUnicode";
|
|
548
|
-
case 15: return "InvalidEscapeCharacter";
|
|
549
|
-
case 16: return "InvalidCharacter";
|
|
550
|
-
}
|
|
551
|
-
return "<unknown ParseErrorCode>";
|
|
552
|
-
}
|
|
553
|
-
exports$1.printParseErrorCode = printParseErrorCode;
|
|
554
|
-
/**
|
|
555
|
-
* Computes the edit operations needed to format a JSON document.
|
|
556
|
-
*
|
|
557
|
-
* @param documentText The input text
|
|
558
|
-
* @param range The range to format or `undefined` to format the full content
|
|
559
|
-
* @param options The formatting options
|
|
560
|
-
* @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}.
|
|
561
|
-
* To apply the edit operations to the input, use {@linkcode applyEdits}.
|
|
562
|
-
*/
|
|
563
|
-
function format(documentText, range, options) {
|
|
564
|
-
return formatter.format(documentText, range, options);
|
|
565
|
-
}
|
|
566
|
-
exports$1.format = format;
|
|
567
|
-
/**
|
|
568
|
-
* Computes the edit operations needed to modify a value in the JSON document.
|
|
569
|
-
*
|
|
570
|
-
* @param documentText The input text
|
|
571
|
-
* @param path The path of the value to change. The path represents either to the document root, a property or an array item.
|
|
572
|
-
* If the path points to an non-existing property or item, it will be created.
|
|
573
|
-
* @param value The new value for the specified property or item. If the value is undefined,
|
|
574
|
-
* the property or item will be removed.
|
|
575
|
-
* @param options Options
|
|
576
|
-
* @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}.
|
|
577
|
-
* To apply the edit operations to the input, use {@linkcode applyEdits}.
|
|
578
|
-
*/
|
|
579
|
-
function modify(text, path, value, options) {
|
|
580
|
-
return edit.setProperty(text, path, value, options);
|
|
581
|
-
}
|
|
582
|
-
exports$1.modify = modify;
|
|
583
|
-
/**
|
|
584
|
-
* Applies edits to an input string.
|
|
585
|
-
* @param text The input text
|
|
586
|
-
* @param edits Edit operations following the format described in {@linkcode EditResult}.
|
|
587
|
-
* @returns The text with the applied edits.
|
|
588
|
-
* @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}.
|
|
589
|
-
*/
|
|
590
|
-
function applyEdits(text, edits) {
|
|
591
|
-
let sortedEdits = edits.slice(0).sort((a, b) => {
|
|
592
|
-
const diff = a.offset - b.offset;
|
|
593
|
-
if (diff === 0) return a.length - b.length;
|
|
594
|
-
return diff;
|
|
595
|
-
});
|
|
596
|
-
let lastModifiedOffset = text.length;
|
|
597
|
-
for (let i = sortedEdits.length - 1; i >= 0; i--) {
|
|
598
|
-
let e = sortedEdits[i];
|
|
599
|
-
if (e.offset + e.length <= lastModifiedOffset) text = edit.applyEdit(text, e);
|
|
600
|
-
else throw new Error("Overlapping edit");
|
|
601
|
-
lastModifiedOffset = e.offset;
|
|
602
|
-
}
|
|
603
|
-
return text;
|
|
604
|
-
}
|
|
605
|
-
exports$1.applyEdits = applyEdits;
|
|
606
|
-
});
|
|
607
|
-
})))();
|
|
608
418
|
const SUPPORTED_PROVIDERS = {
|
|
609
419
|
"@ai-sdk/openai": { create: "createOpenAI" },
|
|
610
420
|
"@ai-sdk/openai-compatible": { create: "createOpenAICompatible" },
|
|
@@ -1405,7 +1215,7 @@ const _parse$1 = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1405
1215
|
}
|
|
1406
1216
|
return result.value;
|
|
1407
1217
|
};
|
|
1408
|
-
const parse$
|
|
1218
|
+
const parse$1 = /* @__PURE__*/ _parse$1($ZodRealError);
|
|
1409
1219
|
const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1410
1220
|
const ctx = _ctx ? {
|
|
1411
1221
|
..._ctx,
|
|
@@ -3957,9 +3767,9 @@ const $ZodFunction = /*@__PURE__*/ $constructor("$ZodFunction", (inst, def) => {
|
|
|
3957
3767
|
inst.implement = (func) => {
|
|
3958
3768
|
if (typeof func !== "function") throw new Error("implement() must be called with a function");
|
|
3959
3769
|
return function(...args) {
|
|
3960
|
-
const parsedArgs = inst._def.input ? parse$
|
|
3770
|
+
const parsedArgs = inst._def.input ? parse$1(inst._def.input, args) : args;
|
|
3961
3771
|
const result = Reflect.apply(func, this, parsedArgs);
|
|
3962
|
-
if (inst._def.output) return parse$
|
|
3772
|
+
if (inst._def.output) return parse$1(inst._def.output, result);
|
|
3963
3773
|
return result;
|
|
3964
3774
|
};
|
|
3965
3775
|
};
|
|
@@ -11934,7 +11744,7 @@ var core_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
|
11934
11744
|
isValidJWT: () => isValidJWT$1,
|
|
11935
11745
|
locales: () => locales_exports,
|
|
11936
11746
|
meta: () => meta$1,
|
|
11937
|
-
parse: () => parse$
|
|
11747
|
+
parse: () => parse$1,
|
|
11938
11748
|
parseAsync: () => parseAsync$1,
|
|
11939
11749
|
prettifyError: () => prettifyError,
|
|
11940
11750
|
process: () => process$2,
|
|
@@ -12050,7 +11860,7 @@ const ZodError$1 = /*@__PURE__*/ $constructor("ZodError", initializer);
|
|
|
12050
11860
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error });
|
|
12051
11861
|
//#endregion
|
|
12052
11862
|
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
12053
|
-
const parse
|
|
11863
|
+
const parse = /* @__PURE__ */ _parse$1(ZodRealError);
|
|
12054
11864
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
12055
11865
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
12056
11866
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
@@ -12278,7 +12088,7 @@ const ZodType$1 = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
|
|
|
12278
12088
|
inst.def = def;
|
|
12279
12089
|
inst.type = def.type;
|
|
12280
12090
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12281
|
-
inst.parse = (data, params) => parse
|
|
12091
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
12282
12092
|
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
12283
12093
|
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
12284
12094
|
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
@@ -14093,7 +13903,7 @@ var external_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
|
14093
13903
|
object: () => object$1,
|
|
14094
13904
|
optional: () => optional,
|
|
14095
13905
|
overwrite: () => _overwrite,
|
|
14096
|
-
parse: () => parse
|
|
13906
|
+
parse: () => parse,
|
|
14097
13907
|
parseAsync: () => parseAsync,
|
|
14098
13908
|
partialRecord: () => partialRecord,
|
|
14099
13909
|
pipe: () => pipe,
|
|
@@ -14186,7 +13996,7 @@ async function resolveConfig(cwd, configPaths = CONFIG_PATHS) {
|
|
|
14186
13996
|
console.log(chalk.green(`Using config file: ${fullPath}`));
|
|
14187
13997
|
try {
|
|
14188
13998
|
const configContent = await fs.default.promises.readFile(fullPath, "utf8");
|
|
14189
|
-
return generateConfigSchema.parse(
|
|
13999
|
+
return generateConfigSchema.parse(JSON.parse(configContent));
|
|
14190
14000
|
} catch {
|
|
14191
14001
|
console.error(chalk.red(`Error parsing config file: ${fullPath}`));
|
|
14192
14002
|
throw new Error(`Invalid config file: ${fullPath}`);
|
|
@@ -14214,7 +14024,7 @@ async function resolveProvider(name, options) {
|
|
|
14214
14024
|
if (name === "@ai-sdk/openai-compatible") {
|
|
14215
14025
|
if (!options.apiUrl) throw new Error("\"\"apiUrl\"\" is required for openai-compatible provider");
|
|
14216
14026
|
if (!resolvedApiKey) throw new Error("No API key found in the specified environment variables");
|
|
14217
|
-
const { createOpenAICompatible } = await Promise.resolve().then(() => require("./dist-
|
|
14027
|
+
const { createOpenAICompatible } = await Promise.resolve().then(() => require("./dist-DGil98Eq.cjs"));
|
|
14218
14028
|
return createOpenAICompatible({
|
|
14219
14029
|
name,
|
|
14220
14030
|
apiKey: resolvedApiKey,
|
|
@@ -20105,7 +19915,7 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ require_chunk.__commonJSMin(
|
|
|
20105
19915
|
err = error;
|
|
20106
19916
|
}
|
|
20107
19917
|
try {
|
|
20108
|
-
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require_token_util())), await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./token-
|
|
19918
|
+
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require_token_util())), await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./token-K-kJmAE8.cjs").default))]);
|
|
20109
19919
|
if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
|
|
20110
19920
|
await refreshToken(options);
|
|
20111
19921
|
token = getVercelOidcTokenSync();
|
|
@@ -23549,7 +23359,7 @@ function convertPartToLanguageModelPart(part, downloadedAssets) {
|
|
|
23549
23359
|
const downloadedFile = downloadedAssets[data.toString()];
|
|
23550
23360
|
if (downloadedFile) {
|
|
23551
23361
|
data = downloadedFile.data;
|
|
23552
|
-
mediaType
|
|
23362
|
+
mediaType ?? (mediaType = downloadedFile.mediaType);
|
|
23553
23363
|
}
|
|
23554
23364
|
}
|
|
23555
23365
|
switch (type) {
|
|
@@ -28369,9 +28179,10 @@ var init_git_logger = __esm({ "src/lib/git-logger.ts"() {
|
|
|
28369
28179
|
var TasksPendingQueue;
|
|
28370
28180
|
var init_tasks_pending_queue = __esm({ "src/lib/runners/tasks-pending-queue.ts"() {
|
|
28371
28181
|
"use strict";
|
|
28182
|
+
var _TasksPendingQueue2;
|
|
28372
28183
|
init_git_error();
|
|
28373
28184
|
init_git_logger();
|
|
28374
|
-
TasksPendingQueue = class _TasksPendingQueue {
|
|
28185
|
+
TasksPendingQueue = (_TasksPendingQueue2 = class _TasksPendingQueue {
|
|
28375
28186
|
constructor(logLabel = "GitExecutor") {
|
|
28376
28187
|
this.logLabel = logLabel;
|
|
28377
28188
|
this._queue = /* @__PURE__ */ new Map();
|
|
@@ -28415,10 +28226,7 @@ var init_tasks_pending_queue = __esm({ "src/lib/runners/tasks-pending-queue.ts"(
|
|
|
28415
28226
|
static getName(name = "empty") {
|
|
28416
28227
|
return `task:${name}:${++_TasksPendingQueue.counter}`;
|
|
28417
28228
|
}
|
|
28418
|
-
|
|
28419
|
-
this.counter = 0;
|
|
28420
|
-
}
|
|
28421
|
-
};
|
|
28229
|
+
}, _TasksPendingQueue2.counter = 0, _TasksPendingQueue2);
|
|
28422
28230
|
} });
|
|
28423
28231
|
function pluginContext(task, commands) {
|
|
28424
28232
|
return {
|
|
@@ -31029,14 +30837,14 @@ function generateTools(git, logger) {
|
|
|
31029
30837
|
description: "Get the full diff of a specific commit. Returns the patch showing all changes (additions, deletions, modifications) introduced by the commit.",
|
|
31030
30838
|
inputSchema: zod_default.object({ commithash: zod_default.string().describe("The commit hash, tag, branch, or any other git ref resolvable by git rev-parse.") }),
|
|
31031
30839
|
execute: async ({ commithash }) => {
|
|
31032
|
-
logger?.(
|
|
30840
|
+
logger?.(`[check_diff] fetching diff for ${commithash}`);
|
|
31033
30841
|
const diff = await git.raw([
|
|
31034
30842
|
"show",
|
|
31035
30843
|
"--no-color",
|
|
31036
30844
|
"--pretty=format:",
|
|
31037
30845
|
commithash
|
|
31038
30846
|
]);
|
|
31039
|
-
logger?.(
|
|
30847
|
+
logger?.(`[check_diff] ${commithash} -> ${diff.length} chars of diff`);
|
|
31040
30848
|
return diff;
|
|
31041
30849
|
}
|
|
31042
30850
|
}),
|
|
@@ -31048,10 +30856,10 @@ function generateTools(git, logger) {
|
|
|
31048
30856
|
}),
|
|
31049
30857
|
execute: async ({ commithash, path }) => {
|
|
31050
30858
|
const normalized = path.replace(/^\/+|\/+$/g, "");
|
|
31051
|
-
logger?.(
|
|
30859
|
+
logger?.(`[browse_code] ${commithash} @ ${normalized === "" ? "/" : normalized}`);
|
|
31052
30860
|
if (normalized === "") {
|
|
31053
30861
|
const items = parseLsTree(await git.raw(["ls-tree", commithash]));
|
|
31054
|
-
logger?.(
|
|
30862
|
+
logger?.(`[browse_code] root -> folder with ${items.length} item(s)`);
|
|
31055
30863
|
return {
|
|
31056
30864
|
type: "folder",
|
|
31057
30865
|
items
|
|
@@ -31066,12 +30874,12 @@ function generateTools(git, logger) {
|
|
|
31066
30874
|
ref
|
|
31067
30875
|
])).trim();
|
|
31068
30876
|
} catch {
|
|
31069
|
-
logger?.(
|
|
30877
|
+
logger?.(`[browse_code] ${ref} does not exist`);
|
|
31070
30878
|
return { error: "doesn't exists" };
|
|
31071
30879
|
}
|
|
31072
30880
|
if (objectType === "tree") {
|
|
31073
30881
|
const items = parseLsTree(await git.raw(["ls-tree", ref]));
|
|
31074
|
-
logger?.(
|
|
30882
|
+
logger?.(`[browse_code] ${normalized} -> folder with ${items.length} item(s)`);
|
|
31075
30883
|
return {
|
|
31076
30884
|
type: "folder",
|
|
31077
30885
|
items
|
|
@@ -31079,13 +30887,13 @@ function generateTools(git, logger) {
|
|
|
31079
30887
|
}
|
|
31080
30888
|
if (objectType === "blob") {
|
|
31081
30889
|
const content = await git.show(ref);
|
|
31082
|
-
logger?.(
|
|
30890
|
+
logger?.(`[browse_code] ${normalized} -> file with ${content.length} chars`);
|
|
31083
30891
|
return {
|
|
31084
30892
|
type: "file",
|
|
31085
30893
|
content
|
|
31086
30894
|
};
|
|
31087
30895
|
}
|
|
31088
|
-
logger?.(
|
|
30896
|
+
logger?.(`[browse_code] ${ref} has unsupported object type "${objectType}"`);
|
|
31089
30897
|
return { error: "doesn't exists" };
|
|
31090
30898
|
}
|
|
31091
30899
|
})
|
|
@@ -31320,5 +31128,3 @@ Object.defineProperty(exports, "withoutTrailingSlash", {
|
|
|
31320
31128
|
return withoutTrailingSlash;
|
|
31321
31129
|
}
|
|
31322
31130
|
});
|
|
31323
|
-
|
|
31324
|
-
//# sourceMappingURL=generate-Cy2c8xRC.cjs.map
|