@kevisual/cli 0.0.95 → 0.0.97
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/assistant-opencode.js +421 -20337
- package/dist/assistant-server.js +17707 -37558
- package/dist/assistant.js +357 -20239
- package/dist/envision.js +149 -75
- package/package.json +6 -6
package/dist/envision.js
CHANGED
|
@@ -3140,12 +3140,12 @@ var require_jwa = __commonJS((exports, module) => {
|
|
|
3140
3140
|
};
|
|
3141
3141
|
}
|
|
3142
3142
|
var bufferEqual;
|
|
3143
|
-
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function
|
|
3143
|
+
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function timingSafeEqual2(a, b) {
|
|
3144
3144
|
if (a.byteLength !== b.byteLength) {
|
|
3145
3145
|
return false;
|
|
3146
3146
|
}
|
|
3147
3147
|
return crypto2.timingSafeEqual(a, b);
|
|
3148
|
-
} : function
|
|
3148
|
+
} : function timingSafeEqual2(a, b) {
|
|
3149
3149
|
if (!bufferEqual) {
|
|
3150
3150
|
bufferEqual = require_buffer_equal_constant_time();
|
|
3151
3151
|
}
|
|
@@ -20416,17 +20416,6 @@ var require_db = __commonJS((exports, module) => {
|
|
|
20416
20416
|
};
|
|
20417
20417
|
});
|
|
20418
20418
|
|
|
20419
|
-
// node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js
|
|
20420
|
-
var require_mime_db = __commonJS((exports, module) => {
|
|
20421
|
-
/*!
|
|
20422
|
-
* mime-db
|
|
20423
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
20424
|
-
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
20425
|
-
* MIT Licensed
|
|
20426
|
-
*/
|
|
20427
|
-
module.exports = require_db();
|
|
20428
|
-
});
|
|
20429
|
-
|
|
20430
20419
|
// node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js
|
|
20431
20420
|
var require_mime_types = __commonJS((exports) => {
|
|
20432
20421
|
/*!
|
|
@@ -20435,7 +20424,7 @@ var require_mime_types = __commonJS((exports) => {
|
|
|
20435
20424
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
20436
20425
|
* MIT Licensed
|
|
20437
20426
|
*/
|
|
20438
|
-
var db =
|
|
20427
|
+
var db = require_db();
|
|
20439
20428
|
var extname = __require("path").extname;
|
|
20440
20429
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
20441
20430
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
@@ -20782,7 +20771,7 @@ var require_round = __commonJS((exports, module) => {
|
|
|
20782
20771
|
|
|
20783
20772
|
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js
|
|
20784
20773
|
var require_isNaN = __commonJS((exports, module) => {
|
|
20785
|
-
module.exports = Number.isNaN || function
|
|
20774
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
20786
20775
|
return a !== a;
|
|
20787
20776
|
};
|
|
20788
20777
|
});
|
|
@@ -20916,7 +20905,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20916
20905
|
var toStr = Object.prototype.toString;
|
|
20917
20906
|
var max = Math.max;
|
|
20918
20907
|
var funcType = "[object Function]";
|
|
20919
|
-
var concatty = function
|
|
20908
|
+
var concatty = function concatty2(a, b) {
|
|
20920
20909
|
var arr = [];
|
|
20921
20910
|
for (var i = 0;i < a.length; i += 1) {
|
|
20922
20911
|
arr[i] = a[i];
|
|
@@ -20926,7 +20915,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20926
20915
|
}
|
|
20927
20916
|
return arr;
|
|
20928
20917
|
};
|
|
20929
|
-
var slicy = function
|
|
20918
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
20930
20919
|
var arr = [];
|
|
20931
20920
|
for (var i = offset || 0, j = 0;i < arrLike.length; i += 1, j += 1) {
|
|
20932
20921
|
arr[j] = arrLike[i];
|
|
@@ -20967,7 +20956,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20967
20956
|
}
|
|
20968
20957
|
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
20969
20958
|
if (target.prototype) {
|
|
20970
|
-
var Empty = function
|
|
20959
|
+
var Empty = function Empty2() {};
|
|
20971
20960
|
Empty.prototype = target.prototype;
|
|
20972
20961
|
bound.prototype = new Empty;
|
|
20973
20962
|
Empty.prototype = null;
|
|
@@ -21206,7 +21195,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
21206
21195
|
}
|
|
21207
21196
|
}
|
|
21208
21197
|
var errorProto;
|
|
21209
|
-
var doEval = function
|
|
21198
|
+
var doEval = function doEval2(name) {
|
|
21210
21199
|
var value;
|
|
21211
21200
|
if (name === "%AsyncFunction%") {
|
|
21212
21201
|
value = getEvalledConstructor("async function () {}");
|
|
@@ -21215,12 +21204,12 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
21215
21204
|
} else if (name === "%AsyncGeneratorFunction%") {
|
|
21216
21205
|
value = getEvalledConstructor("async function* () {}");
|
|
21217
21206
|
} else if (name === "%AsyncGenerator%") {
|
|
21218
|
-
var fn =
|
|
21207
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
21219
21208
|
if (fn) {
|
|
21220
21209
|
value = fn.prototype;
|
|
21221
21210
|
}
|
|
21222
21211
|
} else if (name === "%AsyncIteratorPrototype%") {
|
|
21223
|
-
var gen =
|
|
21212
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
21224
21213
|
if (gen && getProto) {
|
|
21225
21214
|
value = getProto(gen.prototype);
|
|
21226
21215
|
}
|
|
@@ -21291,7 +21280,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
21291
21280
|
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
21292
21281
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
21293
21282
|
var reEscapeChar = /\\(\\)?/g;
|
|
21294
|
-
var stringToPath = function
|
|
21283
|
+
var stringToPath = function stringToPath2(string) {
|
|
21295
21284
|
var first = $strSlice(string, 0, 1);
|
|
21296
21285
|
var last = $strSlice(string, -1);
|
|
21297
21286
|
if (first === "%" && last !== "%") {
|
|
@@ -21305,7 +21294,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
21305
21294
|
});
|
|
21306
21295
|
return result;
|
|
21307
21296
|
};
|
|
21308
|
-
var getBaseIntrinsic = function
|
|
21297
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
21309
21298
|
var intrinsicName = name;
|
|
21310
21299
|
var alias;
|
|
21311
21300
|
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
@@ -22327,8 +22316,8 @@ InitEnv.init();
|
|
|
22327
22316
|
var version = useContextKey("version", () => {
|
|
22328
22317
|
let version2 = "0.0.64";
|
|
22329
22318
|
try {
|
|
22330
|
-
if ("0.0.
|
|
22331
|
-
version2 = "0.0.
|
|
22319
|
+
if ("0.0.97")
|
|
22320
|
+
version2 = "0.0.97";
|
|
22332
22321
|
} catch (e) {}
|
|
22333
22322
|
return version2;
|
|
22334
22323
|
});
|
|
@@ -23445,14 +23434,14 @@ var getEnvToken = () => {
|
|
|
23445
23434
|
return envTokne;
|
|
23446
23435
|
};
|
|
23447
23436
|
|
|
23448
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23437
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
23449
23438
|
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
23450
23439
|
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
23451
23440
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
23452
23441
|
var isTabKey = (key) => key.name === "tab";
|
|
23453
23442
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
23454
23443
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
23455
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23444
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
23456
23445
|
class AbortPromptError extends Error {
|
|
23457
23446
|
name = "AbortPromptError";
|
|
23458
23447
|
message = "Prompt was aborted";
|
|
@@ -23478,10 +23467,10 @@ class HookError extends Error {
|
|
|
23478
23467
|
class ValidationError extends Error {
|
|
23479
23468
|
name = "ValidationError";
|
|
23480
23469
|
}
|
|
23481
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23470
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
23482
23471
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
23483
23472
|
|
|
23484
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23473
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
23485
23474
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
23486
23475
|
var hookStorage = new AsyncLocalStorage;
|
|
23487
23476
|
function createStore(rl) {
|
|
@@ -23586,10 +23575,10 @@ var effectScheduler = {
|
|
|
23586
23575
|
}
|
|
23587
23576
|
};
|
|
23588
23577
|
|
|
23589
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23578
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
23590
23579
|
function useState(defaultValue) {
|
|
23591
23580
|
return withPointer((pointer) => {
|
|
23592
|
-
const setState = AsyncResource2.bind(function
|
|
23581
|
+
const setState = AsyncResource2.bind(function setState2(newValue) {
|
|
23593
23582
|
if (pointer.get() !== newValue) {
|
|
23594
23583
|
pointer.set(newValue);
|
|
23595
23584
|
handleChange();
|
|
@@ -23604,7 +23593,7 @@ function useState(defaultValue) {
|
|
|
23604
23593
|
});
|
|
23605
23594
|
}
|
|
23606
23595
|
|
|
23607
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23596
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
23608
23597
|
function useEffect(cb, depArray) {
|
|
23609
23598
|
withPointer((pointer) => {
|
|
23610
23599
|
const oldDeps = pointer.get();
|
|
@@ -23616,7 +23605,7 @@ function useEffect(cb, depArray) {
|
|
|
23616
23605
|
});
|
|
23617
23606
|
}
|
|
23618
23607
|
|
|
23619
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23608
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
23620
23609
|
import { styleText } from "node:util";
|
|
23621
23610
|
|
|
23622
23611
|
// node_modules/.pnpm/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
@@ -23908,7 +23897,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
23908
23897
|
var dist_default = figures;
|
|
23909
23898
|
var replacements = Object.entries(specialMainSymbols);
|
|
23910
23899
|
|
|
23911
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23900
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
23912
23901
|
var defaultTheme = {
|
|
23913
23902
|
prefix: {
|
|
23914
23903
|
idle: styleText("blue", "?"),
|
|
@@ -23929,7 +23918,7 @@ var defaultTheme = {
|
|
|
23929
23918
|
}
|
|
23930
23919
|
};
|
|
23931
23920
|
|
|
23932
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23921
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
23933
23922
|
function isPlainObject(value) {
|
|
23934
23923
|
if (typeof value !== "object" || value === null)
|
|
23935
23924
|
return false;
|
|
@@ -23957,7 +23946,7 @@ function makeTheme(...themes) {
|
|
|
23957
23946
|
return deepMerge(...themesToMerge);
|
|
23958
23947
|
}
|
|
23959
23948
|
|
|
23960
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23949
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
23961
23950
|
function usePrefix({ status = "idle", theme }) {
|
|
23962
23951
|
const [showLoader, setShowLoader] = useState(false);
|
|
23963
23952
|
const [tick, setTick] = useState(0);
|
|
@@ -23987,7 +23976,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
23987
23976
|
const iconName = status === "loading" ? "idle" : status;
|
|
23988
23977
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
23989
23978
|
}
|
|
23990
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23979
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
23991
23980
|
function useMemo(fn, dependencies) {
|
|
23992
23981
|
return withPointer((pointer) => {
|
|
23993
23982
|
const prev = pointer.get();
|
|
@@ -23999,11 +23988,11 @@ function useMemo(fn, dependencies) {
|
|
|
23999
23988
|
return prev.value;
|
|
24000
23989
|
});
|
|
24001
23990
|
}
|
|
24002
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23991
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
24003
23992
|
function useRef(val) {
|
|
24004
23993
|
return useState({ current: val })[0];
|
|
24005
23994
|
}
|
|
24006
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
23995
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
24007
23996
|
function useKeypress(userHandler) {
|
|
24008
23997
|
const signal = useRef(userHandler);
|
|
24009
23998
|
signal.current = userHandler;
|
|
@@ -24021,7 +24010,7 @@ function useKeypress(userHandler) {
|
|
|
24021
24010
|
};
|
|
24022
24011
|
}, []);
|
|
24023
24012
|
}
|
|
24024
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24013
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
24025
24014
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
24026
24015
|
|
|
24027
24016
|
// node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
@@ -24455,7 +24444,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
24455
24444
|
`);
|
|
24456
24445
|
}
|
|
24457
24446
|
|
|
24458
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24447
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
24459
24448
|
function breakLines(content, width) {
|
|
24460
24449
|
return content.split(`
|
|
24461
24450
|
`).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
|
|
@@ -24466,7 +24455,7 @@ function readlineWidth() {
|
|
|
24466
24455
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
24467
24456
|
}
|
|
24468
24457
|
|
|
24469
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24458
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
24470
24459
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
24471
24460
|
const state = useRef({
|
|
24472
24461
|
lastPointer: active,
|
|
@@ -24532,7 +24521,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
24532
24521
|
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
24533
24522
|
`);
|
|
24534
24523
|
}
|
|
24535
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24524
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
24536
24525
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
24537
24526
|
import * as readline2 from "node:readline";
|
|
24538
24527
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -24745,7 +24734,7 @@ var {
|
|
|
24745
24734
|
unload
|
|
24746
24735
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
24747
24736
|
|
|
24748
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24737
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
24749
24738
|
import { stripVTControlCharacters } from "node:util";
|
|
24750
24739
|
|
|
24751
24740
|
// node_modules/.pnpm/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
@@ -24764,7 +24753,7 @@ var cursorTo = (x, y) => {
|
|
|
24764
24753
|
var eraseLine = ESC + "2K";
|
|
24765
24754
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
24766
24755
|
|
|
24767
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24756
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
24768
24757
|
var height = (content) => content.split(`
|
|
24769
24758
|
`).length;
|
|
24770
24759
|
var lastLine = (content) => content.split(`
|
|
@@ -24829,7 +24818,7 @@ class ScreenManager {
|
|
|
24829
24818
|
}
|
|
24830
24819
|
}
|
|
24831
24820
|
|
|
24832
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24821
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
24833
24822
|
class PromisePolyfill extends Promise {
|
|
24834
24823
|
static withResolver() {
|
|
24835
24824
|
let resolve;
|
|
@@ -24842,7 +24831,7 @@ class PromisePolyfill extends Promise {
|
|
|
24842
24831
|
}
|
|
24843
24832
|
}
|
|
24844
24833
|
|
|
24845
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24834
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
24846
24835
|
function getCallSites() {
|
|
24847
24836
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
24848
24837
|
let result = [];
|
|
@@ -24928,7 +24917,7 @@ function createPrompt(view) {
|
|
|
24928
24917
|
};
|
|
24929
24918
|
return prompt;
|
|
24930
24919
|
}
|
|
24931
|
-
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.0
|
|
24920
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
24932
24921
|
import { styleText as styleText2 } from "node:util";
|
|
24933
24922
|
class Separator {
|
|
24934
24923
|
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
@@ -24942,7 +24931,7 @@ class Separator {
|
|
|
24942
24931
|
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
24943
24932
|
}
|
|
24944
24933
|
}
|
|
24945
|
-
// node_modules/.pnpm/@inquirer+confirm@6.0.4_@types+node@25.0
|
|
24934
|
+
// node_modules/.pnpm/@inquirer+confirm@6.0.4_@types+node@25.1.0/node_modules/@inquirer/confirm/dist/index.js
|
|
24946
24935
|
function getBooleanValue(value, defaultValue) {
|
|
24947
24936
|
let answer = defaultValue !== false;
|
|
24948
24937
|
if (/^(y|yes)/i.test(value))
|
|
@@ -24987,7 +24976,7 @@ var dist_default2 = createPrompt((config, done) => {
|
|
|
24987
24976
|
const message = theme.style.message(config.message, status);
|
|
24988
24977
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
24989
24978
|
});
|
|
24990
|
-
// node_modules/.pnpm/@inquirer+input@5.0.4_@types+node@25.0
|
|
24979
|
+
// node_modules/.pnpm/@inquirer+input@5.0.4_@types+node@25.1.0/node_modules/@inquirer/input/dist/index.js
|
|
24991
24980
|
var inputTheme = {
|
|
24992
24981
|
validationFailureMode: "keep"
|
|
24993
24982
|
};
|
|
@@ -25071,7 +25060,7 @@ var dist_default3 = createPrompt((config, done) => {
|
|
|
25071
25060
|
error
|
|
25072
25061
|
];
|
|
25073
25062
|
});
|
|
25074
|
-
// node_modules/.pnpm/@inquirer+select@5.0.4_@types+node@25.0
|
|
25063
|
+
// node_modules/.pnpm/@inquirer+select@5.0.4_@types+node@25.1.0/node_modules/@inquirer/select/dist/index.js
|
|
25075
25064
|
import { styleText as styleText3 } from "node:util";
|
|
25076
25065
|
var selectTheme = {
|
|
25077
25066
|
icon: { cursor: dist_default.pointer },
|
|
@@ -33281,7 +33270,7 @@ ${toolsList}
|
|
|
33281
33270
|
});
|
|
33282
33271
|
}
|
|
33283
33272
|
}
|
|
33284
|
-
// node_modules/.pnpm/lru-cache@11.2.
|
|
33273
|
+
// node_modules/.pnpm/lru-cache@11.2.5/node_modules/lru-cache/dist/esm/index.js
|
|
33285
33274
|
var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
33286
33275
|
var warned = new Set;
|
|
33287
33276
|
var PROCESS = typeof process === "object" && !!process ? process : {};
|
|
@@ -34078,6 +34067,7 @@ class LRUCache {
|
|
|
34078
34067
|
const cb = (v2, updateCache = false) => {
|
|
34079
34068
|
const { aborted } = ac.signal;
|
|
34080
34069
|
const ignoreAbort = options.ignoreFetchAbort && v2 !== undefined;
|
|
34070
|
+
const proceed = options.ignoreFetchAbort || !!(options.allowStaleOnFetchAbort && v2 !== undefined);
|
|
34081
34071
|
if (options.status) {
|
|
34082
34072
|
if (aborted && !updateCache) {
|
|
34083
34073
|
options.status.fetchAborted = true;
|
|
@@ -34089,7 +34079,7 @@ class LRUCache {
|
|
|
34089
34079
|
}
|
|
34090
34080
|
}
|
|
34091
34081
|
if (aborted && !ignoreAbort && !updateCache) {
|
|
34092
|
-
return fetchFail(ac.signal.reason);
|
|
34082
|
+
return fetchFail(ac.signal.reason, proceed);
|
|
34093
34083
|
}
|
|
34094
34084
|
const bf2 = p;
|
|
34095
34085
|
const vl = this.#valList[index];
|
|
@@ -34113,16 +34103,16 @@ class LRUCache {
|
|
|
34113
34103
|
options.status.fetchRejected = true;
|
|
34114
34104
|
options.status.fetchError = er;
|
|
34115
34105
|
}
|
|
34116
|
-
return fetchFail(er);
|
|
34106
|
+
return fetchFail(er, false);
|
|
34117
34107
|
};
|
|
34118
|
-
const fetchFail = (er) => {
|
|
34108
|
+
const fetchFail = (er, proceed) => {
|
|
34119
34109
|
const { aborted } = ac.signal;
|
|
34120
34110
|
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
|
34121
34111
|
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
34122
34112
|
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
34123
34113
|
const bf2 = p;
|
|
34124
34114
|
if (this.#valList[index] === p) {
|
|
34125
|
-
const del = !noDelete || bf2.__staleWhileFetching === undefined;
|
|
34115
|
+
const del = !noDelete || !proceed && bf2.__staleWhileFetching === undefined;
|
|
34126
34116
|
if (del) {
|
|
34127
34117
|
this.#delete(k, "fetch");
|
|
34128
34118
|
} else if (!allowStaleAborted) {
|
|
@@ -34553,7 +34543,7 @@ aiCmd.addCommand(aiRun);
|
|
|
34553
34543
|
aiCmd.addCommand(aiRunDeploy);
|
|
34554
34544
|
program.addCommand(aiCmd);
|
|
34555
34545
|
|
|
34556
|
-
// src/command/
|
|
34546
|
+
// src/command/coding-plan/cc.ts
|
|
34557
34547
|
import path14 from "node:path";
|
|
34558
34548
|
import os4 from "node:os";
|
|
34559
34549
|
import fs18 from "node:fs";
|
|
@@ -34673,6 +34663,90 @@ var command11 = new Command("cc").description("切换claude code模型,支持G
|
|
|
34673
34663
|
});
|
|
34674
34664
|
program.addCommand(command11);
|
|
34675
34665
|
|
|
34666
|
+
// src/command/coding-plan/oc.ts
|
|
34667
|
+
import path15 from "node:path";
|
|
34668
|
+
import os5 from "node:os";
|
|
34669
|
+
import fs19 from "node:fs";
|
|
34670
|
+
var readOpencodeConfig = (configPath2) => {
|
|
34671
|
+
if (fs19.existsSync(configPath2)) {
|
|
34672
|
+
const content = fs19.readFileSync(configPath2, "utf-8");
|
|
34673
|
+
try {
|
|
34674
|
+
return JSON.parse(content);
|
|
34675
|
+
} catch {
|
|
34676
|
+
return { provider: {} };
|
|
34677
|
+
}
|
|
34678
|
+
}
|
|
34679
|
+
return { provider: {} };
|
|
34680
|
+
};
|
|
34681
|
+
var saveOpencodeConfig = (configPath2, config2) => {
|
|
34682
|
+
fs19.writeFileSync(configPath2, JSON.stringify(config2, null, 2));
|
|
34683
|
+
};
|
|
34684
|
+
var extractAvailableModels = (config2) => {
|
|
34685
|
+
const models = [];
|
|
34686
|
+
const providers = config2.provider || {};
|
|
34687
|
+
for (const [providerKey, providerConfig] of Object.entries(providers)) {
|
|
34688
|
+
const providerModels = providerConfig.models || {};
|
|
34689
|
+
for (const [modelKey] of Object.entries(providerModels)) {
|
|
34690
|
+
models.push({
|
|
34691
|
+
name: providerConfig.name,
|
|
34692
|
+
provider: providerKey,
|
|
34693
|
+
model: modelKey,
|
|
34694
|
+
label: `${providerKey}/${modelKey}`
|
|
34695
|
+
});
|
|
34696
|
+
}
|
|
34697
|
+
}
|
|
34698
|
+
return models;
|
|
34699
|
+
};
|
|
34700
|
+
var command12 = new Command("oc").description("切换 opencode 模型,从配置的 provider 中选择").option("-m, --model <model:string>", "选择模型 (格式: provider/model)").action(async (options) => {
|
|
34701
|
+
const configPath2 = path15.join(os5.homedir(), ".config", "opencode", "opencode.json");
|
|
34702
|
+
const config2 = readOpencodeConfig(configPath2);
|
|
34703
|
+
const availableModels = extractAvailableModels(config2);
|
|
34704
|
+
if (availableModels.length === 0) {
|
|
34705
|
+
console.log(chalk2.red("没有找到可用的模型配置,请检查 opencode.json 中的 provider 配置"));
|
|
34706
|
+
return;
|
|
34707
|
+
}
|
|
34708
|
+
let selectedModel;
|
|
34709
|
+
if (options.model) {
|
|
34710
|
+
selectedModel = options.model;
|
|
34711
|
+
} else {
|
|
34712
|
+
selectedModel = await dist_default4({
|
|
34713
|
+
message: "请选择模型:",
|
|
34714
|
+
choices: availableModels.map((m) => ({
|
|
34715
|
+
name: `${m.name} - ${m.model}`,
|
|
34716
|
+
value: m.label
|
|
34717
|
+
}))
|
|
34718
|
+
});
|
|
34719
|
+
}
|
|
34720
|
+
const validModel = availableModels.find((m) => m.label === selectedModel);
|
|
34721
|
+
if (!validModel) {
|
|
34722
|
+
console.log(chalk2.red(`无效的模型选择: ${selectedModel}`));
|
|
34723
|
+
return;
|
|
34724
|
+
}
|
|
34725
|
+
config2.model = selectedModel;
|
|
34726
|
+
saveOpencodeConfig(configPath2, config2);
|
|
34727
|
+
console.log(`已切换到模型: ${chalk2.green(selectedModel)}`);
|
|
34728
|
+
console.log(`提供商: ${chalk2.cyan(validModel.name)}`);
|
|
34729
|
+
console.log(`配置已保存到: ${configPath2}`);
|
|
34730
|
+
});
|
|
34731
|
+
var showCommand = new Command("show").description("显示当前 opencode 配置的 model").action(() => {
|
|
34732
|
+
const configPath2 = path15.join(os5.homedir(), ".config", "opencode", "opencode.json");
|
|
34733
|
+
const config2 = readOpencodeConfig(configPath2);
|
|
34734
|
+
if (!config2.model) {
|
|
34735
|
+
console.log(chalk2.yellow("当前没有配置 model"));
|
|
34736
|
+
return;
|
|
34737
|
+
}
|
|
34738
|
+
const availableModels = extractAvailableModels(config2);
|
|
34739
|
+
const currentModel = availableModels.find((m) => m.label === config2.model);
|
|
34740
|
+
console.log(chalk2.bold("当前 opencode 配置:"));
|
|
34741
|
+
console.log(`模型: ${chalk2.green(config2.model)}`);
|
|
34742
|
+
if (currentModel) {
|
|
34743
|
+
console.log(`提供商: ${chalk2.cyan(currentModel.name)}`);
|
|
34744
|
+
}
|
|
34745
|
+
console.log(`配置文件: ${configPath2}`);
|
|
34746
|
+
});
|
|
34747
|
+
command12.addCommand(showCommand);
|
|
34748
|
+
program.addCommand(command12);
|
|
34749
|
+
|
|
34676
34750
|
// src/command/docker.ts
|
|
34677
34751
|
import { spawn as spawn4 } from "node:child_process";
|
|
34678
34752
|
var dockerCommand = new Command("docker").description("Docker 相关指令").action(async () => {
|
|
@@ -37350,13 +37424,13 @@ class LRUCache2 {
|
|
|
37350
37424
|
}
|
|
37351
37425
|
|
|
37352
37426
|
// src/command/jwks.ts
|
|
37353
|
-
import
|
|
37354
|
-
import
|
|
37427
|
+
import fs20 from "node:fs";
|
|
37428
|
+
import path16 from "node:path";
|
|
37355
37429
|
var getPath = async (dir) => {
|
|
37356
|
-
const JWKS_PATH =
|
|
37357
|
-
const PRIVATE_JWK_PATH =
|
|
37358
|
-
const PRIVATE_KEY_PATH =
|
|
37359
|
-
const PUBLIC_KEY_PATH =
|
|
37430
|
+
const JWKS_PATH = path16.join(dir, "jwks.json");
|
|
37431
|
+
const PRIVATE_JWK_PATH = path16.join(dir, "privateKey.json");
|
|
37432
|
+
const PRIVATE_KEY_PATH = path16.join(dir, "privateKey.txt");
|
|
37433
|
+
const PUBLIC_KEY_PATH = path16.join(dir, "publicKey.txt");
|
|
37360
37434
|
return {
|
|
37361
37435
|
JWKS_PATH,
|
|
37362
37436
|
PRIVATE_JWK_PATH,
|
|
@@ -37366,39 +37440,39 @@ var getPath = async (dir) => {
|
|
|
37366
37440
|
};
|
|
37367
37441
|
var jwksCmd = new Command("jwks").description("JWKS 相关命令").action(async (opts) => {});
|
|
37368
37442
|
var jwksGenerate = new Command("generate").alias("gen").option("-d , --dir <dir>", "指定保存目录,默认当前目录下 jwt 文件夹", "jwt").description("生成 JWKS 密钥对").action(async (opts) => {
|
|
37369
|
-
const dir =
|
|
37370
|
-
if (!
|
|
37371
|
-
|
|
37443
|
+
const dir = path16.isAbsolute(opts.dir) ? opts.dir : path16.join(process.cwd(), opts.dir);
|
|
37444
|
+
if (!fs20.existsSync(dir)) {
|
|
37445
|
+
fs20.mkdirSync(dir, { recursive: true });
|
|
37372
37446
|
}
|
|
37373
37447
|
const { JWKS_PATH, PRIVATE_JWK_PATH, PRIVATE_KEY_PATH, PUBLIC_KEY_PATH } = await getPath(dir);
|
|
37374
37448
|
const { jwks, privateJWK, privatePEM, publicPEM } = await generate();
|
|
37375
|
-
|
|
37376
|
-
|
|
37377
|
-
|
|
37378
|
-
|
|
37449
|
+
fs20.writeFileSync(PUBLIC_KEY_PATH, publicPEM);
|
|
37450
|
+
fs20.writeFileSync(PRIVATE_KEY_PATH, privatePEM);
|
|
37451
|
+
fs20.writeFileSync(PRIVATE_JWK_PATH, JSON.stringify(privateJWK, null, 2));
|
|
37452
|
+
fs20.writeFileSync(JWKS_PATH, JSON.stringify(jwks, null, 2));
|
|
37379
37453
|
console.log(`Keys have been saved to directory: ${dir}`);
|
|
37380
37454
|
});
|
|
37381
37455
|
jwksCmd.addCommand(jwksGenerate);
|
|
37382
37456
|
var getJWKS = new Command("get").description("获取 JWKS 内容").option("-d , --dir <dir>", "指定 JWKS 所在目录,默认当前目录下 jwt 文件夹", "jwt").option("-t, --type <type>", "指定获取类型,jwks 或 privateJWK", "jwks").action(async (opts) => {
|
|
37383
|
-
const dir =
|
|
37457
|
+
const dir = path16.isAbsolute(opts.dir) ? opts.dir : path16.join(process.cwd(), opts.dir);
|
|
37384
37458
|
const { JWKS_PATH, PRIVATE_JWK_PATH } = await getPath(dir);
|
|
37385
37459
|
const type = opts.type || "jwks";
|
|
37386
37460
|
if (type !== "jwks") {
|
|
37387
|
-
if (!
|
|
37461
|
+
if (!fs20.existsSync(PRIVATE_JWK_PATH)) {
|
|
37388
37462
|
console.error(`Private JWK file not found in directory: ${dir}`);
|
|
37389
37463
|
return;
|
|
37390
37464
|
}
|
|
37391
|
-
const privateJWKContent =
|
|
37465
|
+
const privateJWKContent = fs20.readFileSync(PRIVATE_JWK_PATH, "utf-8");
|
|
37392
37466
|
console.log(`Private JWK:
|
|
37393
37467
|
`);
|
|
37394
37468
|
console.log(privateJWKContent);
|
|
37395
37469
|
return;
|
|
37396
37470
|
}
|
|
37397
|
-
if (!
|
|
37471
|
+
if (!fs20.existsSync(JWKS_PATH)) {
|
|
37398
37472
|
console.error(`JWKS file not found in directory: ${dir}`);
|
|
37399
37473
|
return;
|
|
37400
37474
|
}
|
|
37401
|
-
const jwksContent =
|
|
37475
|
+
const jwksContent = fs20.readFileSync(JWKS_PATH, "utf-8");
|
|
37402
37476
|
console.log(`PublicJWKS:
|
|
37403
37477
|
`);
|
|
37404
37478
|
console.log(jwksContent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.97",
|
|
4
4
|
"description": "envision 命令行工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"basename": "/root/cli",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"@kevisual/auth": "^2.0.3",
|
|
50
50
|
"@kevisual/context": "^0.0.4",
|
|
51
51
|
"@kevisual/use-config": "^1.0.28",
|
|
52
|
-
"@opencode-ai/sdk": "^1.1.
|
|
52
|
+
"@opencode-ai/sdk": "^1.1.44",
|
|
53
53
|
"@types/busboy": "^1.5.4",
|
|
54
54
|
"busboy": "^1.6.0",
|
|
55
55
|
"eventemitter3": "^5.0.4",
|
|
56
56
|
"jose": "^6.1.3",
|
|
57
57
|
"lowdb": "^7.0.1",
|
|
58
|
-
"lru-cache": "^11.2.
|
|
58
|
+
"lru-cache": "^11.2.5",
|
|
59
59
|
"micromatch": "^4.0.8",
|
|
60
60
|
"pm2": "latest",
|
|
61
61
|
"semver": "^7.7.3",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"@kevisual/logger": "^0.0.4",
|
|
68
68
|
"@kevisual/query": "0.0.38",
|
|
69
69
|
"@kevisual/query-login": "0.0.7",
|
|
70
|
-
"@types/bun": "^1.3.
|
|
70
|
+
"@types/bun": "^1.3.8",
|
|
71
71
|
"@types/crypto-js": "^4.2.2",
|
|
72
72
|
"@types/jsonwebtoken": "^9.0.10",
|
|
73
73
|
"@types/micromatch": "^4.0.10",
|
|
74
|
-
"@types/node": "^25.0
|
|
74
|
+
"@types/node": "^25.1.0",
|
|
75
75
|
"@types/semver": "^7.7.1",
|
|
76
76
|
"chalk": "^5.6.2",
|
|
77
77
|
"commander": "^14.0.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"ignore": "^7.0.5",
|
|
83
83
|
"jsonwebtoken": "^9.0.3",
|
|
84
84
|
"pm2": "^6.0.14",
|
|
85
|
-
"tar": "^7.5.
|
|
85
|
+
"tar": "^7.5.7",
|
|
86
86
|
"zustand": "^5.0.10"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|