@teneo-protocol/cli 1.1.1 → 2.0.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/install.mjs +12 -7
- package/package.json +1 -1
package/install.mjs
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
|
-
import { existsSync, mkdirSync, writeFileSync, chmodSync } from "fs";
|
|
5
|
-
import { join } from "path";
|
|
4
|
+
import { existsSync, mkdirSync, writeFileSync, chmodSync, readFileSync } from "fs";
|
|
5
|
+
import { join, dirname } from "path";
|
|
6
6
|
import { homedir, tmpdir } from "os";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const PKG = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf-8"));
|
|
11
|
+
const VERSION = PKG.version;
|
|
7
12
|
|
|
8
13
|
const INSTALL_DIR = join(homedir(), "teneo-skill");
|
|
9
14
|
const REPO = "https://github.com/TeneoProtocolAI/teneo-skills.git";
|
|
@@ -34,7 +39,7 @@ if (nodeMajor < 18) {
|
|
|
34
39
|
process.exit(1);
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
console.log(
|
|
42
|
+
console.log(`\n Teneo Protocol CLI Installer v${VERSION}\n`);
|
|
38
43
|
|
|
39
44
|
// ── Step 1: Install CLI ───────────────────────────────────────
|
|
40
45
|
|
|
@@ -119,15 +124,15 @@ log("");
|
|
|
119
124
|
log("Verifying installation...");
|
|
120
125
|
|
|
121
126
|
try {
|
|
122
|
-
const
|
|
127
|
+
const result = run(`${join(INSTALL_DIR, "teneo")} list-agents`, { timeout: 30000 });
|
|
123
128
|
log("CLI is working!");
|
|
124
|
-
console.log(
|
|
129
|
+
console.log(result);
|
|
125
130
|
} catch {
|
|
126
|
-
log("CLI installed but
|
|
131
|
+
log("CLI installed but verification failed — this is OK on first run.");
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
console.log("");
|
|
130
|
-
console.log(
|
|
135
|
+
console.log(` Teneo CLI v${VERSION} installed to ~/teneo-skill/`);
|
|
131
136
|
console.log("");
|
|
132
137
|
console.log(" Usage:");
|
|
133
138
|
console.log(" ~/teneo-skill/teneo health");
|
package/package.json
CHANGED