thinyai 0.1.3 → 0.1.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/README.md +1 -0
- package/dist/bin.js +30 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ thiny # first launch runs setup, then starts chatting
|
|
|
36
36
|
| `thiny` | Start the interactive agent. Runs first-time setup if needed. |
|
|
37
37
|
| `thiny init` | (Re)run base setup — pick a model + agent name + API key. |
|
|
38
38
|
| `thiny sui init` | Add Sui on-chain capabilities — pick a network + wallet. |
|
|
39
|
+
| `thiny update` | Update to the latest published version (auto-detects bun/npm/pnpm). |
|
|
39
40
|
| `thiny help` | Show all commands. |
|
|
40
41
|
| `thiny --version` | Print the version. |
|
|
41
42
|
|
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// src/bin.ts
|
|
4
|
+
import { spawnSync } from "child_process";
|
|
5
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
6
|
+
|
|
3
7
|
// src/main.ts
|
|
4
8
|
import { createInterface } from "readline/promises";
|
|
5
9
|
import { clearLine, cursorTo, emitKeypressEvents } from "readline";
|
|
@@ -2621,11 +2625,33 @@ Usage:
|
|
|
2621
2625
|
thiny Start the interactive CLI agent (runs setup on first use)
|
|
2622
2626
|
thiny init Re-run setup (model, agent name, key)
|
|
2623
2627
|
thiny sui init Add Sui capabilities (network + wallet)
|
|
2628
|
+
thiny update Update thinyai to the latest version
|
|
2624
2629
|
thiny --version Print version
|
|
2625
2630
|
thiny help Show this help
|
|
2626
2631
|
|
|
2627
2632
|
Config: ~/.thiny/config.json (no .env needed)`);
|
|
2628
2633
|
}
|
|
2634
|
+
function detectPackageManager() {
|
|
2635
|
+
const here = fileURLToPath2(import.meta.url);
|
|
2636
|
+
if (here.includes("/.bun/") || here.includes("\\.bun\\")) return "bun";
|
|
2637
|
+
if (here.includes("pnpm")) return "pnpm";
|
|
2638
|
+
return "npm";
|
|
2639
|
+
}
|
|
2640
|
+
function update() {
|
|
2641
|
+
const pm = detectPackageManager();
|
|
2642
|
+
const args = pm === "npm" ? ["install", "-g", "thinyai@latest"] : ["add", "-g", "thinyai@latest"];
|
|
2643
|
+
console.log(`Updating thinyai via ${pm}\u2026 (${pm} ${args.join(" ")})`);
|
|
2644
|
+
const res = spawnSync(pm, args, { stdio: "inherit" });
|
|
2645
|
+
if (res.status !== 0) {
|
|
2646
|
+
console.error(
|
|
2647
|
+
`
|
|
2648
|
+
Update failed. Run it manually: ${pm} ${args.join(" ")}
|
|
2649
|
+
(or, if you used a different installer: npm i -g thinyai@latest)`
|
|
2650
|
+
);
|
|
2651
|
+
process.exit(res.status ?? 1);
|
|
2652
|
+
}
|
|
2653
|
+
console.log("\n\u2713 Updated. Run `thiny --version` to confirm.");
|
|
2654
|
+
}
|
|
2629
2655
|
async function run() {
|
|
2630
2656
|
const [sub, sub2] = process.argv.slice(2);
|
|
2631
2657
|
switch (sub) {
|
|
@@ -2636,6 +2662,10 @@ async function run() {
|
|
|
2636
2662
|
if (sub2 === "init") await suiInit();
|
|
2637
2663
|
else console.log("Usage: thiny sui init");
|
|
2638
2664
|
return;
|
|
2665
|
+
case "update":
|
|
2666
|
+
case "upgrade":
|
|
2667
|
+
update();
|
|
2668
|
+
return;
|
|
2639
2669
|
case "--version":
|
|
2640
2670
|
case "-v":
|
|
2641
2671
|
console.log(version());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thinyai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Thiny AI — a beautiful terminal agent: interactive chat, tools, Walrus memory, and Sui execution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"tsup": "^8.5.1",
|
|
39
39
|
"typescript": "^5.5.0",
|
|
40
|
-
"@thiny/memory-memwal": "0.1.0",
|
|
41
|
-
"@thiny/mcp": "0.1.0",
|
|
42
40
|
"@thiny/core": "0.1.0",
|
|
43
41
|
"@thiny/model-aisdk": "0.1.0",
|
|
44
42
|
"@thiny/walrus": "0.1.0",
|
|
45
43
|
"@thiny/logger-pino": "0.1.0",
|
|
44
|
+
"@thiny/memory-memwal": "0.1.0",
|
|
45
|
+
"@thiny/skills": "0.1.0",
|
|
46
46
|
"@thiny/plugin-agents": "0.1.0",
|
|
47
|
-
"@thiny/plugin-sui": "0.1.0",
|
|
48
47
|
"@thiny/signer-sui": "0.1.0",
|
|
49
|
-
"@thiny/
|
|
48
|
+
"@thiny/plugin-sui": "0.1.0",
|
|
49
|
+
"@thiny/mcp": "0.1.0"
|
|
50
50
|
},
|
|
51
51
|
"author": "Thiny AI",
|
|
52
52
|
"engines": {
|