terminal-pilot 0.0.11 → 0.0.13
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 +56 -46
- package/dist/cli.js.map +4 -4
- package/dist/commands/index.js +21 -16
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +17 -12
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +12 -7
- package/dist/commands/installer.js.map +4 -4
- package/dist/commands/uninstall.js +11 -6
- package/dist/commands/uninstall.js.map +4 -4
- package/dist/testing/cli-repl.js +56 -46
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +68 -58
- package/dist/testing/qa-cli.js.map +4 -4
- package/package.json +1 -1
package/dist/commands/install.js
CHANGED
|
@@ -517,16 +517,16 @@ function getConfigFormat(pathOrFormat) {
|
|
|
517
517
|
}
|
|
518
518
|
return formatRegistry[formatName];
|
|
519
519
|
}
|
|
520
|
-
function detectFormat(
|
|
521
|
-
const ext = getExtension(
|
|
520
|
+
function detectFormat(path5) {
|
|
521
|
+
const ext = getExtension(path5);
|
|
522
522
|
return extensionMap[ext];
|
|
523
523
|
}
|
|
524
|
-
function getExtension(
|
|
525
|
-
const lastDot =
|
|
524
|
+
function getExtension(path5) {
|
|
525
|
+
const lastDot = path5.lastIndexOf(".");
|
|
526
526
|
if (lastDot === -1) {
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
|
-
return
|
|
529
|
+
return path5.slice(lastDot).toLowerCase();
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
// ../config-mutations/src/execution/path-utils.ts
|
|
@@ -828,8 +828,8 @@ async function applyChmod(mutation, context, options) {
|
|
|
828
828
|
};
|
|
829
829
|
}
|
|
830
830
|
try {
|
|
831
|
-
const
|
|
832
|
-
const currentMode = typeof
|
|
831
|
+
const stat2 = await context.fs.stat(targetPath);
|
|
832
|
+
const currentMode = typeof stat2.mode === "number" ? stat2.mode & 511 : null;
|
|
833
833
|
if (currentMode === mutation.mode) {
|
|
834
834
|
return {
|
|
835
835
|
outcome: { changed: false, effect: "none", detail: "noop" },
|
|
@@ -1176,6 +1176,11 @@ async function executeMutation(mutation, context, options) {
|
|
|
1176
1176
|
import Mustache2 from "mustache";
|
|
1177
1177
|
var originalEscape = Mustache2.escape;
|
|
1178
1178
|
|
|
1179
|
+
// ../agent-skill-config/src/templates.ts
|
|
1180
|
+
import { readFile, stat } from "node:fs/promises";
|
|
1181
|
+
import path3 from "node:path";
|
|
1182
|
+
import { fileURLToPath } from "node:url";
|
|
1183
|
+
|
|
1179
1184
|
// ../agent-skill-config/src/apply.ts
|
|
1180
1185
|
var UnsupportedAgentError = class extends Error {
|
|
1181
1186
|
constructor(agentId) {
|
|
@@ -1231,7 +1236,7 @@ async function installSkill(agentId, skill, options) {
|
|
|
1231
1236
|
}
|
|
1232
1237
|
|
|
1233
1238
|
// ../cmdkit/src/index.ts
|
|
1234
|
-
import { fileURLToPath } from "node:url";
|
|
1239
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
1235
1240
|
|
|
1236
1241
|
// ../cmdkit-schema/src/index.ts
|
|
1237
1242
|
function assertValidEnumValues(values) {
|
|
@@ -1332,7 +1337,7 @@ function cloneRequires(requires) {
|
|
|
1332
1337
|
function parseStackPath(candidate) {
|
|
1333
1338
|
if (candidate.startsWith("file://")) {
|
|
1334
1339
|
try {
|
|
1335
|
-
return
|
|
1340
|
+
return fileURLToPath2(candidate);
|
|
1336
1341
|
} catch {
|
|
1337
1342
|
return void 0;
|
|
1338
1343
|
}
|
|
@@ -1484,9 +1489,9 @@ function defineCommand(config) {
|
|
|
1484
1489
|
|
|
1485
1490
|
// src/commands/installer.ts
|
|
1486
1491
|
import os2 from "node:os";
|
|
1487
|
-
import
|
|
1492
|
+
import path4 from "node:path";
|
|
1488
1493
|
import * as nodeFs from "node:fs/promises";
|
|
1489
|
-
import { readFile } from "node:fs/promises";
|
|
1494
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
1490
1495
|
var DEFAULT_INSTALL_AGENT = "claude-code";
|
|
1491
1496
|
var DEFAULT_INSTALL_SCOPE = "local";
|
|
1492
1497
|
var TERMINAL_PILOT_SKILL_NAME = "terminal-pilot";
|
|
@@ -1536,7 +1541,7 @@ async function loadTerminalPilotTemplate() {
|
|
|
1536
1541
|
];
|
|
1537
1542
|
for (const candidate of candidates) {
|
|
1538
1543
|
try {
|
|
1539
|
-
terminalPilotTemplateCache = await
|
|
1544
|
+
terminalPilotTemplateCache = await readFile2(candidate, "utf8");
|
|
1540
1545
|
return terminalPilotTemplateCache;
|
|
1541
1546
|
} catch (error) {
|
|
1542
1547
|
if (!isNotFoundError(error)) {
|