@teneo-protocol/cli 2.0.40 → 2.0.42

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.
Files changed (2) hide show
  1. package/install.mjs +24 -2
  2. package/package.json +1 -1
package/install.mjs CHANGED
@@ -31,6 +31,20 @@ function run(cmd, opts = {}) {
31
31
  return execSync(cmd, { stdio: "pipe", encoding: "utf-8", ...opts });
32
32
  }
33
33
 
34
+ function renderMarkdownForConsole(markdown) {
35
+ return markdown
36
+ .split(/\r?\n/)
37
+ .map((line) => {
38
+ let formatted = line;
39
+ if (line.startsWith("### ")) formatted = ` ${line.slice(4)}`;
40
+ else if (line.startsWith("## ")) formatted = `${line.slice(3)}`;
41
+ else if (line.startsWith("- ")) formatted = ` ${line}`;
42
+ return formatted.replace(/`/g, "");
43
+ })
44
+ .join("\n")
45
+ .trim();
46
+ }
47
+
34
48
  // ── Preflight ─────────────────────────────────────────────────
35
49
 
36
50
  const nodeMajor = parseInt(process.versions.node.split(".")[0], 10);
@@ -50,16 +64,19 @@ if (alreadyInstalled) {
50
64
  }
51
65
 
52
66
  const tmpDir = join(tmpdir(), `teneo-install-${Date.now()}`);
67
+ let greetingMarkdown = "";
53
68
 
54
69
  try {
55
70
  log("Cloning teneo-skills repo...");
56
71
  run(`git clone --depth 1 ${REPO} ${tmpDir}`);
57
72
 
58
73
  const cliDir = join(tmpDir, "cli");
59
- if (!existsSync(join(cliDir, "index.ts")) || !existsSync(join(cliDir, "daemon.ts"))) {
74
+ const greetingFile = join(cliDir, "greetings.install.md");
75
+ if (!existsSync(join(cliDir, "index.ts")) || !existsSync(join(cliDir, "daemon.ts")) || !existsSync(greetingFile)) {
60
76
  console.error("Error: CLI source files not found in cloned repo.");
61
77
  process.exit(1);
62
78
  }
79
+ greetingMarkdown = readFileSync(greetingFile, "utf-8");
63
80
 
64
81
  mkdirSync(INSTALL_DIR, { recursive: true });
65
82
 
@@ -67,7 +84,8 @@ try {
67
84
  const { copyFileSync } = await import("fs");
68
85
  copyFileSync(join(cliDir, "index.ts"), join(INSTALL_DIR, "teneo.ts"));
69
86
  copyFileSync(join(cliDir, "daemon.ts"), join(INSTALL_DIR, "daemon.ts"));
70
- log("Copied teneo.ts and daemon.ts");
87
+ copyFileSync(greetingFile, join(INSTALL_DIR, "greetings.install.md"));
88
+ log("Copied teneo.ts, daemon.ts, and greetings.install.md");
71
89
 
72
90
  // Install npm dependencies — clean lock file on updates to avoid stale version resolution
73
91
  if (!existsSync(join(INSTALL_DIR, "package.json"))) {
@@ -142,6 +160,10 @@ console.log(" ~/teneo-skill/teneo health");
142
160
  console.log(" ~/teneo-skill/teneo list-agents");
143
161
  console.log(" ~/teneo-skill/teneo discover");
144
162
  console.log("");
163
+ if (greetingMarkdown.trim()) {
164
+ console.log(renderMarkdownForConsole(greetingMarkdown));
165
+ console.log("");
166
+ }
145
167
  console.log(" Build your own agent:");
146
168
  console.log(" Use the teneo-cli skill and its `agent` commands to scaffold or launch an agent");
147
169
  console.log(" Agent SDK: https://github.com/TeneoProtocolAI/teneo-agent-sdk");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teneo-protocol/cli",
3
- "version": "2.0.40",
3
+ "version": "2.0.42",
4
4
  "description": "Install the Teneo Protocol CLI to discover and query network agents, auto-pay them in USDC via x402, and deploy your own agents from coding assistants",
5
5
  "bin": {
6
6
  "teneo-cli": "./install.mjs"