terminal-pilot 0.0.22 → 0.0.23
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 +162 -72
- package/dist/cli.js.map +4 -4
- package/dist/commands/index.d.ts +35 -35
- package/dist/commands/index.js +22 -7
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +15 -5
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +2 -2
- package/dist/commands/installer.js.map +3 -3
- package/dist/commands/screenshot.js +8 -3
- package/dist/commands/screenshot.js.map +4 -4
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/testing/cli-repl.js +162 -72
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +162 -72
- 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/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/commands/install.js
CHANGED
|
@@ -1758,9 +1758,14 @@ function resolvePath(rawPath, homeDir, pathMapper) {
|
|
|
1758
1758
|
return filename.length === 0 ? mappedDirectory : path2.join(mappedDirectory, filename);
|
|
1759
1759
|
}
|
|
1760
1760
|
|
|
1761
|
+
// ../config-mutations/src/error-codes.ts
|
|
1762
|
+
function hasOwnErrorCode(error2, code) {
|
|
1763
|
+
return typeof error2 === "object" && error2 !== null && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1761
1766
|
// ../config-mutations/src/fs-utils.ts
|
|
1762
1767
|
function isNotFound(error2) {
|
|
1763
|
-
return
|
|
1768
|
+
return hasOwnErrorCode(error2, "ENOENT");
|
|
1764
1769
|
}
|
|
1765
1770
|
async function readFileIfExists(fs3, target) {
|
|
1766
1771
|
try {
|
|
@@ -1817,7 +1822,7 @@ async function backupInvalidDocument(context, targetPath, content) {
|
|
|
1817
1822
|
}
|
|
1818
1823
|
}
|
|
1819
1824
|
function isAlreadyExists(error2) {
|
|
1820
|
-
return
|
|
1825
|
+
return hasOwnErrorCode(error2, "EEXIST");
|
|
1821
1826
|
}
|
|
1822
1827
|
async function assertRegularWriteTarget(context, targetPath) {
|
|
1823
1828
|
const boundary = path3.dirname(path3.resolve(context.homeDir));
|
|
@@ -2544,6 +2549,11 @@ async function executeMutation(mutation, context, options) {
|
|
|
2544
2549
|
}
|
|
2545
2550
|
}
|
|
2546
2551
|
|
|
2552
|
+
// ../agent-skill-config/src/error-codes.ts
|
|
2553
|
+
function hasOwnErrorCode2(error2, code) {
|
|
2554
|
+
return error2 instanceof Error && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2547
2557
|
// ../agent-skill-config/src/templates.ts
|
|
2548
2558
|
import { readFile, stat } from "node:fs/promises";
|
|
2549
2559
|
import path4 from "node:path";
|
|
@@ -2568,7 +2578,7 @@ async function pathExists2(fs3, targetPath) {
|
|
|
2568
2578
|
await fs3.stat(targetPath);
|
|
2569
2579
|
return true;
|
|
2570
2580
|
} catch (error2) {
|
|
2571
|
-
if (
|
|
2581
|
+
if (hasOwnErrorCode2(error2, "ENOENT")) {
|
|
2572
2582
|
return false;
|
|
2573
2583
|
}
|
|
2574
2584
|
throw error2;
|
|
@@ -3056,7 +3066,7 @@ import * as nodeFs from "node:fs/promises";
|
|
|
3056
3066
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
3057
3067
|
|
|
3058
3068
|
// src/errors.ts
|
|
3059
|
-
function
|
|
3069
|
+
function hasOwnErrorCode3(error2, code) {
|
|
3060
3070
|
return error2 instanceof Error && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
|
|
3061
3071
|
}
|
|
3062
3072
|
|
|
@@ -3066,7 +3076,7 @@ var DEFAULT_INSTALL_SCOPE = "local";
|
|
|
3066
3076
|
var TERMINAL_PILOT_SKILL_NAME = "terminal-pilot";
|
|
3067
3077
|
var installableAgents = supportedAgents;
|
|
3068
3078
|
function isNotFoundError(error2) {
|
|
3069
|
-
return
|
|
3079
|
+
return hasOwnErrorCode3(error2, "ENOENT");
|
|
3070
3080
|
}
|
|
3071
3081
|
function resolveInstallerServices(installer) {
|
|
3072
3082
|
return {
|