@tankpkg/cli 0.16.2 → 0.16.4
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/bin/tank.js +17 -10
- package/dist/bin/tank.js.map +1 -1
- package/dist/{debug-logger-Bl6Iw7jM.js → debug-logger-Dna3btSz.js} +2 -2
- package/dist/{debug-logger-Bl6Iw7jM.js.map → debug-logger-Dna3btSz.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/tank.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as VERSION, i as USER_AGENT, l as setConfig, n as flushLogs, o as getConfig, s as getConfigDir, t as authFlowLog } from "../debug-logger-
|
|
2
|
+
import { a as VERSION, i as USER_AGENT, l as setConfig, n as flushLogs, o as getConfig, s as getConfigDir, t as authFlowLog } from "../debug-logger-Dna3btSz.js";
|
|
3
3
|
import { t as logger } from "../logger-BhULz3Uz.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { Command } from "commander";
|
|
@@ -9965,11 +9965,11 @@ function wrapMcpServerForSkill(options) {
|
|
|
9965
9965
|
logger.warn(`MCP proxy wrapping skipped for ${options.skillName}: ${msg}`);
|
|
9966
9966
|
}
|
|
9967
9967
|
}
|
|
9968
|
-
async function
|
|
9969
|
-
const {
|
|
9968
|
+
async function linkInstalledSkills(options) {
|
|
9969
|
+
const { skillNames, resolvedNodeByName, extractDirForSkill, directory, global, resolvedHome, homedir, dangerouslyNoTankProxy } = options;
|
|
9970
9970
|
const agentSkillsBaseDir = global ? getGlobalAgentSkillsDir(resolvedHome) : path.join(directory, ".tank", "agent-skills");
|
|
9971
9971
|
const linksDir = global ? path.join(resolvedHome, ".tank") : path.join(directory, ".tank");
|
|
9972
|
-
for (const skillName of
|
|
9972
|
+
for (const skillName of skillNames) try {
|
|
9973
9973
|
const node = resolvedNodeByName.get(skillName);
|
|
9974
9974
|
if (!node) continue;
|
|
9975
9975
|
const linkResult = linkSkillToAgents({
|
|
@@ -9993,7 +9993,7 @@ async function linkInstalledRoots(options) {
|
|
|
9993
9993
|
dangerouslyNoTankProxy
|
|
9994
9994
|
});
|
|
9995
9995
|
} catch {
|
|
9996
|
-
if (
|
|
9996
|
+
if (skillNames.length === 1) logger.warn("Agent linking skipped (non-fatal)");
|
|
9997
9997
|
else logger.warn(`Agent linking skipped for ${skillName} (non-fatal)`);
|
|
9998
9998
|
}
|
|
9999
9999
|
const detectedAgents = detectInstalledAgents(homedir);
|
|
@@ -10006,7 +10006,7 @@ async function linkInstalledRoots(options) {
|
|
|
10006
10006
|
openclaw: "opencode"
|
|
10007
10007
|
};
|
|
10008
10008
|
const platforms = new Set(detectedAgents.map((a) => agentToPlatform[a.id]).filter(Boolean));
|
|
10009
|
-
for (const skillName of
|
|
10009
|
+
for (const skillName of skillNames) {
|
|
10010
10010
|
if (!resolvedNodeByName.get(skillName)) continue;
|
|
10011
10011
|
const skillDir = extractDirForSkill(skillName);
|
|
10012
10012
|
const manifestPath = path.join(skillDir, "tank.json");
|
|
@@ -10057,8 +10057,8 @@ async function executeInstallPipeline(options) {
|
|
|
10057
10057
|
global,
|
|
10058
10058
|
homedir
|
|
10059
10059
|
});
|
|
10060
|
-
await
|
|
10061
|
-
|
|
10060
|
+
await linkInstalledSkills({
|
|
10061
|
+
skillNames: nodesToInstall.map((node) => node.name),
|
|
10062
10062
|
resolvedNodeByName,
|
|
10063
10063
|
extractDirForSkill,
|
|
10064
10064
|
directory,
|
|
@@ -11915,6 +11915,14 @@ function resolveCurrentBinary() {
|
|
|
11915
11915
|
return process.execPath;
|
|
11916
11916
|
}
|
|
11917
11917
|
}
|
|
11918
|
+
function replaceBinary(tmpBin, currentBinaryPath) {
|
|
11919
|
+
if (process.platform !== "win32") {
|
|
11920
|
+
fs.renameSync(tmpBin, currentBinaryPath);
|
|
11921
|
+
fs.chmodSync(currentBinaryPath, 493);
|
|
11922
|
+
return;
|
|
11923
|
+
}
|
|
11924
|
+
fs.copyFileSync(tmpBin, currentBinaryPath);
|
|
11925
|
+
}
|
|
11918
11926
|
async function upgradeCommand(opts) {
|
|
11919
11927
|
const currentBinaryPath = resolveCurrentBinary();
|
|
11920
11928
|
if (process.platform !== "win32" && (currentBinaryPath.includes("/Cellar/") || currentBinaryPath.includes("/homebrew/"))) {
|
|
@@ -11972,8 +11980,7 @@ async function upgradeCommand(opts) {
|
|
|
11972
11980
|
return;
|
|
11973
11981
|
}
|
|
11974
11982
|
if (process.platform !== "win32") fs.chmodSync(tmpBin, 493);
|
|
11975
|
-
|
|
11976
|
-
if (process.platform !== "win32") fs.chmodSync(currentBinaryPath, 493);
|
|
11983
|
+
replaceBinary(tmpBin, currentBinaryPath);
|
|
11977
11984
|
console.log(chalk.green(`✓ Upgraded tank ${VERSION} → ${targetVersion}`));
|
|
11978
11985
|
console.log(chalk.gray(`Release notes: https://github.com/tankpkg/tank/releases/tag/v${targetVersion}`));
|
|
11979
11986
|
} finally {
|