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/index.js
CHANGED
|
@@ -2137,16 +2137,16 @@ function getConfigFormat(pathOrFormat) {
|
|
|
2137
2137
|
}
|
|
2138
2138
|
return formatRegistry[formatName];
|
|
2139
2139
|
}
|
|
2140
|
-
function detectFormat(
|
|
2141
|
-
const ext = getExtension(
|
|
2140
|
+
function detectFormat(path5) {
|
|
2141
|
+
const ext = getExtension(path5);
|
|
2142
2142
|
return extensionMap[ext];
|
|
2143
2143
|
}
|
|
2144
|
-
function getExtension(
|
|
2145
|
-
const lastDot =
|
|
2144
|
+
function getExtension(path5) {
|
|
2145
|
+
const lastDot = path5.lastIndexOf(".");
|
|
2146
2146
|
if (lastDot === -1) {
|
|
2147
2147
|
return "";
|
|
2148
2148
|
}
|
|
2149
|
-
return
|
|
2149
|
+
return path5.slice(lastDot).toLowerCase();
|
|
2150
2150
|
}
|
|
2151
2151
|
|
|
2152
2152
|
// ../config-mutations/src/execution/path-utils.ts
|
|
@@ -2448,8 +2448,8 @@ async function applyChmod(mutation, context, options) {
|
|
|
2448
2448
|
};
|
|
2449
2449
|
}
|
|
2450
2450
|
try {
|
|
2451
|
-
const
|
|
2452
|
-
const currentMode = typeof
|
|
2451
|
+
const stat2 = await context.fs.stat(targetPath);
|
|
2452
|
+
const currentMode = typeof stat2.mode === "number" ? stat2.mode & 511 : null;
|
|
2453
2453
|
if (currentMode === mutation.mode) {
|
|
2454
2454
|
return {
|
|
2455
2455
|
outcome: { changed: false, effect: "none", detail: "noop" },
|
|
@@ -2796,6 +2796,11 @@ async function executeMutation(mutation, context, options) {
|
|
|
2796
2796
|
import Mustache2 from "mustache";
|
|
2797
2797
|
var originalEscape = Mustache2.escape;
|
|
2798
2798
|
|
|
2799
|
+
// ../agent-skill-config/src/templates.ts
|
|
2800
|
+
import { readFile, stat } from "node:fs/promises";
|
|
2801
|
+
import path3 from "node:path";
|
|
2802
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
2803
|
+
|
|
2799
2804
|
// ../agent-skill-config/src/apply.ts
|
|
2800
2805
|
var UnsupportedAgentError = class extends Error {
|
|
2801
2806
|
constructor(agentId) {
|
|
@@ -2852,9 +2857,9 @@ async function installSkill(agentId, skill, options) {
|
|
|
2852
2857
|
|
|
2853
2858
|
// src/commands/installer.ts
|
|
2854
2859
|
import os2 from "node:os";
|
|
2855
|
-
import
|
|
2860
|
+
import path4 from "node:path";
|
|
2856
2861
|
import * as nodeFs from "node:fs/promises";
|
|
2857
|
-
import { readFile } from "node:fs/promises";
|
|
2862
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
2858
2863
|
var DEFAULT_INSTALL_AGENT = "claude-code";
|
|
2859
2864
|
var DEFAULT_INSTALL_SCOPE = "local";
|
|
2860
2865
|
var TERMINAL_PILOT_SKILL_NAME = "terminal-pilot";
|
|
@@ -2904,7 +2909,7 @@ async function loadTerminalPilotTemplate() {
|
|
|
2904
2909
|
];
|
|
2905
2910
|
for (const candidate of candidates) {
|
|
2906
2911
|
try {
|
|
2907
|
-
terminalPilotTemplateCache = await
|
|
2912
|
+
terminalPilotTemplateCache = await readFile2(candidate, "utf8");
|
|
2908
2913
|
return terminalPilotTemplateCache;
|
|
2909
2914
|
} catch (error) {
|
|
2910
2915
|
if (!isNotFoundError(error)) {
|
|
@@ -2919,7 +2924,7 @@ function resolveHomeRelativePath(targetPath, homeDir) {
|
|
|
2919
2924
|
return homeDir;
|
|
2920
2925
|
}
|
|
2921
2926
|
if (targetPath.startsWith("~/")) {
|
|
2922
|
-
return
|
|
2927
|
+
return path4.join(homeDir, targetPath.slice(2));
|
|
2923
2928
|
}
|
|
2924
2929
|
return targetPath;
|
|
2925
2930
|
}
|
|
@@ -2929,12 +2934,12 @@ function getSkillFolderWithHome(agent, scope, cwd, homeDir) {
|
|
|
2929
2934
|
throwUnsupportedAgent(agent);
|
|
2930
2935
|
}
|
|
2931
2936
|
return {
|
|
2932
|
-
displayPath:
|
|
2937
|
+
displayPath: path4.join(
|
|
2933
2938
|
scope === "global" ? config.globalSkillDir : config.localSkillDir,
|
|
2934
2939
|
TERMINAL_PILOT_SKILL_NAME
|
|
2935
2940
|
),
|
|
2936
|
-
fullPath:
|
|
2937
|
-
scope === "global" ? resolveHomeRelativePath(config.globalSkillDir, homeDir) :
|
|
2941
|
+
fullPath: path4.join(
|
|
2942
|
+
scope === "global" ? resolveHomeRelativePath(config.globalSkillDir, homeDir) : path4.resolve(cwd, config.localSkillDir),
|
|
2938
2943
|
TERMINAL_PILOT_SKILL_NAME
|
|
2939
2944
|
)
|
|
2940
2945
|
};
|
|
@@ -3341,7 +3346,7 @@ import { Resvg } from "@resvg/resvg-js";
|
|
|
3341
3346
|
import { readFileSync } from "node:fs";
|
|
3342
3347
|
import { createRequire as createRequire2 } from "node:module";
|
|
3343
3348
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
3344
|
-
import { fileURLToPath as
|
|
3349
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
3345
3350
|
var require2 = createRequire2(import.meta.url);
|
|
3346
3351
|
var fontPackageRoot = dirname2(require2.resolve("jetbrains-mono/package.json"));
|
|
3347
3352
|
var webfontRoot = join2(fontPackageRoot, "fonts/webfonts");
|
|
@@ -3349,7 +3354,7 @@ function readWebfontBase64(filename) {
|
|
|
3349
3354
|
return readFileSync(join2(webfontRoot, filename)).toString("base64");
|
|
3350
3355
|
}
|
|
3351
3356
|
function resolveAssetPath(filename) {
|
|
3352
|
-
return
|
|
3357
|
+
return fileURLToPath3(new URL(`../assets/${filename}`, import.meta.url));
|
|
3353
3358
|
}
|
|
3354
3359
|
function createFontFace(base64, weight, style) {
|
|
3355
3360
|
return `@font-face {
|