terminal-pilot 0.0.22 → 0.0.24
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/cli.js +274 -108
- package/dist/cli.js.map +4 -4
- package/dist/commands/index.d.ts +35 -35
- package/dist/commands/index.js +44 -7
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +37 -5
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +24 -2
- package/dist/commands/installer.js.map +4 -4
- package/dist/commands/screenshot.js +8 -3
- package/dist/commands/screenshot.js.map +4 -4
- package/dist/commands/uninstall.js +22 -0
- package/dist/commands/uninstall.js.map +3 -3
- package/dist/testing/cli-repl.js +274 -108
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +274 -108
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/@poe-code/agent-skill-config/dist/apply.js +2 -4
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +8 -9
- package/node_modules/@poe-code/agent-skill-config/dist/configs.js +4 -0
- package/node_modules/@poe-code/agent-skill-config/dist/error-codes.d.ts +1 -0
- package/node_modules/@poe-code/agent-skill-config/dist/error-codes.js +5 -0
- package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +4 -6
- package/node_modules/@poe-code/agent-skill-config/dist/templates.js +2 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2707,6 +2707,11 @@ function getCommandSourcePath(command) {
|
|
|
2707
2707
|
return command[commandSourcePathSymbol];
|
|
2708
2708
|
}
|
|
2709
2709
|
|
|
2710
|
+
// ../toolcraft/src/error-codes.ts
|
|
2711
|
+
function hasOwnErrorCode(error3, code) {
|
|
2712
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2710
2715
|
// ../task-list/src/open.ts
|
|
2711
2716
|
import * as fsPromises from "node:fs/promises";
|
|
2712
2717
|
|
|
@@ -2875,10 +2880,12 @@ import path5 from "node:path";
|
|
|
2875
2880
|
// ../process-runner/src/host/host-runner.ts
|
|
2876
2881
|
import { spawn as spawnChildProcess } from "node:child_process";
|
|
2877
2882
|
function createHostRunner(options = {}) {
|
|
2878
|
-
const
|
|
2883
|
+
const runnerOptions = normalizeHostRunnerOptions(options);
|
|
2884
|
+
const detachedByDefault = runnerOptions.detached === true;
|
|
2879
2885
|
return {
|
|
2880
2886
|
name: "host",
|
|
2881
|
-
exec(
|
|
2887
|
+
exec(inputSpec) {
|
|
2888
|
+
const spec = normalizeRunSpec(inputSpec);
|
|
2882
2889
|
if (spec.signal?.aborted === true) {
|
|
2883
2890
|
return {
|
|
2884
2891
|
pid: null,
|
|
@@ -2895,12 +2902,16 @@ function createHostRunner(options = {}) {
|
|
|
2895
2902
|
const stderrMode = spec.stderr ?? "pipe";
|
|
2896
2903
|
const killProcessGroup = detachedByDefault || spec.killProcessGroup === true;
|
|
2897
2904
|
const stdio = stdinMode === "inherit" && stdoutMode === "inherit" && stderrMode === "inherit" ? "inherit" : [stdinMode, stdoutMode, stderrMode];
|
|
2898
|
-
const child = spawnChildProcess(
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2905
|
+
const child = spawnChildProcess(
|
|
2906
|
+
spec.command,
|
|
2907
|
+
spec.args ?? [],
|
|
2908
|
+
createNullRecord({
|
|
2909
|
+
cwd: spec.cwd,
|
|
2910
|
+
env: spec.env,
|
|
2911
|
+
stdio,
|
|
2912
|
+
...killProcessGroup ? { detached: true } : {}
|
|
2913
|
+
})
|
|
2914
|
+
);
|
|
2904
2915
|
if (killProcessGroup) {
|
|
2905
2916
|
child.unref();
|
|
2906
2917
|
}
|
|
@@ -2946,6 +2957,38 @@ function createHostRunner(options = {}) {
|
|
|
2946
2957
|
}
|
|
2947
2958
|
};
|
|
2948
2959
|
}
|
|
2960
|
+
function normalizeHostRunnerOptions(options) {
|
|
2961
|
+
return createNullRecord({
|
|
2962
|
+
...optionalOwnProperty(options, "detached")
|
|
2963
|
+
});
|
|
2964
|
+
}
|
|
2965
|
+
function normalizeRunSpec(spec) {
|
|
2966
|
+
return createNullRecord({
|
|
2967
|
+
command: getOwnProperty(spec, "command"),
|
|
2968
|
+
...optionalOwnProperty(spec, "args"),
|
|
2969
|
+
...optionalOwnProperty(spec, "cwd"),
|
|
2970
|
+
...optionalOwnProperty(spec, "env"),
|
|
2971
|
+
...optionalOwnProperty(spec, "stdin"),
|
|
2972
|
+
...optionalOwnProperty(spec, "stdout"),
|
|
2973
|
+
...optionalOwnProperty(spec, "stderr"),
|
|
2974
|
+
...optionalOwnProperty(spec, "tty"),
|
|
2975
|
+
...optionalOwnProperty(spec, "signal"),
|
|
2976
|
+
...optionalOwnProperty(spec, "killProcessGroup")
|
|
2977
|
+
});
|
|
2978
|
+
}
|
|
2979
|
+
function optionalOwnProperty(value, name) {
|
|
2980
|
+
const property = getOwnProperty(value, name);
|
|
2981
|
+
return property === void 0 ? {} : { [name]: property };
|
|
2982
|
+
}
|
|
2983
|
+
function getOwnProperty(value, name) {
|
|
2984
|
+
return hasOwnProperty(value, name) ? value[name] : void 0;
|
|
2985
|
+
}
|
|
2986
|
+
function hasOwnProperty(value, name) {
|
|
2987
|
+
return Object.prototype.hasOwnProperty.call(value, name);
|
|
2988
|
+
}
|
|
2989
|
+
function createNullRecord(value) {
|
|
2990
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), value);
|
|
2991
|
+
}
|
|
2949
2992
|
function bindAbortSignal(signal, onAbort) {
|
|
2950
2993
|
if (signal === void 0) {
|
|
2951
2994
|
return () => {
|
|
@@ -5839,51 +5882,74 @@ function createDefaultFs() {
|
|
|
5839
5882
|
return fsPromises;
|
|
5840
5883
|
}
|
|
5841
5884
|
async function openTaskList(options) {
|
|
5842
|
-
|
|
5885
|
+
const type2 = getOwnProperty2(options, "type");
|
|
5886
|
+
switch (type2) {
|
|
5843
5887
|
case "markdown-dir":
|
|
5844
5888
|
case "yaml-file":
|
|
5845
5889
|
return openFileBackend(options);
|
|
5846
5890
|
case "gh-issues":
|
|
5847
5891
|
return openGhIssuesBackend(options);
|
|
5848
5892
|
default:
|
|
5849
|
-
throw new Error(`Unknown task list backend type "${
|
|
5893
|
+
throw new Error(`Unknown task list backend type "${String(type2)}".`);
|
|
5850
5894
|
}
|
|
5851
5895
|
}
|
|
5852
5896
|
async function openFileBackend(options) {
|
|
5853
|
-
const
|
|
5854
|
-
const
|
|
5897
|
+
const type2 = getOwnProperty2(options, "type");
|
|
5898
|
+
const factory = backendFactories[type2];
|
|
5899
|
+
const stateMachine = resolveStateMachine(
|
|
5900
|
+
getOwnProperty2(options, "stateMachine")
|
|
5901
|
+
);
|
|
5855
5902
|
validateMachine(stateMachine);
|
|
5856
|
-
const markdownOptions =
|
|
5903
|
+
const markdownOptions = type2 === "markdown-dir" ? options : void 0;
|
|
5904
|
+
const defaults2 = getOwnProperty2(options, "defaults");
|
|
5857
5905
|
const deps = {
|
|
5858
|
-
path: options
|
|
5906
|
+
path: getOwnProperty2(options, "path"),
|
|
5859
5907
|
defaults: {
|
|
5860
|
-
metadata:
|
|
5908
|
+
metadata: readDefaultMetadata(defaults2)
|
|
5861
5909
|
},
|
|
5862
|
-
singleList: markdownOptions
|
|
5863
|
-
frontmatterMode: markdownOptions
|
|
5864
|
-
|
|
5865
|
-
|
|
5910
|
+
singleList: markdownOptions === void 0 ? void 0 : getOwnProperty2(markdownOptions, "singleList"),
|
|
5911
|
+
frontmatterMode: markdownOptions === void 0 ? "strict" : getOwnProperty2(
|
|
5912
|
+
markdownOptions,
|
|
5913
|
+
"frontmatterMode"
|
|
5914
|
+
) ?? "strict",
|
|
5915
|
+
create: getOwnProperty2(options, "create") ?? false,
|
|
5916
|
+
fs: getOwnProperty2(options, "fs") ?? createDefaultFs(),
|
|
5866
5917
|
stateMachine
|
|
5867
5918
|
};
|
|
5868
5919
|
return factory(deps);
|
|
5869
5920
|
}
|
|
5870
5921
|
async function openGhIssuesBackend(options) {
|
|
5871
|
-
const
|
|
5922
|
+
const auth = getOwnProperty2(options, "auth");
|
|
5923
|
+
const explicitToken = auth && hasOwnProperty2(auth, "token") ? auth.token : void 0;
|
|
5872
5924
|
const endpoint = resolveEndpoint();
|
|
5925
|
+
const defaults2 = getOwnProperty2(options, "defaults");
|
|
5873
5926
|
return ghIssuesBackend({
|
|
5874
|
-
repo: options
|
|
5875
|
-
project: options
|
|
5876
|
-
filter: options
|
|
5877
|
-
state: options
|
|
5878
|
-
stateMachine: options
|
|
5927
|
+
repo: getOwnProperty2(options, "repo"),
|
|
5928
|
+
project: getOwnProperty2(options, "project"),
|
|
5929
|
+
filter: getOwnProperty2(options, "filter"),
|
|
5930
|
+
state: getOwnProperty2(options, "state"),
|
|
5931
|
+
stateMachine: getOwnProperty2(options, "stateMachine"),
|
|
5879
5932
|
defaults: {
|
|
5880
|
-
metadata:
|
|
5933
|
+
metadata: readDefaultMetadata(defaults2)
|
|
5881
5934
|
},
|
|
5882
|
-
token,
|
|
5935
|
+
token: await resolveAuth({ explicitToken }),
|
|
5883
5936
|
endpoint,
|
|
5884
|
-
fetch: options
|
|
5937
|
+
fetch: getOwnProperty2(options, "fetch")
|
|
5885
5938
|
});
|
|
5886
5939
|
}
|
|
5940
|
+
function readDefaultMetadata(defaults2) {
|
|
5941
|
+
const metadata = defaults2 === void 0 ? void 0 : getOwnProperty2(defaults2, "metadata");
|
|
5942
|
+
return isRecord4(metadata) ? { ...metadata } : {};
|
|
5943
|
+
}
|
|
5944
|
+
function getOwnProperty2(value, name) {
|
|
5945
|
+
return hasOwnProperty2(value, name) ? value[name] : void 0;
|
|
5946
|
+
}
|
|
5947
|
+
function hasOwnProperty2(value, name) {
|
|
5948
|
+
return Object.prototype.hasOwnProperty.call(value, name);
|
|
5949
|
+
}
|
|
5950
|
+
function isRecord4(value) {
|
|
5951
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5952
|
+
}
|
|
5887
5953
|
|
|
5888
5954
|
// ../task-list/src/move.ts
|
|
5889
5955
|
import * as fsPromises2 from "node:fs/promises";
|
|
@@ -6141,7 +6207,7 @@ function osascriptProvider(options = {}) {
|
|
|
6141
6207
|
const { stdout } = await execFileAsync(binary, ["-e", script]);
|
|
6142
6208
|
return parseStdout(stdout);
|
|
6143
6209
|
} catch (error3) {
|
|
6144
|
-
if (error3
|
|
6210
|
+
if (hasOwnErrorCode2(error3, "ENOENT")) {
|
|
6145
6211
|
throw new Error("osascript not found \u2014 provide a different provider on this platform");
|
|
6146
6212
|
}
|
|
6147
6213
|
if (isUserCanceled(error3)) {
|
|
@@ -6153,6 +6219,9 @@ function osascriptProvider(options = {}) {
|
|
|
6153
6219
|
}
|
|
6154
6220
|
};
|
|
6155
6221
|
}
|
|
6222
|
+
function hasOwnErrorCode2(error3, code) {
|
|
6223
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
6224
|
+
}
|
|
6156
6225
|
|
|
6157
6226
|
// ../toolcraft/src/human-in-loop/default-provider.ts
|
|
6158
6227
|
function noProviderConfigured() {
|
|
@@ -6710,7 +6779,7 @@ function escapeMarkdownCell(value) {
|
|
|
6710
6779
|
return value.replaceAll("|", "\\|");
|
|
6711
6780
|
}
|
|
6712
6781
|
function isMissingStateError(error3) {
|
|
6713
|
-
return
|
|
6782
|
+
return hasOwnErrorCode(error3, "ENOENT");
|
|
6714
6783
|
}
|
|
6715
6784
|
|
|
6716
6785
|
// ../toolcraft/src/error-report.ts
|
|
@@ -6739,6 +6808,13 @@ import { createCipheriv, createDecipheriv, randomBytes as randomBytes4, randomUU
|
|
|
6739
6808
|
import { promises as fs } from "node:fs";
|
|
6740
6809
|
import { homedir, hostname, userInfo } from "node:os";
|
|
6741
6810
|
import path10 from "node:path";
|
|
6811
|
+
|
|
6812
|
+
// ../auth-store/src/error-codes.ts
|
|
6813
|
+
function hasOwnErrorCode3(error3, code) {
|
|
6814
|
+
return error3 instanceof Error && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
6815
|
+
}
|
|
6816
|
+
|
|
6817
|
+
// ../auth-store/src/encrypted-file-store.ts
|
|
6742
6818
|
var derivedKeyCache = /* @__PURE__ */ new Map();
|
|
6743
6819
|
var ENCRYPTION_ALGORITHM = "aes-256-gcm";
|
|
6744
6820
|
var ENCRYPTION_VERSION = 1;
|
|
@@ -6954,7 +7030,7 @@ async function deriveEncryptionKey(getMachineIdentity, salt) {
|
|
|
6954
7030
|
function parseEncryptedDocument(raw) {
|
|
6955
7031
|
try {
|
|
6956
7032
|
const parsed = JSON.parse(raw);
|
|
6957
|
-
if (!
|
|
7033
|
+
if (!isRecord5(parsed)) {
|
|
6958
7034
|
return null;
|
|
6959
7035
|
}
|
|
6960
7036
|
const version = getOwnEntry2(parsed, "version");
|
|
@@ -6977,21 +7053,17 @@ function parseEncryptedDocument(raw) {
|
|
|
6977
7053
|
return null;
|
|
6978
7054
|
}
|
|
6979
7055
|
}
|
|
6980
|
-
function
|
|
7056
|
+
function isRecord5(value) {
|
|
6981
7057
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
6982
7058
|
}
|
|
6983
7059
|
function getOwnEntry2(record, key2) {
|
|
6984
7060
|
return Object.prototype.hasOwnProperty.call(record, key2) ? record[key2] : void 0;
|
|
6985
7061
|
}
|
|
6986
7062
|
function isNotFoundError(error3) {
|
|
6987
|
-
return
|
|
6988
|
-
error3 && typeof error3 === "object" && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === "ENOENT"
|
|
6989
|
-
);
|
|
7063
|
+
return hasOwnErrorCode3(error3, "ENOENT");
|
|
6990
7064
|
}
|
|
6991
7065
|
function isAlreadyExistsError(error3) {
|
|
6992
|
-
return
|
|
6993
|
-
error3 && typeof error3 === "object" && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === "EEXIST"
|
|
6994
|
-
);
|
|
7066
|
+
return hasOwnErrorCode3(error3, "EEXIST");
|
|
6995
7067
|
}
|
|
6996
7068
|
|
|
6997
7069
|
// ../auth-store/src/keychain-store.ts
|
|
@@ -10986,8 +11058,7 @@ async function readCache(cachePath) {
|
|
|
10986
11058
|
version: parsed.version === 1 ? 1 : 1
|
|
10987
11059
|
};
|
|
10988
11060
|
} catch (error3) {
|
|
10989
|
-
|
|
10990
|
-
if (code === "ENOENT" || error3 instanceof SyntaxError) {
|
|
11061
|
+
if (hasOwnErrorCode(error3, "ENOENT") || error3 instanceof SyntaxError) {
|
|
10991
11062
|
return void 0;
|
|
10992
11063
|
}
|
|
10993
11064
|
return void 0;
|
|
@@ -11020,9 +11091,7 @@ async function writeCache(cachePath, cache) {
|
|
|
11020
11091
|
}
|
|
11021
11092
|
}
|
|
11022
11093
|
function isAlreadyExistsError2(error3) {
|
|
11023
|
-
return
|
|
11024
|
-
error3 && typeof error3 === "object" && error3.code === "EEXIST"
|
|
11025
|
-
);
|
|
11094
|
+
return hasOwnErrorCode(error3, "EEXIST");
|
|
11026
11095
|
}
|
|
11027
11096
|
async function fetchCache(name, config2) {
|
|
11028
11097
|
const logger2 = createLogger((message2) => {
|
|
@@ -11226,7 +11295,7 @@ async function assertCachePathHasNoSymlinks(filePath) {
|
|
|
11226
11295
|
throw new Error(`MCP cache path must not contain symbolic links: ${currentPath}.`);
|
|
11227
11296
|
}
|
|
11228
11297
|
} catch (error3) {
|
|
11229
|
-
if (error3
|
|
11298
|
+
if (!hasOwnErrorCode(error3, "ENOENT")) {
|
|
11230
11299
|
throw error3;
|
|
11231
11300
|
}
|
|
11232
11301
|
}
|
|
@@ -12674,7 +12743,7 @@ function getJsonParseErrorLocation(error3, source) {
|
|
|
12674
12743
|
return null;
|
|
12675
12744
|
}
|
|
12676
12745
|
function getJsonParseCauseLocation(error3) {
|
|
12677
|
-
if (typeof error3 !== "object" || error3 === null || !("cause"
|
|
12746
|
+
if (typeof error3 !== "object" || error3 === null || !hasOwnProperty3(error3, "cause")) {
|
|
12678
12747
|
return null;
|
|
12679
12748
|
}
|
|
12680
12749
|
const cause = error3.cause;
|
|
@@ -12686,7 +12755,7 @@ function getJsonParseCauseLocation(error3) {
|
|
|
12686
12755
|
return { line, column };
|
|
12687
12756
|
}
|
|
12688
12757
|
function getNumericProperty(value, key2) {
|
|
12689
|
-
if (typeof value !== "object" || value === null || !(key2
|
|
12758
|
+
if (typeof value !== "object" || value === null || !hasOwnProperty3(value, key2)) {
|
|
12690
12759
|
return null;
|
|
12691
12760
|
}
|
|
12692
12761
|
const propertyValue = value[key2];
|
|
@@ -12817,9 +12886,31 @@ function createOption(field, globalLongOptionFlags) {
|
|
|
12817
12886
|
const option = createCommanderOption(`${flags} <value>`, field.description, field);
|
|
12818
12887
|
return [option];
|
|
12819
12888
|
}
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12889
|
+
function resolveCLIControls(controls) {
|
|
12890
|
+
return {
|
|
12891
|
+
debug: controls?.debug === true,
|
|
12892
|
+
output: controls?.output === true,
|
|
12893
|
+
verbose: controls?.verbose === true,
|
|
12894
|
+
yes: controls?.yes === true
|
|
12895
|
+
};
|
|
12896
|
+
}
|
|
12897
|
+
function getGlobalLongOptionFlags(presetsEnabled, versionEnabled, controls) {
|
|
12898
|
+
const flags = [];
|
|
12899
|
+
if (presetsEnabled) {
|
|
12900
|
+
flags.push("--preset");
|
|
12901
|
+
}
|
|
12902
|
+
if (controls.yes) {
|
|
12903
|
+
flags.push("--yes");
|
|
12904
|
+
}
|
|
12905
|
+
if (controls.output) {
|
|
12906
|
+
flags.push("--output");
|
|
12907
|
+
}
|
|
12908
|
+
if (controls.debug) {
|
|
12909
|
+
flags.push("--debug");
|
|
12910
|
+
}
|
|
12911
|
+
if (controls.verbose) {
|
|
12912
|
+
flags.push("--verbose");
|
|
12913
|
+
}
|
|
12823
12914
|
if (versionEnabled) {
|
|
12824
12915
|
flags.push("--version");
|
|
12825
12916
|
}
|
|
@@ -13201,11 +13292,16 @@ function formatGlobalOptionsLine(ctx) {
|
|
|
13201
13292
|
if (ctx.presetsEnabled) {
|
|
13202
13293
|
flags.push("--preset <path>");
|
|
13203
13294
|
}
|
|
13204
|
-
|
|
13295
|
+
if (ctx.controls.yes) {
|
|
13296
|
+
flags.push("--yes");
|
|
13297
|
+
}
|
|
13298
|
+
if (ctx.controls.output) {
|
|
13299
|
+
flags.push("--output <format>");
|
|
13300
|
+
}
|
|
13205
13301
|
if (ctx.showVersion) {
|
|
13206
13302
|
flags.push("--version");
|
|
13207
13303
|
}
|
|
13208
|
-
return `${text.section("Options:")} ${flags.join(" ")}
|
|
13304
|
+
return flags.length > 0 ? `${text.section("Options:")} ${flags.join(" ")}` : "";
|
|
13209
13305
|
}
|
|
13210
13306
|
function collectSchemaGlobalFieldRows(group, scope, casing, globalLongOptionFlags) {
|
|
13211
13307
|
const seen = /* @__PURE__ */ new Map();
|
|
@@ -13257,7 +13353,8 @@ function renderGroupHelp(group, breadcrumb, scope, casing, globalOptions, rootUs
|
|
|
13257
13353
|
const sections = [];
|
|
13258
13354
|
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
13259
13355
|
globalOptions.presetsEnabled,
|
|
13260
|
-
globalOptions.showVersion
|
|
13356
|
+
globalOptions.showVersion,
|
|
13357
|
+
globalOptions.controls
|
|
13261
13358
|
);
|
|
13262
13359
|
const commandRows = formatCommandRows(group, scope, casing, globalLongOptionFlags);
|
|
13263
13360
|
if (commandRows.length > 0) {
|
|
@@ -13295,7 +13392,8 @@ function renderLeafHelp(command, breadcrumb, casing, globalOptions, rootUsageNam
|
|
|
13295
13392
|
const sections = [];
|
|
13296
13393
|
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
13297
13394
|
globalOptions.presetsEnabled,
|
|
13298
|
-
globalOptions.showVersion
|
|
13395
|
+
globalOptions.showVersion,
|
|
13396
|
+
globalOptions.controls
|
|
13299
13397
|
);
|
|
13300
13398
|
const collected = collectFields(command.params, casing, globalLongOptionFlags);
|
|
13301
13399
|
const fields = assignPositionals(collected.fields, command.positional);
|
|
@@ -13352,6 +13450,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13352
13450
|
const output = resolveHelpOutput(argv);
|
|
13353
13451
|
const casing = options.casing ?? "kebab";
|
|
13354
13452
|
const rootUsageName = options.rootUsageName ?? inferProgramName(argv);
|
|
13453
|
+
const controls = resolveCLIControls(options.controls);
|
|
13355
13454
|
await withOutputFormat2(output, async () => {
|
|
13356
13455
|
const rendered = target.node.kind === "group" ? renderGroupHelp(
|
|
13357
13456
|
target.node,
|
|
@@ -13359,6 +13458,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13359
13458
|
"cli",
|
|
13360
13459
|
casing,
|
|
13361
13460
|
{
|
|
13461
|
+
controls,
|
|
13362
13462
|
showVersion: options.version !== void 0,
|
|
13363
13463
|
presetsEnabled: options.presets === true
|
|
13364
13464
|
},
|
|
@@ -13369,6 +13469,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13369
13469
|
target.breadcrumb,
|
|
13370
13470
|
casing,
|
|
13371
13471
|
{
|
|
13472
|
+
controls,
|
|
13372
13473
|
showVersion: options.version !== void 0,
|
|
13373
13474
|
presetsEnabled: options.presets === true
|
|
13374
13475
|
},
|
|
@@ -13377,7 +13478,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13377
13478
|
process.stdout.write(rendered);
|
|
13378
13479
|
});
|
|
13379
13480
|
}
|
|
13380
|
-
function createNodeCommand(node, casing, globalLongOptionFlags, execute, presetsEnabled, pathSegments = []) {
|
|
13481
|
+
function createNodeCommand(node, casing, globalLongOptionFlags, execute, presetsEnabled, controls, pathSegments = []) {
|
|
13381
13482
|
const nextPathSegments = [...pathSegments, node.name];
|
|
13382
13483
|
if (node.kind === "command") {
|
|
13383
13484
|
if (!node.scope.includes("cli")) {
|
|
@@ -13392,7 +13493,7 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13392
13493
|
}
|
|
13393
13494
|
node.aliases.forEach((alias) => command.alias(alias));
|
|
13394
13495
|
command.addHelpCommand(false);
|
|
13395
|
-
addGlobalOptions(command, presetsEnabled);
|
|
13496
|
+
addGlobalOptions(command, presetsEnabled, controls);
|
|
13396
13497
|
command.allowExcessArguments(true);
|
|
13397
13498
|
if (collected.dynamicFields.length > 0) {
|
|
13398
13499
|
command.allowUnknownOption(true);
|
|
@@ -13434,6 +13535,7 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13434
13535
|
globalLongOptionFlags,
|
|
13435
13536
|
execute,
|
|
13436
13537
|
presetsEnabled,
|
|
13538
|
+
controls,
|
|
13437
13539
|
nextPathSegments
|
|
13438
13540
|
)
|
|
13439
13541
|
).filter((child) => child !== null);
|
|
@@ -13443,39 +13545,47 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13443
13545
|
}
|
|
13444
13546
|
node.aliases.forEach((alias) => group.alias(alias));
|
|
13445
13547
|
group.addHelpCommand(false);
|
|
13446
|
-
addGlobalOptions(group, presetsEnabled);
|
|
13548
|
+
addGlobalOptions(group, presetsEnabled, controls);
|
|
13447
13549
|
for (const child of visibleChildren) {
|
|
13448
13550
|
const isDefaultChild = node.default !== void 0 && node.default.scope.includes("cli") && (child.name() === node.default.name || child.aliases().includes(node.default.name));
|
|
13449
13551
|
group.addCommand(child, isDefaultChild ? { isDefault: true } : void 0);
|
|
13450
13552
|
}
|
|
13451
13553
|
return group;
|
|
13452
13554
|
}
|
|
13453
|
-
function addGlobalOptions(command, presetsEnabled) {
|
|
13555
|
+
function addGlobalOptions(command, presetsEnabled, controls) {
|
|
13454
13556
|
const options = [];
|
|
13455
13557
|
if (presetsEnabled) {
|
|
13456
13558
|
options.push(new Option("--preset <path>", "Load parameter defaults from a JSON file."));
|
|
13457
13559
|
}
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13560
|
+
if (controls.yes) {
|
|
13561
|
+
options.push(new Option("--yes", "Accept defaults and skip prompts."));
|
|
13562
|
+
}
|
|
13563
|
+
if (controls.output) {
|
|
13564
|
+
options.push(
|
|
13565
|
+
new Option("--output <format>", "Output format.").argParser((value) => {
|
|
13566
|
+
if (value === "rich" || value === "md" || value === "json") {
|
|
13567
|
+
return value;
|
|
13568
|
+
}
|
|
13569
|
+
if (value === "markdown") {
|
|
13570
|
+
return "md";
|
|
13571
|
+
}
|
|
13572
|
+
throw new InvalidArgumentError(
|
|
13573
|
+
formatInvalidEnumMessage("--output", value, ["rich", "md", "markdown", "json"], {
|
|
13574
|
+
candidates: ["rich", "markdown", "json"],
|
|
13575
|
+
threshold: 3
|
|
13576
|
+
})
|
|
13577
|
+
);
|
|
13578
|
+
})
|
|
13579
|
+
);
|
|
13580
|
+
}
|
|
13581
|
+
if (controls.debug) {
|
|
13582
|
+
options.push(
|
|
13583
|
+
new Option("--debug [mode]", "Print stack traces for unexpected errors.").preset("trim").argParser(parseDebugStackMode)
|
|
13584
|
+
);
|
|
13585
|
+
}
|
|
13586
|
+
if (controls.verbose) {
|
|
13587
|
+
options.push(new Option("--verbose", "Print detailed runtime diagnostics."));
|
|
13588
|
+
}
|
|
13479
13589
|
for (const option of options) {
|
|
13480
13590
|
option.hideHelp(true);
|
|
13481
13591
|
command.addOption(option);
|
|
@@ -13743,7 +13853,7 @@ async function loadPresetValues(fields, presetPath) {
|
|
|
13743
13853
|
encoding: "utf8"
|
|
13744
13854
|
});
|
|
13745
13855
|
} catch (error3) {
|
|
13746
|
-
if (
|
|
13856
|
+
if (hasOwnErrorCode(error3, "ENOENT")) {
|
|
13747
13857
|
throw new UserError(`Preset file "${presetPath}" was not found.`);
|
|
13748
13858
|
}
|
|
13749
13859
|
const message2 = error3 instanceof Error && error3.message.length > 0 ? error3.message : "Unknown read error.";
|
|
@@ -14842,10 +14952,10 @@ function isHttpErrorLike(error3) {
|
|
|
14842
14952
|
}
|
|
14843
14953
|
const request = error3.request;
|
|
14844
14954
|
const response = error3.response;
|
|
14845
|
-
return isPlainObject4(request) && typeof request.method === "string" && typeof request.url === "string" && isStringRecord(request.headers) && isPlainObject4(response) && typeof response.status === "number" && typeof response.statusText === "string" && isStringRecord(response.headers) && "body"
|
|
14955
|
+
return isPlainObject4(request) && typeof request.method === "string" && typeof request.url === "string" && isStringRecord(request.headers) && isPlainObject4(response) && typeof response.status === "number" && typeof response.statusText === "string" && isStringRecord(response.headers) && hasOwnProperty3(response, "body");
|
|
14846
14956
|
}
|
|
14847
14957
|
function hasTypedOptionalField(value, field, type2) {
|
|
14848
|
-
return !(field
|
|
14958
|
+
return !hasOwnProperty3(value, field) || typeof value[field] === type2;
|
|
14849
14959
|
}
|
|
14850
14960
|
function isNonEmptyString(value) {
|
|
14851
14961
|
return typeof value === "string" && value.trim().length > 0;
|
|
@@ -14869,7 +14979,7 @@ function isProblemDetailsLike(body) {
|
|
|
14869
14979
|
if (!hasTypedOptionalField(body, "instance", "string")) {
|
|
14870
14980
|
return false;
|
|
14871
14981
|
}
|
|
14872
|
-
return
|
|
14982
|
+
return hasOwnNonEmptyString(body, "title") || hasOwnNonEmptyString(body, "detail");
|
|
14873
14983
|
}
|
|
14874
14984
|
function isGraphQLErrorEnvelopeLike(body) {
|
|
14875
14985
|
if (!isPlainObject4(body) || !Array.isArray(body.errors) || body.errors.length === 0) {
|
|
@@ -14879,23 +14989,29 @@ function isGraphQLErrorEnvelopeLike(body) {
|
|
|
14879
14989
|
if (!isPlainObject4(error3) || typeof error3.message !== "string") {
|
|
14880
14990
|
return false;
|
|
14881
14991
|
}
|
|
14882
|
-
if ("path"
|
|
14992
|
+
if (hasOwnProperty3(error3, "path")) {
|
|
14883
14993
|
const pathValue = error3.path;
|
|
14884
14994
|
if (!Array.isArray(pathValue) || !pathValue.every((entry) => typeof entry === "string" || typeof entry === "number")) {
|
|
14885
14995
|
return false;
|
|
14886
14996
|
}
|
|
14887
14997
|
}
|
|
14888
|
-
if ("extensions"
|
|
14998
|
+
if (hasOwnProperty3(error3, "extensions")) {
|
|
14889
14999
|
if (!isPlainObject4(error3.extensions)) {
|
|
14890
15000
|
return false;
|
|
14891
15001
|
}
|
|
14892
|
-
if ("code"
|
|
15002
|
+
if (hasOwnProperty3(error3.extensions, "code") && typeof error3.extensions.code !== "string") {
|
|
14893
15003
|
return false;
|
|
14894
15004
|
}
|
|
14895
15005
|
}
|
|
14896
15006
|
return true;
|
|
14897
15007
|
});
|
|
14898
15008
|
}
|
|
15009
|
+
function hasOwnProperty3(value, name) {
|
|
15010
|
+
return Object.prototype.hasOwnProperty.call(value, name);
|
|
15011
|
+
}
|
|
15012
|
+
function hasOwnNonEmptyString(value, name) {
|
|
15013
|
+
return hasOwnProperty3(value, name) && isNonEmptyString(value[name]);
|
|
15014
|
+
}
|
|
14899
15015
|
function styleHttpErrorLine(value, style) {
|
|
14900
15016
|
return process.stdout.isTTY !== true ? value : style(value);
|
|
14901
15017
|
}
|
|
@@ -14904,19 +15020,19 @@ function formatHttpErrorStatus(value) {
|
|
|
14904
15020
|
}
|
|
14905
15021
|
function formatProblemDetailsBody(body) {
|
|
14906
15022
|
const lines = [];
|
|
14907
|
-
if (
|
|
15023
|
+
if (hasOwnNonEmptyString(body, "title")) {
|
|
14908
15024
|
lines.push(`Problem: ${body.title}`);
|
|
14909
15025
|
}
|
|
14910
|
-
if (
|
|
15026
|
+
if (hasOwnNonEmptyString(body, "detail")) {
|
|
14911
15027
|
lines.push(`Detail: ${body.detail}`);
|
|
14912
15028
|
}
|
|
14913
|
-
if (body.type !== void 0) {
|
|
15029
|
+
if (hasOwnProperty3(body, "type") && body.type !== void 0) {
|
|
14914
15030
|
lines.push(`Type: ${body.type}`);
|
|
14915
15031
|
}
|
|
14916
|
-
if (body.instance !== void 0) {
|
|
15032
|
+
if (hasOwnProperty3(body, "instance") && body.instance !== void 0) {
|
|
14917
15033
|
lines.push(`Instance: ${body.instance}`);
|
|
14918
15034
|
}
|
|
14919
|
-
if (body.status !== void 0) {
|
|
15035
|
+
if (hasOwnProperty3(body, "status") && body.status !== void 0) {
|
|
14920
15036
|
lines.push(`Status: ${body.status}`);
|
|
14921
15037
|
}
|
|
14922
15038
|
return lines.join("\n");
|
|
@@ -14924,10 +15040,10 @@ function formatProblemDetailsBody(body) {
|
|
|
14924
15040
|
function formatGraphQLErrorEnvelopeBody(body) {
|
|
14925
15041
|
return body.errors.map((error3) => {
|
|
14926
15042
|
const lines = [`GraphQL error: ${error3.message}`];
|
|
14927
|
-
if (error3.path !== void 0) {
|
|
15043
|
+
if (hasOwnProperty3(error3, "path") && error3.path !== void 0) {
|
|
14928
15044
|
lines.push(` at path: ${error3.path.join(".")}`);
|
|
14929
15045
|
}
|
|
14930
|
-
if (error3.extensions
|
|
15046
|
+
if (hasOwnProperty3(error3, "extensions") && error3.extensions !== void 0 && hasOwnProperty3(error3.extensions, "code") && error3.extensions.code !== void 0) {
|
|
14931
15047
|
lines.push(` code: ${error3.extensions.code}`);
|
|
14932
15048
|
}
|
|
14933
15049
|
return lines.join("\n");
|
|
@@ -15267,13 +15383,14 @@ function configureCommanderSuggestionOutput(command) {
|
|
|
15267
15383
|
async function runCLI(roots, options = {}) {
|
|
15268
15384
|
enableSourceMaps();
|
|
15269
15385
|
const normalizedRoot = normalizeRoots(roots, process.argv);
|
|
15270
|
-
const root = options.approvals ===
|
|
15386
|
+
const root = options.approvals === true ? mergeApprovalsGroup(normalizedRoot) : normalizedRoot;
|
|
15271
15387
|
await resolveMcpProxies(root, { projectRoot: options.projectRoot });
|
|
15272
15388
|
const casing = options.casing ?? "kebab";
|
|
15273
15389
|
const services = options.services ?? {};
|
|
15274
15390
|
const runtimeOptions = options.humanInLoop ?? {};
|
|
15275
15391
|
const version = options.version ?? findEntrypointPackageMetadata(process.argv[1])?.version;
|
|
15276
15392
|
const rootUsageName = options.rootUsageName ?? inferProgramName(process.argv);
|
|
15393
|
+
const controls = resolveCLIControls(options.controls);
|
|
15277
15394
|
const servicesWithBuiltIns = {
|
|
15278
15395
|
...services,
|
|
15279
15396
|
runtimeOptions,
|
|
@@ -15293,8 +15410,12 @@ async function runCLI(roots, options = {}) {
|
|
|
15293
15410
|
program.showHelpAfterError();
|
|
15294
15411
|
program.addHelpCommand(false);
|
|
15295
15412
|
const presetsEnabled = options.presets === true;
|
|
15296
|
-
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
15297
|
-
|
|
15413
|
+
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
15414
|
+
presetsEnabled,
|
|
15415
|
+
version !== void 0,
|
|
15416
|
+
controls
|
|
15417
|
+
);
|
|
15418
|
+
addGlobalOptions(program, presetsEnabled, controls);
|
|
15298
15419
|
if (version !== void 0) {
|
|
15299
15420
|
program.version(version, "--version");
|
|
15300
15421
|
}
|
|
@@ -15320,7 +15441,8 @@ async function runCLI(roots, options = {}) {
|
|
|
15320
15441
|
casing,
|
|
15321
15442
|
globalLongOptionFlags,
|
|
15322
15443
|
execute,
|
|
15323
|
-
presetsEnabled
|
|
15444
|
+
presetsEnabled,
|
|
15445
|
+
controls
|
|
15324
15446
|
);
|
|
15325
15447
|
if (command === null) {
|
|
15326
15448
|
continue;
|
|
@@ -15462,7 +15584,7 @@ function consumeTerminatedString(input, index, allowBellTerminator) {
|
|
|
15462
15584
|
}
|
|
15463
15585
|
|
|
15464
15586
|
// src/errors.ts
|
|
15465
|
-
function
|
|
15587
|
+
function hasOwnErrorCode4(error3, code) {
|
|
15466
15588
|
return error3 instanceof Error && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
15467
15589
|
}
|
|
15468
15590
|
|
|
@@ -16565,7 +16687,7 @@ function ensureSpawnHelperExecutable() {
|
|
|
16565
16687
|
}
|
|
16566
16688
|
}
|
|
16567
16689
|
function isMissingFileError(error3) {
|
|
16568
|
-
return
|
|
16690
|
+
return hasOwnErrorCode4(error3, "ENOENT");
|
|
16569
16691
|
}
|
|
16570
16692
|
function matchPattern(buffer, pattern) {
|
|
16571
16693
|
const clean = normalizeHistoryBuffer(stripAnsi4(buffer));
|
|
@@ -16991,6 +17113,23 @@ var codexAgent = {
|
|
|
16991
17113
|
}
|
|
16992
17114
|
};
|
|
16993
17115
|
|
|
17116
|
+
// ../agent-defs/src/agents/cursor.ts
|
|
17117
|
+
var cursorAgent = {
|
|
17118
|
+
id: "cursor",
|
|
17119
|
+
name: "cursor",
|
|
17120
|
+
aliases: ["cursor-agent"],
|
|
17121
|
+
label: "Cursor",
|
|
17122
|
+
summary: "Cursor's CLI coding agent.",
|
|
17123
|
+
binaryName: "cursor-agent",
|
|
17124
|
+
configPath: "~/.cursor/cli-config.json",
|
|
17125
|
+
branding: {
|
|
17126
|
+
colors: {
|
|
17127
|
+
dark: "#FFFFFF",
|
|
17128
|
+
light: "#000000"
|
|
17129
|
+
}
|
|
17130
|
+
}
|
|
17131
|
+
};
|
|
17132
|
+
|
|
16994
17133
|
// ../agent-defs/src/agents/gemini-cli.ts
|
|
16995
17134
|
var geminiCliAgent = {
|
|
16996
17135
|
id: "gemini-cli",
|
|
@@ -17105,6 +17244,7 @@ var allAgents = Object.freeze([
|
|
|
17105
17244
|
freezeAgent(claudeCodeAgent),
|
|
17106
17245
|
freezeAgent(claudeDesktopAgent),
|
|
17107
17246
|
freezeAgent(codexAgent),
|
|
17247
|
+
freezeAgent(cursorAgent),
|
|
17108
17248
|
freezeAgent(geminiCliAgent),
|
|
17109
17249
|
freezeAgent(openCodeAgent),
|
|
17110
17250
|
freezeAgent(kimiAgent),
|
|
@@ -17138,6 +17278,10 @@ var agentSkillConfigs = {
|
|
|
17138
17278
|
globalSkillDir: "~/.codex/skills",
|
|
17139
17279
|
localSkillDir: ".codex/skills"
|
|
17140
17280
|
},
|
|
17281
|
+
cursor: {
|
|
17282
|
+
globalSkillDir: "~/.cursor/skills-cursor",
|
|
17283
|
+
localSkillDir: ".cursor/skills"
|
|
17284
|
+
},
|
|
17141
17285
|
"gemini-cli": {
|
|
17142
17286
|
globalSkillDir: "~/.gemini/skills",
|
|
17143
17287
|
localSkillDir: ".gemini/skills"
|
|
@@ -17679,9 +17823,14 @@ function resolvePath(rawPath, homeDir, pathMapper) {
|
|
|
17679
17823
|
return filename.length === 0 ? mappedDirectory : path16.join(mappedDirectory, filename);
|
|
17680
17824
|
}
|
|
17681
17825
|
|
|
17826
|
+
// ../config-mutations/src/error-codes.ts
|
|
17827
|
+
function hasOwnErrorCode5(error3, code) {
|
|
17828
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
17829
|
+
}
|
|
17830
|
+
|
|
17682
17831
|
// ../config-mutations/src/fs-utils.ts
|
|
17683
17832
|
function isNotFound(error3) {
|
|
17684
|
-
return
|
|
17833
|
+
return hasOwnErrorCode5(error3, "ENOENT");
|
|
17685
17834
|
}
|
|
17686
17835
|
async function readFileIfExists(fs4, target) {
|
|
17687
17836
|
try {
|
|
@@ -17738,7 +17887,7 @@ async function backupInvalidDocument(context, targetPath, content) {
|
|
|
17738
17887
|
}
|
|
17739
17888
|
}
|
|
17740
17889
|
function isAlreadyExists(error3) {
|
|
17741
|
-
return
|
|
17890
|
+
return hasOwnErrorCode5(error3, "EEXIST");
|
|
17742
17891
|
}
|
|
17743
17892
|
async function assertRegularWriteTarget(context, targetPath) {
|
|
17744
17893
|
const boundary = path17.dirname(path17.resolve(context.homeDir));
|
|
@@ -18465,6 +18614,11 @@ async function executeMutation(mutation, context, options) {
|
|
|
18465
18614
|
}
|
|
18466
18615
|
}
|
|
18467
18616
|
|
|
18617
|
+
// ../agent-skill-config/src/error-codes.ts
|
|
18618
|
+
function hasOwnErrorCode6(error3, code) {
|
|
18619
|
+
return error3 instanceof Error && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
18620
|
+
}
|
|
18621
|
+
|
|
18468
18622
|
// ../agent-skill-config/src/templates.ts
|
|
18469
18623
|
import { readFile as readFile5, stat } from "node:fs/promises";
|
|
18470
18624
|
import path18 from "node:path";
|
|
@@ -18489,7 +18643,7 @@ async function pathExists2(fs4, targetPath) {
|
|
|
18489
18643
|
await fs4.stat(targetPath);
|
|
18490
18644
|
return true;
|
|
18491
18645
|
} catch (error3) {
|
|
18492
|
-
if (
|
|
18646
|
+
if (hasOwnErrorCode6(error3, "ENOENT")) {
|
|
18493
18647
|
return false;
|
|
18494
18648
|
}
|
|
18495
18649
|
throw error3;
|
|
@@ -18567,7 +18721,7 @@ var DEFAULT_INSTALL_SCOPE = "local";
|
|
|
18567
18721
|
var TERMINAL_PILOT_SKILL_NAME = "terminal-pilot";
|
|
18568
18722
|
var installableAgents = supportedAgents;
|
|
18569
18723
|
function isNotFoundError2(error3) {
|
|
18570
|
-
return
|
|
18724
|
+
return hasOwnErrorCode4(error3, "ENOENT");
|
|
18571
18725
|
}
|
|
18572
18726
|
function resolveInstallerServices(installer) {
|
|
18573
18727
|
return {
|
|
@@ -19185,6 +19339,11 @@ function parseAnsi2(input) {
|
|
|
19185
19339
|
return buildRuns(lines, lineBreakStyles);
|
|
19186
19340
|
}
|
|
19187
19341
|
|
|
19342
|
+
// ../terminal-png/src/error-codes.ts
|
|
19343
|
+
function hasOwnErrorCode7(error3, code) {
|
|
19344
|
+
return typeof error3 === "object" && error3 !== null && Object.prototype.hasOwnProperty.call(error3, "code") && error3.code === code;
|
|
19345
|
+
}
|
|
19346
|
+
|
|
19188
19347
|
// ../terminal-png/src/png-renderer.ts
|
|
19189
19348
|
import { Resvg } from "@resvg/resvg-js";
|
|
19190
19349
|
|
|
@@ -19758,7 +19917,7 @@ async function renderTerminalPng(ansiText, options = {}) {
|
|
|
19758
19917
|
return png;
|
|
19759
19918
|
}
|
|
19760
19919
|
function isAlreadyExistsError3(error3) {
|
|
19761
|
-
return error3 instanceof Error &&
|
|
19920
|
+
return error3 instanceof Error && hasOwnErrorCode7(error3, "EEXIST");
|
|
19762
19921
|
}
|
|
19763
19922
|
|
|
19764
19923
|
// src/commands/screenshot.ts
|
|
@@ -19884,7 +20043,7 @@ async function folderExists(fs4, folderPath) {
|
|
|
19884
20043
|
await fs4.stat(folderPath);
|
|
19885
20044
|
return true;
|
|
19886
20045
|
} catch (error3) {
|
|
19887
|
-
if (
|
|
20046
|
+
if (hasOwnErrorCode4(error3, "ENOENT")) {
|
|
19888
20047
|
return false;
|
|
19889
20048
|
}
|
|
19890
20049
|
throw error3;
|
|
@@ -19938,8 +20097,6 @@ var waitForExit2 = defineCommand({
|
|
|
19938
20097
|
|
|
19939
20098
|
// src/commands/index.ts
|
|
19940
20099
|
var children = [
|
|
19941
|
-
install,
|
|
19942
|
-
uninstall,
|
|
19943
20100
|
createSession,
|
|
19944
20101
|
fill,
|
|
19945
20102
|
type,
|
|
@@ -19953,7 +20110,9 @@ var children = [
|
|
|
19953
20110
|
resize,
|
|
19954
20111
|
closeSession,
|
|
19955
20112
|
getSession,
|
|
19956
|
-
listSessions
|
|
20113
|
+
listSessions,
|
|
20114
|
+
install,
|
|
20115
|
+
uninstall
|
|
19957
20116
|
];
|
|
19958
20117
|
function createTerminalPilotGroup() {
|
|
19959
20118
|
return defineGroup({
|
|
@@ -19976,7 +20135,14 @@ async function main(argv = process.argv) {
|
|
|
19976
20135
|
const originalArgv = process.argv;
|
|
19977
20136
|
process.argv = normalizeArgv(argv);
|
|
19978
20137
|
try {
|
|
19979
|
-
await runCLI(createTerminalPilotGroup()
|
|
20138
|
+
await runCLI(createTerminalPilotGroup(), {
|
|
20139
|
+
controls: {
|
|
20140
|
+
debug: true,
|
|
20141
|
+
output: true,
|
|
20142
|
+
verbose: true,
|
|
20143
|
+
yes: true
|
|
20144
|
+
}
|
|
20145
|
+
});
|
|
19980
20146
|
} finally {
|
|
19981
20147
|
process.argv = originalArgv;
|
|
19982
20148
|
}
|