@telepath-computer/television 0.1.76 → 0.1.77
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.cjs +19 -19
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -50115,7 +50115,7 @@ function createDirectiveError(message) {
|
|
|
50115
50115
|
function getDevPackageDir() {
|
|
50116
50116
|
return import_node_path7.default.resolve(import_node_path7.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url)), "..");
|
|
50117
50117
|
}
|
|
50118
|
-
function
|
|
50118
|
+
function resolveVercelSkillsInstallerBin() {
|
|
50119
50119
|
if (typeof require === "function" && typeof require.resolve === "function") {
|
|
50120
50120
|
return require.resolve("skills/bin/cli.mjs");
|
|
50121
50121
|
}
|
|
@@ -50123,8 +50123,8 @@ function resolveSkillsBin() {
|
|
|
50123
50123
|
return localRequire.resolve("skills/bin/cli.mjs");
|
|
50124
50124
|
}
|
|
50125
50125
|
function readCLIVersion() {
|
|
50126
|
-
if ("0.1.
|
|
50127
|
-
return "0.1.
|
|
50126
|
+
if ("0.1.77".length > 0) {
|
|
50127
|
+
return "0.1.77";
|
|
50128
50128
|
}
|
|
50129
50129
|
const devPackageJsonPath = import_node_path7.default.join(getDevPackageDir(), "package.json");
|
|
50130
50130
|
if (!(0, import_node_fs4.existsSync)(devPackageJsonPath)) {
|
|
@@ -50136,11 +50136,11 @@ function listKnownArtifactTypeDocs() {
|
|
|
50136
50136
|
if ('["artifact-types/table.md"]'.length > 0) {
|
|
50137
50137
|
return JSON.parse('["artifact-types/table.md"]');
|
|
50138
50138
|
}
|
|
50139
|
-
const
|
|
50140
|
-
if (!(0, import_node_fs4.existsSync)(
|
|
50139
|
+
const televisionSkillsWorkspaceDir = import_node_path7.default.resolve(getDevPackageDir(), "../television-skills");
|
|
50140
|
+
if (!(0, import_node_fs4.existsSync)(televisionSkillsWorkspaceDir)) {
|
|
50141
50141
|
return [];
|
|
50142
50142
|
}
|
|
50143
|
-
return (0, import_node_fs4.readdirSync)(
|
|
50143
|
+
return (0, import_node_fs4.readdirSync)(televisionSkillsWorkspaceDir, { withFileTypes: true }).filter((entry) => entry.isDirectory() && /^artifact-/.test(entry.name)).map((entry) => entry.name.slice("artifact-".length)).sort((a, b) => a.localeCompare(b)).map((slug) => `artifact-types/${slug}.md`);
|
|
50144
50144
|
}
|
|
50145
50145
|
function formatArtifactTypeDocsList() {
|
|
50146
50146
|
const docs = listKnownArtifactTypeDocs();
|
|
@@ -50172,8 +50172,8 @@ function buildArtifactWorkflowHelpNote(includeHTMLNote) {
|
|
|
50172
50172
|
}
|
|
50173
50173
|
return lines.join("\n");
|
|
50174
50174
|
}
|
|
50175
|
-
function
|
|
50176
|
-
return import_node_path7.default.join(
|
|
50175
|
+
function getBundledTelevisionSkillRoot(bundledTelevisionSkillsCollectionRoot) {
|
|
50176
|
+
return import_node_path7.default.join(bundledTelevisionSkillsCollectionRoot, "television");
|
|
50177
50177
|
}
|
|
50178
50178
|
function listSkillFiles(skillRoot, prefix = "") {
|
|
50179
50179
|
const entries = (0, import_node_fs4.readdirSync)(skillRoot, { withFileTypes: true }).filter((entry) => !entry.name.startsWith(".")).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -50434,8 +50434,8 @@ function createEnvironment(environment) {
|
|
|
50434
50434
|
resolveBundledViewsPath: environment.resolveBundledViewsPath ?? (() => resolveBundledViewsPath()),
|
|
50435
50435
|
resolveBundledSkillsRoot: environment.resolveBundledSkillsRoot ?? (() => resolveBundledSkillsRoot()),
|
|
50436
50436
|
runSkillsInstaller: environment.runSkillsInstaller ?? (async (args) => {
|
|
50437
|
-
const
|
|
50438
|
-
const result = (0, import_node_child_process3.spawnSync)(process.execPath, [
|
|
50437
|
+
const vercelSkillsInstallerBin = resolveVercelSkillsInstallerBin();
|
|
50438
|
+
const result = (0, import_node_child_process3.spawnSync)(process.execPath, [vercelSkillsInstallerBin, ...args], { stdio: "inherit" });
|
|
50439
50439
|
if (result.status !== 0) {
|
|
50440
50440
|
throw new Error(`skills ${args.join(" ")} failed (exit ${result.status ?? "signal"})`);
|
|
50441
50441
|
}
|
|
@@ -50697,25 +50697,25 @@ If you wish to display temporary content to the user, use an internal artifact i
|
|
|
50697
50697
|
"`tv skills show` lists bundled skill files or prints one directly, which is useful for agents that need the content without running the interactive installer."
|
|
50698
50698
|
].join("\n"));
|
|
50699
50699
|
skillsCommand.command("path").description("Print the bundled Television skills collection root").action(() => {
|
|
50700
|
-
const
|
|
50701
|
-
if (!
|
|
50700
|
+
const bundledTelevisionSkillsCollectionRoot = env.resolveBundledSkillsRoot();
|
|
50701
|
+
if (!bundledTelevisionSkillsCollectionRoot) {
|
|
50702
50702
|
throw new Error("Could not resolve the bundled Television skills root.");
|
|
50703
50703
|
}
|
|
50704
|
-
writeLine(env.stdout,
|
|
50704
|
+
writeLine(env.stdout, bundledTelevisionSkillsCollectionRoot);
|
|
50705
50705
|
});
|
|
50706
50706
|
skillsCommand.command("install").description("Install or reinstall the bundled Television skill globally").allowUnknownOption(true).action(async function() {
|
|
50707
|
-
const
|
|
50708
|
-
if (!
|
|
50707
|
+
const bundledTelevisionSkillsCollectionRoot = env.resolveBundledSkillsRoot();
|
|
50708
|
+
if (!bundledTelevisionSkillsCollectionRoot) {
|
|
50709
50709
|
throw new Error("Could not resolve the bundled Television skills root.");
|
|
50710
50710
|
}
|
|
50711
|
-
await env.runSkillsInstaller(["add",
|
|
50711
|
+
await env.runSkillsInstaller(["add", bundledTelevisionSkillsCollectionRoot, "--global"]);
|
|
50712
50712
|
});
|
|
50713
50713
|
skillsCommand.command("show").description("List bundled Television skill files or print one by relative path").argument("[path]", "Relative path within the television skill root").action((relativePath) => {
|
|
50714
|
-
const
|
|
50715
|
-
if (!
|
|
50714
|
+
const bundledTelevisionSkillsCollectionRoot = env.resolveBundledSkillsRoot();
|
|
50715
|
+
if (!bundledTelevisionSkillsCollectionRoot) {
|
|
50716
50716
|
throw new Error("Could not resolve the bundled Television skills root.");
|
|
50717
50717
|
}
|
|
50718
|
-
const skillRoot =
|
|
50718
|
+
const skillRoot = getBundledTelevisionSkillRoot(bundledTelevisionSkillsCollectionRoot);
|
|
50719
50719
|
if (!(0, import_node_fs4.existsSync)(skillRoot)) {
|
|
50720
50720
|
throw new Error(`Could not resolve the bundled television skill root at ${skillRoot}.`);
|
|
50721
50721
|
}
|